diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d851e4d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,67 @@ +# Managed by api-generation (templates/github/python); overwritten on each public release. +# Publishes corellium-api-client to PyPI with trusted publishing (OIDC): no PyPI token +# is stored anywhere. It runs when the GitLab push mirror delivers a vX.Y.Z tag; PyPI +# only accepts OIDC from GitHub Actions or gitlab.com, so the upload lives here. +name: Publish to PyPI + +on: + push: + tags: + - 'v*.*.*' + +permissions: + contents: read + +concurrency: + group: pypi-publish + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 + with: + python-version: '3.12' + + - name: Verify tag matches package version + run: | + pkg="$(sed -nE 's/^version *= *"([^"]+)".*/\1/p' pyproject.toml | head -n1)" + if [ "${GITHUB_REF_NAME#v}" != "$pkg" ]; then + echo "::error::tag ${GITHUB_REF_NAME} does not match pyproject.toml version ${pkg}" + exit 1 + fi + + - name: Build + run: | + python -m pip install --upgrade build twine + python -m build + python -m twine check --strict dist/* + + - name: Upload distributions + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: dist + path: dist/ + if-no-files-found: error + + publish: + needs: build + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Download distributions + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + name: dist + path: dist/ + + - name: Publish + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 diff --git a/.gitignore b/.gitignore index f2f79a1..43995bd 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,3 @@ target/ #Ipython Notebook .ipynb_checkpoints - -# Generated upload file -git_push.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d092e67..e482371 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,33 +1,31 @@ +# NOTE: This file is auto generated by OpenAPI Generator. +# URL: https://openapi-generator.tech +# # ref: https://docs.gitlab.com/ee/ci/README.html +# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml stages: - test -.nosetest: +.pytest: stage: test script: - pip install -r requirements.txt - pip install -r test-requirements.txt - - pytest --cov=corellium_api + - pytest --cov=corellium -nosetest-2.7: - extends: .nosetest - image: python:2.7-alpine -nosetest-3.3: - extends: .nosetest - image: python:3.3-alpine -nosetest-3.4: - extends: .nosetest - image: python:3.4-alpine -nosetest-3.5: - extends: .nosetest - image: python:3.5-alpine -nosetest-3.6: - extends: .nosetest - image: python:3.6-alpine -nosetest-3.7: - extends: .nosetest - image: python:3.7-alpine -nosetest-3.8: - extends: .nosetest - image: python:3.8-alpine +pytest-3.9: + extends: .pytest + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine +pytest-3.12: + extends: .pytest + image: python:3.12-alpine +pytest-3.13: + extends: .pytest + image: python:3.13-alpine diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index df926e7..70cdbdf 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,325 +1,2294 @@ +.github/workflows/python.yml .gitignore .gitlab-ci.yml .openapi-generator-ignore .travis.yml README.md -corellium_api/__init__.py -corellium_api/api/__init__.py -corellium_api/api/corellium_api.py -corellium_api/api_client.py -corellium_api/configuration.py -corellium_api/exceptions.py -corellium_api/models/__init__.py -corellium_api/models/address.py -corellium_api/models/agent_app.py -corellium_api/models/agent_app_ready_response.py -corellium_api/models/agent_app_status.py -corellium_api/models/agent_apps_list.py -corellium_api/models/agent_apps_status_list.py -corellium_api/models/agent_error.py -corellium_api/models/agent_icons.py -corellium_api/models/agent_install_body.py -corellium_api/models/agent_profiles_return.py -corellium_api/models/agent_system_adb_auth.py -corellium_api/models/agent_system_get_prop_body.py -corellium_api/models/agent_value_return.py -corellium_api/models/agreed_ack.py -corellium_api/models/api_conflict_error.py -corellium_api/models/api_error.py -corellium_api/models/api_internal_consistency_error.py -corellium_api/models/api_not_found_error.py -corellium_api/models/api_token.py -corellium_api/models/bit.py -corellium_api/models/btrace_enable_options.py -corellium_api/models/button.py -corellium_api/models/coupon_options.py -corellium_api/models/create_team.py -corellium_api/models/created_by.py -corellium_api/models/credentials.py -corellium_api/models/domain_options.py -corellium_api/models/extension.py -corellium_api/models/features.py -corellium_api/models/file_changes.py -corellium_api/models/firmware.py -corellium_api/models/gpio_state_definition.py -corellium_api/models/gpios_state.py -corellium_api/models/grant_trial_request_response.py -corellium_api/models/hook.py -corellium_api/models/image.py -corellium_api/models/instance.py -corellium_api/models/instance_agent_state.py -corellium_api/models/instance_boot_options.py -corellium_api/models/instance_boot_options_additional_tag.py -corellium_api/models/instance_console_endpoint.py -corellium_api/models/instance_create_options.py -corellium_api/models/instance_input.py -corellium_api/models/instance_netdump_state.py -corellium_api/models/instance_netmon_state.py -corellium_api/models/instance_return.py -corellium_api/models/instance_services.py -corellium_api/models/instance_start_options.py -corellium_api/models/instance_state.py -corellium_api/models/instance_stop_options.py -corellium_api/models/instance_upgrade_body.py -corellium_api/models/invitation.py -corellium_api/models/invite_revoke_params.py -corellium_api/models/invite_revoke_params_ids.py -corellium_api/models/kcrange.py -corellium_api/models/kernel_task.py -corellium_api/models/kernel_thread.py -corellium_api/models/media_play_body.py -corellium_api/models/model.py -corellium_api/models/model_software.py -corellium_api/models/netdump_filter.py -corellium_api/models/password_change_body.py -corellium_api/models/password_reset_body.py -corellium_api/models/patch_instance_options.py -corellium_api/models/peripherals_data.py -corellium_api/models/plan.py -corellium_api/models/project.py -corellium_api/models/project_key.py -corellium_api/models/project_quota.py -corellium_api/models/project_settings.py -corellium_api/models/project_usage.py -corellium_api/models/proxy_config.py -corellium_api/models/rate_info.py -corellium_api/models/reset_link_body.py -corellium_api/models/role.py -corellium_api/models/rotate_body.py -corellium_api/models/snapshot.py -corellium_api/models/snapshot_creation_options.py -corellium_api/models/snapshot_status.py -corellium_api/models/subscriber_invite.py -corellium_api/models/team.py -corellium_api/models/team_create.py -corellium_api/models/text_input.py -corellium_api/models/token.py -corellium_api/models/touch_curve_input.py -corellium_api/models/touch_input.py -corellium_api/models/trial.py -corellium_api/models/trial_extension.py -corellium_api/models/trial_request_metadata.py -corellium_api/models/trial_request_options.py -corellium_api/models/update_extension.py -corellium_api/models/user.py -corellium_api/models/user_error.py -corellium_api/models/v1_create_hook_parameters.py -corellium_api/models/v1_load_extension_parameters.py -corellium_api/models/v1_set_state_body.py -corellium_api/models/validation_error.py -corellium_api/models/volume_options.py -corellium_api/models/vpn_definition.py -corellium_api/models/web_player_create_session_request.py -corellium_api/models/web_player_session.py -corellium_api/rest.py +corellium/__init__.py +corellium/api/__init__.py +corellium/api/activity_api.py +corellium/api/activity_v1_api.py +corellium/api/agent_api.py +corellium/api/agent_v1_api.py +corellium/api/assessments_api.py +corellium/api/assessments_v1_api.py +corellium/api/authentication_api.py +corellium/api/authentication_v1_api.py +corellium/api/billing_api.py +corellium/api/cluster_administration_config_api.py +corellium/api/cluster_administration_firmware_service_api.py +corellium/api/cluster_administration_nodes_api.py +corellium/api/cluster_api.py +corellium/api/cluster_snapshots_api.py +corellium/api/config_api.py +corellium/api/config_v1_api.py +corellium/api/core_trace_api.py +corellium/api/core_trace_v1_api.py +corellium/api/domain_api.py +corellium/api/domain_auth_provider_api.py +corellium/api/domain_auth_providers_api.py +corellium/api/domain_v1_api.py +corellium/api/extensions_api.py +corellium/api/extensions_v1_api.py +corellium/api/external_services_api.py +corellium/api/firmware_service_api.py +corellium/api/flavors_api.py +corellium/api/hyper_trace_api.py +corellium/api/hyper_trace_v1_api.py +corellium/api/hypertune_api.py +corellium/api/hypervisor_hooks_api.py +corellium/api/hypervisor_hooks_v1_api.py +corellium/api/images_api.py +corellium/api/images_v1_api.py +corellium/api/images_v2_api.py +corellium/api/instances_api.py +corellium/api/instances_v1_api.py +corellium/api/instances_v2_api.py +corellium/api/interconnects_api.py +corellium/api/interconnects_v1_api.py +corellium/api/invites_api.py +corellium/api/invites_v1_api.py +corellium/api/models_api.py +corellium/api/models_v1_api.py +corellium/api/net_connect_api.py +corellium/api/net_connect_v1_api.py +corellium/api/projects_api.py +corellium/api/projects_v1_api.py +corellium/api/ram_dump_api.py +corellium/api/ram_dump_v1_api.py +corellium/api/roles_api.py +corellium/api/roles_v1_api.py +corellium/api/snapshot_sharing_api.py +corellium/api/snapshot_sharing_v1_api.py +corellium/api/snapshots_api.py +corellium/api/snapshots_v1_api.py +corellium/api/status_api.py +corellium/api/status_v1_api.py +corellium/api/storage_api.py +corellium/api/storage_v1_api.py +corellium/api/teams_api.py +corellium/api/teams_v1_api.py +corellium/api/totp_api.py +corellium/api/users_api.py +corellium/api/users_v1_api.py +corellium/api/web_player_api.py +corellium/api/web_player_v1_api.py +corellium/api_client.py +corellium/api_response.py +corellium/configuration.py +corellium/exceptions.py +corellium/models/__init__.py +corellium/models/accept_snapshot_body.py +corellium/models/accept_snapshot_request_payload.py +corellium/models/account_setup_response.py +corellium/models/activity.py +corellium/models/activity_export_dto.py +corellium/models/activity_export_format.py +corellium/models/activity_export_response.py +corellium/models/activity_export_status.py +corellium/models/activity_export_task.py +corellium/models/activity_export_task_list.py +corellium/models/activity_list.py +corellium/models/activity_list_response.py +corellium/models/activity_request.py +corellium/models/activity_resource_not_starts_with_filter.py +corellium/models/activity_resource_starts_with_filter.py +corellium/models/activity_v1.py +corellium/models/address.py +corellium/models/agent_app.py +corellium/models/agent_app_ready_response.py +corellium/models/agent_app_ready_response_v1.py +corellium/models/agent_app_status.py +corellium/models/agent_app_status_v1.py +corellium/models/agent_app_v1.py +corellium/models/agent_apps_list.py +corellium/models/agent_apps_list_v1.py +corellium/models/agent_apps_status_list.py +corellium/models/agent_apps_status_list_v1.py +corellium/models/agent_container.py +corellium/models/agent_container_health.py +corellium/models/agent_container_list.py +corellium/models/agent_error.py +corellium/models/agent_error_v1.py +corellium/models/agent_file_archive_download_body.py +corellium/models/agent_file_attributes_body.py +corellium/models/agent_file_download_token.py +corellium/models/agent_frida_process_list.py +corellium/models/agent_frida_process_list_attached.py +corellium/models/agent_frida_response.py +corellium/models/agent_frida_run_body.py +corellium/models/agent_icons.py +corellium/models/agent_icons_response.py +corellium/models/agent_install_body.py +corellium/models/agent_install_body_v1.py +corellium/models/agent_profile_list_response.py +corellium/models/agent_profiles_return.py +corellium/models/agent_remote_it_status.py +corellium/models/agent_system_adb_auth.py +corellium/models/agent_system_adb_auth_v1.py +corellium/models/agent_system_get_prop_body.py +corellium/models/agent_system_get_prop_body_v1.py +corellium/models/agent_system_get_prop_response.py +corellium/models/agent_system_install_open_gapps_body.py +corellium/models/agent_system_network_response.py +corellium/models/agent_system_result.py +corellium/models/agent_system_set_device_properties_body.py +corellium/models/agent_system_set_hostname_body.py +corellium/models/agent_system_set_hostname_body_v1.py +corellium/models/agent_temp_file_response.py +corellium/models/agent_value_return.py +corellium/models/agreed_ack.py +corellium/models/agreed_ack_v1.py +corellium/models/ai_tools_config.py +corellium/models/ai_tools_config_v1.py +corellium/models/allowed_devices_filter_schema.py +corellium/models/allowed_domains_response.py +corellium/models/allowed_firmware_schema.py +corellium/models/api_conflict_error.py +corellium/models/api_conflict_error_v1.py +corellium/models/api_error.py +corellium/models/api_error_v1.py +corellium/models/api_internal_consistency_error.py +corellium/models/api_not_found_error.py +corellium/models/api_not_found_error_v1.py +corellium/models/api_token.py +corellium/models/api_token_result.py +corellium/models/artifacts_path.py +corellium/models/assessment.py +corellium/models/assessment_bundle.py +corellium/models/assessment_format.py +corellium/models/assessment_frida_script.py +corellium/models/assessment_history.py +corellium/models/assessment_history_line_item.py +corellium/models/assessment_history_results_inner.py +corellium/models/assessment_history_v1.py +corellium/models/assessment_id_status.py +corellium/models/assessment_metadata.py +corellium/models/assessment_results.py +corellium/models/assessment_severity_counts.py +corellium/models/assessment_status.py +corellium/models/assessment_wordlist.py +corellium/models/attach_interface_body.py +corellium/models/attach_interface_request.py +corellium/models/auth_provider.py +corellium/models/auth_provider_type.py +corellium/models/auth_provider_types_list_response.py +corellium/models/auth_provider_v1.py +corellium/models/auth_providers_list_response.py +corellium/models/available_plans_list_response.py +corellium/models/available_trial_plan.py +corellium/models/available_trial_plan_list.py +corellium/models/aws_create_response.py +corellium/models/billing_line_item.py +corellium/models/billing_summary.py +corellium/models/billing_summary_pending_usage_based.py +corellium/models/bit.py +corellium/models/btrace_enable_options.py +corellium/models/button.py +corellium/models/cancel_subscription_body.py +corellium/models/change_password_body.py +corellium/models/charm_tag.py +corellium/models/check_subdomain_response.py +corellium/models/check_subdomain_response_v1.py +corellium/models/cloud_notification_item.py +corellium/models/cloud_notification_list.py +corellium/models/cluster_config.py +corellium/models/cluster_config_coordinator_config.py +corellium/models/cluster_config_coordinator_config_auth_providers_inner.py +corellium/models/cluster_config_coordinator_config_auth_providers_inner_any_of.py +corellium/models/cluster_config_coordinator_config_auth_providers_inner_any_of1.py +corellium/models/cluster_config_coordinator_config_aws_marketplace.py +corellium/models/cluster_config_coordinator_config_ensure_domain.py +corellium/models/cluster_config_coordinator_config_ensure_domain_properties.py +corellium/models/cluster_config_coordinator_config_ensure_domain_quotas.py +corellium/models/cluster_config_coordinator_config_hubspot.py +corellium/models/cluster_config_coordinator_config_hypertune.py +corellium/models/cluster_config_coordinator_config_pipedrive.py +corellium/models/cluster_config_coordinator_config_trial.py +corellium/models/cluster_config_coordinator_config_webplayer.py +corellium/models/cluster_config_firmware_service_config.py +corellium/models/cluster_config_ipsw_filters_inner.py +corellium/models/cluster_config_ipsw_filters_inner_device.py +corellium/models/cluster_config_ipsw_filters_inner_version.py +corellium/models/cluster_config_maintenance.py +corellium/models/cluster_config_net_mon_ca.py +corellium/models/cluster_config_node_specific_config.py +corellium/models/cluster_config_package_config.py +corellium/models/cluster_config_package_config_components.py +corellium/models/cluster_config_package_config_features.py +corellium/models/cluster_config_package_config_flavor_filters_inner.py +corellium/models/cluster_config_package_config_flavor_filters_inner_apply.py +corellium/models/cluster_config_package_config_flavor_filters_inner_filter.py +corellium/models/cluster_config_setup_config.py +corellium/models/cluster_config_stripe.py +corellium/models/cluster_config_update_error.py +corellium/models/cluster_configuration_payload.py +corellium/models/cluster_node.py +corellium/models/cluster_node_available.py +corellium/models/cluster_node_reserved.py +corellium/models/cluster_node_status.py +corellium/models/cluster_node_status_cluster_totals.py +corellium/models/cluster_node_status_cluster_totals_available.py +corellium/models/cluster_node_status_cluster_totals_reserved.py +corellium/models/cluster_node_status_cluster_totals_total.py +corellium/models/cluster_node_total.py +corellium/models/cluster_snapshot.py +corellium/models/cluster_snapshot_list.py +corellium/models/cluster_snapshot_metadata.py +corellium/models/cluster_snapshot_status.py +corellium/models/cluster_snapshot_v1.py +corellium/models/compute_node_file.py +corellium/models/compute_node_file_list.py +corellium/models/config_auth_provider.py +corellium/models/config_response.py +corellium/models/config_response_ai_tools_config.py +corellium/models/config_response_maintenance.py +corellium/models/config_response_v1.py +corellium/models/coordinator_config.py +corellium/models/coordinator_config_v1.py +corellium/models/coupon_options.py +corellium/models/create_activity_export_body.py +corellium/models/create_activity_export_response.py +corellium/models/create_assessment_input.py +corellium/models/create_cloud_admin_trial_request_body.py +corellium/models/create_domain_auth_provider_body.py +corellium/models/create_domain_auth_provider_response.py +corellium/models/create_domain_auth_provider_response_config.py +corellium/models/create_domain_welcome_message_body.py +corellium/models/create_hook_body.py +corellium/models/create_image_body.py +corellium/models/create_instance_body.py +corellium/models/create_instance_response.py +corellium/models/create_interconnect_body.py +corellium/models/create_interconnect_v3_body.py +corellium/models/create_invites_body.py +corellium/models/create_network_connection_body.py +corellium/models/create_network_connection_options.py +corellium/models/create_open_vpn_network_connection_body.py +corellium/models/create_open_vpn_network_connection_body_v1.py +corellium/models/create_project_body.py +corellium/models/create_project_key_body.py +corellium/models/create_snapshot_body.py +corellium/models/create_team.py +corellium/models/create_team_body.py +corellium/models/create_trial_request_body.py +corellium/models/create_trial_request_response.py +corellium/models/create_trial_request_response_trial_request.py +corellium/models/create_user_body.py +corellium/models/create_vlan_network_connection_body.py +corellium/models/create_vlan_network_connection_body_v1.py +corellium/models/create_web_player_session_body.py +corellium/models/created_by.py +corellium/models/credentials.py +corellium/models/delete_modification_input.py +corellium/models/delete_network_connection_options.py +corellium/models/deployment_version.py +corellium/models/detach_interface_body.py +corellium/models/detach_interface_request.py +corellium/models/device.py +corellium/models/device_auto_shutdown_schema.py +corellium/models/device_usage.py +corellium/models/domain_auth_provider_config.py +corellium/models/domain_auth_provider_request.py +corellium/models/domain_auth_provider_response.py +corellium/models/domain_auth_provider_response_v1.py +corellium/models/domain_auth_providers_list.py +corellium/models/domain_config.py +corellium/models/domain_config_input.py +corellium/models/domain_config_input_snapshot_sharing_permissions.py +corellium/models/domain_config_input_trial.py +corellium/models/domain_config_input_webplayer.py +corellium/models/domain_config_snapshot_sharing_permissions.py +corellium/models/domain_config_trial.py +corellium/models/domain_config_trial_end_action.py +corellium/models/domain_config_trial_subscribe_action.py +corellium/models/domain_config_webplayer.py +corellium/models/domain_info.py +corellium/models/domain_list.py +corellium/models/domain_list_item.py +corellium/models/domain_list_item_disabled.py +corellium/models/domain_list_item_domain_usage_inner.py +corellium/models/domain_list_item_projects_inner.py +corellium/models/domain_list_item_projects_inner_instances_inner.py +corellium/models/domain_list_item_projects_inner_instances_inner_images_inner.py +corellium/models/domain_list_item_projects_inner_instances_inner_usage.py +corellium/models/domain_list_item_projects_inner_quotas.py +corellium/models/domain_list_item_projects_inner_usage.py +corellium/models/domain_list_item_quotas.py +corellium/models/domain_list_item_subscription.py +corellium/models/domain_list_item_subscription_history_inner.py +corellium/models/domain_list_item_subscription_history_inner_administrator.py +corellium/models/domain_list_item_usage.py +corellium/models/domain_list_item_users_info_inner.py +corellium/models/domain_list_usage.py +corellium/models/domain_options.py +corellium/models/domain_software.py +corellium/models/domain_software_list.py +corellium/models/domain_welcome_message_response.py +corellium/models/domain_welcome_message_response_v1.py +corellium/models/edit_invites_body.py +corellium/models/edit_invites_body_changes.py +corellium/models/enable_btrace_body.py +corellium/models/enable_netdump_body.py +corellium/models/enable_sslsplit_body.py +corellium/models/ensure_domain_settings_body.py +corellium/models/ensure_domain_settings_body_admin_user.py +corellium/models/ensure_domain_settings_response.py +corellium/models/ensure_domain_settings_response_user.py +corellium/models/extended_firmware_asset_info.py +corellium/models/extended_firmware_asset_info_v1.py +corellium/models/extension.py +corellium/models/extension_flavor.py +corellium/models/extension_list.py +corellium/models/extension_v1.py +corellium/models/features.py +corellium/models/fetch_firmware_assets_body.py +corellium/models/fetch_firmware_assets_response.py +corellium/models/fetch_firmware_assets_response_failed_inner.py +corellium/models/file_changes.py +corellium/models/firmware.py +corellium/models/firmware_asset.py +corellium/models/firmware_asset_filter.py +corellium/models/firmware_asset_list.py +corellium/models/firmware_asset_v1.py +corellium/models/firmware_device.py +corellium/models/firmware_device_list.py +corellium/models/firmware_info_device.py +corellium/models/firmware_info_device_firmwares_inner.py +corellium/models/firmware_list.py +corellium/models/firmware_service_config.py +corellium/models/firmware_service_config_cache_firmware.py +corellium/models/firmware_service_config_download_ipsw_filters.py +corellium/models/firmware_service_config_value.py +corellium/models/firmware_service_configuration.py +corellium/models/firmware_service_settings.py +corellium/models/firmware_v1.py +corellium/models/flavor_frame.py +corellium/models/flavor_frame_dimensions.py +corellium/models/flavor_frame_home.py +corellium/models/flavor_frame_inner.py +corellium/models/get_firmware_info_body.py +corellium/models/get_interconnects_response.py +corellium/models/get_invite_by_token_body.py +corellium/models/get_reset_link_info_body.py +corellium/models/get_storage_response.py +corellium/models/gpio_state_definition.py +corellium/models/gpio_state_definition_banks_inner_inner.py +corellium/models/gpio_state_definition_v1.py +corellium/models/gpios_state.py +corellium/models/gpios_state_v1.py +corellium/models/hook.py +corellium/models/hook_list.py +corellium/models/hook_patch_type.py +corellium/models/hook_v1.py +corellium/models/hypertune_hash_response.py +corellium/models/hypertune_init_response.py +corellium/models/image.py +corellium/models/image_creation_options.py +corellium/models/image_encoding.py +corellium/models/image_extended.py +corellium/models/image_extended_device.py +corellium/models/image_firmware.py +corellium/models/image_firmware_info.py +corellium/models/image_firmware_info_boot_args.py +corellium/models/image_list.py +corellium/models/image_type.py +corellium/models/image_v1.py +corellium/models/input_response.py +corellium/models/input_response_v1.py +corellium/models/install_firmware_assets_body.py +corellium/models/install_firmware_assets_body_v1.py +corellium/models/install_firmware_assets_response.py +corellium/models/install_firmware_assets_response_v1.py +corellium/models/install_firmware_body.py +corellium/models/install_firmware_body_v1.py +corellium/models/install_firmware_response.py +corellium/models/install_firmware_response_v1.py +corellium/models/install_firmware_status_response.py +corellium/models/instance.py +corellium/models/instance_agent_state.py +corellium/models/instance_agent_state_v1.py +corellium/models/instance_boot_options.py +corellium/models/instance_boot_options_additional_tag.py +corellium/models/instance_boot_options_fvp.py +corellium/models/instance_boot_options_kernel.py +corellium/models/instance_boot_options_kernel_v1.py +corellium/models/instance_boot_options_pongo.py +corellium/models/instance_boot_options_pongo_v1.py +corellium/models/instance_boot_options_v1.py +corellium/models/instance_boot_options_vmmio_inner.py +corellium/models/instance_console.py +corellium/models/instance_console_endpoint.py +corellium/models/instance_console_endpoint_v1.py +corellium/models/instance_console_v1.py +corellium/models/instance_create_options.py +corellium/models/instance_hyper_trace_state.py +corellium/models/instance_hyper_trace_state_v1.py +corellium/models/instance_input_body.py +corellium/models/instance_input_request.py +corellium/models/instance_interface.py +corellium/models/instance_interface_status.py +corellium/models/instance_list.py +corellium/models/instance_netdump_state.py +corellium/models/instance_netdump_state_v1.py +corellium/models/instance_netmon_state.py +corellium/models/instance_netmon_state_v1.py +corellium/models/instance_read_only_status.py +corellium/models/instance_read_only_status_v1.py +corellium/models/instance_restore_status.py +corellium/models/instance_restore_status_v1.py +corellium/models/instance_return.py +corellium/models/instance_services.py +corellium/models/instance_services_v1.py +corellium/models/instance_snapshots_list.py +corellium/models/instance_start_options.py +corellium/models/instance_state.py +corellium/models/instance_state_v1.py +corellium/models/instance_stop_options.py +corellium/models/instance_trace_filter.py +corellium/models/instance_trace_state.py +corellium/models/instance_trace_state_v1.py +corellium/models/instance_uefi_bootloader.py +corellium/models/instance_upgrade_body.py +corellium/models/instance_upgrade_body_v1.py +corellium/models/instance_upgrade_response.py +corellium/models/instance_v1.py +corellium/models/insufficient_storage_error.py +corellium/models/insufficient_storage_error_v1.py +corellium/models/interconnect.py +corellium/models/interconnect_list.py +corellium/models/interconnect_protocol.py +corellium/models/interconnect_response.py +corellium/models/interfaces_schema_inner.py +corellium/models/invalid_credentials_error.py +corellium/models/invalid_totp_error.py +corellium/models/invitation.py +corellium/models/invitation_by_token.py +corellium/models/invitation_v1.py +corellium/models/invite_created.py +corellium/models/invite_created_entry.py +corellium/models/invite_result.py +corellium/models/invite_result_error.py +corellium/models/invite_revoke_params.py +corellium/models/invite_settings.py +corellium/models/invite_signup_body.py +corellium/models/invite_signup_body_params.py +corellium/models/invite_signup_response.py +corellium/models/invites_list_response.py +corellium/models/ipsw_device_constraint.py +corellium/models/ipsw_filter.py +corellium/models/ipsw_filter_v3.py +corellium/models/ipsw_filter_v3_device.py +corellium/models/ipsw_filter_v3_version.py +corellium/models/ipsw_version_constraint.py +corellium/models/kcrange.py +corellium/models/kcrange_v1.py +corellium/models/kernel_task.py +corellium/models/kernel_task_v1.py +corellium/models/kernel_thread.py +corellium/models/kernel_thread_v1.py +corellium/models/layout_schema.py +corellium/models/ldap_authentication_credentials.py +corellium/models/ldap_config.py +corellium/models/ldap_group_search_configuration.py +corellium/models/ldap_server_connection_details.py +corellium/models/ldap_user_attribute_mapping.py +corellium/models/ldap_user_search_configuration.py +corellium/models/load_extension_body.py +corellium/models/logging.py +corellium/models/logging_v1.py +corellium/models/login_body.py +corellium/models/login_result.py +corellium/models/login_result_disabled.py +corellium/models/login_result_domain.py +corellium/models/login_result_domain_device_auto_shutdown.py +corellium/models/login_result_domain_disabled.py +corellium/models/login_result_domain_snapshot_sharing_permissions.py +corellium/models/login_result_domain_trial.py +corellium/models/login_result_domain_webplayer.py +corellium/models/login_result_user.py +corellium/models/maintenance.py +corellium/models/matrix_error.py +corellium/models/media_play_body.py +corellium/models/media_play_body_v1.py +corellium/models/media_play_by_image.py +corellium/models/media_play_by_url.py +corellium/models/media_store.py +corellium/models/media_store_v1.py +corellium/models/message_body.py +corellium/models/message_body_any_of.py +corellium/models/message_body_any_of1.py +corellium/models/metered_subscription_usage.py +corellium/models/metered_subscription_usage_v1.py +corellium/models/model.py +corellium/models/model_firmware.py +corellium/models/model_firmware_springboard_snapshot.py +corellium/models/model_firmware_springboard_snapshot_volumes_inner.py +corellium/models/model_frame.py +corellium/models/model_frame_dimensions.py +corellium/models/model_partition.py +corellium/models/model_product_image.py +corellium/models/model_rect.py +corellium/models/model_software_v1.py +corellium/models/model_v1.py +corellium/models/netdump_filter.py +corellium/models/network_connection.py +corellium/models/network_connection_config.py +corellium/models/network_connection_pagination_result.py +corellium/models/network_connection_provider.py +corellium/models/network_connection_provider_pagination_result.py +corellium/models/network_connection_providers.py +corellium/models/network_connection_providers_results_inner.py +corellium/models/network_connections.py +corellium/models/network_interfaces.py +corellium/models/network_schema.py +corellium/models/network_status.py +corellium/models/network_status_response.py +corellium/models/network_status_v1.py +corellium/models/node_console_endpoint.py +corellium/models/node_information.py +corellium/models/node_information_v1.py +corellium/models/node_list.py +corellium/models/node_updates_failed.py +corellium/models/open_id_config.py +corellium/models/open_id_config_v1.py +corellium/models/open_vpn_config.py +corellium/models/open_vpn_config_v1.py +corellium/models/open_vpn_network_connection.py +corellium/models/open_vpn_network_connection_projects_value.py +corellium/models/open_vpn_network_connection_v1.py +corellium/models/paginated_assessments.py +corellium/models/pagination.py +corellium/models/partial_update_interconnect_request.py +corellium/models/partial_update_network_connection_body.py +corellium/models/partial_update_network_connection_options.py +corellium/models/password_change_body.py +corellium/models/password_reset_body.py +corellium/models/patch_cluster_config_body.py +corellium/models/patch_domain_auth_provider_body.py +corellium/models/patch_domain_body.py +corellium/models/patch_domain_body_webplayer.py +corellium/models/patch_domain_welcome_message_body.py +corellium/models/patch_firmware_service_config_body.py +corellium/models/patch_instance_body.py +corellium/models/patch_instance_body_proxy_inner.py +corellium/models/patch_instance_body_strace_filter_inner.py +corellium/models/patch_instance_options.py +corellium/models/patch_instance_read_only.py +corellium/models/patch_instance_read_only_body.py +corellium/models/patch_interconnect_body.py +corellium/models/patch_project_body.py +corellium/models/patch_user_body.py +corellium/models/peripherals_data.py +corellium/models/peripherals_data_v1.py +corellium/models/plan.py +corellium/models/plan_v1.py +corellium/models/pool_usage_schema.py +corellium/models/portal_session.py +corellium/models/post_share_snapshot_request_payload.py +corellium/models/project.py +corellium/models/project_config.py +corellium/models/project_instance_list.py +corellium/models/project_instance_summary.py +corellium/models/project_key.py +corellium/models/project_key_list.py +corellium/models/project_key_v1.py +corellium/models/project_list.py +corellium/models/project_list_item.py +corellium/models/project_network_state.py +corellium/models/project_quota.py +corellium/models/project_quota_input.py +corellium/models/project_quota_v1.py +corellium/models/project_settings.py +corellium/models/project_settings_v1.py +corellium/models/project_usage.py +corellium/models/project_usage_v1.py +corellium/models/project_v1.py +corellium/models/project_with_keys_v1.py +corellium/models/provider_network_connection.py +corellium/models/proxy_config.py +corellium/models/register_service_body.py +corellium/models/report_modification_input.py +corellium/models/report_modification_result.py +corellium/models/reset_link_body.py +corellium/models/reset_link_info.py +corellium/models/reset_link_info_return.py +corellium/models/reset_password_body.py +corellium/models/reset_unauthorized_response.py +corellium/models/restore_backup_body.py +corellium/models/restore_backup_data.py +corellium/models/revoke_invites_body.py +corellium/models/revoke_invites_response.py +corellium/models/role.py +corellium/models/role_name.py +corellium/models/role_v1.py +corellium/models/roles_list_response.py +corellium/models/rotate_body.py +corellium/models/rotate_body_v1.py +corellium/models/saml_config.py +corellium/models/saml_group_mapping.py +corellium/models/saml_identity_provider_config.py +corellium/models/saml_service_provider_config.py +corellium/models/saml_user_attribute_mapping.py +corellium/models/send_reset_link_body.py +corellium/models/service_endpoint_schema.py +corellium/models/service_status_request_body.py +corellium/models/service_status_request_body_vms_inner.py +corellium/models/set_domain_welcome_message_body.py +corellium/models/set_snapshot_permissions_body.py +corellium/models/share_snapshot_body.py +corellium/models/shared_snapshot.py +corellium/models/shared_snapshots_info.py +corellium/models/shared_snapshots_response.py +corellium/models/snapshot.py +corellium/models/snapshot_creation_options.py +corellium/models/snapshot_list.py +corellium/models/snapshot_member.py +corellium/models/snapshot_member_v1.py +corellium/models/snapshot_owner.py +corellium/models/snapshot_owner_v1.py +corellium/models/snapshot_permissions_request_payload.py +corellium/models/snapshot_request.py +corellium/models/snapshot_sharing.py +corellium/models/snapshot_sharing_permissions.py +corellium/models/snapshot_sharing_permissions_request_schema.py +corellium/models/snapshot_sharing_type.py +corellium/models/snapshot_sharing_v1.py +corellium/models/snapshot_status.py +corellium/models/snapshot_status_v1.py +corellium/models/snapshot_v1.py +corellium/models/sslsplit_filter.py +corellium/models/start_instance_body.py +corellium/models/stop_instance_body.py +corellium/models/storage_already_mounted_response.py +corellium/models/storage_attach_response.py +corellium/models/storage_device.py +corellium/models/storage_device_list.py +corellium/models/storage_eject_already_unmounted_response.py +corellium/models/storage_file.py +corellium/models/storage_file_list.py +corellium/models/storage_list.py +corellium/models/storage_queue_error.py +corellium/models/stripe_checkout_body.py +corellium/models/stripe_checkout_complete_body.py +corellium/models/stripe_webhook_ack.py +corellium/models/subscribe_to_trial_body.py +corellium/models/subscription.py +corellium/models/subscription_trial.py +corellium/models/sys_info_schema.py +corellium/models/task_status.py +corellium/models/team.py +corellium/models/team_create.py +corellium/models/team_created.py +corellium/models/team_user.py +corellium/models/team_v1.py +corellium/models/teams_list_response.py +corellium/models/test_assessment_input.py +corellium/models/text_input.py +corellium/models/text_input_request.py +corellium/models/text_input_request_v1.py +corellium/models/token.py +corellium/models/token_v1.py +corellium/models/token_validate_body.py +corellium/models/totp_disable_body.py +corellium/models/totp_enable_body.py +corellium/models/totp_generate_response.py +corellium/models/touch_curve_input.py +corellium/models/touch_curve_input_request.py +corellium/models/touch_curve_input_request_v1.py +corellium/models/touch_input.py +corellium/models/touch_input_request.py +corellium/models/touch_input_request_v1.py +corellium/models/trial.py +corellium/models/trial_extension.py +corellium/models/trial_extension_v1.py +corellium/models/trial_request.py +corellium/models/trial_request_detail.py +corellium/models/trial_request_detail_organization.py +corellium/models/trial_request_list_response.py +corellium/models/trial_request_metadata.py +corellium/models/trial_request_options.py +corellium/models/trial_v1.py +corellium/models/unauthorized_error.py +corellium/models/uncancel_subscription_body.py +corellium/models/update_assessment_input.py +corellium/models/update_domain_settings_response.py +corellium/models/update_domain_settings_response_settings.py +corellium/models/update_domain_settings_response_snapshot_sharing_permissions.py +corellium/models/update_domain_settings_response_webplayer.py +corellium/models/update_domain_welcome_message_request.py +corellium/models/update_extension.py +corellium/models/update_extension_body.py +corellium/models/update_hook_body.py +corellium/models/update_interconnect_body.py +corellium/models/update_interconnect_v3_body.py +corellium/models/update_network_connection_body.py +corellium/models/update_network_connection_options.py +corellium/models/update_network_connection_options_config.py +corellium/models/update_own_profile_body.py +corellium/models/update_team_body.py +corellium/models/update_trial_request_body.py +corellium/models/update_trial_request_params.py +corellium/models/upload_size_error.py +corellium/models/user.py +corellium/models/user_create.py +corellium/models/user_create_return.py +corellium/models/user_created.py +corellium/models/user_error.py +corellium/models/user_error_item.py +corellium/models/user_error_response.py +corellium/models/user_error_v1.py +corellium/models/user_errors.py +corellium/models/user_errors_v1.py +corellium/models/user_snapshots.py +corellium/models/user_update.py +corellium/models/v1_check_subdomain_existence_parameters.py +corellium/models/v1_create_hook_parameters.py +corellium/models/v1_load_extension_parameters.py +corellium/models/v1_set_state_body.py +corellium/models/v1_update_hook_parameters.py +corellium/models/v3_delete_network_connection_request.py +corellium/models/v3_update_snapshot_request.py +corellium/models/validation_error.py +corellium/models/vlan_config.py +corellium/models/vlan_config_v1.py +corellium/models/vlan_network_connection.py +corellium/models/vlan_network_connection_v1.py +corellium/models/volume_options.py +corellium/models/volume_options_v1.py +corellium/models/vpn_config_preauthorization.py +corellium/models/vpn_definition.py +corellium/models/vpn_definition_v1.py +corellium/models/vpn_schema.py +corellium/models/web_player_allowed_domains.py +corellium/models/web_player_create_session_request.py +corellium/models/web_player_created_session.py +corellium/models/web_player_features.py +corellium/models/web_player_session.py +corellium/models/web_player_session_domain.py +corellium/models/web_player_session_list_response.py +corellium/models/web_player_session_v1.py +corellium/py.typed +corellium/rest.py +docs/AcceptSnapshotBody.md +docs/AcceptSnapshotRequestPayload.md +docs/AccountSetupResponse.md +docs/Activity.md +docs/ActivityApi.md +docs/ActivityExportDto.md +docs/ActivityExportFormat.md +docs/ActivityExportResponse.md +docs/ActivityExportStatus.md +docs/ActivityExportTask.md +docs/ActivityExportTaskList.md +docs/ActivityList.md +docs/ActivityListResponse.md +docs/ActivityRequest.md +docs/ActivityResourceNotStartsWithFilter.md +docs/ActivityResourceStartsWithFilter.md +docs/ActivityV1.md +docs/ActivityV1Api.md docs/Address.md +docs/AgentApi.md docs/AgentApp.md docs/AgentAppReadyResponse.md +docs/AgentAppReadyResponseV1.md docs/AgentAppStatus.md +docs/AgentAppStatusV1.md +docs/AgentAppV1.md docs/AgentAppsList.md +docs/AgentAppsListV1.md docs/AgentAppsStatusList.md +docs/AgentAppsStatusListV1.md +docs/AgentContainer.md +docs/AgentContainerHealth.md +docs/AgentContainerList.md docs/AgentError.md +docs/AgentErrorV1.md +docs/AgentFileArchiveDownloadBody.md +docs/AgentFileAttributesBody.md +docs/AgentFileDownloadToken.md +docs/AgentFridaProcessList.md +docs/AgentFridaProcessListAttached.md +docs/AgentFridaResponse.md +docs/AgentFridaRunBody.md docs/AgentIcons.md +docs/AgentIconsResponse.md docs/AgentInstallBody.md +docs/AgentInstallBodyV1.md +docs/AgentProfileListResponse.md docs/AgentProfilesReturn.md +docs/AgentRemoteItStatus.md docs/AgentSystemAdbAuth.md +docs/AgentSystemAdbAuthV1.md docs/AgentSystemGetPropBody.md +docs/AgentSystemGetPropBodyV1.md +docs/AgentSystemGetPropResponse.md +docs/AgentSystemInstallOpenGappsBody.md +docs/AgentSystemNetworkResponse.md +docs/AgentSystemResult.md +docs/AgentSystemSetDevicePropertiesBody.md +docs/AgentSystemSetHostnameBody.md +docs/AgentSystemSetHostnameBodyV1.md +docs/AgentTempFileResponse.md +docs/AgentV1Api.md docs/AgentValueReturn.md docs/AgreedAck.md +docs/AgreedAckV1.md +docs/AiToolsConfig.md +docs/AiToolsConfigV1.md +docs/AllowedDevicesFilterSchema.md +docs/AllowedDomainsResponse.md +docs/AllowedFirmwareSchema.md docs/ApiConflictError.md +docs/ApiConflictErrorV1.md docs/ApiError.md +docs/ApiErrorV1.md docs/ApiInternalConsistencyError.md docs/ApiNotFoundError.md +docs/ApiNotFoundErrorV1.md docs/ApiToken.md +docs/ApiTokenResult.md +docs/ArtifactsPath.md +docs/Assessment.md +docs/AssessmentBundle.md +docs/AssessmentFormat.md +docs/AssessmentFridaScript.md +docs/AssessmentHistory.md +docs/AssessmentHistoryLineItem.md +docs/AssessmentHistoryResultsInner.md +docs/AssessmentHistoryV1.md +docs/AssessmentIdStatus.md +docs/AssessmentMetadata.md +docs/AssessmentResults.md +docs/AssessmentSeverityCounts.md +docs/AssessmentStatus.md +docs/AssessmentWordlist.md +docs/AssessmentsApi.md +docs/AssessmentsV1Api.md +docs/AttachInterfaceBody.md +docs/AttachInterfaceRequest.md +docs/AuthProvider.md +docs/AuthProviderType.md +docs/AuthProviderTypesListResponse.md +docs/AuthProviderV1.md +docs/AuthProvidersListResponse.md +docs/AuthenticationApi.md +docs/AuthenticationV1Api.md +docs/AvailablePlansListResponse.md +docs/AvailableTrialPlan.md +docs/AvailableTrialPlanList.md +docs/AwsCreateResponse.md +docs/BillingApi.md +docs/BillingLineItem.md +docs/BillingSummary.md +docs/BillingSummaryPendingUsageBased.md docs/Bit.md docs/BtraceEnableOptions.md docs/Button.md -docs/CorelliumApi.md +docs/CancelSubscriptionBody.md +docs/ChangePasswordBody.md +docs/CharmTag.md +docs/CheckSubdomainResponse.md +docs/CheckSubdomainResponseV1.md +docs/CloudNotificationItem.md +docs/CloudNotificationList.md +docs/ClusterAdministrationConfigApi.md +docs/ClusterAdministrationFirmwareServiceApi.md +docs/ClusterAdministrationNodesApi.md +docs/ClusterApi.md +docs/ClusterConfig.md +docs/ClusterConfigCoordinatorConfig.md +docs/ClusterConfigCoordinatorConfigAuthProvidersInner.md +docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.md +docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.md +docs/ClusterConfigCoordinatorConfigAwsMarketplace.md +docs/ClusterConfigCoordinatorConfigEnsureDomain.md +docs/ClusterConfigCoordinatorConfigEnsureDomainProperties.md +docs/ClusterConfigCoordinatorConfigEnsureDomainQuotas.md +docs/ClusterConfigCoordinatorConfigHubspot.md +docs/ClusterConfigCoordinatorConfigHypertune.md +docs/ClusterConfigCoordinatorConfigPipedrive.md +docs/ClusterConfigCoordinatorConfigTrial.md +docs/ClusterConfigCoordinatorConfigWebplayer.md +docs/ClusterConfigFirmwareServiceConfig.md +docs/ClusterConfigIpswFiltersInner.md +docs/ClusterConfigIpswFiltersInnerDevice.md +docs/ClusterConfigIpswFiltersInnerVersion.md +docs/ClusterConfigMaintenance.md +docs/ClusterConfigNetMonCA.md +docs/ClusterConfigNodeSpecificConfig.md +docs/ClusterConfigPackageConfig.md +docs/ClusterConfigPackageConfigComponents.md +docs/ClusterConfigPackageConfigFeatures.md +docs/ClusterConfigPackageConfigFlavorFiltersInner.md +docs/ClusterConfigPackageConfigFlavorFiltersInnerApply.md +docs/ClusterConfigPackageConfigFlavorFiltersInnerFilter.md +docs/ClusterConfigSetupConfig.md +docs/ClusterConfigStripe.md +docs/ClusterConfigUpdateError.md +docs/ClusterConfigurationPayload.md +docs/ClusterNode.md +docs/ClusterNodeAvailable.md +docs/ClusterNodeReserved.md +docs/ClusterNodeStatus.md +docs/ClusterNodeStatusClusterTotals.md +docs/ClusterNodeStatusClusterTotalsAvailable.md +docs/ClusterNodeStatusClusterTotalsReserved.md +docs/ClusterNodeStatusClusterTotalsTotal.md +docs/ClusterNodeTotal.md +docs/ClusterSnapshot.md +docs/ClusterSnapshotList.md +docs/ClusterSnapshotMetadata.md +docs/ClusterSnapshotStatus.md +docs/ClusterSnapshotV1.md +docs/ClusterSnapshotsApi.md +docs/ComputeNodeFile.md +docs/ComputeNodeFileList.md +docs/ConfigApi.md +docs/ConfigAuthProvider.md +docs/ConfigResponse.md +docs/ConfigResponseAiToolsConfig.md +docs/ConfigResponseMaintenance.md +docs/ConfigResponseV1.md +docs/ConfigV1Api.md +docs/CoordinatorConfig.md +docs/CoordinatorConfigV1.md +docs/CoreTraceApi.md +docs/CoreTraceV1Api.md docs/CouponOptions.md +docs/CreateActivityExportBody.md +docs/CreateActivityExportResponse.md +docs/CreateAssessmentInput.md +docs/CreateCloudAdminTrialRequestBody.md +docs/CreateDomainAuthProviderBody.md +docs/CreateDomainAuthProviderResponse.md +docs/CreateDomainAuthProviderResponseConfig.md +docs/CreateDomainWelcomeMessageBody.md +docs/CreateHookBody.md +docs/CreateImageBody.md +docs/CreateInstanceBody.md +docs/CreateInstanceResponse.md +docs/CreateInterconnectBody.md +docs/CreateInterconnectV3Body.md +docs/CreateInvitesBody.md +docs/CreateNetworkConnectionBody.md +docs/CreateNetworkConnectionOptions.md +docs/CreateOpenVPNNetworkConnectionBody.md +docs/CreateOpenVPNNetworkConnectionBodyV1.md +docs/CreateProjectBody.md +docs/CreateProjectKeyBody.md +docs/CreateSnapshotBody.md docs/CreateTeam.md +docs/CreateTeamBody.md +docs/CreateTrialRequestBody.md +docs/CreateTrialRequestResponse.md +docs/CreateTrialRequestResponseTrialRequest.md +docs/CreateUserBody.md +docs/CreateVLANNetworkConnectionBody.md +docs/CreateVLANNetworkConnectionBodyV1.md +docs/CreateWebPlayerSessionBody.md docs/CreatedBy.md docs/Credentials.md +docs/DeleteModificationInput.md +docs/DeleteNetworkConnectionOptions.md +docs/DeploymentVersion.md +docs/DetachInterfaceBody.md +docs/DetachInterfaceRequest.md +docs/Device.md +docs/DeviceAutoShutdownSchema.md +docs/DeviceUsage.md +docs/DomainApi.md +docs/DomainAuthProviderApi.md +docs/DomainAuthProviderConfig.md +docs/DomainAuthProviderRequest.md +docs/DomainAuthProviderResponse.md +docs/DomainAuthProviderResponseV1.md +docs/DomainAuthProvidersApi.md +docs/DomainAuthProvidersList.md +docs/DomainConfig.md +docs/DomainConfigInput.md +docs/DomainConfigInputSnapshotSharingPermissions.md +docs/DomainConfigInputTrial.md +docs/DomainConfigInputWebplayer.md +docs/DomainConfigSnapshotSharingPermissions.md +docs/DomainConfigTrial.md +docs/DomainConfigTrialEndAction.md +docs/DomainConfigTrialSubscribeAction.md +docs/DomainConfigWebplayer.md +docs/DomainInfo.md +docs/DomainList.md +docs/DomainListItem.md +docs/DomainListItemDisabled.md +docs/DomainListItemDomainUsageInner.md +docs/DomainListItemProjectsInner.md +docs/DomainListItemProjectsInnerInstancesInner.md +docs/DomainListItemProjectsInnerInstancesInnerImagesInner.md +docs/DomainListItemProjectsInnerInstancesInnerUsage.md +docs/DomainListItemProjectsInnerQuotas.md +docs/DomainListItemProjectsInnerUsage.md +docs/DomainListItemQuotas.md +docs/DomainListItemSubscription.md +docs/DomainListItemSubscriptionHistoryInner.md +docs/DomainListItemSubscriptionHistoryInnerAdministrator.md +docs/DomainListItemUsage.md +docs/DomainListItemUsersInfoInner.md +docs/DomainListUsage.md docs/DomainOptions.md +docs/DomainSoftware.md +docs/DomainSoftwareList.md +docs/DomainV1Api.md +docs/DomainWelcomeMessageResponse.md +docs/DomainWelcomeMessageResponseV1.md +docs/EditInvitesBody.md +docs/EditInvitesBodyChanges.md +docs/EnableBtraceBody.md +docs/EnableNetdumpBody.md +docs/EnableSslsplitBody.md +docs/EnsureDomainSettingsBody.md +docs/EnsureDomainSettingsBodyAdminUser.md +docs/EnsureDomainSettingsResponse.md +docs/EnsureDomainSettingsResponseUser.md +docs/ExtendedFirmwareAssetInfo.md +docs/ExtendedFirmwareAssetInfoV1.md docs/Extension.md +docs/ExtensionFlavor.md +docs/ExtensionList.md +docs/ExtensionV1.md +docs/ExtensionsApi.md +docs/ExtensionsV1Api.md +docs/ExternalServicesApi.md docs/Features.md +docs/FetchFirmwareAssetsBody.md +docs/FetchFirmwareAssetsResponse.md +docs/FetchFirmwareAssetsResponseFailedInner.md docs/FileChanges.md docs/Firmware.md +docs/FirmwareAsset.md +docs/FirmwareAssetFilter.md +docs/FirmwareAssetList.md +docs/FirmwareAssetV1.md +docs/FirmwareDevice.md +docs/FirmwareDeviceList.md +docs/FirmwareInfoDevice.md +docs/FirmwareInfoDeviceFirmwaresInner.md +docs/FirmwareList.md +docs/FirmwareServiceApi.md +docs/FirmwareServiceConfig.md +docs/FirmwareServiceConfigCacheFirmware.md +docs/FirmwareServiceConfigDownloadIpswFilters.md +docs/FirmwareServiceConfigValue.md +docs/FirmwareServiceConfiguration.md +docs/FirmwareServiceSettings.md +docs/FirmwareV1.md +docs/FlavorFrame.md +docs/FlavorFrameDimensions.md +docs/FlavorFrameHome.md +docs/FlavorFrameInner.md +docs/FlavorsApi.md +docs/GetFirmwareInfoBody.md +docs/GetInterconnectsResponse.md +docs/GetInviteByTokenBody.md +docs/GetResetLinkInfoBody.md +docs/GetStorageResponse.md docs/GpioStateDefinition.md +docs/GpioStateDefinitionBanksInnerInner.md +docs/GpioStateDefinitionV1.md docs/GpiosState.md -docs/GrantTrialRequestResponse.md +docs/GpiosStateV1.md docs/Hook.md +docs/HookList.md +docs/HookPatchType.md +docs/HookV1.md +docs/HyperTraceApi.md +docs/HyperTraceV1Api.md +docs/HypertuneApi.md +docs/HypertuneHashResponse.md +docs/HypertuneInitResponse.md +docs/HypervisorHooksApi.md +docs/HypervisorHooksV1Api.md docs/Image.md +docs/ImageCreationOptions.md +docs/ImageEncoding.md +docs/ImageExtended.md +docs/ImageExtendedDevice.md +docs/ImageFirmware.md +docs/ImageFirmwareInfo.md +docs/ImageFirmwareInfoBootArgs.md +docs/ImageList.md +docs/ImageType.md +docs/ImageV1.md +docs/ImagesApi.md +docs/ImagesV1Api.md +docs/ImagesV2Api.md +docs/InputResponse.md +docs/InputResponseV1.md +docs/InstallFirmwareAssetsBody.md +docs/InstallFirmwareAssetsBodyV1.md +docs/InstallFirmwareAssetsResponse.md +docs/InstallFirmwareAssetsResponseV1.md +docs/InstallFirmwareBody.md +docs/InstallFirmwareBodyV1.md +docs/InstallFirmwareResponse.md +docs/InstallFirmwareResponseV1.md +docs/InstallFirmwareStatusResponse.md docs/Instance.md docs/InstanceAgentState.md +docs/InstanceAgentStateV1.md docs/InstanceBootOptions.md docs/InstanceBootOptionsAdditionalTag.md +docs/InstanceBootOptionsFvp.md +docs/InstanceBootOptionsKernel.md +docs/InstanceBootOptionsKernelV1.md +docs/InstanceBootOptionsPongo.md +docs/InstanceBootOptionsPongoV1.md +docs/InstanceBootOptionsV1.md +docs/InstanceBootOptionsVMMIOInner.md +docs/InstanceConsole.md docs/InstanceConsoleEndpoint.md +docs/InstanceConsoleEndpointV1.md +docs/InstanceConsoleV1.md docs/InstanceCreateOptions.md -docs/InstanceInput.md +docs/InstanceHyperTraceState.md +docs/InstanceHyperTraceStateV1.md +docs/InstanceInputBody.md +docs/InstanceInputRequest.md +docs/InstanceInterface.md +docs/InstanceInterfaceStatus.md +docs/InstanceList.md docs/InstanceNetdumpState.md +docs/InstanceNetdumpStateV1.md docs/InstanceNetmonState.md +docs/InstanceNetmonStateV1.md +docs/InstanceReadOnlyStatus.md +docs/InstanceReadOnlyStatusV1.md +docs/InstanceRestoreStatus.md +docs/InstanceRestoreStatusV1.md docs/InstanceReturn.md docs/InstanceServices.md +docs/InstanceServicesV1.md +docs/InstanceSnapshotsList.md docs/InstanceStartOptions.md docs/InstanceState.md +docs/InstanceStateV1.md docs/InstanceStopOptions.md +docs/InstanceTraceFilter.md +docs/InstanceTraceState.md +docs/InstanceTraceStateV1.md +docs/InstanceUefiBootloader.md docs/InstanceUpgradeBody.md +docs/InstanceUpgradeBodyV1.md +docs/InstanceUpgradeResponse.md +docs/InstanceV1.md +docs/InstancesApi.md +docs/InstancesV1Api.md +docs/InstancesV2Api.md +docs/InsufficientStorageError.md +docs/InsufficientStorageErrorV1.md +docs/Interconnect.md +docs/InterconnectList.md +docs/InterconnectProtocol.md +docs/InterconnectResponse.md +docs/InterconnectsApi.md +docs/InterconnectsV1Api.md +docs/InterfacesSchemaInner.md +docs/InvalidCredentialsError.md +docs/InvalidTOTPError.md docs/Invitation.md +docs/InvitationByToken.md +docs/InvitationV1.md +docs/InviteCreated.md +docs/InviteCreatedEntry.md +docs/InviteResult.md +docs/InviteResultError.md docs/InviteRevokeParams.md -docs/InviteRevokeParamsIds.md +docs/InviteSettings.md +docs/InviteSignupBody.md +docs/InviteSignupBodyParams.md +docs/InviteSignupResponse.md +docs/InvitesApi.md +docs/InvitesListResponse.md +docs/InvitesV1Api.md +docs/IpswDeviceConstraint.md +docs/IpswFilter.md +docs/IpswFilterV3.md +docs/IpswFilterV3Device.md +docs/IpswFilterV3Version.md +docs/IpswVersionConstraint.md docs/Kcrange.md +docs/KcrangeV1.md docs/KernelTask.md +docs/KernelTaskV1.md docs/KernelThread.md +docs/KernelThreadV1.md +docs/LDAPConfig.md +docs/LayoutSchema.md +docs/LdapAuthenticationCredentials.md +docs/LdapGroupSearchConfiguration.md +docs/LdapServerConnectionDetails.md +docs/LdapUserAttributeMapping.md +docs/LdapUserSearchConfiguration.md +docs/LoadExtensionBody.md +docs/Logging.md +docs/LoggingV1.md +docs/LoginBody.md +docs/LoginResult.md +docs/LoginResultDisabled.md +docs/LoginResultDomain.md +docs/LoginResultDomainDeviceAutoShutdown.md +docs/LoginResultDomainDisabled.md +docs/LoginResultDomainSnapshotSharingPermissions.md +docs/LoginResultDomainTrial.md +docs/LoginResultDomainWebplayer.md +docs/LoginResultUser.md +docs/Maintenance.md +docs/MatrixError.md docs/MediaPlayBody.md +docs/MediaPlayBodyV1.md +docs/MediaPlayByImage.md +docs/MediaPlayByUrl.md +docs/MediaStore.md +docs/MediaStoreV1.md +docs/MessageBody.md +docs/MessageBodyAnyOf.md +docs/MessageBodyAnyOf1.md +docs/MeteredSubscriptionUsage.md +docs/MeteredSubscriptionUsageV1.md docs/Model.md -docs/ModelSoftware.md +docs/ModelFirmware.md +docs/ModelFirmwareSpringboardSnapshot.md +docs/ModelFirmwareSpringboardSnapshotVolumesInner.md +docs/ModelFrame.md +docs/ModelFrameDimensions.md +docs/ModelPartition.md +docs/ModelProductImage.md +docs/ModelRect.md +docs/ModelSoftwareV1.md +docs/ModelV1.md +docs/ModelsApi.md +docs/ModelsV1Api.md +docs/NetConnectApi.md +docs/NetConnectV1Api.md docs/NetdumpFilter.md +docs/NetworkConnection.md +docs/NetworkConnectionConfig.md +docs/NetworkConnectionPaginationResult.md +docs/NetworkConnectionProvider.md +docs/NetworkConnectionProviderPaginationResult.md +docs/NetworkConnectionProviders.md +docs/NetworkConnectionProvidersResultsInner.md +docs/NetworkConnections.md +docs/NetworkInterfaces.md +docs/NetworkSchema.md +docs/NetworkStatus.md +docs/NetworkStatusResponse.md +docs/NetworkStatusV1.md +docs/NodeConsoleEndpoint.md +docs/NodeInformation.md +docs/NodeInformationV1.md +docs/NodeList.md +docs/NodeUpdatesFailed.md +docs/OpenIDConfig.md +docs/OpenIDConfigV1.md +docs/OpenVPNConfig.md +docs/OpenVPNConfigV1.md +docs/OpenVPNNetworkConnection.md +docs/OpenVPNNetworkConnectionProjectsValue.md +docs/OpenVPNNetworkConnectionV1.md +docs/PaginatedAssessments.md +docs/Pagination.md +docs/PartialUpdateInterconnectRequest.md +docs/PartialUpdateNetworkConnectionBody.md +docs/PartialUpdateNetworkConnectionOptions.md docs/PasswordChangeBody.md docs/PasswordResetBody.md +docs/PatchClusterConfigBody.md +docs/PatchDomainAuthProviderBody.md +docs/PatchDomainBody.md +docs/PatchDomainBodyWebplayer.md +docs/PatchDomainWelcomeMessageBody.md +docs/PatchFirmwareServiceConfigBody.md +docs/PatchInstanceBody.md +docs/PatchInstanceBodyProxyInner.md +docs/PatchInstanceBodyStraceFilterInner.md docs/PatchInstanceOptions.md +docs/PatchInstanceReadOnly.md +docs/PatchInstanceReadOnlyBody.md +docs/PatchInterconnectBody.md +docs/PatchProjectBody.md +docs/PatchUserBody.md docs/PeripheralsData.md +docs/PeripheralsDataV1.md docs/Plan.md +docs/PlanV1.md +docs/PoolUsageSchema.md +docs/PortalSession.md +docs/PostShareSnapshotRequestPayload.md docs/Project.md +docs/ProjectConfig.md +docs/ProjectInstanceList.md +docs/ProjectInstanceSummary.md docs/ProjectKey.md +docs/ProjectKeyList.md +docs/ProjectKeyV1.md +docs/ProjectList.md +docs/ProjectListItem.md +docs/ProjectNetworkState.md docs/ProjectQuota.md +docs/ProjectQuotaInput.md +docs/ProjectQuotaV1.md docs/ProjectSettings.md +docs/ProjectSettingsV1.md docs/ProjectUsage.md +docs/ProjectUsageV1.md +docs/ProjectV1.md +docs/ProjectWithKeysV1.md +docs/ProjectsApi.md +docs/ProjectsV1Api.md +docs/ProviderNetworkConnection.md docs/ProxyConfig.md -docs/RateInfo.md +docs/RAMDumpApi.md +docs/RAMDumpV1Api.md +docs/RegisterServiceBody.md +docs/ReportModificationInput.md +docs/ReportModificationResult.md docs/ResetLinkBody.md +docs/ResetLinkInfo.md +docs/ResetLinkInfoReturn.md +docs/ResetPasswordBody.md +docs/ResetUnauthorizedResponse.md +docs/RestoreBackupBody.md +docs/RestoreBackupData.md +docs/RevokeInvitesBody.md +docs/RevokeInvitesResponse.md docs/Role.md +docs/RoleName.md +docs/RoleV1.md +docs/RolesApi.md +docs/RolesListResponse.md +docs/RolesV1Api.md docs/RotateBody.md +docs/RotateBodyV1.md +docs/SAMLConfig.md +docs/SamlGroupMapping.md +docs/SamlIdentityProviderConfig.md +docs/SamlServiceProviderConfig.md +docs/SamlUserAttributeMapping.md +docs/SendResetLinkBody.md +docs/ServiceEndpointSchema.md +docs/ServiceStatusRequestBody.md +docs/ServiceStatusRequestBodyVmsInner.md +docs/SetDomainWelcomeMessageBody.md +docs/SetSnapshotPermissionsBody.md +docs/ShareSnapshotBody.md +docs/SharedSnapshot.md +docs/SharedSnapshotsInfo.md +docs/SharedSnapshotsResponse.md docs/Snapshot.md docs/SnapshotCreationOptions.md +docs/SnapshotList.md +docs/SnapshotMember.md +docs/SnapshotMemberV1.md +docs/SnapshotOwner.md +docs/SnapshotOwnerV1.md +docs/SnapshotPermissionsRequestPayload.md +docs/SnapshotRequest.md +docs/SnapshotSharing.md +docs/SnapshotSharingApi.md +docs/SnapshotSharingPermissions.md +docs/SnapshotSharingPermissionsRequestSchema.md +docs/SnapshotSharingType.md +docs/SnapshotSharingV1.md +docs/SnapshotSharingV1Api.md docs/SnapshotStatus.md -docs/SubscriberInvite.md +docs/SnapshotStatusV1.md +docs/SnapshotV1.md +docs/SnapshotsApi.md +docs/SnapshotsV1Api.md +docs/SslsplitFilter.md +docs/StartInstanceBody.md +docs/StatusApi.md +docs/StatusV1Api.md +docs/StopInstanceBody.md +docs/StorageAlreadyMountedResponse.md +docs/StorageApi.md +docs/StorageAttachResponse.md +docs/StorageDevice.md +docs/StorageDeviceList.md +docs/StorageEjectAlreadyUnmountedResponse.md +docs/StorageFile.md +docs/StorageFileList.md +docs/StorageList.md +docs/StorageQueueError.md +docs/StorageV1Api.md +docs/StripeCheckoutBody.md +docs/StripeCheckoutCompleteBody.md +docs/StripeWebhookAck.md +docs/SubscribeToTrialBody.md +docs/Subscription.md +docs/SubscriptionTrial.md +docs/SysInfoSchema.md +docs/TOTPApi.md +docs/TaskStatus.md docs/Team.md docs/TeamCreate.md +docs/TeamCreated.md +docs/TeamUser.md +docs/TeamV1.md +docs/TeamsApi.md +docs/TeamsListResponse.md +docs/TeamsV1Api.md +docs/TestAssessmentInput.md docs/TextInput.md +docs/TextInputRequest.md +docs/TextInputRequestV1.md docs/Token.md +docs/TokenV1.md +docs/TokenValidateBody.md +docs/TotpDisableBody.md +docs/TotpEnableBody.md +docs/TotpGenerateResponse.md docs/TouchCurveInput.md +docs/TouchCurveInputRequest.md +docs/TouchCurveInputRequestV1.md docs/TouchInput.md +docs/TouchInputRequest.md +docs/TouchInputRequestV1.md docs/Trial.md docs/TrialExtension.md +docs/TrialExtensionV1.md +docs/TrialRequest.md +docs/TrialRequestDetail.md +docs/TrialRequestDetailOrganization.md +docs/TrialRequestListResponse.md docs/TrialRequestMetadata.md docs/TrialRequestOptions.md +docs/TrialV1.md +docs/UnauthorizedError.md +docs/UncancelSubscriptionBody.md +docs/UpdateAssessmentInput.md +docs/UpdateDomainSettingsResponse.md +docs/UpdateDomainSettingsResponseSettings.md +docs/UpdateDomainSettingsResponseSnapshotSharingPermissions.md +docs/UpdateDomainSettingsResponseWebplayer.md +docs/UpdateDomainWelcomeMessageRequest.md docs/UpdateExtension.md +docs/UpdateExtensionBody.md +docs/UpdateHookBody.md +docs/UpdateInterconnectBody.md +docs/UpdateInterconnectV3Body.md +docs/UpdateNetworkConnectionBody.md +docs/UpdateNetworkConnectionOptions.md +docs/UpdateNetworkConnectionOptionsConfig.md +docs/UpdateOwnProfileBody.md +docs/UpdateTeamBody.md +docs/UpdateTrialRequestBody.md +docs/UpdateTrialRequestParams.md +docs/UploadSizeError.md docs/User.md +docs/UserCreate.md +docs/UserCreateReturn.md +docs/UserCreated.md docs/UserError.md +docs/UserErrorItem.md +docs/UserErrorResponse.md +docs/UserErrorV1.md +docs/UserErrors.md +docs/UserErrorsV1.md +docs/UserSnapshots.md +docs/UserUpdate.md +docs/UsersApi.md +docs/UsersV1Api.md +docs/V1CheckSubdomainExistenceParameters.md docs/V1CreateHookParameters.md docs/V1LoadExtensionParameters.md docs/V1SetStateBody.md +docs/V1UpdateHookParameters.md +docs/V3DeleteNetworkConnectionRequest.md +docs/V3UpdateSnapshotRequest.md +docs/VLANConfig.md +docs/VLANConfigV1.md +docs/VLANNetworkConnection.md +docs/VLANNetworkConnectionV1.md docs/ValidationError.md docs/VolumeOptions.md +docs/VolumeOptionsV1.md +docs/VpnConfigPreauthorization.md docs/VpnDefinition.md +docs/VpnDefinitionV1.md +docs/VpnSchema.md +docs/WebPlayerAllowedDomains.md +docs/WebPlayerApi.md docs/WebPlayerCreateSessionRequest.md +docs/WebPlayerCreatedSession.md +docs/WebPlayerFeatures.md docs/WebPlayerSession.md +docs/WebPlayerSessionDomain.md +docs/WebPlayerSessionListResponse.md +docs/WebPlayerSessionV1.md +docs/WebPlayerV1Api.md git_push.sh +pyproject.toml requirements.txt setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_accept_snapshot_body.py +test/test_accept_snapshot_request_payload.py +test/test_account_setup_response.py +test/test_activity.py +test/test_activity_api.py +test/test_activity_export_dto.py +test/test_activity_export_format.py +test/test_activity_export_response.py +test/test_activity_export_status.py +test/test_activity_export_task.py +test/test_activity_export_task_list.py +test/test_activity_list.py +test/test_activity_list_response.py +test/test_activity_request.py +test/test_activity_resource_not_starts_with_filter.py +test/test_activity_resource_starts_with_filter.py +test/test_activity_v1.py +test/test_activity_v1_api.py test/test_address.py +test/test_agent_api.py test/test_agent_app.py test/test_agent_app_ready_response.py +test/test_agent_app_ready_response_v1.py test/test_agent_app_status.py +test/test_agent_app_status_v1.py +test/test_agent_app_v1.py test/test_agent_apps_list.py +test/test_agent_apps_list_v1.py test/test_agent_apps_status_list.py +test/test_agent_apps_status_list_v1.py +test/test_agent_container.py +test/test_agent_container_health.py +test/test_agent_container_list.py test/test_agent_error.py +test/test_agent_error_v1.py +test/test_agent_file_archive_download_body.py +test/test_agent_file_attributes_body.py +test/test_agent_file_download_token.py +test/test_agent_frida_process_list.py +test/test_agent_frida_process_list_attached.py +test/test_agent_frida_response.py +test/test_agent_frida_run_body.py test/test_agent_icons.py +test/test_agent_icons_response.py test/test_agent_install_body.py +test/test_agent_install_body_v1.py +test/test_agent_profile_list_response.py test/test_agent_profiles_return.py +test/test_agent_remote_it_status.py test/test_agent_system_adb_auth.py +test/test_agent_system_adb_auth_v1.py test/test_agent_system_get_prop_body.py +test/test_agent_system_get_prop_body_v1.py +test/test_agent_system_get_prop_response.py +test/test_agent_system_install_open_gapps_body.py +test/test_agent_system_network_response.py +test/test_agent_system_result.py +test/test_agent_system_set_device_properties_body.py +test/test_agent_system_set_hostname_body.py +test/test_agent_system_set_hostname_body_v1.py +test/test_agent_temp_file_response.py +test/test_agent_v1_api.py test/test_agent_value_return.py test/test_agreed_ack.py +test/test_agreed_ack_v1.py +test/test_ai_tools_config.py +test/test_ai_tools_config_v1.py +test/test_allowed_devices_filter_schema.py +test/test_allowed_domains_response.py +test/test_allowed_firmware_schema.py test/test_api_conflict_error.py +test/test_api_conflict_error_v1.py test/test_api_error.py +test/test_api_error_v1.py test/test_api_internal_consistency_error.py test/test_api_not_found_error.py +test/test_api_not_found_error_v1.py test/test_api_token.py +test/test_api_token_result.py +test/test_artifacts_path.py +test/test_assessment.py +test/test_assessment_bundle.py +test/test_assessment_format.py +test/test_assessment_frida_script.py +test/test_assessment_history.py +test/test_assessment_history_line_item.py +test/test_assessment_history_results_inner.py +test/test_assessment_history_v1.py +test/test_assessment_id_status.py +test/test_assessment_metadata.py +test/test_assessment_results.py +test/test_assessment_severity_counts.py +test/test_assessment_status.py +test/test_assessment_wordlist.py +test/test_assessments_api.py +test/test_assessments_v1_api.py +test/test_attach_interface_body.py +test/test_attach_interface_request.py +test/test_auth_provider.py +test/test_auth_provider_type.py +test/test_auth_provider_types_list_response.py +test/test_auth_provider_v1.py +test/test_auth_providers_list_response.py +test/test_authentication_api.py +test/test_authentication_v1_api.py +test/test_available_plans_list_response.py +test/test_available_trial_plan.py +test/test_available_trial_plan_list.py +test/test_aws_create_response.py +test/test_billing_api.py +test/test_billing_line_item.py +test/test_billing_summary.py +test/test_billing_summary_pending_usage_based.py test/test_bit.py test/test_btrace_enable_options.py test/test_button.py -test/test_corellium_api.py +test/test_cancel_subscription_body.py +test/test_change_password_body.py +test/test_charm_tag.py +test/test_check_subdomain_response.py +test/test_check_subdomain_response_v1.py +test/test_cloud_notification_item.py +test/test_cloud_notification_list.py +test/test_cluster_administration_config_api.py +test/test_cluster_administration_firmware_service_api.py +test/test_cluster_administration_nodes_api.py +test/test_cluster_api.py +test/test_cluster_config.py +test/test_cluster_config_coordinator_config.py +test/test_cluster_config_coordinator_config_auth_providers_inner.py +test/test_cluster_config_coordinator_config_auth_providers_inner_any_of.py +test/test_cluster_config_coordinator_config_auth_providers_inner_any_of1.py +test/test_cluster_config_coordinator_config_aws_marketplace.py +test/test_cluster_config_coordinator_config_ensure_domain.py +test/test_cluster_config_coordinator_config_ensure_domain_properties.py +test/test_cluster_config_coordinator_config_ensure_domain_quotas.py +test/test_cluster_config_coordinator_config_hubspot.py +test/test_cluster_config_coordinator_config_hypertune.py +test/test_cluster_config_coordinator_config_pipedrive.py +test/test_cluster_config_coordinator_config_trial.py +test/test_cluster_config_coordinator_config_webplayer.py +test/test_cluster_config_firmware_service_config.py +test/test_cluster_config_ipsw_filters_inner.py +test/test_cluster_config_ipsw_filters_inner_device.py +test/test_cluster_config_ipsw_filters_inner_version.py +test/test_cluster_config_maintenance.py +test/test_cluster_config_net_mon_ca.py +test/test_cluster_config_node_specific_config.py +test/test_cluster_config_package_config.py +test/test_cluster_config_package_config_components.py +test/test_cluster_config_package_config_features.py +test/test_cluster_config_package_config_flavor_filters_inner.py +test/test_cluster_config_package_config_flavor_filters_inner_apply.py +test/test_cluster_config_package_config_flavor_filters_inner_filter.py +test/test_cluster_config_setup_config.py +test/test_cluster_config_stripe.py +test/test_cluster_config_update_error.py +test/test_cluster_configuration_payload.py +test/test_cluster_node.py +test/test_cluster_node_available.py +test/test_cluster_node_reserved.py +test/test_cluster_node_status.py +test/test_cluster_node_status_cluster_totals.py +test/test_cluster_node_status_cluster_totals_available.py +test/test_cluster_node_status_cluster_totals_reserved.py +test/test_cluster_node_status_cluster_totals_total.py +test/test_cluster_node_total.py +test/test_cluster_snapshot.py +test/test_cluster_snapshot_list.py +test/test_cluster_snapshot_metadata.py +test/test_cluster_snapshot_status.py +test/test_cluster_snapshot_v1.py +test/test_cluster_snapshots_api.py +test/test_compute_node_file.py +test/test_compute_node_file_list.py +test/test_config_api.py +test/test_config_auth_provider.py +test/test_config_response.py +test/test_config_response_ai_tools_config.py +test/test_config_response_maintenance.py +test/test_config_response_v1.py +test/test_config_v1_api.py +test/test_coordinator_config.py +test/test_coordinator_config_v1.py +test/test_core_trace_api.py +test/test_core_trace_v1_api.py test/test_coupon_options.py +test/test_create_activity_export_body.py +test/test_create_activity_export_response.py +test/test_create_assessment_input.py +test/test_create_cloud_admin_trial_request_body.py +test/test_create_domain_auth_provider_body.py +test/test_create_domain_auth_provider_response.py +test/test_create_domain_auth_provider_response_config.py +test/test_create_domain_welcome_message_body.py +test/test_create_hook_body.py +test/test_create_image_body.py +test/test_create_instance_body.py +test/test_create_instance_response.py +test/test_create_interconnect_body.py +test/test_create_interconnect_v3_body.py +test/test_create_invites_body.py +test/test_create_network_connection_body.py +test/test_create_network_connection_options.py +test/test_create_open_vpn_network_connection_body.py +test/test_create_open_vpn_network_connection_body_v1.py +test/test_create_project_body.py +test/test_create_project_key_body.py +test/test_create_snapshot_body.py test/test_create_team.py +test/test_create_team_body.py +test/test_create_trial_request_body.py +test/test_create_trial_request_response.py +test/test_create_trial_request_response_trial_request.py +test/test_create_user_body.py +test/test_create_vlan_network_connection_body.py +test/test_create_vlan_network_connection_body_v1.py +test/test_create_web_player_session_body.py test/test_created_by.py test/test_credentials.py +test/test_delete_modification_input.py +test/test_delete_network_connection_options.py +test/test_deployment_version.py +test/test_detach_interface_body.py +test/test_detach_interface_request.py +test/test_device.py +test/test_device_auto_shutdown_schema.py +test/test_device_usage.py +test/test_domain_api.py +test/test_domain_auth_provider_api.py +test/test_domain_auth_provider_config.py +test/test_domain_auth_provider_request.py +test/test_domain_auth_provider_response.py +test/test_domain_auth_provider_response_v1.py +test/test_domain_auth_providers_api.py +test/test_domain_auth_providers_list.py +test/test_domain_config.py +test/test_domain_config_input.py +test/test_domain_config_input_snapshot_sharing_permissions.py +test/test_domain_config_input_trial.py +test/test_domain_config_input_webplayer.py +test/test_domain_config_snapshot_sharing_permissions.py +test/test_domain_config_trial.py +test/test_domain_config_trial_end_action.py +test/test_domain_config_trial_subscribe_action.py +test/test_domain_config_webplayer.py +test/test_domain_info.py +test/test_domain_list.py +test/test_domain_list_item.py +test/test_domain_list_item_disabled.py +test/test_domain_list_item_domain_usage_inner.py +test/test_domain_list_item_projects_inner.py +test/test_domain_list_item_projects_inner_instances_inner.py +test/test_domain_list_item_projects_inner_instances_inner_images_inner.py +test/test_domain_list_item_projects_inner_instances_inner_usage.py +test/test_domain_list_item_projects_inner_quotas.py +test/test_domain_list_item_projects_inner_usage.py +test/test_domain_list_item_quotas.py +test/test_domain_list_item_subscription.py +test/test_domain_list_item_subscription_history_inner.py +test/test_domain_list_item_subscription_history_inner_administrator.py +test/test_domain_list_item_usage.py +test/test_domain_list_item_users_info_inner.py +test/test_domain_list_usage.py test/test_domain_options.py +test/test_domain_software.py +test/test_domain_software_list.py +test/test_domain_v1_api.py +test/test_domain_welcome_message_response.py +test/test_domain_welcome_message_response_v1.py +test/test_edit_invites_body.py +test/test_edit_invites_body_changes.py +test/test_enable_btrace_body.py +test/test_enable_netdump_body.py +test/test_enable_sslsplit_body.py +test/test_ensure_domain_settings_body.py +test/test_ensure_domain_settings_body_admin_user.py +test/test_ensure_domain_settings_response.py +test/test_ensure_domain_settings_response_user.py +test/test_extended_firmware_asset_info.py +test/test_extended_firmware_asset_info_v1.py test/test_extension.py +test/test_extension_flavor.py +test/test_extension_list.py +test/test_extension_v1.py +test/test_extensions_api.py +test/test_extensions_v1_api.py +test/test_external_services_api.py test/test_features.py +test/test_fetch_firmware_assets_body.py +test/test_fetch_firmware_assets_response.py +test/test_fetch_firmware_assets_response_failed_inner.py test/test_file_changes.py test/test_firmware.py +test/test_firmware_asset.py +test/test_firmware_asset_filter.py +test/test_firmware_asset_list.py +test/test_firmware_asset_v1.py +test/test_firmware_device.py +test/test_firmware_device_list.py +test/test_firmware_info_device.py +test/test_firmware_info_device_firmwares_inner.py +test/test_firmware_list.py +test/test_firmware_service_api.py +test/test_firmware_service_config.py +test/test_firmware_service_config_cache_firmware.py +test/test_firmware_service_config_download_ipsw_filters.py +test/test_firmware_service_config_value.py +test/test_firmware_service_configuration.py +test/test_firmware_service_settings.py +test/test_firmware_v1.py +test/test_flavor_frame.py +test/test_flavor_frame_dimensions.py +test/test_flavor_frame_home.py +test/test_flavor_frame_inner.py +test/test_flavors_api.py +test/test_get_firmware_info_body.py +test/test_get_interconnects_response.py +test/test_get_invite_by_token_body.py +test/test_get_reset_link_info_body.py +test/test_get_storage_response.py test/test_gpio_state_definition.py +test/test_gpio_state_definition_banks_inner_inner.py +test/test_gpio_state_definition_v1.py test/test_gpios_state.py -test/test_grant_trial_request_response.py +test/test_gpios_state_v1.py test/test_hook.py +test/test_hook_list.py +test/test_hook_patch_type.py +test/test_hook_v1.py +test/test_hyper_trace_api.py +test/test_hyper_trace_v1_api.py +test/test_hypertune_api.py +test/test_hypertune_hash_response.py +test/test_hypertune_init_response.py +test/test_hypervisor_hooks_api.py +test/test_hypervisor_hooks_v1_api.py test/test_image.py +test/test_image_creation_options.py +test/test_image_encoding.py +test/test_image_extended.py +test/test_image_extended_device.py +test/test_image_firmware.py +test/test_image_firmware_info.py +test/test_image_firmware_info_boot_args.py +test/test_image_list.py +test/test_image_type.py +test/test_image_v1.py +test/test_images_api.py +test/test_images_v1_api.py +test/test_images_v2_api.py +test/test_input_response.py +test/test_input_response_v1.py +test/test_install_firmware_assets_body.py +test/test_install_firmware_assets_body_v1.py +test/test_install_firmware_assets_response.py +test/test_install_firmware_assets_response_v1.py +test/test_install_firmware_body.py +test/test_install_firmware_body_v1.py +test/test_install_firmware_response.py +test/test_install_firmware_response_v1.py +test/test_install_firmware_status_response.py test/test_instance.py test/test_instance_agent_state.py +test/test_instance_agent_state_v1.py test/test_instance_boot_options.py test/test_instance_boot_options_additional_tag.py +test/test_instance_boot_options_fvp.py +test/test_instance_boot_options_kernel.py +test/test_instance_boot_options_kernel_v1.py +test/test_instance_boot_options_pongo.py +test/test_instance_boot_options_pongo_v1.py +test/test_instance_boot_options_v1.py +test/test_instance_boot_options_vmmio_inner.py +test/test_instance_console.py test/test_instance_console_endpoint.py +test/test_instance_console_endpoint_v1.py +test/test_instance_console_v1.py test/test_instance_create_options.py -test/test_instance_input.py +test/test_instance_hyper_trace_state.py +test/test_instance_hyper_trace_state_v1.py +test/test_instance_input_body.py +test/test_instance_input_request.py +test/test_instance_interface.py +test/test_instance_interface_status.py +test/test_instance_list.py test/test_instance_netdump_state.py +test/test_instance_netdump_state_v1.py test/test_instance_netmon_state.py +test/test_instance_netmon_state_v1.py +test/test_instance_read_only_status.py +test/test_instance_read_only_status_v1.py +test/test_instance_restore_status.py +test/test_instance_restore_status_v1.py test/test_instance_return.py test/test_instance_services.py +test/test_instance_services_v1.py +test/test_instance_snapshots_list.py test/test_instance_start_options.py test/test_instance_state.py +test/test_instance_state_v1.py test/test_instance_stop_options.py +test/test_instance_trace_filter.py +test/test_instance_trace_state.py +test/test_instance_trace_state_v1.py +test/test_instance_uefi_bootloader.py test/test_instance_upgrade_body.py +test/test_instance_upgrade_body_v1.py +test/test_instance_upgrade_response.py +test/test_instance_v1.py +test/test_instances_api.py +test/test_instances_v1_api.py +test/test_instances_v2_api.py +test/test_insufficient_storage_error.py +test/test_insufficient_storage_error_v1.py +test/test_interconnect.py +test/test_interconnect_list.py +test/test_interconnect_protocol.py +test/test_interconnect_response.py +test/test_interconnects_api.py +test/test_interconnects_v1_api.py +test/test_interfaces_schema_inner.py +test/test_invalid_credentials_error.py +test/test_invalid_totp_error.py test/test_invitation.py +test/test_invitation_by_token.py +test/test_invitation_v1.py +test/test_invite_created.py +test/test_invite_created_entry.py +test/test_invite_result.py +test/test_invite_result_error.py test/test_invite_revoke_params.py -test/test_invite_revoke_params_ids.py +test/test_invite_settings.py +test/test_invite_signup_body.py +test/test_invite_signup_body_params.py +test/test_invite_signup_response.py +test/test_invites_api.py +test/test_invites_list_response.py +test/test_invites_v1_api.py +test/test_ipsw_device_constraint.py +test/test_ipsw_filter.py +test/test_ipsw_filter_v3.py +test/test_ipsw_filter_v3_device.py +test/test_ipsw_filter_v3_version.py +test/test_ipsw_version_constraint.py test/test_kcrange.py +test/test_kcrange_v1.py test/test_kernel_task.py +test/test_kernel_task_v1.py test/test_kernel_thread.py +test/test_kernel_thread_v1.py +test/test_layout_schema.py +test/test_ldap_authentication_credentials.py +test/test_ldap_config.py +test/test_ldap_group_search_configuration.py +test/test_ldap_server_connection_details.py +test/test_ldap_user_attribute_mapping.py +test/test_ldap_user_search_configuration.py +test/test_load_extension_body.py +test/test_logging.py +test/test_logging_v1.py +test/test_login_body.py +test/test_login_result.py +test/test_login_result_disabled.py +test/test_login_result_domain.py +test/test_login_result_domain_device_auto_shutdown.py +test/test_login_result_domain_disabled.py +test/test_login_result_domain_snapshot_sharing_permissions.py +test/test_login_result_domain_trial.py +test/test_login_result_domain_webplayer.py +test/test_login_result_user.py +test/test_maintenance.py +test/test_matrix_error.py test/test_media_play_body.py +test/test_media_play_body_v1.py +test/test_media_play_by_image.py +test/test_media_play_by_url.py +test/test_media_store.py +test/test_media_store_v1.py +test/test_message_body.py +test/test_message_body_any_of.py +test/test_message_body_any_of1.py +test/test_metered_subscription_usage.py +test/test_metered_subscription_usage_v1.py test/test_model.py -test/test_model_software.py +test/test_model_firmware.py +test/test_model_firmware_springboard_snapshot.py +test/test_model_firmware_springboard_snapshot_volumes_inner.py +test/test_model_frame.py +test/test_model_frame_dimensions.py +test/test_model_partition.py +test/test_model_product_image.py +test/test_model_rect.py +test/test_model_software_v1.py +test/test_model_v1.py +test/test_models_api.py +test/test_models_v1_api.py +test/test_net_connect_api.py +test/test_net_connect_v1_api.py test/test_netdump_filter.py +test/test_network_connection.py +test/test_network_connection_config.py +test/test_network_connection_pagination_result.py +test/test_network_connection_provider.py +test/test_network_connection_provider_pagination_result.py +test/test_network_connection_providers.py +test/test_network_connection_providers_results_inner.py +test/test_network_connections.py +test/test_network_interfaces.py +test/test_network_schema.py +test/test_network_status.py +test/test_network_status_response.py +test/test_network_status_v1.py +test/test_node_console_endpoint.py +test/test_node_information.py +test/test_node_information_v1.py +test/test_node_list.py +test/test_node_updates_failed.py +test/test_open_id_config.py +test/test_open_id_config_v1.py +test/test_open_vpn_config.py +test/test_open_vpn_config_v1.py +test/test_open_vpn_network_connection.py +test/test_open_vpn_network_connection_projects_value.py +test/test_open_vpn_network_connection_v1.py +test/test_paginated_assessments.py +test/test_pagination.py +test/test_partial_update_interconnect_request.py +test/test_partial_update_network_connection_body.py +test/test_partial_update_network_connection_options.py test/test_password_change_body.py test/test_password_reset_body.py +test/test_patch_cluster_config_body.py +test/test_patch_domain_auth_provider_body.py +test/test_patch_domain_body.py +test/test_patch_domain_body_webplayer.py +test/test_patch_domain_welcome_message_body.py +test/test_patch_firmware_service_config_body.py +test/test_patch_instance_body.py +test/test_patch_instance_body_proxy_inner.py +test/test_patch_instance_body_strace_filter_inner.py test/test_patch_instance_options.py +test/test_patch_instance_read_only.py +test/test_patch_instance_read_only_body.py +test/test_patch_interconnect_body.py +test/test_patch_project_body.py +test/test_patch_user_body.py test/test_peripherals_data.py +test/test_peripherals_data_v1.py test/test_plan.py +test/test_plan_v1.py +test/test_pool_usage_schema.py +test/test_portal_session.py +test/test_post_share_snapshot_request_payload.py test/test_project.py +test/test_project_config.py +test/test_project_instance_list.py +test/test_project_instance_summary.py test/test_project_key.py +test/test_project_key_list.py +test/test_project_key_v1.py +test/test_project_list.py +test/test_project_list_item.py +test/test_project_network_state.py test/test_project_quota.py +test/test_project_quota_input.py +test/test_project_quota_v1.py test/test_project_settings.py +test/test_project_settings_v1.py test/test_project_usage.py +test/test_project_usage_v1.py +test/test_project_v1.py +test/test_project_with_keys_v1.py +test/test_projects_api.py +test/test_projects_v1_api.py +test/test_provider_network_connection.py test/test_proxy_config.py -test/test_rate_info.py +test/test_ram_dump_api.py +test/test_ram_dump_v1_api.py +test/test_register_service_body.py +test/test_report_modification_input.py +test/test_report_modification_result.py test/test_reset_link_body.py +test/test_reset_link_info.py +test/test_reset_link_info_return.py +test/test_reset_password_body.py +test/test_reset_unauthorized_response.py +test/test_restore_backup_body.py +test/test_restore_backup_data.py +test/test_revoke_invites_body.py +test/test_revoke_invites_response.py test/test_role.py +test/test_role_name.py +test/test_role_v1.py +test/test_roles_api.py +test/test_roles_list_response.py +test/test_roles_v1_api.py test/test_rotate_body.py +test/test_rotate_body_v1.py +test/test_saml_config.py +test/test_saml_group_mapping.py +test/test_saml_identity_provider_config.py +test/test_saml_service_provider_config.py +test/test_saml_user_attribute_mapping.py +test/test_send_reset_link_body.py +test/test_service_endpoint_schema.py +test/test_service_status_request_body.py +test/test_service_status_request_body_vms_inner.py +test/test_set_domain_welcome_message_body.py +test/test_set_snapshot_permissions_body.py +test/test_share_snapshot_body.py +test/test_shared_snapshot.py +test/test_shared_snapshots_info.py +test/test_shared_snapshots_response.py test/test_snapshot.py test/test_snapshot_creation_options.py +test/test_snapshot_list.py +test/test_snapshot_member.py +test/test_snapshot_member_v1.py +test/test_snapshot_owner.py +test/test_snapshot_owner_v1.py +test/test_snapshot_permissions_request_payload.py +test/test_snapshot_request.py +test/test_snapshot_sharing.py +test/test_snapshot_sharing_api.py +test/test_snapshot_sharing_permissions.py +test/test_snapshot_sharing_permissions_request_schema.py +test/test_snapshot_sharing_type.py +test/test_snapshot_sharing_v1.py +test/test_snapshot_sharing_v1_api.py test/test_snapshot_status.py -test/test_subscriber_invite.py +test/test_snapshot_status_v1.py +test/test_snapshot_v1.py +test/test_snapshots_api.py +test/test_snapshots_v1_api.py +test/test_sslsplit_filter.py +test/test_start_instance_body.py +test/test_status_api.py +test/test_status_v1_api.py +test/test_stop_instance_body.py +test/test_storage_already_mounted_response.py +test/test_storage_api.py +test/test_storage_attach_response.py +test/test_storage_device.py +test/test_storage_device_list.py +test/test_storage_eject_already_unmounted_response.py +test/test_storage_file.py +test/test_storage_file_list.py +test/test_storage_list.py +test/test_storage_queue_error.py +test/test_storage_v1_api.py +test/test_stripe_checkout_body.py +test/test_stripe_checkout_complete_body.py +test/test_stripe_webhook_ack.py +test/test_subscribe_to_trial_body.py +test/test_subscription.py +test/test_subscription_trial.py +test/test_sys_info_schema.py +test/test_task_status.py test/test_team.py test/test_team_create.py +test/test_team_created.py +test/test_team_user.py +test/test_team_v1.py +test/test_teams_api.py +test/test_teams_list_response.py +test/test_teams_v1_api.py +test/test_test_assessment_input.py test/test_text_input.py +test/test_text_input_request.py +test/test_text_input_request_v1.py test/test_token.py +test/test_token_v1.py +test/test_token_validate_body.py +test/test_totp_api.py +test/test_totp_disable_body.py +test/test_totp_enable_body.py +test/test_totp_generate_response.py test/test_touch_curve_input.py +test/test_touch_curve_input_request.py +test/test_touch_curve_input_request_v1.py test/test_touch_input.py +test/test_touch_input_request.py +test/test_touch_input_request_v1.py test/test_trial.py test/test_trial_extension.py +test/test_trial_extension_v1.py +test/test_trial_request.py +test/test_trial_request_detail.py +test/test_trial_request_detail_organization.py +test/test_trial_request_list_response.py test/test_trial_request_metadata.py test/test_trial_request_options.py +test/test_trial_v1.py +test/test_unauthorized_error.py +test/test_uncancel_subscription_body.py +test/test_update_assessment_input.py +test/test_update_domain_settings_response.py +test/test_update_domain_settings_response_settings.py +test/test_update_domain_settings_response_snapshot_sharing_permissions.py +test/test_update_domain_settings_response_webplayer.py +test/test_update_domain_welcome_message_request.py test/test_update_extension.py +test/test_update_extension_body.py +test/test_update_hook_body.py +test/test_update_interconnect_body.py +test/test_update_interconnect_v3_body.py +test/test_update_network_connection_body.py +test/test_update_network_connection_options.py +test/test_update_network_connection_options_config.py +test/test_update_own_profile_body.py +test/test_update_team_body.py +test/test_update_trial_request_body.py +test/test_update_trial_request_params.py +test/test_upload_size_error.py test/test_user.py +test/test_user_create.py +test/test_user_create_return.py +test/test_user_created.py test/test_user_error.py +test/test_user_error_item.py +test/test_user_error_response.py +test/test_user_error_v1.py +test/test_user_errors.py +test/test_user_errors_v1.py +test/test_user_snapshots.py +test/test_user_update.py +test/test_users_api.py +test/test_users_v1_api.py +test/test_v1_check_subdomain_existence_parameters.py test/test_v1_create_hook_parameters.py test/test_v1_load_extension_parameters.py test/test_v1_set_state_body.py +test/test_v1_update_hook_parameters.py +test/test_v3_delete_network_connection_request.py +test/test_v3_update_snapshot_request.py test/test_validation_error.py +test/test_vlan_config.py +test/test_vlan_config_v1.py +test/test_vlan_network_connection.py +test/test_vlan_network_connection_v1.py test/test_volume_options.py +test/test_volume_options_v1.py +test/test_vpn_config_preauthorization.py test/test_vpn_definition.py +test/test_vpn_definition_v1.py +test/test_vpn_schema.py +test/test_web_player_allowed_domains.py +test/test_web_player_api.py test/test_web_player_create_session_request.py +test/test_web_player_created_session.py +test/test_web_player_features.py test/test_web_player_session.py +test/test_web_player_session_domain.py +test/test_web_player_session_list_response.py +test/test_web_player_session_v1.py +test/test_web_player_v1_api.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 4be2c72..e465da4 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +7.14.0 diff --git a/.travis.yml b/.travis.yml index 70c7492..ca46ab7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,17 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "2.7" - - "3.2" - - "3.3" - - "3.4" - - "3.5" - - "3.6" - - "3.7" - - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "3.13" + # uncomment the following if needed + #- "3.13-dev" # 3.13 development branch + #- "nightly" # nightly build # command to install dependencies install: - "pip install -r requirements.txt" - "pip install -r test-requirements.txt" # command to run tests -script: pytest --cov=corellium_api +script: pytest --cov=corellium diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 25b9d32..5f11d72 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,46 @@ -# corellium-api +# corellium-api-client + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + REST API to manage your virtual devices. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.6.0-29198 -- Package version: 0.4.2 -- Build package: org.openapitools.codegen.languages.PythonLegacyClientCodegen +- API version: 1.0.0 +- Package version: 0.1.0 +- Generator version: 7.14.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. -Python 2.7 and 3.4+ +Python 3.9+ ## Installation & Usage ### pip install @@ -17,13 +48,13 @@ Python 2.7 and 3.4+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install corellium-api-client ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install corellium-api-client`) Then import the package: ```python -import corellium_api +import corellium ``` ### Setuptools @@ -37,50 +68,105 @@ python setup.py install --user Then import the package: ```python -import corellium_api +import corellium ``` +### Tests + +Execute `pytest` to run the tests. + ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: ```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException +import corellium +from corellium.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - node_id = 'node_id_example' # str | Node ID +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityApi(api_client) + accept = corellium.ActivityExportFormat() # ActivityExportFormat | Specifies the activity export file format. + create_activity_export_body = corellium.CreateActivityExportBody() # CreateActivityExportBody | (optional) + + try: + # Start activity export + api_response = api_instance.v3_create_activity_export(accept, create_activity_export_body=create_activity_export_body) + print("The response of ActivityApi->v3_create_activity_export:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling ActivityApi->v3_create_activity_export: %s\n" % e) + +``` + +## Quick start + +```python +import os + +from corellium import Configuration, CorelliumClient - try: - # Access node console via SSH - api_instance.api_v1_cluster_nodes_node_id_console_get(node_id) - except ApiException as e: - print("Exception when calling CorelliumApi->api_v1_cluster_nodes_node_id_console_get: %s\n" % e) - +# basePath defaults to https://app.corellium.com/api; pass host= for enterprise/on-prem. +client = CorelliumClient(Configuration(access_token=os.environ["CORELLIUM_API_TOKEN"])) -if __name__ == "__main__": - asyncio.run(main()) +instances = client.instances.list() +print(instances) +``` + +## Authentication + +`access_token` is a Corellium API token or JWT bearer: + +```python +from corellium import Configuration, CorelliumClient + +client = CorelliumClient(Configuration(access_token="")) +``` + +No token is required for public endpoints (login, auth-provider metadata). If +you only have credentials, log in first to obtain a token — note that +`username` holds your account email: + +```python +from corellium import Configuration, CorelliumClient, LoginBody + +anon = CorelliumClient(Configuration()) +result = anon.auth.login(login_body=LoginBody(username="me@example.com", password="...")) +client = CorelliumClient(Configuration(access_token=result.token)) +``` + +## Namespaces & versioning + +Operations are grouped into namespaces: `client.instances.*`, `client.projects.*`, +`client.snapshots.*`, and so on. + +- Unversioned paths (`client.instances.list`) resolve to the **latest** version of + each operation — a per-operation blend. +- Pinned paths (`client.v1.*`, `client.v3.*`) bind to a specific version forever. + +```python +client.instances.list() # latest +client.v3.instances.list() # pinned to v3 ``` ## Documentation for API Endpoints @@ -89,358 +175,1182 @@ All URIs are relative to *https://app.corellium.com/api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*CorelliumApi* | [**api_v1_cluster_nodes_node_id_console_get**](docs/CorelliumApi.md#api_v1_cluster_nodes_node_id_console_get) | **GET** /api/v1/cluster/nodes/:nodeId/console | Access node console via SSH -*CorelliumApi* | [**api_v1_interconnects_get**](docs/CorelliumApi.md#api_v1_interconnects_get) | **GET** /api/v1/interconnects | Get all I/O Interconnects -*CorelliumApi* | [**api_v1_interconnects_interconnect_id_delete**](docs/CorelliumApi.md#api_v1_interconnects_interconnect_id_delete) | **DELETE** /api/v1/interconnects/:interconnectId | Delete I/O Interconnect -*CorelliumApi* | [**api_v1_interconnects_interconnect_id_get**](docs/CorelliumApi.md#api_v1_interconnects_interconnect_id_get) | **GET** /api/v1/interconnects/:interconnectId | Get Interconnect -*CorelliumApi* | [**api_v1_interconnects_interconnect_id_patch**](docs/CorelliumApi.md#api_v1_interconnects_interconnect_id_patch) | **PATCH** /api/v1/interconnects/:interconnectId | Partial Update Interconnect -*CorelliumApi* | [**api_v1_interconnects_interconnect_id_put**](docs/CorelliumApi.md#api_v1_interconnects_interconnect_id_put) | **PUT** /api/v1/interconnects/:interconnectId | Update Interconnect -*CorelliumApi* | [**api_v1_interconnects_post**](docs/CorelliumApi.md#api_v1_interconnects_post) | **POST** /api/v1/interconnects | Create I/O Interconnect -*CorelliumApi* | [**create_assessment**](docs/CorelliumApi.md#create_assessment) | **POST** /v1/services/matrix/{instanceId}/assessments | Create assessment -*CorelliumApi* | [**delete_assessment**](docs/CorelliumApi.md#delete_assessment) | **DELETE** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Delete assessment -*CorelliumApi* | [**download_report**](docs/CorelliumApi.md#download_report) | **GET** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/download | Download report -*CorelliumApi* | [**get_assessment_by_id**](docs/CorelliumApi.md#get_assessment_by_id) | **GET** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Get assessment by ID -*CorelliumApi* | [**get_assessments_by_instance_id**](docs/CorelliumApi.md#get_assessments_by_instance_id) | **GET** /v1/services/matrix/{instanceId}/instances/{instanceId}/assessments | Get assessments by instanceId -*CorelliumApi* | [**run_tests**](docs/CorelliumApi.md#run_tests) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/test | Update assessment state and execute MATRIX tests -*CorelliumApi* | [**start_monitoring**](docs/CorelliumApi.md#start_monitoring) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/start | Update assessment state and begin device monitoring -*CorelliumApi* | [**stop_monitoring**](docs/CorelliumApi.md#stop_monitoring) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop | Update assessment state and stop device monitoring -*CorelliumApi* | [**v1_accept_shared_snapshot**](docs/CorelliumApi.md#v1_accept_shared_snapshot) | **POST** /v1/snapshots/accept | Accept a snapshot shared with you -*CorelliumApi* | [**v1_activity_export**](docs/CorelliumApi.md#v1_activity_export) | **POST** /v1/activity/export | Start activity export -*CorelliumApi* | [**v1_activity_list**](docs/CorelliumApi.md#v1_activity_list) | **GET** /v1/activity | Get resource activities -*CorelliumApi* | [**v1_add_project_key**](docs/CorelliumApi.md#v1_add_project_key) | **POST** /v1/projects/{projectId}/keys | Add Project Authorized Key -*CorelliumApi* | [**v1_add_team_role_to_project**](docs/CorelliumApi.md#v1_add_team_role_to_project) | **PUT** /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Add team role to project -*CorelliumApi* | [**v1_add_user_role_to_project**](docs/CorelliumApi.md#v1_add_user_role_to_project) | **PUT** /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Add user role to project -*CorelliumApi* | [**v1_add_user_to_team**](docs/CorelliumApi.md#v1_add_user_to_team) | **PUT** /v1/teams/{teamId}/users/{userId} | Add user to team -*CorelliumApi* | [**v1_agent_app_ready**](docs/CorelliumApi.md#v1_agent_app_ready) | **GET** /v1/instances/{instanceId}/agent/v1/app/ready | Check if App subsystem is ready -*CorelliumApi* | [**v1_agent_delete_file**](docs/CorelliumApi.md#v1_agent_delete_file) | **DELETE** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Delete a File on VM -*CorelliumApi* | [**v1_agent_get_file**](docs/CorelliumApi.md#v1_agent_get_file) | **GET** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Download a File from VM -*CorelliumApi* | [**v1_agent_get_temp_filename**](docs/CorelliumApi.md#v1_agent_get_temp_filename) | **POST** /v1/instances/{instanceId}/agent/v1/file/temp | Get the path for a new temp file -*CorelliumApi* | [**v1_agent_install_app**](docs/CorelliumApi.md#v1_agent_install_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/install | Install App at path -*CorelliumApi* | [**v1_agent_install_profile**](docs/CorelliumApi.md#v1_agent_install_profile) | **POST** /v1/instances/{instanceId}/agent/v1/profile/install | Install a Profile to VM -*CorelliumApi* | [**v1_agent_kill_app**](docs/CorelliumApi.md#v1_agent_kill_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill | Kill an App -*CorelliumApi* | [**v1_agent_list_app_icons**](docs/CorelliumApi.md#v1_agent_list_app_icons) | **GET** /v1/instances/{instanceId}/agent/v1/app/icons | List App Icons -*CorelliumApi* | [**v1_agent_list_apps**](docs/CorelliumApi.md#v1_agent_list_apps) | **GET** /v1/instances/{instanceId}/agent/v1/app/apps | List Apps -*CorelliumApi* | [**v1_agent_list_apps_status**](docs/CorelliumApi.md#v1_agent_list_apps_status) | **GET** /v1/instances/{instanceId}/agent/v1/app/apps/update | List Apps Status -*CorelliumApi* | [**v1_agent_list_profiles**](docs/CorelliumApi.md#v1_agent_list_profiles) | **GET** /v1/instances/{instanceId}/agent/v1/profile/profiles | List Profiles -*CorelliumApi* | [**v1_agent_run_app**](docs/CorelliumApi.md#v1_agent_run_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run | Run an App -*CorelliumApi* | [**v1_agent_set_file_attributes**](docs/CorelliumApi.md#v1_agent_set_file_attributes) | **PATCH** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Change Attrs of a File on VM -*CorelliumApi* | [**v1_agent_system_get_adb_auth**](docs/CorelliumApi.md#v1_agent_system_get_adb_auth) | **GET** /v1/instances/{instanceId}/agent/v1/system/adbauth | Get ADB Auth Setting (AOSP only) -*CorelliumApi* | [**v1_agent_system_get_network**](docs/CorelliumApi.md#v1_agent_system_get_network) | **GET** /v1/instances/{instanceId}/agent/v1/system/network | Get IP of eth0 (AOSP only) -*CorelliumApi* | [**v1_agent_system_get_prop**](docs/CorelliumApi.md#v1_agent_system_get_prop) | **POST** /v1/instances/{instanceId}/agent/v1/system/getprop | Get System Property (AOSP only) -*CorelliumApi* | [**v1_agent_system_install_open_g_apps**](docs/CorelliumApi.md#v1_agent_system_install_open_g_apps) | **POST** /v1/instances/{instanceId}/agent/v1/system/install-opengapps | Install OpenGApps (AOSP only) -*CorelliumApi* | [**v1_agent_system_lock**](docs/CorelliumApi.md#v1_agent_system_lock) | **POST** /v1/instances/{instanceId}/agent/v1/system/lock | Lock Device (iOS Only) -*CorelliumApi* | [**v1_agent_system_set_adb_auth**](docs/CorelliumApi.md#v1_agent_system_set_adb_auth) | **PUT** /v1/instances/{instanceId}/agent/v1/system/adbauth | Set ADB Auth Setting (AOSP only) -*CorelliumApi* | [**v1_agent_system_set_hostname**](docs/CorelliumApi.md#v1_agent_system_set_hostname) | **POST** /v1/instances/{instanceId}/agent/v1/system/setHostname | Set Hostname of instance -*CorelliumApi* | [**v1_agent_system_shutdown**](docs/CorelliumApi.md#v1_agent_system_shutdown) | **POST** /v1/instances/{instanceId}/agent/v1/system/shutdown | Instruct VM to halt -*CorelliumApi* | [**v1_agent_system_unlock**](docs/CorelliumApi.md#v1_agent_system_unlock) | **POST** /v1/instances/{instanceId}/agent/v1/system/unlock | Unlock Device (iOS Only) -*CorelliumApi* | [**v1_agent_uninstall_app**](docs/CorelliumApi.md#v1_agent_uninstall_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall | Uninstall an App -*CorelliumApi* | [**v1_agent_uninstall_profile**](docs/CorelliumApi.md#v1_agent_uninstall_profile) | **DELETE** /v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId} | Uninstall a Profile from VM -*CorelliumApi* | [**v1_agent_upload_file**](docs/CorelliumApi.md#v1_agent_upload_file) | **PUT** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Upload a file to VM -*CorelliumApi* | [**v1_attach_instance_interface**](docs/CorelliumApi.md#v1_attach_instance_interface) | **POST** /v1/instances/{instanceId}/interfaces | Attach I/O Interface -*CorelliumApi* | [**v1_auth_login**](docs/CorelliumApi.md#v1_auth_login) | **POST** /v1/auth/login | Log In -*CorelliumApi* | [**v1_btrace_preauthorize**](docs/CorelliumApi.md#v1_btrace_preauthorize) | **GET** /v1/instances/{instanceId}/btrace-authorize | Pre-authorize an btrace download -*CorelliumApi* | [**v1_clear_core_trace**](docs/CorelliumApi.md#v1_clear_core_trace) | **DELETE** /v1/instances/{instanceId}/strace | Clear CoreTrace logs -*CorelliumApi* | [**v1_clear_hyper_trace**](docs/CorelliumApi.md#v1_clear_hyper_trace) | **DELETE** /v1/instances/{instanceId}/btrace | Clear HyperTrace logs -*CorelliumApi* | [**v1_clear_hyper_trace_hooks**](docs/CorelliumApi.md#v1_clear_hyper_trace_hooks) | **POST** /v1/instances/{instanceId}/hooks/clear | Clear Hooks on an instance -*CorelliumApi* | [**v1_clear_instance_panics**](docs/CorelliumApi.md#v1_clear_instance_panics) | **DELETE** /v1/instances/{instanceId}/panics | Clear Panics -*CorelliumApi* | [**v1_cluster_firmware_service_devices_get**](docs/CorelliumApi.md#v1_cluster_firmware_service_devices_get) | **GET** /v1/cluster/firmware-service/devices | Fetch devices from the firmware service -*CorelliumApi* | [**v1_cluster_firmware_service_firmware_assets_asset_url_delete**](docs/CorelliumApi.md#v1_cluster_firmware_service_firmware_assets_asset_url_delete) | **DELETE** /v1/cluster/firmware-service/firmware-assets/{assetURL} | Delete a firmware asset by its URL -*CorelliumApi* | [**v1_cluster_firmware_service_firmware_assets_asset_url_extended_get**](docs/CorelliumApi.md#v1_cluster_firmware_service_firmware_assets_asset_url_extended_get) | **GET** /v1/cluster/firmware-service/firmware-assets/{assetURL}/extended | Fetch extended firmware-asset details including instances and associated IPSWs -*CorelliumApi* | [**v1_cluster_firmware_service_firmware_assets_get**](docs/CorelliumApi.md#v1_cluster_firmware_service_firmware_assets_get) | **GET** /v1/cluster/firmware-service/firmware-assets | Fetch firmware assets from the firmware service -*CorelliumApi* | [**v1_cluster_firmware_service_firmware_assets_post**](docs/CorelliumApi.md#v1_cluster_firmware_service_firmware_assets_post) | **POST** /v1/cluster/firmware-service/firmware-assets | Add firmware assets via the firmware service -*CorelliumApi* | [**v1_cluster_firmware_service_firmwares_filename_delete**](docs/CorelliumApi.md#v1_cluster_firmware_service_firmwares_filename_delete) | **DELETE** /v1/cluster/firmware-service/firmwares/{filename} | Delete a firmware by filename from the firmware service -*CorelliumApi* | [**v1_cluster_firmware_service_firmwares_get**](docs/CorelliumApi.md#v1_cluster_firmware_service_firmwares_get) | **GET** /v1/cluster/firmware-service/firmwares | Fetch firmwares from the firmware service -*CorelliumApi* | [**v1_cluster_nodes_get**](docs/CorelliumApi.md#v1_cluster_nodes_get) | **GET** /v1/cluster/nodes | List servers in the cluster -*CorelliumApi* | [**v1_cluster_nodes_node_id_get**](docs/CorelliumApi.md#v1_cluster_nodes_node_id_get) | **GET** /v1/cluster/nodes/:nodeId | Get node details by ID -*CorelliumApi* | [**v1_create_domain_auth_provider**](docs/CorelliumApi.md#v1_create_domain_auth_provider) | **POST** /v1/domain/{domainId}/auth | Create a new auth provider for a domain -*CorelliumApi* | [**v1_create_hook**](docs/CorelliumApi.md#v1_create_hook) | **POST** /v1/instances/{instanceId}/hooks | Create hypervisor hook for Instance -*CorelliumApi* | [**v1_create_image**](docs/CorelliumApi.md#v1_create_image) | **POST** /v1/images | Create a new Image -*CorelliumApi* | [**v1_create_instance**](docs/CorelliumApi.md#v1_create_instance) | **POST** /v1/instances | Create Instance -*CorelliumApi* | [**v1_create_network_connection**](docs/CorelliumApi.md#v1_create_network_connection) | **POST** /v1/network/connections | Create a new Network Connection -*CorelliumApi* | [**v1_create_project**](docs/CorelliumApi.md#v1_create_project) | **POST** /v1/projects | Create a Project -*CorelliumApi* | [**v1_create_snapshot**](docs/CorelliumApi.md#v1_create_snapshot) | **POST** /v1/instances/{instanceId}/snapshots | Create Instance Snapshot -*CorelliumApi* | [**v1_create_user**](docs/CorelliumApi.md#v1_create_user) | **POST** /v1/users | Create User -*CorelliumApi* | [**v1_delete_domain_auth_provider**](docs/CorelliumApi.md#v1_delete_domain_auth_provider) | **DELETE** /v1/domain/{domainId}/auth/{providerId} | Delete an auth provider from a domain -*CorelliumApi* | [**v1_delete_extension**](docs/CorelliumApi.md#v1_delete_extension) | **DELETE** /v1/extensions/{extensionId} | Delete an existing extension -*CorelliumApi* | [**v1_delete_hook**](docs/CorelliumApi.md#v1_delete_hook) | **DELETE** /v1/hooks/{hookId} | Delete an existing hypervisor hook -*CorelliumApi* | [**v1_delete_image**](docs/CorelliumApi.md#v1_delete_image) | **DELETE** /v2/images/{imageId} | Delete Image -*CorelliumApi* | [**v1_delete_instance**](docs/CorelliumApi.md#v1_delete_instance) | **DELETE** /v1/instances/{instanceId} | Remove Instance -*CorelliumApi* | [**v1_delete_instance_snapshot**](docs/CorelliumApi.md#v1_delete_instance_snapshot) | **DELETE** /v1/instances/{instanceId}/snapshots/{snapshotId} | Delete an Instance Snapshot -*CorelliumApi* | [**v1_delete_network_connection**](docs/CorelliumApi.md#v1_delete_network_connection) | **DELETE** /v1/network/connections/{id} | Delete an existing Network Connection -*CorelliumApi* | [**v1_delete_project**](docs/CorelliumApi.md#v1_delete_project) | **DELETE** /v1/projects/{projectId} | Delete a Project -*CorelliumApi* | [**v1_delete_snapshot**](docs/CorelliumApi.md#v1_delete_snapshot) | **DELETE** /v1/snapshots/{snapshotId} | Delete a Snapshot -*CorelliumApi* | [**v1_delete_snapshot_permissions**](docs/CorelliumApi.md#v1_delete_snapshot_permissions) | **DELETE** /v1/snapshots/{snapshotId}/permissions | Delete member(s) -*CorelliumApi* | [**v1_delete_user**](docs/CorelliumApi.md#v1_delete_user) | **DELETE** /v1/users/{userId} | Delete User -*CorelliumApi* | [**v1_detach_instance_interface**](docs/CorelliumApi.md#v1_detach_instance_interface) | **DELETE** /v1/instances/{instanceId}/interfaces/{interfaceId} | Detach I/O Interface -*CorelliumApi* | [**v1_disable_expose_port**](docs/CorelliumApi.md#v1_disable_expose_port) | **POST** /v1/instances/{instanceId}/exposeport/disable | Disable an exposed port on an instance for device access. -*CorelliumApi* | [**v1_download_activity**](docs/CorelliumApi.md#v1_download_activity) | **GET** /v1/activity/export/{taskId}/download | Download activity -*CorelliumApi* | [**v1_enable_expose_port**](docs/CorelliumApi.md#v1_enable_expose_port) | **POST** /v1/instances/{instanceId}/exposeport/enable | Enable an exposed port on an instance for device access. -*CorelliumApi* | [**v1_execute_hyper_trace_hooks**](docs/CorelliumApi.md#v1_execute_hyper_trace_hooks) | **POST** /v1/instances/{instanceId}/hooks/execute | Execute Hooks on an instance -*CorelliumApi* | [**v1_get_activity_export_status**](docs/CorelliumApi.md#v1_get_activity_export_status) | **GET** /v1/activity/export/{taskId} | Get export task status -*CorelliumApi* | [**v1_get_activity_export_tasks**](docs/CorelliumApi.md#v1_get_activity_export_tasks) | **GET** /v1/activity/export | Get all export tasks for user -*CorelliumApi* | [**v1_get_config**](docs/CorelliumApi.md#v1_get_config) | **GET** /v1/config | Get all configs -*CorelliumApi* | [**v1_get_domain_auth_providers**](docs/CorelliumApi.md#v1_get_domain_auth_providers) | **GET** /v1/domain/{domainId}/auth | Return all configured auth providers for a domain (including globally configured providers) -*CorelliumApi* | [**v1_get_extension_by_id**](docs/CorelliumApi.md#v1_get_extension_by_id) | **GET** /v1/extensions/{extensionId} | Get extension by id -*CorelliumApi* | [**v1_get_extensions**](docs/CorelliumApi.md#v1_get_extensions) | **GET** /v1/extensions | Get all extensions -*CorelliumApi* | [**v1_get_hook_by_id**](docs/CorelliumApi.md#v1_get_hook_by_id) | **GET** /v1/hooks/{hookId} | Get hypervisor hook by id -*CorelliumApi* | [**v1_get_hooks**](docs/CorelliumApi.md#v1_get_hooks) | **GET** /v1/instances/{instanceId}/hooks | Get all hypervisor hooks for Instance -*CorelliumApi* | [**v1_get_image**](docs/CorelliumApi.md#v1_get_image) | **GET** /v1/images/{imageId} | Get Image Metadata -*CorelliumApi* | [**v1_get_images**](docs/CorelliumApi.md#v1_get_images) | **GET** /v1/images | Get all Images Metadata -*CorelliumApi* | [**v1_get_install_firmware_status**](docs/CorelliumApi.md#v1_get_install_firmware_status) | **GET** /v1/images/install-firmware/:taskId | Query install firmware request status. -*CorelliumApi* | [**v1_get_instance**](docs/CorelliumApi.md#v1_get_instance) | **GET** /v1/instances/{instanceId} | Get Instance -*CorelliumApi* | [**v1_get_instance_console**](docs/CorelliumApi.md#v1_get_instance_console) | **GET** /v1/instances/{instanceId}/console | Get console websocket URL -*CorelliumApi* | [**v1_get_instance_console_log**](docs/CorelliumApi.md#v1_get_instance_console_log) | **GET** /v1/instances/{instanceId}/consoleLog | Get Console Log -*CorelliumApi* | [**v1_get_instance_gpios**](docs/CorelliumApi.md#v1_get_instance_gpios) | **GET** /v1/instances/{instanceId}/gpios | Get Instance GPIOs -*CorelliumApi* | [**v1_get_instance_panics**](docs/CorelliumApi.md#v1_get_instance_panics) | **GET** /v1/instances/{instanceId}/panics | Get Panics -*CorelliumApi* | [**v1_get_instance_peripherals**](docs/CorelliumApi.md#v1_get_instance_peripherals) | **GET** /v1/instances/{instanceId}/peripherals | Get Instance Peripherals -*CorelliumApi* | [**v1_get_instance_screenshot**](docs/CorelliumApi.md#v1_get_instance_screenshot) | **GET** /v1/instances/{instanceId}/screenshot.{format} | Get Instance Screenshot -*CorelliumApi* | [**v1_get_instance_snapshot**](docs/CorelliumApi.md#v1_get_instance_snapshot) | **GET** /v1/instances/{instanceId}/snapshots/{snapshotId} | Get Instance Snapshot -*CorelliumApi* | [**v1_get_instance_snapshots**](docs/CorelliumApi.md#v1_get_instance_snapshots) | **GET** /v1/instances/{instanceId}/snapshots | Get Instance Snapshots -*CorelliumApi* | [**v1_get_instances**](docs/CorelliumApi.md#v1_get_instances) | **GET** /v1/instances | Get Instances -*CorelliumApi* | [**v1_get_model_software**](docs/CorelliumApi.md#v1_get_model_software) | **GET** /v1/models/{model}/software | Get Software for Model -*CorelliumApi* | [**v1_get_models**](docs/CorelliumApi.md#v1_get_models) | **GET** /v1/models | Get Supported Models -*CorelliumApi* | [**v1_get_network_connection**](docs/CorelliumApi.md#v1_get_network_connection) | **GET** /v1/network/connections/{id} | Return the configuration and per project statuses for a single network provider. -*CorelliumApi* | [**v1_get_project**](docs/CorelliumApi.md#v1_get_project) | **GET** /v1/projects/{projectId} | Get a Project -*CorelliumApi* | [**v1_get_project_instances**](docs/CorelliumApi.md#v1_get_project_instances) | **GET** /v1/projects/{projectId}/instances | Get Instances in Project -*CorelliumApi* | [**v1_get_project_keys**](docs/CorelliumApi.md#v1_get_project_keys) | **GET** /v1/projects/{projectId}/keys | Get Project Authorized Keys -*CorelliumApi* | [**v1_get_project_network_log**](docs/CorelliumApi.md#v1_get_project_network_log) | **GET** /v1/projects/{projectId}/network/log | Retrieve the network connection log for a project -*CorelliumApi* | [**v1_get_project_network_status**](docs/CorelliumApi.md#v1_get_project_network_status) | **GET** /v1/projects/{projectId}/network/status | Retrieve the network connection status for a project -*CorelliumApi* | [**v1_get_project_vpn_config**](docs/CorelliumApi.md#v1_get_project_vpn_config) | **GET** /v1/projects/{projectId}/vpnconfig/{format} | Get Project VPN Configuration -*CorelliumApi* | [**v1_get_projects**](docs/CorelliumApi.md#v1_get_projects) | **GET** /v1/projects | Get Projects -*CorelliumApi* | [**v1_get_reset_link_info**](docs/CorelliumApi.md#v1_get_reset_link_info) | **GET** /v1/users/reset-link-info | Send Password Reset Link Info -*CorelliumApi* | [**v1_get_shared_snapshots**](docs/CorelliumApi.md#v1_get_shared_snapshots) | **GET** /v1/snapshots/shared | Fetch shared snapshots -*CorelliumApi* | [**v1_get_snapshot**](docs/CorelliumApi.md#v1_get_snapshot) | **GET** /v1/snapshots/{snapshotId} | Get Snapshot -*CorelliumApi* | [**v1_install_firmware**](docs/CorelliumApi.md#v1_install_firmware) | **POST** /v1/images/install-firmware | Installs a firmware for cluster-wide use -*CorelliumApi* | [**v1_instances_instance_id_message_post**](docs/CorelliumApi.md#v1_instances_instance_id_message_post) | **POST** /v1/instances/{instanceId}/message | Inject a message into an iOS VM -*CorelliumApi* | [**v1_instances_instance_id_netdump_pcap_get**](docs/CorelliumApi.md#v1_instances_instance_id_netdump_pcap_get) | **GET** /v1/instances/{instanceId}/netdump.pcap | Download a netdump pcap file -*CorelliumApi* | [**v1_instances_instance_id_network_monitor_pcap_get**](docs/CorelliumApi.md#v1_instances_instance_id_network_monitor_pcap_get) | **GET** /v1/instances/{instanceId}/networkMonitor.pcap | Download a Network Monitor pcap file -*CorelliumApi* | [**v1_kcrange**](docs/CorelliumApi.md#v1_kcrange) | **GET** /v1/instances/{instanceId}/btrace-kcrange | Get Kernel extension ranges -*CorelliumApi* | [**v1_list_network_connections**](docs/CorelliumApi.md#v1_list_network_connections) | **GET** /v1/network/connections | List available network connections -*CorelliumApi* | [**v1_list_network_interfaces**](docs/CorelliumApi.md#v1_list_network_interfaces) | **GET** /v1/network/interfaces | List available physical network interfaces -*CorelliumApi* | [**v1_list_network_providers**](docs/CorelliumApi.md#v1_list_network_providers) | **GET** /v1/network/providers | List available network providers -*CorelliumApi* | [**v1_list_threads**](docs/CorelliumApi.md#v1_list_threads) | **GET** /v1/instances/{instanceId}/strace/thread-list | Get Running Threads (CoreTrace) -*CorelliumApi* | [**v1_load_extension**](docs/CorelliumApi.md#v1_load_extension) | **POST** /v1/extensions | Load an extension -*CorelliumApi* | [**v1_media_play**](docs/CorelliumApi.md#v1_media_play) | **POST** /v1/instances/{instanceId}/media/play | Start playing media -*CorelliumApi* | [**v1_media_stop**](docs/CorelliumApi.md#v1_media_stop) | **POST** /v1/instances/{instanceId}/media/stop | Stop playing media -*CorelliumApi* | [**v1_parse_extension_json**](docs/CorelliumApi.md#v1_parse_extension_json) | **POST** /v1/extensions/parse/extension.json | Validates extension.json -*CorelliumApi* | [**v1_partial_update_network_connection**](docs/CorelliumApi.md#v1_partial_update_network_connection) | **PATCH** /v1/network/connections/{id} | Update Network Connection (partial) -*CorelliumApi* | [**v1_patch_instance**](docs/CorelliumApi.md#v1_patch_instance) | **PATCH** /v1/instances/{instanceId} | Update Instance -*CorelliumApi* | [**v1_patch_instance_read_only**](docs/CorelliumApi.md#v1_patch_instance_read_only) | **PATCH** /v1/instances/{instanceId}/read-only | Update Instance Read Only -*CorelliumApi* | [**v1_pause_instance**](docs/CorelliumApi.md#v1_pause_instance) | **POST** /v1/instances/{instanceId}/pause | Pause an Instance -*CorelliumApi* | [**v1_post_instance_input**](docs/CorelliumApi.md#v1_post_instance_input) | **POST** /v1/instances/{instanceId}/input | Provide Instance Input -*CorelliumApi* | [**v1_ready**](docs/CorelliumApi.md#v1_ready) | **GET** /v1/ready | API Status -*CorelliumApi* | [**v1_reboot_instance**](docs/CorelliumApi.md#v1_reboot_instance) | **POST** /v1/instances/{instanceId}/reboot | Reboot an Instance -*CorelliumApi* | [**v1_remove_project_key**](docs/CorelliumApi.md#v1_remove_project_key) | **DELETE** /v1/projects/{projectId}/keys/{keyId} | Delete Project Authorized Key -*CorelliumApi* | [**v1_remove_team_role_from_project**](docs/CorelliumApi.md#v1_remove_team_role_from_project) | **DELETE** /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Remove team role from project -*CorelliumApi* | [**v1_remove_user_from_team**](docs/CorelliumApi.md#v1_remove_user_from_team) | **DELETE** /v1/teams/{teamId}/users/{userId} | Remove user from team -*CorelliumApi* | [**v1_remove_user_role_from_project**](docs/CorelliumApi.md#v1_remove_user_role_from_project) | **DELETE** /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Remove user role from project -*CorelliumApi* | [**v1_rename_instance_snapshot**](docs/CorelliumApi.md#v1_rename_instance_snapshot) | **PATCH** /v1/instances/{instanceId}/snapshots/{snapshotId} | Rename an Instance Snapshot -*CorelliumApi* | [**v1_reset_user_password**](docs/CorelliumApi.md#v1_reset_user_password) | **POST** /v1/users/reset-password | Reset User Password -*CorelliumApi* | [**v1_restore_backup**](docs/CorelliumApi.md#v1_restore_backup) | **POST** /v1/instances/{instanceId}/restoreBackup | Restore backup -*CorelliumApi* | [**v1_restore_instance_snapshot**](docs/CorelliumApi.md#v1_restore_instance_snapshot) | **POST** /v1/instances/{instanceId}/snapshots/{snapshotId}/restore | Restore an Instance Snapshot -*CorelliumApi* | [**v1_roles**](docs/CorelliumApi.md#v1_roles) | **GET** /v1/roles | Get all roles -*CorelliumApi* | [**v1_rotate_instance**](docs/CorelliumApi.md#v1_rotate_instance) | **POST** /v1/instances/{instanceId}/rotate | Rotate device to specified orientation -*CorelliumApi* | [**v1_send_user_reset_link**](docs/CorelliumApi.md#v1_send_user_reset_link) | **POST** /v1/users/send-reset-link | Send Password Reset Link -*CorelliumApi* | [**v1_set_instance_gpios**](docs/CorelliumApi.md#v1_set_instance_gpios) | **PUT** /v1/instances/{instanceId}/gpios | Set Instance GPIOs -*CorelliumApi* | [**v1_set_instance_peripherals**](docs/CorelliumApi.md#v1_set_instance_peripherals) | **PUT** /v1/instances/{instanceId}/peripherals | Set Instance Peripherals -*CorelliumApi* | [**v1_set_instance_state**](docs/CorelliumApi.md#v1_set_instance_state) | **PUT** /v1/instances/{instanceId}/state | Set state of Instance -*CorelliumApi* | [**v1_set_snapshot_permissions**](docs/CorelliumApi.md#v1_set_snapshot_permissions) | **POST** /v1/snapshots/{snapshotId}/permissions | Set member list -*CorelliumApi* | [**v1_share_snapshot**](docs/CorelliumApi.md#v1_share_snapshot) | **POST** /v1/snapshots/{snapshotId}/share | Share snapshot -*CorelliumApi* | [**v1_snapshot_rename**](docs/CorelliumApi.md#v1_snapshot_rename) | **PATCH** /v1/snapshots/{snapshotId} | Rename a Snapshot -*CorelliumApi* | [**v1_start_core_trace**](docs/CorelliumApi.md#v1_start_core_trace) | **POST** /v1/instances/{instanceId}/strace/enable | Start CoreTrace on an instance -*CorelliumApi* | [**v1_start_hyper_trace**](docs/CorelliumApi.md#v1_start_hyper_trace) | **POST** /v1/instances/{instanceId}/btrace/enable | Start HyperTrace on an instance -*CorelliumApi* | [**v1_start_instance**](docs/CorelliumApi.md#v1_start_instance) | **POST** /v1/instances/{instanceId}/start | Start an Instance -*CorelliumApi* | [**v1_start_netdump**](docs/CorelliumApi.md#v1_start_netdump) | **POST** /v1/instances/{instanceId}/netdump/enable | Start Enhanced Network Monitor on an instance. -*CorelliumApi* | [**v1_start_network_monitor**](docs/CorelliumApi.md#v1_start_network_monitor) | **POST** /v1/instances/{instanceId}/sslsplit/enable | Start Network Monitor on an instance. -*CorelliumApi* | [**v1_stop_core_trace**](docs/CorelliumApi.md#v1_stop_core_trace) | **POST** /v1/instances/{instanceId}/strace/disable | Stop CoreTrace on an instance. -*CorelliumApi* | [**v1_stop_hyper_trace**](docs/CorelliumApi.md#v1_stop_hyper_trace) | **POST** /v1/instances/{instanceId}/btrace/disable | Stop HyperTrace on an instance. -*CorelliumApi* | [**v1_stop_instance**](docs/CorelliumApi.md#v1_stop_instance) | **POST** /v1/instances/{instanceId}/stop | Stop an Instance -*CorelliumApi* | [**v1_stop_netdump**](docs/CorelliumApi.md#v1_stop_netdump) | **POST** /v1/instances/{instanceId}/netdump/disable | Stop Enhanced Network Monitor on an instance. -*CorelliumApi* | [**v1_stop_network_monitor**](docs/CorelliumApi.md#v1_stop_network_monitor) | **POST** /v1/instances/{instanceId}/sslsplit/disable | Stop Network Monitor on an instance. -*CorelliumApi* | [**v1_team_change**](docs/CorelliumApi.md#v1_team_change) | **PATCH** /v1/teams/{teamId} | Update team -*CorelliumApi* | [**v1_team_create**](docs/CorelliumApi.md#v1_team_create) | **POST** /v1/teams | Create team -*CorelliumApi* | [**v1_team_delete**](docs/CorelliumApi.md#v1_team_delete) | **DELETE** /v1/teams/{teamId} | Delete team -*CorelliumApi* | [**v1_teams**](docs/CorelliumApi.md#v1_teams) | **GET** /v1/teams | Get teams -*CorelliumApi* | [**v1_unpause_instance**](docs/CorelliumApi.md#v1_unpause_instance) | **POST** /v1/instances/{instanceId}/unpause | Unpause an Instance -*CorelliumApi* | [**v1_update_domain_auth_provider**](docs/CorelliumApi.md#v1_update_domain_auth_provider) | **PUT** /v1/domain/{domainId}/auth/{providerId} | Update an auth provider for a domain -*CorelliumApi* | [**v1_update_extension**](docs/CorelliumApi.md#v1_update_extension) | **PUT** /v1/extensions/{extensionId} | Update an existing extension -*CorelliumApi* | [**v1_update_hook**](docs/CorelliumApi.md#v1_update_hook) | **PUT** /v1/hooks/{hookId} | Update an existing hypervisor hook -*CorelliumApi* | [**v1_update_network_connection**](docs/CorelliumApi.md#v1_update_network_connection) | **PUT** /v1/network/connections/{id} | Update Network Connection -*CorelliumApi* | [**v1_update_project**](docs/CorelliumApi.md#v1_update_project) | **PATCH** /v1/projects/{projectId} | Update a Project -*CorelliumApi* | [**v1_update_project_settings**](docs/CorelliumApi.md#v1_update_project_settings) | **PATCH** /v1/projects/{projectId}/settings | Change Project Settings -*CorelliumApi* | [**v1_update_user**](docs/CorelliumApi.md#v1_update_user) | **PATCH** /v1/users/{userId} | Update User -*CorelliumApi* | [**v1_upgrade_instance**](docs/CorelliumApi.md#v1_upgrade_instance) | **POST** /v1/instances/{instanceId}/upgrade | Upgrade iOS version -*CorelliumApi* | [**v1_upload_image_data**](docs/CorelliumApi.md#v1_upload_image_data) | **POST** /v1/images/{imageId} | Upload Image Data -*CorelliumApi* | [**v1_user_agree_terms**](docs/CorelliumApi.md#v1_user_agree_terms) | **POST** /v1/users/agree | Consent to the current terms and conditions -*CorelliumApi* | [**v1_users_change_password_post**](docs/CorelliumApi.md#v1_users_change_password_post) | **POST** /v1/users/change-password | Change User Password -*CorelliumApi* | [**v1_users_login**](docs/CorelliumApi.md#v1_users_login) | **POST** /v1/users/login | Log In -*CorelliumApi* | [**v1_web_player_allowed_domains**](docs/CorelliumApi.md#v1_web_player_allowed_domains) | **GET** /v1/webplayer/allowedDomains | Retrieve the list of allowed domains for all Webplayer sessions -*CorelliumApi* | [**v1_web_player_create_session**](docs/CorelliumApi.md#v1_web_player_create_session) | **POST** /v1/webplayer | Create a new Webplayer Session -*CorelliumApi* | [**v1_web_player_destroy_session**](docs/CorelliumApi.md#v1_web_player_destroy_session) | **DELETE** /v1/webplayer/{sessionId} | Tear down a Webplayer Session -*CorelliumApi* | [**v1_web_player_list_sessions**](docs/CorelliumApi.md#v1_web_player_list_sessions) | **GET** /v1/webplayer | List all Webplayer sessions -*CorelliumApi* | [**v1_web_player_session_info**](docs/CorelliumApi.md#v1_web_player_session_info) | **GET** /v1/webplayer/{sessionId} | Retrieve Webplayer Session Information -*CorelliumApi* | [**v2_get_instance_quick_connect_command**](docs/CorelliumApi.md#v2_get_instance_quick_connect_command) | **GET** /v2/instances/{instanceId}/quickConnectCommand | Recommended SSH Command for Quick Connect -*CorelliumApi* | [**v2_get_instance_state**](docs/CorelliumApi.md#v2_get_instance_state) | **GET** /v2/instances/{instanceId}/state | Get state of Instance +*ActivityApi* | [**v3_create_activity_export**](docs/ActivityApi.md#v3_create_activity_export) | **POST** /v3/activity/export | Start activity export +*ActivityApi* | [**v3_download_activity**](docs/ActivityApi.md#v3_download_activity) | **GET** /v3/activity/export/{taskId}/download | Download activity for a given task +*ActivityApi* | [**v3_get_activity_export_status**](docs/ActivityApi.md#v3_get_activity_export_status) | **GET** /v3/activity/export/{taskId} | Get export task status +*ActivityApi* | [**v3_get_activity_export_tasks**](docs/ActivityApi.md#v3_get_activity_export_tasks) | **GET** /v3/activity/export | Get all export tasks for user +*ActivityApi* | [**v3_list_activities**](docs/ActivityApi.md#v3_list_activities) | **GET** /v3/activity | Get resource activities +*ActivityV1Api* | [**v1_activity_export**](docs/ActivityV1Api.md#v1_activity_export) | **POST** /v1/activity/export | Start activity export +*ActivityV1Api* | [**v1_activity_list**](docs/ActivityV1Api.md#v1_activity_list) | **GET** /v1/activity | Get resource activities +*ActivityV1Api* | [**v1_download_activity**](docs/ActivityV1Api.md#v1_download_activity) | **GET** /v1/activity/export/{taskId}/download | Download activity +*ActivityV1Api* | [**v1_get_activity_export_status**](docs/ActivityV1Api.md#v1_get_activity_export_status) | **GET** /v1/activity/export/{taskId} | Get export task status +*ActivityV1Api* | [**v1_get_activity_export_tasks**](docs/ActivityV1Api.md#v1_get_activity_export_tasks) | **GET** /v1/activity/export | Get all export tasks for user +*AgentApi* | [**v3_delete_file_agent**](docs/AgentApi.md#v3_delete_file_agent) | **DELETE** /v3/instances/{instanceId}/agent/v1/file/device/{filePath} | Delete a file on VM +*AgentApi* | [**v3_get_adb_auth_agent**](docs/AgentApi.md#v3_get_adb_auth_agent) | **GET** /v3/instances/{instanceId}/agent/v1/system/adbauth | Get ADB auth setting +*AgentApi* | [**v3_get_app_ready_agent**](docs/AgentApi.md#v3_get_app_ready_agent) | **GET** /v3/instances/{instanceId}/agent/v1/app/ready | Check if app subsystem is ready +*AgentApi* | [**v3_get_container_health_agent**](docs/AgentApi.md#v3_get_container_health_agent) | **GET** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/is-healthy | Get container health +*AgentApi* | [**v3_get_file_agent**](docs/AgentApi.md#v3_get_file_agent) | **GET** /v3/instances/{instanceId}/agent/v1/file/device/{filePath} | Download a file from VM +*AgentApi* | [**v3_get_network_agent**](docs/AgentApi.md#v3_get_network_agent) | **GET** /v3/instances/{instanceId}/agent/v1/system/network | Get eth0 IP address +*AgentApi* | [**v3_get_prop_agent**](docs/AgentApi.md#v3_get_prop_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/getprop | Get a system property +*AgentApi* | [**v3_get_remote_it_status_agent**](docs/AgentApi.md#v3_get_remote_it_status_agent) | **GET** /v3/instances/{instanceId}/agent/v1/remoteit/status | Get Remote.It status +*AgentApi* | [**v3_get_temp_file_agent**](docs/AgentApi.md#v3_get_temp_file_agent) | **POST** /v3/instances/{instanceId}/agent/v1/file/temp | Get a temp file path on VM +*AgentApi* | [**v3_install_agent**](docs/AgentApi.md#v3_install_agent) | **POST** /v3/instances/{instanceId}/agent/v1/app/install | Install app at path +*AgentApi* | [**v3_install_open_gapps_agent**](docs/AgentApi.md#v3_install_open_gapps_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/install-opengapps | Install OpenGApps +*AgentApi* | [**v3_install_profile_agent**](docs/AgentApi.md#v3_install_profile_agent) | **POST** /v3/instances/{instanceId}/agent/v1/profile/install | Install a profile +*AgentApi* | [**v3_install_remote_it_agent**](docs/AgentApi.md#v3_install_remote_it_agent) | **POST** /v3/instances/{instanceId}/agent/v1/remoteit/install | Install Remote.It +*AgentApi* | [**v3_kill_app_agent**](docs/AgentApi.md#v3_kill_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill | Kill an app +*AgentApi* | [**v3_kill_frida_agent**](docs/AgentApi.md#v3_kill_frida_agent) | **POST** /v3/instances/{instanceId}/agent/v1/frida/run-frida-kill | Kill Frida +*AgentApi* | [**v3_list_app_icons_agent**](docs/AgentApi.md#v3_list_app_icons_agent) | **GET** /v3/instances/{instanceId}/agent/v1/app/icons | List app icons +*AgentApi* | [**v3_list_apps_agent**](docs/AgentApi.md#v3_list_apps_agent) | **GET** /v3/instances/{instanceId}/agent/v1/app/apps | List apps +*AgentApi* | [**v3_list_apps_status_agent**](docs/AgentApi.md#v3_list_apps_status_agent) | **GET** /v3/instances/{instanceId}/agent/v1/app/apps/update | List apps status +*AgentApi* | [**v3_list_containers_agent**](docs/AgentApi.md#v3_list_containers_agent) | **GET** /v3/instances/{instanceId}/agent/v1/container/containers | List containers +*AgentApi* | [**v3_list_frida_processes_agent**](docs/AgentApi.md#v3_list_frida_processes_agent) | **POST** /v3/instances/{instanceId}/agent/v1/frida/run-frida-ps | List Frida processes +*AgentApi* | [**v3_list_profiles_agent**](docs/AgentApi.md#v3_list_profiles_agent) | **GET** /v3/instances/{instanceId}/agent/v1/profile/profiles | List profiles +*AgentApi* | [**v3_lock_agent**](docs/AgentApi.md#v3_lock_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/lock | Lock device +*AgentApi* | [**v3_preauthorize_file_archive_download_agent**](docs/AgentApi.md#v3_preauthorize_file_archive_download_agent) | **POST** /v3/instances/{instanceId}/agent-authorize/v1/file/download | Pre-authorize an archive download from VM +*AgentApi* | [**v3_preauthorize_file_download_agent**](docs/AgentApi.md#v3_preauthorize_file_download_agent) | **POST** /v3/instances/{instanceId}/agent-authorize/v1/file/device/{filePath} | Pre-authorize a file download from VM +*AgentApi* | [**v3_run_app_agent**](docs/AgentApi.md#v3_run_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run | Run an app +*AgentApi* | [**v3_run_frida_agent**](docs/AgentApi.md#v3_run_frida_agent) | **POST** /v3/instances/{instanceId}/agent/v1/frida/run-frida | Run Frida +*AgentApi* | [**v3_set_adb_auth_agent**](docs/AgentApi.md#v3_set_adb_auth_agent) | **PUT** /v3/instances/{instanceId}/agent/v1/system/adbauth | Set ADB auth setting +*AgentApi* | [**v3_set_device_properties_agent**](docs/AgentApi.md#v3_set_device_properties_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/setDeviceProperties | Set device properties +*AgentApi* | [**v3_set_file_attributes_agent**](docs/AgentApi.md#v3_set_file_attributes_agent) | **PATCH** /v3/instances/{instanceId}/agent/v1/file/device/{filePath} | Change attributes of a file on VM +*AgentApi* | [**v3_set_hostname_agent**](docs/AgentApi.md#v3_set_hostname_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/setHostname | Set instance hostname +*AgentApi* | [**v3_shutdown_agent**](docs/AgentApi.md#v3_shutdown_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/shutdown | Shut down instance +*AgentApi* | [**v3_start_container_agent**](docs/AgentApi.md#v3_start_container_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start | Start a container +*AgentApi* | [**v3_start_container_app_agent**](docs/AgentApi.md#v3_start_container_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start-application/{packageName}/{activityName} | Start an app in a container +*AgentApi* | [**v3_start_container_app_monitored_agent**](docs/AgentApi.md#v3_start_container_app_monitored_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start-application-and-monitor/{packageName}/{activityName} | Start and monitor an app in a container +*AgentApi* | [**v3_stop_container_agent**](docs/AgentApi.md#v3_stop_container_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/stop | Stop a container +*AgentApi* | [**v3_stop_container_app_agent**](docs/AgentApi.md#v3_stop_container_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/stop-application-if-monitored | Stop a monitored app in a container +*AgentApi* | [**v3_uninstall_app_agent**](docs/AgentApi.md#v3_uninstall_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall | Uninstall an app +*AgentApi* | [**v3_uninstall_profile_agent**](docs/AgentApi.md#v3_uninstall_profile_agent) | **DELETE** /v3/instances/{instanceId}/agent/v1/profile/profiles/{profileId} | Uninstall a profile +*AgentApi* | [**v3_uninstall_remote_it_agent**](docs/AgentApi.md#v3_uninstall_remote_it_agent) | **POST** /v3/instances/{instanceId}/agent/v1/remoteit/uninstall | Uninstall Remote.It +*AgentApi* | [**v3_unlock_agent**](docs/AgentApi.md#v3_unlock_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/unlock | Unlock device +*AgentApi* | [**v3_upload_file_agent**](docs/AgentApi.md#v3_upload_file_agent) | **PUT** /v3/instances/{instanceId}/agent/v1/file/device/{filePath} | Upload a file to VM +*AgentV1Api* | [**v1_agent_app_ready**](docs/AgentV1Api.md#v1_agent_app_ready) | **GET** /v1/instances/{instanceId}/agent/v1/app/ready | Check if App subsystem is ready +*AgentV1Api* | [**v1_agent_delete_file**](docs/AgentV1Api.md#v1_agent_delete_file) | **DELETE** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Delete a File on VM +*AgentV1Api* | [**v1_agent_get_file**](docs/AgentV1Api.md#v1_agent_get_file) | **GET** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Download a File from VM +*AgentV1Api* | [**v1_agent_get_temp_filename**](docs/AgentV1Api.md#v1_agent_get_temp_filename) | **POST** /v1/instances/{instanceId}/agent/v1/file/temp | Get the path for a new temp file +*AgentV1Api* | [**v1_agent_install_app**](docs/AgentV1Api.md#v1_agent_install_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/install | Install App at path +*AgentV1Api* | [**v1_agent_install_profile**](docs/AgentV1Api.md#v1_agent_install_profile) | **POST** /v1/instances/{instanceId}/agent/v1/profile/install | Install a Profile to VM +*AgentV1Api* | [**v1_agent_kill_app**](docs/AgentV1Api.md#v1_agent_kill_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill | Kill an App +*AgentV1Api* | [**v1_agent_list_app_icons**](docs/AgentV1Api.md#v1_agent_list_app_icons) | **GET** /v1/instances/{instanceId}/agent/v1/app/icons | List App Icons +*AgentV1Api* | [**v1_agent_list_apps**](docs/AgentV1Api.md#v1_agent_list_apps) | **GET** /v1/instances/{instanceId}/agent/v1/app/apps | List Apps +*AgentV1Api* | [**v1_agent_list_apps_status**](docs/AgentV1Api.md#v1_agent_list_apps_status) | **GET** /v1/instances/{instanceId}/agent/v1/app/apps/update | List Apps Status +*AgentV1Api* | [**v1_agent_list_profiles**](docs/AgentV1Api.md#v1_agent_list_profiles) | **GET** /v1/instances/{instanceId}/agent/v1/profile/profiles | List Profiles +*AgentV1Api* | [**v1_agent_run_app**](docs/AgentV1Api.md#v1_agent_run_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run | Run an App +*AgentV1Api* | [**v1_agent_set_file_attributes**](docs/AgentV1Api.md#v1_agent_set_file_attributes) | **PATCH** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Change Attrs of a File on VM +*AgentV1Api* | [**v1_agent_system_get_adb_auth**](docs/AgentV1Api.md#v1_agent_system_get_adb_auth) | **GET** /v1/instances/{instanceId}/agent/v1/system/adbauth | Get ADB Auth Setting (AOSP only) +*AgentV1Api* | [**v1_agent_system_get_network**](docs/AgentV1Api.md#v1_agent_system_get_network) | **GET** /v1/instances/{instanceId}/agent/v1/system/network | Get IP of eth0 (AOSP only) +*AgentV1Api* | [**v1_agent_system_get_prop**](docs/AgentV1Api.md#v1_agent_system_get_prop) | **POST** /v1/instances/{instanceId}/agent/v1/system/getprop | Get System Property (AOSP only) +*AgentV1Api* | [**v1_agent_system_install_open_g_apps**](docs/AgentV1Api.md#v1_agent_system_install_open_g_apps) | **POST** /v1/instances/{instanceId}/agent/v1/system/install-opengapps | Install OpenGApps (AOSP only) +*AgentV1Api* | [**v1_agent_system_lock**](docs/AgentV1Api.md#v1_agent_system_lock) | **POST** /v1/instances/{instanceId}/agent/v1/system/lock | Lock Device (iOS Only) +*AgentV1Api* | [**v1_agent_system_set_adb_auth**](docs/AgentV1Api.md#v1_agent_system_set_adb_auth) | **PUT** /v1/instances/{instanceId}/agent/v1/system/adbauth | Set ADB Auth Setting (AOSP only) +*AgentV1Api* | [**v1_agent_system_set_hostname**](docs/AgentV1Api.md#v1_agent_system_set_hostname) | **POST** /v1/instances/{instanceId}/agent/v1/system/setHostname | Set Hostname of instance +*AgentV1Api* | [**v1_agent_system_shutdown**](docs/AgentV1Api.md#v1_agent_system_shutdown) | **POST** /v1/instances/{instanceId}/agent/v1/system/shutdown | Instruct VM to halt +*AgentV1Api* | [**v1_agent_system_unlock**](docs/AgentV1Api.md#v1_agent_system_unlock) | **POST** /v1/instances/{instanceId}/agent/v1/system/unlock | Unlock Device (iOS Only) +*AgentV1Api* | [**v1_agent_uninstall_app**](docs/AgentV1Api.md#v1_agent_uninstall_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall | Uninstall an App +*AgentV1Api* | [**v1_agent_uninstall_profile**](docs/AgentV1Api.md#v1_agent_uninstall_profile) | **DELETE** /v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId} | Uninstall a Profile from VM +*AgentV1Api* | [**v1_agent_upload_file**](docs/AgentV1Api.md#v1_agent_upload_file) | **PUT** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Upload a file to VM +*AuthenticationApi* | [**v3_auth_login**](docs/AuthenticationApi.md#v3_auth_login) | **POST** /v3/auth/login | Log in +*AuthenticationApi* | [**v3_auth_logout**](docs/AuthenticationApi.md#v3_auth_logout) | **POST** /v3/auth/logout | Log out +*AuthenticationApi* | [**v3_delete_api_token**](docs/AuthenticationApi.md#v3_delete_api_token) | **DELETE** /v3/auth/apitoken | Delete API token +*AuthenticationApi* | [**v3_fetch_auth_provider_metadata**](docs/AuthenticationApi.md#v3_fetch_auth_provider_metadata) | **GET** /v3/auth/providers/fetch-metadata | Fetch SAML metadata +*AuthenticationApi* | [**v3_generate_api_token**](docs/AuthenticationApi.md#v3_generate_api_token) | **POST** /v3/auth/apitoken | Generate API token +*AuthenticationApi* | [**v3_get_auth_provider_authorization_url**](docs/AuthenticationApi.md#v3_get_auth_provider_authorization_url) | **GET** /v3/auth/providers/{providerId}/authorization_url | Get provider authorization URL +*AuthenticationApi* | [**v3_get_auth_provider_callback**](docs/AuthenticationApi.md#v3_get_auth_provider_callback) | **GET** /v3/auth/providers/{providerId}/callback | Authentication provider callback (GET) +*AuthenticationApi* | [**v3_get_auth_provider_sp_metadata**](docs/AuthenticationApi.md#v3_get_auth_provider_sp_metadata) | **GET** /v3/auth/providers/{providerId}/spmetadata | Get service provider metadata +*AuthenticationApi* | [**v3_list_auth_provider_types**](docs/AuthenticationApi.md#v3_list_auth_provider_types) | **GET** /v3/auth/providers/types | List authentication provider types +*AuthenticationApi* | [**v3_list_auth_providers**](docs/AuthenticationApi.md#v3_list_auth_providers) | **GET** /v3/auth/providers | List authentication providers +*AuthenticationApi* | [**v3_post_auth_provider_callback**](docs/AuthenticationApi.md#v3_post_auth_provider_callback) | **POST** /v3/auth/providers/{providerId}/callback | Authentication provider callback (POST) +*AuthenticationV1Api* | [**v1_auth_login**](docs/AuthenticationV1Api.md#v1_auth_login) | **POST** /v1/auth/login | Log In +*AuthenticationV1Api* | [**v1_delete_api_token**](docs/AuthenticationV1Api.md#v1_delete_api_token) | **DELETE** /v1/auth/apitoken | Delete API token +*AuthenticationV1Api* | [**v1_generate_api_token**](docs/AuthenticationV1Api.md#v1_generate_api_token) | **POST** /v1/auth/apitoken | Generate API token +*BillingApi* | [**v3_cancel_subscription**](docs/BillingApi.md#v3_cancel_subscription) | **POST** /v3/billing/cancel | Cancel a subscription +*BillingApi* | [**v3_get_billing_summary**](docs/BillingApi.md#v3_get_billing_summary) | **GET** /v3/billing/summary | Get billing summary +*BillingApi* | [**v3_get_device_usage**](docs/BillingApi.md#v3_get_device_usage) | **GET** /v3/billing/usage | Get device usage +*BillingApi* | [**v3_get_metered_subscription_usage**](docs/BillingApi.md#v3_get_metered_subscription_usage) | **GET** /v3/billing/subscription/metered/usage | Get metered subscription usage +*BillingApi* | [**v3_get_subscription**](docs/BillingApi.md#v3_get_subscription) | **GET** /v3/billing/subscription | Get the current subscription +*BillingApi* | [**v3_subscribe_to_trial**](docs/BillingApi.md#v3_subscribe_to_trial) | **POST** /v3/billing/trials/subscribe | Subscribe to a trial +*BillingApi* | [**v3_uncancel_subscription**](docs/BillingApi.md#v3_uncancel_subscription) | **POST** /v3/billing/uncancel | Uncancel a subscription +*ClusterApi* | [**v3_delete_cluster_snapshot**](docs/ClusterApi.md#v3_delete_cluster_snapshot) | **DELETE** /v3/cluster/snapshots/{snapshotId} | Delete cluster snapshot +*ClusterApi* | [**v3_get_cluster_config**](docs/ClusterApi.md#v3_get_cluster_config) | **GET** /v3/cluster/config | Get cluster configuration +*ClusterApi* | [**v3_get_cluster_node**](docs/ClusterApi.md#v3_get_cluster_node) | **GET** /v3/cluster/nodes/{nodeId} | Get cluster node +*ClusterApi* | [**v3_get_cluster_node_console**](docs/ClusterApi.md#v3_get_cluster_node_console) | **GET** /v3/cluster/nodes/{nodeId}/console | Get node console websocket URL +*ClusterApi* | [**v3_get_cluster_snapshot**](docs/ClusterApi.md#v3_get_cluster_snapshot) | **GET** /v3/cluster/snapshots/{snapshotId} | Get cluster snapshot +*ClusterApi* | [**v3_list_cluster_nodes**](docs/ClusterApi.md#v3_list_cluster_nodes) | **GET** /v3/cluster/nodes | List cluster nodes +*ClusterApi* | [**v3_list_cluster_snapshots**](docs/ClusterApi.md#v3_list_cluster_snapshots) | **GET** /v3/cluster/snapshots | List cluster snapshots +*ClusterApi* | [**v3_patch_cluster_config**](docs/ClusterApi.md#v3_patch_cluster_config) | **PATCH** /v3/cluster/config | Update cluster configuration +*ClusterAdministrationConfigApi* | [**v1_get_cluster_config**](docs/ClusterAdministrationConfigApi.md#v1_get_cluster_config) | **GET** /v1/cluster/config | Get cluster configuration +*ClusterAdministrationConfigApi* | [**v1_patch_cluster_config**](docs/ClusterAdministrationConfigApi.md#v1_patch_cluster_config) | **PATCH** /v1/cluster/config | Update cluster configuration +*ClusterAdministrationFirmwareServiceApi* | [**v1_create_assets_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_create_assets_firmware_service) | **POST** /v1/cluster/firmware-service/firmware-assets | Add firmware assets via the firmware service +*ClusterAdministrationFirmwareServiceApi* | [**v1_create_image**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_create_image) | **POST** /v1/images | Create a new Image +*ClusterAdministrationFirmwareServiceApi* | [**v1_delete_asset_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_delete_asset_firmware_service) | **DELETE** /v1/cluster/firmware-service/firmware-assets/{assetURL} | Delete a firmware asset by its URL +*ClusterAdministrationFirmwareServiceApi* | [**v1_delete_firmware_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_delete_firmware_firmware_service) | **DELETE** /v1/cluster/firmware-service/firmwares/{filename} | Delete a firmware by filename from the firmware service +*ClusterAdministrationFirmwareServiceApi* | [**v1_get_asset_extended_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_get_asset_extended_firmware_service) | **GET** /v1/cluster/firmware-service/firmware-assets/{assetURL}/extended | Fetch extended firmware-asset details including instances and associated IPSWs +*ClusterAdministrationFirmwareServiceApi* | [**v1_get_config_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_get_config_firmware_service) | **GET** /v1/cluster/firmware-service/config | Fetch firmware service configuration +*ClusterAdministrationFirmwareServiceApi* | [**v1_get_install_firmware_status**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_get_install_firmware_status) | **GET** /v1/images/install-firmware/{taskId} | Query install firmware request status. +*ClusterAdministrationFirmwareServiceApi* | [**v1_install_firmware**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_install_firmware) | **POST** /v1/images/install-firmware | Installs a firmware for cluster-wide use +*ClusterAdministrationFirmwareServiceApi* | [**v1_install_firmware_assets**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_install_firmware_assets) | **POST** /v1/images/install-firmware-assets | Installs firmware assets for cluster-wide use +*ClusterAdministrationFirmwareServiceApi* | [**v1_list_assets_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_list_assets_firmware_service) | **GET** /v1/cluster/firmware-service/firmware-assets | Fetch firmware assets from the firmware service +*ClusterAdministrationFirmwareServiceApi* | [**v1_list_devices_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_list_devices_firmware_service) | **GET** /v1/cluster/firmware-service/devices | Fetch devices from the firmware service +*ClusterAdministrationFirmwareServiceApi* | [**v1_list_firmwares_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_list_firmwares_firmware_service) | **GET** /v1/cluster/firmware-service/firmwares | Fetch firmwares from the firmware service +*ClusterAdministrationFirmwareServiceApi* | [**v1_patch_config_firmware_service**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_patch_config_firmware_service) | **PATCH** /v1/cluster/firmware-service/config | Update firmware service configuration +*ClusterAdministrationFirmwareServiceApi* | [**v1_upload_image_data**](docs/ClusterAdministrationFirmwareServiceApi.md#v1_upload_image_data) | **POST** /v1/images/{imageId} | Upload Image Data +*ClusterAdministrationNodesApi* | [**v1_get_cluster_nodes**](docs/ClusterAdministrationNodesApi.md#v1_get_cluster_nodes) | **GET** /v1/cluster/nodes/{nodeId} | Get node details by ID +*ClusterAdministrationNodesApi* | [**v1_get_console_cluster_nodes**](docs/ClusterAdministrationNodesApi.md#v1_get_console_cluster_nodes) | **GET** /v1/cluster/nodes/{nodeId}/console | Access node console via SSH +*ClusterAdministrationNodesApi* | [**v1_list_cluster_nodes**](docs/ClusterAdministrationNodesApi.md#v1_list_cluster_nodes) | **GET** /v1/cluster/nodes | List servers in the cluster +*ClusterSnapshotsApi* | [**v1_delete_cluster_snapshot**](docs/ClusterSnapshotsApi.md#v1_delete_cluster_snapshot) | **DELETE** /v1/cluster/snapshots/{snapshotId} | Delete a Cluster Snapshot +*ClusterSnapshotsApi* | [**v1_get_cluster_snapshot**](docs/ClusterSnapshotsApi.md#v1_get_cluster_snapshot) | **GET** /v1/cluster/snapshots/{snapshotId} | Get Cluster Snapshot +*ClusterSnapshotsApi* | [**v1_get_cluster_snapshots**](docs/ClusterSnapshotsApi.md#v1_get_cluster_snapshots) | **GET** /v1/cluster/snapshots | Get Cluster Snapshots +*ConfigApi* | [**v3_get_config**](docs/ConfigApi.md#v3_get_config) | **GET** /v3/config | Get deployment configuration +*ConfigApi* | [**v3_get_version**](docs/ConfigApi.md#v3_get_version) | **GET** /v3/version | Get the platform version +*ConfigV1Api* | [**v1_get_config**](docs/ConfigV1Api.md#v1_get_config) | **GET** /v1/config | Get all configs +*CoreTraceApi* | [**v3_clear_core_trace**](docs/CoreTraceApi.md#v3_clear_core_trace) | **DELETE** /v3/instances/{instanceId}/strace | Clear CoreTrace output +*CoreTraceApi* | [**v3_list_threads**](docs/CoreTraceApi.md#v3_list_threads) | **GET** /v3/instances/{instanceId}/strace/thread-list | List running processes (CoreTrace) +*CoreTraceApi* | [**v3_start_core_trace**](docs/CoreTraceApi.md#v3_start_core_trace) | **POST** /v3/instances/{instanceId}/strace/enable | Start CoreTrace +*CoreTraceApi* | [**v3_stop_core_trace**](docs/CoreTraceApi.md#v3_stop_core_trace) | **POST** /v3/instances/{instanceId}/strace/disable | Stop CoreTrace +*CoreTraceApi* | [**v3_strace_preauthorize**](docs/CoreTraceApi.md#v3_strace_preauthorize) | **GET** /v3/instances/{instanceId}/strace-authorize | Get a CoreTrace download token +*CoreTraceV1Api* | [**v1_clear_core_trace**](docs/CoreTraceV1Api.md#v1_clear_core_trace) | **DELETE** /v1/instances/{instanceId}/strace | Clear CoreTrace logs +*CoreTraceV1Api* | [**v1_list_threads**](docs/CoreTraceV1Api.md#v1_list_threads) | **GET** /v1/instances/{instanceId}/strace/thread-list | Get Running Threads (CoreTrace) +*CoreTraceV1Api* | [**v1_start_core_trace**](docs/CoreTraceV1Api.md#v1_start_core_trace) | **POST** /v1/instances/{instanceId}/strace/enable | Start CoreTrace on an instance +*CoreTraceV1Api* | [**v1_stop_core_trace**](docs/CoreTraceV1Api.md#v1_stop_core_trace) | **POST** /v1/instances/{instanceId}/strace/disable | Stop CoreTrace on an instance. +*DomainApi* | [**v3_create_domain_welcome_message**](docs/DomainApi.md#v3_create_domain_welcome_message) | **POST** /v3/domain/welcome | Create a welcome message for a domain +*DomainApi* | [**v3_delete_domain_welcome_message**](docs/DomainApi.md#v3_delete_domain_welcome_message) | **DELETE** /v3/domain/welcome | Delete the welcome message for the authenticated user's domain +*DomainApi* | [**v3_get_domain_image_upload**](docs/DomainApi.md#v3_get_domain_image_upload) | **GET** /v3/domain/image-upload/{type}/{imageId}/{name} | Get image upload status +*DomainApi* | [**v3_get_domain_welcome_message**](docs/DomainApi.md#v3_get_domain_welcome_message) | **GET** /v3/domain/welcome | Get the welcome message for the authenticated user's domain +*DomainApi* | [**v3_list_domain_software**](docs/DomainApi.md#v3_list_domain_software) | **GET** /v3/domain/software | List domain-level firmware images +*DomainApi* | [**v3_patch_domain_welcome_message**](docs/DomainApi.md#v3_patch_domain_welcome_message) | **PATCH** /v3/domain/welcome | Update a welcome message for a domain +*DomainApi* | [**v3_put_domain_image_upload**](docs/DomainApi.md#v3_put_domain_image_upload) | **PUT** /v3/domain/image-upload/{type}/{imageId}/{name} | Upload image chunk +*DomainAuthProviderApi* | [**v1_create_domain_auth_provider**](docs/DomainAuthProviderApi.md#v1_create_domain_auth_provider) | **POST** /v1/domain/{domainId}/auth | Create a new auth provider for a domain +*DomainAuthProviderApi* | [**v1_delete_domain_auth_provider**](docs/DomainAuthProviderApi.md#v1_delete_domain_auth_provider) | **DELETE** /v1/domain/{domainId}/auth/{providerId} | Delete an auth provider from a domain +*DomainAuthProviderApi* | [**v1_get_domain_auth_providers**](docs/DomainAuthProviderApi.md#v1_get_domain_auth_providers) | **GET** /v1/domain/{domainId}/auth | Return all configured auth providers for a domain (including globally configured providers) +*DomainAuthProviderApi* | [**v1_update_domain_auth_provider**](docs/DomainAuthProviderApi.md#v1_update_domain_auth_provider) | **PUT** /v1/domain/{domainId}/auth/{providerId} | Update an auth provider for a domain +*DomainAuthProvidersApi* | [**v3_create_domain_auth_provider**](docs/DomainAuthProvidersApi.md#v3_create_domain_auth_provider) | **POST** /v3/domain/{domainId}/auth | Create a new auth provider for a domain +*DomainAuthProvidersApi* | [**v3_delete_domain_auth_provider**](docs/DomainAuthProvidersApi.md#v3_delete_domain_auth_provider) | **DELETE** /v3/domain/{domainId}/auth/{providerId} | Delete an auth provider from a domain +*DomainAuthProvidersApi* | [**v3_list_domain_auth_providers**](docs/DomainAuthProvidersApi.md#v3_list_domain_auth_providers) | **GET** /v3/domain/{domainId}/auth | Return all configured auth providers for a domain (including globally configured providers) +*DomainAuthProvidersApi* | [**v3_patch_domain_auth_provider**](docs/DomainAuthProvidersApi.md#v3_patch_domain_auth_provider) | **PATCH** /v3/domain/{domainId}/auth/{providerId} | Partially update an auth provider for a domain +*DomainAuthProvidersApi* | [**v3_update_domain_auth_provider**](docs/DomainAuthProvidersApi.md#v3_update_domain_auth_provider) | **PUT** /v3/domain/{domainId}/auth/{providerId} | Update an auth provider for a domain +*DomainV1Api* | [**v1_create_domain_welcome_message**](docs/DomainV1Api.md#v1_create_domain_welcome_message) | **POST** /v1/domain/welcome | Create a welcome message for a domain +*DomainV1Api* | [**v1_delete_domain_welcome_message**](docs/DomainV1Api.md#v1_delete_domain_welcome_message) | **DELETE** /v1/domain/welcome | Delete the welcome message for the authenticated user's domain +*DomainV1Api* | [**v1_get_domain_welcome_message**](docs/DomainV1Api.md#v1_get_domain_welcome_message) | **GET** /v1/domain/welcome | Get the welcome message for the authenticated user's domain +*DomainV1Api* | [**v1_update_domain_welcome_message**](docs/DomainV1Api.md#v1_update_domain_welcome_message) | **PATCH** /v1/domain/welcome | Update a welcome message for a domain +*ExtensionsApi* | [**v3_delete_extension**](docs/ExtensionsApi.md#v3_delete_extension) | **DELETE** /v3/extensions/{extensionId} | Delete an existing extension +*ExtensionsApi* | [**v3_get_extension_by_id**](docs/ExtensionsApi.md#v3_get_extension_by_id) | **GET** /v3/extensions/{extensionId} | Get extension by ID +*ExtensionsApi* | [**v3_list_extensions**](docs/ExtensionsApi.md#v3_list_extensions) | **GET** /v3/extensions | List all extensions +*ExtensionsApi* | [**v3_load_extension**](docs/ExtensionsApi.md#v3_load_extension) | **POST** /v3/extensions | Load an extension +*ExtensionsApi* | [**v3_parse_extension_json**](docs/ExtensionsApi.md#v3_parse_extension_json) | **POST** /v3/extensions/parse/extension.json | Validates extension.json +*ExtensionsApi* | [**v3_update_extension**](docs/ExtensionsApi.md#v3_update_extension) | **PUT** /v3/extensions/{extensionId} | Update an existing extension +*ExtensionsV1Api* | [**v1_delete_extension**](docs/ExtensionsV1Api.md#v1_delete_extension) | **DELETE** /v1/extensions/{extensionId} | Delete an existing extension +*ExtensionsV1Api* | [**v1_get_extension_by_id**](docs/ExtensionsV1Api.md#v1_get_extension_by_id) | **GET** /v1/extensions/{extensionId} | Get extension by id +*ExtensionsV1Api* | [**v1_get_extensions**](docs/ExtensionsV1Api.md#v1_get_extensions) | **GET** /v1/extensions | Get all extensions +*ExtensionsV1Api* | [**v1_load_extension**](docs/ExtensionsV1Api.md#v1_load_extension) | **POST** /v1/extensions | Load an extension +*ExtensionsV1Api* | [**v1_parse_extension_json**](docs/ExtensionsV1Api.md#v1_parse_extension_json) | **POST** /v1/extensions/parse/extension.json | Validates extension.json +*ExtensionsV1Api* | [**v1_update_extension**](docs/ExtensionsV1Api.md#v1_update_extension) | **PUT** /v1/extensions/{extensionId} | Update an existing extension +*ExternalServicesApi* | [**delete_external_service**](docs/ExternalServicesApi.md#delete_external_service) | **DELETE** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a DELETE request to an external service +*ExternalServicesApi* | [**get_external_service**](docs/ExternalServicesApi.md#get_external_service) | **GET** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a GET request to an external service +*ExternalServicesApi* | [**patch_external_service**](docs/ExternalServicesApi.md#patch_external_service) | **PATCH** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a PATCH request to an external service +*ExternalServicesApi* | [**post_external_service**](docs/ExternalServicesApi.md#post_external_service) | **POST** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a POST request to an external service +*ExternalServicesApi* | [**put_external_service**](docs/ExternalServicesApi.md#put_external_service) | **PUT** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a PUT request to an external service +*FirmwareServiceApi* | [**v3_create_firmware_assets**](docs/FirmwareServiceApi.md#v3_create_firmware_assets) | **POST** /v3/cluster/firmware-service/firmware-assets | Add firmware assets +*FirmwareServiceApi* | [**v3_delete_firmware**](docs/FirmwareServiceApi.md#v3_delete_firmware) | **DELETE** /v3/cluster/firmware-service/firmwares/{filename} | Delete a firmware +*FirmwareServiceApi* | [**v3_delete_firmware_asset**](docs/FirmwareServiceApi.md#v3_delete_firmware_asset) | **DELETE** /v3/cluster/firmware-service/firmware-assets/{assetUrl} | Delete a firmware asset +*FirmwareServiceApi* | [**v3_get_firmware_asset_extended**](docs/FirmwareServiceApi.md#v3_get_firmware_asset_extended) | **GET** /v3/cluster/firmware-service/firmware-assets/{assetUrl}/extended | Get extended firmware asset info +*FirmwareServiceApi* | [**v3_get_firmware_service_config**](docs/FirmwareServiceApi.md#v3_get_firmware_service_config) | **GET** /v3/cluster/firmware-service/config | Get firmware service configuration +*FirmwareServiceApi* | [**v3_list_firmware_assets**](docs/FirmwareServiceApi.md#v3_list_firmware_assets) | **GET** /v3/cluster/firmware-service/firmware-assets | List firmware assets +*FirmwareServiceApi* | [**v3_list_firmware_devices**](docs/FirmwareServiceApi.md#v3_list_firmware_devices) | **GET** /v3/cluster/firmware-service/devices | List firmware service devices +*FirmwareServiceApi* | [**v3_list_firmwares**](docs/FirmwareServiceApi.md#v3_list_firmwares) | **GET** /v3/cluster/firmware-service/firmwares | List firmwares +*FirmwareServiceApi* | [**v3_patch_firmware_service_config**](docs/FirmwareServiceApi.md#v3_patch_firmware_service_config) | **PATCH** /v3/cluster/firmware-service/config | Update firmware service configuration +*FlavorsApi* | [**v3_get_frame**](docs/FlavorsApi.md#v3_get_frame) | **GET** /v3/flavors/{flavorId} | Get the device frame layout for a model +*FlavorsApi* | [**v3_get_frame_image**](docs/FlavorsApi.md#v3_get_frame_image) | **GET** /v3/flavors/{flavorId}/image | Get the device frame image for a model +*FlavorsApi* | [**v3_get_product_image**](docs/FlavorsApi.md#v3_get_product_image) | **GET** /v3/flavors/{flavorId}/productimage | Get the product image for a model +*HyperTraceApi* | [**v3_btrace_preauthorize**](docs/HyperTraceApi.md#v3_btrace_preauthorize) | **GET** /v3/instances/{instanceId}/btrace-authorize | Get a HyperTrace download token +*HyperTraceApi* | [**v3_clear_hyper_trace**](docs/HyperTraceApi.md#v3_clear_hyper_trace) | **DELETE** /v3/instances/{instanceId}/btrace | Clear HyperTrace output +*HyperTraceApi* | [**v3_get_instance_kcrange**](docs/HyperTraceApi.md#v3_get_instance_kcrange) | **GET** /v3/instances/{instanceId}/btrace-kcrange | List kernel extension address ranges +*HyperTraceApi* | [**v3_start_hyper_trace**](docs/HyperTraceApi.md#v3_start_hyper_trace) | **POST** /v3/instances/{instanceId}/btrace/enable | Start HyperTrace +*HyperTraceApi* | [**v3_stop_hyper_trace**](docs/HyperTraceApi.md#v3_stop_hyper_trace) | **POST** /v3/instances/{instanceId}/btrace/disable | Stop HyperTrace +*HyperTraceV1Api* | [**v1_btrace_preauthorize**](docs/HyperTraceV1Api.md#v1_btrace_preauthorize) | **GET** /v1/instances/{instanceId}/btrace-authorize | Pre-authorize an btrace download +*HyperTraceV1Api* | [**v1_clear_hyper_trace**](docs/HyperTraceV1Api.md#v1_clear_hyper_trace) | **DELETE** /v1/instances/{instanceId}/btrace | Clear HyperTrace logs +*HyperTraceV1Api* | [**v1_kcrange**](docs/HyperTraceV1Api.md#v1_kcrange) | **GET** /v1/instances/{instanceId}/btrace-kcrange | Get Kernel extension ranges +*HyperTraceV1Api* | [**v1_start_hyper_trace**](docs/HyperTraceV1Api.md#v1_start_hyper_trace) | **POST** /v1/instances/{instanceId}/btrace/enable | Start HyperTrace on an instance +*HyperTraceV1Api* | [**v1_stop_hyper_trace**](docs/HyperTraceV1Api.md#v1_stop_hyper_trace) | **POST** /v1/instances/{instanceId}/btrace/disable | Stop HyperTrace on an instance. +*HypertuneApi* | [**v3_hypertune_hash**](docs/HypertuneApi.md#v3_hypertune_hash) | **GET** /v3/hypertune/hash | Get Hypertune state hash +*HypertuneApi* | [**v3_hypertune_init**](docs/HypertuneApi.md#v3_hypertune_init) | **GET** /v3/hypertune/init | Get Hypertune initialization data +*HypervisorHooksApi* | [**v3_clear_hyper_trace_hooks**](docs/HypervisorHooksApi.md#v3_clear_hyper_trace_hooks) | **POST** /v3/instances/{instanceId}/hooks/clear | Stop hypervisor hooks +*HypervisorHooksApi* | [**v3_create_hook**](docs/HypervisorHooksApi.md#v3_create_hook) | **POST** /v3/instances/{instanceId}/hooks | Create a hypervisor hook for an instance +*HypervisorHooksApi* | [**v3_delete_hook**](docs/HypervisorHooksApi.md#v3_delete_hook) | **DELETE** /v3/hooks/{hookId} | Delete a hypervisor hook +*HypervisorHooksApi* | [**v3_execute_hyper_trace_hooks**](docs/HypervisorHooksApi.md#v3_execute_hyper_trace_hooks) | **POST** /v3/instances/{instanceId}/hooks/execute | Run hypervisor hooks +*HypervisorHooksApi* | [**v3_get_hook**](docs/HypervisorHooksApi.md#v3_get_hook) | **GET** /v3/hooks/{hookId} | Get a hypervisor hook by ID +*HypervisorHooksApi* | [**v3_list_hooks**](docs/HypervisorHooksApi.md#v3_list_hooks) | **GET** /v3/instances/{instanceId}/hooks | List hypervisor hooks for an instance +*HypervisorHooksApi* | [**v3_update_hook**](docs/HypervisorHooksApi.md#v3_update_hook) | **PUT** /v3/hooks/{hookId} | Update a hypervisor hook +*HypervisorHooksV1Api* | [**v1_clear_hyper_trace_hooks**](docs/HypervisorHooksV1Api.md#v1_clear_hyper_trace_hooks) | **POST** /v1/instances/{instanceId}/hooks/clear | Clear Hooks on an instance +*HypervisorHooksV1Api* | [**v1_create_hook**](docs/HypervisorHooksV1Api.md#v1_create_hook) | **POST** /v1/instances/{instanceId}/hooks | Create hypervisor hook for Instance +*HypervisorHooksV1Api* | [**v1_delete_hook**](docs/HypervisorHooksV1Api.md#v1_delete_hook) | **DELETE** /v1/hooks/{hookId} | Delete an existing hypervisor hook +*HypervisorHooksV1Api* | [**v1_execute_hyper_trace_hooks**](docs/HypervisorHooksV1Api.md#v1_execute_hyper_trace_hooks) | **POST** /v1/instances/{instanceId}/hooks/execute | Execute Hooks on an instance +*HypervisorHooksV1Api* | [**v1_get_hook_by_id**](docs/HypervisorHooksV1Api.md#v1_get_hook_by_id) | **GET** /v1/hooks/{hookId} | Get hypervisor hook by id +*HypervisorHooksV1Api* | [**v1_get_hooks**](docs/HypervisorHooksV1Api.md#v1_get_hooks) | **GET** /v1/instances/{instanceId}/hooks | Get all hypervisor hooks for Instance +*HypervisorHooksV1Api* | [**v1_update_hook**](docs/HypervisorHooksV1Api.md#v1_update_hook) | **PUT** /v1/hooks/{hookId} | Update an existing hypervisor hook +*ImagesApi* | [**v3_create_image**](docs/ImagesApi.md#v3_create_image) | **POST** /v3/images | Create an image +*ImagesApi* | [**v3_delete_image**](docs/ImagesApi.md#v3_delete_image) | **DELETE** /v3/images/{imageId} | Delete an image +*ImagesApi* | [**v3_get_image**](docs/ImagesApi.md#v3_get_image) | **GET** /v3/images/{imageId} | Get image metadata +*ImagesApi* | [**v3_get_image_chunk**](docs/ImagesApi.md#v3_get_image_chunk) | **GET** /v3/images/{imageId}/file | Check whether an image chunk was already uploaded +*ImagesApi* | [**v3_get_image_firmware_info**](docs/ImagesApi.md#v3_get_image_firmware_info) | **POST** /v3/images/{imageId}/fwinfo | Get firmware info embedded in an image +*ImagesApi* | [**v3_get_install_firmware_status**](docs/ImagesApi.md#v3_get_install_firmware_status) | **GET** /v3/images/install-firmware/{taskId} | Get install-firmware task status +*ImagesApi* | [**v3_install_firmware**](docs/ImagesApi.md#v3_install_firmware) | **POST** /v3/images/install-firmware | Install firmware cluster-wide +*ImagesApi* | [**v3_install_firmware_assets**](docs/ImagesApi.md#v3_install_firmware_assets) | **POST** /v3/images/install-firmware-assets | Install firmware assets cluster-wide +*ImagesApi* | [**v3_list_images**](docs/ImagesApi.md#v3_list_images) | **GET** /v3/images | List image metadata +*ImagesApi* | [**v3_upload_image_chunk**](docs/ImagesApi.md#v3_upload_image_chunk) | **PUT** /v3/images/{imageId}/file | Upload one chunk of an image file +*ImagesApi* | [**v3_upload_image_data**](docs/ImagesApi.md#v3_upload_image_data) | **POST** /v3/images/{imageId} | Upload image file contents +*ImagesV1Api* | [**v1_get_image**](docs/ImagesV1Api.md#v1_get_image) | **GET** /v1/images/{imageId} | Get Image Metadata +*ImagesV1Api* | [**v1_get_images**](docs/ImagesV1Api.md#v1_get_images) | **GET** /v1/images | Get all Images Metadata +*ImagesV2Api* | [**v1_delete_image**](docs/ImagesV2Api.md#v1_delete_image) | **DELETE** /v2/images/{imageId} | Delete Image +*InstancesApi* | [**v3_attach_instance_interface**](docs/InstancesApi.md#v3_attach_instance_interface) | **POST** /v3/instances/{instanceId}/interfaces | Connect an I/O interface +*InstancesApi* | [**v3_clear_instance_panics**](docs/InstancesApi.md#v3_clear_instance_panics) | **DELETE** /v3/instances/{instanceId}/panics | Clear kernel panics +*InstancesApi* | [**v3_create_instance**](docs/InstancesApi.md#v3_create_instance) | **POST** /v3/instances | Create a device +*InstancesApi* | [**v3_delete_instance**](docs/InstancesApi.md#v3_delete_instance) | **DELETE** /v3/instances/{instanceId} | Remove Instance +*InstancesApi* | [**v3_detach_instance_interface**](docs/InstancesApi.md#v3_detach_instance_interface) | **DELETE** /v3/instances/{instanceId}/interfaces/{interfaceId} | Disconnect an I/O interface +*InstancesApi* | [**v3_disable_expose_port**](docs/InstancesApi.md#v3_disable_expose_port) | **POST** /v3/instances/{instanceId}/exposeport/disable | Stop exposing the device port +*InstancesApi* | [**v3_download_netdump_pcap**](docs/InstancesApi.md#v3_download_netdump_pcap) | **GET** /v3/instances/{instanceId}/netdump.pcap | Download the Enhanced Network Monitor capture +*InstancesApi* | [**v3_download_network_monitor_pcap**](docs/InstancesApi.md#v3_download_network_monitor_pcap) | **GET** /v3/instances/{instanceId}/networkMonitor.pcap | Download the Network Monitor capture +*InstancesApi* | [**v3_enable_expose_port**](docs/InstancesApi.md#v3_enable_expose_port) | **POST** /v3/instances/{instanceId}/exposeport/enable | Expose the device port +*InstancesApi* | [**v3_get_instance**](docs/InstancesApi.md#v3_get_instance) | **GET** /v3/instances/{instanceId} | Get a device +*InstancesApi* | [**v3_get_instance_console**](docs/InstancesApi.md#v3_get_instance_console) | **GET** /v3/instances/{instanceId}/console | Get console websocket URL +*InstancesApi* | [**v3_get_instance_console_log**](docs/InstancesApi.md#v3_get_instance_console_log) | **GET** /v3/instances/{instanceId}/consoleLog | Read the console log +*InstancesApi* | [**v3_get_instance_gpios**](docs/InstancesApi.md#v3_get_instance_gpios) | **GET** /v3/instances/{instanceId}/gpios | Read board LEDs, buttons and switches +*InstancesApi* | [**v3_get_instance_image_upload**](docs/InstancesApi.md#v3_get_instance_image_upload) | **GET** /v3/instances/{instance}/image-upload/{type}/{imageId}/{name} | Get image upload status +*InstancesApi* | [**v3_get_instance_panics**](docs/InstancesApi.md#v3_get_instance_panics) | **GET** /v3/instances/{instanceId}/panics | List kernel panics +*InstancesApi* | [**v3_get_instance_peripherals**](docs/InstancesApi.md#v3_get_instance_peripherals) | **GET** /v3/instances/{instanceId}/peripherals | Read simulated sensors +*InstancesApi* | [**v3_get_instance_quick_connect_command**](docs/InstancesApi.md#v3_get_instance_quick_connect_command) | **GET** /v3/instances/{instanceId}/quickConnectCommand | Get the SSH quick-connect command +*InstancesApi* | [**v3_get_instance_screenshot**](docs/InstancesApi.md#v3_get_instance_screenshot) | **GET** /v3/instances/{instanceId}/screenshot.{format} | Take a screenshot +*InstancesApi* | [**v3_get_instance_state**](docs/InstancesApi.md#v3_get_instance_state) | **GET** /v3/instances/{instanceId}/state | Get a device's state +*InstancesApi* | [**v3_inject_message**](docs/InstancesApi.md#v3_inject_message) | **POST** /v3/instances/{instanceId}/message | Send an SMS message to an iOS device +*InstancesApi* | [**v3_kernel_preauthorize**](docs/InstancesApi.md#v3_kernel_preauthorize) | **GET** /v3/instances/{instanceId}/kernel-authorize | Get a kernel download token +*InstancesApi* | [**v3_list_instances**](docs/InstancesApi.md#v3_list_instances) | **GET** /v3/instances | List Instances +*InstancesApi* | [**v3_media_play**](docs/InstancesApi.md#v3_media_play) | **POST** /v3/instances/{instanceId}/media/play | Play a video or audio file into the device +*InstancesApi* | [**v3_media_stop**](docs/InstancesApi.md#v3_media_stop) | **POST** /v3/instances/{instanceId}/media/stop | Stop playing media +*InstancesApi* | [**v3_patch_instance**](docs/InstancesApi.md#v3_patch_instance) | **PATCH** /v3/instances/{instanceId} | Change device settings +*InstancesApi* | [**v3_patch_instance_read_only**](docs/InstancesApi.md#v3_patch_instance_read_only) | **PATCH** /v3/instances/{instanceId}/read-only | Update Instance Read Only +*InstancesApi* | [**v3_pause_instance**](docs/InstancesApi.md#v3_pause_instance) | **POST** /v3/instances/{instanceId}/pause | Pause a device +*InstancesApi* | [**v3_post_instance_input**](docs/InstancesApi.md#v3_post_instance_input) | **POST** /v3/instances/{instanceId}/input | Provide Instance Input +*InstancesApi* | [**v3_put_instance_image_upload**](docs/InstancesApi.md#v3_put_instance_image_upload) | **PUT** /v3/instances/{instance}/image-upload/{type}/{imageId}/{name} | Upload image chunk +*InstancesApi* | [**v3_reboot_instance**](docs/InstancesApi.md#v3_reboot_instance) | **POST** /v3/instances/{instanceId}/reboot | Restart a device +*InstancesApi* | [**v3_restore_backup**](docs/InstancesApi.md#v3_restore_backup) | **POST** /v3/instances/{instanceId}/restoreBackup | Restore a backup onto a device +*InstancesApi* | [**v3_rotate_instance**](docs/InstancesApi.md#v3_rotate_instance) | **POST** /v3/instances/{instanceId}/rotate | Rotate the device +*InstancesApi* | [**v3_set_instance_gpios**](docs/InstancesApi.md#v3_set_instance_gpios) | **PUT** /v3/instances/{instanceId}/gpios | Press board buttons or flip switches +*InstancesApi* | [**v3_set_instance_peripherals**](docs/InstancesApi.md#v3_set_instance_peripherals) | **PUT** /v3/instances/{instanceId}/peripherals | Change simulated sensors +*InstancesApi* | [**v3_start_instance**](docs/InstancesApi.md#v3_start_instance) | **POST** /v3/instances/{instanceId}/start | Turn a device on +*InstancesApi* | [**v3_start_netdump**](docs/InstancesApi.md#v3_start_netdump) | **POST** /v3/instances/{instanceId}/netdump/enable | Start Enhanced Network Monitor +*InstancesApi* | [**v3_start_network_monitor**](docs/InstancesApi.md#v3_start_network_monitor) | **POST** /v3/instances/{instanceId}/sslsplit/enable | Start Network Monitor +*InstancesApi* | [**v3_stop_instance**](docs/InstancesApi.md#v3_stop_instance) | **POST** /v3/instances/{instanceId}/stop | Turn a device off +*InstancesApi* | [**v3_stop_netdump**](docs/InstancesApi.md#v3_stop_netdump) | **POST** /v3/instances/{instanceId}/netdump/disable | Stop Enhanced Network Monitor +*InstancesApi* | [**v3_stop_network_monitor**](docs/InstancesApi.md#v3_stop_network_monitor) | **POST** /v3/instances/{instanceId}/sslsplit/disable | Stop Network Monitor +*InstancesApi* | [**v3_unpause_instance**](docs/InstancesApi.md#v3_unpause_instance) | **POST** /v3/instances/{instanceId}/unpause | Resume a paused device +*InstancesApi* | [**v3_upgrade_instance**](docs/InstancesApi.md#v3_upgrade_instance) | **POST** /v3/instances/{instanceId}/upgrade | Upgrade the iOS version +*InstancesApi* | [**v3_validate_instance_token**](docs/InstancesApi.md#v3_validate_instance_token) | **POST** /v3/instances/{instanceId}/token/validate | Check a device connection token +*InstancesV1Api* | [**v1_attach_instance_interface**](docs/InstancesV1Api.md#v1_attach_instance_interface) | **POST** /v1/instances/{instanceId}/interfaces | Attach I/O Interface +*InstancesV1Api* | [**v1_clear_instance_panics**](docs/InstancesV1Api.md#v1_clear_instance_panics) | **DELETE** /v1/instances/{instanceId}/panics | Clear Panics +*InstancesV1Api* | [**v1_create_instance**](docs/InstancesV1Api.md#v1_create_instance) | **POST** /v1/instances | Create Instance +*InstancesV1Api* | [**v1_delete_instance**](docs/InstancesV1Api.md#v1_delete_instance) | **DELETE** /v1/instances/{instanceId} | Remove Instance +*InstancesV1Api* | [**v1_detach_instance_interface**](docs/InstancesV1Api.md#v1_detach_instance_interface) | **DELETE** /v1/instances/{instanceId}/interfaces/{interfaceId} | Detach I/O Interface +*InstancesV1Api* | [**v1_disable_expose_port**](docs/InstancesV1Api.md#v1_disable_expose_port) | **POST** /v1/instances/{instanceId}/exposeport/disable | Disable an exposed port on an instance for device access. +*InstancesV1Api* | [**v1_download_netdump_pcap_instances**](docs/InstancesV1Api.md#v1_download_netdump_pcap_instances) | **GET** /v1/instances/{instanceId}/netdump.pcap | Download a netdump pcap file +*InstancesV1Api* | [**v1_download_network_monitor_pcap_instances**](docs/InstancesV1Api.md#v1_download_network_monitor_pcap_instances) | **GET** /v1/instances/{instanceId}/networkMonitor.pcap | Download a Network Monitor pcap file +*InstancesV1Api* | [**v1_enable_expose_port**](docs/InstancesV1Api.md#v1_enable_expose_port) | **POST** /v1/instances/{instanceId}/exposeport/enable | Enable an exposed port on an instance for device access. +*InstancesV1Api* | [**v1_get_instance**](docs/InstancesV1Api.md#v1_get_instance) | **GET** /v1/instances/{instanceId} | Get Instance +*InstancesV1Api* | [**v1_get_instance_console**](docs/InstancesV1Api.md#v1_get_instance_console) | **GET** /v1/instances/{instanceId}/console | Get console websocket URL +*InstancesV1Api* | [**v1_get_instance_console_log**](docs/InstancesV1Api.md#v1_get_instance_console_log) | **GET** /v1/instances/{instanceId}/consoleLog | Get Console Log +*InstancesV1Api* | [**v1_get_instance_gpios**](docs/InstancesV1Api.md#v1_get_instance_gpios) | **GET** /v1/instances/{instanceId}/gpios | Get Instance GPIOs +*InstancesV1Api* | [**v1_get_instance_panics**](docs/InstancesV1Api.md#v1_get_instance_panics) | **GET** /v1/instances/{instanceId}/panics | Get Panics +*InstancesV1Api* | [**v1_get_instance_peripherals**](docs/InstancesV1Api.md#v1_get_instance_peripherals) | **GET** /v1/instances/{instanceId}/peripherals | Get Instance Peripherals +*InstancesV1Api* | [**v1_get_instance_screenshot**](docs/InstancesV1Api.md#v1_get_instance_screenshot) | **GET** /v1/instances/{instanceId}/screenshot.{format} | Get Instance Screenshot +*InstancesV1Api* | [**v1_get_instances**](docs/InstancesV1Api.md#v1_get_instances) | **GET** /v1/instances | Get Instances +*InstancesV1Api* | [**v1_inject_message_instances**](docs/InstancesV1Api.md#v1_inject_message_instances) | **POST** /v1/instances/{instanceId}/message | Inject a message into an iOS VM +*InstancesV1Api* | [**v1_media_play**](docs/InstancesV1Api.md#v1_media_play) | **POST** /v1/instances/{instanceId}/media/play | Start playing media +*InstancesV1Api* | [**v1_media_stop**](docs/InstancesV1Api.md#v1_media_stop) | **POST** /v1/instances/{instanceId}/media/stop | Stop playing media +*InstancesV1Api* | [**v1_patch_instance**](docs/InstancesV1Api.md#v1_patch_instance) | **PATCH** /v1/instances/{instanceId} | Update Instance +*InstancesV1Api* | [**v1_patch_instance_read_only**](docs/InstancesV1Api.md#v1_patch_instance_read_only) | **PATCH** /v1/instances/{instanceId}/read-only | Update Instance Read Only +*InstancesV1Api* | [**v1_pause_instance**](docs/InstancesV1Api.md#v1_pause_instance) | **POST** /v1/instances/{instanceId}/pause | Pause an Instance +*InstancesV1Api* | [**v1_post_instance_input**](docs/InstancesV1Api.md#v1_post_instance_input) | **POST** /v1/instances/{instanceId}/input | Provide Instance Input +*InstancesV1Api* | [**v1_reboot_instance**](docs/InstancesV1Api.md#v1_reboot_instance) | **POST** /v1/instances/{instanceId}/reboot | Reboot an Instance +*InstancesV1Api* | [**v1_restore_backup**](docs/InstancesV1Api.md#v1_restore_backup) | **POST** /v1/instances/{instanceId}/restoreBackup | Restore backup +*InstancesV1Api* | [**v1_rotate_instance**](docs/InstancesV1Api.md#v1_rotate_instance) | **POST** /v1/instances/{instanceId}/rotate | Rotate device to specified orientation +*InstancesV1Api* | [**v1_set_instance_gpios**](docs/InstancesV1Api.md#v1_set_instance_gpios) | **PUT** /v1/instances/{instanceId}/gpios | Set Instance GPIOs +*InstancesV1Api* | [**v1_set_instance_peripherals**](docs/InstancesV1Api.md#v1_set_instance_peripherals) | **PUT** /v1/instances/{instanceId}/peripherals | Update Instance Peripherals +*InstancesV1Api* | [**v1_set_instance_state**](docs/InstancesV1Api.md#v1_set_instance_state) | **PUT** /v1/instances/{instanceId}/state | Set state of Instance +*InstancesV1Api* | [**v1_start_instance**](docs/InstancesV1Api.md#v1_start_instance) | **POST** /v1/instances/{instanceId}/start | Start an Instance +*InstancesV1Api* | [**v1_start_netdump**](docs/InstancesV1Api.md#v1_start_netdump) | **POST** /v1/instances/{instanceId}/netdump/enable | Start Enhanced Network Monitor on an instance. +*InstancesV1Api* | [**v1_start_network_monitor**](docs/InstancesV1Api.md#v1_start_network_monitor) | **POST** /v1/instances/{instanceId}/sslsplit/enable | Start Network Monitor on an instance. +*InstancesV1Api* | [**v1_stop_instance**](docs/InstancesV1Api.md#v1_stop_instance) | **POST** /v1/instances/{instanceId}/stop | Stop an Instance +*InstancesV1Api* | [**v1_stop_netdump**](docs/InstancesV1Api.md#v1_stop_netdump) | **POST** /v1/instances/{instanceId}/netdump/disable | Stop Enhanced Network Monitor on an instance. +*InstancesV1Api* | [**v1_stop_network_monitor**](docs/InstancesV1Api.md#v1_stop_network_monitor) | **POST** /v1/instances/{instanceId}/sslsplit/disable | Stop Network Monitor on an instance. +*InstancesV1Api* | [**v1_unpause_instance**](docs/InstancesV1Api.md#v1_unpause_instance) | **POST** /v1/instances/{instanceId}/unpause | Unpause an Instance +*InstancesV1Api* | [**v1_upgrade_instance**](docs/InstancesV1Api.md#v1_upgrade_instance) | **POST** /v1/instances/{instanceId}/upgrade | Upgrade iOS version +*InstancesV2Api* | [**v2_get_instance_quick_connect_command**](docs/InstancesV2Api.md#v2_get_instance_quick_connect_command) | **GET** /v2/instances/{instanceId}/quickConnectCommand | Recommended SSH Command for Quick Connect +*InstancesV2Api* | [**v2_get_instance_state**](docs/InstancesV2Api.md#v2_get_instance_state) | **GET** /v2/instances/{instanceId}/state | Get state of Instance +*InterconnectsApi* | [**v3_create_interconnect**](docs/InterconnectsApi.md#v3_create_interconnect) | **POST** /v3/interconnects | Create I/O Interconnect +*InterconnectsApi* | [**v3_delete_interconnect**](docs/InterconnectsApi.md#v3_delete_interconnect) | **DELETE** /v3/interconnects/{interconnectId} | Delete I/O Interconnect +*InterconnectsApi* | [**v3_get_interconnect**](docs/InterconnectsApi.md#v3_get_interconnect) | **GET** /v3/interconnects/{interconnectId} | Get Interconnect +*InterconnectsApi* | [**v3_list_interconnects**](docs/InterconnectsApi.md#v3_list_interconnects) | **GET** /v3/interconnects | List I/O Interconnects +*InterconnectsApi* | [**v3_patch_interconnect**](docs/InterconnectsApi.md#v3_patch_interconnect) | **PATCH** /v3/interconnects/{interconnectId} | Patch I/O Interconnect +*InterconnectsApi* | [**v3_update_interconnect**](docs/InterconnectsApi.md#v3_update_interconnect) | **PUT** /v3/interconnects/{interconnectId} | Update I/O Interconnect +*InterconnectsV1Api* | [**v1_create_interconnect**](docs/InterconnectsV1Api.md#v1_create_interconnect) | **POST** /v1/interconnects | Create I/O Interconnect +*InterconnectsV1Api* | [**v1_delete_interconnect**](docs/InterconnectsV1Api.md#v1_delete_interconnect) | **DELETE** /v1/interconnects/{interconnectId} | Delete I/O Interconnect +*InterconnectsV1Api* | [**v1_get_interconnect**](docs/InterconnectsV1Api.md#v1_get_interconnect) | **GET** /v1/interconnects/{interconnectId} | Get Interconnect +*InterconnectsV1Api* | [**v1_list_interconnects**](docs/InterconnectsV1Api.md#v1_list_interconnects) | **GET** /v1/interconnects | Get all I/O Interconnects +*InterconnectsV1Api* | [**v1_patch_interconnect**](docs/InterconnectsV1Api.md#v1_patch_interconnect) | **PATCH** /v1/interconnects/{interconnectId} | Partial Update Interconnect +*InterconnectsV1Api* | [**v1_update_interconnect**](docs/InterconnectsV1Api.md#v1_update_interconnect) | **PUT** /v1/interconnects/{interconnectId} | Update Interconnect +*InvitesApi* | [**v3_create_invites**](docs/InvitesApi.md#v3_create_invites) | **POST** /v3/invites | Create invites +*InvitesApi* | [**v3_edit_invites**](docs/InvitesApi.md#v3_edit_invites) | **POST** /v3/invites/edit | Edit invites +*InvitesApi* | [**v3_get_invite_by_token**](docs/InvitesApi.md#v3_get_invite_by_token) | **POST** /v3/invites-by-token | Get an invite by token +*InvitesApi* | [**v3_list_invites**](docs/InvitesApi.md#v3_list_invites) | **GET** /v3/invites | List invites +*InvitesApi* | [**v3_revoke_invites**](docs/InvitesApi.md#v3_revoke_invites) | **POST** /v3/invites/revoke | Revoke invites +*InvitesApi* | [**v3_signup_from_invite**](docs/InvitesApi.md#v3_signup_from_invite) | **POST** /v3/invites/signup | Sign up from an invite +*InvitesV1Api* | [**v1_create_user_invites**](docs/InvitesV1Api.md#v1_create_user_invites) | **POST** /v1/invites | Create Invite +*InvitesV1Api* | [**v1_edit_invites**](docs/InvitesV1Api.md#v1_edit_invites) | **POST** /v1/invites/edit | +*InvitesV1Api* | [**v1_invites**](docs/InvitesV1Api.md#v1_invites) | **GET** /v1/invites | Get Invites +*InvitesV1Api* | [**v1_invites_by_token**](docs/InvitesV1Api.md#v1_invites_by_token) | **GET** /v1/invites-by-token | +*InvitesV1Api* | [**v1_revoke_user_invite**](docs/InvitesV1Api.md#v1_revoke_user_invite) | **POST** /v1/invites/revoke | Revoke Invite +*InvitesV1Api* | [**v1_user_create_from_invite**](docs/InvitesV1Api.md#v1_user_create_from_invite) | **POST** /v1/invites/signup | +*ModelsApi* | [**v3_get_model_software**](docs/ModelsApi.md#v3_get_model_software) | **GET** /v3/models/{model}/software | List software for a model +*ModelsApi* | [**v3_get_models**](docs/ModelsApi.md#v3_get_models) | **GET** /v3/models | List device models +*ModelsV1Api* | [**v1_get_model_software**](docs/ModelsV1Api.md#v1_get_model_software) | **GET** /v1/models/{model}/software | Get Software for Model +*ModelsV1Api* | [**v1_get_models**](docs/ModelsV1Api.md#v1_get_models) | **GET** /v1/models | Get Supported Models +*NetConnectApi* | [**v3_create_network_connection**](docs/NetConnectApi.md#v3_create_network_connection) | **POST** /v3/network/connections | Create a new Network Connection +*NetConnectApi* | [**v3_delete_network_connection**](docs/NetConnectApi.md#v3_delete_network_connection) | **DELETE** /v3/network/connections/{id} | Delete an existing Network Connection +*NetConnectApi* | [**v3_get_network_connection**](docs/NetConnectApi.md#v3_get_network_connection) | **GET** /v3/network/connections/{id} | Fetch an existing Network Connection +*NetConnectApi* | [**v3_list_network_connections**](docs/NetConnectApi.md#v3_list_network_connections) | **GET** /v3/network/connections | List available network connections +*NetConnectApi* | [**v3_list_network_interfaces**](docs/NetConnectApi.md#v3_list_network_interfaces) | **GET** /v3/network/interfaces | List available physical network interfaces +*NetConnectApi* | [**v3_list_network_providers**](docs/NetConnectApi.md#v3_list_network_providers) | **GET** /v3/network/providers | List available network providers +*NetConnectApi* | [**v3_partial_update_network_connection**](docs/NetConnectApi.md#v3_partial_update_network_connection) | **PATCH** /v3/network/connections/{id} | Update Network Connection (patch) +*NetConnectApi* | [**v3_update_network_connection**](docs/NetConnectApi.md#v3_update_network_connection) | **PUT** /v3/network/connections/{id} | Update Network Connection +*NetConnectV1Api* | [**v1_create_network_connection**](docs/NetConnectV1Api.md#v1_create_network_connection) | **POST** /v1/network/connections | Create a new Network Connection +*NetConnectV1Api* | [**v1_delete_network_connection**](docs/NetConnectV1Api.md#v1_delete_network_connection) | **DELETE** /v1/network/connections/{id} | Delete an existing Network Connection +*NetConnectV1Api* | [**v1_get_network_connection**](docs/NetConnectV1Api.md#v1_get_network_connection) | **GET** /v1/network/connections/{id} | Return the configuration and per project statuses for a single network provider. +*NetConnectV1Api* | [**v1_list_network_connections**](docs/NetConnectV1Api.md#v1_list_network_connections) | **GET** /v1/network/connections | List available network connections +*NetConnectV1Api* | [**v1_list_network_interfaces**](docs/NetConnectV1Api.md#v1_list_network_interfaces) | **GET** /v1/network/interfaces | List available physical network interfaces +*NetConnectV1Api* | [**v1_list_network_providers**](docs/NetConnectV1Api.md#v1_list_network_providers) | **GET** /v1/network/providers | List available network providers +*NetConnectV1Api* | [**v1_partial_update_network_connection**](docs/NetConnectV1Api.md#v1_partial_update_network_connection) | **PATCH** /v1/network/connections/{id} | Update Network Connection (partial) +*NetConnectV1Api* | [**v1_update_network_connection**](docs/NetConnectV1Api.md#v1_update_network_connection) | **PUT** /v1/network/connections/{id} | Update Network Connection +*ProjectsApi* | [**v3_create_project**](docs/ProjectsApi.md#v3_create_project) | **POST** /v3/projects | Create a project +*ProjectsApi* | [**v3_create_project_key**](docs/ProjectsApi.md#v3_create_project_key) | **POST** /v3/projects/{projectId}/keys | Add a project key +*ProjectsApi* | [**v3_delete_project**](docs/ProjectsApi.md#v3_delete_project) | **DELETE** /v3/projects/{projectId} | Delete a project +*ProjectsApi* | [**v3_delete_project_key**](docs/ProjectsApi.md#v3_delete_project_key) | **DELETE** /v3/projects/{projectId}/keys/{keyId} | Delete a project key +*ProjectsApi* | [**v3_fetch_project_firmware_assets**](docs/ProjectsApi.md#v3_fetch_project_firmware_assets) | **POST** /v3/projects/{projectId}/firmware-assets | Fetch firmware assets for a project +*ProjectsApi* | [**v3_get_project**](docs/ProjectsApi.md#v3_get_project) | **GET** /v3/projects/{projectId} | Get a project +*ProjectsApi* | [**v3_get_project_image_upload**](docs/ProjectsApi.md#v3_get_project_image_upload) | **GET** /v3/projects/{projectId}/image-upload/{type}/{imageId}/{name} | Get image upload status +*ProjectsApi* | [**v3_get_project_network_log**](docs/ProjectsApi.md#v3_get_project_network_log) | **GET** /v3/projects/{projectId}/network/log | Get project network log +*ProjectsApi* | [**v3_get_project_network_status**](docs/ProjectsApi.md#v3_get_project_network_status) | **GET** /v3/projects/{projectId}/network/status | Get project network status +*ProjectsApi* | [**v3_get_project_vpn_config**](docs/ProjectsApi.md#v3_get_project_vpn_config) | **GET** /v3/projects/{projectId}/vpnconfig/{format} | Get project VPN configuration +*ProjectsApi* | [**v3_list_project_instances**](docs/ProjectsApi.md#v3_list_project_instances) | **GET** /v3/projects/{projectId}/instances | List project instances +*ProjectsApi* | [**v3_list_project_keys**](docs/ProjectsApi.md#v3_list_project_keys) | **GET** /v3/projects/{projectId}/keys | List project keys +*ProjectsApi* | [**v3_list_projects**](docs/ProjectsApi.md#v3_list_projects) | **GET** /v3/projects | List projects +*ProjectsApi* | [**v3_patch_project**](docs/ProjectsApi.md#v3_patch_project) | **PATCH** /v3/projects/{projectId} | Update a project +*ProjectsApi* | [**v3_preauth_vpn_config**](docs/ProjectsApi.md#v3_preauth_vpn_config) | **POST** /v3/projects/{projectId}/preauth-vpn-config/{filename} | Pre-authorize a VPN configuration download +*ProjectsApi* | [**v3_put_project_image_upload**](docs/ProjectsApi.md#v3_put_project_image_upload) | **PUT** /v3/projects/{projectId}/image-upload/{type}/{imageId}/{name} | Upload image chunk +*ProjectsV1Api* | [**v1_add_project_key**](docs/ProjectsV1Api.md#v1_add_project_key) | **POST** /v1/projects/{projectId}/keys | Add Project Authorized Key +*ProjectsV1Api* | [**v1_create_project**](docs/ProjectsV1Api.md#v1_create_project) | **POST** /v1/projects | Create a Project +*ProjectsV1Api* | [**v1_delete_project**](docs/ProjectsV1Api.md#v1_delete_project) | **DELETE** /v1/projects/{projectId} | Delete a Project +*ProjectsV1Api* | [**v1_get_project**](docs/ProjectsV1Api.md#v1_get_project) | **GET** /v1/projects/{projectId} | Get a Project +*ProjectsV1Api* | [**v1_get_project_instances**](docs/ProjectsV1Api.md#v1_get_project_instances) | **GET** /v1/projects/{projectId}/instances | Get Instances in Project +*ProjectsV1Api* | [**v1_get_project_keys**](docs/ProjectsV1Api.md#v1_get_project_keys) | **GET** /v1/projects/{projectId}/keys | Get Project Authorized Keys +*ProjectsV1Api* | [**v1_get_project_network_log**](docs/ProjectsV1Api.md#v1_get_project_network_log) | **GET** /v1/projects/{projectId}/network/log | Retrieve the network connection log for a project +*ProjectsV1Api* | [**v1_get_project_network_status**](docs/ProjectsV1Api.md#v1_get_project_network_status) | **GET** /v1/projects/{projectId}/network/status | Retrieve the network connection status for a project +*ProjectsV1Api* | [**v1_get_project_vpn_config**](docs/ProjectsV1Api.md#v1_get_project_vpn_config) | **GET** /v1/projects/{projectId}/vpnconfig/{format} | Get Project VPN Configuration +*ProjectsV1Api* | [**v1_get_projects**](docs/ProjectsV1Api.md#v1_get_projects) | **GET** /v1/projects | Get Projects +*ProjectsV1Api* | [**v1_remove_project_key**](docs/ProjectsV1Api.md#v1_remove_project_key) | **DELETE** /v1/projects/{projectId}/keys/{keyId} | Delete Project Authorized Key +*ProjectsV1Api* | [**v1_update_project**](docs/ProjectsV1Api.md#v1_update_project) | **PATCH** /v1/projects/{projectId} | Update a Project +*ProjectsV1Api* | [**v1_update_project_settings**](docs/ProjectsV1Api.md#v1_update_project_settings) | **PATCH** /v1/projects/{projectId}/settings | Change Project Settings +*RAMDumpApi* | [**v3_clear_ram_dump**](docs/RAMDumpApi.md#v3_clear_ram_dump) | **DELETE** /v3/instances/{instanceId}/ramdump | Delete a RAM dump +*RAMDumpApi* | [**v3_ram_dump_preauthorize**](docs/RAMDumpApi.md#v3_ram_dump_preauthorize) | **GET** /v3/instances/{instanceId}/ramdump-authorize | Get a RAM dump download token +*RAMDumpApi* | [**v3_start_ram_dump**](docs/RAMDumpApi.md#v3_start_ram_dump) | **POST** /v3/instances/{instanceId}/ramdump/start | Start a RAM dump +*RAMDumpV1Api* | [**v1_clear_ram_dump**](docs/RAMDumpV1Api.md#v1_clear_ram_dump) | **DELETE** /v1/instances/{instanceId}/ramdump | Clear RAM Dump +*RAMDumpV1Api* | [**v1_ram_dump_preauthorize**](docs/RAMDumpV1Api.md#v1_ram_dump_preauthorize) | **GET** /v1/instances/{instanceId}/ramdump-authorize | Pre-authorize a RAM Dump download +*RAMDumpV1Api* | [**v1_start_ram_dump**](docs/RAMDumpV1Api.md#v1_start_ram_dump) | **POST** /v1/instances/{instanceId}/ramdump/start | Start a RAM Dump on an instance +*RolesApi* | [**v3_add_team_role_to_deployment**](docs/RolesApi.md#v3_add_team_role_to_deployment) | **PUT** /v3/roles/deployments/{deploymentId}/teams/{teamId}/roles/{roleId} | Add team role to deployment +*RolesApi* | [**v3_add_team_role_to_project**](docs/RolesApi.md#v3_add_team_role_to_project) | **PUT** /v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Add team role to project +*RolesApi* | [**v3_add_user_role_to_deployment**](docs/RolesApi.md#v3_add_user_role_to_deployment) | **PUT** /v3/roles/deployments/{deploymentId}/users/{userId}/roles/{roleId} | Add user role to deployment +*RolesApi* | [**v3_add_user_role_to_project**](docs/RolesApi.md#v3_add_user_role_to_project) | **PUT** /v3/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Add user role to project +*RolesApi* | [**v3_list_deployment_roles**](docs/RolesApi.md#v3_list_deployment_roles) | **GET** /v3/roles/deployments | List deployment role assignments +*RolesApi* | [**v3_list_roles**](docs/RolesApi.md#v3_list_roles) | **GET** /v3/roles | List all role assignments for the caller's domain +*RolesApi* | [**v3_remove_team_role_from_deployment**](docs/RolesApi.md#v3_remove_team_role_from_deployment) | **DELETE** /v3/roles/deployments/{deploymentId}/teams/{teamId}/roles/{roleId} | Remove team role from deployment +*RolesApi* | [**v3_remove_team_role_from_project**](docs/RolesApi.md#v3_remove_team_role_from_project) | **DELETE** /v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Remove team role from project +*RolesApi* | [**v3_remove_user_role_from_deployment**](docs/RolesApi.md#v3_remove_user_role_from_deployment) | **DELETE** /v3/roles/deployments/{deploymentId}/users/{userId}/roles/{roleId} | Remove user role from deployment +*RolesApi* | [**v3_remove_user_role_from_project**](docs/RolesApi.md#v3_remove_user_role_from_project) | **DELETE** /v3/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Remove user role from project +*RolesV1Api* | [**v1_add_team_role_to_project**](docs/RolesV1Api.md#v1_add_team_role_to_project) | **PUT** /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Add team role to project +*RolesV1Api* | [**v1_add_user_role_to_project**](docs/RolesV1Api.md#v1_add_user_role_to_project) | **PUT** /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Add user role to project +*RolesV1Api* | [**v1_remove_team_role_from_project**](docs/RolesV1Api.md#v1_remove_team_role_from_project) | **DELETE** /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Remove team role from project +*RolesV1Api* | [**v1_remove_user_role_from_project**](docs/RolesV1Api.md#v1_remove_user_role_from_project) | **DELETE** /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Remove user role from project +*RolesV1Api* | [**v1_roles**](docs/RolesV1Api.md#v1_roles) | **GET** /v1/roles | Get all roles +*SnapshotSharingApi* | [**v3_accept_shared_snapshot**](docs/SnapshotSharingApi.md#v3_accept_shared_snapshot) | **POST** /v3/snapshots/accept | Accept a shared snapshot +*SnapshotSharingApi* | [**v3_delete_snapshot_permissions**](docs/SnapshotSharingApi.md#v3_delete_snapshot_permissions) | **DELETE** /v3/snapshots/{snapshotId}/permissions | Delete member(s) +*SnapshotSharingApi* | [**v3_get_shared_snapshots**](docs/SnapshotSharingApi.md#v3_get_shared_snapshots) | **GET** /v3/snapshots/shared | Fetch shared snapshots +*SnapshotSharingApi* | [**v3_set_snapshot_permissions**](docs/SnapshotSharingApi.md#v3_set_snapshot_permissions) | **POST** /v3/snapshots/{snapshotId}/permissions | Set member list +*SnapshotSharingApi* | [**v3_share_snapshot**](docs/SnapshotSharingApi.md#v3_share_snapshot) | **POST** /v3/snapshots/{snapshotId}/share | Create or update snapshot sharing +*SnapshotSharingV1Api* | [**v1_accept_shared_snapshot**](docs/SnapshotSharingV1Api.md#v1_accept_shared_snapshot) | **POST** /v1/snapshots/accept | Accept a snapshot shared with you +*SnapshotSharingV1Api* | [**v1_delete_snapshot_permissions**](docs/SnapshotSharingV1Api.md#v1_delete_snapshot_permissions) | **DELETE** /v1/snapshots/{snapshotId}/permissions | Delete member(s) +*SnapshotSharingV1Api* | [**v1_get_shared_snapshots**](docs/SnapshotSharingV1Api.md#v1_get_shared_snapshots) | **GET** /v1/snapshots/shared | Fetch shared snapshots +*SnapshotSharingV1Api* | [**v1_set_snapshot_permissions**](docs/SnapshotSharingV1Api.md#v1_set_snapshot_permissions) | **POST** /v1/snapshots/{snapshotId}/permissions | Set member list +*SnapshotSharingV1Api* | [**v1_share_snapshot**](docs/SnapshotSharingV1Api.md#v1_share_snapshot) | **POST** /v1/snapshots/{snapshotId}/share | Share snapshot +*SnapshotsApi* | [**v3_create_instance_snapshot**](docs/SnapshotsApi.md#v3_create_instance_snapshot) | **POST** /v3/instances/{instanceId}/snapshots | Create instance snapshot +*SnapshotsApi* | [**v3_delete_instance_snapshot**](docs/SnapshotsApi.md#v3_delete_instance_snapshot) | **DELETE** /v3/instances/{instanceId}/snapshots/{snapshotId} | Delete an instance snapshot +*SnapshotsApi* | [**v3_delete_snapshot**](docs/SnapshotsApi.md#v3_delete_snapshot) | **DELETE** /v3/snapshots/{snapshotId} | Delete a snapshot +*SnapshotsApi* | [**v3_get_instance_snapshot**](docs/SnapshotsApi.md#v3_get_instance_snapshot) | **GET** /v3/instances/{instanceId}/snapshots/{snapshotId} | Get instance snapshot +*SnapshotsApi* | [**v3_get_snapshot**](docs/SnapshotsApi.md#v3_get_snapshot) | **GET** /v3/snapshots/{snapshotId} | Get snapshot +*SnapshotsApi* | [**v3_list_instance_snapshots**](docs/SnapshotsApi.md#v3_list_instance_snapshots) | **GET** /v3/instances/{instanceId}/snapshots | List instance snapshots +*SnapshotsApi* | [**v3_patch_instance_snapshot**](docs/SnapshotsApi.md#v3_patch_instance_snapshot) | **PATCH** /v3/instances/{instanceId}/snapshots/{snapshotId} | Update an instance snapshot +*SnapshotsApi* | [**v3_restore_instance_snapshot**](docs/SnapshotsApi.md#v3_restore_instance_snapshot) | **POST** /v3/instances/{instanceId}/snapshots/{snapshotId}/restore | Restore instance snapshot +*SnapshotsApi* | [**v3_update_snapshot**](docs/SnapshotsApi.md#v3_update_snapshot) | **PATCH** /v3/snapshots/{snapshotId} | Update snapshot name +*SnapshotsV1Api* | [**v1_create_snapshot**](docs/SnapshotsV1Api.md#v1_create_snapshot) | **POST** /v1/instances/{instanceId}/snapshots | Create Instance Snapshot +*SnapshotsV1Api* | [**v1_delete_instance_snapshot**](docs/SnapshotsV1Api.md#v1_delete_instance_snapshot) | **DELETE** /v1/instances/{instanceId}/snapshots/{snapshotId} | Delete an Instance Snapshot +*SnapshotsV1Api* | [**v1_delete_snapshot**](docs/SnapshotsV1Api.md#v1_delete_snapshot) | **DELETE** /v1/snapshots/{snapshotId} | Delete a Snapshot +*SnapshotsV1Api* | [**v1_get_instance_snapshot**](docs/SnapshotsV1Api.md#v1_get_instance_snapshot) | **GET** /v1/instances/{instanceId}/snapshots/{snapshotId} | Get Instance Snapshot +*SnapshotsV1Api* | [**v1_get_instance_snapshots**](docs/SnapshotsV1Api.md#v1_get_instance_snapshots) | **GET** /v1/instances/{instanceId}/snapshots | Get Instance Snapshots +*SnapshotsV1Api* | [**v1_get_snapshot**](docs/SnapshotsV1Api.md#v1_get_snapshot) | **GET** /v1/snapshots/{snapshotId} | Get Snapshot +*SnapshotsV1Api* | [**v1_rename_instance_snapshot**](docs/SnapshotsV1Api.md#v1_rename_instance_snapshot) | **PATCH** /v1/instances/{instanceId}/snapshots/{snapshotId} | Rename an Instance Snapshot +*SnapshotsV1Api* | [**v1_restore_instance_snapshot**](docs/SnapshotsV1Api.md#v1_restore_instance_snapshot) | **POST** /v1/instances/{instanceId}/snapshots/{snapshotId}/restore | Restore an Instance Snapshot +*SnapshotsV1Api* | [**v1_snapshot_rename**](docs/SnapshotsV1Api.md#v1_snapshot_rename) | **PATCH** /v1/snapshots/{snapshotId} | Rename a Snapshot +*StatusApi* | [**v3_ready**](docs/StatusApi.md#v3_ready) | **GET** /v3/ready | Check that the API is ready +*StatusV1Api* | [**v1_ready**](docs/StatusV1Api.md#v1_ready) | **GET** /v1/ready | API Status +*StorageApi* | [**v3_attach_cluster_storage**](docs/StorageApi.md#v3_attach_cluster_storage) | **POST** /v3/cluster/storage/{id}/attach | Attach storage device +*StorageApi* | [**v3_eject_cluster_storage**](docs/StorageApi.md#v3_eject_cluster_storage) | **POST** /v3/cluster/storage/{id}/eject | Eject storage device +*StorageApi* | [**v3_list_cluster_storage**](docs/StorageApi.md#v3_list_cluster_storage) | **GET** /v3/cluster/storage | List cluster storage devices +*StorageApi* | [**v3_list_storage**](docs/StorageApi.md#v3_list_storage) | **GET** /v3/storage | List server-attached storage devices +*StorageApi* | [**v3_list_storage_files**](docs/StorageApi.md#v3_list_storage_files) | **GET** /v3/storage/{id}/files/{path} | List storage files +*StorageV1Api* | [**v1_attach_storage_cluster**](docs/StorageV1Api.md#v1_attach_storage_cluster) | **POST** /v1/cluster/storage/{id}/attach | Mount and attach a storage device +*StorageV1Api* | [**v1_eject_storage_cluster**](docs/StorageV1Api.md#v1_eject_storage_cluster) | **POST** /v1/cluster/storage/{id}/eject | Eject/Unmount removable media +*StorageV1Api* | [**v1_list_storage**](docs/StorageV1Api.md#v1_list_storage) | **GET** /v1/storage | Get storage devices +*StorageV1Api* | [**v1_list_storage_cluster**](docs/StorageV1Api.md#v1_list_storage_cluster) | **GET** /v1/cluster/storage | Get storage devices +*StorageV1Api* | [**v1_list_storage_files**](docs/StorageV1Api.md#v1_list_storage_files) | **GET** /v1/storage/{id}/files/{path} | List Storage Files +*TOTPApi* | [**v3_disable_totp**](docs/TOTPApi.md#v3_disable_totp) | **POST** /v3/totp/disable | Disable TOTP for this user +*TOTPApi* | [**v3_enable_totp**](docs/TOTPApi.md#v3_enable_totp) | **POST** /v3/totp/enable | Enable TOTP for this user +*TOTPApi* | [**v3_generate_totp**](docs/TOTPApi.md#v3_generate_totp) | **POST** /v3/totp/generate | Generate a TOTP secret +*TeamsApi* | [**v3_add_user_to_team**](docs/TeamsApi.md#v3_add_user_to_team) | **PUT** /v3/teams/{teamId}/users/{userId} | Add a user to a team +*TeamsApi* | [**v3_create_team**](docs/TeamsApi.md#v3_create_team) | **POST** /v3/teams | Create a team +*TeamsApi* | [**v3_delete_team**](docs/TeamsApi.md#v3_delete_team) | **DELETE** /v3/teams/{teamId} | Delete a team +*TeamsApi* | [**v3_list_teams**](docs/TeamsApi.md#v3_list_teams) | **GET** /v3/teams | List teams +*TeamsApi* | [**v3_remove_user_from_team**](docs/TeamsApi.md#v3_remove_user_from_team) | **DELETE** /v3/teams/{teamId}/users/{userId} | Remove a user from a team +*TeamsApi* | [**v3_update_team**](docs/TeamsApi.md#v3_update_team) | **PATCH** /v3/teams/{teamId} | Update a team +*TeamsV1Api* | [**v1_add_user_to_team**](docs/TeamsV1Api.md#v1_add_user_to_team) | **PUT** /v1/teams/{teamId}/users/{userId} | Add user to team +*TeamsV1Api* | [**v1_remove_user_from_team**](docs/TeamsV1Api.md#v1_remove_user_from_team) | **DELETE** /v1/teams/{teamId}/users/{userId} | Remove user from team +*TeamsV1Api* | [**v1_team_change**](docs/TeamsV1Api.md#v1_team_change) | **PATCH** /v1/teams/{teamId} | Update team +*TeamsV1Api* | [**v1_team_create**](docs/TeamsV1Api.md#v1_team_create) | **POST** /v1/teams | Create team +*TeamsV1Api* | [**v1_team_delete**](docs/TeamsV1Api.md#v1_team_delete) | **DELETE** /v1/teams/{teamId} | Delete team +*TeamsV1Api* | [**v1_teams**](docs/TeamsV1Api.md#v1_teams) | **GET** /v1/teams | Get teams +*UsersApi* | [**v3_agree_to_terms**](docs/UsersApi.md#v3_agree_to_terms) | **POST** /v3/users/agree | Agree to terms +*UsersApi* | [**v3_change_password**](docs/UsersApi.md#v3_change_password) | **POST** /v3/users/change-password | Change password +*UsersApi* | [**v3_create_user**](docs/UsersApi.md#v3_create_user) | **POST** /v3/users | Create a user +*UsersApi* | [**v3_delete_user**](docs/UsersApi.md#v3_delete_user) | **DELETE** /v3/users/{userId} | Delete a user +*UsersApi* | [**v3_get_reset_link_info**](docs/UsersApi.md#v3_get_reset_link_info) | **POST** /v3/users/reset-link-info | Get reset link info +*UsersApi* | [**v3_patch_user**](docs/UsersApi.md#v3_patch_user) | **PATCH** /v3/users/{userId} | Update a user +*UsersApi* | [**v3_reset_password**](docs/UsersApi.md#v3_reset_password) | **POST** /v3/users/reset-password | Reset password +*UsersApi* | [**v3_send_reset_link**](docs/UsersApi.md#v3_send_reset_link) | **POST** /v3/users/send-reset-link | Send a password reset link +*UsersApi* | [**v3_update_own_profile**](docs/UsersApi.md#v3_update_own_profile) | **PATCH** /v3/users/me | Update your profile +*UsersV1Api* | [**v1_change_password_users**](docs/UsersV1Api.md#v1_change_password_users) | **POST** /v1/users/change-password | Change User Password +*UsersV1Api* | [**v1_create_user**](docs/UsersV1Api.md#v1_create_user) | **POST** /v1/users | Create User +*UsersV1Api* | [**v1_delete_user**](docs/UsersV1Api.md#v1_delete_user) | **DELETE** /v1/users/{userId} | Delete User +*UsersV1Api* | [**v1_get_reset_link_info**](docs/UsersV1Api.md#v1_get_reset_link_info) | **GET** /v1/users/reset-link-info | Send Password Reset Link Info +*UsersV1Api* | [**v1_reset_user_password**](docs/UsersV1Api.md#v1_reset_user_password) | **POST** /v1/users/reset-password | Reset User Password +*UsersV1Api* | [**v1_send_user_reset_link**](docs/UsersV1Api.md#v1_send_user_reset_link) | **POST** /v1/users/send-reset-link | Send Password Reset Link +*UsersV1Api* | [**v1_update_user**](docs/UsersV1Api.md#v1_update_user) | **PATCH** /v1/users/{userId} | Update User +*UsersV1Api* | [**v1_user_agree_terms**](docs/UsersV1Api.md#v1_user_agree_terms) | **POST** /v1/users/agree | Consent to the current terms and conditions +*UsersV1Api* | [**v1_users_login**](docs/UsersV1Api.md#v1_users_login) | **POST** /v1/users/login | Log In +*WebPlayerApi* | [**v3_create_web_player_session**](docs/WebPlayerApi.md#v3_create_web_player_session) | **POST** /v3/webplayer | Create a webplayer session +*WebPlayerApi* | [**v3_delete_web_player_session**](docs/WebPlayerApi.md#v3_delete_web_player_session) | **DELETE** /v3/webplayer/{sessionId} | Delete a webplayer session +*WebPlayerApi* | [**v3_get_web_player_allowed_domains**](docs/WebPlayerApi.md#v3_get_web_player_allowed_domains) | **GET** /v3/webplayer/allowedDomains | Get allowed webplayer domains +*WebPlayerApi* | [**v3_get_web_player_session**](docs/WebPlayerApi.md#v3_get_web_player_session) | **GET** /v3/webplayer/{sessionId} | Get a webplayer session +*WebPlayerApi* | [**v3_list_web_player_sessions**](docs/WebPlayerApi.md#v3_list_web_player_sessions) | **GET** /v3/webplayer | List webplayer sessions +*WebPlayerV1Api* | [**v1_web_player_allowed_domains**](docs/WebPlayerV1Api.md#v1_web_player_allowed_domains) | **GET** /v1/webplayer/allowedDomains | Retrieve the list of allowed domains for all Webplayer sessions +*WebPlayerV1Api* | [**v1_web_player_create_session**](docs/WebPlayerV1Api.md#v1_web_player_create_session) | **POST** /v1/webplayer | Create a new Webplayer Session +*WebPlayerV1Api* | [**v1_web_player_destroy_session**](docs/WebPlayerV1Api.md#v1_web_player_destroy_session) | **DELETE** /v1/webplayer/{sessionId} | Tear down a Webplayer Session +*WebPlayerV1Api* | [**v1_web_player_list_sessions**](docs/WebPlayerV1Api.md#v1_web_player_list_sessions) | **GET** /v1/webplayer | List all Webplayer sessions +*WebPlayerV1Api* | [**v1_web_player_session_info**](docs/WebPlayerV1Api.md#v1_web_player_session_info) | **GET** /v1/webplayer/{sessionId} | Retrieve Webplayer Session Information +*AssessmentsApi* | [**v3_create_assessment**](docs/AssessmentsApi.md#v3_create_assessment) | **POST** /v3/services/matrix/{instanceId}/assessments | Create an assessment. +*AssessmentsApi* | [**v3_create_report_modification**](docs/AssessmentsApi.md#v3_create_report_modification) | **POST** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification | Create report modifications. +*AssessmentsApi* | [**v3_delete_assessment**](docs/AssessmentsApi.md#v3_delete_assessment) | **DELETE** /v3/services/matrix/{instanceId}/assessments/{assessmentId} | Delete an assessment. +*AssessmentsApi* | [**v3_delete_report_modification**](docs/AssessmentsApi.md#v3_delete_report_modification) | **DELETE** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification | Delete report modifications. +*AssessmentsApi* | [**v3_download_report**](docs/AssessmentsApi.md#v3_download_report) | **GET** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/download | Download an assessment report. +*AssessmentsApi* | [**v3_get_assessment_by_id**](docs/AssessmentsApi.md#v3_get_assessment_by_id) | **GET** /v3/services/matrix/{instanceId}/assessments/{assessmentId} | Get an assessment by ID. +*AssessmentsApi* | [**v3_get_assessments_by_instance_id**](docs/AssessmentsApi.md#v3_get_assessments_by_instance_id) | **GET** /v3/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments | List assessments for an instance. +*AssessmentsApi* | [**v3_patch_assessment**](docs/AssessmentsApi.md#v3_patch_assessment) | **PATCH** /v3/services/matrix/{instanceId}/assessments/{assessmentId} | Update an assessment status. +*AssessmentsApi* | [**v3_run_tests**](docs/AssessmentsApi.md#v3_run_tests) | **POST** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/test | Run assessment tests. +*AssessmentsApi* | [**v3_start_monitoring**](docs/AssessmentsApi.md#v3_start_monitoring) | **POST** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/start | Start assessment monitoring. +*AssessmentsApi* | [**v3_stop_monitoring**](docs/AssessmentsApi.md#v3_stop_monitoring) | **POST** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/stop | Stop assessment monitoring. +*AssessmentsV1Api* | [**v1_create_assessment**](docs/AssessmentsV1Api.md#v1_create_assessment) | **POST** /v1/services/matrix/{instanceId}/assessments | Create an assessment. +*AssessmentsV1Api* | [**v1_create_report_modification**](docs/AssessmentsV1Api.md#v1_create_report_modification) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification | Create report modifications. +*AssessmentsV1Api* | [**v1_delete_assessment**](docs/AssessmentsV1Api.md#v1_delete_assessment) | **DELETE** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Delete an assessment. +*AssessmentsV1Api* | [**v1_delete_report_modification**](docs/AssessmentsV1Api.md#v1_delete_report_modification) | **DELETE** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification | Delete report modifications. +*AssessmentsV1Api* | [**v1_download_report**](docs/AssessmentsV1Api.md#v1_download_report) | **GET** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/download | Download an assessment report. +*AssessmentsV1Api* | [**v1_get_assessment_by_id**](docs/AssessmentsV1Api.md#v1_get_assessment_by_id) | **GET** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Get an assessment by ID. +*AssessmentsV1Api* | [**v1_get_assessments_by_instance_id**](docs/AssessmentsV1Api.md#v1_get_assessments_by_instance_id) | **GET** /v1/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments | List assessments for an instance. +*AssessmentsV1Api* | [**v1_patch_assessment**](docs/AssessmentsV1Api.md#v1_patch_assessment) | **PATCH** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Update an assessment status. +*AssessmentsV1Api* | [**v1_run_tests**](docs/AssessmentsV1Api.md#v1_run_tests) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/test | Run assessment tests. +*AssessmentsV1Api* | [**v1_start_monitoring**](docs/AssessmentsV1Api.md#v1_start_monitoring) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/start | Start assessment monitoring. +*AssessmentsV1Api* | [**v1_stop_monitoring**](docs/AssessmentsV1Api.md#v1_stop_monitoring) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop | Stop assessment monitoring. ## Documentation For Models + - [AcceptSnapshotBody](docs/AcceptSnapshotBody.md) + - [AcceptSnapshotRequestPayload](docs/AcceptSnapshotRequestPayload.md) + - [AccountSetupResponse](docs/AccountSetupResponse.md) - [Activity](docs/Activity.md) - [ActivityExportDto](docs/ActivityExportDto.md) + - [ActivityExportFormat](docs/ActivityExportFormat.md) - [ActivityExportResponse](docs/ActivityExportResponse.md) + - [ActivityExportStatus](docs/ActivityExportStatus.md) + - [ActivityExportTask](docs/ActivityExportTask.md) + - [ActivityExportTaskList](docs/ActivityExportTaskList.md) - [ActivityList](docs/ActivityList.md) + - [ActivityListResponse](docs/ActivityListResponse.md) - [ActivityRequest](docs/ActivityRequest.md) + - [ActivityResourceNotStartsWithFilter](docs/ActivityResourceNotStartsWithFilter.md) + - [ActivityResourceStartsWithFilter](docs/ActivityResourceStartsWithFilter.md) + - [ActivityV1](docs/ActivityV1.md) - [Address](docs/Address.md) - [AgentApp](docs/AgentApp.md) - [AgentAppReadyResponse](docs/AgentAppReadyResponse.md) + - [AgentAppReadyResponseV1](docs/AgentAppReadyResponseV1.md) - [AgentAppStatus](docs/AgentAppStatus.md) + - [AgentAppStatusV1](docs/AgentAppStatusV1.md) + - [AgentAppV1](docs/AgentAppV1.md) - [AgentAppsList](docs/AgentAppsList.md) + - [AgentAppsListV1](docs/AgentAppsListV1.md) - [AgentAppsStatusList](docs/AgentAppsStatusList.md) + - [AgentAppsStatusListV1](docs/AgentAppsStatusListV1.md) + - [AgentContainer](docs/AgentContainer.md) + - [AgentContainerHealth](docs/AgentContainerHealth.md) + - [AgentContainerList](docs/AgentContainerList.md) - [AgentError](docs/AgentError.md) + - [AgentErrorV1](docs/AgentErrorV1.md) + - [AgentFileArchiveDownloadBody](docs/AgentFileArchiveDownloadBody.md) + - [AgentFileAttributesBody](docs/AgentFileAttributesBody.md) + - [AgentFileDownloadToken](docs/AgentFileDownloadToken.md) + - [AgentFridaProcessList](docs/AgentFridaProcessList.md) + - [AgentFridaProcessListAttached](docs/AgentFridaProcessListAttached.md) + - [AgentFridaResponse](docs/AgentFridaResponse.md) + - [AgentFridaRunBody](docs/AgentFridaRunBody.md) - [AgentIcons](docs/AgentIcons.md) + - [AgentIconsResponse](docs/AgentIconsResponse.md) - [AgentInstallBody](docs/AgentInstallBody.md) + - [AgentInstallBodyV1](docs/AgentInstallBodyV1.md) + - [AgentProfileListResponse](docs/AgentProfileListResponse.md) - [AgentProfilesReturn](docs/AgentProfilesReturn.md) + - [AgentRemoteItStatus](docs/AgentRemoteItStatus.md) - [AgentSystemAdbAuth](docs/AgentSystemAdbAuth.md) + - [AgentSystemAdbAuthV1](docs/AgentSystemAdbAuthV1.md) - [AgentSystemGetPropBody](docs/AgentSystemGetPropBody.md) + - [AgentSystemGetPropBodyV1](docs/AgentSystemGetPropBodyV1.md) + - [AgentSystemGetPropResponse](docs/AgentSystemGetPropResponse.md) + - [AgentSystemInstallOpenGappsBody](docs/AgentSystemInstallOpenGappsBody.md) + - [AgentSystemNetworkResponse](docs/AgentSystemNetworkResponse.md) + - [AgentSystemResult](docs/AgentSystemResult.md) + - [AgentSystemSetDevicePropertiesBody](docs/AgentSystemSetDevicePropertiesBody.md) - [AgentSystemSetHostnameBody](docs/AgentSystemSetHostnameBody.md) + - [AgentSystemSetHostnameBodyV1](docs/AgentSystemSetHostnameBodyV1.md) + - [AgentTempFileResponse](docs/AgentTempFileResponse.md) - [AgentValueReturn](docs/AgentValueReturn.md) - [AgreedAck](docs/AgreedAck.md) + - [AgreedAckV1](docs/AgreedAckV1.md) + - [AiToolsConfig](docs/AiToolsConfig.md) + - [AiToolsConfigV1](docs/AiToolsConfigV1.md) + - [AllowedDevicesFilterSchema](docs/AllowedDevicesFilterSchema.md) - [AllowedDomainsResponse](docs/AllowedDomainsResponse.md) + - [AllowedFirmwareSchema](docs/AllowedFirmwareSchema.md) - [ApiConflictError](docs/ApiConflictError.md) + - [ApiConflictErrorV1](docs/ApiConflictErrorV1.md) - [ApiError](docs/ApiError.md) + - [ApiErrorV1](docs/ApiErrorV1.md) - [ApiInternalConsistencyError](docs/ApiInternalConsistencyError.md) - [ApiNotFoundError](docs/ApiNotFoundError.md) + - [ApiNotFoundErrorV1](docs/ApiNotFoundErrorV1.md) - [ApiToken](docs/ApiToken.md) + - [ApiTokenResult](docs/ApiTokenResult.md) + - [ArtifactsPath](docs/ArtifactsPath.md) - [Assessment](docs/Assessment.md) + - [AssessmentBundle](docs/AssessmentBundle.md) + - [AssessmentFormat](docs/AssessmentFormat.md) + - [AssessmentFridaScript](docs/AssessmentFridaScript.md) - [AssessmentHistory](docs/AssessmentHistory.md) - [AssessmentHistoryLineItem](docs/AssessmentHistoryLineItem.md) + - [AssessmentHistoryResultsInner](docs/AssessmentHistoryResultsInner.md) + - [AssessmentHistoryV1](docs/AssessmentHistoryV1.md) - [AssessmentIdStatus](docs/AssessmentIdStatus.md) + - [AssessmentMetadata](docs/AssessmentMetadata.md) + - [AssessmentResults](docs/AssessmentResults.md) + - [AssessmentSeverityCounts](docs/AssessmentSeverityCounts.md) + - [AssessmentStatus](docs/AssessmentStatus.md) + - [AssessmentWordlist](docs/AssessmentWordlist.md) + - [AttachInterfaceBody](docs/AttachInterfaceBody.md) - [AttachInterfaceRequest](docs/AttachInterfaceRequest.md) - [AuthProvider](docs/AuthProvider.md) + - [AuthProviderType](docs/AuthProviderType.md) + - [AuthProviderTypesListResponse](docs/AuthProviderTypesListResponse.md) + - [AuthProviderV1](docs/AuthProviderV1.md) + - [AuthProvidersListResponse](docs/AuthProvidersListResponse.md) + - [AvailablePlansListResponse](docs/AvailablePlansListResponse.md) + - [AvailableTrialPlan](docs/AvailableTrialPlan.md) + - [AvailableTrialPlanList](docs/AvailableTrialPlanList.md) + - [AwsCreateResponse](docs/AwsCreateResponse.md) + - [BillingLineItem](docs/BillingLineItem.md) + - [BillingSummary](docs/BillingSummary.md) + - [BillingSummaryPendingUsageBased](docs/BillingSummaryPendingUsageBased.md) - [Bit](docs/Bit.md) - [BtraceEnableOptions](docs/BtraceEnableOptions.md) - [Button](docs/Button.md) + - [CancelSubscriptionBody](docs/CancelSubscriptionBody.md) + - [ChangePasswordBody](docs/ChangePasswordBody.md) + - [CharmTag](docs/CharmTag.md) - [CheckSubdomainResponse](docs/CheckSubdomainResponse.md) + - [CheckSubdomainResponseV1](docs/CheckSubdomainResponseV1.md) + - [CloudNotificationItem](docs/CloudNotificationItem.md) + - [CloudNotificationList](docs/CloudNotificationList.md) + - [ClusterConfig](docs/ClusterConfig.md) + - [ClusterConfigCoordinatorConfig](docs/ClusterConfigCoordinatorConfig.md) + - [ClusterConfigCoordinatorConfigAuthProvidersInner](docs/ClusterConfigCoordinatorConfigAuthProvidersInner.md) + - [ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf](docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.md) + - [ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1](docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.md) + - [ClusterConfigCoordinatorConfigAwsMarketplace](docs/ClusterConfigCoordinatorConfigAwsMarketplace.md) + - [ClusterConfigCoordinatorConfigEnsureDomain](docs/ClusterConfigCoordinatorConfigEnsureDomain.md) + - [ClusterConfigCoordinatorConfigEnsureDomainProperties](docs/ClusterConfigCoordinatorConfigEnsureDomainProperties.md) + - [ClusterConfigCoordinatorConfigEnsureDomainQuotas](docs/ClusterConfigCoordinatorConfigEnsureDomainQuotas.md) + - [ClusterConfigCoordinatorConfigHubspot](docs/ClusterConfigCoordinatorConfigHubspot.md) + - [ClusterConfigCoordinatorConfigHypertune](docs/ClusterConfigCoordinatorConfigHypertune.md) + - [ClusterConfigCoordinatorConfigPipedrive](docs/ClusterConfigCoordinatorConfigPipedrive.md) + - [ClusterConfigCoordinatorConfigTrial](docs/ClusterConfigCoordinatorConfigTrial.md) + - [ClusterConfigCoordinatorConfigWebplayer](docs/ClusterConfigCoordinatorConfigWebplayer.md) + - [ClusterConfigFirmwareServiceConfig](docs/ClusterConfigFirmwareServiceConfig.md) + - [ClusterConfigIpswFiltersInner](docs/ClusterConfigIpswFiltersInner.md) + - [ClusterConfigIpswFiltersInnerDevice](docs/ClusterConfigIpswFiltersInnerDevice.md) + - [ClusterConfigIpswFiltersInnerVersion](docs/ClusterConfigIpswFiltersInnerVersion.md) + - [ClusterConfigMaintenance](docs/ClusterConfigMaintenance.md) + - [ClusterConfigNetMonCA](docs/ClusterConfigNetMonCA.md) + - [ClusterConfigNodeSpecificConfig](docs/ClusterConfigNodeSpecificConfig.md) + - [ClusterConfigPackageConfig](docs/ClusterConfigPackageConfig.md) + - [ClusterConfigPackageConfigComponents](docs/ClusterConfigPackageConfigComponents.md) + - [ClusterConfigPackageConfigFeatures](docs/ClusterConfigPackageConfigFeatures.md) + - [ClusterConfigPackageConfigFlavorFiltersInner](docs/ClusterConfigPackageConfigFlavorFiltersInner.md) + - [ClusterConfigPackageConfigFlavorFiltersInnerApply](docs/ClusterConfigPackageConfigFlavorFiltersInnerApply.md) + - [ClusterConfigPackageConfigFlavorFiltersInnerFilter](docs/ClusterConfigPackageConfigFlavorFiltersInnerFilter.md) + - [ClusterConfigSetupConfig](docs/ClusterConfigSetupConfig.md) + - [ClusterConfigStripe](docs/ClusterConfigStripe.md) + - [ClusterConfigUpdateError](docs/ClusterConfigUpdateError.md) + - [ClusterConfigurationPayload](docs/ClusterConfigurationPayload.md) + - [ClusterNode](docs/ClusterNode.md) + - [ClusterNodeAvailable](docs/ClusterNodeAvailable.md) + - [ClusterNodeReserved](docs/ClusterNodeReserved.md) + - [ClusterNodeStatus](docs/ClusterNodeStatus.md) + - [ClusterNodeStatusClusterTotals](docs/ClusterNodeStatusClusterTotals.md) + - [ClusterNodeStatusClusterTotalsAvailable](docs/ClusterNodeStatusClusterTotalsAvailable.md) + - [ClusterNodeStatusClusterTotalsReserved](docs/ClusterNodeStatusClusterTotalsReserved.md) + - [ClusterNodeStatusClusterTotalsTotal](docs/ClusterNodeStatusClusterTotalsTotal.md) + - [ClusterNodeTotal](docs/ClusterNodeTotal.md) + - [ClusterSnapshot](docs/ClusterSnapshot.md) + - [ClusterSnapshotList](docs/ClusterSnapshotList.md) + - [ClusterSnapshotMetadata](docs/ClusterSnapshotMetadata.md) + - [ClusterSnapshotStatus](docs/ClusterSnapshotStatus.md) + - [ClusterSnapshotV1](docs/ClusterSnapshotV1.md) + - [ComputeNodeFile](docs/ComputeNodeFile.md) + - [ComputeNodeFileList](docs/ComputeNodeFileList.md) + - [ConfigAuthProvider](docs/ConfigAuthProvider.md) - [ConfigResponse](docs/ConfigResponse.md) + - [ConfigResponseAiToolsConfig](docs/ConfigResponseAiToolsConfig.md) - [ConfigResponseMaintenance](docs/ConfigResponseMaintenance.md) + - [ConfigResponseV1](docs/ConfigResponseV1.md) + - [CoordinatorConfig](docs/CoordinatorConfig.md) + - [CoordinatorConfigV1](docs/CoordinatorConfigV1.md) - [CouponOptions](docs/CouponOptions.md) - - [CreateAssessmentDto](docs/CreateAssessmentDto.md) - - [CreateInterconnectRequest](docs/CreateInterconnectRequest.md) + - [CreateActivityExportBody](docs/CreateActivityExportBody.md) + - [CreateActivityExportResponse](docs/CreateActivityExportResponse.md) + - [CreateAssessmentInput](docs/CreateAssessmentInput.md) + - [CreateCloudAdminTrialRequestBody](docs/CreateCloudAdminTrialRequestBody.md) + - [CreateDomainAuthProviderBody](docs/CreateDomainAuthProviderBody.md) + - [CreateDomainAuthProviderResponse](docs/CreateDomainAuthProviderResponse.md) + - [CreateDomainAuthProviderResponseConfig](docs/CreateDomainAuthProviderResponseConfig.md) + - [CreateDomainWelcomeMessageBody](docs/CreateDomainWelcomeMessageBody.md) + - [CreateHookBody](docs/CreateHookBody.md) + - [CreateImageBody](docs/CreateImageBody.md) + - [CreateInstanceBody](docs/CreateInstanceBody.md) + - [CreateInstanceResponse](docs/CreateInstanceResponse.md) + - [CreateInterconnectBody](docs/CreateInterconnectBody.md) + - [CreateInterconnectV3Body](docs/CreateInterconnectV3Body.md) + - [CreateInvitesBody](docs/CreateInvitesBody.md) + - [CreateNetworkConnectionBody](docs/CreateNetworkConnectionBody.md) - [CreateNetworkConnectionOptions](docs/CreateNetworkConnectionOptions.md) + - [CreateOpenVPNNetworkConnectionBody](docs/CreateOpenVPNNetworkConnectionBody.md) + - [CreateOpenVPNNetworkConnectionBodyV1](docs/CreateOpenVPNNetworkConnectionBodyV1.md) + - [CreateProjectBody](docs/CreateProjectBody.md) + - [CreateProjectKeyBody](docs/CreateProjectKeyBody.md) + - [CreateSnapshotBody](docs/CreateSnapshotBody.md) - [CreateTeam](docs/CreateTeam.md) + - [CreateTeamBody](docs/CreateTeamBody.md) + - [CreateTrialRequestBody](docs/CreateTrialRequestBody.md) + - [CreateTrialRequestResponse](docs/CreateTrialRequestResponse.md) + - [CreateTrialRequestResponseTrialRequest](docs/CreateTrialRequestResponseTrialRequest.md) + - [CreateUserBody](docs/CreateUserBody.md) + - [CreateVLANNetworkConnectionBody](docs/CreateVLANNetworkConnectionBody.md) + - [CreateVLANNetworkConnectionBodyV1](docs/CreateVLANNetworkConnectionBodyV1.md) + - [CreateWebPlayerSessionBody](docs/CreateWebPlayerSessionBody.md) - [CreatedBy](docs/CreatedBy.md) - [Credentials](docs/Credentials.md) + - [DeleteModificationInput](docs/DeleteModificationInput.md) + - [DeleteNetworkConnectionOptions](docs/DeleteNetworkConnectionOptions.md) + - [DeploymentVersion](docs/DeploymentVersion.md) + - [DetachInterfaceBody](docs/DetachInterfaceBody.md) - [DetachInterfaceRequest](docs/DetachInterfaceRequest.md) - [Device](docs/Device.md) + - [DeviceAutoShutdownSchema](docs/DeviceAutoShutdownSchema.md) + - [DeviceUsage](docs/DeviceUsage.md) + - [DomainAuthProviderConfig](docs/DomainAuthProviderConfig.md) - [DomainAuthProviderRequest](docs/DomainAuthProviderRequest.md) - [DomainAuthProviderResponse](docs/DomainAuthProviderResponse.md) + - [DomainAuthProviderResponseV1](docs/DomainAuthProviderResponseV1.md) + - [DomainAuthProvidersList](docs/DomainAuthProvidersList.md) + - [DomainConfig](docs/DomainConfig.md) + - [DomainConfigInput](docs/DomainConfigInput.md) + - [DomainConfigInputSnapshotSharingPermissions](docs/DomainConfigInputSnapshotSharingPermissions.md) + - [DomainConfigInputTrial](docs/DomainConfigInputTrial.md) + - [DomainConfigInputWebplayer](docs/DomainConfigInputWebplayer.md) + - [DomainConfigSnapshotSharingPermissions](docs/DomainConfigSnapshotSharingPermissions.md) + - [DomainConfigTrial](docs/DomainConfigTrial.md) + - [DomainConfigTrialEndAction](docs/DomainConfigTrialEndAction.md) + - [DomainConfigTrialSubscribeAction](docs/DomainConfigTrialSubscribeAction.md) + - [DomainConfigWebplayer](docs/DomainConfigWebplayer.md) + - [DomainInfo](docs/DomainInfo.md) + - [DomainList](docs/DomainList.md) + - [DomainListItem](docs/DomainListItem.md) + - [DomainListItemDisabled](docs/DomainListItemDisabled.md) + - [DomainListItemDomainUsageInner](docs/DomainListItemDomainUsageInner.md) + - [DomainListItemProjectsInner](docs/DomainListItemProjectsInner.md) + - [DomainListItemProjectsInnerInstancesInner](docs/DomainListItemProjectsInnerInstancesInner.md) + - [DomainListItemProjectsInnerInstancesInnerImagesInner](docs/DomainListItemProjectsInnerInstancesInnerImagesInner.md) + - [DomainListItemProjectsInnerInstancesInnerUsage](docs/DomainListItemProjectsInnerInstancesInnerUsage.md) + - [DomainListItemProjectsInnerQuotas](docs/DomainListItemProjectsInnerQuotas.md) + - [DomainListItemProjectsInnerUsage](docs/DomainListItemProjectsInnerUsage.md) + - [DomainListItemQuotas](docs/DomainListItemQuotas.md) + - [DomainListItemSubscription](docs/DomainListItemSubscription.md) + - [DomainListItemSubscriptionHistoryInner](docs/DomainListItemSubscriptionHistoryInner.md) + - [DomainListItemSubscriptionHistoryInnerAdministrator](docs/DomainListItemSubscriptionHistoryInnerAdministrator.md) + - [DomainListItemUsage](docs/DomainListItemUsage.md) + - [DomainListItemUsersInfoInner](docs/DomainListItemUsersInfoInner.md) + - [DomainListUsage](docs/DomainListUsage.md) - [DomainOptions](docs/DomainOptions.md) + - [DomainSoftware](docs/DomainSoftware.md) + - [DomainSoftwareList](docs/DomainSoftwareList.md) + - [DomainWelcomeMessageResponse](docs/DomainWelcomeMessageResponse.md) + - [DomainWelcomeMessageResponseV1](docs/DomainWelcomeMessageResponseV1.md) + - [EditInvitesBody](docs/EditInvitesBody.md) + - [EditInvitesBodyChanges](docs/EditInvitesBodyChanges.md) + - [EnableBtraceBody](docs/EnableBtraceBody.md) + - [EnableNetdumpBody](docs/EnableNetdumpBody.md) + - [EnableSslsplitBody](docs/EnableSslsplitBody.md) + - [EnsureDomainSettingsBody](docs/EnsureDomainSettingsBody.md) + - [EnsureDomainSettingsBodyAdminUser](docs/EnsureDomainSettingsBodyAdminUser.md) + - [EnsureDomainSettingsResponse](docs/EnsureDomainSettingsResponse.md) + - [EnsureDomainSettingsResponseUser](docs/EnsureDomainSettingsResponseUser.md) - [ExtendedFirmwareAssetInfo](docs/ExtendedFirmwareAssetInfo.md) + - [ExtendedFirmwareAssetInfoV1](docs/ExtendedFirmwareAssetInfoV1.md) - [Extension](docs/Extension.md) + - [ExtensionFlavor](docs/ExtensionFlavor.md) + - [ExtensionList](docs/ExtensionList.md) + - [ExtensionV1](docs/ExtensionV1.md) - [Features](docs/Features.md) + - [FetchFirmwareAssetsBody](docs/FetchFirmwareAssetsBody.md) + - [FetchFirmwareAssetsResponse](docs/FetchFirmwareAssetsResponse.md) + - [FetchFirmwareAssetsResponseFailedInner](docs/FetchFirmwareAssetsResponseFailedInner.md) - [FileChanges](docs/FileChanges.md) - [Firmware](docs/Firmware.md) - [FirmwareAsset](docs/FirmwareAsset.md) - - [GetAssessmentsByInstanceId500Response](docs/GetAssessmentsByInstanceId500Response.md) + - [FirmwareAssetFilter](docs/FirmwareAssetFilter.md) + - [FirmwareAssetList](docs/FirmwareAssetList.md) + - [FirmwareAssetV1](docs/FirmwareAssetV1.md) + - [FirmwareDevice](docs/FirmwareDevice.md) + - [FirmwareDeviceList](docs/FirmwareDeviceList.md) + - [FirmwareInfoDevice](docs/FirmwareInfoDevice.md) + - [FirmwareInfoDeviceFirmwaresInner](docs/FirmwareInfoDeviceFirmwaresInner.md) + - [FirmwareList](docs/FirmwareList.md) + - [FirmwareServiceConfig](docs/FirmwareServiceConfig.md) + - [FirmwareServiceConfigCacheFirmware](docs/FirmwareServiceConfigCacheFirmware.md) + - [FirmwareServiceConfigDownloadIpswFilters](docs/FirmwareServiceConfigDownloadIpswFilters.md) + - [FirmwareServiceConfigValue](docs/FirmwareServiceConfigValue.md) + - [FirmwareServiceConfiguration](docs/FirmwareServiceConfiguration.md) + - [FirmwareServiceSettings](docs/FirmwareServiceSettings.md) + - [FirmwareV1](docs/FirmwareV1.md) + - [FlavorFrame](docs/FlavorFrame.md) + - [FlavorFrameDimensions](docs/FlavorFrameDimensions.md) + - [FlavorFrameHome](docs/FlavorFrameHome.md) + - [FlavorFrameInner](docs/FlavorFrameInner.md) + - [GetFirmwareInfoBody](docs/GetFirmwareInfoBody.md) - [GetInterconnectsResponse](docs/GetInterconnectsResponse.md) + - [GetInviteByTokenBody](docs/GetInviteByTokenBody.md) + - [GetResetLinkInfoBody](docs/GetResetLinkInfoBody.md) + - [GetStorageResponse](docs/GetStorageResponse.md) - [GpioStateDefinition](docs/GpioStateDefinition.md) + - [GpioStateDefinitionBanksInnerInner](docs/GpioStateDefinitionBanksInnerInner.md) + - [GpioStateDefinitionV1](docs/GpioStateDefinitionV1.md) - [GpiosState](docs/GpiosState.md) - - [GrantTrialRequestResponse](docs/GrantTrialRequestResponse.md) + - [GpiosStateV1](docs/GpiosStateV1.md) - [Hook](docs/Hook.md) + - [HookList](docs/HookList.md) + - [HookPatchType](docs/HookPatchType.md) + - [HookV1](docs/HookV1.md) + - [HypertuneHashResponse](docs/HypertuneHashResponse.md) + - [HypertuneInitResponse](docs/HypertuneInitResponse.md) - [Image](docs/Image.md) + - [ImageCreationOptions](docs/ImageCreationOptions.md) + - [ImageEncoding](docs/ImageEncoding.md) + - [ImageExtended](docs/ImageExtended.md) + - [ImageExtendedDevice](docs/ImageExtendedDevice.md) + - [ImageFirmware](docs/ImageFirmware.md) + - [ImageFirmwareInfo](docs/ImageFirmwareInfo.md) + - [ImageFirmwareInfoBootArgs](docs/ImageFirmwareInfoBootArgs.md) + - [ImageList](docs/ImageList.md) + - [ImageType](docs/ImageType.md) + - [ImageV1](docs/ImageV1.md) - [InputResponse](docs/InputResponse.md) - - [InstallFirmwareRequest](docs/InstallFirmwareRequest.md) + - [InputResponseV1](docs/InputResponseV1.md) + - [InstallFirmwareAssetsBody](docs/InstallFirmwareAssetsBody.md) + - [InstallFirmwareAssetsBodyV1](docs/InstallFirmwareAssetsBodyV1.md) + - [InstallFirmwareAssetsResponse](docs/InstallFirmwareAssetsResponse.md) + - [InstallFirmwareAssetsResponseV1](docs/InstallFirmwareAssetsResponseV1.md) + - [InstallFirmwareBody](docs/InstallFirmwareBody.md) + - [InstallFirmwareBodyV1](docs/InstallFirmwareBodyV1.md) - [InstallFirmwareResponse](docs/InstallFirmwareResponse.md) + - [InstallFirmwareResponseV1](docs/InstallFirmwareResponseV1.md) + - [InstallFirmwareStatusResponse](docs/InstallFirmwareStatusResponse.md) - [Instance](docs/Instance.md) - [InstanceAgentState](docs/InstanceAgentState.md) + - [InstanceAgentStateV1](docs/InstanceAgentStateV1.md) - [InstanceBootOptions](docs/InstanceBootOptions.md) - [InstanceBootOptionsAdditionalTag](docs/InstanceBootOptionsAdditionalTag.md) + - [InstanceBootOptionsFvp](docs/InstanceBootOptionsFvp.md) + - [InstanceBootOptionsKernel](docs/InstanceBootOptionsKernel.md) + - [InstanceBootOptionsKernelV1](docs/InstanceBootOptionsKernelV1.md) + - [InstanceBootOptionsPongo](docs/InstanceBootOptionsPongo.md) + - [InstanceBootOptionsPongoV1](docs/InstanceBootOptionsPongoV1.md) + - [InstanceBootOptionsV1](docs/InstanceBootOptionsV1.md) + - [InstanceBootOptionsVMMIOInner](docs/InstanceBootOptionsVMMIOInner.md) + - [InstanceConsole](docs/InstanceConsole.md) - [InstanceConsoleEndpoint](docs/InstanceConsoleEndpoint.md) + - [InstanceConsoleEndpointV1](docs/InstanceConsoleEndpointV1.md) + - [InstanceConsoleV1](docs/InstanceConsoleV1.md) - [InstanceCreateOptions](docs/InstanceCreateOptions.md) - - [InstanceInput](docs/InstanceInput.md) + - [InstanceHyperTraceState](docs/InstanceHyperTraceState.md) + - [InstanceHyperTraceStateV1](docs/InstanceHyperTraceStateV1.md) + - [InstanceInputBody](docs/InstanceInputBody.md) + - [InstanceInputRequest](docs/InstanceInputRequest.md) - [InstanceInterface](docs/InstanceInterface.md) + - [InstanceInterfaceStatus](docs/InstanceInterfaceStatus.md) + - [InstanceList](docs/InstanceList.md) - [InstanceNetdumpState](docs/InstanceNetdumpState.md) + - [InstanceNetdumpStateV1](docs/InstanceNetdumpStateV1.md) - [InstanceNetmonState](docs/InstanceNetmonState.md) + - [InstanceNetmonStateV1](docs/InstanceNetmonStateV1.md) + - [InstanceReadOnlyStatus](docs/InstanceReadOnlyStatus.md) + - [InstanceReadOnlyStatusV1](docs/InstanceReadOnlyStatusV1.md) + - [InstanceRestoreStatus](docs/InstanceRestoreStatus.md) + - [InstanceRestoreStatusV1](docs/InstanceRestoreStatusV1.md) - [InstanceReturn](docs/InstanceReturn.md) - [InstanceServices](docs/InstanceServices.md) + - [InstanceServicesV1](docs/InstanceServicesV1.md) + - [InstanceSnapshotsList](docs/InstanceSnapshotsList.md) - [InstanceStartOptions](docs/InstanceStartOptions.md) - [InstanceState](docs/InstanceState.md) + - [InstanceStateV1](docs/InstanceStateV1.md) - [InstanceStopOptions](docs/InstanceStopOptions.md) + - [InstanceTraceFilter](docs/InstanceTraceFilter.md) + - [InstanceTraceState](docs/InstanceTraceState.md) + - [InstanceTraceStateV1](docs/InstanceTraceStateV1.md) + - [InstanceUefiBootloader](docs/InstanceUefiBootloader.md) - [InstanceUpgradeBody](docs/InstanceUpgradeBody.md) + - [InstanceUpgradeBodyV1](docs/InstanceUpgradeBodyV1.md) + - [InstanceUpgradeResponse](docs/InstanceUpgradeResponse.md) + - [InstanceV1](docs/InstanceV1.md) + - [InsufficientStorageError](docs/InsufficientStorageError.md) + - [InsufficientStorageErrorV1](docs/InsufficientStorageErrorV1.md) + - [Interconnect](docs/Interconnect.md) + - [InterconnectList](docs/InterconnectList.md) + - [InterconnectProtocol](docs/InterconnectProtocol.md) - [InterconnectResponse](docs/InterconnectResponse.md) + - [InterfacesSchemaInner](docs/InterfacesSchemaInner.md) + - [InvalidCredentialsError](docs/InvalidCredentialsError.md) + - [InvalidTOTPError](docs/InvalidTOTPError.md) - [Invitation](docs/Invitation.md) + - [InvitationByToken](docs/InvitationByToken.md) + - [InvitationV1](docs/InvitationV1.md) + - [InviteCreated](docs/InviteCreated.md) + - [InviteCreatedEntry](docs/InviteCreatedEntry.md) + - [InviteResult](docs/InviteResult.md) + - [InviteResultError](docs/InviteResultError.md) - [InviteRevokeParams](docs/InviteRevokeParams.md) - - [InviteRevokeParamsIds](docs/InviteRevokeParamsIds.md) + - [InviteSettings](docs/InviteSettings.md) + - [InviteSignupBody](docs/InviteSignupBody.md) + - [InviteSignupBodyParams](docs/InviteSignupBodyParams.md) + - [InviteSignupResponse](docs/InviteSignupResponse.md) + - [InvitesListResponse](docs/InvitesListResponse.md) + - [IpswDeviceConstraint](docs/IpswDeviceConstraint.md) + - [IpswFilter](docs/IpswFilter.md) + - [IpswFilterV3](docs/IpswFilterV3.md) + - [IpswFilterV3Device](docs/IpswFilterV3Device.md) + - [IpswFilterV3Version](docs/IpswFilterV3Version.md) + - [IpswVersionConstraint](docs/IpswVersionConstraint.md) - [Kcrange](docs/Kcrange.md) + - [KcrangeV1](docs/KcrangeV1.md) - [KernelTask](docs/KernelTask.md) + - [KernelTaskV1](docs/KernelTaskV1.md) - [KernelThread](docs/KernelThread.md) + - [KernelThreadV1](docs/KernelThreadV1.md) + - [LDAPConfig](docs/LDAPConfig.md) + - [LayoutSchema](docs/LayoutSchema.md) + - [LdapAuthenticationCredentials](docs/LdapAuthenticationCredentials.md) + - [LdapGroupSearchConfiguration](docs/LdapGroupSearchConfiguration.md) + - [LdapServerConnectionDetails](docs/LdapServerConnectionDetails.md) + - [LdapUserAttributeMapping](docs/LdapUserAttributeMapping.md) + - [LdapUserSearchConfiguration](docs/LdapUserSearchConfiguration.md) + - [LoadExtensionBody](docs/LoadExtensionBody.md) - [Logging](docs/Logging.md) + - [LoggingV1](docs/LoggingV1.md) + - [LoginBody](docs/LoginBody.md) + - [LoginResult](docs/LoginResult.md) + - [LoginResultDisabled](docs/LoginResultDisabled.md) + - [LoginResultDomain](docs/LoginResultDomain.md) + - [LoginResultDomainDeviceAutoShutdown](docs/LoginResultDomainDeviceAutoShutdown.md) + - [LoginResultDomainDisabled](docs/LoginResultDomainDisabled.md) + - [LoginResultDomainSnapshotSharingPermissions](docs/LoginResultDomainSnapshotSharingPermissions.md) + - [LoginResultDomainTrial](docs/LoginResultDomainTrial.md) + - [LoginResultDomainWebplayer](docs/LoginResultDomainWebplayer.md) + - [LoginResultUser](docs/LoginResultUser.md) - [Maintenance](docs/Maintenance.md) + - [MatrixError](docs/MatrixError.md) - [MediaPlayBody](docs/MediaPlayBody.md) + - [MediaPlayBodyV1](docs/MediaPlayBodyV1.md) + - [MediaPlayByImage](docs/MediaPlayByImage.md) + - [MediaPlayByUrl](docs/MediaPlayByUrl.md) + - [MediaStore](docs/MediaStore.md) + - [MediaStoreV1](docs/MediaStoreV1.md) + - [MessageBody](docs/MessageBody.md) + - [MessageBodyAnyOf](docs/MessageBodyAnyOf.md) + - [MessageBodyAnyOf1](docs/MessageBodyAnyOf1.md) - [MeteredSubscriptionUsage](docs/MeteredSubscriptionUsage.md) + - [MeteredSubscriptionUsageV1](docs/MeteredSubscriptionUsageV1.md) - [Model](docs/Model.md) - - [ModelSoftware](docs/ModelSoftware.md) + - [ModelFirmware](docs/ModelFirmware.md) + - [ModelFirmwareSpringboardSnapshot](docs/ModelFirmwareSpringboardSnapshot.md) + - [ModelFirmwareSpringboardSnapshotVolumesInner](docs/ModelFirmwareSpringboardSnapshotVolumesInner.md) + - [ModelFrame](docs/ModelFrame.md) + - [ModelFrameDimensions](docs/ModelFrameDimensions.md) + - [ModelPartition](docs/ModelPartition.md) + - [ModelProductImage](docs/ModelProductImage.md) + - [ModelRect](docs/ModelRect.md) + - [ModelSoftwareV1](docs/ModelSoftwareV1.md) + - [ModelV1](docs/ModelV1.md) - [NetdumpFilter](docs/NetdumpFilter.md) - [NetworkConnection](docs/NetworkConnection.md) - - [NetworkConnectionOffsetPaginationResult](docs/NetworkConnectionOffsetPaginationResult.md) + - [NetworkConnectionConfig](docs/NetworkConnectionConfig.md) + - [NetworkConnectionPaginationResult](docs/NetworkConnectionPaginationResult.md) - [NetworkConnectionProvider](docs/NetworkConnectionProvider.md) - - [NetworkConnectionProviderOffsetPaginationResult](docs/NetworkConnectionProviderOffsetPaginationResult.md) + - [NetworkConnectionProviderPaginationResult](docs/NetworkConnectionProviderPaginationResult.md) + - [NetworkConnectionProviders](docs/NetworkConnectionProviders.md) + - [NetworkConnectionProvidersResultsInner](docs/NetworkConnectionProvidersResultsInner.md) + - [NetworkConnections](docs/NetworkConnections.md) + - [NetworkInterfaces](docs/NetworkInterfaces.md) + - [NetworkSchema](docs/NetworkSchema.md) + - [NetworkStatus](docs/NetworkStatus.md) - [NetworkStatusResponse](docs/NetworkStatusResponse.md) + - [NetworkStatusV1](docs/NetworkStatusV1.md) + - [NodeConsoleEndpoint](docs/NodeConsoleEndpoint.md) - [NodeInformation](docs/NodeInformation.md) + - [NodeInformationV1](docs/NodeInformationV1.md) + - [NodeList](docs/NodeList.md) + - [NodeUpdatesFailed](docs/NodeUpdatesFailed.md) - [OpenIDConfig](docs/OpenIDConfig.md) + - [OpenIDConfigV1](docs/OpenIDConfigV1.md) + - [OpenVPNConfig](docs/OpenVPNConfig.md) + - [OpenVPNConfigV1](docs/OpenVPNConfigV1.md) + - [OpenVPNNetworkConnection](docs/OpenVPNNetworkConnection.md) + - [OpenVPNNetworkConnectionProjectsValue](docs/OpenVPNNetworkConnectionProjectsValue.md) + - [OpenVPNNetworkConnectionV1](docs/OpenVPNNetworkConnectionV1.md) + - [PaginatedAssessments](docs/PaginatedAssessments.md) - [Pagination](docs/Pagination.md) - [PartialUpdateInterconnectRequest](docs/PartialUpdateInterconnectRequest.md) + - [PartialUpdateNetworkConnectionBody](docs/PartialUpdateNetworkConnectionBody.md) + - [PartialUpdateNetworkConnectionOptions](docs/PartialUpdateNetworkConnectionOptions.md) - [PasswordChangeBody](docs/PasswordChangeBody.md) - [PasswordResetBody](docs/PasswordResetBody.md) + - [PatchClusterConfigBody](docs/PatchClusterConfigBody.md) + - [PatchDomainAuthProviderBody](docs/PatchDomainAuthProviderBody.md) + - [PatchDomainBody](docs/PatchDomainBody.md) + - [PatchDomainBodyWebplayer](docs/PatchDomainBodyWebplayer.md) + - [PatchDomainWelcomeMessageBody](docs/PatchDomainWelcomeMessageBody.md) + - [PatchFirmwareServiceConfigBody](docs/PatchFirmwareServiceConfigBody.md) + - [PatchInstanceBody](docs/PatchInstanceBody.md) + - [PatchInstanceBodyProxyInner](docs/PatchInstanceBodyProxyInner.md) + - [PatchInstanceBodyStraceFilterInner](docs/PatchInstanceBodyStraceFilterInner.md) - [PatchInstanceOptions](docs/PatchInstanceOptions.md) - [PatchInstanceReadOnly](docs/PatchInstanceReadOnly.md) + - [PatchInstanceReadOnlyBody](docs/PatchInstanceReadOnlyBody.md) + - [PatchInterconnectBody](docs/PatchInterconnectBody.md) + - [PatchProjectBody](docs/PatchProjectBody.md) + - [PatchUserBody](docs/PatchUserBody.md) - [PeripheralsData](docs/PeripheralsData.md) + - [PeripheralsDataV1](docs/PeripheralsDataV1.md) - [Plan](docs/Plan.md) + - [PlanV1](docs/PlanV1.md) + - [PoolUsageSchema](docs/PoolUsageSchema.md) + - [PortalSession](docs/PortalSession.md) - [PostShareSnapshotRequestPayload](docs/PostShareSnapshotRequestPayload.md) - [Project](docs/Project.md) + - [ProjectConfig](docs/ProjectConfig.md) + - [ProjectInstanceList](docs/ProjectInstanceList.md) + - [ProjectInstanceSummary](docs/ProjectInstanceSummary.md) - [ProjectKey](docs/ProjectKey.md) + - [ProjectKeyList](docs/ProjectKeyList.md) + - [ProjectKeyV1](docs/ProjectKeyV1.md) + - [ProjectList](docs/ProjectList.md) + - [ProjectListItem](docs/ProjectListItem.md) - [ProjectNetworkState](docs/ProjectNetworkState.md) - [ProjectQuota](docs/ProjectQuota.md) + - [ProjectQuotaInput](docs/ProjectQuotaInput.md) + - [ProjectQuotaV1](docs/ProjectQuotaV1.md) - [ProjectSettings](docs/ProjectSettings.md) + - [ProjectSettingsV1](docs/ProjectSettingsV1.md) - [ProjectUsage](docs/ProjectUsage.md) + - [ProjectUsageV1](docs/ProjectUsageV1.md) + - [ProjectV1](docs/ProjectV1.md) + - [ProjectWithKeysV1](docs/ProjectWithKeysV1.md) + - [ProviderNetworkConnection](docs/ProviderNetworkConnection.md) - [ProxyConfig](docs/ProxyConfig.md) + - [RegisterServiceBody](docs/RegisterServiceBody.md) + - [ReportModificationInput](docs/ReportModificationInput.md) + - [ReportModificationResult](docs/ReportModificationResult.md) - [ResetLinkBody](docs/ResetLinkBody.md) + - [ResetLinkInfo](docs/ResetLinkInfo.md) - [ResetLinkInfoReturn](docs/ResetLinkInfoReturn.md) + - [ResetPasswordBody](docs/ResetPasswordBody.md) + - [ResetUnauthorizedResponse](docs/ResetUnauthorizedResponse.md) + - [RestoreBackupBody](docs/RestoreBackupBody.md) - [RestoreBackupData](docs/RestoreBackupData.md) + - [RevokeInvitesBody](docs/RevokeInvitesBody.md) + - [RevokeInvitesResponse](docs/RevokeInvitesResponse.md) - [Role](docs/Role.md) + - [RoleName](docs/RoleName.md) + - [RoleV1](docs/RoleV1.md) + - [RolesListResponse](docs/RolesListResponse.md) - [RotateBody](docs/RotateBody.md) + - [RotateBodyV1](docs/RotateBodyV1.md) + - [SAMLConfig](docs/SAMLConfig.md) + - [SamlGroupMapping](docs/SamlGroupMapping.md) + - [SamlIdentityProviderConfig](docs/SamlIdentityProviderConfig.md) + - [SamlServiceProviderConfig](docs/SamlServiceProviderConfig.md) + - [SamlUserAttributeMapping](docs/SamlUserAttributeMapping.md) + - [SendResetLinkBody](docs/SendResetLinkBody.md) + - [ServiceEndpointSchema](docs/ServiceEndpointSchema.md) + - [ServiceStatusRequestBody](docs/ServiceStatusRequestBody.md) + - [ServiceStatusRequestBodyVmsInner](docs/ServiceStatusRequestBodyVmsInner.md) + - [SetDomainWelcomeMessageBody](docs/SetDomainWelcomeMessageBody.md) + - [SetSnapshotPermissionsBody](docs/SetSnapshotPermissionsBody.md) + - [ShareSnapshotBody](docs/ShareSnapshotBody.md) + - [SharedSnapshot](docs/SharedSnapshot.md) - [SharedSnapshotsInfo](docs/SharedSnapshotsInfo.md) + - [SharedSnapshotsResponse](docs/SharedSnapshotsResponse.md) - [Snapshot](docs/Snapshot.md) - [SnapshotCreationOptions](docs/SnapshotCreationOptions.md) + - [SnapshotList](docs/SnapshotList.md) - [SnapshotMember](docs/SnapshotMember.md) + - [SnapshotMemberV1](docs/SnapshotMemberV1.md) - [SnapshotOwner](docs/SnapshotOwner.md) + - [SnapshotOwnerV1](docs/SnapshotOwnerV1.md) - [SnapshotPermissionsRequestPayload](docs/SnapshotPermissionsRequestPayload.md) + - [SnapshotRequest](docs/SnapshotRequest.md) - [SnapshotSharing](docs/SnapshotSharing.md) - [SnapshotSharingPermissions](docs/SnapshotSharingPermissions.md) + - [SnapshotSharingPermissionsRequestSchema](docs/SnapshotSharingPermissionsRequestSchema.md) + - [SnapshotSharingType](docs/SnapshotSharingType.md) + - [SnapshotSharingV1](docs/SnapshotSharingV1.md) - [SnapshotStatus](docs/SnapshotStatus.md) + - [SnapshotStatusV1](docs/SnapshotStatusV1.md) + - [SnapshotV1](docs/SnapshotV1.md) - [SslsplitFilter](docs/SslsplitFilter.md) - - [SubscriberInvite](docs/SubscriberInvite.md) + - [StartInstanceBody](docs/StartInstanceBody.md) + - [StopInstanceBody](docs/StopInstanceBody.md) + - [StorageAlreadyMountedResponse](docs/StorageAlreadyMountedResponse.md) + - [StorageAttachResponse](docs/StorageAttachResponse.md) + - [StorageDevice](docs/StorageDevice.md) + - [StorageDeviceList](docs/StorageDeviceList.md) + - [StorageEjectAlreadyUnmountedResponse](docs/StorageEjectAlreadyUnmountedResponse.md) + - [StorageFile](docs/StorageFile.md) + - [StorageFileList](docs/StorageFileList.md) + - [StorageList](docs/StorageList.md) + - [StorageQueueError](docs/StorageQueueError.md) + - [StripeCheckoutBody](docs/StripeCheckoutBody.md) + - [StripeCheckoutCompleteBody](docs/StripeCheckoutCompleteBody.md) + - [StripeWebhookAck](docs/StripeWebhookAck.md) + - [SubscribeToTrialBody](docs/SubscribeToTrialBody.md) + - [Subscription](docs/Subscription.md) + - [SubscriptionTrial](docs/SubscriptionTrial.md) + - [SysInfoSchema](docs/SysInfoSchema.md) + - [TaskStatus](docs/TaskStatus.md) - [Team](docs/Team.md) - [TeamCreate](docs/TeamCreate.md) - - [TestAssessmentDto](docs/TestAssessmentDto.md) + - [TeamCreated](docs/TeamCreated.md) + - [TeamUser](docs/TeamUser.md) + - [TeamV1](docs/TeamV1.md) + - [TeamsListResponse](docs/TeamsListResponse.md) + - [TestAssessmentInput](docs/TestAssessmentInput.md) - [TextInput](docs/TextInput.md) + - [TextInputRequest](docs/TextInputRequest.md) + - [TextInputRequestV1](docs/TextInputRequestV1.md) - [Token](docs/Token.md) + - [TokenV1](docs/TokenV1.md) + - [TokenValidateBody](docs/TokenValidateBody.md) + - [TotpDisableBody](docs/TotpDisableBody.md) + - [TotpEnableBody](docs/TotpEnableBody.md) + - [TotpGenerateResponse](docs/TotpGenerateResponse.md) - [TouchCurveInput](docs/TouchCurveInput.md) + - [TouchCurveInputRequest](docs/TouchCurveInputRequest.md) + - [TouchCurveInputRequestV1](docs/TouchCurveInputRequestV1.md) - [TouchInput](docs/TouchInput.md) - - [TouchInputButtonsInner](docs/TouchInputButtonsInner.md) + - [TouchInputRequest](docs/TouchInputRequest.md) + - [TouchInputRequestV1](docs/TouchInputRequestV1.md) - [Trial](docs/Trial.md) - [TrialExtension](docs/TrialExtension.md) + - [TrialExtensionV1](docs/TrialExtensionV1.md) + - [TrialRequest](docs/TrialRequest.md) + - [TrialRequestDetail](docs/TrialRequestDetail.md) + - [TrialRequestDetailOrganization](docs/TrialRequestDetailOrganization.md) + - [TrialRequestListResponse](docs/TrialRequestListResponse.md) - [TrialRequestMetadata](docs/TrialRequestMetadata.md) - [TrialRequestOptions](docs/TrialRequestOptions.md) - - [UpdateAssessmentDto](docs/UpdateAssessmentDto.md) + - [TrialV1](docs/TrialV1.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [UncancelSubscriptionBody](docs/UncancelSubscriptionBody.md) + - [UpdateAssessmentInput](docs/UpdateAssessmentInput.md) + - [UpdateDomainSettingsResponse](docs/UpdateDomainSettingsResponse.md) + - [UpdateDomainSettingsResponseSettings](docs/UpdateDomainSettingsResponseSettings.md) + - [UpdateDomainSettingsResponseSnapshotSharingPermissions](docs/UpdateDomainSettingsResponseSnapshotSharingPermissions.md) + - [UpdateDomainSettingsResponseWebplayer](docs/UpdateDomainSettingsResponseWebplayer.md) + - [UpdateDomainWelcomeMessageRequest](docs/UpdateDomainWelcomeMessageRequest.md) - [UpdateExtension](docs/UpdateExtension.md) - - [UpdateInterconnectRequest](docs/UpdateInterconnectRequest.md) + - [UpdateExtensionBody](docs/UpdateExtensionBody.md) + - [UpdateHookBody](docs/UpdateHookBody.md) + - [UpdateInterconnectBody](docs/UpdateInterconnectBody.md) + - [UpdateInterconnectV3Body](docs/UpdateInterconnectV3Body.md) + - [UpdateNetworkConnectionBody](docs/UpdateNetworkConnectionBody.md) - [UpdateNetworkConnectionOptions](docs/UpdateNetworkConnectionOptions.md) + - [UpdateNetworkConnectionOptionsConfig](docs/UpdateNetworkConnectionOptionsConfig.md) + - [UpdateOwnProfileBody](docs/UpdateOwnProfileBody.md) + - [UpdateTeamBody](docs/UpdateTeamBody.md) + - [UpdateTrialRequestBody](docs/UpdateTrialRequestBody.md) - [UpdateTrialRequestParams](docs/UpdateTrialRequestParams.md) + - [UploadSizeError](docs/UploadSizeError.md) - [User](docs/User.md) - [UserCreate](docs/UserCreate.md) - [UserCreateReturn](docs/UserCreateReturn.md) + - [UserCreated](docs/UserCreated.md) - [UserError](docs/UserError.md) + - [UserErrorItem](docs/UserErrorItem.md) + - [UserErrorResponse](docs/UserErrorResponse.md) + - [UserErrorV1](docs/UserErrorV1.md) + - [UserErrors](docs/UserErrors.md) + - [UserErrorsV1](docs/UserErrorsV1.md) - [UserSnapshots](docs/UserSnapshots.md) - [UserUpdate](docs/UserUpdate.md) - [V1CheckSubdomainExistenceParameters](docs/V1CheckSubdomainExistenceParameters.md) @@ -448,23 +1358,42 @@ Class | Method | HTTP request | Description - [V1LoadExtensionParameters](docs/V1LoadExtensionParameters.md) - [V1SetStateBody](docs/V1SetStateBody.md) - [V1UpdateHookParameters](docs/V1UpdateHookParameters.md) + - [V3DeleteNetworkConnectionRequest](docs/V3DeleteNetworkConnectionRequest.md) + - [V3UpdateSnapshotRequest](docs/V3UpdateSnapshotRequest.md) + - [VLANConfig](docs/VLANConfig.md) + - [VLANConfigV1](docs/VLANConfigV1.md) + - [VLANNetworkConnection](docs/VLANNetworkConnection.md) + - [VLANNetworkConnectionV1](docs/VLANNetworkConnectionV1.md) - [ValidationError](docs/ValidationError.md) - [VolumeOptions](docs/VolumeOptions.md) + - [VolumeOptionsV1](docs/VolumeOptionsV1.md) + - [VpnConfigPreauthorization](docs/VpnConfigPreauthorization.md) - [VpnDefinition](docs/VpnDefinition.md) + - [VpnDefinitionV1](docs/VpnDefinitionV1.md) + - [VpnSchema](docs/VpnSchema.md) + - [WebPlayerAllowedDomains](docs/WebPlayerAllowedDomains.md) - [WebPlayerCreateSessionRequest](docs/WebPlayerCreateSessionRequest.md) + - [WebPlayerCreatedSession](docs/WebPlayerCreatedSession.md) + - [WebPlayerFeatures](docs/WebPlayerFeatures.md) - [WebPlayerSession](docs/WebPlayerSession.md) + - [WebPlayerSessionDomain](docs/WebPlayerSessionDomain.md) + - [WebPlayerSessionListResponse](docs/WebPlayerSessionListResponse.md) + - [WebPlayerSessionV1](docs/WebPlayerSessionV1.md) + ## Documentation For Authorization -## BearerAuth +Authentication schemes defined for the API: + +### BearerAuth -- **Type**: Bearer authentication (ApiToken or JWT) +- **Type**: Bearer authentication (JWT) ## Author - +support@corellium.com diff --git a/corellium/__init__.py b/corellium/__init__.py new file mode 100644 index 0000000..7e4ff9c --- /dev/null +++ b/corellium/__init__.py @@ -0,0 +1,1563 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "0.1.0" + +# Define package exports +__all__ = [ + "ActivityApi", + "ActivityV1Api", + "AgentApi", + "AgentV1Api", + "AuthenticationApi", + "AuthenticationV1Api", + "BillingApi", + "ClusterApi", + "ClusterAdministrationConfigApi", + "ClusterAdministrationFirmwareServiceApi", + "ClusterAdministrationNodesApi", + "ClusterSnapshotsApi", + "ConfigApi", + "ConfigV1Api", + "CoreTraceApi", + "CoreTraceV1Api", + "DomainApi", + "DomainAuthProviderApi", + "DomainAuthProvidersApi", + "DomainV1Api", + "ExtensionsApi", + "ExtensionsV1Api", + "ExternalServicesApi", + "FirmwareServiceApi", + "FlavorsApi", + "HyperTraceApi", + "HyperTraceV1Api", + "HypertuneApi", + "HypervisorHooksApi", + "HypervisorHooksV1Api", + "ImagesApi", + "ImagesV1Api", + "ImagesV2Api", + "InstancesApi", + "InstancesV1Api", + "InstancesV2Api", + "InterconnectsApi", + "InterconnectsV1Api", + "InvitesApi", + "InvitesV1Api", + "ModelsApi", + "ModelsV1Api", + "NetConnectApi", + "NetConnectV1Api", + "ProjectsApi", + "ProjectsV1Api", + "RAMDumpApi", + "RAMDumpV1Api", + "RolesApi", + "RolesV1Api", + "SnapshotSharingApi", + "SnapshotSharingV1Api", + "SnapshotsApi", + "SnapshotsV1Api", + "StatusApi", + "StatusV1Api", + "StorageApi", + "StorageV1Api", + "TOTPApi", + "TeamsApi", + "TeamsV1Api", + "UsersApi", + "UsersV1Api", + "WebPlayerApi", + "WebPlayerV1Api", + "AssessmentsApi", + "AssessmentsV1Api", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "AcceptSnapshotBody", + "AcceptSnapshotRequestPayload", + "AccountSetupResponse", + "Activity", + "ActivityExportDto", + "ActivityExportFormat", + "ActivityExportResponse", + "ActivityExportStatus", + "ActivityExportTask", + "ActivityExportTaskList", + "ActivityList", + "ActivityListResponse", + "ActivityRequest", + "ActivityResourceNotStartsWithFilter", + "ActivityResourceStartsWithFilter", + "ActivityV1", + "Address", + "AgentApp", + "AgentAppReadyResponse", + "AgentAppReadyResponseV1", + "AgentAppStatus", + "AgentAppStatusV1", + "AgentAppV1", + "AgentAppsList", + "AgentAppsListV1", + "AgentAppsStatusList", + "AgentAppsStatusListV1", + "AgentContainer", + "AgentContainerHealth", + "AgentContainerList", + "AgentError", + "AgentErrorV1", + "AgentFileArchiveDownloadBody", + "AgentFileAttributesBody", + "AgentFileDownloadToken", + "AgentFridaProcessList", + "AgentFridaProcessListAttached", + "AgentFridaResponse", + "AgentFridaRunBody", + "AgentIcons", + "AgentIconsResponse", + "AgentInstallBody", + "AgentInstallBodyV1", + "AgentProfileListResponse", + "AgentProfilesReturn", + "AgentRemoteItStatus", + "AgentSystemAdbAuth", + "AgentSystemAdbAuthV1", + "AgentSystemGetPropBody", + "AgentSystemGetPropBodyV1", + "AgentSystemGetPropResponse", + "AgentSystemInstallOpenGappsBody", + "AgentSystemNetworkResponse", + "AgentSystemResult", + "AgentSystemSetDevicePropertiesBody", + "AgentSystemSetHostnameBody", + "AgentSystemSetHostnameBodyV1", + "AgentTempFileResponse", + "AgentValueReturn", + "AgreedAck", + "AgreedAckV1", + "AiToolsConfig", + "AiToolsConfigV1", + "AllowedDevicesFilterSchema", + "AllowedDomainsResponse", + "AllowedFirmwareSchema", + "ApiConflictError", + "ApiConflictErrorV1", + "ApiError", + "ApiErrorV1", + "ApiInternalConsistencyError", + "ApiNotFoundError", + "ApiNotFoundErrorV1", + "ApiToken", + "ApiTokenResult", + "ArtifactsPath", + "Assessment", + "AssessmentBundle", + "AssessmentFormat", + "AssessmentFridaScript", + "AssessmentHistory", + "AssessmentHistoryLineItem", + "AssessmentHistoryResultsInner", + "AssessmentHistoryV1", + "AssessmentIdStatus", + "AssessmentMetadata", + "AssessmentResults", + "AssessmentSeverityCounts", + "AssessmentStatus", + "AssessmentWordlist", + "AttachInterfaceBody", + "AttachInterfaceRequest", + "AuthProvider", + "AuthProviderType", + "AuthProviderTypesListResponse", + "AuthProviderV1", + "AuthProvidersListResponse", + "AvailablePlansListResponse", + "AvailableTrialPlan", + "AvailableTrialPlanList", + "AwsCreateResponse", + "BillingLineItem", + "BillingSummary", + "BillingSummaryPendingUsageBased", + "Bit", + "BtraceEnableOptions", + "Button", + "CancelSubscriptionBody", + "ChangePasswordBody", + "CharmTag", + "CheckSubdomainResponse", + "CheckSubdomainResponseV1", + "CloudNotificationItem", + "CloudNotificationList", + "ClusterConfig", + "ClusterConfigCoordinatorConfig", + "ClusterConfigCoordinatorConfigAuthProvidersInner", + "ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf", + "ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1", + "ClusterConfigCoordinatorConfigAwsMarketplace", + "ClusterConfigCoordinatorConfigEnsureDomain", + "ClusterConfigCoordinatorConfigEnsureDomainProperties", + "ClusterConfigCoordinatorConfigEnsureDomainQuotas", + "ClusterConfigCoordinatorConfigHubspot", + "ClusterConfigCoordinatorConfigHypertune", + "ClusterConfigCoordinatorConfigPipedrive", + "ClusterConfigCoordinatorConfigTrial", + "ClusterConfigCoordinatorConfigWebplayer", + "ClusterConfigFirmwareServiceConfig", + "ClusterConfigIpswFiltersInner", + "ClusterConfigIpswFiltersInnerDevice", + "ClusterConfigIpswFiltersInnerVersion", + "ClusterConfigMaintenance", + "ClusterConfigNetMonCA", + "ClusterConfigNodeSpecificConfig", + "ClusterConfigPackageConfig", + "ClusterConfigPackageConfigComponents", + "ClusterConfigPackageConfigFeatures", + "ClusterConfigPackageConfigFlavorFiltersInner", + "ClusterConfigPackageConfigFlavorFiltersInnerApply", + "ClusterConfigPackageConfigFlavorFiltersInnerFilter", + "ClusterConfigSetupConfig", + "ClusterConfigStripe", + "ClusterConfigUpdateError", + "ClusterConfigurationPayload", + "ClusterNode", + "ClusterNodeAvailable", + "ClusterNodeReserved", + "ClusterNodeStatus", + "ClusterNodeStatusClusterTotals", + "ClusterNodeStatusClusterTotalsAvailable", + "ClusterNodeStatusClusterTotalsReserved", + "ClusterNodeStatusClusterTotalsTotal", + "ClusterNodeTotal", + "ClusterSnapshot", + "ClusterSnapshotList", + "ClusterSnapshotMetadata", + "ClusterSnapshotStatus", + "ClusterSnapshotV1", + "ComputeNodeFile", + "ComputeNodeFileList", + "ConfigAuthProvider", + "ConfigResponse", + "ConfigResponseAiToolsConfig", + "ConfigResponseMaintenance", + "ConfigResponseV1", + "CoordinatorConfig", + "CoordinatorConfigV1", + "CouponOptions", + "CreateActivityExportBody", + "CreateActivityExportResponse", + "CreateAssessmentInput", + "CreateCloudAdminTrialRequestBody", + "CreateDomainAuthProviderBody", + "CreateDomainAuthProviderResponse", + "CreateDomainAuthProviderResponseConfig", + "CreateDomainWelcomeMessageBody", + "CreateHookBody", + "CreateImageBody", + "CreateInstanceBody", + "CreateInstanceResponse", + "CreateInterconnectBody", + "CreateInterconnectV3Body", + "CreateInvitesBody", + "CreateNetworkConnectionBody", + "CreateNetworkConnectionOptions", + "CreateOpenVPNNetworkConnectionBody", + "CreateOpenVPNNetworkConnectionBodyV1", + "CreateProjectBody", + "CreateProjectKeyBody", + "CreateSnapshotBody", + "CreateTeam", + "CreateTeamBody", + "CreateTrialRequestBody", + "CreateTrialRequestResponse", + "CreateTrialRequestResponseTrialRequest", + "CreateUserBody", + "CreateVLANNetworkConnectionBody", + "CreateVLANNetworkConnectionBodyV1", + "CreateWebPlayerSessionBody", + "CreatedBy", + "Credentials", + "DeleteModificationInput", + "DeleteNetworkConnectionOptions", + "DeploymentVersion", + "DetachInterfaceBody", + "DetachInterfaceRequest", + "Device", + "DeviceAutoShutdownSchema", + "DeviceUsage", + "DomainAuthProviderConfig", + "DomainAuthProviderRequest", + "DomainAuthProviderResponse", + "DomainAuthProviderResponseV1", + "DomainAuthProvidersList", + "DomainConfig", + "DomainConfigInput", + "DomainConfigInputSnapshotSharingPermissions", + "DomainConfigInputTrial", + "DomainConfigInputWebplayer", + "DomainConfigSnapshotSharingPermissions", + "DomainConfigTrial", + "DomainConfigTrialEndAction", + "DomainConfigTrialSubscribeAction", + "DomainConfigWebplayer", + "DomainInfo", + "DomainList", + "DomainListItem", + "DomainListItemDisabled", + "DomainListItemDomainUsageInner", + "DomainListItemProjectsInner", + "DomainListItemProjectsInnerInstancesInner", + "DomainListItemProjectsInnerInstancesInnerImagesInner", + "DomainListItemProjectsInnerInstancesInnerUsage", + "DomainListItemProjectsInnerQuotas", + "DomainListItemProjectsInnerUsage", + "DomainListItemQuotas", + "DomainListItemSubscription", + "DomainListItemSubscriptionHistoryInner", + "DomainListItemSubscriptionHistoryInnerAdministrator", + "DomainListItemUsage", + "DomainListItemUsersInfoInner", + "DomainListUsage", + "DomainOptions", + "DomainSoftware", + "DomainSoftwareList", + "DomainWelcomeMessageResponse", + "DomainWelcomeMessageResponseV1", + "EditInvitesBody", + "EditInvitesBodyChanges", + "EnableBtraceBody", + "EnableNetdumpBody", + "EnableSslsplitBody", + "EnsureDomainSettingsBody", + "EnsureDomainSettingsBodyAdminUser", + "EnsureDomainSettingsResponse", + "EnsureDomainSettingsResponseUser", + "ExtendedFirmwareAssetInfo", + "ExtendedFirmwareAssetInfoV1", + "Extension", + "ExtensionFlavor", + "ExtensionList", + "ExtensionV1", + "Features", + "FetchFirmwareAssetsBody", + "FetchFirmwareAssetsResponse", + "FetchFirmwareAssetsResponseFailedInner", + "FileChanges", + "Firmware", + "FirmwareAsset", + "FirmwareAssetFilter", + "FirmwareAssetList", + "FirmwareAssetV1", + "FirmwareDevice", + "FirmwareDeviceList", + "FirmwareInfoDevice", + "FirmwareInfoDeviceFirmwaresInner", + "FirmwareList", + "FirmwareServiceConfig", + "FirmwareServiceConfigCacheFirmware", + "FirmwareServiceConfigDownloadIpswFilters", + "FirmwareServiceConfigValue", + "FirmwareServiceConfiguration", + "FirmwareServiceSettings", + "FirmwareV1", + "FlavorFrame", + "FlavorFrameDimensions", + "FlavorFrameHome", + "FlavorFrameInner", + "GetFirmwareInfoBody", + "GetInterconnectsResponse", + "GetInviteByTokenBody", + "GetResetLinkInfoBody", + "GetStorageResponse", + "GpioStateDefinition", + "GpioStateDefinitionBanksInnerInner", + "GpioStateDefinitionV1", + "GpiosState", + "GpiosStateV1", + "Hook", + "HookList", + "HookPatchType", + "HookV1", + "HypertuneHashResponse", + "HypertuneInitResponse", + "Image", + "ImageCreationOptions", + "ImageEncoding", + "ImageExtended", + "ImageExtendedDevice", + "ImageFirmware", + "ImageFirmwareInfo", + "ImageFirmwareInfoBootArgs", + "ImageList", + "ImageType", + "ImageV1", + "InputResponse", + "InputResponseV1", + "InstallFirmwareAssetsBody", + "InstallFirmwareAssetsBodyV1", + "InstallFirmwareAssetsResponse", + "InstallFirmwareAssetsResponseV1", + "InstallFirmwareBody", + "InstallFirmwareBodyV1", + "InstallFirmwareResponse", + "InstallFirmwareResponseV1", + "InstallFirmwareStatusResponse", + "Instance", + "InstanceAgentState", + "InstanceAgentStateV1", + "InstanceBootOptions", + "InstanceBootOptionsAdditionalTag", + "InstanceBootOptionsFvp", + "InstanceBootOptionsKernel", + "InstanceBootOptionsKernelV1", + "InstanceBootOptionsPongo", + "InstanceBootOptionsPongoV1", + "InstanceBootOptionsV1", + "InstanceBootOptionsVMMIOInner", + "InstanceConsole", + "InstanceConsoleEndpoint", + "InstanceConsoleEndpointV1", + "InstanceConsoleV1", + "InstanceCreateOptions", + "InstanceHyperTraceState", + "InstanceHyperTraceStateV1", + "InstanceInputBody", + "InstanceInputRequest", + "InstanceInterface", + "InstanceInterfaceStatus", + "InstanceList", + "InstanceNetdumpState", + "InstanceNetdumpStateV1", + "InstanceNetmonState", + "InstanceNetmonStateV1", + "InstanceReadOnlyStatus", + "InstanceReadOnlyStatusV1", + "InstanceRestoreStatus", + "InstanceRestoreStatusV1", + "InstanceReturn", + "InstanceServices", + "InstanceServicesV1", + "InstanceSnapshotsList", + "InstanceStartOptions", + "InstanceState", + "InstanceStateV1", + "InstanceStopOptions", + "InstanceTraceFilter", + "InstanceTraceState", + "InstanceTraceStateV1", + "InstanceUefiBootloader", + "InstanceUpgradeBody", + "InstanceUpgradeBodyV1", + "InstanceUpgradeResponse", + "InstanceV1", + "InsufficientStorageError", + "InsufficientStorageErrorV1", + "Interconnect", + "InterconnectList", + "InterconnectProtocol", + "InterconnectResponse", + "InterfacesSchemaInner", + "InvalidCredentialsError", + "InvalidTOTPError", + "Invitation", + "InvitationByToken", + "InvitationV1", + "InviteCreated", + "InviteCreatedEntry", + "InviteResult", + "InviteResultError", + "InviteRevokeParams", + "InviteSettings", + "InviteSignupBody", + "InviteSignupBodyParams", + "InviteSignupResponse", + "InvitesListResponse", + "IpswDeviceConstraint", + "IpswFilter", + "IpswFilterV3", + "IpswFilterV3Device", + "IpswFilterV3Version", + "IpswVersionConstraint", + "Kcrange", + "KcrangeV1", + "KernelTask", + "KernelTaskV1", + "KernelThread", + "KernelThreadV1", + "LDAPConfig", + "LayoutSchema", + "LdapAuthenticationCredentials", + "LdapGroupSearchConfiguration", + "LdapServerConnectionDetails", + "LdapUserAttributeMapping", + "LdapUserSearchConfiguration", + "LoadExtensionBody", + "Logging", + "LoggingV1", + "LoginBody", + "LoginResult", + "LoginResultDisabled", + "LoginResultDomain", + "LoginResultDomainDeviceAutoShutdown", + "LoginResultDomainDisabled", + "LoginResultDomainSnapshotSharingPermissions", + "LoginResultDomainTrial", + "LoginResultDomainWebplayer", + "LoginResultUser", + "Maintenance", + "MatrixError", + "MediaPlayBody", + "MediaPlayBodyV1", + "MediaPlayByImage", + "MediaPlayByUrl", + "MediaStore", + "MediaStoreV1", + "MessageBody", + "MessageBodyAnyOf", + "MessageBodyAnyOf1", + "MeteredSubscriptionUsage", + "MeteredSubscriptionUsageV1", + "Model", + "ModelFirmware", + "ModelFirmwareSpringboardSnapshot", + "ModelFirmwareSpringboardSnapshotVolumesInner", + "ModelFrame", + "ModelFrameDimensions", + "ModelPartition", + "ModelProductImage", + "ModelRect", + "ModelSoftwareV1", + "ModelV1", + "NetdumpFilter", + "NetworkConnection", + "NetworkConnectionConfig", + "NetworkConnectionPaginationResult", + "NetworkConnectionProvider", + "NetworkConnectionProviderPaginationResult", + "NetworkConnectionProviders", + "NetworkConnectionProvidersResultsInner", + "NetworkConnections", + "NetworkInterfaces", + "NetworkSchema", + "NetworkStatus", + "NetworkStatusResponse", + "NetworkStatusV1", + "NodeConsoleEndpoint", + "NodeInformation", + "NodeInformationV1", + "NodeList", + "NodeUpdatesFailed", + "OpenIDConfig", + "OpenIDConfigV1", + "OpenVPNConfig", + "OpenVPNConfigV1", + "OpenVPNNetworkConnection", + "OpenVPNNetworkConnectionProjectsValue", + "OpenVPNNetworkConnectionV1", + "PaginatedAssessments", + "Pagination", + "PartialUpdateInterconnectRequest", + "PartialUpdateNetworkConnectionBody", + "PartialUpdateNetworkConnectionOptions", + "PasswordChangeBody", + "PasswordResetBody", + "PatchClusterConfigBody", + "PatchDomainAuthProviderBody", + "PatchDomainBody", + "PatchDomainBodyWebplayer", + "PatchDomainWelcomeMessageBody", + "PatchFirmwareServiceConfigBody", + "PatchInstanceBody", + "PatchInstanceBodyProxyInner", + "PatchInstanceBodyStraceFilterInner", + "PatchInstanceOptions", + "PatchInstanceReadOnly", + "PatchInstanceReadOnlyBody", + "PatchInterconnectBody", + "PatchProjectBody", + "PatchUserBody", + "PeripheralsData", + "PeripheralsDataV1", + "Plan", + "PlanV1", + "PoolUsageSchema", + "PortalSession", + "PostShareSnapshotRequestPayload", + "Project", + "ProjectConfig", + "ProjectInstanceList", + "ProjectInstanceSummary", + "ProjectKey", + "ProjectKeyList", + "ProjectKeyV1", + "ProjectList", + "ProjectListItem", + "ProjectNetworkState", + "ProjectQuota", + "ProjectQuotaInput", + "ProjectQuotaV1", + "ProjectSettings", + "ProjectSettingsV1", + "ProjectUsage", + "ProjectUsageV1", + "ProjectV1", + "ProjectWithKeysV1", + "ProviderNetworkConnection", + "ProxyConfig", + "RegisterServiceBody", + "ReportModificationInput", + "ReportModificationResult", + "ResetLinkBody", + "ResetLinkInfo", + "ResetLinkInfoReturn", + "ResetPasswordBody", + "ResetUnauthorizedResponse", + "RestoreBackupBody", + "RestoreBackupData", + "RevokeInvitesBody", + "RevokeInvitesResponse", + "Role", + "RoleName", + "RoleV1", + "RolesListResponse", + "RotateBody", + "RotateBodyV1", + "SAMLConfig", + "SamlGroupMapping", + "SamlIdentityProviderConfig", + "SamlServiceProviderConfig", + "SamlUserAttributeMapping", + "SendResetLinkBody", + "ServiceEndpointSchema", + "ServiceStatusRequestBody", + "ServiceStatusRequestBodyVmsInner", + "SetDomainWelcomeMessageBody", + "SetSnapshotPermissionsBody", + "ShareSnapshotBody", + "SharedSnapshot", + "SharedSnapshotsInfo", + "SharedSnapshotsResponse", + "Snapshot", + "SnapshotCreationOptions", + "SnapshotList", + "SnapshotMember", + "SnapshotMemberV1", + "SnapshotOwner", + "SnapshotOwnerV1", + "SnapshotPermissionsRequestPayload", + "SnapshotRequest", + "SnapshotSharing", + "SnapshotSharingPermissions", + "SnapshotSharingPermissionsRequestSchema", + "SnapshotSharingType", + "SnapshotSharingV1", + "SnapshotStatus", + "SnapshotStatusV1", + "SnapshotV1", + "SslsplitFilter", + "StartInstanceBody", + "StopInstanceBody", + "StorageAlreadyMountedResponse", + "StorageAttachResponse", + "StorageDevice", + "StorageDeviceList", + "StorageEjectAlreadyUnmountedResponse", + "StorageFile", + "StorageFileList", + "StorageList", + "StorageQueueError", + "StripeCheckoutBody", + "StripeCheckoutCompleteBody", + "StripeWebhookAck", + "SubscribeToTrialBody", + "Subscription", + "SubscriptionTrial", + "SysInfoSchema", + "TaskStatus", + "Team", + "TeamCreate", + "TeamCreated", + "TeamUser", + "TeamV1", + "TeamsListResponse", + "TestAssessmentInput", + "TextInput", + "TextInputRequest", + "TextInputRequestV1", + "Token", + "TokenV1", + "TokenValidateBody", + "TotpDisableBody", + "TotpEnableBody", + "TotpGenerateResponse", + "TouchCurveInput", + "TouchCurveInputRequest", + "TouchCurveInputRequestV1", + "TouchInput", + "TouchInputRequest", + "TouchInputRequestV1", + "Trial", + "TrialExtension", + "TrialExtensionV1", + "TrialRequest", + "TrialRequestDetail", + "TrialRequestDetailOrganization", + "TrialRequestListResponse", + "TrialRequestMetadata", + "TrialRequestOptions", + "TrialV1", + "UnauthorizedError", + "UncancelSubscriptionBody", + "UpdateAssessmentInput", + "UpdateDomainSettingsResponse", + "UpdateDomainSettingsResponseSettings", + "UpdateDomainSettingsResponseSnapshotSharingPermissions", + "UpdateDomainSettingsResponseWebplayer", + "UpdateDomainWelcomeMessageRequest", + "UpdateExtension", + "UpdateExtensionBody", + "UpdateHookBody", + "UpdateInterconnectBody", + "UpdateInterconnectV3Body", + "UpdateNetworkConnectionBody", + "UpdateNetworkConnectionOptions", + "UpdateNetworkConnectionOptionsConfig", + "UpdateOwnProfileBody", + "UpdateTeamBody", + "UpdateTrialRequestBody", + "UpdateTrialRequestParams", + "UploadSizeError", + "User", + "UserCreate", + "UserCreateReturn", + "UserCreated", + "UserError", + "UserErrorItem", + "UserErrorResponse", + "UserErrorV1", + "UserErrors", + "UserErrorsV1", + "UserSnapshots", + "UserUpdate", + "V1CheckSubdomainExistenceParameters", + "V1CreateHookParameters", + "V1LoadExtensionParameters", + "V1SetStateBody", + "V1UpdateHookParameters", + "V3DeleteNetworkConnectionRequest", + "V3UpdateSnapshotRequest", + "VLANConfig", + "VLANConfigV1", + "VLANNetworkConnection", + "VLANNetworkConnectionV1", + "ValidationError", + "VolumeOptions", + "VolumeOptionsV1", + "VpnConfigPreauthorization", + "VpnDefinition", + "VpnDefinitionV1", + "VpnSchema", + "WebPlayerAllowedDomains", + "WebPlayerCreateSessionRequest", + "WebPlayerCreatedSession", + "WebPlayerFeatures", + "WebPlayerSession", + "WebPlayerSessionDomain", + "WebPlayerSessionListResponse", + "WebPlayerSessionV1", +] + +# import apis into sdk package +from corellium.api.activity_api import ActivityApi as ActivityApi +from corellium.api.activity_v1_api import ActivityV1Api as ActivityV1Api +from corellium.api.agent_api import AgentApi as AgentApi +from corellium.api.agent_v1_api import AgentV1Api as AgentV1Api +from corellium.api.authentication_api import AuthenticationApi as AuthenticationApi +from corellium.api.authentication_v1_api import AuthenticationV1Api as AuthenticationV1Api +from corellium.api.billing_api import BillingApi as BillingApi +from corellium.api.cluster_api import ClusterApi as ClusterApi +from corellium.api.cluster_administration_config_api import ClusterAdministrationConfigApi as ClusterAdministrationConfigApi +from corellium.api.cluster_administration_firmware_service_api import ClusterAdministrationFirmwareServiceApi as ClusterAdministrationFirmwareServiceApi +from corellium.api.cluster_administration_nodes_api import ClusterAdministrationNodesApi as ClusterAdministrationNodesApi +from corellium.api.cluster_snapshots_api import ClusterSnapshotsApi as ClusterSnapshotsApi +from corellium.api.config_api import ConfigApi as ConfigApi +from corellium.api.config_v1_api import ConfigV1Api as ConfigV1Api +from corellium.api.core_trace_api import CoreTraceApi as CoreTraceApi +from corellium.api.core_trace_v1_api import CoreTraceV1Api as CoreTraceV1Api +from corellium.api.domain_api import DomainApi as DomainApi +from corellium.api.domain_auth_provider_api import DomainAuthProviderApi as DomainAuthProviderApi +from corellium.api.domain_auth_providers_api import DomainAuthProvidersApi as DomainAuthProvidersApi +from corellium.api.domain_v1_api import DomainV1Api as DomainV1Api +from corellium.api.extensions_api import ExtensionsApi as ExtensionsApi +from corellium.api.extensions_v1_api import ExtensionsV1Api as ExtensionsV1Api +from corellium.api.external_services_api import ExternalServicesApi as ExternalServicesApi +from corellium.api.firmware_service_api import FirmwareServiceApi as FirmwareServiceApi +from corellium.api.flavors_api import FlavorsApi as FlavorsApi +from corellium.api.hyper_trace_api import HyperTraceApi as HyperTraceApi +from corellium.api.hyper_trace_v1_api import HyperTraceV1Api as HyperTraceV1Api +from corellium.api.hypertune_api import HypertuneApi as HypertuneApi +from corellium.api.hypervisor_hooks_api import HypervisorHooksApi as HypervisorHooksApi +from corellium.api.hypervisor_hooks_v1_api import HypervisorHooksV1Api as HypervisorHooksV1Api +from corellium.api.images_api import ImagesApi as ImagesApi +from corellium.api.images_v1_api import ImagesV1Api as ImagesV1Api +from corellium.api.images_v2_api import ImagesV2Api as ImagesV2Api +from corellium.api.instances_api import InstancesApi as InstancesApi +from corellium.api.instances_v1_api import InstancesV1Api as InstancesV1Api +from corellium.api.instances_v2_api import InstancesV2Api as InstancesV2Api +from corellium.api.interconnects_api import InterconnectsApi as InterconnectsApi +from corellium.api.interconnects_v1_api import InterconnectsV1Api as InterconnectsV1Api +from corellium.api.invites_api import InvitesApi as InvitesApi +from corellium.api.invites_v1_api import InvitesV1Api as InvitesV1Api +from corellium.api.models_api import ModelsApi as ModelsApi +from corellium.api.models_v1_api import ModelsV1Api as ModelsV1Api +from corellium.api.net_connect_api import NetConnectApi as NetConnectApi +from corellium.api.net_connect_v1_api import NetConnectV1Api as NetConnectV1Api +from corellium.api.projects_api import ProjectsApi as ProjectsApi +from corellium.api.projects_v1_api import ProjectsV1Api as ProjectsV1Api +from corellium.api.ram_dump_api import RAMDumpApi as RAMDumpApi +from corellium.api.ram_dump_v1_api import RAMDumpV1Api as RAMDumpV1Api +from corellium.api.roles_api import RolesApi as RolesApi +from corellium.api.roles_v1_api import RolesV1Api as RolesV1Api +from corellium.api.snapshot_sharing_api import SnapshotSharingApi as SnapshotSharingApi +from corellium.api.snapshot_sharing_v1_api import SnapshotSharingV1Api as SnapshotSharingV1Api +from corellium.api.snapshots_api import SnapshotsApi as SnapshotsApi +from corellium.api.snapshots_v1_api import SnapshotsV1Api as SnapshotsV1Api +from corellium.api.status_api import StatusApi as StatusApi +from corellium.api.status_v1_api import StatusV1Api as StatusV1Api +from corellium.api.storage_api import StorageApi as StorageApi +from corellium.api.storage_v1_api import StorageV1Api as StorageV1Api +from corellium.api.totp_api import TOTPApi as TOTPApi +from corellium.api.teams_api import TeamsApi as TeamsApi +from corellium.api.teams_v1_api import TeamsV1Api as TeamsV1Api +from corellium.api.users_api import UsersApi as UsersApi +from corellium.api.users_v1_api import UsersV1Api as UsersV1Api +from corellium.api.web_player_api import WebPlayerApi as WebPlayerApi +from corellium.api.web_player_v1_api import WebPlayerV1Api as WebPlayerV1Api +from corellium.api.assessments_api import AssessmentsApi as AssessmentsApi +from corellium.api.assessments_v1_api import AssessmentsV1Api as AssessmentsV1Api + +# import ApiClient +from corellium.api_response import ApiResponse as ApiResponse +from corellium.api_client import ApiClient as ApiClient +from corellium.configuration import Configuration as Configuration +from corellium.exceptions import OpenApiException as OpenApiException +from corellium.exceptions import ApiTypeError as ApiTypeError +from corellium.exceptions import ApiValueError as ApiValueError +from corellium.exceptions import ApiKeyError as ApiKeyError +from corellium.exceptions import ApiAttributeError as ApiAttributeError +from corellium.exceptions import ApiException as ApiException + +# import models into sdk package +from corellium.models.accept_snapshot_body import AcceptSnapshotBody as AcceptSnapshotBody +from corellium.models.accept_snapshot_request_payload import AcceptSnapshotRequestPayload as AcceptSnapshotRequestPayload +from corellium.models.account_setup_response import AccountSetupResponse as AccountSetupResponse +from corellium.models.activity import Activity as Activity +from corellium.models.activity_export_dto import ActivityExportDto as ActivityExportDto +from corellium.models.activity_export_format import ActivityExportFormat as ActivityExportFormat +from corellium.models.activity_export_response import ActivityExportResponse as ActivityExportResponse +from corellium.models.activity_export_status import ActivityExportStatus as ActivityExportStatus +from corellium.models.activity_export_task import ActivityExportTask as ActivityExportTask +from corellium.models.activity_export_task_list import ActivityExportTaskList as ActivityExportTaskList +from corellium.models.activity_list import ActivityList as ActivityList +from corellium.models.activity_list_response import ActivityListResponse as ActivityListResponse +from corellium.models.activity_request import ActivityRequest as ActivityRequest +from corellium.models.activity_resource_not_starts_with_filter import ActivityResourceNotStartsWithFilter as ActivityResourceNotStartsWithFilter +from corellium.models.activity_resource_starts_with_filter import ActivityResourceStartsWithFilter as ActivityResourceStartsWithFilter +from corellium.models.activity_v1 import ActivityV1 as ActivityV1 +from corellium.models.address import Address as Address +from corellium.models.agent_app import AgentApp as AgentApp +from corellium.models.agent_app_ready_response import AgentAppReadyResponse as AgentAppReadyResponse +from corellium.models.agent_app_ready_response_v1 import AgentAppReadyResponseV1 as AgentAppReadyResponseV1 +from corellium.models.agent_app_status import AgentAppStatus as AgentAppStatus +from corellium.models.agent_app_status_v1 import AgentAppStatusV1 as AgentAppStatusV1 +from corellium.models.agent_app_v1 import AgentAppV1 as AgentAppV1 +from corellium.models.agent_apps_list import AgentAppsList as AgentAppsList +from corellium.models.agent_apps_list_v1 import AgentAppsListV1 as AgentAppsListV1 +from corellium.models.agent_apps_status_list import AgentAppsStatusList as AgentAppsStatusList +from corellium.models.agent_apps_status_list_v1 import AgentAppsStatusListV1 as AgentAppsStatusListV1 +from corellium.models.agent_container import AgentContainer as AgentContainer +from corellium.models.agent_container_health import AgentContainerHealth as AgentContainerHealth +from corellium.models.agent_container_list import AgentContainerList as AgentContainerList +from corellium.models.agent_error import AgentError as AgentError +from corellium.models.agent_error_v1 import AgentErrorV1 as AgentErrorV1 +from corellium.models.agent_file_archive_download_body import AgentFileArchiveDownloadBody as AgentFileArchiveDownloadBody +from corellium.models.agent_file_attributes_body import AgentFileAttributesBody as AgentFileAttributesBody +from corellium.models.agent_file_download_token import AgentFileDownloadToken as AgentFileDownloadToken +from corellium.models.agent_frida_process_list import AgentFridaProcessList as AgentFridaProcessList +from corellium.models.agent_frida_process_list_attached import AgentFridaProcessListAttached as AgentFridaProcessListAttached +from corellium.models.agent_frida_response import AgentFridaResponse as AgentFridaResponse +from corellium.models.agent_frida_run_body import AgentFridaRunBody as AgentFridaRunBody +from corellium.models.agent_icons import AgentIcons as AgentIcons +from corellium.models.agent_icons_response import AgentIconsResponse as AgentIconsResponse +from corellium.models.agent_install_body import AgentInstallBody as AgentInstallBody +from corellium.models.agent_install_body_v1 import AgentInstallBodyV1 as AgentInstallBodyV1 +from corellium.models.agent_profile_list_response import AgentProfileListResponse as AgentProfileListResponse +from corellium.models.agent_profiles_return import AgentProfilesReturn as AgentProfilesReturn +from corellium.models.agent_remote_it_status import AgentRemoteItStatus as AgentRemoteItStatus +from corellium.models.agent_system_adb_auth import AgentSystemAdbAuth as AgentSystemAdbAuth +from corellium.models.agent_system_adb_auth_v1 import AgentSystemAdbAuthV1 as AgentSystemAdbAuthV1 +from corellium.models.agent_system_get_prop_body import AgentSystemGetPropBody as AgentSystemGetPropBody +from corellium.models.agent_system_get_prop_body_v1 import AgentSystemGetPropBodyV1 as AgentSystemGetPropBodyV1 +from corellium.models.agent_system_get_prop_response import AgentSystemGetPropResponse as AgentSystemGetPropResponse +from corellium.models.agent_system_install_open_gapps_body import AgentSystemInstallOpenGappsBody as AgentSystemInstallOpenGappsBody +from corellium.models.agent_system_network_response import AgentSystemNetworkResponse as AgentSystemNetworkResponse +from corellium.models.agent_system_result import AgentSystemResult as AgentSystemResult +from corellium.models.agent_system_set_device_properties_body import AgentSystemSetDevicePropertiesBody as AgentSystemSetDevicePropertiesBody +from corellium.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody as AgentSystemSetHostnameBody +from corellium.models.agent_system_set_hostname_body_v1 import AgentSystemSetHostnameBodyV1 as AgentSystemSetHostnameBodyV1 +from corellium.models.agent_temp_file_response import AgentTempFileResponse as AgentTempFileResponse +from corellium.models.agent_value_return import AgentValueReturn as AgentValueReturn +from corellium.models.agreed_ack import AgreedAck as AgreedAck +from corellium.models.agreed_ack_v1 import AgreedAckV1 as AgreedAckV1 +from corellium.models.ai_tools_config import AiToolsConfig as AiToolsConfig +from corellium.models.ai_tools_config_v1 import AiToolsConfigV1 as AiToolsConfigV1 +from corellium.models.allowed_devices_filter_schema import AllowedDevicesFilterSchema as AllowedDevicesFilterSchema +from corellium.models.allowed_domains_response import AllowedDomainsResponse as AllowedDomainsResponse +from corellium.models.allowed_firmware_schema import AllowedFirmwareSchema as AllowedFirmwareSchema +from corellium.models.api_conflict_error import ApiConflictError as ApiConflictError +from corellium.models.api_conflict_error_v1 import ApiConflictErrorV1 as ApiConflictErrorV1 +from corellium.models.api_error import ApiError as ApiError +from corellium.models.api_error_v1 import ApiErrorV1 as ApiErrorV1 +from corellium.models.api_internal_consistency_error import ApiInternalConsistencyError as ApiInternalConsistencyError +from corellium.models.api_not_found_error import ApiNotFoundError as ApiNotFoundError +from corellium.models.api_not_found_error_v1 import ApiNotFoundErrorV1 as ApiNotFoundErrorV1 +from corellium.models.api_token import ApiToken as ApiToken +from corellium.models.api_token_result import ApiTokenResult as ApiTokenResult +from corellium.models.artifacts_path import ArtifactsPath as ArtifactsPath +from corellium.models.assessment import Assessment as Assessment +from corellium.models.assessment_bundle import AssessmentBundle as AssessmentBundle +from corellium.models.assessment_format import AssessmentFormat as AssessmentFormat +from corellium.models.assessment_frida_script import AssessmentFridaScript as AssessmentFridaScript +from corellium.models.assessment_history import AssessmentHistory as AssessmentHistory +from corellium.models.assessment_history_line_item import AssessmentHistoryLineItem as AssessmentHistoryLineItem +from corellium.models.assessment_history_results_inner import AssessmentHistoryResultsInner as AssessmentHistoryResultsInner +from corellium.models.assessment_history_v1 import AssessmentHistoryV1 as AssessmentHistoryV1 +from corellium.models.assessment_id_status import AssessmentIdStatus as AssessmentIdStatus +from corellium.models.assessment_metadata import AssessmentMetadata as AssessmentMetadata +from corellium.models.assessment_results import AssessmentResults as AssessmentResults +from corellium.models.assessment_severity_counts import AssessmentSeverityCounts as AssessmentSeverityCounts +from corellium.models.assessment_status import AssessmentStatus as AssessmentStatus +from corellium.models.assessment_wordlist import AssessmentWordlist as AssessmentWordlist +from corellium.models.attach_interface_body import AttachInterfaceBody as AttachInterfaceBody +from corellium.models.attach_interface_request import AttachInterfaceRequest as AttachInterfaceRequest +from corellium.models.auth_provider import AuthProvider as AuthProvider +from corellium.models.auth_provider_type import AuthProviderType as AuthProviderType +from corellium.models.auth_provider_types_list_response import AuthProviderTypesListResponse as AuthProviderTypesListResponse +from corellium.models.auth_provider_v1 import AuthProviderV1 as AuthProviderV1 +from corellium.models.auth_providers_list_response import AuthProvidersListResponse as AuthProvidersListResponse +from corellium.models.available_plans_list_response import AvailablePlansListResponse as AvailablePlansListResponse +from corellium.models.available_trial_plan import AvailableTrialPlan as AvailableTrialPlan +from corellium.models.available_trial_plan_list import AvailableTrialPlanList as AvailableTrialPlanList +from corellium.models.aws_create_response import AwsCreateResponse as AwsCreateResponse +from corellium.models.billing_line_item import BillingLineItem as BillingLineItem +from corellium.models.billing_summary import BillingSummary as BillingSummary +from corellium.models.billing_summary_pending_usage_based import BillingSummaryPendingUsageBased as BillingSummaryPendingUsageBased +from corellium.models.bit import Bit as Bit +from corellium.models.btrace_enable_options import BtraceEnableOptions as BtraceEnableOptions +from corellium.models.button import Button as Button +from corellium.models.cancel_subscription_body import CancelSubscriptionBody as CancelSubscriptionBody +from corellium.models.change_password_body import ChangePasswordBody as ChangePasswordBody +from corellium.models.charm_tag import CharmTag as CharmTag +from corellium.models.check_subdomain_response import CheckSubdomainResponse as CheckSubdomainResponse +from corellium.models.check_subdomain_response_v1 import CheckSubdomainResponseV1 as CheckSubdomainResponseV1 +from corellium.models.cloud_notification_item import CloudNotificationItem as CloudNotificationItem +from corellium.models.cloud_notification_list import CloudNotificationList as CloudNotificationList +from corellium.models.cluster_config import ClusterConfig as ClusterConfig +from corellium.models.cluster_config_coordinator_config import ClusterConfigCoordinatorConfig as ClusterConfigCoordinatorConfig +from corellium.models.cluster_config_coordinator_config_auth_providers_inner import ClusterConfigCoordinatorConfigAuthProvidersInner as ClusterConfigCoordinatorConfigAuthProvidersInner +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf as ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of1 import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 as ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 +from corellium.models.cluster_config_coordinator_config_aws_marketplace import ClusterConfigCoordinatorConfigAwsMarketplace as ClusterConfigCoordinatorConfigAwsMarketplace +from corellium.models.cluster_config_coordinator_config_ensure_domain import ClusterConfigCoordinatorConfigEnsureDomain as ClusterConfigCoordinatorConfigEnsureDomain +from corellium.models.cluster_config_coordinator_config_ensure_domain_properties import ClusterConfigCoordinatorConfigEnsureDomainProperties as ClusterConfigCoordinatorConfigEnsureDomainProperties +from corellium.models.cluster_config_coordinator_config_ensure_domain_quotas import ClusterConfigCoordinatorConfigEnsureDomainQuotas as ClusterConfigCoordinatorConfigEnsureDomainQuotas +from corellium.models.cluster_config_coordinator_config_hubspot import ClusterConfigCoordinatorConfigHubspot as ClusterConfigCoordinatorConfigHubspot +from corellium.models.cluster_config_coordinator_config_hypertune import ClusterConfigCoordinatorConfigHypertune as ClusterConfigCoordinatorConfigHypertune +from corellium.models.cluster_config_coordinator_config_pipedrive import ClusterConfigCoordinatorConfigPipedrive as ClusterConfigCoordinatorConfigPipedrive +from corellium.models.cluster_config_coordinator_config_trial import ClusterConfigCoordinatorConfigTrial as ClusterConfigCoordinatorConfigTrial +from corellium.models.cluster_config_coordinator_config_webplayer import ClusterConfigCoordinatorConfigWebplayer as ClusterConfigCoordinatorConfigWebplayer +from corellium.models.cluster_config_firmware_service_config import ClusterConfigFirmwareServiceConfig as ClusterConfigFirmwareServiceConfig +from corellium.models.cluster_config_ipsw_filters_inner import ClusterConfigIpswFiltersInner as ClusterConfigIpswFiltersInner +from corellium.models.cluster_config_ipsw_filters_inner_device import ClusterConfigIpswFiltersInnerDevice as ClusterConfigIpswFiltersInnerDevice +from corellium.models.cluster_config_ipsw_filters_inner_version import ClusterConfigIpswFiltersInnerVersion as ClusterConfigIpswFiltersInnerVersion +from corellium.models.cluster_config_maintenance import ClusterConfigMaintenance as ClusterConfigMaintenance +from corellium.models.cluster_config_net_mon_ca import ClusterConfigNetMonCA as ClusterConfigNetMonCA +from corellium.models.cluster_config_node_specific_config import ClusterConfigNodeSpecificConfig as ClusterConfigNodeSpecificConfig +from corellium.models.cluster_config_package_config import ClusterConfigPackageConfig as ClusterConfigPackageConfig +from corellium.models.cluster_config_package_config_components import ClusterConfigPackageConfigComponents as ClusterConfigPackageConfigComponents +from corellium.models.cluster_config_package_config_features import ClusterConfigPackageConfigFeatures as ClusterConfigPackageConfigFeatures +from corellium.models.cluster_config_package_config_flavor_filters_inner import ClusterConfigPackageConfigFlavorFiltersInner as ClusterConfigPackageConfigFlavorFiltersInner +from corellium.models.cluster_config_package_config_flavor_filters_inner_apply import ClusterConfigPackageConfigFlavorFiltersInnerApply as ClusterConfigPackageConfigFlavorFiltersInnerApply +from corellium.models.cluster_config_package_config_flavor_filters_inner_filter import ClusterConfigPackageConfigFlavorFiltersInnerFilter as ClusterConfigPackageConfigFlavorFiltersInnerFilter +from corellium.models.cluster_config_setup_config import ClusterConfigSetupConfig as ClusterConfigSetupConfig +from corellium.models.cluster_config_stripe import ClusterConfigStripe as ClusterConfigStripe +from corellium.models.cluster_config_update_error import ClusterConfigUpdateError as ClusterConfigUpdateError +from corellium.models.cluster_configuration_payload import ClusterConfigurationPayload as ClusterConfigurationPayload +from corellium.models.cluster_node import ClusterNode as ClusterNode +from corellium.models.cluster_node_available import ClusterNodeAvailable as ClusterNodeAvailable +from corellium.models.cluster_node_reserved import ClusterNodeReserved as ClusterNodeReserved +from corellium.models.cluster_node_status import ClusterNodeStatus as ClusterNodeStatus +from corellium.models.cluster_node_status_cluster_totals import ClusterNodeStatusClusterTotals as ClusterNodeStatusClusterTotals +from corellium.models.cluster_node_status_cluster_totals_available import ClusterNodeStatusClusterTotalsAvailable as ClusterNodeStatusClusterTotalsAvailable +from corellium.models.cluster_node_status_cluster_totals_reserved import ClusterNodeStatusClusterTotalsReserved as ClusterNodeStatusClusterTotalsReserved +from corellium.models.cluster_node_status_cluster_totals_total import ClusterNodeStatusClusterTotalsTotal as ClusterNodeStatusClusterTotalsTotal +from corellium.models.cluster_node_total import ClusterNodeTotal as ClusterNodeTotal +from corellium.models.cluster_snapshot import ClusterSnapshot as ClusterSnapshot +from corellium.models.cluster_snapshot_list import ClusterSnapshotList as ClusterSnapshotList +from corellium.models.cluster_snapshot_metadata import ClusterSnapshotMetadata as ClusterSnapshotMetadata +from corellium.models.cluster_snapshot_status import ClusterSnapshotStatus as ClusterSnapshotStatus +from corellium.models.cluster_snapshot_v1 import ClusterSnapshotV1 as ClusterSnapshotV1 +from corellium.models.compute_node_file import ComputeNodeFile as ComputeNodeFile +from corellium.models.compute_node_file_list import ComputeNodeFileList as ComputeNodeFileList +from corellium.models.config_auth_provider import ConfigAuthProvider as ConfigAuthProvider +from corellium.models.config_response import ConfigResponse as ConfigResponse +from corellium.models.config_response_ai_tools_config import ConfigResponseAiToolsConfig as ConfigResponseAiToolsConfig +from corellium.models.config_response_maintenance import ConfigResponseMaintenance as ConfigResponseMaintenance +from corellium.models.config_response_v1 import ConfigResponseV1 as ConfigResponseV1 +from corellium.models.coordinator_config import CoordinatorConfig as CoordinatorConfig +from corellium.models.coordinator_config_v1 import CoordinatorConfigV1 as CoordinatorConfigV1 +from corellium.models.coupon_options import CouponOptions as CouponOptions +from corellium.models.create_activity_export_body import CreateActivityExportBody as CreateActivityExportBody +from corellium.models.create_activity_export_response import CreateActivityExportResponse as CreateActivityExportResponse +from corellium.models.create_assessment_input import CreateAssessmentInput as CreateAssessmentInput +from corellium.models.create_cloud_admin_trial_request_body import CreateCloudAdminTrialRequestBody as CreateCloudAdminTrialRequestBody +from corellium.models.create_domain_auth_provider_body import CreateDomainAuthProviderBody as CreateDomainAuthProviderBody +from corellium.models.create_domain_auth_provider_response import CreateDomainAuthProviderResponse as CreateDomainAuthProviderResponse +from corellium.models.create_domain_auth_provider_response_config import CreateDomainAuthProviderResponseConfig as CreateDomainAuthProviderResponseConfig +from corellium.models.create_domain_welcome_message_body import CreateDomainWelcomeMessageBody as CreateDomainWelcomeMessageBody +from corellium.models.create_hook_body import CreateHookBody as CreateHookBody +from corellium.models.create_image_body import CreateImageBody as CreateImageBody +from corellium.models.create_instance_body import CreateInstanceBody as CreateInstanceBody +from corellium.models.create_instance_response import CreateInstanceResponse as CreateInstanceResponse +from corellium.models.create_interconnect_body import CreateInterconnectBody as CreateInterconnectBody +from corellium.models.create_interconnect_v3_body import CreateInterconnectV3Body as CreateInterconnectV3Body +from corellium.models.create_invites_body import CreateInvitesBody as CreateInvitesBody +from corellium.models.create_network_connection_body import CreateNetworkConnectionBody as CreateNetworkConnectionBody +from corellium.models.create_network_connection_options import CreateNetworkConnectionOptions as CreateNetworkConnectionOptions +from corellium.models.create_open_vpn_network_connection_body import CreateOpenVPNNetworkConnectionBody as CreateOpenVPNNetworkConnectionBody +from corellium.models.create_open_vpn_network_connection_body_v1 import CreateOpenVPNNetworkConnectionBodyV1 as CreateOpenVPNNetworkConnectionBodyV1 +from corellium.models.create_project_body import CreateProjectBody as CreateProjectBody +from corellium.models.create_project_key_body import CreateProjectKeyBody as CreateProjectKeyBody +from corellium.models.create_snapshot_body import CreateSnapshotBody as CreateSnapshotBody +from corellium.models.create_team import CreateTeam as CreateTeam +from corellium.models.create_team_body import CreateTeamBody as CreateTeamBody +from corellium.models.create_trial_request_body import CreateTrialRequestBody as CreateTrialRequestBody +from corellium.models.create_trial_request_response import CreateTrialRequestResponse as CreateTrialRequestResponse +from corellium.models.create_trial_request_response_trial_request import CreateTrialRequestResponseTrialRequest as CreateTrialRequestResponseTrialRequest +from corellium.models.create_user_body import CreateUserBody as CreateUserBody +from corellium.models.create_vlan_network_connection_body import CreateVLANNetworkConnectionBody as CreateVLANNetworkConnectionBody +from corellium.models.create_vlan_network_connection_body_v1 import CreateVLANNetworkConnectionBodyV1 as CreateVLANNetworkConnectionBodyV1 +from corellium.models.create_web_player_session_body import CreateWebPlayerSessionBody as CreateWebPlayerSessionBody +from corellium.models.created_by import CreatedBy as CreatedBy +from corellium.models.credentials import Credentials as Credentials +from corellium.models.delete_modification_input import DeleteModificationInput as DeleteModificationInput +from corellium.models.delete_network_connection_options import DeleteNetworkConnectionOptions as DeleteNetworkConnectionOptions +from corellium.models.deployment_version import DeploymentVersion as DeploymentVersion +from corellium.models.detach_interface_body import DetachInterfaceBody as DetachInterfaceBody +from corellium.models.detach_interface_request import DetachInterfaceRequest as DetachInterfaceRequest +from corellium.models.device import Device as Device +from corellium.models.device_auto_shutdown_schema import DeviceAutoShutdownSchema as DeviceAutoShutdownSchema +from corellium.models.device_usage import DeviceUsage as DeviceUsage +from corellium.models.domain_auth_provider_config import DomainAuthProviderConfig as DomainAuthProviderConfig +from corellium.models.domain_auth_provider_request import DomainAuthProviderRequest as DomainAuthProviderRequest +from corellium.models.domain_auth_provider_response import DomainAuthProviderResponse as DomainAuthProviderResponse +from corellium.models.domain_auth_provider_response_v1 import DomainAuthProviderResponseV1 as DomainAuthProviderResponseV1 +from corellium.models.domain_auth_providers_list import DomainAuthProvidersList as DomainAuthProvidersList +from corellium.models.domain_config import DomainConfig as DomainConfig +from corellium.models.domain_config_input import DomainConfigInput as DomainConfigInput +from corellium.models.domain_config_input_snapshot_sharing_permissions import DomainConfigInputSnapshotSharingPermissions as DomainConfigInputSnapshotSharingPermissions +from corellium.models.domain_config_input_trial import DomainConfigInputTrial as DomainConfigInputTrial +from corellium.models.domain_config_input_webplayer import DomainConfigInputWebplayer as DomainConfigInputWebplayer +from corellium.models.domain_config_snapshot_sharing_permissions import DomainConfigSnapshotSharingPermissions as DomainConfigSnapshotSharingPermissions +from corellium.models.domain_config_trial import DomainConfigTrial as DomainConfigTrial +from corellium.models.domain_config_trial_end_action import DomainConfigTrialEndAction as DomainConfigTrialEndAction +from corellium.models.domain_config_trial_subscribe_action import DomainConfigTrialSubscribeAction as DomainConfigTrialSubscribeAction +from corellium.models.domain_config_webplayer import DomainConfigWebplayer as DomainConfigWebplayer +from corellium.models.domain_info import DomainInfo as DomainInfo +from corellium.models.domain_list import DomainList as DomainList +from corellium.models.domain_list_item import DomainListItem as DomainListItem +from corellium.models.domain_list_item_disabled import DomainListItemDisabled as DomainListItemDisabled +from corellium.models.domain_list_item_domain_usage_inner import DomainListItemDomainUsageInner as DomainListItemDomainUsageInner +from corellium.models.domain_list_item_projects_inner import DomainListItemProjectsInner as DomainListItemProjectsInner +from corellium.models.domain_list_item_projects_inner_instances_inner import DomainListItemProjectsInnerInstancesInner as DomainListItemProjectsInnerInstancesInner +from corellium.models.domain_list_item_projects_inner_instances_inner_images_inner import DomainListItemProjectsInnerInstancesInnerImagesInner as DomainListItemProjectsInnerInstancesInnerImagesInner +from corellium.models.domain_list_item_projects_inner_instances_inner_usage import DomainListItemProjectsInnerInstancesInnerUsage as DomainListItemProjectsInnerInstancesInnerUsage +from corellium.models.domain_list_item_projects_inner_quotas import DomainListItemProjectsInnerQuotas as DomainListItemProjectsInnerQuotas +from corellium.models.domain_list_item_projects_inner_usage import DomainListItemProjectsInnerUsage as DomainListItemProjectsInnerUsage +from corellium.models.domain_list_item_quotas import DomainListItemQuotas as DomainListItemQuotas +from corellium.models.domain_list_item_subscription import DomainListItemSubscription as DomainListItemSubscription +from corellium.models.domain_list_item_subscription_history_inner import DomainListItemSubscriptionHistoryInner as DomainListItemSubscriptionHistoryInner +from corellium.models.domain_list_item_subscription_history_inner_administrator import DomainListItemSubscriptionHistoryInnerAdministrator as DomainListItemSubscriptionHistoryInnerAdministrator +from corellium.models.domain_list_item_usage import DomainListItemUsage as DomainListItemUsage +from corellium.models.domain_list_item_users_info_inner import DomainListItemUsersInfoInner as DomainListItemUsersInfoInner +from corellium.models.domain_list_usage import DomainListUsage as DomainListUsage +from corellium.models.domain_options import DomainOptions as DomainOptions +from corellium.models.domain_software import DomainSoftware as DomainSoftware +from corellium.models.domain_software_list import DomainSoftwareList as DomainSoftwareList +from corellium.models.domain_welcome_message_response import DomainWelcomeMessageResponse as DomainWelcomeMessageResponse +from corellium.models.domain_welcome_message_response_v1 import DomainWelcomeMessageResponseV1 as DomainWelcomeMessageResponseV1 +from corellium.models.edit_invites_body import EditInvitesBody as EditInvitesBody +from corellium.models.edit_invites_body_changes import EditInvitesBodyChanges as EditInvitesBodyChanges +from corellium.models.enable_btrace_body import EnableBtraceBody as EnableBtraceBody +from corellium.models.enable_netdump_body import EnableNetdumpBody as EnableNetdumpBody +from corellium.models.enable_sslsplit_body import EnableSslsplitBody as EnableSslsplitBody +from corellium.models.ensure_domain_settings_body import EnsureDomainSettingsBody as EnsureDomainSettingsBody +from corellium.models.ensure_domain_settings_body_admin_user import EnsureDomainSettingsBodyAdminUser as EnsureDomainSettingsBodyAdminUser +from corellium.models.ensure_domain_settings_response import EnsureDomainSettingsResponse as EnsureDomainSettingsResponse +from corellium.models.ensure_domain_settings_response_user import EnsureDomainSettingsResponseUser as EnsureDomainSettingsResponseUser +from corellium.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo as ExtendedFirmwareAssetInfo +from corellium.models.extended_firmware_asset_info_v1 import ExtendedFirmwareAssetInfoV1 as ExtendedFirmwareAssetInfoV1 +from corellium.models.extension import Extension as Extension +from corellium.models.extension_flavor import ExtensionFlavor as ExtensionFlavor +from corellium.models.extension_list import ExtensionList as ExtensionList +from corellium.models.extension_v1 import ExtensionV1 as ExtensionV1 +from corellium.models.features import Features as Features +from corellium.models.fetch_firmware_assets_body import FetchFirmwareAssetsBody as FetchFirmwareAssetsBody +from corellium.models.fetch_firmware_assets_response import FetchFirmwareAssetsResponse as FetchFirmwareAssetsResponse +from corellium.models.fetch_firmware_assets_response_failed_inner import FetchFirmwareAssetsResponseFailedInner as FetchFirmwareAssetsResponseFailedInner +from corellium.models.file_changes import FileChanges as FileChanges +from corellium.models.firmware import Firmware as Firmware +from corellium.models.firmware_asset import FirmwareAsset as FirmwareAsset +from corellium.models.firmware_asset_filter import FirmwareAssetFilter as FirmwareAssetFilter +from corellium.models.firmware_asset_list import FirmwareAssetList as FirmwareAssetList +from corellium.models.firmware_asset_v1 import FirmwareAssetV1 as FirmwareAssetV1 +from corellium.models.firmware_device import FirmwareDevice as FirmwareDevice +from corellium.models.firmware_device_list import FirmwareDeviceList as FirmwareDeviceList +from corellium.models.firmware_info_device import FirmwareInfoDevice as FirmwareInfoDevice +from corellium.models.firmware_info_device_firmwares_inner import FirmwareInfoDeviceFirmwaresInner as FirmwareInfoDeviceFirmwaresInner +from corellium.models.firmware_list import FirmwareList as FirmwareList +from corellium.models.firmware_service_config import FirmwareServiceConfig as FirmwareServiceConfig +from corellium.models.firmware_service_config_cache_firmware import FirmwareServiceConfigCacheFirmware as FirmwareServiceConfigCacheFirmware +from corellium.models.firmware_service_config_download_ipsw_filters import FirmwareServiceConfigDownloadIpswFilters as FirmwareServiceConfigDownloadIpswFilters +from corellium.models.firmware_service_config_value import FirmwareServiceConfigValue as FirmwareServiceConfigValue +from corellium.models.firmware_service_configuration import FirmwareServiceConfiguration as FirmwareServiceConfiguration +from corellium.models.firmware_service_settings import FirmwareServiceSettings as FirmwareServiceSettings +from corellium.models.firmware_v1 import FirmwareV1 as FirmwareV1 +from corellium.models.flavor_frame import FlavorFrame as FlavorFrame +from corellium.models.flavor_frame_dimensions import FlavorFrameDimensions as FlavorFrameDimensions +from corellium.models.flavor_frame_home import FlavorFrameHome as FlavorFrameHome +from corellium.models.flavor_frame_inner import FlavorFrameInner as FlavorFrameInner +from corellium.models.get_firmware_info_body import GetFirmwareInfoBody as GetFirmwareInfoBody +from corellium.models.get_interconnects_response import GetInterconnectsResponse as GetInterconnectsResponse +from corellium.models.get_invite_by_token_body import GetInviteByTokenBody as GetInviteByTokenBody +from corellium.models.get_reset_link_info_body import GetResetLinkInfoBody as GetResetLinkInfoBody +from corellium.models.get_storage_response import GetStorageResponse as GetStorageResponse +from corellium.models.gpio_state_definition import GpioStateDefinition as GpioStateDefinition +from corellium.models.gpio_state_definition_banks_inner_inner import GpioStateDefinitionBanksInnerInner as GpioStateDefinitionBanksInnerInner +from corellium.models.gpio_state_definition_v1 import GpioStateDefinitionV1 as GpioStateDefinitionV1 +from corellium.models.gpios_state import GpiosState as GpiosState +from corellium.models.gpios_state_v1 import GpiosStateV1 as GpiosStateV1 +from corellium.models.hook import Hook as Hook +from corellium.models.hook_list import HookList as HookList +from corellium.models.hook_patch_type import HookPatchType as HookPatchType +from corellium.models.hook_v1 import HookV1 as HookV1 +from corellium.models.hypertune_hash_response import HypertuneHashResponse as HypertuneHashResponse +from corellium.models.hypertune_init_response import HypertuneInitResponse as HypertuneInitResponse +from corellium.models.image import Image as Image +from corellium.models.image_creation_options import ImageCreationOptions as ImageCreationOptions +from corellium.models.image_encoding import ImageEncoding as ImageEncoding +from corellium.models.image_extended import ImageExtended as ImageExtended +from corellium.models.image_extended_device import ImageExtendedDevice as ImageExtendedDevice +from corellium.models.image_firmware import ImageFirmware as ImageFirmware +from corellium.models.image_firmware_info import ImageFirmwareInfo as ImageFirmwareInfo +from corellium.models.image_firmware_info_boot_args import ImageFirmwareInfoBootArgs as ImageFirmwareInfoBootArgs +from corellium.models.image_list import ImageList as ImageList +from corellium.models.image_type import ImageType as ImageType +from corellium.models.image_v1 import ImageV1 as ImageV1 +from corellium.models.input_response import InputResponse as InputResponse +from corellium.models.input_response_v1 import InputResponseV1 as InputResponseV1 +from corellium.models.install_firmware_assets_body import InstallFirmwareAssetsBody as InstallFirmwareAssetsBody +from corellium.models.install_firmware_assets_body_v1 import InstallFirmwareAssetsBodyV1 as InstallFirmwareAssetsBodyV1 +from corellium.models.install_firmware_assets_response import InstallFirmwareAssetsResponse as InstallFirmwareAssetsResponse +from corellium.models.install_firmware_assets_response_v1 import InstallFirmwareAssetsResponseV1 as InstallFirmwareAssetsResponseV1 +from corellium.models.install_firmware_body import InstallFirmwareBody as InstallFirmwareBody +from corellium.models.install_firmware_body_v1 import InstallFirmwareBodyV1 as InstallFirmwareBodyV1 +from corellium.models.install_firmware_response import InstallFirmwareResponse as InstallFirmwareResponse +from corellium.models.install_firmware_response_v1 import InstallFirmwareResponseV1 as InstallFirmwareResponseV1 +from corellium.models.install_firmware_status_response import InstallFirmwareStatusResponse as InstallFirmwareStatusResponse +from corellium.models.instance import Instance as Instance +from corellium.models.instance_agent_state import InstanceAgentState as InstanceAgentState +from corellium.models.instance_agent_state_v1 import InstanceAgentStateV1 as InstanceAgentStateV1 +from corellium.models.instance_boot_options import InstanceBootOptions as InstanceBootOptions +from corellium.models.instance_boot_options_additional_tag import InstanceBootOptionsAdditionalTag as InstanceBootOptionsAdditionalTag +from corellium.models.instance_boot_options_fvp import InstanceBootOptionsFvp as InstanceBootOptionsFvp +from corellium.models.instance_boot_options_kernel import InstanceBootOptionsKernel as InstanceBootOptionsKernel +from corellium.models.instance_boot_options_kernel_v1 import InstanceBootOptionsKernelV1 as InstanceBootOptionsKernelV1 +from corellium.models.instance_boot_options_pongo import InstanceBootOptionsPongo as InstanceBootOptionsPongo +from corellium.models.instance_boot_options_pongo_v1 import InstanceBootOptionsPongoV1 as InstanceBootOptionsPongoV1 +from corellium.models.instance_boot_options_v1 import InstanceBootOptionsV1 as InstanceBootOptionsV1 +from corellium.models.instance_boot_options_vmmio_inner import InstanceBootOptionsVMMIOInner as InstanceBootOptionsVMMIOInner +from corellium.models.instance_console import InstanceConsole as InstanceConsole +from corellium.models.instance_console_endpoint import InstanceConsoleEndpoint as InstanceConsoleEndpoint +from corellium.models.instance_console_endpoint_v1 import InstanceConsoleEndpointV1 as InstanceConsoleEndpointV1 +from corellium.models.instance_console_v1 import InstanceConsoleV1 as InstanceConsoleV1 +from corellium.models.instance_create_options import InstanceCreateOptions as InstanceCreateOptions +from corellium.models.instance_hyper_trace_state import InstanceHyperTraceState as InstanceHyperTraceState +from corellium.models.instance_hyper_trace_state_v1 import InstanceHyperTraceStateV1 as InstanceHyperTraceStateV1 +from corellium.models.instance_input_body import InstanceInputBody as InstanceInputBody +from corellium.models.instance_input_request import InstanceInputRequest as InstanceInputRequest +from corellium.models.instance_interface import InstanceInterface as InstanceInterface +from corellium.models.instance_interface_status import InstanceInterfaceStatus as InstanceInterfaceStatus +from corellium.models.instance_list import InstanceList as InstanceList +from corellium.models.instance_netdump_state import InstanceNetdumpState as InstanceNetdumpState +from corellium.models.instance_netdump_state_v1 import InstanceNetdumpStateV1 as InstanceNetdumpStateV1 +from corellium.models.instance_netmon_state import InstanceNetmonState as InstanceNetmonState +from corellium.models.instance_netmon_state_v1 import InstanceNetmonStateV1 as InstanceNetmonStateV1 +from corellium.models.instance_read_only_status import InstanceReadOnlyStatus as InstanceReadOnlyStatus +from corellium.models.instance_read_only_status_v1 import InstanceReadOnlyStatusV1 as InstanceReadOnlyStatusV1 +from corellium.models.instance_restore_status import InstanceRestoreStatus as InstanceRestoreStatus +from corellium.models.instance_restore_status_v1 import InstanceRestoreStatusV1 as InstanceRestoreStatusV1 +from corellium.models.instance_return import InstanceReturn as InstanceReturn +from corellium.models.instance_services import InstanceServices as InstanceServices +from corellium.models.instance_services_v1 import InstanceServicesV1 as InstanceServicesV1 +from corellium.models.instance_snapshots_list import InstanceSnapshotsList as InstanceSnapshotsList +from corellium.models.instance_start_options import InstanceStartOptions as InstanceStartOptions +from corellium.models.instance_state import InstanceState as InstanceState +from corellium.models.instance_state_v1 import InstanceStateV1 as InstanceStateV1 +from corellium.models.instance_stop_options import InstanceStopOptions as InstanceStopOptions +from corellium.models.instance_trace_filter import InstanceTraceFilter as InstanceTraceFilter +from corellium.models.instance_trace_state import InstanceTraceState as InstanceTraceState +from corellium.models.instance_trace_state_v1 import InstanceTraceStateV1 as InstanceTraceStateV1 +from corellium.models.instance_uefi_bootloader import InstanceUefiBootloader as InstanceUefiBootloader +from corellium.models.instance_upgrade_body import InstanceUpgradeBody as InstanceUpgradeBody +from corellium.models.instance_upgrade_body_v1 import InstanceUpgradeBodyV1 as InstanceUpgradeBodyV1 +from corellium.models.instance_upgrade_response import InstanceUpgradeResponse as InstanceUpgradeResponse +from corellium.models.instance_v1 import InstanceV1 as InstanceV1 +from corellium.models.insufficient_storage_error import InsufficientStorageError as InsufficientStorageError +from corellium.models.insufficient_storage_error_v1 import InsufficientStorageErrorV1 as InsufficientStorageErrorV1 +from corellium.models.interconnect import Interconnect as Interconnect +from corellium.models.interconnect_list import InterconnectList as InterconnectList +from corellium.models.interconnect_protocol import InterconnectProtocol as InterconnectProtocol +from corellium.models.interconnect_response import InterconnectResponse as InterconnectResponse +from corellium.models.interfaces_schema_inner import InterfacesSchemaInner as InterfacesSchemaInner +from corellium.models.invalid_credentials_error import InvalidCredentialsError as InvalidCredentialsError +from corellium.models.invalid_totp_error import InvalidTOTPError as InvalidTOTPError +from corellium.models.invitation import Invitation as Invitation +from corellium.models.invitation_by_token import InvitationByToken as InvitationByToken +from corellium.models.invitation_v1 import InvitationV1 as InvitationV1 +from corellium.models.invite_created import InviteCreated as InviteCreated +from corellium.models.invite_created_entry import InviteCreatedEntry as InviteCreatedEntry +from corellium.models.invite_result import InviteResult as InviteResult +from corellium.models.invite_result_error import InviteResultError as InviteResultError +from corellium.models.invite_revoke_params import InviteRevokeParams as InviteRevokeParams +from corellium.models.invite_settings import InviteSettings as InviteSettings +from corellium.models.invite_signup_body import InviteSignupBody as InviteSignupBody +from corellium.models.invite_signup_body_params import InviteSignupBodyParams as InviteSignupBodyParams +from corellium.models.invite_signup_response import InviteSignupResponse as InviteSignupResponse +from corellium.models.invites_list_response import InvitesListResponse as InvitesListResponse +from corellium.models.ipsw_device_constraint import IpswDeviceConstraint as IpswDeviceConstraint +from corellium.models.ipsw_filter import IpswFilter as IpswFilter +from corellium.models.ipsw_filter_v3 import IpswFilterV3 as IpswFilterV3 +from corellium.models.ipsw_filter_v3_device import IpswFilterV3Device as IpswFilterV3Device +from corellium.models.ipsw_filter_v3_version import IpswFilterV3Version as IpswFilterV3Version +from corellium.models.ipsw_version_constraint import IpswVersionConstraint as IpswVersionConstraint +from corellium.models.kcrange import Kcrange as Kcrange +from corellium.models.kcrange_v1 import KcrangeV1 as KcrangeV1 +from corellium.models.kernel_task import KernelTask as KernelTask +from corellium.models.kernel_task_v1 import KernelTaskV1 as KernelTaskV1 +from corellium.models.kernel_thread import KernelThread as KernelThread +from corellium.models.kernel_thread_v1 import KernelThreadV1 as KernelThreadV1 +from corellium.models.ldap_config import LDAPConfig as LDAPConfig +from corellium.models.layout_schema import LayoutSchema as LayoutSchema +from corellium.models.ldap_authentication_credentials import LdapAuthenticationCredentials as LdapAuthenticationCredentials +from corellium.models.ldap_group_search_configuration import LdapGroupSearchConfiguration as LdapGroupSearchConfiguration +from corellium.models.ldap_server_connection_details import LdapServerConnectionDetails as LdapServerConnectionDetails +from corellium.models.ldap_user_attribute_mapping import LdapUserAttributeMapping as LdapUserAttributeMapping +from corellium.models.ldap_user_search_configuration import LdapUserSearchConfiguration as LdapUserSearchConfiguration +from corellium.models.load_extension_body import LoadExtensionBody as LoadExtensionBody +from corellium.models.logging import Logging as Logging +from corellium.models.logging_v1 import LoggingV1 as LoggingV1 +from corellium.models.login_body import LoginBody as LoginBody +from corellium.models.login_result import LoginResult as LoginResult +from corellium.models.login_result_disabled import LoginResultDisabled as LoginResultDisabled +from corellium.models.login_result_domain import LoginResultDomain as LoginResultDomain +from corellium.models.login_result_domain_device_auto_shutdown import LoginResultDomainDeviceAutoShutdown as LoginResultDomainDeviceAutoShutdown +from corellium.models.login_result_domain_disabled import LoginResultDomainDisabled as LoginResultDomainDisabled +from corellium.models.login_result_domain_snapshot_sharing_permissions import LoginResultDomainSnapshotSharingPermissions as LoginResultDomainSnapshotSharingPermissions +from corellium.models.login_result_domain_trial import LoginResultDomainTrial as LoginResultDomainTrial +from corellium.models.login_result_domain_webplayer import LoginResultDomainWebplayer as LoginResultDomainWebplayer +from corellium.models.login_result_user import LoginResultUser as LoginResultUser +from corellium.models.maintenance import Maintenance as Maintenance +from corellium.models.matrix_error import MatrixError as MatrixError +from corellium.models.media_play_body import MediaPlayBody as MediaPlayBody +from corellium.models.media_play_body_v1 import MediaPlayBodyV1 as MediaPlayBodyV1 +from corellium.models.media_play_by_image import MediaPlayByImage as MediaPlayByImage +from corellium.models.media_play_by_url import MediaPlayByUrl as MediaPlayByUrl +from corellium.models.media_store import MediaStore as MediaStore +from corellium.models.media_store_v1 import MediaStoreV1 as MediaStoreV1 +from corellium.models.message_body import MessageBody as MessageBody +from corellium.models.message_body_any_of import MessageBodyAnyOf as MessageBodyAnyOf +from corellium.models.message_body_any_of1 import MessageBodyAnyOf1 as MessageBodyAnyOf1 +from corellium.models.metered_subscription_usage import MeteredSubscriptionUsage as MeteredSubscriptionUsage +from corellium.models.metered_subscription_usage_v1 import MeteredSubscriptionUsageV1 as MeteredSubscriptionUsageV1 +from corellium.models.model import Model as Model +from corellium.models.model_firmware import ModelFirmware as ModelFirmware +from corellium.models.model_firmware_springboard_snapshot import ModelFirmwareSpringboardSnapshot as ModelFirmwareSpringboardSnapshot +from corellium.models.model_firmware_springboard_snapshot_volumes_inner import ModelFirmwareSpringboardSnapshotVolumesInner as ModelFirmwareSpringboardSnapshotVolumesInner +from corellium.models.model_frame import ModelFrame as ModelFrame +from corellium.models.model_frame_dimensions import ModelFrameDimensions as ModelFrameDimensions +from corellium.models.model_partition import ModelPartition as ModelPartition +from corellium.models.model_product_image import ModelProductImage as ModelProductImage +from corellium.models.model_rect import ModelRect as ModelRect +from corellium.models.model_software_v1 import ModelSoftwareV1 as ModelSoftwareV1 +from corellium.models.model_v1 import ModelV1 as ModelV1 +from corellium.models.netdump_filter import NetdumpFilter as NetdumpFilter +from corellium.models.network_connection import NetworkConnection as NetworkConnection +from corellium.models.network_connection_config import NetworkConnectionConfig as NetworkConnectionConfig +from corellium.models.network_connection_pagination_result import NetworkConnectionPaginationResult as NetworkConnectionPaginationResult +from corellium.models.network_connection_provider import NetworkConnectionProvider as NetworkConnectionProvider +from corellium.models.network_connection_provider_pagination_result import NetworkConnectionProviderPaginationResult as NetworkConnectionProviderPaginationResult +from corellium.models.network_connection_providers import NetworkConnectionProviders as NetworkConnectionProviders +from corellium.models.network_connection_providers_results_inner import NetworkConnectionProvidersResultsInner as NetworkConnectionProvidersResultsInner +from corellium.models.network_connections import NetworkConnections as NetworkConnections +from corellium.models.network_interfaces import NetworkInterfaces as NetworkInterfaces +from corellium.models.network_schema import NetworkSchema as NetworkSchema +from corellium.models.network_status import NetworkStatus as NetworkStatus +from corellium.models.network_status_response import NetworkStatusResponse as NetworkStatusResponse +from corellium.models.network_status_v1 import NetworkStatusV1 as NetworkStatusV1 +from corellium.models.node_console_endpoint import NodeConsoleEndpoint as NodeConsoleEndpoint +from corellium.models.node_information import NodeInformation as NodeInformation +from corellium.models.node_information_v1 import NodeInformationV1 as NodeInformationV1 +from corellium.models.node_list import NodeList as NodeList +from corellium.models.node_updates_failed import NodeUpdatesFailed as NodeUpdatesFailed +from corellium.models.open_id_config import OpenIDConfig as OpenIDConfig +from corellium.models.open_id_config_v1 import OpenIDConfigV1 as OpenIDConfigV1 +from corellium.models.open_vpn_config import OpenVPNConfig as OpenVPNConfig +from corellium.models.open_vpn_config_v1 import OpenVPNConfigV1 as OpenVPNConfigV1 +from corellium.models.open_vpn_network_connection import OpenVPNNetworkConnection as OpenVPNNetworkConnection +from corellium.models.open_vpn_network_connection_projects_value import OpenVPNNetworkConnectionProjectsValue as OpenVPNNetworkConnectionProjectsValue +from corellium.models.open_vpn_network_connection_v1 import OpenVPNNetworkConnectionV1 as OpenVPNNetworkConnectionV1 +from corellium.models.paginated_assessments import PaginatedAssessments as PaginatedAssessments +from corellium.models.pagination import Pagination as Pagination +from corellium.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest as PartialUpdateInterconnectRequest +from corellium.models.partial_update_network_connection_body import PartialUpdateNetworkConnectionBody as PartialUpdateNetworkConnectionBody +from corellium.models.partial_update_network_connection_options import PartialUpdateNetworkConnectionOptions as PartialUpdateNetworkConnectionOptions +from corellium.models.password_change_body import PasswordChangeBody as PasswordChangeBody +from corellium.models.password_reset_body import PasswordResetBody as PasswordResetBody +from corellium.models.patch_cluster_config_body import PatchClusterConfigBody as PatchClusterConfigBody +from corellium.models.patch_domain_auth_provider_body import PatchDomainAuthProviderBody as PatchDomainAuthProviderBody +from corellium.models.patch_domain_body import PatchDomainBody as PatchDomainBody +from corellium.models.patch_domain_body_webplayer import PatchDomainBodyWebplayer as PatchDomainBodyWebplayer +from corellium.models.patch_domain_welcome_message_body import PatchDomainWelcomeMessageBody as PatchDomainWelcomeMessageBody +from corellium.models.patch_firmware_service_config_body import PatchFirmwareServiceConfigBody as PatchFirmwareServiceConfigBody +from corellium.models.patch_instance_body import PatchInstanceBody as PatchInstanceBody +from corellium.models.patch_instance_body_proxy_inner import PatchInstanceBodyProxyInner as PatchInstanceBodyProxyInner +from corellium.models.patch_instance_body_strace_filter_inner import PatchInstanceBodyStraceFilterInner as PatchInstanceBodyStraceFilterInner +from corellium.models.patch_instance_options import PatchInstanceOptions as PatchInstanceOptions +from corellium.models.patch_instance_read_only import PatchInstanceReadOnly as PatchInstanceReadOnly +from corellium.models.patch_instance_read_only_body import PatchInstanceReadOnlyBody as PatchInstanceReadOnlyBody +from corellium.models.patch_interconnect_body import PatchInterconnectBody as PatchInterconnectBody +from corellium.models.patch_project_body import PatchProjectBody as PatchProjectBody +from corellium.models.patch_user_body import PatchUserBody as PatchUserBody +from corellium.models.peripherals_data import PeripheralsData as PeripheralsData +from corellium.models.peripherals_data_v1 import PeripheralsDataV1 as PeripheralsDataV1 +from corellium.models.plan import Plan as Plan +from corellium.models.plan_v1 import PlanV1 as PlanV1 +from corellium.models.pool_usage_schema import PoolUsageSchema as PoolUsageSchema +from corellium.models.portal_session import PortalSession as PortalSession +from corellium.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload as PostShareSnapshotRequestPayload +from corellium.models.project import Project as Project +from corellium.models.project_config import ProjectConfig as ProjectConfig +from corellium.models.project_instance_list import ProjectInstanceList as ProjectInstanceList +from corellium.models.project_instance_summary import ProjectInstanceSummary as ProjectInstanceSummary +from corellium.models.project_key import ProjectKey as ProjectKey +from corellium.models.project_key_list import ProjectKeyList as ProjectKeyList +from corellium.models.project_key_v1 import ProjectKeyV1 as ProjectKeyV1 +from corellium.models.project_list import ProjectList as ProjectList +from corellium.models.project_list_item import ProjectListItem as ProjectListItem +from corellium.models.project_network_state import ProjectNetworkState as ProjectNetworkState +from corellium.models.project_quota import ProjectQuota as ProjectQuota +from corellium.models.project_quota_input import ProjectQuotaInput as ProjectQuotaInput +from corellium.models.project_quota_v1 import ProjectQuotaV1 as ProjectQuotaV1 +from corellium.models.project_settings import ProjectSettings as ProjectSettings +from corellium.models.project_settings_v1 import ProjectSettingsV1 as ProjectSettingsV1 +from corellium.models.project_usage import ProjectUsage as ProjectUsage +from corellium.models.project_usage_v1 import ProjectUsageV1 as ProjectUsageV1 +from corellium.models.project_v1 import ProjectV1 as ProjectV1 +from corellium.models.project_with_keys_v1 import ProjectWithKeysV1 as ProjectWithKeysV1 +from corellium.models.provider_network_connection import ProviderNetworkConnection as ProviderNetworkConnection +from corellium.models.proxy_config import ProxyConfig as ProxyConfig +from corellium.models.register_service_body import RegisterServiceBody as RegisterServiceBody +from corellium.models.report_modification_input import ReportModificationInput as ReportModificationInput +from corellium.models.report_modification_result import ReportModificationResult as ReportModificationResult +from corellium.models.reset_link_body import ResetLinkBody as ResetLinkBody +from corellium.models.reset_link_info import ResetLinkInfo as ResetLinkInfo +from corellium.models.reset_link_info_return import ResetLinkInfoReturn as ResetLinkInfoReturn +from corellium.models.reset_password_body import ResetPasswordBody as ResetPasswordBody +from corellium.models.reset_unauthorized_response import ResetUnauthorizedResponse as ResetUnauthorizedResponse +from corellium.models.restore_backup_body import RestoreBackupBody as RestoreBackupBody +from corellium.models.restore_backup_data import RestoreBackupData as RestoreBackupData +from corellium.models.revoke_invites_body import RevokeInvitesBody as RevokeInvitesBody +from corellium.models.revoke_invites_response import RevokeInvitesResponse as RevokeInvitesResponse +from corellium.models.role import Role as Role +from corellium.models.role_name import RoleName as RoleName +from corellium.models.role_v1 import RoleV1 as RoleV1 +from corellium.models.roles_list_response import RolesListResponse as RolesListResponse +from corellium.models.rotate_body import RotateBody as RotateBody +from corellium.models.rotate_body_v1 import RotateBodyV1 as RotateBodyV1 +from corellium.models.saml_config import SAMLConfig as SAMLConfig +from corellium.models.saml_group_mapping import SamlGroupMapping as SamlGroupMapping +from corellium.models.saml_identity_provider_config import SamlIdentityProviderConfig as SamlIdentityProviderConfig +from corellium.models.saml_service_provider_config import SamlServiceProviderConfig as SamlServiceProviderConfig +from corellium.models.saml_user_attribute_mapping import SamlUserAttributeMapping as SamlUserAttributeMapping +from corellium.models.send_reset_link_body import SendResetLinkBody as SendResetLinkBody +from corellium.models.service_endpoint_schema import ServiceEndpointSchema as ServiceEndpointSchema +from corellium.models.service_status_request_body import ServiceStatusRequestBody as ServiceStatusRequestBody +from corellium.models.service_status_request_body_vms_inner import ServiceStatusRequestBodyVmsInner as ServiceStatusRequestBodyVmsInner +from corellium.models.set_domain_welcome_message_body import SetDomainWelcomeMessageBody as SetDomainWelcomeMessageBody +from corellium.models.set_snapshot_permissions_body import SetSnapshotPermissionsBody as SetSnapshotPermissionsBody +from corellium.models.share_snapshot_body import ShareSnapshotBody as ShareSnapshotBody +from corellium.models.shared_snapshot import SharedSnapshot as SharedSnapshot +from corellium.models.shared_snapshots_info import SharedSnapshotsInfo as SharedSnapshotsInfo +from corellium.models.shared_snapshots_response import SharedSnapshotsResponse as SharedSnapshotsResponse +from corellium.models.snapshot import Snapshot as Snapshot +from corellium.models.snapshot_creation_options import SnapshotCreationOptions as SnapshotCreationOptions +from corellium.models.snapshot_list import SnapshotList as SnapshotList +from corellium.models.snapshot_member import SnapshotMember as SnapshotMember +from corellium.models.snapshot_member_v1 import SnapshotMemberV1 as SnapshotMemberV1 +from corellium.models.snapshot_owner import SnapshotOwner as SnapshotOwner +from corellium.models.snapshot_owner_v1 import SnapshotOwnerV1 as SnapshotOwnerV1 +from corellium.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload as SnapshotPermissionsRequestPayload +from corellium.models.snapshot_request import SnapshotRequest as SnapshotRequest +from corellium.models.snapshot_sharing import SnapshotSharing as SnapshotSharing +from corellium.models.snapshot_sharing_permissions import SnapshotSharingPermissions as SnapshotSharingPermissions +from corellium.models.snapshot_sharing_permissions_request_schema import SnapshotSharingPermissionsRequestSchema as SnapshotSharingPermissionsRequestSchema +from corellium.models.snapshot_sharing_type import SnapshotSharingType as SnapshotSharingType +from corellium.models.snapshot_sharing_v1 import SnapshotSharingV1 as SnapshotSharingV1 +from corellium.models.snapshot_status import SnapshotStatus as SnapshotStatus +from corellium.models.snapshot_status_v1 import SnapshotStatusV1 as SnapshotStatusV1 +from corellium.models.snapshot_v1 import SnapshotV1 as SnapshotV1 +from corellium.models.sslsplit_filter import SslsplitFilter as SslsplitFilter +from corellium.models.start_instance_body import StartInstanceBody as StartInstanceBody +from corellium.models.stop_instance_body import StopInstanceBody as StopInstanceBody +from corellium.models.storage_already_mounted_response import StorageAlreadyMountedResponse as StorageAlreadyMountedResponse +from corellium.models.storage_attach_response import StorageAttachResponse as StorageAttachResponse +from corellium.models.storage_device import StorageDevice as StorageDevice +from corellium.models.storage_device_list import StorageDeviceList as StorageDeviceList +from corellium.models.storage_eject_already_unmounted_response import StorageEjectAlreadyUnmountedResponse as StorageEjectAlreadyUnmountedResponse +from corellium.models.storage_file import StorageFile as StorageFile +from corellium.models.storage_file_list import StorageFileList as StorageFileList +from corellium.models.storage_list import StorageList as StorageList +from corellium.models.storage_queue_error import StorageQueueError as StorageQueueError +from corellium.models.stripe_checkout_body import StripeCheckoutBody as StripeCheckoutBody +from corellium.models.stripe_checkout_complete_body import StripeCheckoutCompleteBody as StripeCheckoutCompleteBody +from corellium.models.stripe_webhook_ack import StripeWebhookAck as StripeWebhookAck +from corellium.models.subscribe_to_trial_body import SubscribeToTrialBody as SubscribeToTrialBody +from corellium.models.subscription import Subscription as Subscription +from corellium.models.subscription_trial import SubscriptionTrial as SubscriptionTrial +from corellium.models.sys_info_schema import SysInfoSchema as SysInfoSchema +from corellium.models.task_status import TaskStatus as TaskStatus +from corellium.models.team import Team as Team +from corellium.models.team_create import TeamCreate as TeamCreate +from corellium.models.team_created import TeamCreated as TeamCreated +from corellium.models.team_user import TeamUser as TeamUser +from corellium.models.team_v1 import TeamV1 as TeamV1 +from corellium.models.teams_list_response import TeamsListResponse as TeamsListResponse +from corellium.models.test_assessment_input import TestAssessmentInput as TestAssessmentInput +from corellium.models.text_input import TextInput as TextInput +from corellium.models.text_input_request import TextInputRequest as TextInputRequest +from corellium.models.text_input_request_v1 import TextInputRequestV1 as TextInputRequestV1 +from corellium.models.token import Token as Token +from corellium.models.token_v1 import TokenV1 as TokenV1 +from corellium.models.token_validate_body import TokenValidateBody as TokenValidateBody +from corellium.models.totp_disable_body import TotpDisableBody as TotpDisableBody +from corellium.models.totp_enable_body import TotpEnableBody as TotpEnableBody +from corellium.models.totp_generate_response import TotpGenerateResponse as TotpGenerateResponse +from corellium.models.touch_curve_input import TouchCurveInput as TouchCurveInput +from corellium.models.touch_curve_input_request import TouchCurveInputRequest as TouchCurveInputRequest +from corellium.models.touch_curve_input_request_v1 import TouchCurveInputRequestV1 as TouchCurveInputRequestV1 +from corellium.models.touch_input import TouchInput as TouchInput +from corellium.models.touch_input_request import TouchInputRequest as TouchInputRequest +from corellium.models.touch_input_request_v1 import TouchInputRequestV1 as TouchInputRequestV1 +from corellium.models.trial import Trial as Trial +from corellium.models.trial_extension import TrialExtension as TrialExtension +from corellium.models.trial_extension_v1 import TrialExtensionV1 as TrialExtensionV1 +from corellium.models.trial_request import TrialRequest as TrialRequest +from corellium.models.trial_request_detail import TrialRequestDetail as TrialRequestDetail +from corellium.models.trial_request_detail_organization import TrialRequestDetailOrganization as TrialRequestDetailOrganization +from corellium.models.trial_request_list_response import TrialRequestListResponse as TrialRequestListResponse +from corellium.models.trial_request_metadata import TrialRequestMetadata as TrialRequestMetadata +from corellium.models.trial_request_options import TrialRequestOptions as TrialRequestOptions +from corellium.models.trial_v1 import TrialV1 as TrialV1 +from corellium.models.unauthorized_error import UnauthorizedError as UnauthorizedError +from corellium.models.uncancel_subscription_body import UncancelSubscriptionBody as UncancelSubscriptionBody +from corellium.models.update_assessment_input import UpdateAssessmentInput as UpdateAssessmentInput +from corellium.models.update_domain_settings_response import UpdateDomainSettingsResponse as UpdateDomainSettingsResponse +from corellium.models.update_domain_settings_response_settings import UpdateDomainSettingsResponseSettings as UpdateDomainSettingsResponseSettings +from corellium.models.update_domain_settings_response_snapshot_sharing_permissions import UpdateDomainSettingsResponseSnapshotSharingPermissions as UpdateDomainSettingsResponseSnapshotSharingPermissions +from corellium.models.update_domain_settings_response_webplayer import UpdateDomainSettingsResponseWebplayer as UpdateDomainSettingsResponseWebplayer +from corellium.models.update_domain_welcome_message_request import UpdateDomainWelcomeMessageRequest as UpdateDomainWelcomeMessageRequest +from corellium.models.update_extension import UpdateExtension as UpdateExtension +from corellium.models.update_extension_body import UpdateExtensionBody as UpdateExtensionBody +from corellium.models.update_hook_body import UpdateHookBody as UpdateHookBody +from corellium.models.update_interconnect_body import UpdateInterconnectBody as UpdateInterconnectBody +from corellium.models.update_interconnect_v3_body import UpdateInterconnectV3Body as UpdateInterconnectV3Body +from corellium.models.update_network_connection_body import UpdateNetworkConnectionBody as UpdateNetworkConnectionBody +from corellium.models.update_network_connection_options import UpdateNetworkConnectionOptions as UpdateNetworkConnectionOptions +from corellium.models.update_network_connection_options_config import UpdateNetworkConnectionOptionsConfig as UpdateNetworkConnectionOptionsConfig +from corellium.models.update_own_profile_body import UpdateOwnProfileBody as UpdateOwnProfileBody +from corellium.models.update_team_body import UpdateTeamBody as UpdateTeamBody +from corellium.models.update_trial_request_body import UpdateTrialRequestBody as UpdateTrialRequestBody +from corellium.models.update_trial_request_params import UpdateTrialRequestParams as UpdateTrialRequestParams +from corellium.models.upload_size_error import UploadSizeError as UploadSizeError +from corellium.models.user import User as User +from corellium.models.user_create import UserCreate as UserCreate +from corellium.models.user_create_return import UserCreateReturn as UserCreateReturn +from corellium.models.user_created import UserCreated as UserCreated +from corellium.models.user_error import UserError as UserError +from corellium.models.user_error_item import UserErrorItem as UserErrorItem +from corellium.models.user_error_response import UserErrorResponse as UserErrorResponse +from corellium.models.user_error_v1 import UserErrorV1 as UserErrorV1 +from corellium.models.user_errors import UserErrors as UserErrors +from corellium.models.user_errors_v1 import UserErrorsV1 as UserErrorsV1 +from corellium.models.user_snapshots import UserSnapshots as UserSnapshots +from corellium.models.user_update import UserUpdate as UserUpdate +from corellium.models.v1_check_subdomain_existence_parameters import V1CheckSubdomainExistenceParameters as V1CheckSubdomainExistenceParameters +from corellium.models.v1_create_hook_parameters import V1CreateHookParameters as V1CreateHookParameters +from corellium.models.v1_load_extension_parameters import V1LoadExtensionParameters as V1LoadExtensionParameters +from corellium.models.v1_set_state_body import V1SetStateBody as V1SetStateBody +from corellium.models.v1_update_hook_parameters import V1UpdateHookParameters as V1UpdateHookParameters +from corellium.models.v3_delete_network_connection_request import V3DeleteNetworkConnectionRequest as V3DeleteNetworkConnectionRequest +from corellium.models.v3_update_snapshot_request import V3UpdateSnapshotRequest as V3UpdateSnapshotRequest +from corellium.models.vlan_config import VLANConfig as VLANConfig +from corellium.models.vlan_config_v1 import VLANConfigV1 as VLANConfigV1 +from corellium.models.vlan_network_connection import VLANNetworkConnection as VLANNetworkConnection +from corellium.models.vlan_network_connection_v1 import VLANNetworkConnectionV1 as VLANNetworkConnectionV1 +from corellium.models.validation_error import ValidationError as ValidationError +from corellium.models.volume_options import VolumeOptions as VolumeOptions +from corellium.models.volume_options_v1 import VolumeOptionsV1 as VolumeOptionsV1 +from corellium.models.vpn_config_preauthorization import VpnConfigPreauthorization as VpnConfigPreauthorization +from corellium.models.vpn_definition import VpnDefinition as VpnDefinition +from corellium.models.vpn_definition_v1 import VpnDefinitionV1 as VpnDefinitionV1 +from corellium.models.vpn_schema import VpnSchema as VpnSchema +from corellium.models.web_player_allowed_domains import WebPlayerAllowedDomains as WebPlayerAllowedDomains +from corellium.models.web_player_create_session_request import WebPlayerCreateSessionRequest as WebPlayerCreateSessionRequest +from corellium.models.web_player_created_session import WebPlayerCreatedSession as WebPlayerCreatedSession +from corellium.models.web_player_features import WebPlayerFeatures as WebPlayerFeatures +from corellium.models.web_player_session import WebPlayerSession as WebPlayerSession +from corellium.models.web_player_session_domain import WebPlayerSessionDomain as WebPlayerSessionDomain +from corellium.models.web_player_session_list_response import WebPlayerSessionListResponse as WebPlayerSessionListResponse +from corellium.models.web_player_session_v1 import WebPlayerSessionV1 as WebPlayerSessionV1 + +__all__.append("CorelliumClient") +from corellium.corellium_client import CorelliumClient as CorelliumClient diff --git a/corellium/api/__init__.py b/corellium/api/__init__.py new file mode 100644 index 0000000..d084545 --- /dev/null +++ b/corellium/api/__init__.py @@ -0,0 +1,71 @@ +# flake8: noqa + +# import apis into api package +from corellium.api.activity_api import ActivityApi +from corellium.api.activity_v1_api import ActivityV1Api +from corellium.api.agent_api import AgentApi +from corellium.api.agent_v1_api import AgentV1Api +from corellium.api.authentication_api import AuthenticationApi +from corellium.api.authentication_v1_api import AuthenticationV1Api +from corellium.api.billing_api import BillingApi +from corellium.api.cluster_api import ClusterApi +from corellium.api.cluster_administration_config_api import ClusterAdministrationConfigApi +from corellium.api.cluster_administration_firmware_service_api import ClusterAdministrationFirmwareServiceApi +from corellium.api.cluster_administration_nodes_api import ClusterAdministrationNodesApi +from corellium.api.cluster_snapshots_api import ClusterSnapshotsApi +from corellium.api.config_api import ConfigApi +from corellium.api.config_v1_api import ConfigV1Api +from corellium.api.core_trace_api import CoreTraceApi +from corellium.api.core_trace_v1_api import CoreTraceV1Api +from corellium.api.domain_api import DomainApi +from corellium.api.domain_auth_provider_api import DomainAuthProviderApi +from corellium.api.domain_auth_providers_api import DomainAuthProvidersApi +from corellium.api.domain_v1_api import DomainV1Api +from corellium.api.extensions_api import ExtensionsApi +from corellium.api.extensions_v1_api import ExtensionsV1Api +from corellium.api.external_services_api import ExternalServicesApi +from corellium.api.firmware_service_api import FirmwareServiceApi +from corellium.api.flavors_api import FlavorsApi +from corellium.api.hyper_trace_api import HyperTraceApi +from corellium.api.hyper_trace_v1_api import HyperTraceV1Api +from corellium.api.hypertune_api import HypertuneApi +from corellium.api.hypervisor_hooks_api import HypervisorHooksApi +from corellium.api.hypervisor_hooks_v1_api import HypervisorHooksV1Api +from corellium.api.images_api import ImagesApi +from corellium.api.images_v1_api import ImagesV1Api +from corellium.api.images_v2_api import ImagesV2Api +from corellium.api.instances_api import InstancesApi +from corellium.api.instances_v1_api import InstancesV1Api +from corellium.api.instances_v2_api import InstancesV2Api +from corellium.api.interconnects_api import InterconnectsApi +from corellium.api.interconnects_v1_api import InterconnectsV1Api +from corellium.api.invites_api import InvitesApi +from corellium.api.invites_v1_api import InvitesV1Api +from corellium.api.models_api import ModelsApi +from corellium.api.models_v1_api import ModelsV1Api +from corellium.api.net_connect_api import NetConnectApi +from corellium.api.net_connect_v1_api import NetConnectV1Api +from corellium.api.projects_api import ProjectsApi +from corellium.api.projects_v1_api import ProjectsV1Api +from corellium.api.ram_dump_api import RAMDumpApi +from corellium.api.ram_dump_v1_api import RAMDumpV1Api +from corellium.api.roles_api import RolesApi +from corellium.api.roles_v1_api import RolesV1Api +from corellium.api.snapshot_sharing_api import SnapshotSharingApi +from corellium.api.snapshot_sharing_v1_api import SnapshotSharingV1Api +from corellium.api.snapshots_api import SnapshotsApi +from corellium.api.snapshots_v1_api import SnapshotsV1Api +from corellium.api.status_api import StatusApi +from corellium.api.status_v1_api import StatusV1Api +from corellium.api.storage_api import StorageApi +from corellium.api.storage_v1_api import StorageV1Api +from corellium.api.totp_api import TOTPApi +from corellium.api.teams_api import TeamsApi +from corellium.api.teams_v1_api import TeamsV1Api +from corellium.api.users_api import UsersApi +from corellium.api.users_v1_api import UsersV1Api +from corellium.api.web_player_api import WebPlayerApi +from corellium.api.web_player_v1_api import WebPlayerV1Api +from corellium.api.assessments_api import AssessmentsApi +from corellium.api.assessments_v1_api import AssessmentsV1Api + diff --git a/corellium/api/activity_api.py b/corellium/api/activity_api.py new file mode 100644 index 0000000..1dbcbeb --- /dev/null +++ b/corellium/api/activity_api.py @@ -0,0 +1,1824 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBytes, StrictStr, field_validator +from typing import Any, Optional, Tuple, Union +from typing_extensions import Annotated +from corellium.models.activity_export_format import ActivityExportFormat +from corellium.models.activity_export_status import ActivityExportStatus +from corellium.models.activity_export_task_list import ActivityExportTaskList +from corellium.models.activity_list_response import ActivityListResponse +from corellium.models.create_activity_export_body import CreateActivityExportBody +from corellium.models.create_activity_export_response import CreateActivityExportResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ActivityApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_activity_export( + self, + accept: Annotated[ActivityExportFormat, Field(description="Specifies the activity export file format.")], + create_activity_export_body: Optional[CreateActivityExportBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateActivityExportResponse: + """Start activity export + + **Required role:** Domain administrator. Starts building a file of activity records for download, for audits or offline analysis. Requires a domain administrator and the user-logging license feature (403 otherwise). Choose the file format with the `Accept` header: `application/json` or `text/csv` (any other value returns 400). The body takes the same filters as `v3ListActivities`, but the export is not paginated: it contains every matching record. **Workflow:** 1. `v3CreateActivityExport` (this call). Returns 201 with an `id` like `activity-export/`. 2. Poll `v3GetActivityExportStatus` with the `` part until `status` is `complete`. 3. `v3DownloadActivity` with the same UUID to get the file. + + :param accept: Specifies the activity export file format. (required) + :type accept: ActivityExportFormat + :param create_activity_export_body: + :type create_activity_export_body: CreateActivityExportBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_activity_export_serialize( + accept=accept, + create_activity_export_body=create_activity_export_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateActivityExportResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_activity_export_with_http_info( + self, + accept: Annotated[ActivityExportFormat, Field(description="Specifies the activity export file format.")], + create_activity_export_body: Optional[CreateActivityExportBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateActivityExportResponse]: + """Start activity export + + **Required role:** Domain administrator. Starts building a file of activity records for download, for audits or offline analysis. Requires a domain administrator and the user-logging license feature (403 otherwise). Choose the file format with the `Accept` header: `application/json` or `text/csv` (any other value returns 400). The body takes the same filters as `v3ListActivities`, but the export is not paginated: it contains every matching record. **Workflow:** 1. `v3CreateActivityExport` (this call). Returns 201 with an `id` like `activity-export/`. 2. Poll `v3GetActivityExportStatus` with the `` part until `status` is `complete`. 3. `v3DownloadActivity` with the same UUID to get the file. + + :param accept: Specifies the activity export file format. (required) + :type accept: ActivityExportFormat + :param create_activity_export_body: + :type create_activity_export_body: CreateActivityExportBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_activity_export_serialize( + accept=accept, + create_activity_export_body=create_activity_export_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateActivityExportResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_activity_export_without_preload_content( + self, + accept: Annotated[ActivityExportFormat, Field(description="Specifies the activity export file format.")], + create_activity_export_body: Optional[CreateActivityExportBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start activity export + + **Required role:** Domain administrator. Starts building a file of activity records for download, for audits or offline analysis. Requires a domain administrator and the user-logging license feature (403 otherwise). Choose the file format with the `Accept` header: `application/json` or `text/csv` (any other value returns 400). The body takes the same filters as `v3ListActivities`, but the export is not paginated: it contains every matching record. **Workflow:** 1. `v3CreateActivityExport` (this call). Returns 201 with an `id` like `activity-export/`. 2. Poll `v3GetActivityExportStatus` with the `` part until `status` is `complete`. 3. `v3DownloadActivity` with the same UUID to get the file. + + :param accept: Specifies the activity export file format. (required) + :type accept: ActivityExportFormat + :param create_activity_export_body: + :type create_activity_export_body: CreateActivityExportBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_activity_export_serialize( + accept=accept, + create_activity_export_body=create_activity_export_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateActivityExportResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_activity_export_serialize( + self, + accept, + create_activity_export_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if accept is not None: + _header_params['accept'] = accept + # process the form parameters + # process the body parameter + if create_activity_export_body is not None: + _body_params = create_activity_export_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/activity/export', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_download_activity( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Download activity for a given task + + **Required role:** Domain administrator. Downloads the file produced by a finished activity export, as JSON or CSV depending on the format you asked for. Pass the UUID part of the export `id`. Returns 404 if the file is not ready or does not exist; check `v3GetActivityExportStatus` first. Requires a domain administrator and the user-logging license feature. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_activity_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_download_activity_with_http_info( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Download activity for a given task + + **Required role:** Domain administrator. Downloads the file produced by a finished activity export, as JSON or CSV depending on the format you asked for. Pass the UUID part of the export `id`. Returns 404 if the file is not ready or does not exist; check `v3GetActivityExportStatus` first. Requires a domain administrator and the user-logging license feature. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_activity_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_download_activity_without_preload_content( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download activity for a given task + + **Required role:** Domain administrator. Downloads the file produced by a finished activity export, as JSON or CSV depending on the format you asked for. Pass the UUID part of the export `id`. Returns 404 if the file is not ready or does not exist; check `v3GetActivityExportStatus` first. Requires a domain administrator and the user-logging license feature. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_activity_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_download_activity_serialize( + self, + task_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if task_id is not None: + _path_params['taskId'] = task_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json', + 'text/csv' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/activity/export/{taskId}/download', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_activity_export_status( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivityExportStatus: + """Get export task status + + **Required role:** Domain administrator. Returns the status of an activity export started with `v3CreateActivityExport`. Pass the UUID part of the export `id`. Poll until `status` is `complete`, then call `v3DownloadActivity`. Finished tasks are cleaned up, so a task that no longer exists is reported as `complete`. Requires a domain administrator and the user-logging license feature. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_activity_export_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityExportStatus", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_activity_export_status_with_http_info( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivityExportStatus]: + """Get export task status + + **Required role:** Domain administrator. Returns the status of an activity export started with `v3CreateActivityExport`. Pass the UUID part of the export `id`. Poll until `status` is `complete`, then call `v3DownloadActivity`. Finished tasks are cleaned up, so a task that no longer exists is reported as `complete`. Requires a domain administrator and the user-logging license feature. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_activity_export_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityExportStatus", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_activity_export_status_without_preload_content( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get export task status + + **Required role:** Domain administrator. Returns the status of an activity export started with `v3CreateActivityExport`. Pass the UUID part of the export `id`. Poll until `status` is `complete`, then call `v3DownloadActivity`. Finished tasks are cleaned up, so a task that no longer exists is reported as `complete`. Requires a domain administrator and the user-logging license feature. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_activity_export_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityExportStatus", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_activity_export_status_serialize( + self, + task_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if task_id is not None: + _path_params['taskId'] = task_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/activity/export/{taskId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_activity_export_tasks( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivityExportTaskList: + """Get all export tasks for user + + **Required role:** Domain administrator. Lists the activity exports you have started, with each one's status and the filters it used. Requires a domain administrator and the user-logging license feature. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_activity_export_tasks_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityExportTaskList", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_activity_export_tasks_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivityExportTaskList]: + """Get all export tasks for user + + **Required role:** Domain administrator. Lists the activity exports you have started, with each one's status and the filters it used. Requires a domain administrator and the user-logging license feature. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_activity_export_tasks_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityExportTaskList", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_activity_export_tasks_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get all export tasks for user + + **Required role:** Domain administrator. Lists the activity exports you have started, with each one's status and the filters it used. Requires a domain administrator and the user-logging license feature. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_activity_export_tasks_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityExportTaskList", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_activity_export_tasks_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/activity/export', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_activities( + self, + resource: Annotated[Optional[Any], Field(description="Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of entries to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip.")] = None, + order_by: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first).")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Only activity about this device.")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Only activity in this project.")] = None, + actor: Annotated[Optional[StrictStr], Field(description="Only activity performed by this user (user ID).")] = None, + search: Annotated[Optional[StrictStr], Field(description="Free-text search. Applied last, as a loose match on the results that pass the other filters.")] = None, + to: Annotated[Optional[datetime], Field(description="Only activity at or before this time (ISO 8601).")] = None, + var_from: Annotated[Optional[datetime], Field(description="Only activity at or after this time (ISO 8601).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivityListResponse: + """Get resource activities + + Returns the activity log: a record of what happened in your domain, such as devices created, started and deleted, users signing in, and settings changed, with who did it and when. You only see events your role allows. Filter by device, project, user, time range or free text, and page with `limit` and `offset`. For a full download of many records, use `v3CreateActivityExport` instead. + + :param resource: Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`. + :type resource: object + :param limit: Number of entries to return. + :type limit: float + :param offset: Number of results to skip. + :type offset: float + :param order_by: Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first). + :type order_by: str + :param instance_id: Only activity about this device. + :type instance_id: str + :param project_id: Only activity in this project. + :type project_id: str + :param actor: Only activity performed by this user (user ID). + :type actor: str + :param search: Free-text search. Applied last, as a loose match on the results that pass the other filters. + :type search: str + :param to: Only activity at or before this time (ISO 8601). + :type to: datetime + :param var_from: Only activity at or after this time (ISO 8601). + :type var_from: datetime + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_activities_serialize( + resource=resource, + limit=limit, + offset=offset, + order_by=order_by, + instance_id=instance_id, + project_id=project_id, + actor=actor, + search=search, + to=to, + var_from=var_from, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_activities_with_http_info( + self, + resource: Annotated[Optional[Any], Field(description="Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of entries to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip.")] = None, + order_by: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first).")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Only activity about this device.")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Only activity in this project.")] = None, + actor: Annotated[Optional[StrictStr], Field(description="Only activity performed by this user (user ID).")] = None, + search: Annotated[Optional[StrictStr], Field(description="Free-text search. Applied last, as a loose match on the results that pass the other filters.")] = None, + to: Annotated[Optional[datetime], Field(description="Only activity at or before this time (ISO 8601).")] = None, + var_from: Annotated[Optional[datetime], Field(description="Only activity at or after this time (ISO 8601).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivityListResponse]: + """Get resource activities + + Returns the activity log: a record of what happened in your domain, such as devices created, started and deleted, users signing in, and settings changed, with who did it and when. You only see events your role allows. Filter by device, project, user, time range or free text, and page with `limit` and `offset`. For a full download of many records, use `v3CreateActivityExport` instead. + + :param resource: Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`. + :type resource: object + :param limit: Number of entries to return. + :type limit: float + :param offset: Number of results to skip. + :type offset: float + :param order_by: Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first). + :type order_by: str + :param instance_id: Only activity about this device. + :type instance_id: str + :param project_id: Only activity in this project. + :type project_id: str + :param actor: Only activity performed by this user (user ID). + :type actor: str + :param search: Free-text search. Applied last, as a loose match on the results that pass the other filters. + :type search: str + :param to: Only activity at or before this time (ISO 8601). + :type to: datetime + :param var_from: Only activity at or after this time (ISO 8601). + :type var_from: datetime + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_activities_serialize( + resource=resource, + limit=limit, + offset=offset, + order_by=order_by, + instance_id=instance_id, + project_id=project_id, + actor=actor, + search=search, + to=to, + var_from=var_from, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_activities_without_preload_content( + self, + resource: Annotated[Optional[Any], Field(description="Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of entries to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip.")] = None, + order_by: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first).")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Only activity about this device.")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Only activity in this project.")] = None, + actor: Annotated[Optional[StrictStr], Field(description="Only activity performed by this user (user ID).")] = None, + search: Annotated[Optional[StrictStr], Field(description="Free-text search. Applied last, as a loose match on the results that pass the other filters.")] = None, + to: Annotated[Optional[datetime], Field(description="Only activity at or before this time (ISO 8601).")] = None, + var_from: Annotated[Optional[datetime], Field(description="Only activity at or after this time (ISO 8601).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get resource activities + + Returns the activity log: a record of what happened in your domain, such as devices created, started and deleted, users signing in, and settings changed, with who did it and when. You only see events your role allows. Filter by device, project, user, time range or free text, and page with `limit` and `offset`. For a full download of many records, use `v3CreateActivityExport` instead. + + :param resource: Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`. + :type resource: object + :param limit: Number of entries to return. + :type limit: float + :param offset: Number of results to skip. + :type offset: float + :param order_by: Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first). + :type order_by: str + :param instance_id: Only activity about this device. + :type instance_id: str + :param project_id: Only activity in this project. + :type project_id: str + :param actor: Only activity performed by this user (user ID). + :type actor: str + :param search: Free-text search. Applied last, as a loose match on the results that pass the other filters. + :type search: str + :param to: Only activity at or before this time (ISO 8601). + :type to: datetime + :param var_from: Only activity at or after this time (ISO 8601). + :type var_from: datetime + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_activities_serialize( + resource=resource, + limit=limit, + offset=offset, + order_by=order_by, + instance_id=instance_id, + project_id=project_id, + actor=actor, + search=search, + to=to, + var_from=var_from, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_activities_serialize( + self, + resource, + limit, + offset, + order_by, + instance_id, + project_id, + actor, + search, + to, + var_from, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if resource is not None: + + _query_params.append(('resource', resource)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + if instance_id is not None: + + _query_params.append(('instanceId', instance_id)) + + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + if actor is not None: + + _query_params.append(('actor', actor)) + + if search is not None: + + _query_params.append(('search', search)) + + if to is not None: + if isinstance(to, datetime): + _query_params.append( + ( + 'to', + to.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('to', to)) + + if var_from is not None: + if isinstance(var_from, datetime): + _query_params.append( + ( + 'from', + var_from.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('from', var_from)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/activity', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/activity_v1_api.py b/corellium/api/activity_v1_api.py new file mode 100644 index 0000000..b869aa4 --- /dev/null +++ b/corellium/api/activity_v1_api.py @@ -0,0 +1,1609 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from corellium.models.activity_export_dto import ActivityExportDto +from corellium.models.activity_export_response import ActivityExportResponse +from corellium.models.activity_list import ActivityList +from corellium.models.activity_request import ActivityRequest + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ActivityV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_activity_export( + self, + activity_export_dto: ActivityExportDto, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivityExportResponse: + """(Deprecated) Start activity export + + + :param activity_export_dto: (required) + :type activity_export_dto: ActivityExportDto + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/activity/export is deprecated.", DeprecationWarning) + + _param = self._v1_activity_export_serialize( + activity_export_dto=activity_export_dto, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ActivityExportResponse", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_activity_export_with_http_info( + self, + activity_export_dto: ActivityExportDto, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivityExportResponse]: + """(Deprecated) Start activity export + + + :param activity_export_dto: (required) + :type activity_export_dto: ActivityExportDto + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/activity/export is deprecated.", DeprecationWarning) + + _param = self._v1_activity_export_serialize( + activity_export_dto=activity_export_dto, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ActivityExportResponse", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_activity_export_without_preload_content( + self, + activity_export_dto: ActivityExportDto, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start activity export + + + :param activity_export_dto: (required) + :type activity_export_dto: ActivityExportDto + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/activity/export is deprecated.", DeprecationWarning) + + _param = self._v1_activity_export_serialize( + activity_export_dto=activity_export_dto, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ActivityExportResponse", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_activity_export_serialize( + self, + activity_export_dto, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if activity_export_dto is not None: + _body_params = activity_export_dto + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/activity/export', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_activity_list( + self, + request: Optional[ActivityRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivityList: + """(Deprecated) Get resource activities + + + :param request: + :type request: ActivityRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity is deprecated.", DeprecationWarning) + + _param = self._v1_activity_list_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_activity_list_with_http_info( + self, + request: Optional[ActivityRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivityList]: + """(Deprecated) Get resource activities + + + :param request: + :type request: ActivityRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity is deprecated.", DeprecationWarning) + + _param = self._v1_activity_list_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_activity_list_without_preload_content( + self, + request: Optional[ActivityRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get resource activities + + + :param request: + :type request: ActivityRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity is deprecated.", DeprecationWarning) + + _param = self._v1_activity_list_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_activity_list_serialize( + self, + request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if request is not None: + + _query_params.append(('request', request)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/activity', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_download_activity( + self, + task_id: Annotated[StrictStr, Field(description="Export ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivityList: + """(Deprecated) Download activity + + Download activity for a given task + + :param task_id: Export ID (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export/{taskId}/download is deprecated.", DeprecationWarning) + + _param = self._v1_download_activity_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_download_activity_with_http_info( + self, + task_id: Annotated[StrictStr, Field(description="Export ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivityList]: + """(Deprecated) Download activity + + Download activity for a given task + + :param task_id: Export ID (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export/{taskId}/download is deprecated.", DeprecationWarning) + + _param = self._v1_download_activity_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_download_activity_without_preload_content( + self, + task_id: Annotated[StrictStr, Field(description="Export ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Download activity + + Download activity for a given task + + :param task_id: Export ID (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export/{taskId}/download is deprecated.", DeprecationWarning) + + _param = self._v1_download_activity_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_download_activity_serialize( + self, + task_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if task_id is not None: + _path_params['taskId'] = task_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/activity/export/{taskId}/download', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_activity_export_status( + self, + task_id: Annotated[StrictStr, Field(description="Export ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivityList: + """(Deprecated) Get export task status + + + :param task_id: Export ID (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export/{taskId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_activity_export_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_activity_export_status_with_http_info( + self, + task_id: Annotated[StrictStr, Field(description="Export ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivityList]: + """(Deprecated) Get export task status + + + :param task_id: Export ID (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export/{taskId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_activity_export_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_activity_export_status_without_preload_content( + self, + task_id: Annotated[StrictStr, Field(description="Export ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get export task status + + + :param task_id: Export ID (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export/{taskId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_activity_export_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_activity_export_status_serialize( + self, + task_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if task_id is not None: + _path_params['taskId'] = task_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/activity/export/{taskId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_activity_export_tasks( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActivityList: + """(Deprecated) Get all export tasks for user + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export is deprecated.", DeprecationWarning) + + _param = self._v1_get_activity_export_tasks_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_activity_export_tasks_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActivityList]: + """(Deprecated) Get all export tasks for user + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export is deprecated.", DeprecationWarning) + + _param = self._v1_get_activity_export_tasks_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_activity_export_tasks_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get all export tasks for user + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/activity/export is deprecated.", DeprecationWarning) + + _param = self._v1_get_activity_export_tasks_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActivityList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_activity_export_tasks_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/activity/export', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/agent_api.py b/corellium/api/agent_api.py new file mode 100644 index 0000000..80258d2 --- /dev/null +++ b/corellium/api/agent_api.py @@ -0,0 +1,13644 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictStr, field_validator +from typing import List, Optional, Tuple, Union +from typing_extensions import Annotated +from corellium.models.agent_app_ready_response import AgentAppReadyResponse +from corellium.models.agent_apps_list import AgentAppsList +from corellium.models.agent_apps_status_list import AgentAppsStatusList +from corellium.models.agent_container_health import AgentContainerHealth +from corellium.models.agent_container_list import AgentContainerList +from corellium.models.agent_file_archive_download_body import AgentFileArchiveDownloadBody +from corellium.models.agent_file_attributes_body import AgentFileAttributesBody +from corellium.models.agent_file_download_token import AgentFileDownloadToken +from corellium.models.agent_frida_process_list import AgentFridaProcessList +from corellium.models.agent_frida_response import AgentFridaResponse +from corellium.models.agent_frida_run_body import AgentFridaRunBody +from corellium.models.agent_icons_response import AgentIconsResponse +from corellium.models.agent_install_body import AgentInstallBody +from corellium.models.agent_profile_list_response import AgentProfileListResponse +from corellium.models.agent_remote_it_status import AgentRemoteItStatus +from corellium.models.agent_system_adb_auth import AgentSystemAdbAuth +from corellium.models.agent_system_get_prop_body import AgentSystemGetPropBody +from corellium.models.agent_system_get_prop_response import AgentSystemGetPropResponse +from corellium.models.agent_system_install_open_gapps_body import AgentSystemInstallOpenGappsBody +from corellium.models.agent_system_network_response import AgentSystemNetworkResponse +from corellium.models.agent_system_result import AgentSystemResult +from corellium.models.agent_system_set_device_properties_body import AgentSystemSetDevicePropertiesBody +from corellium.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody +from corellium.models.agent_temp_file_response import AgentTempFileResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class AgentApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_delete_file_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a file on VM + + Delete a file from the VM filesystem. Deletes are idempotent: an unknown `instanceId`, or a path the on-device agent no longer has, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. Other agent-reported failures, and an unreachable agent, are still reported as failures. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_file_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a file on VM + + Delete a file from the VM filesystem. Deletes are idempotent: an unknown `instanceId`, or a path the on-device agent no longer has, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. Other agent-reported failures, and an unreachable agent, are still reported as failures. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_file_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a file on VM + + Delete a file from the VM filesystem. Deletes are idempotent: an unknown `instanceId`, or a path the on-device agent no longer has, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. Other agent-reported failures, and an unreachable agent, are still reported as failures. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_file_agent_serialize( + self, + instance_id, + file_path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}/agent/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_adb_auth_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentSystemAdbAuth: + """Get ADB auth setting + + Get the current ADB authorization setting (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_adb_auth_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemAdbAuth", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_adb_auth_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentSystemAdbAuth]: + """Get ADB auth setting + + Get the current ADB authorization setting (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_adb_auth_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemAdbAuth", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_adb_auth_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get ADB auth setting + + Get the current ADB authorization setting (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_adb_auth_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemAdbAuth", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_adb_auth_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/system/adbauth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_app_ready_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentAppReadyResponse: + """Check if app subsystem is ready + + Checks whether the device's agent is ready to manage apps. The agent is a helper service running inside the device that carries out the Agent calls (installing and running apps, reading and writing files, and so on). It starts after the device boots, so a device that just turned `on` may not be ready yet. Call this first and wait until it reports ready before using the other Agent endpoints. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_app_ready_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppReadyResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_app_ready_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentAppReadyResponse]: + """Check if app subsystem is ready + + Checks whether the device's agent is ready to manage apps. The agent is a helper service running inside the device that carries out the Agent calls (installing and running apps, reading and writing files, and so on). It starts after the device boots, so a device that just turned `on` may not be ready yet. Call this first and wait until it reports ready before using the other Agent endpoints. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_app_ready_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppReadyResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_app_ready_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check if app subsystem is ready + + Checks whether the device's agent is ready to manage apps. The agent is a helper service running inside the device that carries out the Agent calls (installing and running apps, reading and writing files, and so on). It starts after the device boots, so a device that just turned `on` may not be ready yet. Call this first and wait until it reports ready before using the other Agent endpoints. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_app_ready_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppReadyResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_app_ready_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/app/ready', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_container_health_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentContainerHealth: + """Get container health + + Check whether a nested container is healthy (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_container_health_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentContainerHealth", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_container_health_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentContainerHealth]: + """Get container health + + Check whether a nested container is healthy (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_container_health_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentContainerHealth", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_container_health_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get container health + + Check whether a nested container is healthy (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_container_health_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentContainerHealth", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_container_health_agent_serialize( + self, + instance_id, + container_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if container_id is not None: + _path_params['containerId'] = container_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/is-healthy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_file_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Download a file from VM + + Downloads one file from the device's filesystem, given its full path on the device (for example `/tmp/log.txt`). The response body is the raw file. For large files, use `v3PreauthorizeFileDownloadAgent` so the download does not have to pass through your SDK client. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_file_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Download a file from VM + + Downloads one file from the device's filesystem, given its full path on the device (for example `/tmp/log.txt`). The response body is the raw file. For large files, use `v3PreauthorizeFileDownloadAgent` so the download does not have to pass through your SDK client. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_file_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download a file from VM + + Downloads one file from the device's filesystem, given its full path on the device (for example `/tmp/log.txt`). The response body is the raw file. For large files, use `v3PreauthorizeFileDownloadAgent` so the download does not have to pass through your SDK client. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_file_agent_serialize( + self, + instance_id, + file_path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_network_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentSystemNetworkResponse: + """Get eth0 IP address + + Get the IP address bound to eth0 (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_network_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemNetworkResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_network_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentSystemNetworkResponse]: + """Get eth0 IP address + + Get the IP address bound to eth0 (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_network_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemNetworkResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_network_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get eth0 IP address + + Get the IP address bound to eth0 (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_network_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemNetworkResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_network_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/system/network', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_prop_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_get_prop_body: AgentSystemGetPropBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentSystemGetPropResponse: + """Get a system property + + Get the value of a system property (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_get_prop_body: (required) + :type agent_system_get_prop_body: AgentSystemGetPropBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_prop_agent_serialize( + instance_id=instance_id, + agent_system_get_prop_body=agent_system_get_prop_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemGetPropResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_prop_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_get_prop_body: AgentSystemGetPropBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentSystemGetPropResponse]: + """Get a system property + + Get the value of a system property (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_get_prop_body: (required) + :type agent_system_get_prop_body: AgentSystemGetPropBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_prop_agent_serialize( + instance_id=instance_id, + agent_system_get_prop_body=agent_system_get_prop_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemGetPropResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_prop_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_get_prop_body: AgentSystemGetPropBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a system property + + Get the value of a system property (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_get_prop_body: (required) + :type agent_system_get_prop_body: AgentSystemGetPropBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_prop_agent_serialize( + instance_id=instance_id, + agent_system_get_prop_body=agent_system_get_prop_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemGetPropResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_prop_agent_serialize( + self, + instance_id, + agent_system_get_prop_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_system_get_prop_body is not None: + _body_params = agent_system_get_prop_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/system/getprop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_remote_it_status_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentRemoteItStatus: + """Get Remote.It status + + Get the installation status of the Remote.It package on the VM (RPi only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_remote_it_status_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_remote_it_status_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentRemoteItStatus]: + """Get Remote.It status + + Get the installation status of the Remote.It package on the VM (RPi only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_remote_it_status_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_remote_it_status_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Remote.It status + + Get the installation status of the Remote.It package on the VM (RPi only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_remote_it_status_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_remote_it_status_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/remoteit/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_temp_file_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentTempFileResponse: + """Get a temp file path on VM + + Returns an unused temporary file path on the device, free at the moment of the call. Use it as the target for `v3UploadFileAgent`, for example to stage an app package before `v3InstallAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_temp_file_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentTempFileResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_temp_file_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentTempFileResponse]: + """Get a temp file path on VM + + Returns an unused temporary file path on the device, free at the moment of the call. Use it as the target for `v3UploadFileAgent`, for example to stage an app package before `v3InstallAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_temp_file_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentTempFileResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_temp_file_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a temp file path on VM + + Returns an unused temporary file path on the device, free at the moment of the call. Use it as the target for `v3UploadFileAgent`, for example to stage an app package before `v3InstallAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_temp_file_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentTempFileResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_temp_file_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/file/temp', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_install_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_install_body: AgentInstallBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Install app at path + + Installs an app from a package file that is already on the device, for example an `.ipa` (iOS) or `.apk` (Android). Returns 204 once installed. **Installing an app from your computer:** 1. `v3GetAppReadyAgent`: wait until the agent is ready. 2. `v3GetTempFileAgent`: get a free temporary path on the device. 3. `v3UploadFileAgent`: upload the package to that path. 4. `v3InstallAgent` (this call) with that `path`. 5. `v3ListAppsAgent` to find the app's bundle ID, then `v3RunAppAgent` to start it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_install_body: (required) + :type agent_install_body: AgentInstallBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_agent_serialize( + instance_id=instance_id, + agent_install_body=agent_install_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_install_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_install_body: AgentInstallBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Install app at path + + Installs an app from a package file that is already on the device, for example an `.ipa` (iOS) or `.apk` (Android). Returns 204 once installed. **Installing an app from your computer:** 1. `v3GetAppReadyAgent`: wait until the agent is ready. 2. `v3GetTempFileAgent`: get a free temporary path on the device. 3. `v3UploadFileAgent`: upload the package to that path. 4. `v3InstallAgent` (this call) with that `path`. 5. `v3ListAppsAgent` to find the app's bundle ID, then `v3RunAppAgent` to start it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_install_body: (required) + :type agent_install_body: AgentInstallBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_agent_serialize( + instance_id=instance_id, + agent_install_body=agent_install_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_install_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_install_body: AgentInstallBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Install app at path + + Installs an app from a package file that is already on the device, for example an `.ipa` (iOS) or `.apk` (Android). Returns 204 once installed. **Installing an app from your computer:** 1. `v3GetAppReadyAgent`: wait until the agent is ready. 2. `v3GetTempFileAgent`: get a free temporary path on the device. 3. `v3UploadFileAgent`: upload the package to that path. 4. `v3InstallAgent` (this call) with that `path`. 5. `v3ListAppsAgent` to find the app's bundle ID, then `v3RunAppAgent` to start it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_install_body: (required) + :type agent_install_body: AgentInstallBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_agent_serialize( + instance_id=instance_id, + agent_install_body=agent_install_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_install_agent_serialize( + self, + instance_id, + agent_install_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_install_body is not None: + _body_params = agent_install_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/app/install', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_install_open_gapps_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_install_open_gapps_body: AgentSystemInstallOpenGappsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Install OpenGApps + + Download and install OpenGApps on the instance (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_install_open_gapps_body: (required) + :type agent_system_install_open_gapps_body: AgentSystemInstallOpenGappsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_open_gapps_agent_serialize( + instance_id=instance_id, + agent_system_install_open_gapps_body=agent_system_install_open_gapps_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_install_open_gapps_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_install_open_gapps_body: AgentSystemInstallOpenGappsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Install OpenGApps + + Download and install OpenGApps on the instance (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_install_open_gapps_body: (required) + :type agent_system_install_open_gapps_body: AgentSystemInstallOpenGappsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_open_gapps_agent_serialize( + instance_id=instance_id, + agent_system_install_open_gapps_body=agent_system_install_open_gapps_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_install_open_gapps_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_install_open_gapps_body: AgentSystemInstallOpenGappsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Install OpenGApps + + Download and install OpenGApps on the instance (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_install_open_gapps_body: (required) + :type agent_system_install_open_gapps_body: AgentSystemInstallOpenGappsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_open_gapps_agent_serialize( + instance_id=instance_id, + agent_system_install_open_gapps_body=agent_system_install_open_gapps_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_install_open_gapps_agent_serialize( + self, + instance_id, + agent_system_install_open_gapps_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_system_install_open_gapps_body is not None: + _body_params = agent_system_install_open_gapps_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/system/install-opengapps', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_install_profile_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Install a profile + + Install a configuration profile on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param body: (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_profile_agent_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_install_profile_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Install a profile + + Install a configuration profile on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param body: (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_profile_agent_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_install_profile_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Install a profile + + Install a configuration profile on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param body: (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_profile_agent_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_install_profile_agent_serialize( + self, + instance_id, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/profile/install', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_install_remote_it_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentRemoteItStatus: + """Install Remote.It + + Install the Remote.It package on the VM (RPi only). The device name and platform code are derived server-side from the instance and its flavor. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_remote_it_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_install_remote_it_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentRemoteItStatus]: + """Install Remote.It + + Install the Remote.It package on the VM (RPi only). The device name and platform code are derived server-side from the instance and its flavor. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_remote_it_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_install_remote_it_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Install Remote.It + + Install the Remote.It package on the VM (RPi only). The device name and platform code are derived server-side from the instance and its flavor. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_remote_it_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_install_remote_it_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/remoteit/install', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_kill_app_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Kill an app + + Force-quits a running app on the device, identified by its bundle ID. The app stays installed; start it again with `v3RunAppAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kill_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_kill_app_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Kill an app + + Force-quits a running app on the device, identified by its bundle ID. The app stays installed; start it again with `v3RunAppAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kill_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_kill_app_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Kill an app + + Force-quits a running app on the device, identified by its bundle ID. The app stays installed; start it again with `v3RunAppAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kill_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_kill_app_agent_serialize( + self, + instance_id, + bundle_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if bundle_id is not None: + _path_params['bundleId'] = bundle_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_kill_frida_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentFridaResponse: + """Kill Frida + + Stop the running Frida session on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kill_frida_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_kill_frida_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentFridaResponse]: + """Kill Frida + + Stop the running Frida session on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kill_frida_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_kill_frida_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Kill Frida + + Stop the running Frida session on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kill_frida_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_kill_frida_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/frida/run-frida-kill', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_app_icons_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[List[StrictStr], Field(description="One or more app bundle IDs to fetch icons for.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentIconsResponse: + """List app icons + + List app icons as base64-encoded data for the specified bundle IDs. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: One or more app bundle IDs to fetch icons for. (required) + :type bundle_id: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_app_icons_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentIconsResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_app_icons_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[List[StrictStr], Field(description="One or more app bundle IDs to fetch icons for.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentIconsResponse]: + """List app icons + + List app icons as base64-encoded data for the specified bundle IDs. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: One or more app bundle IDs to fetch icons for. (required) + :type bundle_id: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_app_icons_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentIconsResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_app_icons_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[List[StrictStr], Field(description="One or more app bundle IDs to fetch icons for.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List app icons + + List app icons as base64-encoded data for the specified bundle IDs. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: One or more app bundle IDs to fetch icons for. (required) + :type bundle_id: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_app_icons_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentIconsResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_app_icons_agent_serialize( + self, + instance_id, + bundle_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'bundleId': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if bundle_id is not None: + + _query_params.append(('bundleId', bundle_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/app/icons', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_apps_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + load_icons: Annotated[Optional[StrictStr], Field(description="Whether to include each app icon in the response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentAppsList: + """List apps + + Lists the apps installed on the device, with each app's bundle ID (for example `com.android.egg`) and name. The bundle ID is what the run, kill and uninstall calls need. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param load_icons: Whether to include each app icon in the response. + :type load_icons: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_apps_agent_serialize( + instance_id=instance_id, + load_icons=load_icons, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_apps_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + load_icons: Annotated[Optional[StrictStr], Field(description="Whether to include each app icon in the response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentAppsList]: + """List apps + + Lists the apps installed on the device, with each app's bundle ID (for example `com.android.egg`) and name. The bundle ID is what the run, kill and uninstall calls need. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param load_icons: Whether to include each app icon in the response. + :type load_icons: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_apps_agent_serialize( + instance_id=instance_id, + load_icons=load_icons, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_apps_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + load_icons: Annotated[Optional[StrictStr], Field(description="Whether to include each app icon in the response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List apps + + Lists the apps installed on the device, with each app's bundle ID (for example `com.android.egg`) and name. The bundle ID is what the run, kill and uninstall calls need. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param load_icons: Whether to include each app icon in the response. + :type load_icons: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_apps_agent_serialize( + instance_id=instance_id, + load_icons=load_icons, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_apps_agent_serialize( + self, + instance_id, + load_icons, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if load_icons is not None: + + _query_params.append(('loadIcons', load_icons)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/app/apps', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_apps_status_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentAppsStatusList: + """List apps status + + Returns, for every installed app, whether it is currently running. Use it to check that an app started after `v3RunAppAgent`, or stopped after `v3KillAppAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_apps_status_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsStatusList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_apps_status_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentAppsStatusList]: + """List apps status + + Returns, for every installed app, whether it is currently running. Use it to check that an app started after `v3RunAppAgent`, or stopped after `v3KillAppAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_apps_status_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsStatusList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_apps_status_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List apps status + + Returns, for every installed app, whether it is currently running. Use it to check that an app started after `v3RunAppAgent`, or stopped after `v3KillAppAgent`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_apps_status_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsStatusList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_apps_status_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/app/apps/update', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_containers_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentContainerList: + """List containers + + List the nested containers on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_containers_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentContainerList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_containers_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentContainerList]: + """List containers + + List the nested containers on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_containers_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentContainerList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_containers_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List containers + + List the nested containers on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_containers_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentContainerList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_containers_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/container/containers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_frida_processes_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentFridaProcessList: + """List Frida processes + + Run frida-ps on the VM and return the list of processes. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_frida_processes_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaProcessList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_frida_processes_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentFridaProcessList]: + """List Frida processes + + Run frida-ps on the VM and return the list of processes. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_frida_processes_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaProcessList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_frida_processes_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Frida processes + + Run frida-ps on the VM and return the list of processes. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_frida_processes_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaProcessList", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_frida_processes_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/frida/run-frida-ps', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_profiles_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentProfileListResponse: + """List profiles + + List the configuration profiles installed on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_profiles_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentProfileListResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_profiles_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentProfileListResponse]: + """List profiles + + List the configuration profiles installed on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_profiles_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentProfileListResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_profiles_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List profiles + + List the configuration profiles installed on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_profiles_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentProfileListResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_profiles_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/agent/v1/profile/profiles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_lock_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Lock device + + Lock the device (iOS only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_lock_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_lock_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Lock device + + Lock the device (iOS only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_lock_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_lock_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Lock device + + Lock the device (iOS only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_lock_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_lock_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/system/lock', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_preauthorize_file_archive_download_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_file_archive_download_body: AgentFileArchiveDownloadBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentFileDownloadToken: + """Pre-authorize an archive download from VM + + Returns a short-lived token for downloading several files and folders from the device as one ZIP archive, built on the server. List the paths to include in the body, then download with `GET /v1/preauthed/{token}/{filename}`. The token expires with your current session. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_file_archive_download_body: (required) + :type agent_file_archive_download_body: AgentFileArchiveDownloadBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauthorize_file_archive_download_agent_serialize( + instance_id=instance_id, + agent_file_archive_download_body=agent_file_archive_download_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFileDownloadToken", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_preauthorize_file_archive_download_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_file_archive_download_body: AgentFileArchiveDownloadBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentFileDownloadToken]: + """Pre-authorize an archive download from VM + + Returns a short-lived token for downloading several files and folders from the device as one ZIP archive, built on the server. List the paths to include in the body, then download with `GET /v1/preauthed/{token}/{filename}`. The token expires with your current session. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_file_archive_download_body: (required) + :type agent_file_archive_download_body: AgentFileArchiveDownloadBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauthorize_file_archive_download_agent_serialize( + instance_id=instance_id, + agent_file_archive_download_body=agent_file_archive_download_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFileDownloadToken", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_preauthorize_file_archive_download_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_file_archive_download_body: AgentFileArchiveDownloadBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Pre-authorize an archive download from VM + + Returns a short-lived token for downloading several files and folders from the device as one ZIP archive, built on the server. List the paths to include in the body, then download with `GET /v1/preauthed/{token}/{filename}`. The token expires with your current session. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_file_archive_download_body: (required) + :type agent_file_archive_download_body: AgentFileArchiveDownloadBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauthorize_file_archive_download_agent_serialize( + instance_id=instance_id, + agent_file_archive_download_body=agent_file_archive_download_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFileDownloadToken", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_preauthorize_file_archive_download_agent_serialize( + self, + instance_id, + agent_file_archive_download_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_file_archive_download_body is not None: + _body_params = agent_file_archive_download_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent-authorize/v1/file/download', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_preauthorize_file_download_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentFileDownloadToken: + """Pre-authorize a file download from VM + + Returns a short-lived token for downloading one device file directly (for example from a browser or download manager) without an `Authorization` header and without buffering it in your SDK client. Download it with `GET /v1/preauthed/{token}/{filename}`. The token works only for this file and expires with your current session. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauthorize_file_download_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFileDownloadToken", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_preauthorize_file_download_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentFileDownloadToken]: + """Pre-authorize a file download from VM + + Returns a short-lived token for downloading one device file directly (for example from a browser or download manager) without an `Authorization` header and without buffering it in your SDK client. Download it with `GET /v1/preauthed/{token}/{filename}`. The token works only for this file and expires with your current session. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauthorize_file_download_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFileDownloadToken", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_preauthorize_file_download_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Pre-authorize a file download from VM + + Returns a short-lived token for downloading one device file directly (for example from a browser or download manager) without an `Authorization` header and without buffering it in your SDK client. Download it with `GET /v1/preauthed/{token}/{filename}`. The token works only for this file and expires with your current session. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauthorize_file_download_agent_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFileDownloadToken", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_preauthorize_file_download_agent_serialize( + self, + instance_id, + file_path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent-authorize/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_app_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Run an app + + Launches an installed app on the device, identified by its bundle ID from `v3ListAppsAgent`. Returns 204 once the launch has been requested; check `v3ListAppsStatusAgent` to confirm it is running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_app_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Run an app + + Launches an installed app on the device, identified by its bundle ID from `v3ListAppsAgent`. Returns 204 once the launch has been requested; check `v3ListAppsStatusAgent` to confirm it is running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_app_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Run an app + + Launches an installed app on the device, identified by its bundle ID from `v3ListAppsAgent`. Returns 204 once the launch has been requested; check `v3ListAppsStatusAgent` to confirm it is running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_app_agent_serialize( + self, + instance_id, + bundle_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if bundle_id is not None: + _path_params['bundleId'] = bundle_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_frida_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_frida_run_body: AgentFridaRunBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentFridaResponse: + """Run Frida + + Attach Frida to a target process on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_frida_run_body: (required) + :type agent_frida_run_body: AgentFridaRunBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_frida_agent_serialize( + instance_id=instance_id, + agent_frida_run_body=agent_frida_run_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_frida_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_frida_run_body: AgentFridaRunBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentFridaResponse]: + """Run Frida + + Attach Frida to a target process on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_frida_run_body: (required) + :type agent_frida_run_body: AgentFridaRunBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_frida_agent_serialize( + instance_id=instance_id, + agent_frida_run_body=agent_frida_run_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_frida_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_frida_run_body: AgentFridaRunBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Run Frida + + Attach Frida to a target process on the VM. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_frida_run_body: (required) + :type agent_frida_run_body: AgentFridaRunBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_frida_agent_serialize( + instance_id=instance_id, + agent_frida_run_body=agent_frida_run_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentFridaResponse", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_frida_agent_serialize( + self, + instance_id, + agent_frida_run_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_frida_run_body is not None: + _body_params = agent_frida_run_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/frida/run-frida', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_set_adb_auth_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_adb_auth: AgentSystemAdbAuth, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Set ADB auth setting + + Enable or disable ADB authorization (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_adb_auth: (required) + :type agent_system_adb_auth: AgentSystemAdbAuth + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_adb_auth_agent_serialize( + instance_id=instance_id, + agent_system_adb_auth=agent_system_adb_auth, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_set_adb_auth_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_adb_auth: AgentSystemAdbAuth, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Set ADB auth setting + + Enable or disable ADB authorization (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_adb_auth: (required) + :type agent_system_adb_auth: AgentSystemAdbAuth + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_adb_auth_agent_serialize( + instance_id=instance_id, + agent_system_adb_auth=agent_system_adb_auth, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_set_adb_auth_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_adb_auth: AgentSystemAdbAuth, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set ADB auth setting + + Enable or disable ADB authorization (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_adb_auth: (required) + :type agent_system_adb_auth: AgentSystemAdbAuth + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_adb_auth_agent_serialize( + instance_id=instance_id, + agent_system_adb_auth=agent_system_adb_auth, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_set_adb_auth_agent_serialize( + self, + instance_id, + agent_system_adb_auth, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_system_adb_auth is not None: + _body_params = agent_system_adb_auth + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/instances/{instanceId}/agent/v1/system/adbauth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_set_device_properties_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_set_device_properties_body: Optional[AgentSystemSetDevicePropertiesBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentSystemResult: + """Set device properties + + Set device properties (model and manufacturer ID) of the instance (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_set_device_properties_body: + :type agent_system_set_device_properties_body: AgentSystemSetDevicePropertiesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_device_properties_agent_serialize( + instance_id=instance_id, + agent_system_set_device_properties_body=agent_system_set_device_properties_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemResult", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_set_device_properties_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_set_device_properties_body: Optional[AgentSystemSetDevicePropertiesBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentSystemResult]: + """Set device properties + + Set device properties (model and manufacturer ID) of the instance (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_set_device_properties_body: + :type agent_system_set_device_properties_body: AgentSystemSetDevicePropertiesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_device_properties_agent_serialize( + instance_id=instance_id, + agent_system_set_device_properties_body=agent_system_set_device_properties_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemResult", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_set_device_properties_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_set_device_properties_body: Optional[AgentSystemSetDevicePropertiesBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set device properties + + Set device properties (model and manufacturer ID) of the instance (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_set_device_properties_body: + :type agent_system_set_device_properties_body: AgentSystemSetDevicePropertiesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_device_properties_agent_serialize( + instance_id=instance_id, + agent_system_set_device_properties_body=agent_system_set_device_properties_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemResult", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_set_device_properties_agent_serialize( + self, + instance_id, + agent_system_set_device_properties_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_system_set_device_properties_body is not None: + _body_params = agent_system_set_device_properties_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/system/setDeviceProperties', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_set_file_attributes_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + agent_file_attributes_body: Optional[AgentFileAttributesBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Change attributes of a file on VM + + Changes a file on the device: move or rename it (`path`), change its permissions (`mode`), or change its owner. Send only what you want to change. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param agent_file_attributes_body: + :type agent_file_attributes_body: AgentFileAttributesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_file_attributes_agent_serialize( + instance_id=instance_id, + file_path=file_path, + agent_file_attributes_body=agent_file_attributes_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_set_file_attributes_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + agent_file_attributes_body: Optional[AgentFileAttributesBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Change attributes of a file on VM + + Changes a file on the device: move or rename it (`path`), change its permissions (`mode`), or change its owner. Send only what you want to change. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param agent_file_attributes_body: + :type agent_file_attributes_body: AgentFileAttributesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_file_attributes_agent_serialize( + instance_id=instance_id, + file_path=file_path, + agent_file_attributes_body=agent_file_attributes_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_set_file_attributes_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + agent_file_attributes_body: Optional[AgentFileAttributesBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Change attributes of a file on VM + + Changes a file on the device: move or rename it (`path`), change its permissions (`mode`), or change its owner. Send only what you want to change. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param agent_file_attributes_body: + :type agent_file_attributes_body: AgentFileAttributesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_file_attributes_agent_serialize( + instance_id=instance_id, + file_path=file_path, + agent_file_attributes_body=agent_file_attributes_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_set_file_attributes_agent_serialize( + self, + instance_id, + file_path, + agent_file_attributes_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_file_attributes_body is not None: + _body_params = agent_file_attributes_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/instances/{instanceId}/agent/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_set_hostname_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_set_hostname_body: AgentSystemSetHostnameBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentSystemResult: + """Set instance hostname + + Set the hostname of the instance. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_set_hostname_body: (required) + :type agent_system_set_hostname_body: AgentSystemSetHostnameBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_hostname_agent_serialize( + instance_id=instance_id, + agent_system_set_hostname_body=agent_system_set_hostname_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemResult", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_set_hostname_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_set_hostname_body: AgentSystemSetHostnameBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentSystemResult]: + """Set instance hostname + + Set the hostname of the instance. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_set_hostname_body: (required) + :type agent_system_set_hostname_body: AgentSystemSetHostnameBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_hostname_agent_serialize( + instance_id=instance_id, + agent_system_set_hostname_body=agent_system_set_hostname_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemResult", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_set_hostname_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + agent_system_set_hostname_body: AgentSystemSetHostnameBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set instance hostname + + Set the hostname of the instance. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param agent_system_set_hostname_body: (required) + :type agent_system_set_hostname_body: AgentSystemSetHostnameBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_hostname_agent_serialize( + instance_id=instance_id, + agent_system_set_hostname_body=agent_system_set_hostname_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemResult", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_set_hostname_agent_serialize( + self, + instance_id, + agent_system_set_hostname_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_system_set_hostname_body is not None: + _body_params = agent_system_set_hostname_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/system/setHostname', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_shutdown_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Shut down instance + + Shut down the instance. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_shutdown_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_shutdown_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Shut down instance + + Shut down the instance. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_shutdown_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_shutdown_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Shut down instance + + Shut down the instance. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_shutdown_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_shutdown_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/system/shutdown', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_container_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start a container + + Start a nested container on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_container_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start a container + + Start a nested container on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_container_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start a container + + Start a nested container on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_container_agent_serialize( + self, + instance_id, + container_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if container_id is not None: + _path_params['containerId'] = container_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_container_app_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + package_name: Annotated[StrictStr, Field(description="Android package name of the application.")], + activity_name: Annotated[StrictStr, Field(description="Android activity name to launch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start an app in a container + + Start an Android application in a nested container (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param package_name: Android package name of the application. (required) + :type package_name: str + :param activity_name: Android activity name to launch. (required) + :type activity_name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_app_agent_serialize( + instance_id=instance_id, + container_id=container_id, + package_name=package_name, + activity_name=activity_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_container_app_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + package_name: Annotated[StrictStr, Field(description="Android package name of the application.")], + activity_name: Annotated[StrictStr, Field(description="Android activity name to launch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start an app in a container + + Start an Android application in a nested container (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param package_name: Android package name of the application. (required) + :type package_name: str + :param activity_name: Android activity name to launch. (required) + :type activity_name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_app_agent_serialize( + instance_id=instance_id, + container_id=container_id, + package_name=package_name, + activity_name=activity_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_container_app_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + package_name: Annotated[StrictStr, Field(description="Android package name of the application.")], + activity_name: Annotated[StrictStr, Field(description="Android activity name to launch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start an app in a container + + Start an Android application in a nested container (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param package_name: Android package name of the application. (required) + :type package_name: str + :param activity_name: Android activity name to launch. (required) + :type activity_name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_app_agent_serialize( + instance_id=instance_id, + container_id=container_id, + package_name=package_name, + activity_name=activity_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_container_app_agent_serialize( + self, + instance_id, + container_id, + package_name, + activity_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if container_id is not None: + _path_params['containerId'] = container_id + if package_name is not None: + _path_params['packageName'] = package_name + if activity_name is not None: + _path_params['activityName'] = activity_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start-application/{packageName}/{activityName}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_container_app_monitored_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + package_name: Annotated[StrictStr, Field(description="Android package name of the application.")], + activity_name: Annotated[StrictStr, Field(description="Android activity name to launch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start and monitor an app in a container + + Start an Android application in a nested container and monitor it (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param package_name: Android package name of the application. (required) + :type package_name: str + :param activity_name: Android activity name to launch. (required) + :type activity_name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_app_monitored_agent_serialize( + instance_id=instance_id, + container_id=container_id, + package_name=package_name, + activity_name=activity_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_container_app_monitored_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + package_name: Annotated[StrictStr, Field(description="Android package name of the application.")], + activity_name: Annotated[StrictStr, Field(description="Android activity name to launch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start and monitor an app in a container + + Start an Android application in a nested container and monitor it (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param package_name: Android package name of the application. (required) + :type package_name: str + :param activity_name: Android activity name to launch. (required) + :type activity_name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_app_monitored_agent_serialize( + instance_id=instance_id, + container_id=container_id, + package_name=package_name, + activity_name=activity_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_container_app_monitored_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + package_name: Annotated[StrictStr, Field(description="Android package name of the application.")], + activity_name: Annotated[StrictStr, Field(description="Android activity name to launch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start and monitor an app in a container + + Start an Android application in a nested container and monitor it (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param package_name: Android package name of the application. (required) + :type package_name: str + :param activity_name: Android activity name to launch. (required) + :type activity_name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_container_app_monitored_agent_serialize( + instance_id=instance_id, + container_id=container_id, + package_name=package_name, + activity_name=activity_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_container_app_monitored_agent_serialize( + self, + instance_id, + container_id, + package_name, + activity_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if container_id is not None: + _path_params['containerId'] = container_id + if package_name is not None: + _path_params['packageName'] = package_name + if activity_name is not None: + _path_params['activityName'] = activity_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start-application-and-monitor/{packageName}/{activityName}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_stop_container_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop a container + + Stop a nested container on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_container_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_stop_container_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop a container + + Stop a nested container on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_container_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_stop_container_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop a container + + Stop a nested container on the VM (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_container_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_stop_container_agent_serialize( + self, + instance_id, + container_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if container_id is not None: + _path_params['containerId'] = container_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_stop_container_app_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop a monitored app in a container + + Stop the monitored Android application in a nested container, if one is monitored (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_container_app_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_stop_container_app_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop a monitored app in a container + + Stop the monitored Android application in a nested container, if one is monitored (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_container_app_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_stop_container_app_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + container_id: Annotated[StrictStr, Field(description="Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1).")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop a monitored app in a container + + Stop the monitored Android application in a nested container, if one is monitored (Android only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param container_id: Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). (required) + :type container_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_container_app_agent_serialize( + instance_id=instance_id, + container_id=container_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_stop_container_app_agent_serialize( + self, + instance_id, + container_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if container_id is not None: + _path_params['containerId'] = container_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/stop-application-if-monitored', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_uninstall_app_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Uninstall an app + + Removes an app from the device, identified by its bundle ID. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_uninstall_app_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Uninstall an app + + Removes an app from the device, identified by its bundle ID. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_uninstall_app_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + bundle_id: Annotated[StrictStr, Field(description="App bundle ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Uninstall an app + + Removes an app from the device, identified by its bundle ID. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param bundle_id: App bundle ID. (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_app_agent_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_uninstall_app_agent_serialize( + self, + instance_id, + bundle_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if bundle_id is not None: + _path_params['bundleId'] = bundle_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_uninstall_profile_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + profile_id: Annotated[StrictStr, Field(description="The profile identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Uninstall a profile + + Uninstall a configuration profile from the VM. Deletes are idempotent: an unknown `instanceId`, or a profile that is not installed, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. Other agent-reported failures, and an unreachable agent, are still reported as failures. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param profile_id: The profile identifier. (required) + :type profile_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_profile_agent_serialize( + instance_id=instance_id, + profile_id=profile_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_uninstall_profile_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + profile_id: Annotated[StrictStr, Field(description="The profile identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Uninstall a profile + + Uninstall a configuration profile from the VM. Deletes are idempotent: an unknown `instanceId`, or a profile that is not installed, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. Other agent-reported failures, and an unreachable agent, are still reported as failures. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param profile_id: The profile identifier. (required) + :type profile_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_profile_agent_serialize( + instance_id=instance_id, + profile_id=profile_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_uninstall_profile_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + profile_id: Annotated[StrictStr, Field(description="The profile identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Uninstall a profile + + Uninstall a configuration profile from the VM. Deletes are idempotent: an unknown `instanceId`, or a profile that is not installed, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. Other agent-reported failures, and an unreachable agent, are still reported as failures. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param profile_id: The profile identifier. (required) + :type profile_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_profile_agent_serialize( + instance_id=instance_id, + profile_id=profile_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_uninstall_profile_agent_serialize( + self, + instance_id, + profile_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if profile_id is not None: + _path_params['profileId'] = profile_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}/agent/v1/profile/profiles/{profileId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_uninstall_remote_it_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentRemoteItStatus: + """Uninstall Remote.It + + Uninstall the Remote.It package from the VM (RPi only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_remote_it_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_uninstall_remote_it_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentRemoteItStatus]: + """Uninstall Remote.It + + Uninstall the Remote.It package from the VM (RPi only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_remote_it_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_uninstall_remote_it_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Uninstall Remote.It + + Uninstall the Remote.It package from the VM (RPi only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uninstall_remote_it_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentRemoteItStatus", + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '405': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_uninstall_remote_it_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/remoteit/uninstall', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_unlock_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Unlock device + + Unlock the device (iOS only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_unlock_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_unlock_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Unlock device + + Unlock the device (iOS only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_unlock_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_unlock_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Unlock device + + Unlock the device (iOS only). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_unlock_agent_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_unlock_agent_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/agent/v1/system/unlock', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_upload_file_agent( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Upload a file to VM + + Writes a file onto the device's filesystem at the given full path, replacing any file already there. Send the raw file bytes as the body. Use `v3GetTempFileAgent` first if you just need somewhere to put a file, for example an app package to install. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param body: (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_upload_file_agent_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Upload a file to VM + + Writes a file onto the device's filesystem at the given full path, replacing any file already there. Send the raw file bytes as the body. Use `v3GetTempFileAgent` first if you just need somewhere to put a file, for example an app package to install. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param body: (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_upload_file_agent_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + file_path: Annotated[StrictStr, Field(description="Path to the file on the VM filesystem.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload a file to VM + + Writes a file onto the device's filesystem at the given full path, replacing any file already there. Send the raw file bytes as the body. Use `v3GetTempFileAgent` first if you just need somewhere to put a file, for example an app package to install. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param file_path: Path to the file on the VM filesystem. (required) + :type file_path: str + :param body: (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_file_agent_serialize( + instance_id=instance_id, + file_path=file_path, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentError", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_upload_file_agent_serialize( + self, + instance_id, + file_path, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/instances/{instanceId}/agent/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/agent_v1_api.py b/corellium/api/agent_v1_api.py new file mode 100644 index 0000000..6d4dbf3 --- /dev/null +++ b/corellium/api/agent_v1_api.py @@ -0,0 +1,8189 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictStr +from typing import Any, Dict, List, Tuple, Union +from typing_extensions import Annotated +from corellium.models.agent_app_ready_response_v1 import AgentAppReadyResponseV1 +from corellium.models.agent_apps_list_v1 import AgentAppsListV1 +from corellium.models.agent_icons import AgentIcons +from corellium.models.agent_install_body_v1 import AgentInstallBodyV1 +from corellium.models.agent_profiles_return import AgentProfilesReturn +from corellium.models.agent_system_adb_auth_v1 import AgentSystemAdbAuthV1 +from corellium.models.agent_system_get_prop_body_v1 import AgentSystemGetPropBodyV1 +from corellium.models.agent_system_set_hostname_body_v1 import AgentSystemSetHostnameBodyV1 +from corellium.models.agent_value_return import AgentValueReturn +from corellium.models.file_changes import FileChanges + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class AgentV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_agent_app_ready( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentAppReadyResponseV1: + """(Deprecated) Check if App subsystem is ready + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/ready is deprecated.", DeprecationWarning) + + _param = self._v1_agent_app_ready_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppReadyResponseV1", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_app_ready_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentAppReadyResponseV1]: + """(Deprecated) Check if App subsystem is ready + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/ready is deprecated.", DeprecationWarning) + + _param = self._v1_agent_app_ready_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppReadyResponseV1", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_app_ready_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Check if App subsystem is ready + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/ready is deprecated.", DeprecationWarning) + + _param = self._v1_agent_app_ready_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppReadyResponseV1", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_app_ready_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/agent/v1/app/ready', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_delete_file( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete a File on VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_delete_file_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_delete_file_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete a File on VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_delete_file_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_delete_file_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete a File on VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_delete_file_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_delete_file_serialize( + self, + instance_id, + file_path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}/agent/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_get_file( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """(Deprecated) Download a File from VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_get_file_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_get_file_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """(Deprecated) Download a File from VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_get_file_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_get_file_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Download a File from VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_get_file_serialize( + instance_id=instance_id, + file_path=file_path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_get_file_serialize( + self, + instance_id, + file_path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/agent/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_get_temp_filename( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """(Deprecated) Get the path for a new temp file + + Returns a temporary random filename that is guranteed to be unique on the VMs filesystem at the time of invocation of this method. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/file/temp is deprecated.", DeprecationWarning) + + _param = self._v1_agent_get_temp_filename_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_get_temp_filename_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """(Deprecated) Get the path for a new temp file + + Returns a temporary random filename that is guranteed to be unique on the VMs filesystem at the time of invocation of this method. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/file/temp is deprecated.", DeprecationWarning) + + _param = self._v1_agent_get_temp_filename_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_get_temp_filename_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get the path for a new temp file + + Returns a temporary random filename that is guranteed to be unique on the VMs filesystem at the time of invocation of this method. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/file/temp is deprecated.", DeprecationWarning) + + _param = self._v1_agent_get_temp_filename_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_get_temp_filename_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/file/temp', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_install_app( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_install_body_v1: Annotated[AgentInstallBodyV1, Field(description="App parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Install App at path + + Installs the app located at path which must be present on the VM filesystem + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_install_body_v1: App parameters (required) + :type agent_install_body_v1: AgentInstallBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/install is deprecated.", DeprecationWarning) + + _param = self._v1_agent_install_app_serialize( + instance_id=instance_id, + agent_install_body_v1=agent_install_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_install_app_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_install_body_v1: Annotated[AgentInstallBodyV1, Field(description="App parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Install App at path + + Installs the app located at path which must be present on the VM filesystem + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_install_body_v1: App parameters (required) + :type agent_install_body_v1: AgentInstallBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/install is deprecated.", DeprecationWarning) + + _param = self._v1_agent_install_app_serialize( + instance_id=instance_id, + agent_install_body_v1=agent_install_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_install_app_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_install_body_v1: Annotated[AgentInstallBodyV1, Field(description="App parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Install App at path + + Installs the app located at path which must be present on the VM filesystem + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_install_body_v1: App parameters (required) + :type agent_install_body_v1: AgentInstallBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/install is deprecated.", DeprecationWarning) + + _param = self._v1_agent_install_app_serialize( + instance_id=instance_id, + agent_install_body_v1=agent_install_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_install_app_serialize( + self, + instance_id, + agent_install_body_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_install_body_v1 is not None: + _body_params = agent_install_body_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/app/install', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_install_profile( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Profile to Install")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Install a Profile to VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Profile to Install (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/profile/install is deprecated.", DeprecationWarning) + + _param = self._v1_agent_install_profile_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_install_profile_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Profile to Install")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Install a Profile to VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Profile to Install (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/profile/install is deprecated.", DeprecationWarning) + + _param = self._v1_agent_install_profile_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_install_profile_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Profile to Install")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Install a Profile to VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Profile to Install (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/profile/install is deprecated.", DeprecationWarning) + + _param = self._v1_agent_install_profile_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_install_profile_serialize( + self, + instance_id, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/profile/install', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_kill_app( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """(Deprecated) Kill an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill is deprecated.", DeprecationWarning) + + _param = self._v1_agent_kill_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_kill_app_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """(Deprecated) Kill an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill is deprecated.", DeprecationWarning) + + _param = self._v1_agent_kill_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_kill_app_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Kill an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill is deprecated.", DeprecationWarning) + + _param = self._v1_agent_kill_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_kill_app_serialize( + self, + instance_id, + bundle_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if bundle_id is not None: + _path_params['bundleId'] = bundle_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_list_app_icons( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[List[StrictStr], Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[AgentIcons]: + """(Deprecated) List App Icons + + List App Icons as base64 data + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/icons is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_app_icons_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AgentIcons]", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_list_app_icons_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[List[StrictStr], Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[AgentIcons]]: + """(Deprecated) List App Icons + + List App Icons as base64 data + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/icons is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_app_icons_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AgentIcons]", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_list_app_icons_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[List[StrictStr], Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List App Icons + + List App Icons as base64 data + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/icons is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_app_icons_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[AgentIcons]", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_list_app_icons_serialize( + self, + instance_id, + bundle_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'bundleID': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if bundle_id is not None: + + _query_params.append(('bundleID', bundle_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/agent/v1/app/icons', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_list_apps( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentAppsListV1: + """(Deprecated) List Apps + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/apps is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_apps_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsListV1", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_list_apps_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentAppsListV1]: + """(Deprecated) List Apps + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/apps is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_apps_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsListV1", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_list_apps_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List Apps + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/apps is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_apps_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsListV1", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_list_apps_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/agent/v1/app/apps', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_list_apps_status( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentAppsListV1: + """(Deprecated) List Apps Status + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/apps/update is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_apps_status_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsListV1", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_list_apps_status_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentAppsListV1]: + """(Deprecated) List Apps Status + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/apps/update is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_apps_status_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsListV1", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_list_apps_status_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List Apps Status + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/app/apps/update is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_apps_status_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentAppsListV1", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_list_apps_status_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/agent/v1/app/apps/update', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_list_profiles( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentProfilesReturn: + """(Deprecated) List Profiles + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/profile/profiles is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_profiles_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentProfilesReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_list_profiles_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentProfilesReturn]: + """(Deprecated) List Profiles + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/profile/profiles is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_profiles_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentProfilesReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_list_profiles_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List Profiles + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/profile/profiles is deprecated.", DeprecationWarning) + + _param = self._v1_agent_list_profiles_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentProfilesReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_list_profiles_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/agent/v1/profile/profiles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_run_app( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """(Deprecated) Run an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run is deprecated.", DeprecationWarning) + + _param = self._v1_agent_run_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_run_app_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """(Deprecated) Run an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run is deprecated.", DeprecationWarning) + + _param = self._v1_agent_run_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_run_app_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Run an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run is deprecated.", DeprecationWarning) + + _param = self._v1_agent_run_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_run_app_serialize( + self, + instance_id, + bundle_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if bundle_id is not None: + _path_params['bundleId'] = bundle_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_set_file_attributes( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + file_changes: Annotated[FileChanges, Field(description="New attrs")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Change Attrs of a File on VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param file_changes: New attrs (required) + :type file_changes: FileChanges + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_set_file_attributes_serialize( + instance_id=instance_id, + file_path=file_path, + file_changes=file_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_set_file_attributes_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + file_changes: Annotated[FileChanges, Field(description="New attrs")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Change Attrs of a File on VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param file_changes: New attrs (required) + :type file_changes: FileChanges + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_set_file_attributes_serialize( + instance_id=instance_id, + file_path=file_path, + file_changes=file_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_set_file_attributes_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM")], + file_changes: Annotated[FileChanges, Field(description="New attrs")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Change Attrs of a File on VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM (required) + :type file_path: str + :param file_changes: New attrs (required) + :type file_changes: FileChanges + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_set_file_attributes_serialize( + instance_id=instance_id, + file_path=file_path, + file_changes=file_changes, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_set_file_attributes_serialize( + self, + instance_id, + file_path, + file_changes, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if file_changes is not None: + _body_params = file_changes + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/instances/{instanceId}/agent/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_get_adb_auth( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentSystemAdbAuthV1: + """(Deprecated) Get ADB Auth Setting (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/system/adbauth is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_adb_auth_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemAdbAuthV1", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_get_adb_auth_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentSystemAdbAuthV1]: + """(Deprecated) Get ADB Auth Setting (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/system/adbauth is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_adb_auth_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemAdbAuthV1", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_get_adb_auth_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get ADB Auth Setting (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/system/adbauth is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_adb_auth_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentSystemAdbAuthV1", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_get_adb_auth_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/agent/v1/system/adbauth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_get_network( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentValueReturn: + """(Deprecated) Get IP of eth0 (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/system/network is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_network_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentValueReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_get_network_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentValueReturn]: + """(Deprecated) Get IP of eth0 (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/system/network is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_network_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentValueReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_get_network_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get IP of eth0 (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/agent/v1/system/network is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_network_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentValueReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_get_network_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/agent/v1/system/network', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_get_prop( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_get_prop_body_v1: Annotated[AgentSystemGetPropBodyV1, Field(description="Parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgentValueReturn: + """(Deprecated) Get System Property (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_get_prop_body_v1: Parameters (required) + :type agent_system_get_prop_body_v1: AgentSystemGetPropBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/getprop is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_prop_serialize( + instance_id=instance_id, + agent_system_get_prop_body_v1=agent_system_get_prop_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentValueReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_get_prop_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_get_prop_body_v1: Annotated[AgentSystemGetPropBodyV1, Field(description="Parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgentValueReturn]: + """(Deprecated) Get System Property (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_get_prop_body_v1: Parameters (required) + :type agent_system_get_prop_body_v1: AgentSystemGetPropBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/getprop is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_prop_serialize( + instance_id=instance_id, + agent_system_get_prop_body_v1=agent_system_get_prop_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentValueReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_get_prop_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_get_prop_body_v1: Annotated[AgentSystemGetPropBodyV1, Field(description="Parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get System Property (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_get_prop_body_v1: Parameters (required) + :type agent_system_get_prop_body_v1: AgentSystemGetPropBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/getprop is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_get_prop_serialize( + instance_id=instance_id, + agent_system_get_prop_body_v1=agent_system_get_prop_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentValueReturn", + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_get_prop_serialize( + self, + instance_id, + agent_system_get_prop_body_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_system_get_prop_body_v1 is not None: + _body_params = agent_system_get_prop_body_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/system/getprop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_install_open_g_apps( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Dict[str, Any], Field(description="Installation parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Install OpenGApps (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Installation parameters (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/install-opengapps is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_install_open_g_apps_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_install_open_g_apps_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Dict[str, Any], Field(description="Installation parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Install OpenGApps (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Installation parameters (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/install-opengapps is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_install_open_g_apps_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_install_open_g_apps_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Dict[str, Any], Field(description="Installation parameters")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Install OpenGApps (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Installation parameters (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/install-opengapps is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_install_open_g_apps_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_install_open_g_apps_serialize( + self, + instance_id, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/system/install-opengapps', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_lock( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Lock Device (iOS Only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/lock is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_lock_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_lock_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Lock Device (iOS Only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/lock is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_lock_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_lock_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Lock Device (iOS Only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/lock is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_lock_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_lock_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/system/lock', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_set_adb_auth( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_adb_auth_v1: Annotated[AgentSystemAdbAuthV1, Field(description="Desired ADB Auth Setting")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Set ADB Auth Setting (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_adb_auth_v1: Desired ADB Auth Setting (required) + :type agent_system_adb_auth_v1: AgentSystemAdbAuthV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/agent/v1/system/adbauth is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_set_adb_auth_serialize( + instance_id=instance_id, + agent_system_adb_auth_v1=agent_system_adb_auth_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_set_adb_auth_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_adb_auth_v1: Annotated[AgentSystemAdbAuthV1, Field(description="Desired ADB Auth Setting")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Set ADB Auth Setting (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_adb_auth_v1: Desired ADB Auth Setting (required) + :type agent_system_adb_auth_v1: AgentSystemAdbAuthV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/agent/v1/system/adbauth is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_set_adb_auth_serialize( + instance_id=instance_id, + agent_system_adb_auth_v1=agent_system_adb_auth_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_set_adb_auth_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_adb_auth_v1: Annotated[AgentSystemAdbAuthV1, Field(description="Desired ADB Auth Setting")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Set ADB Auth Setting (AOSP only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_adb_auth_v1: Desired ADB Auth Setting (required) + :type agent_system_adb_auth_v1: AgentSystemAdbAuthV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/agent/v1/system/adbauth is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_set_adb_auth_serialize( + instance_id=instance_id, + agent_system_adb_auth_v1=agent_system_adb_auth_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_set_adb_auth_serialize( + self, + instance_id, + agent_system_adb_auth_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_system_adb_auth_v1 is not None: + _body_params = agent_system_adb_auth_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/instances/{instanceId}/agent/v1/system/adbauth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_set_hostname( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_set_hostname_body_v1: Annotated[AgentSystemSetHostnameBodyV1, Field(description="New hostname")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Set Hostname of instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_set_hostname_body_v1: New hostname (required) + :type agent_system_set_hostname_body_v1: AgentSystemSetHostnameBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/setHostname is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_set_hostname_serialize( + instance_id=instance_id, + agent_system_set_hostname_body_v1=agent_system_set_hostname_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_set_hostname_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_set_hostname_body_v1: Annotated[AgentSystemSetHostnameBodyV1, Field(description="New hostname")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Set Hostname of instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_set_hostname_body_v1: New hostname (required) + :type agent_system_set_hostname_body_v1: AgentSystemSetHostnameBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/setHostname is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_set_hostname_serialize( + instance_id=instance_id, + agent_system_set_hostname_body_v1=agent_system_set_hostname_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_set_hostname_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + agent_system_set_hostname_body_v1: Annotated[AgentSystemSetHostnameBodyV1, Field(description="New hostname")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Set Hostname of instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param agent_system_set_hostname_body_v1: New hostname (required) + :type agent_system_set_hostname_body_v1: AgentSystemSetHostnameBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/setHostname is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_set_hostname_serialize( + instance_id=instance_id, + agent_system_set_hostname_body_v1=agent_system_set_hostname_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_set_hostname_serialize( + self, + instance_id, + agent_system_set_hostname_body_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if agent_system_set_hostname_body_v1 is not None: + _body_params = agent_system_set_hostname_body_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/system/setHostname', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_shutdown( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Instruct VM to halt + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/shutdown is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_shutdown_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_shutdown_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Instruct VM to halt + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/shutdown is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_shutdown_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_shutdown_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Instruct VM to halt + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/shutdown is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_shutdown_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_shutdown_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/system/shutdown', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_system_unlock( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Unlock Device (iOS Only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/unlock is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_unlock_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_system_unlock_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Unlock Device (iOS Only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/unlock is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_unlock_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_system_unlock_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Unlock Device (iOS Only) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/system/unlock is deprecated.", DeprecationWarning) + + _param = self._v1_agent_system_unlock_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_system_unlock_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/system/unlock', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_uninstall_app( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """(Deprecated) Uninstall an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall is deprecated.", DeprecationWarning) + + _param = self._v1_agent_uninstall_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_uninstall_app_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """(Deprecated) Uninstall an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall is deprecated.", DeprecationWarning) + + _param = self._v1_agent_uninstall_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_uninstall_app_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + bundle_id: Annotated[StrictStr, Field(description="App Bundle ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Uninstall an App + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param bundle_id: App Bundle ID (required) + :type bundle_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall is deprecated.", DeprecationWarning) + + _param = self._v1_agent_uninstall_app_serialize( + instance_id=instance_id, + bundle_id=bundle_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': "object", + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_uninstall_app_serialize( + self, + instance_id, + bundle_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if bundle_id is not None: + _path_params['bundleId'] = bundle_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_uninstall_profile( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + profile_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Uninstall a Profile from VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param profile_id: Instance ID - uuid (required) + :type profile_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_uninstall_profile_serialize( + instance_id=instance_id, + profile_id=profile_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_uninstall_profile_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + profile_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Uninstall a Profile from VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param profile_id: Instance ID - uuid (required) + :type profile_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_uninstall_profile_serialize( + instance_id=instance_id, + profile_id=profile_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_uninstall_profile_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + profile_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Uninstall a Profile from VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param profile_id: Instance ID - uuid (required) + :type profile_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_uninstall_profile_serialize( + instance_id=instance_id, + profile_id=profile_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_uninstall_profile_serialize( + self, + instance_id, + profile_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if profile_id is not None: + _path_params['profileId'] = profile_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_agent_upload_file( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM to write to")], + body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Uploaded File Contents")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Upload a file to VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM to write to (required) + :type file_path: str + :param body: Uploaded File Contents (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_upload_file_serialize( + instance_id=instance_id, + file_path=file_path, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_agent_upload_file_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM to write to")], + body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Uploaded File Contents")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Upload a file to VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM to write to (required) + :type file_path: str + :param body: Uploaded File Contents (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_upload_file_serialize( + instance_id=instance_id, + file_path=file_path, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_agent_upload_file_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + file_path: Annotated[StrictStr, Field(description="File Path on VM to write to")], + body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Uploaded File Contents")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Upload a file to VM + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param file_path: File Path on VM to write to (required) + :type file_path: str + :param body: Uploaded File Contents (required) + :type body: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/agent/v1/file/device/{filePath} is deprecated.", DeprecationWarning) + + _param = self._v1_agent_upload_file_serialize( + instance_id=instance_id, + file_path=file_path, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "AgentErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_agent_upload_file_serialize( + self, + instance_id, + file_path, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if file_path is not None: + _path_params['filePath'] = file_path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/instances/{instanceId}/agent/v1/file/device/{filePath}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/assessments_api.py b/corellium/api/assessments_api.py new file mode 100644 index 0000000..4b8affb --- /dev/null +++ b/corellium/api/assessments_api.py @@ -0,0 +1,3966 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from corellium.models.assessment import Assessment +from corellium.models.assessment_format import AssessmentFormat +from corellium.models.assessment_id_status import AssessmentIdStatus +from corellium.models.create_assessment_input import CreateAssessmentInput +from corellium.models.delete_modification_input import DeleteModificationInput +from corellium.models.paginated_assessments import PaginatedAssessments +from corellium.models.report_modification_input import ReportModificationInput +from corellium.models.report_modification_result import ReportModificationResult +from corellium.models.test_assessment_input import TestAssessmentInput +from corellium.models.update_assessment_input import UpdateAssessmentInput + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class AssessmentsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_assessment( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + create_assessment_input: CreateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssessmentIdStatus: + """Create an assessment. + + Creates a new assessment for one app on the instance. This is always the first call. It does not start recording anything; it only checks the device and saves the assessment in status `new`. **Before you call it:** - The instance must be powered on. - The device must be jailbroken (iOS) or rooted (Android), and its model must support MATRIX (`mast: true` in `GET /v3/models`). Otherwise the request is rejected; currently this can come back as a server error rather than a 400, so check these conditions before calling. - The app must already be installed. `bundleId` is the app's identifier (for example `com.android.egg`); the app's name and version are read from the device and stored on the assessment. - Every earlier assessment on this instance must be `complete` or `failed`. Only one assessment can be in progress per instance at a time. - Android: the web interface asks for at least 4 CPU cores and 4 GB of RAM before it offers MATRIX. This API does not check those values, but with too little memory monitoring can fail with an out-of-memory error. **Optional inputs.** `wordlistId` and `fridaScriptId` point to files you upload beforehand with `POST /v3/images`; see those fields for details. **Response.** The new assessment's `id` and `status` (`new`). Save the `id`; every later call needs it. Next call: `v3StartMonitoring`. **How a MATRIX assessment works.** MATRIX tests one installed app for mobile security problems (for example insecure storage, weak crypto, or sensitive data sent over the network). It first records what the app does while you use it, then runs its checks against that recording and the device, and finally produces a report. Call these operations in order: 1. `v3CreateAssessment` with the app's `bundleId`. Status: `new`. 2. `v3StartMonitoring`. Status goes `startingMonitoring`, then `monitoring`. 3. Use the app on the device through the normal display or an automation tool. Exercise the features you care about. Keep the app open. 4. `v3StopMonitoring`. Status goes `stoppingMonitoring`, then `readyForTesting`. 5. `v3RunTests`. Status goes `testing`, then `complete` or `failed`. 6. Poll `v3GetAssessmentById` every few seconds until the status is `complete` or `failed`. Testing can take several minutes. 7. `v3DownloadReport` to get the results as HTML or JSON. 8. Optional: `v3CreateReportModification` to mark findings as not applicable or change their severity. Steps 2, 4 and 5 return as soon as the work has started. The request succeeding does not mean the step has finished; always wait for the next status before making the next call. If any step ends in `failed`, the assessment cannot continue: delete it and start again. Create, start monitoring, stop monitoring, run tests, and delete require the instance to be powered on. Get, list, update status, download, and the report-modification calls do not. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param create_assessment_input: (required) + :type create_assessment_input: CreateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_assessment_serialize( + instance_id=instance_id, + create_assessment_input=create_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_assessment_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + create_assessment_input: CreateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssessmentIdStatus]: + """Create an assessment. + + Creates a new assessment for one app on the instance. This is always the first call. It does not start recording anything; it only checks the device and saves the assessment in status `new`. **Before you call it:** - The instance must be powered on. - The device must be jailbroken (iOS) or rooted (Android), and its model must support MATRIX (`mast: true` in `GET /v3/models`). Otherwise the request is rejected; currently this can come back as a server error rather than a 400, so check these conditions before calling. - The app must already be installed. `bundleId` is the app's identifier (for example `com.android.egg`); the app's name and version are read from the device and stored on the assessment. - Every earlier assessment on this instance must be `complete` or `failed`. Only one assessment can be in progress per instance at a time. - Android: the web interface asks for at least 4 CPU cores and 4 GB of RAM before it offers MATRIX. This API does not check those values, but with too little memory monitoring can fail with an out-of-memory error. **Optional inputs.** `wordlistId` and `fridaScriptId` point to files you upload beforehand with `POST /v3/images`; see those fields for details. **Response.** The new assessment's `id` and `status` (`new`). Save the `id`; every later call needs it. Next call: `v3StartMonitoring`. **How a MATRIX assessment works.** MATRIX tests one installed app for mobile security problems (for example insecure storage, weak crypto, or sensitive data sent over the network). It first records what the app does while you use it, then runs its checks against that recording and the device, and finally produces a report. Call these operations in order: 1. `v3CreateAssessment` with the app's `bundleId`. Status: `new`. 2. `v3StartMonitoring`. Status goes `startingMonitoring`, then `monitoring`. 3. Use the app on the device through the normal display or an automation tool. Exercise the features you care about. Keep the app open. 4. `v3StopMonitoring`. Status goes `stoppingMonitoring`, then `readyForTesting`. 5. `v3RunTests`. Status goes `testing`, then `complete` or `failed`. 6. Poll `v3GetAssessmentById` every few seconds until the status is `complete` or `failed`. Testing can take several minutes. 7. `v3DownloadReport` to get the results as HTML or JSON. 8. Optional: `v3CreateReportModification` to mark findings as not applicable or change their severity. Steps 2, 4 and 5 return as soon as the work has started. The request succeeding does not mean the step has finished; always wait for the next status before making the next call. If any step ends in `failed`, the assessment cannot continue: delete it and start again. Create, start monitoring, stop monitoring, run tests, and delete require the instance to be powered on. Get, list, update status, download, and the report-modification calls do not. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param create_assessment_input: (required) + :type create_assessment_input: CreateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_assessment_serialize( + instance_id=instance_id, + create_assessment_input=create_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_assessment_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + create_assessment_input: CreateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an assessment. + + Creates a new assessment for one app on the instance. This is always the first call. It does not start recording anything; it only checks the device and saves the assessment in status `new`. **Before you call it:** - The instance must be powered on. - The device must be jailbroken (iOS) or rooted (Android), and its model must support MATRIX (`mast: true` in `GET /v3/models`). Otherwise the request is rejected; currently this can come back as a server error rather than a 400, so check these conditions before calling. - The app must already be installed. `bundleId` is the app's identifier (for example `com.android.egg`); the app's name and version are read from the device and stored on the assessment. - Every earlier assessment on this instance must be `complete` or `failed`. Only one assessment can be in progress per instance at a time. - Android: the web interface asks for at least 4 CPU cores and 4 GB of RAM before it offers MATRIX. This API does not check those values, but with too little memory monitoring can fail with an out-of-memory error. **Optional inputs.** `wordlistId` and `fridaScriptId` point to files you upload beforehand with `POST /v3/images`; see those fields for details. **Response.** The new assessment's `id` and `status` (`new`). Save the `id`; every later call needs it. Next call: `v3StartMonitoring`. **How a MATRIX assessment works.** MATRIX tests one installed app for mobile security problems (for example insecure storage, weak crypto, or sensitive data sent over the network). It first records what the app does while you use it, then runs its checks against that recording and the device, and finally produces a report. Call these operations in order: 1. `v3CreateAssessment` with the app's `bundleId`. Status: `new`. 2. `v3StartMonitoring`. Status goes `startingMonitoring`, then `monitoring`. 3. Use the app on the device through the normal display or an automation tool. Exercise the features you care about. Keep the app open. 4. `v3StopMonitoring`. Status goes `stoppingMonitoring`, then `readyForTesting`. 5. `v3RunTests`. Status goes `testing`, then `complete` or `failed`. 6. Poll `v3GetAssessmentById` every few seconds until the status is `complete` or `failed`. Testing can take several minutes. 7. `v3DownloadReport` to get the results as HTML or JSON. 8. Optional: `v3CreateReportModification` to mark findings as not applicable or change their severity. Steps 2, 4 and 5 return as soon as the work has started. The request succeeding does not mean the step has finished; always wait for the next status before making the next call. If any step ends in `failed`, the assessment cannot continue: delete it and start again. Create, start monitoring, stop monitoring, run tests, and delete require the instance to be powered on. Get, list, update status, download, and the report-modification calls do not. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param create_assessment_input: (required) + :type create_assessment_input: CreateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_assessment_serialize( + instance_id=instance_id, + create_assessment_input=create_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_assessment_serialize( + self, + instance_id, + create_assessment_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_assessment_input is not None: + _body_params = create_assessment_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/services/matrix/{instanceId}/assessments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_create_report_modification( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + report_modification_input: List[ReportModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ReportModificationResult]: + """Create report modifications. + + Adjusts findings in a finished report, for example to record that a failure does not apply to your app. The assessment must have status `complete`. Your changes are stored separately from the original report. Saving them immediately recalculates the assessment's `results` counts and score. The HTML download shows the adjusted findings; the JSON download contains the original report plus a `modifications` array. Send an array. Each item names a check with `checkId` (as shown in the report) and one `property` to change: - `outcome`: set `value` to `na` to mark the check \"not applicable\", or `fail` to undo that. - `severity`: set `value` to a different severity level for the check. - `evidence_` (for example `evidence_0`): set `suppressed` to `true` to hide the n-th piece of evidence for the check, or `false` to show it again. Do not send `value`. The response has one entry per item, saying whether it was applied or why it was ignored. To undo a change, use `v3DeleteReportModification`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param report_modification_input: (required) + :type report_modification_input: List[ReportModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + report_modification_input=report_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_report_modification_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + report_modification_input: List[ReportModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ReportModificationResult]]: + """Create report modifications. + + Adjusts findings in a finished report, for example to record that a failure does not apply to your app. The assessment must have status `complete`. Your changes are stored separately from the original report. Saving them immediately recalculates the assessment's `results` counts and score. The HTML download shows the adjusted findings; the JSON download contains the original report plus a `modifications` array. Send an array. Each item names a check with `checkId` (as shown in the report) and one `property` to change: - `outcome`: set `value` to `na` to mark the check \"not applicable\", or `fail` to undo that. - `severity`: set `value` to a different severity level for the check. - `evidence_` (for example `evidence_0`): set `suppressed` to `true` to hide the n-th piece of evidence for the check, or `false` to show it again. Do not send `value`. The response has one entry per item, saying whether it was applied or why it was ignored. To undo a change, use `v3DeleteReportModification`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param report_modification_input: (required) + :type report_modification_input: List[ReportModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + report_modification_input=report_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_report_modification_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + report_modification_input: List[ReportModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create report modifications. + + Adjusts findings in a finished report, for example to record that a failure does not apply to your app. The assessment must have status `complete`. Your changes are stored separately from the original report. Saving them immediately recalculates the assessment's `results` counts and score. The HTML download shows the adjusted findings; the JSON download contains the original report plus a `modifications` array. Send an array. Each item names a check with `checkId` (as shown in the report) and one `property` to change: - `outcome`: set `value` to `na` to mark the check \"not applicable\", or `fail` to undo that. - `severity`: set `value` to a different severity level for the check. - `evidence_` (for example `evidence_0`): set `suppressed` to `true` to hide the n-th piece of evidence for the check, or `false` to show it again. Do not send `value`. The response has one entry per item, saying whether it was applied or why it was ignored. To undo a change, use `v3DeleteReportModification`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param report_modification_input: (required) + :type report_modification_input: List[ReportModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + report_modification_input=report_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_report_modification_serialize( + self, + instance_id, + assessment_id, + report_modification_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'ReportModificationInput': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if report_modification_input is not None: + _body_params = report_modification_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_assessment( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an assessment. + + Permanently deletes an assessment and the data that belongs to it: - the assessment record, - the generated report, - the wordlist file it used (if any), - the monitoring data MATRIX recorded for this app, - temporary MATRIX files on the device. The Frida script file, if one was used, is **not** deleted; remove it yourself with `DELETE /v3/images/{imageId}` if you no longer need it. The instance must be powered on, because MATRIX removes its files from the device. Delete a `failed` assessment before creating a new one for the same instance. Unlike most v3 delete endpoints, an unknown `assessmentId` returns 404 rather than 204. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_assessment_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an assessment. + + Permanently deletes an assessment and the data that belongs to it: - the assessment record, - the generated report, - the wordlist file it used (if any), - the monitoring data MATRIX recorded for this app, - temporary MATRIX files on the device. The Frida script file, if one was used, is **not** deleted; remove it yourself with `DELETE /v3/images/{imageId}` if you no longer need it. The instance must be powered on, because MATRIX removes its files from the device. Delete a `failed` assessment before creating a new one for the same instance. Unlike most v3 delete endpoints, an unknown `assessmentId` returns 404 rather than 204. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_assessment_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an assessment. + + Permanently deletes an assessment and the data that belongs to it: - the assessment record, - the generated report, - the wordlist file it used (if any), - the monitoring data MATRIX recorded for this app, - temporary MATRIX files on the device. The Frida script file, if one was used, is **not** deleted; remove it yourself with `DELETE /v3/images/{imageId}` if you no longer need it. The instance must be powered on, because MATRIX removes its files from the device. Delete a `failed` assessment before creating a new one for the same instance. Unlike most v3 delete endpoints, an unknown `assessmentId` returns 404 rather than 204. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_assessment_serialize( + self, + instance_id, + assessment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_report_modification( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + delete_modification_input: List[DeleteModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ReportModificationResult]: + """Delete report modifications. + + Undoes report changes made with `v3CreateReportModification`, so the affected findings return to their original values. The assessment must have status `complete`. Send an array of `{ checkId, property }` items that identify the changes to remove. The response has one entry per item saying whether it was removed. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param delete_modification_input: (required) + :type delete_modification_input: List[DeleteModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + delete_modification_input=delete_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_report_modification_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + delete_modification_input: List[DeleteModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ReportModificationResult]]: + """Delete report modifications. + + Undoes report changes made with `v3CreateReportModification`, so the affected findings return to their original values. The assessment must have status `complete`. Send an array of `{ checkId, property }` items that identify the changes to remove. The response has one entry per item saying whether it was removed. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param delete_modification_input: (required) + :type delete_modification_input: List[DeleteModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + delete_modification_input=delete_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_report_modification_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + delete_modification_input: List[DeleteModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete report modifications. + + Undoes report changes made with `v3CreateReportModification`, so the affected findings return to their original values. The assessment must have status `complete`. Send an array of `{ checkId, property }` items that identify the changes to remove. The response has one entry per item saying whether it was removed. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param delete_modification_input: (required) + :type delete_modification_input: List[DeleteModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + delete_modification_input=delete_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_report_modification_serialize( + self, + instance_id, + assessment_id, + delete_modification_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'DeleteModificationInput': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if delete_modification_input is not None: + _body_params = delete_modification_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_download_report( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + format: Annotated[Optional[AssessmentFormat], Field(description="Report download format. Defaults to \"html\".")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Download an assessment report. + + Downloads the full report of a finished assessment. The assessment must have status `complete`; otherwise the request fails with 400. Choose the format with `format`: - `html` (default): a single, self-contained HTML page for people to read. Save it with an `.html` extension and open it in a browser. - `json`: the report data for programs, plus an `activity` array (up to 100 recent events for the assessment) and a `modifications` array listing the changes made with `v3CreateReportModification`. The report data itself is the original, unmodified result; apply the entries in `modifications` yourself if your program needs the adjusted view. The HTML report applies your modifications when it is generated, so download again after changing findings. The instance does not need to be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param format: Report download format. Defaults to \"html\". + :type format: AssessmentFormat + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_report_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_download_report_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + format: Annotated[Optional[AssessmentFormat], Field(description="Report download format. Defaults to \"html\".")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Download an assessment report. + + Downloads the full report of a finished assessment. The assessment must have status `complete`; otherwise the request fails with 400. Choose the format with `format`: - `html` (default): a single, self-contained HTML page for people to read. Save it with an `.html` extension and open it in a browser. - `json`: the report data for programs, plus an `activity` array (up to 100 recent events for the assessment) and a `modifications` array listing the changes made with `v3CreateReportModification`. The report data itself is the original, unmodified result; apply the entries in `modifications` yourself if your program needs the adjusted view. The HTML report applies your modifications when it is generated, so download again after changing findings. The instance does not need to be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param format: Report download format. Defaults to \"html\". + :type format: AssessmentFormat + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_report_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_download_report_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + format: Annotated[Optional[AssessmentFormat], Field(description="Report download format. Defaults to \"html\".")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download an assessment report. + + Downloads the full report of a finished assessment. The assessment must have status `complete`; otherwise the request fails with 400. Choose the format with `format`: - `html` (default): a single, self-contained HTML page for people to read. Save it with an `.html` extension and open it in a browser. - `json`: the report data for programs, plus an `activity` array (up to 100 recent events for the assessment) and a `modifications` array listing the changes made with `v3CreateReportModification`. The report data itself is the original, unmodified result; apply the entries in `modifications` yourself if your program needs the adjusted view. The HTML report applies your modifications when it is generated, so download again after changing findings. The instance does not need to be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param format: Report download format. Defaults to \"html\". + :type format: AssessmentFormat + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_report_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_download_report_serialize( + self, + instance_id, + assessment_id, + format, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + if format is not None: + + _query_params.append(('format', format.value)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/html', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}/download', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_assessment_by_id( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assessment: + """Get an assessment by ID. + + Returns everything known about one assessment. Use it to: - **Wait for a step to finish.** Poll after `v3StartMonitoring`, `v3StopMonitoring` and `v3RunTests`, and check `status` before making the next call. - **Find out why it failed.** When `status` is `failed`, `error` may contain a short reason. - **Read a summary of the results.** Once `status` is `complete`, `results` holds the pass/fail counts and the MATRIX score, and `reportId` is set. Use `v3DownloadReport` for the full findings. Returns 404 if no assessment has this ID. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_assessment_by_id_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_assessment_by_id_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assessment]: + """Get an assessment by ID. + + Returns everything known about one assessment. Use it to: - **Wait for a step to finish.** Poll after `v3StartMonitoring`, `v3StopMonitoring` and `v3RunTests`, and check `status` before making the next call. - **Find out why it failed.** When `status` is `failed`, `error` may contain a short reason. - **Read a summary of the results.** Once `status` is `complete`, `results` holds the pass/fail counts and the MATRIX score, and `reportId` is set. Use `v3DownloadReport` for the full findings. Returns 404 if no assessment has this ID. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_assessment_by_id_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_assessment_by_id_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an assessment by ID. + + Returns everything known about one assessment. Use it to: - **Wait for a step to finish.** Poll after `v3StartMonitoring`, `v3StopMonitoring` and `v3RunTests`, and check `status` before making the next call. - **Find out why it failed.** When `status` is `failed`, `error` may contain a short reason. - **Read a summary of the results.** Once `status` is `complete`, `results` holds the pass/fail counts and the MATRIX score, and `reportId` is set. Use `v3DownloadReport` for the full findings. Returns 404 if no assessment has this ID. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_assessment_by_id_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_assessment_by_id_serialize( + self, + instance_id, + assessment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_assessments_by_instance_id( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + target_instance_id: Annotated[StrictStr, Field(description="ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of assessments to return. Defaults to 100.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of assessments to skip before returning results. Defaults to 0.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\".")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by app name (exact match).")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by app version (exact match).")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by assessment status.")] = None, + created_by: Annotated[Optional[StrictStr], Field(description="Filter by the user ID that created the assessment.")] = None, + wordlist: Annotated[Optional[StrictStr], Field(description="Filter by wordlist name. Use \"None\" to return assessments without a wordlist.")] = None, + frida: Annotated[Optional[StrictStr], Field(description="Filter by Frida script name. Use \"None\" to return assessments without a Frida script.")] = None, + corellium_version: Annotated[Optional[StrictStr], Field(description="Filter by Corellium version (exact match).")] = None, + created_at: Annotated[Optional[StrictStr], Field(description="Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedAssessments: + """List assessments for an instance. + + Lists the assessments for an instance, one page at a time. Use it to find earlier assessments, check whether one is still running before creating a new one, or build a history view. **Paging.** Returns at most `limit` assessments (default 100), skipping the first `offset` (default 0). `total` is the number of assessments that match your filters; keep increasing `offset` by `limit` until `offset` is at least `total`. **Sorting and filtering.** Results are newest first unless you set `sort`. Filters such as `status`, `name` and `createdAt` can be combined; only assessments matching all of them are returned. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param target_instance_id: ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. (required) + :type target_instance_id: str + :param limit: Maximum number of assessments to return. Defaults to 100. + :type limit: float + :param offset: Number of assessments to skip before returning results. Defaults to 0. + :type offset: float + :param sort: Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\". + :type sort: str + :param name: Filter by app name (exact match). + :type name: str + :param version: Filter by app version (exact match). + :type version: str + :param status: Filter by assessment status. + :type status: str + :param created_by: Filter by the user ID that created the assessment. + :type created_by: str + :param wordlist: Filter by wordlist name. Use \"None\" to return assessments without a wordlist. + :type wordlist: str + :param frida: Filter by Frida script name. Use \"None\" to return assessments without a Frida script. + :type frida: str + :param corellium_version: Filter by Corellium version (exact match). + :type corellium_version: str + :param created_at: Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC. + :type created_at: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_assessments_by_instance_id_serialize( + instance_id=instance_id, + target_instance_id=target_instance_id, + limit=limit, + offset=offset, + sort=sort, + name=name, + version=version, + status=status, + created_by=created_by, + wordlist=wordlist, + frida=frida, + corellium_version=corellium_version, + created_at=created_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedAssessments", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_assessments_by_instance_id_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + target_instance_id: Annotated[StrictStr, Field(description="ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of assessments to return. Defaults to 100.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of assessments to skip before returning results. Defaults to 0.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\".")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by app name (exact match).")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by app version (exact match).")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by assessment status.")] = None, + created_by: Annotated[Optional[StrictStr], Field(description="Filter by the user ID that created the assessment.")] = None, + wordlist: Annotated[Optional[StrictStr], Field(description="Filter by wordlist name. Use \"None\" to return assessments without a wordlist.")] = None, + frida: Annotated[Optional[StrictStr], Field(description="Filter by Frida script name. Use \"None\" to return assessments without a Frida script.")] = None, + corellium_version: Annotated[Optional[StrictStr], Field(description="Filter by Corellium version (exact match).")] = None, + created_at: Annotated[Optional[StrictStr], Field(description="Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedAssessments]: + """List assessments for an instance. + + Lists the assessments for an instance, one page at a time. Use it to find earlier assessments, check whether one is still running before creating a new one, or build a history view. **Paging.** Returns at most `limit` assessments (default 100), skipping the first `offset` (default 0). `total` is the number of assessments that match your filters; keep increasing `offset` by `limit` until `offset` is at least `total`. **Sorting and filtering.** Results are newest first unless you set `sort`. Filters such as `status`, `name` and `createdAt` can be combined; only assessments matching all of them are returned. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param target_instance_id: ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. (required) + :type target_instance_id: str + :param limit: Maximum number of assessments to return. Defaults to 100. + :type limit: float + :param offset: Number of assessments to skip before returning results. Defaults to 0. + :type offset: float + :param sort: Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\". + :type sort: str + :param name: Filter by app name (exact match). + :type name: str + :param version: Filter by app version (exact match). + :type version: str + :param status: Filter by assessment status. + :type status: str + :param created_by: Filter by the user ID that created the assessment. + :type created_by: str + :param wordlist: Filter by wordlist name. Use \"None\" to return assessments without a wordlist. + :type wordlist: str + :param frida: Filter by Frida script name. Use \"None\" to return assessments without a Frida script. + :type frida: str + :param corellium_version: Filter by Corellium version (exact match). + :type corellium_version: str + :param created_at: Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC. + :type created_at: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_assessments_by_instance_id_serialize( + instance_id=instance_id, + target_instance_id=target_instance_id, + limit=limit, + offset=offset, + sort=sort, + name=name, + version=version, + status=status, + created_by=created_by, + wordlist=wordlist, + frida=frida, + corellium_version=corellium_version, + created_at=created_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedAssessments", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_assessments_by_instance_id_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + target_instance_id: Annotated[StrictStr, Field(description="ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of assessments to return. Defaults to 100.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of assessments to skip before returning results. Defaults to 0.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\".")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by app name (exact match).")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by app version (exact match).")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by assessment status.")] = None, + created_by: Annotated[Optional[StrictStr], Field(description="Filter by the user ID that created the assessment.")] = None, + wordlist: Annotated[Optional[StrictStr], Field(description="Filter by wordlist name. Use \"None\" to return assessments without a wordlist.")] = None, + frida: Annotated[Optional[StrictStr], Field(description="Filter by Frida script name. Use \"None\" to return assessments without a Frida script.")] = None, + corellium_version: Annotated[Optional[StrictStr], Field(description="Filter by Corellium version (exact match).")] = None, + created_at: Annotated[Optional[StrictStr], Field(description="Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List assessments for an instance. + + Lists the assessments for an instance, one page at a time. Use it to find earlier assessments, check whether one is still running before creating a new one, or build a history view. **Paging.** Returns at most `limit` assessments (default 100), skipping the first `offset` (default 0). `total` is the number of assessments that match your filters; keep increasing `offset` by `limit` until `offset` is at least `total`. **Sorting and filtering.** Results are newest first unless you set `sort`. Filters such as `status`, `name` and `createdAt` can be combined; only assessments matching all of them are returned. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param target_instance_id: ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. (required) + :type target_instance_id: str + :param limit: Maximum number of assessments to return. Defaults to 100. + :type limit: float + :param offset: Number of assessments to skip before returning results. Defaults to 0. + :type offset: float + :param sort: Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\". + :type sort: str + :param name: Filter by app name (exact match). + :type name: str + :param version: Filter by app version (exact match). + :type version: str + :param status: Filter by assessment status. + :type status: str + :param created_by: Filter by the user ID that created the assessment. + :type created_by: str + :param wordlist: Filter by wordlist name. Use \"None\" to return assessments without a wordlist. + :type wordlist: str + :param frida: Filter by Frida script name. Use \"None\" to return assessments without a Frida script. + :type frida: str + :param corellium_version: Filter by Corellium version (exact match). + :type corellium_version: str + :param created_at: Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC. + :type created_at: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_assessments_by_instance_id_serialize( + instance_id=instance_id, + target_instance_id=target_instance_id, + limit=limit, + offset=offset, + sort=sort, + name=name, + version=version, + status=status, + created_by=created_by, + wordlist=wordlist, + frida=frida, + corellium_version=corellium_version, + created_at=created_at, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedAssessments", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_assessments_by_instance_id_serialize( + self, + instance_id, + target_instance_id, + limit, + offset, + sort, + name, + version, + status, + created_by, + wordlist, + frida, + corellium_version, + created_at, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if target_instance_id is not None: + _path_params['targetInstanceId'] = target_instance_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if name is not None: + + _query_params.append(('name', name)) + + if version is not None: + + _query_params.append(('version', version)) + + if status is not None: + + _query_params.append(('status', status)) + + if created_by is not None: + + _query_params.append(('createdBy', created_by)) + + if wordlist is not None: + + _query_params.append(('wordlist', wordlist)) + + if frida is not None: + + _query_params.append(('frida', frida)) + + if corellium_version is not None: + + _query_params.append(('corelliumVersion', corellium_version)) + + if created_at is not None: + + _query_params.append(('createdAt', created_at)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_assessment( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + update_assessment_input: UpdateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assessment: + """Update an assessment status. + + Sets the assessment's `status` field directly. **Most clients should never call this.** `v3StartMonitoring`, `v3StopMonitoring` and `v3RunTests` change the status for you and also do the actual work; this call only changes the stored value. The server does not check that the new status is a valid next step, and changing it does not start or stop any monitoring or testing. Setting a status by hand can leave an assessment claiming to be in a state it is not really in. Returns the updated assessment, or 404 if no assessment has this ID. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param update_assessment_input: (required) + :type update_assessment_input: UpdateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + update_assessment_input=update_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_assessment_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + update_assessment_input: UpdateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assessment]: + """Update an assessment status. + + Sets the assessment's `status` field directly. **Most clients should never call this.** `v3StartMonitoring`, `v3StopMonitoring` and `v3RunTests` change the status for you and also do the actual work; this call only changes the stored value. The server does not check that the new status is a valid next step, and changing it does not start or stop any monitoring or testing. Setting a status by hand can leave an assessment claiming to be in a state it is not really in. Returns the updated assessment, or 404 if no assessment has this ID. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param update_assessment_input: (required) + :type update_assessment_input: UpdateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + update_assessment_input=update_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_assessment_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + update_assessment_input: UpdateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an assessment status. + + Sets the assessment's `status` field directly. **Most clients should never call this.** `v3StartMonitoring`, `v3StopMonitoring` and `v3RunTests` change the status for you and also do the actual work; this call only changes the stored value. The server does not check that the new status is a valid next step, and changing it does not start or stop any monitoring or testing. Setting a status by hand can leave an assessment claiming to be in a state it is not really in. Returns the updated assessment, or 404 if no assessment has this ID. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param update_assessment_input: (required) + :type update_assessment_input: UpdateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + update_assessment_input=update_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_assessment_serialize( + self, + instance_id, + assessment_id, + update_assessment_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_assessment_input is not None: + _body_params = update_assessment_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_run_tests( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + test_assessment_input: Optional[TestAssessmentInput] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssessmentIdStatus: + """Run assessment tests. + + Runs the MATRIX security checks (step 5). Call it once the status is `readyForTesting`. The instance must be powered on and must stay on until testing finishes. The checks run in the background and can take several minutes. This call returns right away with the status `testing`. Poll `v3GetAssessmentById` until it is `complete` (then call `v3DownloadReport`) or `failed`. **Running only some checks.** The request body is optional; with no body every applicable check runs. To narrow it down, set `grep` to text or a regular expression. A check runs if the pattern matches its check ID, its group ID or its category ID. For example `masvs-storage` runs every storage check and `masvs-storage-2-android-8` runs one check. Set `invert` to `true` to run every check except the matching ones. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param test_assessment_input: + :type test_assessment_input: TestAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_tests_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + test_assessment_input=test_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_run_tests_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + test_assessment_input: Optional[TestAssessmentInput] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssessmentIdStatus]: + """Run assessment tests. + + Runs the MATRIX security checks (step 5). Call it once the status is `readyForTesting`. The instance must be powered on and must stay on until testing finishes. The checks run in the background and can take several minutes. This call returns right away with the status `testing`. Poll `v3GetAssessmentById` until it is `complete` (then call `v3DownloadReport`) or `failed`. **Running only some checks.** The request body is optional; with no body every applicable check runs. To narrow it down, set `grep` to text or a regular expression. A check runs if the pattern matches its check ID, its group ID or its category ID. For example `masvs-storage` runs every storage check and `masvs-storage-2-android-8` runs one check. Set `invert` to `true` to run every check except the matching ones. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param test_assessment_input: + :type test_assessment_input: TestAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_tests_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + test_assessment_input=test_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_run_tests_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + test_assessment_input: Optional[TestAssessmentInput] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Run assessment tests. + + Runs the MATRIX security checks (step 5). Call it once the status is `readyForTesting`. The instance must be powered on and must stay on until testing finishes. The checks run in the background and can take several minutes. This call returns right away with the status `testing`. Poll `v3GetAssessmentById` until it is `complete` (then call `v3DownloadReport`) or `failed`. **Running only some checks.** The request body is optional; with no body every applicable check runs. To narrow it down, set `grep` to text or a regular expression. A check runs if the pattern matches its check ID, its group ID or its category ID. For example `masvs-storage` runs every storage check and `masvs-storage-2-android-8` runs one check. Set `invert` to `true` to run every check except the matching ones. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param test_assessment_input: + :type test_assessment_input: TestAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_run_tests_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + test_assessment_input=test_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_tests_serialize( + self, + instance_id, + assessment_id, + test_assessment_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if test_assessment_input is not None: + _body_params = test_assessment_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}/test', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_monitoring( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start assessment monitoring. + + Starts recording what the app does (step 2). Call it after `v3CreateAssessment`, when the assessment's status is `new`. The instance must be powered on. MATRIX attaches to the app in the background, which can take a while. This call returns 204 as soon as that work has started, with the status set to `startingMonitoring`. Poll `v3GetAssessmentById`: - `monitoring`: recording has begun. Now use the app on the device. Go through the features you want tested: sign in, open screens, enter and save data, make network requests. MATRIX can only report on behavior it observed. Keep the app open until you stop monitoring. - `failed`: see `error`. Common causes are too little device RAM and the app failing to launch. When you have finished using the app, call `v3StopMonitoring`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_monitoring_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start assessment monitoring. + + Starts recording what the app does (step 2). Call it after `v3CreateAssessment`, when the assessment's status is `new`. The instance must be powered on. MATRIX attaches to the app in the background, which can take a while. This call returns 204 as soon as that work has started, with the status set to `startingMonitoring`. Poll `v3GetAssessmentById`: - `monitoring`: recording has begun. Now use the app on the device. Go through the features you want tested: sign in, open screens, enter and save data, make network requests. MATRIX can only report on behavior it observed. Keep the app open until you stop monitoring. - `failed`: see `error`. Common causes are too little device RAM and the app failing to launch. When you have finished using the app, call `v3StopMonitoring`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_monitoring_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start assessment monitoring. + + Starts recording what the app does (step 2). Call it after `v3CreateAssessment`, when the assessment's status is `new`. The instance must be powered on. MATRIX attaches to the app in the background, which can take a while. This call returns 204 as soon as that work has started, with the status set to `startingMonitoring`. Poll `v3GetAssessmentById`: - `monitoring`: recording has begun. Now use the app on the device. Go through the features you want tested: sign in, open screens, enter and save data, make network requests. MATRIX can only report on behavior it observed. Keep the app open until you stop monitoring. - `failed`: see `error`. Common causes are too little device RAM and the app failing to launch. When you have finished using the app, call `v3StopMonitoring`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_monitoring_serialize( + self, + instance_id, + assessment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_stop_monitoring( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop assessment monitoring. + + Stops recording (step 4). Call it once the status is `monitoring` and you have finished using the app. The instance must be powered on. MATRIX detaches from the app and saves what it recorded in the background. This call returns 204 as soon as that has started, with the status set to `stoppingMonitoring`. Poll `v3GetAssessmentById` until the status is `readyForTesting`, then call `v3RunTests`. If it becomes `failed`, check `error`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_stop_monitoring_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop assessment monitoring. + + Stops recording (step 4). Call it once the status is `monitoring` and you have finished using the app. The instance must be powered on. MATRIX detaches from the app and saves what it recorded in the background. This call returns 204 as soon as that has started, with the status set to `stoppingMonitoring`. Poll `v3GetAssessmentById` until the status is `readyForTesting`, then call `v3RunTests`. If it becomes `failed`, check `error`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_stop_monitoring_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop assessment monitoring. + + Stops recording (step 4). Call it once the status is `monitoring` and you have finished using the app. The instance must be powered on. MATRIX detaches from the app and saves what it recorded in the background. This call returns 204 as soon as that has started, with the status set to `stoppingMonitoring`. Poll `v3GetAssessmentById` until the status is `readyForTesting`, then call `v3RunTests`. If it becomes `failed`, check `error`. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_stop_monitoring_serialize( + self, + instance_id, + assessment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/services/matrix/{instanceId}/assessments/{assessmentId}/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/assessments_v1_api.py b/corellium/api/assessments_v1_api.py new file mode 100644 index 0000000..377bded --- /dev/null +++ b/corellium/api/assessments_v1_api.py @@ -0,0 +1,3808 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from corellium.models.assessment import Assessment +from corellium.models.assessment_format import AssessmentFormat +from corellium.models.assessment_id_status import AssessmentIdStatus +from corellium.models.create_assessment_input import CreateAssessmentInput +from corellium.models.delete_modification_input import DeleteModificationInput +from corellium.models.report_modification_input import ReportModificationInput +from corellium.models.report_modification_result import ReportModificationResult +from corellium.models.test_assessment_input import TestAssessmentInput +from corellium.models.update_assessment_input import UpdateAssessmentInput + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class AssessmentsV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_create_assessment( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + create_assessment_input: CreateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssessmentIdStatus: + """(Deprecated) Create an assessment. + + Creates a new MATRIX assessment for the instance. Existing assessments must be complete or failed and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param create_assessment_input: (required) + :type create_assessment_input: CreateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments is deprecated.", DeprecationWarning) + + _param = self._v1_create_assessment_serialize( + instance_id=instance_id, + create_assessment_input=create_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_assessment_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + create_assessment_input: CreateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssessmentIdStatus]: + """(Deprecated) Create an assessment. + + Creates a new MATRIX assessment for the instance. Existing assessments must be complete or failed and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param create_assessment_input: (required) + :type create_assessment_input: CreateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments is deprecated.", DeprecationWarning) + + _param = self._v1_create_assessment_serialize( + instance_id=instance_id, + create_assessment_input=create_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_assessment_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + create_assessment_input: CreateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create an assessment. + + Creates a new MATRIX assessment for the instance. Existing assessments must be complete or failed and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param create_assessment_input: (required) + :type create_assessment_input: CreateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments is deprecated.", DeprecationWarning) + + _param = self._v1_create_assessment_serialize( + instance_id=instance_id, + create_assessment_input=create_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_assessment_serialize( + self, + instance_id, + create_assessment_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_assessment_input is not None: + _body_params = create_assessment_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/services/matrix/{instanceId}/assessments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_create_report_modification( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + report_modification_input: List[ReportModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ReportModificationResult]: + """(Deprecated) Create report modifications. + + Applies one or more modifications (outcome, severity, or evidence suppression) to a completed assessment report. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param report_modification_input: (required) + :type report_modification_input: List[ReportModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification is deprecated.", DeprecationWarning) + + _param = self._v1_create_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + report_modification_input=report_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_report_modification_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + report_modification_input: List[ReportModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ReportModificationResult]]: + """(Deprecated) Create report modifications. + + Applies one or more modifications (outcome, severity, or evidence suppression) to a completed assessment report. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param report_modification_input: (required) + :type report_modification_input: List[ReportModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification is deprecated.", DeprecationWarning) + + _param = self._v1_create_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + report_modification_input=report_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_report_modification_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + report_modification_input: List[ReportModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create report modifications. + + Applies one or more modifications (outcome, severity, or evidence suppression) to a completed assessment report. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param report_modification_input: (required) + :type report_modification_input: List[ReportModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification is deprecated.", DeprecationWarning) + + _param = self._v1_create_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + report_modification_input=report_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_report_modification_serialize( + self, + instance_id, + assessment_id, + report_modification_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'ReportModificationInput': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if report_modification_input is not None: + _body_params = report_modification_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_assessment( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete an assessment. + + Deletes an assessment. The instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_assessment_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete an assessment. + + Deletes an assessment. The instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_assessment_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete an assessment. + + Deletes an assessment. The instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_assessment_serialize( + self, + instance_id, + assessment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_report_modification( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + delete_modification_input: List[DeleteModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ReportModificationResult]: + """(Deprecated) Delete report modifications. + + Removes one or more previously applied report modifications from a completed assessment. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param delete_modification_input: (required) + :type delete_modification_input: List[DeleteModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification is deprecated.", DeprecationWarning) + + _param = self._v1_delete_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + delete_modification_input=delete_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_report_modification_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + delete_modification_input: List[DeleteModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ReportModificationResult]]: + """(Deprecated) Delete report modifications. + + Removes one or more previously applied report modifications from a completed assessment. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param delete_modification_input: (required) + :type delete_modification_input: List[DeleteModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification is deprecated.", DeprecationWarning) + + _param = self._v1_delete_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + delete_modification_input=delete_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_report_modification_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + delete_modification_input: List[DeleteModificationInput], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete report modifications. + + Removes one or more previously applied report modifications from a completed assessment. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param delete_modification_input: (required) + :type delete_modification_input: List[DeleteModificationInput] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification is deprecated.", DeprecationWarning) + + _param = self._v1_delete_report_modification_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + delete_modification_input=delete_modification_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ReportModificationResult]", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_report_modification_serialize( + self, + instance_id, + assessment_id, + delete_modification_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'DeleteModificationInput': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if delete_modification_input is not None: + _body_params = delete_modification_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_download_report( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + format: Annotated[Optional[AssessmentFormat], Field(description="Report download format. Defaults to \"html\".")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """(Deprecated) Download an assessment report. + + Downloads the rendered assessment report. The assessment must be complete and have a generated report. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param format: Report download format. Defaults to \"html\". + :type format: AssessmentFormat + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/assessments/{assessmentId}/download is deprecated.", DeprecationWarning) + + _param = self._v1_download_report_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_download_report_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + format: Annotated[Optional[AssessmentFormat], Field(description="Report download format. Defaults to \"html\".")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """(Deprecated) Download an assessment report. + + Downloads the rendered assessment report. The assessment must be complete and have a generated report. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param format: Report download format. Defaults to \"html\". + :type format: AssessmentFormat + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/assessments/{assessmentId}/download is deprecated.", DeprecationWarning) + + _param = self._v1_download_report_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_download_report_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + format: Annotated[Optional[AssessmentFormat], Field(description="Report download format. Defaults to \"html\".")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Download an assessment report. + + Downloads the rendered assessment report. The assessment must be complete and have a generated report. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param format: Report download format. Defaults to \"html\". + :type format: AssessmentFormat + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/assessments/{assessmentId}/download is deprecated.", DeprecationWarning) + + _param = self._v1_download_report_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_download_report_serialize( + self, + instance_id, + assessment_id, + format, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + if format is not None: + + _query_params.append(('format', format.value)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/html', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}/download', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_assessment_by_id( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assessment: + """(Deprecated) Get an assessment by ID. + + Returns the full assessment record. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_assessment_by_id_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_assessment_by_id_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assessment]: + """(Deprecated) Get an assessment by ID. + + Returns the full assessment record. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_assessment_by_id_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_assessment_by_id_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get an assessment by ID. + + Returns the full assessment record. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_assessment_by_id_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_assessment_by_id_serialize( + self, + instance_id, + assessment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_assessments_by_instance_id( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + target_instance_id: Annotated[StrictStr, Field(description="ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Assessment]: + """(Deprecated) List assessments for an instance. + + Returns a list of assessments for the given instance. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param target_instance_id: ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. (required) + :type target_instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments is deprecated.", DeprecationWarning) + + _param = self._v1_get_assessments_by_instance_id_serialize( + instance_id=instance_id, + target_instance_id=target_instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Assessment]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_assessments_by_instance_id_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + target_instance_id: Annotated[StrictStr, Field(description="ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Assessment]]: + """(Deprecated) List assessments for an instance. + + Returns a list of assessments for the given instance. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param target_instance_id: ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. (required) + :type target_instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments is deprecated.", DeprecationWarning) + + _param = self._v1_get_assessments_by_instance_id_serialize( + instance_id=instance_id, + target_instance_id=target_instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Assessment]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_assessments_by_instance_id_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + target_instance_id: Annotated[StrictStr, Field(description="ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List assessments for an instance. + + Returns a list of assessments for the given instance. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param target_instance_id: ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. (required) + :type target_instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments is deprecated.", DeprecationWarning) + + _param = self._v1_get_assessments_by_instance_id_serialize( + instance_id=instance_id, + target_instance_id=target_instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Assessment]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_assessments_by_instance_id_serialize( + self, + instance_id, + target_instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if target_instance_id is not None: + _path_params['targetInstanceId'] = target_instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_patch_assessment( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + update_assessment_input: UpdateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Assessment: + """(Deprecated) Update an assessment status. + + Updates the lifecycle status of an assessment. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param update_assessment_input: (required) + :type update_assessment_input: UpdateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + update_assessment_input=update_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_patch_assessment_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + update_assessment_input: UpdateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Assessment]: + """(Deprecated) Update an assessment status. + + Updates the lifecycle status of an assessment. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param update_assessment_input: (required) + :type update_assessment_input: UpdateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + update_assessment_input=update_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_patch_assessment_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + update_assessment_input: UpdateAssessmentInput, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update an assessment status. + + Updates the lifecycle status of an assessment. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param update_assessment_input: (required) + :type update_assessment_input: UpdateAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/services/matrix/{instanceId}/assessments/{assessmentId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_assessment_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + update_assessment_input=update_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Assessment", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_patch_assessment_serialize( + self, + instance_id, + assessment_id, + update_assessment_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_assessment_input is not None: + _body_params = update_assessment_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_run_tests( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + test_assessment_input: Optional[TestAssessmentInput] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AssessmentIdStatus: + """(Deprecated) Run assessment tests. + + Executes the MATRIX checks for an assessment. The assessment must have status \"readyForTesting\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param test_assessment_input: + :type test_assessment_input: TestAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/test is deprecated.", DeprecationWarning) + + _param = self._v1_run_tests_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + test_assessment_input=test_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_run_tests_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + test_assessment_input: Optional[TestAssessmentInput] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AssessmentIdStatus]: + """(Deprecated) Run assessment tests. + + Executes the MATRIX checks for an assessment. The assessment must have status \"readyForTesting\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param test_assessment_input: + :type test_assessment_input: TestAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/test is deprecated.", DeprecationWarning) + + _param = self._v1_run_tests_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + test_assessment_input=test_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_run_tests_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + test_assessment_input: Optional[TestAssessmentInput] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Run assessment tests. + + Executes the MATRIX checks for an assessment. The assessment must have status \"readyForTesting\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param test_assessment_input: + :type test_assessment_input: TestAssessmentInput + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/test is deprecated.", DeprecationWarning) + + _param = self._v1_run_tests_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + test_assessment_input=test_assessment_input, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssessmentIdStatus", + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_run_tests_serialize( + self, + instance_id, + assessment_id, + test_assessment_input, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if test_assessment_input is not None: + _body_params = test_assessment_input + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}/test', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_start_monitoring( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Start assessment monitoring. + + Begins device monitoring for an assessment. The assessment must have status \"new\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_start_monitoring_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Start assessment monitoring. + + Begins device monitoring for an assessment. The assessment must have status \"new\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_start_monitoring_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start assessment monitoring. + + Begins device monitoring for an assessment. The assessment must have status \"new\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_start_monitoring_serialize( + self, + instance_id, + assessment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_stop_monitoring( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Stop assessment monitoring. + + Stops device monitoring for an assessment. The assessment must have status \"monitoring\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop is deprecated.", DeprecationWarning) + + _param = self._v1_stop_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_stop_monitoring_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Stop assessment monitoring. + + Stops device monitoring for an assessment. The assessment must have status \"monitoring\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop is deprecated.", DeprecationWarning) + + _param = self._v1_stop_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_stop_monitoring_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects.")], + assessment_id: Annotated[StrictStr, Field(description="Identifier of the assessment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Stop assessment monitoring. + + Stops device monitoring for an assessment. The assessment must have status \"monitoring\" and the instance must be powered on. + + :param instance_id: ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. (required) + :type instance_id: str + :param assessment_id: Identifier of the assessment. (required) + :type assessment_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop is deprecated.", DeprecationWarning) + + _param = self._v1_stop_monitoring_serialize( + instance_id=instance_id, + assessment_id=assessment_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "MatrixError", + '404': "MatrixError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_stop_monitoring_serialize( + self, + instance_id, + assessment_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if assessment_id is not None: + _path_params['assessmentId'] = assessment_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/authentication_api.py b/corellium/api/authentication_api.py new file mode 100644 index 0000000..51c50c5 --- /dev/null +++ b/corellium/api/authentication_api.py @@ -0,0 +1,3543 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from corellium.models.api_token_result import ApiTokenResult +from corellium.models.auth_provider_types_list_response import AuthProviderTypesListResponse +from corellium.models.auth_providers_list_response import AuthProvidersListResponse +from corellium.models.login_body import LoginBody +from corellium.models.login_result import LoginResult + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class AuthenticationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_auth_login( + self, + login_body: Optional[LoginBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LoginResult: + """Log in + + **Start here.** Almost every other call needs you to prove who you are by sending a token in the `Authorization` header: `Authorization: Bearer `. There are two kinds of token: - **API token (best for scripts and automation).** A long-lived key you create once, in the web interface or with `POST /v3/auth/apitoken`. It is shown only once, so store it safely. You can send it directly as the Bearer token on every request, or exchange it here for a session token by sending `apiToken`. - **Session token.** A short-lived token (a JWT) returned by this call. Send it as the Bearer token until `expiration`, then log in again or renew it by sending it back as `token`. Supply one of three credential types; when more than one is present they are resolved in this fixed order of precedence: (1) `username` + `password` (plus `totpToken`, a six-digit code from your authenticator app, when two-factor sign-in is enabled); (2) `token`, an existing session token, renewed for a fresh one; (3) `apiToken`, a persistent API key created by the user, not issued by login. The first credential type present wins and the rest are ignored. For example, sending both username/password and an apiToken authenticates via username/password. On success the response contains a newly-regenerated session token, its `expiration` time, and the session itself: the authenticated user and their domain. The apiToken is never returned. Renewing a Webplayer token instead returns the Webplayer session `identifier` and no `user`. A 403 means the credentials were wrong (or a required two-factor code was missing or wrong). + + :param login_body: + :type login_body: LoginBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_auth_login_serialize( + login_body=login_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_auth_login_with_http_info( + self, + login_body: Optional[LoginBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LoginResult]: + """Log in + + **Start here.** Almost every other call needs you to prove who you are by sending a token in the `Authorization` header: `Authorization: Bearer `. There are two kinds of token: - **API token (best for scripts and automation).** A long-lived key you create once, in the web interface or with `POST /v3/auth/apitoken`. It is shown only once, so store it safely. You can send it directly as the Bearer token on every request, or exchange it here for a session token by sending `apiToken`. - **Session token.** A short-lived token (a JWT) returned by this call. Send it as the Bearer token until `expiration`, then log in again or renew it by sending it back as `token`. Supply one of three credential types; when more than one is present they are resolved in this fixed order of precedence: (1) `username` + `password` (plus `totpToken`, a six-digit code from your authenticator app, when two-factor sign-in is enabled); (2) `token`, an existing session token, renewed for a fresh one; (3) `apiToken`, a persistent API key created by the user, not issued by login. The first credential type present wins and the rest are ignored. For example, sending both username/password and an apiToken authenticates via username/password. On success the response contains a newly-regenerated session token, its `expiration` time, and the session itself: the authenticated user and their domain. The apiToken is never returned. Renewing a Webplayer token instead returns the Webplayer session `identifier` and no `user`. A 403 means the credentials were wrong (or a required two-factor code was missing or wrong). + + :param login_body: + :type login_body: LoginBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_auth_login_serialize( + login_body=login_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_auth_login_without_preload_content( + self, + login_body: Optional[LoginBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Log in + + **Start here.** Almost every other call needs you to prove who you are by sending a token in the `Authorization` header: `Authorization: Bearer `. There are two kinds of token: - **API token (best for scripts and automation).** A long-lived key you create once, in the web interface or with `POST /v3/auth/apitoken`. It is shown only once, so store it safely. You can send it directly as the Bearer token on every request, or exchange it here for a session token by sending `apiToken`. - **Session token.** A short-lived token (a JWT) returned by this call. Send it as the Bearer token until `expiration`, then log in again or renew it by sending it back as `token`. Supply one of three credential types; when more than one is present they are resolved in this fixed order of precedence: (1) `username` + `password` (plus `totpToken`, a six-digit code from your authenticator app, when two-factor sign-in is enabled); (2) `token`, an existing session token, renewed for a fresh one; (3) `apiToken`, a persistent API key created by the user, not issued by login. The first credential type present wins and the rest are ignored. For example, sending both username/password and an apiToken authenticates via username/password. On success the response contains a newly-regenerated session token, its `expiration` time, and the session itself: the authenticated user and their domain. The apiToken is never returned. Renewing a Webplayer token instead returns the Webplayer session `identifier` and no `user`. A 403 means the credentials were wrong (or a required two-factor code was missing or wrong). + + :param login_body: + :type login_body: LoginBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_auth_login_serialize( + login_body=login_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_auth_login_serialize( + self, + login_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if login_body is not None: + _body_params = login_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/auth/login', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_auth_logout( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Log out + + Ends the current session: the session token you send becomes invalid, so later requests with it fail with 401. For OpenID Connect (single sign-on) users this also ends the session with the identity provider. API tokens are not affected; remove one with `v3DeleteApiToken`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_auth_logout_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_auth_logout_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Log out + + Ends the current session: the session token you send becomes invalid, so later requests with it fail with 401. For OpenID Connect (single sign-on) users this also ends the session with the identity provider. API tokens are not affected; remove one with `v3DeleteApiToken`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_auth_logout_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_auth_logout_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Log out + + Ends the current session: the session token you send becomes invalid, so later requests with it fail with 401. For OpenID Connect (single sign-on) users this also ends the session with the identity provider. API tokens are not affected; remove one with `v3DeleteApiToken`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_auth_logout_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_auth_logout_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/auth/logout', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_api_token( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete API token + + Deletes your API token, so it can no longer be used to sign in. Scripts using it will get 401 until you give them a new one from `v3GenerateApiToken`. Deletes are idempotent: a request made when no API token is saved is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_api_token_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete API token + + Deletes your API token, so it can no longer be used to sign in. Scripts using it will get 401 until you give them a new one from `v3GenerateApiToken`. Deletes are idempotent: a request made when no API token is saved is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_api_token_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete API token + + Deletes your API token, so it can no longer be used to sign in. Scripts using it will get 401 until you give them a new one from `v3GenerateApiToken`. Deletes are idempotent: a request made when no API token is saved is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_api_token_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/auth/apitoken', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_fetch_auth_provider_metadata( + self, + url: Annotated[StrictStr, Field(description="HTTPS URL of the SAML metadata endpoint to fetch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Fetch SAML metadata + + Fetch SAML metadata XML from a trusted provider URL. The URL must be HTTPS and from an allowed domain. + + :param url: HTTPS URL of the SAML metadata endpoint to fetch. (required) + :type url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_fetch_auth_provider_metadata_serialize( + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_fetch_auth_provider_metadata_with_http_info( + self, + url: Annotated[StrictStr, Field(description="HTTPS URL of the SAML metadata endpoint to fetch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Fetch SAML metadata + + Fetch SAML metadata XML from a trusted provider URL. The URL must be HTTPS and from an allowed domain. + + :param url: HTTPS URL of the SAML metadata endpoint to fetch. (required) + :type url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_fetch_auth_provider_metadata_serialize( + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_fetch_auth_provider_metadata_without_preload_content( + self, + url: Annotated[StrictStr, Field(description="HTTPS URL of the SAML metadata endpoint to fetch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fetch SAML metadata + + Fetch SAML metadata XML from a trusted provider URL. The URL must be HTTPS and from an allowed domain. + + :param url: HTTPS URL of the SAML metadata endpoint to fetch. (required) + :type url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_fetch_auth_provider_metadata_serialize( + url=url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_fetch_auth_provider_metadata_serialize( + self, + url, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if url is not None: + + _query_params.append(('url', url)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/xml', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/auth/providers/fetch-metadata', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_generate_api_token( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiTokenResult: + """Generate API token + + Creates a new API token for you: a long-lived key for scripts, CI jobs and SDKs, so they do not need your password. The response contains the token; it is shown only this once and cannot be retrieved later, so store it somewhere safe (for example a secrets manager). Each user has one API token at a time: generating a new one replaces the old one, which stops working immediately. Use it as `Authorization: Bearer `, or exchange it for a session token with `v3AuthLogin`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_generate_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiTokenResult", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_generate_api_token_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiTokenResult]: + """Generate API token + + Creates a new API token for you: a long-lived key for scripts, CI jobs and SDKs, so they do not need your password. The response contains the token; it is shown only this once and cannot be retrieved later, so store it somewhere safe (for example a secrets manager). Each user has one API token at a time: generating a new one replaces the old one, which stops working immediately. Use it as `Authorization: Bearer `, or exchange it for a session token with `v3AuthLogin`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_generate_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiTokenResult", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_generate_api_token_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Generate API token + + Creates a new API token for you: a long-lived key for scripts, CI jobs and SDKs, so they do not need your password. The response contains the token; it is shown only this once and cannot be retrieved later, so store it somewhere safe (for example a secrets manager). Each user has one API token at a time: generating a new one replaces the old one, which stops working immediately. Use it as `Authorization: Bearer `, or exchange it for a session token with `v3AuthLogin`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_generate_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiTokenResult", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_generate_api_token_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/auth/apitoken', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_auth_provider_authorization_url( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + type: Annotated[Optional[StrictStr], Field(description="Sign-up flow type.")] = None, + code: Annotated[Optional[StrictStr], Field(description="Sign-up code for subscriber invites and trial requests.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Sign-up email (may differ from SSO email).")] = None, + token: Annotated[Optional[StrictStr], Field(description="Sign-up token for a team invite.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Get provider authorization URL + + Starts single sign-on with the given identity provider by redirecting the caller's browser there (302). Open this URL in a browser, not from a script: after the user signs in at the provider, the provider sends the browser back to the callback route, which finishes signing in. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param type: Sign-up flow type. + :type type: str + :param code: Sign-up code for subscriber invites and trial requests. + :type code: str + :param email: Sign-up email (may differ from SSO email). + :type email: str + :param token: Sign-up token for a team invite. + :type token: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_authorization_url_serialize( + provider_id=provider_id, + type=type, + code=code, + email=email, + token=token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_auth_provider_authorization_url_with_http_info( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + type: Annotated[Optional[StrictStr], Field(description="Sign-up flow type.")] = None, + code: Annotated[Optional[StrictStr], Field(description="Sign-up code for subscriber invites and trial requests.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Sign-up email (may differ from SSO email).")] = None, + token: Annotated[Optional[StrictStr], Field(description="Sign-up token for a team invite.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Get provider authorization URL + + Starts single sign-on with the given identity provider by redirecting the caller's browser there (302). Open this URL in a browser, not from a script: after the user signs in at the provider, the provider sends the browser back to the callback route, which finishes signing in. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param type: Sign-up flow type. + :type type: str + :param code: Sign-up code for subscriber invites and trial requests. + :type code: str + :param email: Sign-up email (may differ from SSO email). + :type email: str + :param token: Sign-up token for a team invite. + :type token: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_authorization_url_serialize( + provider_id=provider_id, + type=type, + code=code, + email=email, + token=token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_auth_provider_authorization_url_without_preload_content( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + type: Annotated[Optional[StrictStr], Field(description="Sign-up flow type.")] = None, + code: Annotated[Optional[StrictStr], Field(description="Sign-up code for subscriber invites and trial requests.")] = None, + email: Annotated[Optional[StrictStr], Field(description="Sign-up email (may differ from SSO email).")] = None, + token: Annotated[Optional[StrictStr], Field(description="Sign-up token for a team invite.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get provider authorization URL + + Starts single sign-on with the given identity provider by redirecting the caller's browser there (302). Open this URL in a browser, not from a script: after the user signs in at the provider, the provider sends the browser back to the callback route, which finishes signing in. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param type: Sign-up flow type. + :type type: str + :param code: Sign-up code for subscriber invites and trial requests. + :type code: str + :param email: Sign-up email (may differ from SSO email). + :type email: str + :param token: Sign-up token for a team invite. + :type token: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_authorization_url_serialize( + provider_id=provider_id, + type=type, + code=code, + email=email, + token=token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_auth_provider_authorization_url_serialize( + self, + provider_id, + type, + code, + email, + token, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + if code is not None: + + _query_params.append(('code', code)) + + if email is not None: + + _query_params.append(('email', email)) + + if token is not None: + + _query_params.append(('token', token)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/auth/providers/{providerId}/authorization_url', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_auth_provider_callback( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + error: Annotated[Optional[StrictStr], Field(description="Error code from the provider.")] = None, + error_description: Annotated[Optional[StrictStr], Field(description="Error description from the provider.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Authentication provider callback (GET) + + Handle the final authorization response from an SSO provider and redirect back to the client. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param error: Error code from the provider. + :type error: str + :param error_description: Error description from the provider. + :type error_description: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_callback_serialize( + provider_id=provider_id, + error=error, + error_description=error_description, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_auth_provider_callback_with_http_info( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + error: Annotated[Optional[StrictStr], Field(description="Error code from the provider.")] = None, + error_description: Annotated[Optional[StrictStr], Field(description="Error description from the provider.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Authentication provider callback (GET) + + Handle the final authorization response from an SSO provider and redirect back to the client. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param error: Error code from the provider. + :type error: str + :param error_description: Error description from the provider. + :type error_description: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_callback_serialize( + provider_id=provider_id, + error=error, + error_description=error_description, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_auth_provider_callback_without_preload_content( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + error: Annotated[Optional[StrictStr], Field(description="Error code from the provider.")] = None, + error_description: Annotated[Optional[StrictStr], Field(description="Error description from the provider.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Authentication provider callback (GET) + + Handle the final authorization response from an SSO provider and redirect back to the client. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param error: Error code from the provider. + :type error: str + :param error_description: Error description from the provider. + :type error_description: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_callback_serialize( + provider_id=provider_id, + error=error, + error_description=error_description, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_auth_provider_callback_serialize( + self, + provider_id, + error, + error_description, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + if error is not None: + + _query_params.append(('error', error)) + + if error_description is not None: + + _query_params.append(('error_description', error_description)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/auth/providers/{providerId}/callback', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_auth_provider_sp_metadata( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Get service provider metadata + + Return the SAML service provider metadata XML for the given authentication provider. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_sp_metadata_serialize( + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_auth_provider_sp_metadata_with_http_info( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Get service provider metadata + + Return the SAML service provider metadata XML for the given authentication provider. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_sp_metadata_serialize( + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_auth_provider_sp_metadata_without_preload_content( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get service provider metadata + + Return the SAML service provider metadata XML for the given authentication provider. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_auth_provider_sp_metadata_serialize( + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_auth_provider_sp_metadata_serialize( + self, + provider_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/xml', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/auth/providers/{providerId}/spmetadata', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_auth_provider_types( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AuthProviderTypesListResponse: + """List authentication provider types + + **Required role:** Domain administrator. Return schemas describing the supported authentication provider types. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_auth_provider_types_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProviderTypesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_auth_provider_types_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AuthProviderTypesListResponse]: + """List authentication provider types + + **Required role:** Domain administrator. Return schemas describing the supported authentication provider types. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_auth_provider_types_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProviderTypesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_auth_provider_types_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List authentication provider types + + **Required role:** Domain administrator. Return schemas describing the supported authentication provider types. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_auth_provider_types_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProviderTypesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_auth_provider_types_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/auth/providers/types', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_auth_providers( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AuthProvidersListResponse: + """List authentication providers + + Lists the ways users can sign in to your domain, such as username and password or single sign-on (SSO) through an identity provider like Okta. Needs no sign-in, so a login page can call it to show the right buttons. To sign in with an SSO provider, send the user's browser to its `authorizationUrl`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_auth_providers_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvidersListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_auth_providers_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AuthProvidersListResponse]: + """List authentication providers + + Lists the ways users can sign in to your domain, such as username and password or single sign-on (SSO) through an identity provider like Okta. Needs no sign-in, so a login page can call it to show the right buttons. To sign in with an SSO provider, send the user's browser to its `authorizationUrl`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_auth_providers_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvidersListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_auth_providers_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List authentication providers + + Lists the ways users can sign in to your domain, such as username and password or single sign-on (SSO) through an identity provider like Okta. Needs no sign-in, so a login page can call it to show the right buttons. To sign in with an SSO provider, send the user's browser to its `authorizationUrl`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_auth_providers_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvidersListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_auth_providers_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/auth/providers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_post_auth_provider_callback( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Authentication provider callback (POST) + + Handle the final authorization response from an SSO provider (POST binding) and redirect back to the client. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_post_auth_provider_callback_serialize( + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_post_auth_provider_callback_with_http_info( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Authentication provider callback (POST) + + Handle the final authorization response from an SSO provider (POST binding) and redirect back to the client. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_post_auth_provider_callback_serialize( + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_post_auth_provider_callback_without_preload_content( + self, + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Authentication provider callback (POST) + + Handle the final authorization response from an SSO provider (POST binding) and redirect back to the client. + + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_post_auth_provider_callback_serialize( + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '302': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_post_auth_provider_callback_serialize( + self, + provider_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/auth/providers/{providerId}/callback', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/authentication_v1_api.py b/corellium/api/authentication_v1_api.py new file mode 100644 index 0000000..8b4fa6e --- /dev/null +++ b/corellium/api/authentication_v1_api.py @@ -0,0 +1,959 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field +from typing import Any, Dict +from typing_extensions import Annotated +from corellium.models.api_token import ApiToken +from corellium.models.token_v1 import TokenV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class AuthenticationV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_auth_login( + self, + body: Annotated[Dict[str, Any], Field(description="Authorization data ( Credentials|ApiToken )")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TokenV1: + """(Deprecated) Log In + + Authenticate with username/password or a persistent apiToken. On success returns a freshly-regenerated session token (JWT). + + :param body: Authorization data ( Credentials|ApiToken ) (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/auth/login is deprecated.", DeprecationWarning) + + _param = self._v1_auth_login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_auth_login_with_http_info( + self, + body: Annotated[Dict[str, Any], Field(description="Authorization data ( Credentials|ApiToken )")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TokenV1]: + """(Deprecated) Log In + + Authenticate with username/password or a persistent apiToken. On success returns a freshly-regenerated session token (JWT). + + :param body: Authorization data ( Credentials|ApiToken ) (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/auth/login is deprecated.", DeprecationWarning) + + _param = self._v1_auth_login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_auth_login_without_preload_content( + self, + body: Annotated[Dict[str, Any], Field(description="Authorization data ( Credentials|ApiToken )")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Log In + + Authenticate with username/password or a persistent apiToken. On success returns a freshly-regenerated session token (JWT). + + :param body: Authorization data ( Credentials|ApiToken ) (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/auth/login is deprecated.", DeprecationWarning) + + _param = self._v1_auth_login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_auth_login_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/auth/login', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_api_token( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete API token + + Delete the authenticated user's currently saved API token. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/auth/apitoken is deprecated.", DeprecationWarning) + + _param = self._v1_delete_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_api_token_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete API token + + Delete the authenticated user's currently saved API token. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/auth/apitoken is deprecated.", DeprecationWarning) + + _param = self._v1_delete_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_api_token_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete API token + + Delete the authenticated user's currently saved API token. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/auth/apitoken is deprecated.", DeprecationWarning) + + _param = self._v1_delete_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_api_token_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/auth/apitoken', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_generate_api_token( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiToken: + """(Deprecated) Generate API token + + Generate a new API token for the authenticated user. The token is returned once and replaces any previously issued token. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/auth/apitoken is deprecated.", DeprecationWarning) + + _param = self._v1_generate_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiToken", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_generate_api_token_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiToken]: + """(Deprecated) Generate API token + + Generate a new API token for the authenticated user. The token is returned once and replaces any previously issued token. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/auth/apitoken is deprecated.", DeprecationWarning) + + _param = self._v1_generate_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiToken", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_generate_api_token_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Generate API token + + Generate a new API token for the authenticated user. The token is returned once and replaces any previously issued token. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/auth/apitoken is deprecated.", DeprecationWarning) + + _param = self._v1_generate_api_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiToken", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_generate_api_token_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/auth/apitoken', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/billing_api.py b/corellium/api/billing_api.py new file mode 100644 index 0000000..e1dddf0 --- /dev/null +++ b/corellium/api/billing_api.py @@ -0,0 +1,2204 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict, Optional +from corellium.models.billing_summary import BillingSummary +from corellium.models.cancel_subscription_body import CancelSubscriptionBody +from corellium.models.device_usage import DeviceUsage +from corellium.models.metered_subscription_usage import MeteredSubscriptionUsage +from corellium.models.subscribe_to_trial_body import SubscribeToTrialBody +from corellium.models.subscription import Subscription +from corellium.models.uncancel_subscription_body import UncancelSubscriptionBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class BillingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_cancel_subscription( + self, + cancel_subscription_body: Optional[CancelSubscriptionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Cancel a subscription + + **Required role:** Domain administrator. Cancels your domain's subscription. Requires an administrator. By default it acts on your own domain; only a cloud administrator may pass another `domainId`. Set `deleteDomain: true` to also delete the domain and everything in it, which cannot be undone. A cancellation that has not taken effect yet can be reversed with `v3UncancelSubscription`. + + :param cancel_subscription_body: + :type cancel_subscription_body: CancelSubscriptionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_cancel_subscription_serialize( + cancel_subscription_body=cancel_subscription_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_cancel_subscription_with_http_info( + self, + cancel_subscription_body: Optional[CancelSubscriptionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Cancel a subscription + + **Required role:** Domain administrator. Cancels your domain's subscription. Requires an administrator. By default it acts on your own domain; only a cloud administrator may pass another `domainId`. Set `deleteDomain: true` to also delete the domain and everything in it, which cannot be undone. A cancellation that has not taken effect yet can be reversed with `v3UncancelSubscription`. + + :param cancel_subscription_body: + :type cancel_subscription_body: CancelSubscriptionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_cancel_subscription_serialize( + cancel_subscription_body=cancel_subscription_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_cancel_subscription_without_preload_content( + self, + cancel_subscription_body: Optional[CancelSubscriptionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel a subscription + + **Required role:** Domain administrator. Cancels your domain's subscription. Requires an administrator. By default it acts on your own domain; only a cloud administrator may pass another `domainId`. Set `deleteDomain: true` to also delete the domain and everything in it, which cannot be undone. A cancellation that has not taken effect yet can be reversed with `v3UncancelSubscription`. + + :param cancel_subscription_body: + :type cancel_subscription_body: CancelSubscriptionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_cancel_subscription_serialize( + cancel_subscription_body=cancel_subscription_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_cancel_subscription_serialize( + self, + cancel_subscription_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if cancel_subscription_body is not None: + _body_params = cancel_subscription_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/billing/cancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_billing_summary( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BillingSummary: + """Get billing summary + + **Required role:** Domain administrator. Returns the charges building up for your domain in the current billing period on a usage-based plan: when the period started and ends, the running total, the billing threshold, and a line item per charged activity. Returns `pendingUsageBased: null` if your domain is not on a usage-based plan. Requires a domain administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_billing_summary_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BillingSummary", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_billing_summary_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BillingSummary]: + """Get billing summary + + **Required role:** Domain administrator. Returns the charges building up for your domain in the current billing period on a usage-based plan: when the period started and ends, the running total, the billing threshold, and a line item per charged activity. Returns `pendingUsageBased: null` if your domain is not on a usage-based plan. Requires a domain administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_billing_summary_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BillingSummary", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_billing_summary_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get billing summary + + **Required role:** Domain administrator. Returns the charges building up for your domain in the current billing period on a usage-based plan: when the period started and ends, the running total, the billing threshold, and a line item per charged activity. Returns `pendingUsageBased: null` if your domain is not on a usage-based plan. Requires a domain administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_billing_summary_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BillingSummary", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_billing_summary_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/billing/summary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_device_usage( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DeviceUsage: + """Get device usage + + Returns how much your domain's devices have been used in the current billing period. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_device_usage_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceUsage", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_device_usage_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DeviceUsage]: + """Get device usage + + Returns how much your domain's devices have been used in the current billing period. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_device_usage_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceUsage", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_device_usage_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get device usage + + Returns how much your domain's devices have been used in the current billing period. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_device_usage_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceUsage", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_device_usage_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/billing/usage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_metered_subscription_usage( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MeteredSubscriptionUsage: + """Get metered subscription usage + + **Required role:** Domain administrator. For domains on a metered plan, returns how much has been used in the current billing period: units (hours) included in the plan, units used beyond it, the rate for extra use, and the amounts billed and still outstanding. Amounts are in cents. Requires a domain administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_metered_subscription_usage_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MeteredSubscriptionUsage", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_metered_subscription_usage_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MeteredSubscriptionUsage]: + """Get metered subscription usage + + **Required role:** Domain administrator. For domains on a metered plan, returns how much has been used in the current billing period: units (hours) included in the plan, units used beyond it, the rate for extra use, and the amounts billed and still outstanding. Amounts are in cents. Requires a domain administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_metered_subscription_usage_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MeteredSubscriptionUsage", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_metered_subscription_usage_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get metered subscription usage + + **Required role:** Domain administrator. For domains on a metered plan, returns how much has been used in the current billing period: units (hours) included in the plan, units used beyond it, the rate for extra use, and the amounts billed and still outstanding. Amounts are in cents. Requires a domain administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_metered_subscription_usage_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MeteredSubscriptionUsage", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_metered_subscription_usage_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/billing/subscription/metered/usage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_subscription( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Subscription: + """Get the current subscription + + Returns your domain's current subscription: which plan you are on and its status. Use it to check what your account includes or whether a cancellation is scheduled. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_subscription_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_subscription_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Subscription]: + """Get the current subscription + + Returns your domain's current subscription: which plan you are on and its status. Use it to check what your account includes or whether a cancellation is scheduled. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_subscription_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_subscription_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the current subscription + + Returns your domain's current subscription: which plan you are on and its status. Use it to check what your account includes or whether a cancellation is scheduled. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_subscription_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Subscription", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_subscription_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/billing/subscription', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_subscribe_to_trial( + self, + subscribe_to_trial_body: Optional[SubscribeToTrialBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, Optional[object]]: + """Subscribe to a trial + + Creates a new trial domain for someone who has a trial invitation. Needs no sign-in: the invitation details in the body identify the person. Used by the trial sign-up page. + + :param subscribe_to_trial_body: + :type subscribe_to_trial_body: SubscribeToTrialBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_subscribe_to_trial_serialize( + subscribe_to_trial_body=subscribe_to_trial_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_subscribe_to_trial_with_http_info( + self, + subscribe_to_trial_body: Optional[SubscribeToTrialBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, Optional[object]]]: + """Subscribe to a trial + + Creates a new trial domain for someone who has a trial invitation. Needs no sign-in: the invitation details in the body identify the person. Used by the trial sign-up page. + + :param subscribe_to_trial_body: + :type subscribe_to_trial_body: SubscribeToTrialBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_subscribe_to_trial_serialize( + subscribe_to_trial_body=subscribe_to_trial_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_subscribe_to_trial_without_preload_content( + self, + subscribe_to_trial_body: Optional[SubscribeToTrialBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Subscribe to a trial + + Creates a new trial domain for someone who has a trial invitation. Needs no sign-in: the invitation details in the body identify the person. Used by the trial sign-up page. + + :param subscribe_to_trial_body: + :type subscribe_to_trial_body: SubscribeToTrialBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_subscribe_to_trial_serialize( + subscribe_to_trial_body=subscribe_to_trial_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_subscribe_to_trial_serialize( + self, + subscribe_to_trial_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if subscribe_to_trial_body is not None: + _body_params = subscribe_to_trial_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/billing/trials/subscribe', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_uncancel_subscription( + self, + uncancel_subscription_body: Optional[UncancelSubscriptionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Uncancel a subscription + + **Required role:** Domain administrator. Reverses a scheduled cancellation, so the subscription continues as before: the pending cancellation is cleared and the scheduled shut-off is removed. Requires an administrator; acts on your own domain unless a cloud administrator passes another `domainId`. + + :param uncancel_subscription_body: + :type uncancel_subscription_body: UncancelSubscriptionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uncancel_subscription_serialize( + uncancel_subscription_body=uncancel_subscription_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_uncancel_subscription_with_http_info( + self, + uncancel_subscription_body: Optional[UncancelSubscriptionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Uncancel a subscription + + **Required role:** Domain administrator. Reverses a scheduled cancellation, so the subscription continues as before: the pending cancellation is cleared and the scheduled shut-off is removed. Requires an administrator; acts on your own domain unless a cloud administrator passes another `domainId`. + + :param uncancel_subscription_body: + :type uncancel_subscription_body: UncancelSubscriptionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uncancel_subscription_serialize( + uncancel_subscription_body=uncancel_subscription_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_uncancel_subscription_without_preload_content( + self, + uncancel_subscription_body: Optional[UncancelSubscriptionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Uncancel a subscription + + **Required role:** Domain administrator. Reverses a scheduled cancellation, so the subscription continues as before: the pending cancellation is cleared and the scheduled shut-off is removed. Requires an administrator; acts on your own domain unless a cloud administrator passes another `domainId`. + + :param uncancel_subscription_body: + :type uncancel_subscription_body: UncancelSubscriptionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_uncancel_subscription_serialize( + uncancel_subscription_body=uncancel_subscription_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_uncancel_subscription_serialize( + self, + uncancel_subscription_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if uncancel_subscription_body is not None: + _body_params = uncancel_subscription_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/billing/uncancel', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/cluster_administration_config_api.py b/corellium/api/cluster_administration_config_api.py new file mode 100644 index 0000000..0fc8c45 --- /dev/null +++ b/corellium/api/cluster_administration_config_api.py @@ -0,0 +1,659 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field +from typing import Any, Dict +from typing_extensions import Annotated +from corellium.models.patch_cluster_config_body import PatchClusterConfigBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ClusterAdministrationConfigApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_get_cluster_config( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """(Deprecated) Get cluster configuration + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_cluster_config_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """(Deprecated) Get cluster configuration + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_cluster_config_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get cluster configuration + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_cluster_config_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_patch_cluster_config( + self, + patch_cluster_config_body: Annotated[PatchClusterConfigBody, Field(description="Cluster Configuration Payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Update cluster configuration + + + :param patch_cluster_config_body: Cluster Configuration Payload (required) + :type patch_cluster_config_body: PatchClusterConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/cluster/config is deprecated.", DeprecationWarning) + + _param = self._v1_patch_cluster_config_serialize( + patch_cluster_config_body=patch_cluster_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + '500': "NodeUpdatesFailed", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_patch_cluster_config_with_http_info( + self, + patch_cluster_config_body: Annotated[PatchClusterConfigBody, Field(description="Cluster Configuration Payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Update cluster configuration + + + :param patch_cluster_config_body: Cluster Configuration Payload (required) + :type patch_cluster_config_body: PatchClusterConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/cluster/config is deprecated.", DeprecationWarning) + + _param = self._v1_patch_cluster_config_serialize( + patch_cluster_config_body=patch_cluster_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + '500': "NodeUpdatesFailed", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_patch_cluster_config_without_preload_content( + self, + patch_cluster_config_body: Annotated[PatchClusterConfigBody, Field(description="Cluster Configuration Payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update cluster configuration + + + :param patch_cluster_config_body: Cluster Configuration Payload (required) + :type patch_cluster_config_body: PatchClusterConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/cluster/config is deprecated.", DeprecationWarning) + + _param = self._v1_patch_cluster_config_serialize( + patch_cluster_config_body=patch_cluster_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + '500': "NodeUpdatesFailed", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_patch_cluster_config_serialize( + self, + patch_cluster_config_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_cluster_config_body is not None: + _body_params = patch_cluster_config_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/cluster/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/cluster_administration_firmware_service_api.py b/corellium/api/cluster_administration_firmware_service_api.py new file mode 100644 index 0000000..d1e1761 --- /dev/null +++ b/corellium/api/cluster_administration_firmware_service_api.py @@ -0,0 +1,4963 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from corellium.models.device import Device +from corellium.models.extended_firmware_asset_info_v1 import ExtendedFirmwareAssetInfoV1 +from corellium.models.firmware_asset_v1 import FirmwareAssetV1 +from corellium.models.firmware_service_configuration import FirmwareServiceConfiguration +from corellium.models.firmware_v1 import FirmwareV1 +from corellium.models.image_creation_options import ImageCreationOptions +from corellium.models.image_v1 import ImageV1 +from corellium.models.install_firmware_assets_body_v1 import InstallFirmwareAssetsBodyV1 +from corellium.models.install_firmware_assets_response_v1 import InstallFirmwareAssetsResponseV1 +from corellium.models.install_firmware_body_v1 import InstallFirmwareBodyV1 +from corellium.models.install_firmware_response_v1 import InstallFirmwareResponseV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ClusterAdministrationFirmwareServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_create_assets_firmware_service( + self, + body: Annotated[Dict[str, Any], Field(description="Firmware assets payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """(Deprecated) Add firmware assets via the firmware service + + Proxies a request to the firmware service to add firmware assets. + + :param body: Firmware assets payload (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/firmware-service/firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_create_assets_firmware_service_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_assets_firmware_service_with_http_info( + self, + body: Annotated[Dict[str, Any], Field(description="Firmware assets payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """(Deprecated) Add firmware assets via the firmware service + + Proxies a request to the firmware service to add firmware assets. + + :param body: Firmware assets payload (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/firmware-service/firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_create_assets_firmware_service_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_assets_firmware_service_without_preload_content( + self, + body: Annotated[Dict[str, Any], Field(description="Firmware assets payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Add firmware assets via the firmware service + + Proxies a request to the firmware service to add firmware assets. + + :param body: Firmware assets payload (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/firmware-service/firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_create_assets_firmware_service_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_assets_firmware_service_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/html', + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/cluster/firmware-service/firmware-assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_create_image( + self, + image_creation_options: Annotated[ImageCreationOptions, Field(description="Image data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ImageV1: + """(Deprecated) Create a new Image + + Create a new Image. Accepts multipart/form-data (with optional file upload) or application/json (metadata only). + + :param image_creation_options: Image data (required) + :type image_creation_options: ImageCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images is deprecated.", DeprecationWarning) + + _param = self._v1_create_image_serialize( + image_creation_options=image_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '201': "ImageV1", + '404': "ApiNotFoundErrorV1", + '507': "InsufficientStorageErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_image_with_http_info( + self, + image_creation_options: Annotated[ImageCreationOptions, Field(description="Image data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ImageV1]: + """(Deprecated) Create a new Image + + Create a new Image. Accepts multipart/form-data (with optional file upload) or application/json (metadata only). + + :param image_creation_options: Image data (required) + :type image_creation_options: ImageCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images is deprecated.", DeprecationWarning) + + _param = self._v1_create_image_serialize( + image_creation_options=image_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '201': "ImageV1", + '404': "ApiNotFoundErrorV1", + '507': "InsufficientStorageErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_image_without_preload_content( + self, + image_creation_options: Annotated[ImageCreationOptions, Field(description="Image data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create a new Image + + Create a new Image. Accepts multipart/form-data (with optional file upload) or application/json (metadata only). + + :param image_creation_options: Image data (required) + :type image_creation_options: ImageCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images is deprecated.", DeprecationWarning) + + _param = self._v1_create_image_serialize( + image_creation_options=image_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '201': "ImageV1", + '404': "ApiNotFoundErrorV1", + '507': "InsufficientStorageErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_image_serialize( + self, + image_creation_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if image_creation_options is not None: + _body_params = image_creation_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/images', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_asset_firmware_service( + self, + asset_url: Annotated[StrictStr, Field(description="The raw firmware asset URL. Percent-encode it once when composing the request path by hand.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete a firmware asset by its URL + + Proxies a request to the firmware service to delete a firmware asset by URL. + + :param asset_url: The raw firmware asset URL. Percent-encode it once when composing the request path by hand. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/firmware-service/firmware-assets/{assetURL} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_asset_firmware_service_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_asset_firmware_service_with_http_info( + self, + asset_url: Annotated[StrictStr, Field(description="The raw firmware asset URL. Percent-encode it once when composing the request path by hand.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete a firmware asset by its URL + + Proxies a request to the firmware service to delete a firmware asset by URL. + + :param asset_url: The raw firmware asset URL. Percent-encode it once when composing the request path by hand. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/firmware-service/firmware-assets/{assetURL} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_asset_firmware_service_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_asset_firmware_service_without_preload_content( + self, + asset_url: Annotated[StrictStr, Field(description="The raw firmware asset URL. Percent-encode it once when composing the request path by hand.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete a firmware asset by its URL + + Proxies a request to the firmware service to delete a firmware asset by URL. + + :param asset_url: The raw firmware asset URL. Percent-encode it once when composing the request path by hand. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/firmware-service/firmware-assets/{assetURL} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_asset_firmware_service_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_asset_firmware_service_serialize( + self, + asset_url, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if asset_url is not None: + _path_params['assetURL'] = asset_url + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/cluster/firmware-service/firmware-assets/{assetURL}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_firmware_firmware_service( + self, + filename: Annotated[StrictStr, Field(description="The filename of the firmware to delete")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete a firmware by filename from the firmware service + + Proxies a request to the firmware service to delete a firmware by filename. + + :param filename: The filename of the firmware to delete (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/firmware-service/firmwares/{filename} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_firmware_firmware_service_serialize( + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_firmware_firmware_service_with_http_info( + self, + filename: Annotated[StrictStr, Field(description="The filename of the firmware to delete")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete a firmware by filename from the firmware service + + Proxies a request to the firmware service to delete a firmware by filename. + + :param filename: The filename of the firmware to delete (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/firmware-service/firmwares/{filename} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_firmware_firmware_service_serialize( + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_firmware_firmware_service_without_preload_content( + self, + filename: Annotated[StrictStr, Field(description="The filename of the firmware to delete")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete a firmware by filename from the firmware service + + Proxies a request to the firmware service to delete a firmware by filename. + + :param filename: The filename of the firmware to delete (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/firmware-service/firmwares/{filename} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_firmware_firmware_service_serialize( + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_firmware_firmware_service_serialize( + self, + filename, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if filename is not None: + _path_params['filename'] = filename + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/cluster/firmware-service/firmwares/{filename}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_asset_extended_firmware_service( + self, + asset_url: Annotated[StrictStr, Field(description="The raw firmware asset URL. Percent-encode it once when composing the request path by hand.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtendedFirmwareAssetInfoV1: + """(Deprecated) Fetch extended firmware-asset details including instances and associated IPSWs + + Retrieves extended information about a firmware including all instances using it and associated firmware assets. + + :param asset_url: The raw firmware asset URL. Percent-encode it once when composing the request path by hand. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmware-assets/{assetURL}/extended is deprecated.", DeprecationWarning) + + _param = self._v1_get_asset_extended_firmware_service_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtendedFirmwareAssetInfoV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_asset_extended_firmware_service_with_http_info( + self, + asset_url: Annotated[StrictStr, Field(description="The raw firmware asset URL. Percent-encode it once when composing the request path by hand.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtendedFirmwareAssetInfoV1]: + """(Deprecated) Fetch extended firmware-asset details including instances and associated IPSWs + + Retrieves extended information about a firmware including all instances using it and associated firmware assets. + + :param asset_url: The raw firmware asset URL. Percent-encode it once when composing the request path by hand. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmware-assets/{assetURL}/extended is deprecated.", DeprecationWarning) + + _param = self._v1_get_asset_extended_firmware_service_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtendedFirmwareAssetInfoV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_asset_extended_firmware_service_without_preload_content( + self, + asset_url: Annotated[StrictStr, Field(description="The raw firmware asset URL. Percent-encode it once when composing the request path by hand.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Fetch extended firmware-asset details including instances and associated IPSWs + + Retrieves extended information about a firmware including all instances using it and associated firmware assets. + + :param asset_url: The raw firmware asset URL. Percent-encode it once when composing the request path by hand. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmware-assets/{assetURL}/extended is deprecated.", DeprecationWarning) + + _param = self._v1_get_asset_extended_firmware_service_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtendedFirmwareAssetInfoV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_asset_extended_firmware_service_serialize( + self, + asset_url, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if asset_url is not None: + _path_params['assetURL'] = asset_url + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/firmware-service/firmware-assets/{assetURL}/extended', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_config_firmware_service( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Fetch firmware service configuration + + Returns a firmware service configuration object + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_config_firmware_service_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_config_firmware_service_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Fetch firmware service configuration + + Returns a firmware service configuration object + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_config_firmware_service_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_config_firmware_service_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Fetch firmware service configuration + + Returns a firmware service configuration object + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_config_firmware_service_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_config_firmware_service_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/firmware-service/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_install_firmware_status( + self, + task_id: Annotated[StrictStr, Field(description="Task ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstallFirmwareResponseV1: + """(Deprecated) Query install firmware request status. + + Returns the status of an install firmware request. + + :param task_id: Task ID - uuid (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images/install-firmware/{taskId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_install_firmware_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_install_firmware_status_with_http_info( + self, + task_id: Annotated[StrictStr, Field(description="Task ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstallFirmwareResponseV1]: + """(Deprecated) Query install firmware request status. + + Returns the status of an install firmware request. + + :param task_id: Task ID - uuid (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images/install-firmware/{taskId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_install_firmware_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_install_firmware_status_without_preload_content( + self, + task_id: Annotated[StrictStr, Field(description="Task ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Query install firmware request status. + + Returns the status of an install firmware request. + + :param task_id: Task ID - uuid (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images/install-firmware/{taskId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_install_firmware_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_install_firmware_status_serialize( + self, + task_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if task_id is not None: + _path_params['taskId'] = task_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/images/install-firmware/{taskId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_install_firmware( + self, + install_firmware_body_v1: Annotated[InstallFirmwareBodyV1, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstallFirmwareResponseV1: + """(Deprecated) Installs a firmware for cluster-wide use + + Takes an uploaded firmware image and installs it for cluster-wide use. The firmware is then removed from Images. In order to install a firmware, you need to follow a 4-step process. First, POST /v1/images/ with { name: string, type: 'fw' } using content-type application/json to acquire an imageId. Second, upload the firmware file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/images/install-firmware with { imageId: string } using content-type application/json to acquire a taskId. Fourth, you can poll the state of the installation via GET /v1/images/install-firmware/:taskId. + + :param install_firmware_body_v1: User data (required) + :type install_firmware_body_v1: InstallFirmwareBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/install-firmware is deprecated.", DeprecationWarning) + + _param = self._v1_install_firmware_serialize( + install_firmware_body_v1=install_firmware_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_install_firmware_with_http_info( + self, + install_firmware_body_v1: Annotated[InstallFirmwareBodyV1, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstallFirmwareResponseV1]: + """(Deprecated) Installs a firmware for cluster-wide use + + Takes an uploaded firmware image and installs it for cluster-wide use. The firmware is then removed from Images. In order to install a firmware, you need to follow a 4-step process. First, POST /v1/images/ with { name: string, type: 'fw' } using content-type application/json to acquire an imageId. Second, upload the firmware file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/images/install-firmware with { imageId: string } using content-type application/json to acquire a taskId. Fourth, you can poll the state of the installation via GET /v1/images/install-firmware/:taskId. + + :param install_firmware_body_v1: User data (required) + :type install_firmware_body_v1: InstallFirmwareBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/install-firmware is deprecated.", DeprecationWarning) + + _param = self._v1_install_firmware_serialize( + install_firmware_body_v1=install_firmware_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_install_firmware_without_preload_content( + self, + install_firmware_body_v1: Annotated[InstallFirmwareBodyV1, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Installs a firmware for cluster-wide use + + Takes an uploaded firmware image and installs it for cluster-wide use. The firmware is then removed from Images. In order to install a firmware, you need to follow a 4-step process. First, POST /v1/images/ with { name: string, type: 'fw' } using content-type application/json to acquire an imageId. Second, upload the firmware file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/images/install-firmware with { imageId: string } using content-type application/json to acquire a taskId. Fourth, you can poll the state of the installation via GET /v1/images/install-firmware/:taskId. + + :param install_firmware_body_v1: User data (required) + :type install_firmware_body_v1: InstallFirmwareBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/install-firmware is deprecated.", DeprecationWarning) + + _param = self._v1_install_firmware_serialize( + install_firmware_body_v1=install_firmware_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_install_firmware_serialize( + self, + install_firmware_body_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if install_firmware_body_v1 is not None: + _body_params = install_firmware_body_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/images/install-firmware', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_install_firmware_assets( + self, + install_firmware_assets_body_v1: Annotated[InstallFirmwareAssetsBodyV1, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstallFirmwareAssetsResponseV1: + """(Deprecated) Installs firmware assets for cluster-wide use + + Takes an uploaded firmware assets blob image and installs it for cluster-wide use. The image is then removed from Images. This endpoint is synchronous: it forwards the asset JSON to the firmware service and returns the firmware service's response message directly. There is no task ID and no polling endpoint. Installing firmware assets is a 3-step process. First, POST /v1/images/ with { name: string, type: 'fwasset' } using content-type application/json to acquire an imageId. name should be something like 'fcs-keys.json' Second, upload the firmware assets file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/images/install-firmware-assets with { imageId: string; } using content-type application/json. The response body is `{ message: string }` describing what the firmware service did with the assets. + + :param install_firmware_assets_body_v1: User data (required) + :type install_firmware_assets_body_v1: InstallFirmwareAssetsBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/install-firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_install_firmware_assets_serialize( + install_firmware_assets_body_v1=install_firmware_assets_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareAssetsResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_install_firmware_assets_with_http_info( + self, + install_firmware_assets_body_v1: Annotated[InstallFirmwareAssetsBodyV1, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstallFirmwareAssetsResponseV1]: + """(Deprecated) Installs firmware assets for cluster-wide use + + Takes an uploaded firmware assets blob image and installs it for cluster-wide use. The image is then removed from Images. This endpoint is synchronous: it forwards the asset JSON to the firmware service and returns the firmware service's response message directly. There is no task ID and no polling endpoint. Installing firmware assets is a 3-step process. First, POST /v1/images/ with { name: string, type: 'fwasset' } using content-type application/json to acquire an imageId. name should be something like 'fcs-keys.json' Second, upload the firmware assets file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/images/install-firmware-assets with { imageId: string; } using content-type application/json. The response body is `{ message: string }` describing what the firmware service did with the assets. + + :param install_firmware_assets_body_v1: User data (required) + :type install_firmware_assets_body_v1: InstallFirmwareAssetsBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/install-firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_install_firmware_assets_serialize( + install_firmware_assets_body_v1=install_firmware_assets_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareAssetsResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_install_firmware_assets_without_preload_content( + self, + install_firmware_assets_body_v1: Annotated[InstallFirmwareAssetsBodyV1, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Installs firmware assets for cluster-wide use + + Takes an uploaded firmware assets blob image and installs it for cluster-wide use. The image is then removed from Images. This endpoint is synchronous: it forwards the asset JSON to the firmware service and returns the firmware service's response message directly. There is no task ID and no polling endpoint. Installing firmware assets is a 3-step process. First, POST /v1/images/ with { name: string, type: 'fwasset' } using content-type application/json to acquire an imageId. name should be something like 'fcs-keys.json' Second, upload the firmware assets file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/images/install-firmware-assets with { imageId: string; } using content-type application/json. The response body is `{ message: string }` describing what the firmware service did with the assets. + + :param install_firmware_assets_body_v1: User data (required) + :type install_firmware_assets_body_v1: InstallFirmwareAssetsBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/install-firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_install_firmware_assets_serialize( + install_firmware_assets_body_v1=install_firmware_assets_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareAssetsResponseV1", + '400': "UserErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_install_firmware_assets_serialize( + self, + install_firmware_assets_body_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if install_firmware_assets_body_v1 is not None: + _body_params = install_firmware_assets_body_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/images/install-firmware-assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_assets_firmware_service( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'url,-domain').")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across url, domain")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[FirmwareAssetV1]: + """(Deprecated) Fetch firmware assets from the firmware service + + Proxies a request to the firmware service to retrieve a list of firmware assets. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'url,-domain'). + :type order: str + :param search: Case-insensitive partial match across url, domain + :type search: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_list_assets_firmware_service_serialize( + limit=limit, + offset=offset, + order=order, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareAssetV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_assets_firmware_service_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'url,-domain').")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across url, domain")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[FirmwareAssetV1]]: + """(Deprecated) Fetch firmware assets from the firmware service + + Proxies a request to the firmware service to retrieve a list of firmware assets. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'url,-domain'). + :type order: str + :param search: Case-insensitive partial match across url, domain + :type search: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_list_assets_firmware_service_serialize( + limit=limit, + offset=offset, + order=order, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareAssetV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_assets_firmware_service_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'url,-domain').")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across url, domain")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Fetch firmware assets from the firmware service + + Proxies a request to the firmware service to retrieve a list of firmware assets. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'url,-domain'). + :type order: str + :param search: Case-insensitive partial match across url, domain + :type search: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmware-assets is deprecated.", DeprecationWarning) + + _param = self._v1_list_assets_firmware_service_serialize( + limit=limit, + offset=offset, + order=order, + search=search, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareAssetV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_assets_firmware_service_serialize( + self, + limit, + offset, + order, + search, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if order is not None: + + _query_params.append(('order', order)) + + if search is not None: + + _query_params.append(('search', search)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/firmware-service/firmware-assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_devices_firmware_service( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across name, model, platform, and hwmodel fields")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options:")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type. Example: coreimg")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model. Example: Example: iPhone8,1")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact name. Example: iPhone6s")] = None, + platform: Annotated[Optional[StrictStr], Field(description="Filter by exact platform. Example: s5l8960x")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Device]: + """(Deprecated) Fetch devices from the firmware service + + Proxies a request to the firmware service to retrieve a list of devices. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param search: Case-insensitive partial match across name, model, platform, and hwmodel fields + :type search: str + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: + :type order: str + :param type: Filter by exact type. Example: coreimg + :type type: str + :param model: Filter by exact model. Example: Example: iPhone8,1 + :type model: str + :param name: Filter by exact name. Example: iPhone6s + :type name: str + :param platform: Filter by exact platform. Example: s5l8960x + :type platform: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/devices is deprecated.", DeprecationWarning) + + _param = self._v1_list_devices_firmware_service_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + type=type, + model=model, + name=name, + platform=platform, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Device]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_devices_firmware_service_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across name, model, platform, and hwmodel fields")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options:")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type. Example: coreimg")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model. Example: Example: iPhone8,1")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact name. Example: iPhone6s")] = None, + platform: Annotated[Optional[StrictStr], Field(description="Filter by exact platform. Example: s5l8960x")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Device]]: + """(Deprecated) Fetch devices from the firmware service + + Proxies a request to the firmware service to retrieve a list of devices. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param search: Case-insensitive partial match across name, model, platform, and hwmodel fields + :type search: str + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: + :type order: str + :param type: Filter by exact type. Example: coreimg + :type type: str + :param model: Filter by exact model. Example: Example: iPhone8,1 + :type model: str + :param name: Filter by exact name. Example: iPhone6s + :type name: str + :param platform: Filter by exact platform. Example: s5l8960x + :type platform: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/devices is deprecated.", DeprecationWarning) + + _param = self._v1_list_devices_firmware_service_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + type=type, + model=model, + name=name, + platform=platform, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Device]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_devices_firmware_service_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across name, model, platform, and hwmodel fields")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options:")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type. Example: coreimg")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model. Example: Example: iPhone8,1")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact name. Example: iPhone6s")] = None, + platform: Annotated[Optional[StrictStr], Field(description="Filter by exact platform. Example: s5l8960x")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Fetch devices from the firmware service + + Proxies a request to the firmware service to retrieve a list of devices. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param search: Case-insensitive partial match across name, model, platform, and hwmodel fields + :type search: str + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: + :type order: str + :param type: Filter by exact type. Example: coreimg + :type type: str + :param model: Filter by exact model. Example: Example: iPhone8,1 + :type model: str + :param name: Filter by exact name. Example: iPhone6s + :type name: str + :param platform: Filter by exact platform. Example: s5l8960x + :type platform: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/devices is deprecated.", DeprecationWarning) + + _param = self._v1_list_devices_firmware_service_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + type=type, + model=model, + name=name, + platform=platform, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Device]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_devices_firmware_service_serialize( + self, + limit, + offset, + search, + order, + type, + model, + name, + platform, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if search is not None: + + _query_params.append(('search', search)) + + if order is not None: + + _query_params.append(('order', order)) + + if type is not None: + + _query_params.append(('type', type)) + + if model is not None: + + _query_params.append(('model', model)) + + if name is not None: + + _query_params.append(('name', name)) + + if platform is not None: + + _query_params.append(('platform', platform)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/firmware-service/devices', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_firmwares_firmware_service( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across filename, model, type, version and buildid fields")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options:")] = None, + filename: Annotated[Optional[StrictStr], Field(description="Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model. Example: iPhone10,4")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type. Example: ipsw")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by exact version. Example: 12.1.4")] = None, + buildid: Annotated[Optional[StrictStr], Field(description="Filter by exact buildid. Example: 16D57")] = None, + firmware_assets: Annotated[Optional[StrictStr], Field(description="Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8=")] = None, + installed: Annotated[Optional[StrictBool], Field(description="Filter by installed status")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[FirmwareV1]: + """(Deprecated) Fetch firmwares from the firmware service + + Proxies a request to the firmware service to retrieve a list of firmwares. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param search: Case-insensitive partial match across filename, model, type, version and buildid fields + :type search: str + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: + :type order: str + :param filename: Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw + :type filename: str + :param model: Filter by exact model. Example: iPhone10,4 + :type model: str + :param type: Filter by exact type. Example: ipsw + :type type: str + :param version: Filter by exact version. Example: 12.1.4 + :type version: str + :param buildid: Filter by exact buildid. Example: 16D57 + :type buildid: str + :param firmware_assets: Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= + :type firmware_assets: str + :param installed: Filter by installed status + :type installed: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmwares is deprecated.", DeprecationWarning) + + _param = self._v1_list_firmwares_firmware_service_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filename=filename, + model=model, + type=type, + version=version, + buildid=buildid, + firmware_assets=firmware_assets, + installed=installed, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_firmwares_firmware_service_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across filename, model, type, version and buildid fields")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options:")] = None, + filename: Annotated[Optional[StrictStr], Field(description="Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model. Example: iPhone10,4")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type. Example: ipsw")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by exact version. Example: 12.1.4")] = None, + buildid: Annotated[Optional[StrictStr], Field(description="Filter by exact buildid. Example: 16D57")] = None, + firmware_assets: Annotated[Optional[StrictStr], Field(description="Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8=")] = None, + installed: Annotated[Optional[StrictBool], Field(description="Filter by installed status")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[FirmwareV1]]: + """(Deprecated) Fetch firmwares from the firmware service + + Proxies a request to the firmware service to retrieve a list of firmwares. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param search: Case-insensitive partial match across filename, model, type, version and buildid fields + :type search: str + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: + :type order: str + :param filename: Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw + :type filename: str + :param model: Filter by exact model. Example: iPhone10,4 + :type model: str + :param type: Filter by exact type. Example: ipsw + :type type: str + :param version: Filter by exact version. Example: 12.1.4 + :type version: str + :param buildid: Filter by exact buildid. Example: 16D57 + :type buildid: str + :param firmware_assets: Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= + :type firmware_assets: str + :param installed: Filter by installed status + :type installed: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmwares is deprecated.", DeprecationWarning) + + _param = self._v1_list_firmwares_firmware_service_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filename=filename, + model=model, + type=type, + version=version, + buildid=buildid, + firmware_assets=firmware_assets, + installed=installed, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_firmwares_firmware_service_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to return (min: 1, max: 10000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Index of the first row to return (default: 0)")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across filename, model, type, version and buildid fields")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options:")] = None, + filename: Annotated[Optional[StrictStr], Field(description="Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model. Example: iPhone10,4")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type. Example: ipsw")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by exact version. Example: 12.1.4")] = None, + buildid: Annotated[Optional[StrictStr], Field(description="Filter by exact buildid. Example: 16D57")] = None, + firmware_assets: Annotated[Optional[StrictStr], Field(description="Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8=")] = None, + installed: Annotated[Optional[StrictBool], Field(description="Filter by installed status")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Fetch firmwares from the firmware service + + Proxies a request to the firmware service to retrieve a list of firmwares. + + :param limit: Number of results to return (min: 1, max: 10000, default: 100) + :type limit: float + :param offset: Index of the first row to return (default: 0) + :type offset: float + :param search: Case-insensitive partial match across filename, model, type, version and buildid fields + :type search: str + :param order: Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: + :type order: str + :param filename: Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw + :type filename: str + :param model: Filter by exact model. Example: iPhone10,4 + :type model: str + :param type: Filter by exact type. Example: ipsw + :type type: str + :param version: Filter by exact version. Example: 12.1.4 + :type version: str + :param buildid: Filter by exact buildid. Example: 16D57 + :type buildid: str + :param firmware_assets: Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= + :type firmware_assets: str + :param installed: Filter by installed status + :type installed: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/firmware-service/firmwares is deprecated.", DeprecationWarning) + + _param = self._v1_list_firmwares_firmware_service_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filename=filename, + model=model, + type=type, + version=version, + buildid=buildid, + firmware_assets=firmware_assets, + installed=installed, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_firmwares_firmware_service_serialize( + self, + limit, + offset, + search, + order, + filename, + model, + type, + version, + buildid, + firmware_assets, + installed, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if search is not None: + + _query_params.append(('search', search)) + + if order is not None: + + _query_params.append(('order', order)) + + if filename is not None: + + _query_params.append(('filename', filename)) + + if model is not None: + + _query_params.append(('model', model)) + + if type is not None: + + _query_params.append(('type', type)) + + if version is not None: + + _query_params.append(('version', version)) + + if buildid is not None: + + _query_params.append(('buildid', buildid)) + + if firmware_assets is not None: + + _query_params.append(('firmware_assets', firmware_assets)) + + if installed is not None: + + _query_params.append(('installed', installed)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/firmware-service/firmwares', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_patch_config_firmware_service( + self, + firmware_service_configuration: Annotated[FirmwareServiceConfiguration, Field(description="Firmware configuration payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Update firmware service configuration + + Updates firmware service configuration + + :param firmware_service_configuration: Firmware configuration payload (required) + :type firmware_service_configuration: FirmwareServiceConfiguration + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/cluster/firmware-service/config is deprecated.", DeprecationWarning) + + _param = self._v1_patch_config_firmware_service_serialize( + firmware_service_configuration=firmware_service_configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_patch_config_firmware_service_with_http_info( + self, + firmware_service_configuration: Annotated[FirmwareServiceConfiguration, Field(description="Firmware configuration payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Update firmware service configuration + + Updates firmware service configuration + + :param firmware_service_configuration: Firmware configuration payload (required) + :type firmware_service_configuration: FirmwareServiceConfiguration + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/cluster/firmware-service/config is deprecated.", DeprecationWarning) + + _param = self._v1_patch_config_firmware_service_serialize( + firmware_service_configuration=firmware_service_configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_patch_config_firmware_service_without_preload_content( + self, + firmware_service_configuration: Annotated[FirmwareServiceConfiguration, Field(description="Firmware configuration payload")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update firmware service configuration + + Updates firmware service configuration + + :param firmware_service_configuration: Firmware configuration payload (required) + :type firmware_service_configuration: FirmwareServiceConfiguration + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/cluster/firmware-service/config is deprecated.", DeprecationWarning) + + _param = self._v1_patch_config_firmware_service_serialize( + firmware_service_configuration=firmware_service_configuration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_patch_config_firmware_service_serialize( + self, + firmware_service_configuration, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if firmware_service_configuration is not None: + _body_params = firmware_service_configuration + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/cluster/firmware-service/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_upload_image_data( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Corellium Checksum of the uploaded firmware")] = None, + file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Optionally the actual file")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ImageV1: + """(Deprecated) Upload Image Data + + If the active project has enough remaining quota, updates an Image with the contents of the request body. + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param corellium_checksum: Corellium Checksum of the uploaded firmware + :type corellium_checksum: str + :param file: Optionally the actual file + :type file: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_upload_image_data_serialize( + image_id=image_id, + corellium_checksum=corellium_checksum, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '404': "ApiNotFoundErrorV1", + '409': "ApiConflictErrorV1", + '507': "InsufficientStorageErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_upload_image_data_with_http_info( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Corellium Checksum of the uploaded firmware")] = None, + file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Optionally the actual file")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ImageV1]: + """(Deprecated) Upload Image Data + + If the active project has enough remaining quota, updates an Image with the contents of the request body. + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param corellium_checksum: Corellium Checksum of the uploaded firmware + :type corellium_checksum: str + :param file: Optionally the actual file + :type file: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_upload_image_data_serialize( + image_id=image_id, + corellium_checksum=corellium_checksum, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '404': "ApiNotFoundErrorV1", + '409': "ApiConflictErrorV1", + '507': "InsufficientStorageErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_upload_image_data_without_preload_content( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Corellium Checksum of the uploaded firmware")] = None, + file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Optionally the actual file")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Upload Image Data + + If the active project has enough remaining quota, updates an Image with the contents of the request body. + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param corellium_checksum: Corellium Checksum of the uploaded firmware + :type corellium_checksum: str + :param file: Optionally the actual file + :type file: bytearray + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_upload_image_data_serialize( + image_id=image_id, + corellium_checksum=corellium_checksum, + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '404': "ApiNotFoundErrorV1", + '409': "ApiConflictErrorV1", + '507': "InsufficientStorageErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_upload_image_data_serialize( + self, + image_id, + corellium_checksum, + file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + # process the header parameters + # process the form parameters + if corellium_checksum is not None: + _form_params.append(('corelliumChecksum', corellium_checksum)) + if file is not None: + _files['file'] = file + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/images/{imageId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/cluster_administration_nodes_api.py b/corellium/api/cluster_administration_nodes_api.py new file mode 100644 index 0000000..19eaae2 --- /dev/null +++ b/corellium/api/cluster_administration_nodes_api.py @@ -0,0 +1,995 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import List, Optional, Union +from typing_extensions import Annotated +from corellium.models.node_information_v1 import NodeInformationV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ClusterAdministrationNodesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_get_cluster_nodes( + self, + node_id: Annotated[StrictStr, Field(description="Node ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NodeInformationV1: + """(Deprecated) Get node details by ID + + + :param node_id: Node ID (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes/{nodeId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_nodes_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeInformationV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_cluster_nodes_with_http_info( + self, + node_id: Annotated[StrictStr, Field(description="Node ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NodeInformationV1]: + """(Deprecated) Get node details by ID + + + :param node_id: Node ID (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes/{nodeId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_nodes_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeInformationV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_cluster_nodes_without_preload_content( + self, + node_id: Annotated[StrictStr, Field(description="Node ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get node details by ID + + + :param node_id: Node ID (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes/{nodeId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_nodes_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeInformationV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_cluster_nodes_serialize( + self, + node_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if node_id is not None: + _path_params['nodeId'] = node_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/nodes/{nodeId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_console_cluster_nodes( + self, + node_id: Annotated[StrictStr, Field(description="Node ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Access node console via SSH + + Access node console via SSH (WebSocket upgrade) + + :param node_id: Node ID (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes/{nodeId}/console is deprecated.", DeprecationWarning) + + _param = self._v1_get_console_cluster_nodes_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '101': "object", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_console_cluster_nodes_with_http_info( + self, + node_id: Annotated[StrictStr, Field(description="Node ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Access node console via SSH + + Access node console via SSH (WebSocket upgrade) + + :param node_id: Node ID (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes/{nodeId}/console is deprecated.", DeprecationWarning) + + _param = self._v1_get_console_cluster_nodes_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '101': "object", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_console_cluster_nodes_without_preload_content( + self, + node_id: Annotated[StrictStr, Field(description="Node ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Access node console via SSH + + Access node console via SSH (WebSocket upgrade) + + :param node_id: Node ID (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes/{nodeId}/console is deprecated.", DeprecationWarning) + + _param = self._v1_get_console_cluster_nodes_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '101': "object", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_console_cluster_nodes_serialize( + self, + node_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if node_id is not None: + _path_params['nodeId'] = node_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/nodes/{nodeId}/console', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_cluster_nodes( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 100")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[NodeInformationV1]: + """(Deprecated) List servers in the cluster + + + :param limit: limit for pagination results, defaults to 100 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes is deprecated.", DeprecationWarning) + + _param = self._v1_list_cluster_nodes_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[NodeInformationV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_cluster_nodes_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 100")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[NodeInformationV1]]: + """(Deprecated) List servers in the cluster + + + :param limit: limit for pagination results, defaults to 100 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes is deprecated.", DeprecationWarning) + + _param = self._v1_list_cluster_nodes_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[NodeInformationV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_cluster_nodes_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 100")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List servers in the cluster + + + :param limit: limit for pagination results, defaults to 100 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/nodes is deprecated.", DeprecationWarning) + + _param = self._v1_list_cluster_nodes_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[NodeInformationV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_cluster_nodes_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/nodes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/cluster_api.py b/corellium/api/cluster_api.py new file mode 100644 index 0000000..cc6b7fc --- /dev/null +++ b/corellium/api/cluster_api.py @@ -0,0 +1,2774 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from corellium.models.cluster_config import ClusterConfig +from corellium.models.cluster_snapshot import ClusterSnapshot +from corellium.models.cluster_snapshot_list import ClusterSnapshotList +from corellium.models.node_console_endpoint import NodeConsoleEndpoint +from corellium.models.node_information import NodeInformation +from corellium.models.node_list import NodeList +from corellium.models.patch_cluster_config_body import PatchClusterConfigBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ClusterApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_delete_cluster_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete cluster snapshot + + **Required role:** Cluster administrator. Deletes a snapshot from the cluster, for example to free storage. Snapshots that are in use, still being created, or were just restored cannot be deleted (400). Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). Deletes are idempotent: an unknown `snapshotId`, or a snapshot that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_cluster_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete cluster snapshot + + **Required role:** Cluster administrator. Deletes a snapshot from the cluster, for example to free storage. Snapshots that are in use, still being created, or were just restored cannot be deleted (400). Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). Deletes are idempotent: an unknown `snapshotId`, or a snapshot that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_cluster_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete cluster snapshot + + **Required role:** Cluster administrator. Deletes a snapshot from the cluster, for example to free storage. Snapshots that are in use, still being created, or were just restored cannot be deleted (400). Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). Deletes are idempotent: an unknown `snapshotId`, or a snapshot that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_cluster_snapshot_serialize( + self, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/cluster/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_cluster_config( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClusterConfig: + """Get cluster configuration + + **Required role:** Cluster administrator. Returns the settings that apply to the whole cluster. Requires a cluster administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterConfig", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_cluster_config_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClusterConfig]: + """Get cluster configuration + + **Required role:** Cluster administrator. Returns the settings that apply to the whole cluster. Requires a cluster administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterConfig", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_cluster_config_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get cluster configuration + + **Required role:** Cluster administrator. Returns the settings that apply to the whole cluster. Requires a cluster administrator. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterConfig", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_cluster_config_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_cluster_node( + self, + node_id: Annotated[StrictStr, Field(description="Node identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NodeInformation: + """Get cluster node + + **Required role:** Cluster administrator. Returns details for one server (node) in the cluster, identified by the ID from `v3ListClusterNodes`. Requires a cluster administrator. + + :param node_id: Node identifier. (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_node_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeInformation", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_cluster_node_with_http_info( + self, + node_id: Annotated[StrictStr, Field(description="Node identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NodeInformation]: + """Get cluster node + + **Required role:** Cluster administrator. Returns details for one server (node) in the cluster, identified by the ID from `v3ListClusterNodes`. Requires a cluster administrator. + + :param node_id: Node identifier. (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_node_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeInformation", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_cluster_node_without_preload_content( + self, + node_id: Annotated[StrictStr, Field(description="Node identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get cluster node + + **Required role:** Cluster administrator. Returns details for one server (node) in the cluster, identified by the ID from `v3ListClusterNodes`. Requires a cluster administrator. + + :param node_id: Node identifier. (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_node_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeInformation", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_cluster_node_serialize( + self, + node_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if node_id is not None: + _path_params['nodeId'] = node_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/nodes/{nodeId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_cluster_node_console( + self, + node_id: Annotated[StrictStr, Field(description="Node identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NodeConsoleEndpoint: + """Get node console websocket URL + + **Required role:** Cluster administrator. Returns a WebSocket URL for a terminal session on one cluster server (node), for maintenance and troubleshooting. Open the URL with a WebSocket client to get the console stream. Requires a cluster administrator. + + :param node_id: Node identifier. (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_node_console_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeConsoleEndpoint", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_cluster_node_console_with_http_info( + self, + node_id: Annotated[StrictStr, Field(description="Node identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NodeConsoleEndpoint]: + """Get node console websocket URL + + **Required role:** Cluster administrator. Returns a WebSocket URL for a terminal session on one cluster server (node), for maintenance and troubleshooting. Open the URL with a WebSocket client to get the console stream. Requires a cluster administrator. + + :param node_id: Node identifier. (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_node_console_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeConsoleEndpoint", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_cluster_node_console_without_preload_content( + self, + node_id: Annotated[StrictStr, Field(description="Node identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get node console websocket URL + + **Required role:** Cluster administrator. Returns a WebSocket URL for a terminal session on one cluster server (node), for maintenance and troubleshooting. Open the URL with a WebSocket client to get the console stream. Requires a cluster administrator. + + :param node_id: Node identifier. (required) + :type node_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_node_console_serialize( + node_id=node_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeConsoleEndpoint", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_cluster_node_console_serialize( + self, + node_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if node_id is not None: + _path_params['nodeId'] = node_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/nodes/{nodeId}/console', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_cluster_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClusterSnapshot: + """Get cluster snapshot + + **Required role:** Cluster administrator. Returns one snapshot from the cluster-wide list. Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshot", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_cluster_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClusterSnapshot]: + """Get cluster snapshot + + **Required role:** Cluster administrator. Returns one snapshot from the cluster-wide list. Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshot", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_cluster_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get cluster snapshot + + **Required role:** Cluster administrator. Returns one snapshot from the cluster-wide list. Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshot", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_cluster_snapshot_serialize( + self, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_cluster_nodes( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NodeList: + """List cluster nodes + + **Required role:** Cluster administrator. Lists the servers (nodes) that make up this Corellium cluster, with their status and resources. Use it to check cluster health or find a node before opening its console. Requires a cluster administrator. Results are paginated. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_nodes_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeList", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_cluster_nodes_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NodeList]: + """List cluster nodes + + **Required role:** Cluster administrator. Lists the servers (nodes) that make up this Corellium cluster, with their status and resources. Use it to check cluster health or find a node before opening its console. Requires a cluster administrator. Results are paginated. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_nodes_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeList", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_cluster_nodes_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List cluster nodes + + **Required role:** Cluster administrator. Lists the servers (nodes) that make up this Corellium cluster, with their status and resources. Use it to check cluster health or find a node before opening its console. Requires a cluster administrator. Results are paginated. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_nodes_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NodeList", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_cluster_nodes_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/nodes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_cluster_snapshots( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Number of entries to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of rows to skip.")] = None, + springboard: Annotated[Optional[StrictStr], Field(description="Filter by springboard snapshot flag.")] = None, + live: Annotated[Optional[StrictStr], Field(description="Filter by live snapshot flag.")] = None, + fresh: Annotated[Optional[StrictStr], Field(description="Filter by fresh snapshot flag.")] = None, + device_name: Annotated[Optional[StrictStr], Field(description="Filter by device name.")] = None, + task: Annotated[Optional[StrictStr], Field(description="Filter by task being executed on the snapshot.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Fuzzy search on snapshot and instance name or ID.")] = None, + to: Annotated[Optional[datetime], Field(description="Filter to this date (based on createdAt).")] = None, + var_from: Annotated[Optional[datetime], Field(description="Filter from this date (based on createdAt).")] = None, + order_by: Annotated[Optional[StrictStr], Field(description="Sort field and direction.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClusterSnapshotList: + """List cluster snapshots + + **Required role:** Cluster administrator. Lists device snapshots across the whole cluster, for administrators managing storage. Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). Results are paginated. For one device's snapshots, use `GET /v3/instances/{instanceId}/snapshots` instead. + + :param limit: Number of entries to return. + :type limit: float + :param offset: Number of rows to skip. + :type offset: float + :param springboard: Filter by springboard snapshot flag. + :type springboard: str + :param live: Filter by live snapshot flag. + :type live: str + :param fresh: Filter by fresh snapshot flag. + :type fresh: str + :param device_name: Filter by device name. + :type device_name: str + :param task: Filter by task being executed on the snapshot. + :type task: str + :param search: Fuzzy search on snapshot and instance name or ID. + :type search: str + :param to: Filter to this date (based on createdAt). + :type to: datetime + :param var_from: Filter from this date (based on createdAt). + :type var_from: datetime + :param order_by: Sort field and direction. + :type order_by: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_snapshots_serialize( + limit=limit, + offset=offset, + springboard=springboard, + live=live, + fresh=fresh, + device_name=device_name, + task=task, + search=search, + to=to, + var_from=var_from, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshotList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_cluster_snapshots_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Number of entries to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of rows to skip.")] = None, + springboard: Annotated[Optional[StrictStr], Field(description="Filter by springboard snapshot flag.")] = None, + live: Annotated[Optional[StrictStr], Field(description="Filter by live snapshot flag.")] = None, + fresh: Annotated[Optional[StrictStr], Field(description="Filter by fresh snapshot flag.")] = None, + device_name: Annotated[Optional[StrictStr], Field(description="Filter by device name.")] = None, + task: Annotated[Optional[StrictStr], Field(description="Filter by task being executed on the snapshot.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Fuzzy search on snapshot and instance name or ID.")] = None, + to: Annotated[Optional[datetime], Field(description="Filter to this date (based on createdAt).")] = None, + var_from: Annotated[Optional[datetime], Field(description="Filter from this date (based on createdAt).")] = None, + order_by: Annotated[Optional[StrictStr], Field(description="Sort field and direction.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClusterSnapshotList]: + """List cluster snapshots + + **Required role:** Cluster administrator. Lists device snapshots across the whole cluster, for administrators managing storage. Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). Results are paginated. For one device's snapshots, use `GET /v3/instances/{instanceId}/snapshots` instead. + + :param limit: Number of entries to return. + :type limit: float + :param offset: Number of rows to skip. + :type offset: float + :param springboard: Filter by springboard snapshot flag. + :type springboard: str + :param live: Filter by live snapshot flag. + :type live: str + :param fresh: Filter by fresh snapshot flag. + :type fresh: str + :param device_name: Filter by device name. + :type device_name: str + :param task: Filter by task being executed on the snapshot. + :type task: str + :param search: Fuzzy search on snapshot and instance name or ID. + :type search: str + :param to: Filter to this date (based on createdAt). + :type to: datetime + :param var_from: Filter from this date (based on createdAt). + :type var_from: datetime + :param order_by: Sort field and direction. + :type order_by: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_snapshots_serialize( + limit=limit, + offset=offset, + springboard=springboard, + live=live, + fresh=fresh, + device_name=device_name, + task=task, + search=search, + to=to, + var_from=var_from, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshotList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_cluster_snapshots_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Number of entries to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of rows to skip.")] = None, + springboard: Annotated[Optional[StrictStr], Field(description="Filter by springboard snapshot flag.")] = None, + live: Annotated[Optional[StrictStr], Field(description="Filter by live snapshot flag.")] = None, + fresh: Annotated[Optional[StrictStr], Field(description="Filter by fresh snapshot flag.")] = None, + device_name: Annotated[Optional[StrictStr], Field(description="Filter by device name.")] = None, + task: Annotated[Optional[StrictStr], Field(description="Filter by task being executed on the snapshot.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Fuzzy search on snapshot and instance name or ID.")] = None, + to: Annotated[Optional[datetime], Field(description="Filter to this date (based on createdAt).")] = None, + var_from: Annotated[Optional[datetime], Field(description="Filter from this date (based on createdAt).")] = None, + order_by: Annotated[Optional[StrictStr], Field(description="Sort field and direction.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List cluster snapshots + + **Required role:** Cluster administrator. Lists device snapshots across the whole cluster, for administrators managing storage. Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). Results are paginated. For one device's snapshots, use `GET /v3/instances/{instanceId}/snapshots` instead. + + :param limit: Number of entries to return. + :type limit: float + :param offset: Number of rows to skip. + :type offset: float + :param springboard: Filter by springboard snapshot flag. + :type springboard: str + :param live: Filter by live snapshot flag. + :type live: str + :param fresh: Filter by fresh snapshot flag. + :type fresh: str + :param device_name: Filter by device name. + :type device_name: str + :param task: Filter by task being executed on the snapshot. + :type task: str + :param search: Fuzzy search on snapshot and instance name or ID. + :type search: str + :param to: Filter to this date (based on createdAt). + :type to: datetime + :param var_from: Filter from this date (based on createdAt). + :type var_from: datetime + :param order_by: Sort field and direction. + :type order_by: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_snapshots_serialize( + limit=limit, + offset=offset, + springboard=springboard, + live=live, + fresh=fresh, + device_name=device_name, + task=task, + search=search, + to=to, + var_from=var_from, + order_by=order_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshotList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_cluster_snapshots_serialize( + self, + limit, + offset, + springboard, + live, + fresh, + device_name, + task, + search, + to, + var_from, + order_by, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if springboard is not None: + + _query_params.append(('springboard', springboard)) + + if live is not None: + + _query_params.append(('live', live)) + + if fresh is not None: + + _query_params.append(('fresh', fresh)) + + if device_name is not None: + + _query_params.append(('deviceName', device_name)) + + if task is not None: + + _query_params.append(('task', task)) + + if search is not None: + + _query_params.append(('search', search)) + + if to is not None: + if isinstance(to, datetime): + _query_params.append( + ( + 'to', + to.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('to', to)) + + if var_from is not None: + if isinstance(var_from, datetime): + _query_params.append( + ( + 'from', + var_from.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('from', var_from)) + + if order_by is not None: + + _query_params.append(('orderBy', order_by)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_cluster_config( + self, + patch_cluster_config_body: Optional[PatchClusterConfigBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Update cluster configuration + + **Required role:** Cluster administrator. Changes cluster-wide settings and applies them on every controller node. Send only the settings you want to change. Requires a cluster administrator. + + :param patch_cluster_config_body: + :type patch_cluster_config_body: PatchClusterConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_cluster_config_serialize( + patch_cluster_config_body=patch_cluster_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ClusterConfigUpdateError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_cluster_config_with_http_info( + self, + patch_cluster_config_body: Optional[PatchClusterConfigBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Update cluster configuration + + **Required role:** Cluster administrator. Changes cluster-wide settings and applies them on every controller node. Send only the settings you want to change. Requires a cluster administrator. + + :param patch_cluster_config_body: + :type patch_cluster_config_body: PatchClusterConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_cluster_config_serialize( + patch_cluster_config_body=patch_cluster_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ClusterConfigUpdateError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_cluster_config_without_preload_content( + self, + patch_cluster_config_body: Optional[PatchClusterConfigBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update cluster configuration + + **Required role:** Cluster administrator. Changes cluster-wide settings and applies them on every controller node. Send only the settings you want to change. Requires a cluster administrator. + + :param patch_cluster_config_body: + :type patch_cluster_config_body: PatchClusterConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_cluster_config_serialize( + patch_cluster_config_body=patch_cluster_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ClusterConfigUpdateError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_cluster_config_serialize( + self, + patch_cluster_config_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_cluster_config_body is not None: + _body_params = patch_cluster_config_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/cluster/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/cluster_snapshots_api.py b/corellium/api/cluster_snapshots_api.py new file mode 100644 index 0000000..d8b3d9c --- /dev/null +++ b/corellium/api/cluster_snapshots_api.py @@ -0,0 +1,980 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from corellium.models.cluster_snapshot_v1 import ClusterSnapshotV1 +from corellium.models.snapshot_list import SnapshotList +from corellium.models.snapshot_request import SnapshotRequest + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ClusterSnapshotsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_delete_cluster_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete a Cluster Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_cluster_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete a Cluster Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_cluster_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete a Cluster Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/cluster/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_cluster_snapshot_serialize( + self, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/cluster/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_cluster_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClusterSnapshotV1: + """(Deprecated) Get Cluster Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_cluster_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClusterSnapshotV1]: + """(Deprecated) Get Cluster Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_cluster_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Cluster Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClusterSnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_cluster_snapshot_serialize( + self, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_cluster_snapshots( + self, + request: Optional[SnapshotRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotList: + """(Deprecated) Get Cluster Snapshots + + + :param request: + :type request: SnapshotRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_snapshots_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_cluster_snapshots_with_http_info( + self, + request: Optional[SnapshotRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotList]: + """(Deprecated) Get Cluster Snapshots + + + :param request: + :type request: SnapshotRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_snapshots_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_cluster_snapshots_without_preload_content( + self, + request: Optional[SnapshotRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Cluster Snapshots + + + :param request: + :type request: SnapshotRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_get_cluster_snapshots_serialize( + request=request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotList", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_cluster_snapshots_serialize( + self, + request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if request is not None: + + _query_params.append(('request', request)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/config_api.py b/corellium/api/config_api.py new file mode 100644 index 0000000..37ddfd0 --- /dev/null +++ b/corellium/api/config_api.py @@ -0,0 +1,622 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from corellium.models.config_response import ConfigResponse +from corellium.models.deployment_version import DeploymentVersion + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ConfigApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_get_config( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConfigResponse: + """Get deployment configuration + + Returns how this Corellium deployment is set up: its version, whether it is on-site or cloud, whether it is air-gapped, the sign-in providers offered, limits such as the per-device snapshot limit (`snapshotLimit`) and the maximum kernel and ramdisk upload sizes, and which optional features are turned on. Needs no sign-in, so a client can call it first to adapt to the deployment before the user signs in. Build-time feature flags may add further boolean properties beyond those listed. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConfigResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_config_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConfigResponse]: + """Get deployment configuration + + Returns how this Corellium deployment is set up: its version, whether it is on-site or cloud, whether it is air-gapped, the sign-in providers offered, limits such as the per-device snapshot limit (`snapshotLimit`) and the maximum kernel and ramdisk upload sizes, and which optional features are turned on. Needs no sign-in, so a client can call it first to adapt to the deployment before the user signs in. Build-time feature flags may add further boolean properties beyond those listed. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConfigResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_config_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get deployment configuration + + Returns how this Corellium deployment is set up: its version, whether it is on-site or cloud, whether it is air-gapped, the sign-in providers offered, limits such as the per-device snapshot limit (`snapshotLimit`) and the maximum kernel and ramdisk upload sizes, and which optional features are turned on. Needs no sign-in, so a client can call it first to adapt to the deployment before the user signs in. Build-time feature flags may add further boolean properties beyond those listed. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConfigResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_config_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_version( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DeploymentVersion: + """Get the platform version + + Returns which version of the Corellium platform you are talking to: the product version (for example `7.4.0-28212`), plus the build it came from. Include it when reporting a problem to support, or check it to see whether a feature you need is available on this deployment. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentVersion", + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_version_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DeploymentVersion]: + """Get the platform version + + Returns which version of the Corellium platform you are talking to: the product version (for example `7.4.0-28212`), plus the build it came from. Include it when reporting a problem to support, or check it to see whether a feature you need is available on this deployment. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentVersion", + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_version_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the platform version + + Returns which version of the Corellium platform you are talking to: the product version (for example `7.4.0-28212`), plus the build it came from. Include it when reporting a problem to support, or check it to see whether a feature you need is available on this deployment. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentVersion", + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_version_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/version', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/config_v1_api.py b/corellium/api/config_v1_api.py new file mode 100644 index 0000000..e235208 --- /dev/null +++ b/corellium/api/config_v1_api.py @@ -0,0 +1,327 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from corellium.models.config_response_v1 import ConfigResponseV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ConfigV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_get_config( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ConfigResponseV1: + """(Deprecated) Get all configs + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConfigResponseV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_config_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ConfigResponseV1]: + """(Deprecated) Get all configs + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConfigResponseV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_config_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get all configs + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/config is deprecated.", DeprecationWarning) + + _param = self._v1_get_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ConfigResponseV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_config_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/core_trace_api.py b/corellium/api/core_trace_api.py new file mode 100644 index 0000000..bcad5f1 --- /dev/null +++ b/corellium/api/core_trace_api.py @@ -0,0 +1,1613 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.kernel_task import KernelTask +from corellium.models.token import Token + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class CoreTraceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_clear_core_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Clear CoreTrace output + + Deletes the CoreTrace (system call trace) output recorded so far on this device, so the next download contains only new activity. Tracing keeps running if it is on. Requires the CoreTrace license feature (403 otherwise). An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_clear_core_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Clear CoreTrace output + + Deletes the CoreTrace (system call trace) output recorded so far on this device, so the next download contains only new activity. Tracing keeps running if it is on. Requires the CoreTrace license feature (403 otherwise). An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_clear_core_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Clear CoreTrace output + + Deletes the CoreTrace (system call trace) output recorded so far on this device, so the next download contains only new activity. Tracing keeps running if it is on. Requires the CoreTrace license feature (403 otherwise). An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_clear_core_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}/strace', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_threads( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[KernelTask]: + """List running processes (CoreTrace) + + Lists the processes running on the device with their threads, including each process's `processId` and name and each thread's `taskId`. Use it to pick which processes to trace with CoreTrace (set `straceFilter` on `v3PatchInstance`). The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_threads_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KernelTask]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_threads_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[KernelTask]]: + """List running processes (CoreTrace) + + Lists the processes running on the device with their threads, including each process's `processId` and name and each thread's `taskId`. Use it to pick which processes to trace with CoreTrace (set `straceFilter` on `v3PatchInstance`). The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_threads_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KernelTask]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_threads_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List running processes (CoreTrace) + + Lists the processes running on the device with their threads, including each process's `processId` and name and each thread's `taskId`. Use it to pick which processes to trace with CoreTrace (set `straceFilter` on `v3PatchInstance`). The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_threads_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KernelTask]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_threads_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/strace/thread-list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_core_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start CoreTrace + + Starts CoreTrace on a running device. CoreTrace records the system calls made by processes on the device, so you can see what an app does at the operating-system level (files opened, network connections, processes started). **Workflow:** 1. `v3StartCoreTrace` (this call). 2. Use the device or app you want to observe. Optionally list running processes with `v3ListThreads`, and limit tracing to some of them with `straceFilter` on `v3PatchInstance`. 3. `v3StopCoreTrace`. 4. `v3StracePreauthorize` to get a download token, then download the trace. 5. `v3ClearCoreTrace` to discard it before the next run. Returns 400 if this device does not support CoreTrace, and 403 if your license does not include it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_core_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start CoreTrace + + Starts CoreTrace on a running device. CoreTrace records the system calls made by processes on the device, so you can see what an app does at the operating-system level (files opened, network connections, processes started). **Workflow:** 1. `v3StartCoreTrace` (this call). 2. Use the device or app you want to observe. Optionally list running processes with `v3ListThreads`, and limit tracing to some of them with `straceFilter` on `v3PatchInstance`. 3. `v3StopCoreTrace`. 4. `v3StracePreauthorize` to get a download token, then download the trace. 5. `v3ClearCoreTrace` to discard it before the next run. Returns 400 if this device does not support CoreTrace, and 403 if your license does not include it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_core_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start CoreTrace + + Starts CoreTrace on a running device. CoreTrace records the system calls made by processes on the device, so you can see what an app does at the operating-system level (files opened, network connections, processes started). **Workflow:** 1. `v3StartCoreTrace` (this call). 2. Use the device or app you want to observe. Optionally list running processes with `v3ListThreads`, and limit tracing to some of them with `straceFilter` on `v3PatchInstance`. 3. `v3StopCoreTrace`. 4. `v3StracePreauthorize` to get a download token, then download the trace. 5. `v3ClearCoreTrace` to discard it before the next run. Returns 400 if this device does not support CoreTrace, and 403 if your license does not include it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_core_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/strace/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_stop_core_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop CoreTrace + + Stops CoreTrace on this device. The trace recorded so far is kept, so you can download it with `v3StracePreauthorize`. Requires the CoreTrace license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_stop_core_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop CoreTrace + + Stops CoreTrace on this device. The trace recorded so far is kept, so you can download it with `v3StracePreauthorize`. Requires the CoreTrace license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_stop_core_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop CoreTrace + + Stops CoreTrace on this device. The trace recorded so far is kept, so you can download it with `v3StracePreauthorize`. Requires the CoreTrace license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_stop_core_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/strace/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_strace_preauthorize( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Token: + """Get a CoreTrace download token + + Returns a short-lived token that authorizes downloading this device's CoreTrace output without an `Authorization` header. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's trace and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_strace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_strace_preauthorize_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Token]: + """Get a CoreTrace download token + + Returns a short-lived token that authorizes downloading this device's CoreTrace output without an `Authorization` header. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's trace and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_strace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_strace_preauthorize_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a CoreTrace download token + + Returns a short-lived token that authorizes downloading this device's CoreTrace output without an `Authorization` header. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's trace and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_strace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_strace_preauthorize_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/strace-authorize', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/core_trace_v1_api.py b/corellium/api/core_trace_v1_api.py new file mode 100644 index 0000000..e1a2d95 --- /dev/null +++ b/corellium/api/core_trace_v1_api.py @@ -0,0 +1,1285 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.kernel_task_v1 import KernelTaskV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class CoreTraceV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_clear_core_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Clear CoreTrace logs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/strace is deprecated.", DeprecationWarning) + + _param = self._v1_clear_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_clear_core_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Clear CoreTrace logs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/strace is deprecated.", DeprecationWarning) + + _param = self._v1_clear_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_clear_core_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Clear CoreTrace logs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/strace is deprecated.", DeprecationWarning) + + _param = self._v1_clear_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_clear_core_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}/strace', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_threads( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[KernelTaskV1]: + """(Deprecated) Get Running Threads (CoreTrace) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/strace/thread-list is deprecated.", DeprecationWarning) + + _param = self._v1_list_threads_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KernelTaskV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_threads_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[KernelTaskV1]]: + """(Deprecated) Get Running Threads (CoreTrace) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/strace/thread-list is deprecated.", DeprecationWarning) + + _param = self._v1_list_threads_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KernelTaskV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_threads_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Running Threads (CoreTrace) + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/strace/thread-list is deprecated.", DeprecationWarning) + + _param = self._v1_list_threads_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KernelTaskV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_threads_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/strace/thread-list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_start_core_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Start CoreTrace on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/strace/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_start_core_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Start CoreTrace on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/strace/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_start_core_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start CoreTrace on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/strace/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_start_core_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/strace/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_stop_core_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Stop CoreTrace on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/strace/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_stop_core_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Stop CoreTrace on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/strace/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_stop_core_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Stop CoreTrace on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/strace/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_core_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_stop_core_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/strace/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/domain_api.py b/corellium/api/domain_api.py new file mode 100644 index 0000000..3d2cb5c --- /dev/null +++ b/corellium/api/domain_api.py @@ -0,0 +1,2571 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from typing import Any, Dict, Optional, Tuple, Union +from typing_extensions import Annotated +from corellium.models.domain_software_list import DomainSoftwareList +from corellium.models.domain_welcome_message_response import DomainWelcomeMessageResponse +from corellium.models.patch_domain_welcome_message_body import PatchDomainWelcomeMessageBody +from corellium.models.set_domain_welcome_message_body import SetDomainWelcomeMessageBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class DomainApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_domain_welcome_message( + self, + set_domain_welcome_message_body: SetDomainWelcomeMessageBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainWelcomeMessageResponse: + """Create a welcome message for a domain + + **Required role:** Domain administrator. Creates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param set_domain_welcome_message_body: (required) + :type set_domain_welcome_message_body: SetDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_domain_welcome_message_serialize( + set_domain_welcome_message_body=set_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_domain_welcome_message_with_http_info( + self, + set_domain_welcome_message_body: SetDomainWelcomeMessageBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainWelcomeMessageResponse]: + """Create a welcome message for a domain + + **Required role:** Domain administrator. Creates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param set_domain_welcome_message_body: (required) + :type set_domain_welcome_message_body: SetDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_domain_welcome_message_serialize( + set_domain_welcome_message_body=set_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_domain_welcome_message_without_preload_content( + self, + set_domain_welcome_message_body: SetDomainWelcomeMessageBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a welcome message for a domain + + **Required role:** Domain administrator. Creates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param set_domain_welcome_message_body: (required) + :type set_domain_welcome_message_body: SetDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_domain_welcome_message_serialize( + set_domain_welcome_message_body=set_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_domain_welcome_message_serialize( + self, + set_domain_welcome_message_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_domain_welcome_message_body is not None: + _body_params = set_domain_welcome_message_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/domain/welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_domain_welcome_message( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete the welcome message for the authenticated user's domain + + **Required role:** Domain administrator. Delete the welcome message for the authenticated user's domain. Deletes are idempotent: a domain with no welcome message is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_domain_welcome_message_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete the welcome message for the authenticated user's domain + + **Required role:** Domain administrator. Delete the welcome message for the authenticated user's domain. Deletes are idempotent: a domain with no welcome message is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_domain_welcome_message_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete the welcome message for the authenticated user's domain + + **Required role:** Domain administrator. Delete the welcome message for the authenticated user's domain. Deletes are idempotent: a domain with no welcome message is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_domain_welcome_message_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/domain/welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_domain_image_upload( + self, + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Get image upload status + + **Required role:** Domain administrator on on-site deployments; cloud administrator on cloud deployments. Checks the progress of a chunked upload made with `v3PutDomainImageUpload`, or downloads the finished file. With chunk parameters (`resumableChunkNumber` and friends) it returns 200 if that chunk is already stored and 204 if it still needs to be sent; without them it downloads the image file. + + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_domain_image_upload_serialize( + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_domain_image_upload_with_http_info( + self, + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Get image upload status + + **Required role:** Domain administrator on on-site deployments; cloud administrator on cloud deployments. Checks the progress of a chunked upload made with `v3PutDomainImageUpload`, or downloads the finished file. With chunk parameters (`resumableChunkNumber` and friends) it returns 200 if that chunk is already stored and 204 if it still needs to be sent; without them it downloads the image file. + + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_domain_image_upload_serialize( + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_domain_image_upload_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get image upload status + + **Required role:** Domain administrator on on-site deployments; cloud administrator on cloud deployments. Checks the progress of a chunked upload made with `v3PutDomainImageUpload`, or downloads the finished file. With chunk parameters (`resumableChunkNumber` and friends) it returns 200 if that chunk is already stored and 204 if it still needs to be sent; without them it downloads the image file. + + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_domain_image_upload_serialize( + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_domain_image_upload_serialize( + self, + type, + image_id, + name, + resumable_chunk_number, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if type is not None: + _path_params['type'] = type + if image_id is not None: + _path_params['imageId'] = image_id + if name is not None: + _path_params['name'] = name + # process the query parameters + if resumable_chunk_number is not None: + + _query_params.append(('resumableChunkNumber', resumable_chunk_number)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/domain/image-upload/{type}/{imageId}/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_domain_welcome_message( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainWelcomeMessageResponse: + """Get the welcome message for the authenticated user's domain + + Retrieves the welcome message for the domain. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_domain_welcome_message_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainWelcomeMessageResponse]: + """Get the welcome message for the authenticated user's domain + + Retrieves the welcome message for the domain. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_domain_welcome_message_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the welcome message for the authenticated user's domain + + Retrieves the welcome message for the domain. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_domain_welcome_message_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/domain/welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_domain_software( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainSoftwareList: + """List domain-level firmware images + + **Required role:** Domain administrator. Lists the firmware images uploaded at domain level (not in a project or instance), one entry per device model. Requires a domain administrator. Use it to find the `imageId` of a domain firmware upload, for example to delete it with `DELETE /v3/images/{imageId}`. These images also appear in `GET /v3/models/{model}/software` for the matching model. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_domain_software_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainSoftwareList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_domain_software_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainSoftwareList]: + """List domain-level firmware images + + **Required role:** Domain administrator. Lists the firmware images uploaded at domain level (not in a project or instance), one entry per device model. Requires a domain administrator. Use it to find the `imageId` of a domain firmware upload, for example to delete it with `DELETE /v3/images/{imageId}`. These images also appear in `GET /v3/models/{model}/software` for the matching model. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_domain_software_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainSoftwareList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_domain_software_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List domain-level firmware images + + **Required role:** Domain administrator. Lists the firmware images uploaded at domain level (not in a project or instance), one entry per device model. Requires a domain administrator. Use it to find the `imageId` of a domain firmware upload, for example to delete it with `DELETE /v3/images/{imageId}`. These images also appear in `GET /v3/models/{model}/software` for the matching model. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_domain_software_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainSoftwareList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_domain_software_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/domain/software', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_domain_welcome_message( + self, + patch_domain_welcome_message_body: Optional[PatchDomainWelcomeMessageBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainWelcomeMessageResponse: + """Update a welcome message for a domain + + **Required role:** Domain administrator. Updates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param patch_domain_welcome_message_body: + :type patch_domain_welcome_message_body: PatchDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_domain_welcome_message_serialize( + patch_domain_welcome_message_body=patch_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_domain_welcome_message_with_http_info( + self, + patch_domain_welcome_message_body: Optional[PatchDomainWelcomeMessageBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainWelcomeMessageResponse]: + """Update a welcome message for a domain + + **Required role:** Domain administrator. Updates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param patch_domain_welcome_message_body: + :type patch_domain_welcome_message_body: PatchDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_domain_welcome_message_serialize( + patch_domain_welcome_message_body=patch_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_domain_welcome_message_without_preload_content( + self, + patch_domain_welcome_message_body: Optional[PatchDomainWelcomeMessageBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a welcome message for a domain + + **Required role:** Domain administrator. Updates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param patch_domain_welcome_message_body: + :type patch_domain_welcome_message_body: PatchDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_domain_welcome_message_serialize( + patch_domain_welcome_message_body=patch_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_domain_welcome_message_serialize( + self, + patch_domain_welcome_message_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_domain_welcome_message_body is not None: + _body_params = patch_domain_welcome_message_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/domain/welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_put_domain_image_upload( + self, + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, Optional[object]]: + """Upload image chunk + + **Required role:** Domain administrator on on-site deployments; cloud administrator on cloud deployments. Uploads one chunk of a file as a domain-level image: one that belongs to no project or instance and is available across your domain. Requires a domain administrator (on-site) or cloud administrator. Works like `v3PutProjectImageUpload`: you choose the image ID (a new random UUID), the record is created on the first chunk, and `type` and `name` in the path set the image type and name. A domain-level `fw` image is offered as a choice when anyone in the domain creates a device of the matching model, without an install step. The result is the same as `POST /v3/images` with no `projectId` or `instanceId` followed by `PUT /v3/images/{imageId}/file`, which applies the same administrator rule to chunk uploads. + + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_domain_image_upload_serialize( + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_put_domain_image_upload_with_http_info( + self, + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, Optional[object]]]: + """Upload image chunk + + **Required role:** Domain administrator on on-site deployments; cloud administrator on cloud deployments. Uploads one chunk of a file as a domain-level image: one that belongs to no project or instance and is available across your domain. Requires a domain administrator (on-site) or cloud administrator. Works like `v3PutProjectImageUpload`: you choose the image ID (a new random UUID), the record is created on the first chunk, and `type` and `name` in the path set the image type and name. A domain-level `fw` image is offered as a choice when anyone in the domain creates a device of the matching model, without an install step. The result is the same as `POST /v3/images` with no `projectId` or `instanceId` followed by `PUT /v3/images/{imageId}/file`, which applies the same administrator rule to chunk uploads. + + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_domain_image_upload_serialize( + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_put_domain_image_upload_without_preload_content( + self, + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload image chunk + + **Required role:** Domain administrator on on-site deployments; cloud administrator on cloud deployments. Uploads one chunk of a file as a domain-level image: one that belongs to no project or instance and is available across your domain. Requires a domain administrator (on-site) or cloud administrator. Works like `v3PutProjectImageUpload`: you choose the image ID (a new random UUID), the record is created on the first chunk, and `type` and `name` in the path set the image type and name. A domain-level `fw` image is offered as a choice when anyone in the domain creates a device of the matching model, without an install step. The result is the same as `POST /v3/images` with no `projectId` or `instanceId` followed by `PUT /v3/images/{imageId}/file`, which applies the same administrator rule to chunk uploads. + + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_domain_image_upload_serialize( + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_put_domain_image_upload_serialize( + self, + type, + image_id, + name, + body, + resumable_chunk_number, + resumable_chunk_size, + resumable_current_chunk_size, + resumable_total_size, + resumable_total_chunks, + corellium_checksum, + flavor, + x_corellium_image_encoding, + x_corellium_image_encapsulated, + x_corellium_total_file_size, + x_corellium_image_password, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if type is not None: + _path_params['type'] = type + if image_id is not None: + _path_params['imageId'] = image_id + if name is not None: + _path_params['name'] = name + # process the query parameters + if resumable_chunk_number is not None: + + _query_params.append(('resumableChunkNumber', resumable_chunk_number)) + + if resumable_chunk_size is not None: + + _query_params.append(('resumableChunkSize', resumable_chunk_size)) + + if resumable_current_chunk_size is not None: + + _query_params.append(('resumableCurrentChunkSize', resumable_current_chunk_size)) + + if resumable_total_size is not None: + + _query_params.append(('resumableTotalSize', resumable_total_size)) + + if resumable_total_chunks is not None: + + _query_params.append(('resumableTotalChunks', resumable_total_chunks)) + + if corellium_checksum is not None: + + _query_params.append(('corelliumChecksum', corellium_checksum)) + + if flavor is not None: + + _query_params.append(('flavor', flavor)) + + # process the header parameters + if x_corellium_image_encoding is not None: + _header_params['x-corellium-image-encoding'] = x_corellium_image_encoding + if x_corellium_image_encapsulated is not None: + _header_params['x-corellium-image-encapsulated'] = x_corellium_image_encapsulated + if x_corellium_total_file_size is not None: + _header_params['x-corellium-total-file-size'] = x_corellium_total_file_size + if x_corellium_image_password is not None: + _header_params['x-corellium-image-password'] = x_corellium_image_password + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/domain/image-upload/{type}/{imageId}/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/domain_auth_provider_api.py b/corellium/api/domain_auth_provider_api.py new file mode 100644 index 0000000..bad5931 --- /dev/null +++ b/corellium/api/domain_auth_provider_api.py @@ -0,0 +1,1363 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.domain_auth_provider_request import DomainAuthProviderRequest +from corellium.models.domain_auth_provider_response_v1 import DomainAuthProviderResponseV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class DomainAuthProviderApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_create_domain_auth_provider( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + domain_auth_provider_request: Annotated[DomainAuthProviderRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainAuthProviderResponseV1: + """(Deprecated) Create a new auth provider for a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param domain_auth_provider_request: Request Data (required) + :type domain_auth_provider_request: DomainAuthProviderRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/domain/{domainId}/auth is deprecated.", DeprecationWarning) + + _param = self._v1_create_domain_auth_provider_serialize( + domain_id=domain_id, + domain_auth_provider_request=domain_auth_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponseV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_domain_auth_provider_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + domain_auth_provider_request: Annotated[DomainAuthProviderRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainAuthProviderResponseV1]: + """(Deprecated) Create a new auth provider for a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param domain_auth_provider_request: Request Data (required) + :type domain_auth_provider_request: DomainAuthProviderRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/domain/{domainId}/auth is deprecated.", DeprecationWarning) + + _param = self._v1_create_domain_auth_provider_serialize( + domain_id=domain_id, + domain_auth_provider_request=domain_auth_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponseV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_domain_auth_provider_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + domain_auth_provider_request: Annotated[DomainAuthProviderRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create a new auth provider for a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param domain_auth_provider_request: Request Data (required) + :type domain_auth_provider_request: DomainAuthProviderRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/domain/{domainId}/auth is deprecated.", DeprecationWarning) + + _param = self._v1_create_domain_auth_provider_serialize( + domain_id=domain_id, + domain_auth_provider_request=domain_auth_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponseV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_domain_auth_provider_serialize( + self, + domain_id, + domain_auth_provider_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if domain_auth_provider_request is not None: + _body_params = domain_auth_provider_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domain/{domainId}/auth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_domain_auth_provider( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + provider_id: Annotated[StrictStr, Field(description="Provider ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete an auth provider from a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param provider_id: Provider ID - uuid (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/domain/{domainId}/auth/{providerId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_domain_auth_provider_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + provider_id: Annotated[StrictStr, Field(description="Provider ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete an auth provider from a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param provider_id: Provider ID - uuid (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/domain/{domainId}/auth/{providerId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_domain_auth_provider_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + provider_id: Annotated[StrictStr, Field(description="Provider ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete an auth provider from a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param provider_id: Provider ID - uuid (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/domain/{domainId}/auth/{providerId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_domain_auth_provider_serialize( + self, + domain_id, + provider_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/domain/{domainId}/auth/{providerId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_domain_auth_providers( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[DomainAuthProviderResponseV1]: + """(Deprecated) Return all configured auth providers for a domain (including globally configured providers) + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/domain/{domainId}/auth is deprecated.", DeprecationWarning) + + _param = self._v1_get_domain_auth_providers_serialize( + domain_id=domain_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DomainAuthProviderResponseV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_domain_auth_providers_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[DomainAuthProviderResponseV1]]: + """(Deprecated) Return all configured auth providers for a domain (including globally configured providers) + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/domain/{domainId}/auth is deprecated.", DeprecationWarning) + + _param = self._v1_get_domain_auth_providers_serialize( + domain_id=domain_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DomainAuthProviderResponseV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_domain_auth_providers_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Return all configured auth providers for a domain (including globally configured providers) + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/domain/{domainId}/auth is deprecated.", DeprecationWarning) + + _param = self._v1_get_domain_auth_providers_serialize( + domain_id=domain_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[DomainAuthProviderResponseV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_domain_auth_providers_serialize( + self, + domain_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/domain/{domainId}/auth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_domain_auth_provider( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + provider_id: Annotated[StrictStr, Field(description="Provider ID - uuid")], + domain_auth_provider_request: Annotated[DomainAuthProviderRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainAuthProviderResponseV1: + """(Deprecated) Update an auth provider for a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param provider_id: Provider ID - uuid (required) + :type provider_id: str + :param domain_auth_provider_request: Request Data (required) + :type domain_auth_provider_request: DomainAuthProviderRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/domain/{domainId}/auth/{providerId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + domain_auth_provider_request=domain_auth_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponseV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_domain_auth_provider_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + provider_id: Annotated[StrictStr, Field(description="Provider ID - uuid")], + domain_auth_provider_request: Annotated[DomainAuthProviderRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainAuthProviderResponseV1]: + """(Deprecated) Update an auth provider for a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param provider_id: Provider ID - uuid (required) + :type provider_id: str + :param domain_auth_provider_request: Request Data (required) + :type domain_auth_provider_request: DomainAuthProviderRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/domain/{domainId}/auth/{providerId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + domain_auth_provider_request=domain_auth_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponseV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_domain_auth_provider_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain ID - uuid")], + provider_id: Annotated[StrictStr, Field(description="Provider ID - uuid")], + domain_auth_provider_request: Annotated[DomainAuthProviderRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update an auth provider for a domain + + + :param domain_id: Domain ID - uuid (required) + :type domain_id: str + :param provider_id: Provider ID - uuid (required) + :type provider_id: str + :param domain_auth_provider_request: Request Data (required) + :type domain_auth_provider_request: DomainAuthProviderRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/domain/{domainId}/auth/{providerId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + domain_auth_provider_request=domain_auth_provider_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponseV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_domain_auth_provider_serialize( + self, + domain_id, + provider_id, + domain_auth_provider_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if domain_auth_provider_request is not None: + _body_params = domain_auth_provider_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/domain/{domainId}/auth/{providerId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/domain_auth_providers_api.py b/corellium/api/domain_auth_providers_api.py new file mode 100644 index 0000000..20084b5 --- /dev/null +++ b/corellium/api/domain_auth_providers_api.py @@ -0,0 +1,1764 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from corellium.models.create_domain_auth_provider_body import CreateDomainAuthProviderBody +from corellium.models.create_domain_auth_provider_response import CreateDomainAuthProviderResponse +from corellium.models.domain_auth_provider_response import DomainAuthProviderResponse +from corellium.models.domain_auth_providers_list import DomainAuthProvidersList +from corellium.models.patch_domain_auth_provider_body import PatchDomainAuthProviderBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class DomainAuthProvidersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_domain_auth_provider( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + create_domain_auth_provider_body: CreateDomainAuthProviderBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateDomainAuthProviderResponse: + """Create a new auth provider for a domain + + **Required role:** Domain administrator. Create a new auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param create_domain_auth_provider_body: (required) + :type create_domain_auth_provider_body: CreateDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_domain_auth_provider_serialize( + domain_id=domain_id, + create_domain_auth_provider_body=create_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateDomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_domain_auth_provider_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + create_domain_auth_provider_body: CreateDomainAuthProviderBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateDomainAuthProviderResponse]: + """Create a new auth provider for a domain + + **Required role:** Domain administrator. Create a new auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param create_domain_auth_provider_body: (required) + :type create_domain_auth_provider_body: CreateDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_domain_auth_provider_serialize( + domain_id=domain_id, + create_domain_auth_provider_body=create_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateDomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_domain_auth_provider_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + create_domain_auth_provider_body: CreateDomainAuthProviderBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new auth provider for a domain + + **Required role:** Domain administrator. Create a new auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param create_domain_auth_provider_body: (required) + :type create_domain_auth_provider_body: CreateDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_domain_auth_provider_serialize( + domain_id=domain_id, + create_domain_auth_provider_body=create_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateDomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_domain_auth_provider_serialize( + self, + domain_id, + create_domain_auth_provider_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_domain_auth_provider_body is not None: + _body_params = create_domain_auth_provider_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/domain/{domainId}/auth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_domain_auth_provider( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an auth provider from a domain + + **Required role:** Domain administrator. Delete an auth provider from a domain. Deletes are idempotent: a `providerId` that is not attached to the domain, or an unknown `domainId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. The underlying provider record is only removed when no other domain still references it, and default providers are never removed. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_domain_auth_provider_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an auth provider from a domain + + **Required role:** Domain administrator. Delete an auth provider from a domain. Deletes are idempotent: a `providerId` that is not attached to the domain, or an unknown `domainId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. The underlying provider record is only removed when no other domain still references it, and default providers are never removed. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_domain_auth_provider_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an auth provider from a domain + + **Required role:** Domain administrator. Delete an auth provider from a domain. Deletes are idempotent: a `providerId` that is not attached to the domain, or an unknown `domainId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. The underlying provider record is only removed when no other domain still references it, and default providers are never removed. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_domain_auth_provider_serialize( + self, + domain_id, + provider_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/domain/{domainId}/auth/{providerId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_domain_auth_providers( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainAuthProvidersList: + """Return all configured auth providers for a domain (including globally configured providers) + + **Required role:** Domain administrator. Return all configured auth providers for a domain (including globally configured providers). + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_domain_auth_providers_serialize( + domain_id=domain_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProvidersList", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_domain_auth_providers_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainAuthProvidersList]: + """Return all configured auth providers for a domain (including globally configured providers) + + **Required role:** Domain administrator. Return all configured auth providers for a domain (including globally configured providers). + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_domain_auth_providers_serialize( + domain_id=domain_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProvidersList", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_domain_auth_providers_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Return all configured auth providers for a domain (including globally configured providers) + + **Required role:** Domain administrator. Return all configured auth providers for a domain (including globally configured providers). + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_domain_auth_providers_serialize( + domain_id=domain_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProvidersList", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_domain_auth_providers_serialize( + self, + domain_id, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/domain/{domainId}/auth', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_domain_auth_provider( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + patch_domain_auth_provider_body: Optional[PatchDomainAuthProviderBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainAuthProviderResponse: + """Partially update an auth provider for a domain + + **Required role:** Domain administrator. Partially update an auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param patch_domain_auth_provider_body: + :type patch_domain_auth_provider_body: PatchDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + patch_domain_auth_provider_body=patch_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_domain_auth_provider_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + patch_domain_auth_provider_body: Optional[PatchDomainAuthProviderBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainAuthProviderResponse]: + """Partially update an auth provider for a domain + + **Required role:** Domain administrator. Partially update an auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param patch_domain_auth_provider_body: + :type patch_domain_auth_provider_body: PatchDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + patch_domain_auth_provider_body=patch_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_domain_auth_provider_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + patch_domain_auth_provider_body: Optional[PatchDomainAuthProviderBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Partially update an auth provider for a domain + + **Required role:** Domain administrator. Partially update an auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param patch_domain_auth_provider_body: + :type patch_domain_auth_provider_body: PatchDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + patch_domain_auth_provider_body=patch_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_domain_auth_provider_serialize( + self, + domain_id, + provider_id, + patch_domain_auth_provider_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_domain_auth_provider_body is not None: + _body_params = patch_domain_auth_provider_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/domain/{domainId}/auth/{providerId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_update_domain_auth_provider( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + create_domain_auth_provider_body: CreateDomainAuthProviderBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainAuthProviderResponse: + """Update an auth provider for a domain + + **Required role:** Domain administrator. Update an auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param create_domain_auth_provider_body: (required) + :type create_domain_auth_provider_body: CreateDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + create_domain_auth_provider_body=create_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_update_domain_auth_provider_with_http_info( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + create_domain_auth_provider_body: CreateDomainAuthProviderBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainAuthProviderResponse]: + """Update an auth provider for a domain + + **Required role:** Domain administrator. Update an auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param create_domain_auth_provider_body: (required) + :type create_domain_auth_provider_body: CreateDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + create_domain_auth_provider_body=create_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_update_domain_auth_provider_without_preload_content( + self, + domain_id: Annotated[StrictStr, Field(description="Domain identifier.")], + provider_id: Annotated[StrictStr, Field(description="Provider identifier.")], + create_domain_auth_provider_body: CreateDomainAuthProviderBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an auth provider for a domain + + **Required role:** Domain administrator. Update an auth provider for a domain. + + :param domain_id: Domain identifier. (required) + :type domain_id: str + :param provider_id: Provider identifier. (required) + :type provider_id: str + :param create_domain_auth_provider_body: (required) + :type create_domain_auth_provider_body: CreateDomainAuthProviderBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_domain_auth_provider_serialize( + domain_id=domain_id, + provider_id=provider_id, + create_domain_auth_provider_body=create_domain_auth_provider_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainAuthProviderResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_update_domain_auth_provider_serialize( + self, + domain_id, + provider_id, + create_domain_auth_provider_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if domain_id is not None: + _path_params['domainId'] = domain_id + if provider_id is not None: + _path_params['providerId'] = provider_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_domain_auth_provider_body is not None: + _body_params = create_domain_auth_provider_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/domain/{domainId}/auth/{providerId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/domain_v1_api.py b/corellium/api/domain_v1_api.py new file mode 100644 index 0000000..51ff3c4 --- /dev/null +++ b/corellium/api/domain_v1_api.py @@ -0,0 +1,1304 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field +from typing_extensions import Annotated +from corellium.models.create_domain_welcome_message_body import CreateDomainWelcomeMessageBody +from corellium.models.domain_welcome_message_response_v1 import DomainWelcomeMessageResponseV1 +from corellium.models.update_domain_welcome_message_request import UpdateDomainWelcomeMessageRequest + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class DomainV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_create_domain_welcome_message( + self, + create_domain_welcome_message_body: Annotated[CreateDomainWelcomeMessageBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainWelcomeMessageResponseV1: + """(Deprecated) Create a welcome message for a domain + + Creates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param create_domain_welcome_message_body: application/json (required) + :type create_domain_welcome_message_body: CreateDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_create_domain_welcome_message_serialize( + create_domain_welcome_message_body=create_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_domain_welcome_message_with_http_info( + self, + create_domain_welcome_message_body: Annotated[CreateDomainWelcomeMessageBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainWelcomeMessageResponseV1]: + """(Deprecated) Create a welcome message for a domain + + Creates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param create_domain_welcome_message_body: application/json (required) + :type create_domain_welcome_message_body: CreateDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_create_domain_welcome_message_serialize( + create_domain_welcome_message_body=create_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_domain_welcome_message_without_preload_content( + self, + create_domain_welcome_message_body: Annotated[CreateDomainWelcomeMessageBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create a welcome message for a domain + + Creates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param create_domain_welcome_message_body: application/json (required) + :type create_domain_welcome_message_body: CreateDomainWelcomeMessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_create_domain_welcome_message_serialize( + create_domain_welcome_message_body=create_domain_welcome_message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_domain_welcome_message_serialize( + self, + create_domain_welcome_message_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_domain_welcome_message_body is not None: + _body_params = create_domain_welcome_message_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/domain/welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_domain_welcome_message( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete the welcome message for the authenticated user's domain + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_delete_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_domain_welcome_message_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete the welcome message for the authenticated user's domain + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_delete_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_domain_welcome_message_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete the welcome message for the authenticated user's domain + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_delete_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_domain_welcome_message_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/domain/welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_domain_welcome_message( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainWelcomeMessageResponseV1: + """(Deprecated) Get the welcome message for the authenticated user's domain + + Retrieves the welcome message for the domain. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_get_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '401': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_domain_welcome_message_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainWelcomeMessageResponseV1]: + """(Deprecated) Get the welcome message for the authenticated user's domain + + Retrieves the welcome message for the domain. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_get_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '401': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_domain_welcome_message_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get the welcome message for the authenticated user's domain + + Retrieves the welcome message for the domain. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_get_domain_welcome_message_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '401': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_domain_welcome_message_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/domain/welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_domain_welcome_message( + self, + update_domain_welcome_message_request: Annotated[UpdateDomainWelcomeMessageRequest, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DomainWelcomeMessageResponseV1: + """(Deprecated) Update a welcome message for a domain + + Updates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param update_domain_welcome_message_request: application/json (required) + :type update_domain_welcome_message_request: UpdateDomainWelcomeMessageRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_update_domain_welcome_message_serialize( + update_domain_welcome_message_request=update_domain_welcome_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_domain_welcome_message_with_http_info( + self, + update_domain_welcome_message_request: Annotated[UpdateDomainWelcomeMessageRequest, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DomainWelcomeMessageResponseV1]: + """(Deprecated) Update a welcome message for a domain + + Updates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param update_domain_welcome_message_request: application/json (required) + :type update_domain_welcome_message_request: UpdateDomainWelcomeMessageRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_update_domain_welcome_message_serialize( + update_domain_welcome_message_request=update_domain_welcome_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_domain_welcome_message_without_preload_content( + self, + update_domain_welcome_message_request: Annotated[UpdateDomainWelcomeMessageRequest, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update a welcome message for a domain + + Updates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + + :param update_domain_welcome_message_request: application/json (required) + :type update_domain_welcome_message_request: UpdateDomainWelcomeMessageRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/domain/welcome is deprecated.", DeprecationWarning) + + _param = self._v1_update_domain_welcome_message_serialize( + update_domain_welcome_message_request=update_domain_welcome_message_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DomainWelcomeMessageResponseV1", + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_domain_welcome_message_serialize( + self, + update_domain_welcome_message_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_domain_welcome_message_request is not None: + _body_params = update_domain_welcome_message_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/domain/welcome', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/extensions_api.py b/corellium/api/extensions_api.py new file mode 100644 index 0000000..bc50903 --- /dev/null +++ b/corellium/api/extensions_api.py @@ -0,0 +1,2030 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Any, Dict, Optional +from typing_extensions import Annotated +from corellium.models.extension import Extension +from corellium.models.extension_list import ExtensionList +from corellium.models.load_extension_body import LoadExtensionBody +from corellium.models.update_extension_body import UpdateExtensionBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ExtensionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_delete_extension( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an existing extension + + **Required role:** Domain administrator. Deletes the extension identified by the given extension ID. Available on on-site deployments only. Deletion is asynchronous: the extension is marked `deleting` and the call returns 204 before removal completes. Deletes are idempotent: an unknown extension ID, or an extension that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the record is still present in the `deleting` state and after it has disappeared. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_extension_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_extension_with_http_info( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an existing extension + + **Required role:** Domain administrator. Deletes the extension identified by the given extension ID. Available on on-site deployments only. Deletion is asynchronous: the extension is marked `deleting` and the call returns 204 before removal completes. Deletes are idempotent: an unknown extension ID, or an extension that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the record is still present in the `deleting` state and after it has disappeared. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_extension_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_extension_without_preload_content( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an existing extension + + **Required role:** Domain administrator. Deletes the extension identified by the given extension ID. Available on on-site deployments only. Deletion is asynchronous: the extension is marked `deleting` and the call returns 204 before removal completes. Deletes are idempotent: an unknown extension ID, or an extension that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the record is still present in the `deleting` state and after it has disappeared. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_extension_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_extension_serialize( + self, + extension_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if extension_id is not None: + _path_params['extensionId'] = extension_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/extensions/{extensionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_extension_by_id( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Extension: + """Get extension by ID + + **Required role:** Domain administrator. Returns one installed extension, including whether it is enabled and the device models (flavors) it adds. Requires a domain administrator. Available on on-site deployments only. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_extension_by_id_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_extension_by_id_with_http_info( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Extension]: + """Get extension by ID + + **Required role:** Domain administrator. Returns one installed extension, including whether it is enabled and the device models (flavors) it adds. Requires a domain administrator. Available on on-site deployments only. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_extension_by_id_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_extension_by_id_without_preload_content( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get extension by ID + + **Required role:** Domain administrator. Returns one installed extension, including whether it is enabled and the device models (flavors) it adds. Requires a domain administrator. Available on on-site deployments only. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_extension_by_id_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_extension_by_id_serialize( + self, + extension_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if extension_id is not None: + _path_params['extensionId'] = extension_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/extensions/{extensionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_extensions( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + if_none_match: Annotated[Optional[StrictStr], Field(description="SHA-256 sum of the last response with the same parameters.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtensionList: + """List all extensions + + **Required role:** Domain administrator. Lists the extensions installed on this deployment. An extension adds new device models (for example an IoT board such as a Raspberry Pi 4) that you can then create devices from; each one is defined by an `extension.json` file listing its models, CPU cores, memory and boot options. Requires a domain administrator. Available on on-site deployments only. The response carries an ETag; send it back as `If-None-Match` to get 304 when nothing changed. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param if_none_match: SHA-256 sum of the last response with the same parameters. + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_extensions_serialize( + limit=limit, + offset=offset, + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionList", + '304': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_extensions_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + if_none_match: Annotated[Optional[StrictStr], Field(description="SHA-256 sum of the last response with the same parameters.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtensionList]: + """List all extensions + + **Required role:** Domain administrator. Lists the extensions installed on this deployment. An extension adds new device models (for example an IoT board such as a Raspberry Pi 4) that you can then create devices from; each one is defined by an `extension.json` file listing its models, CPU cores, memory and boot options. Requires a domain administrator. Available on on-site deployments only. The response carries an ETag; send it back as `If-None-Match` to get 304 when nothing changed. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param if_none_match: SHA-256 sum of the last response with the same parameters. + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_extensions_serialize( + limit=limit, + offset=offset, + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionList", + '304': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_extensions_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + if_none_match: Annotated[Optional[StrictStr], Field(description="SHA-256 sum of the last response with the same parameters.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List all extensions + + **Required role:** Domain administrator. Lists the extensions installed on this deployment. An extension adds new device models (for example an IoT board such as a Raspberry Pi 4) that you can then create devices from; each one is defined by an `extension.json` file listing its models, CPU cores, memory and boot options. Requires a domain administrator. Available on on-site deployments only. The response carries an ETag; send it back as `If-None-Match` to get 304 when nothing changed. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param if_none_match: SHA-256 sum of the last response with the same parameters. + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_extensions_serialize( + limit=limit, + offset=offset, + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionList", + '304': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_extensions_serialize( + self, + limit, + offset, + if_none_match, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + if if_none_match is not None: + _header_params['if-none-match'] = if_none_match + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/extensions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_load_extension( + self, + load_extension_body: LoadExtensionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Extension: + """Load an extension + + **Required role:** Domain administrator. Installs an extension so its device models become available. **Steps:** (1) optionally check your `extension.json` with `v3ParseExtensionJson`; (2) upload the extension file with `POST /v3/images` using `type: \"extension\"`; (3) call this with the returned `imageId`. The definition is read from the uploaded file, so only the image ID is sent. The new models then appear in `GET /v3/models`. Requires a domain administrator. Available on on-site deployments only. + + :param load_extension_body: (required) + :type load_extension_body: LoadExtensionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_load_extension_serialize( + load_extension_body=load_extension_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_load_extension_with_http_info( + self, + load_extension_body: LoadExtensionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Extension]: + """Load an extension + + **Required role:** Domain administrator. Installs an extension so its device models become available. **Steps:** (1) optionally check your `extension.json` with `v3ParseExtensionJson`; (2) upload the extension file with `POST /v3/images` using `type: \"extension\"`; (3) call this with the returned `imageId`. The definition is read from the uploaded file, so only the image ID is sent. The new models then appear in `GET /v3/models`. Requires a domain administrator. Available on on-site deployments only. + + :param load_extension_body: (required) + :type load_extension_body: LoadExtensionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_load_extension_serialize( + load_extension_body=load_extension_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_load_extension_without_preload_content( + self, + load_extension_body: LoadExtensionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Load an extension + + **Required role:** Domain administrator. Installs an extension so its device models become available. **Steps:** (1) optionally check your `extension.json` with `v3ParseExtensionJson`; (2) upload the extension file with `POST /v3/images` using `type: \"extension\"`; (3) call this with the returned `imageId`. The definition is read from the uploaded file, so only the image ID is sent. The new models then appear in `GET /v3/models`. Requires a domain administrator. Available on on-site deployments only. + + :param load_extension_body: (required) + :type load_extension_body: LoadExtensionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_load_extension_serialize( + load_extension_body=load_extension_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_load_extension_serialize( + self, + load_extension_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if load_extension_body is not None: + _body_params = load_extension_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/extensions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_parse_extension_json( + self, + request_body: Annotated[Dict[str, Any], Field(description="Contents of the extension.json file.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, Optional[object]]: + """Validates extension.json + + **Required role:** Domain administrator. Checks an `extension.json` document before you upload it, and returns the normalised definition the platform would use (with defaults filled in). Returns 400 with the problem if the document is invalid. Nothing is installed. Requires a domain administrator. Available on on-site deployments only. + + :param request_body: Contents of the extension.json file. (required) + :type request_body: Dict[str, Optional[object]] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_parse_extension_json_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_parse_extension_json_with_http_info( + self, + request_body: Annotated[Dict[str, Any], Field(description="Contents of the extension.json file.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, Optional[object]]]: + """Validates extension.json + + **Required role:** Domain administrator. Checks an `extension.json` document before you upload it, and returns the normalised definition the platform would use (with defaults filled in). Returns 400 with the problem if the document is invalid. Nothing is installed. Requires a domain administrator. Available on on-site deployments only. + + :param request_body: Contents of the extension.json file. (required) + :type request_body: Dict[str, Optional[object]] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_parse_extension_json_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_parse_extension_json_without_preload_content( + self, + request_body: Annotated[Dict[str, Any], Field(description="Contents of the extension.json file.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Validates extension.json + + **Required role:** Domain administrator. Checks an `extension.json` document before you upload it, and returns the normalised definition the platform would use (with defaults filled in). Returns 400 with the problem if the document is invalid. Nothing is installed. Requires a domain administrator. Available on on-site deployments only. + + :param request_body: Contents of the extension.json file. (required) + :type request_body: Dict[str, Optional[object]] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_parse_extension_json_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_parse_extension_json_serialize( + self, + request_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/extensions/parse/extension.json', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_update_extension( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + update_extension_body: UpdateExtensionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Extension: + """Update an existing extension + + **Required role:** Domain administrator. Turns an installed extension on or off with `enabled`. While it is off, devices that use its models cannot be created or started. Requires a domain administrator. Available on on-site deployments only. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param update_extension_body: (required) + :type update_extension_body: UpdateExtensionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_extension_serialize( + extension_id=extension_id, + update_extension_body=update_extension_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_update_extension_with_http_info( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + update_extension_body: UpdateExtensionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Extension]: + """Update an existing extension + + **Required role:** Domain administrator. Turns an installed extension on or off with `enabled`. While it is off, devices that use its models cannot be created or started. Requires a domain administrator. Available on on-site deployments only. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param update_extension_body: (required) + :type update_extension_body: UpdateExtensionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_extension_serialize( + extension_id=extension_id, + update_extension_body=update_extension_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_update_extension_without_preload_content( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID.")], + update_extension_body: UpdateExtensionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an existing extension + + **Required role:** Domain administrator. Turns an installed extension on or off with `enabled`. While it is off, devices that use its models cannot be created or started. Requires a domain administrator. Available on on-site deployments only. + + :param extension_id: Extension ID. (required) + :type extension_id: str + :param update_extension_body: (required) + :type update_extension_body: UpdateExtensionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_extension_serialize( + extension_id=extension_id, + update_extension_body=update_extension_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Extension", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_update_extension_serialize( + self, + extension_id, + update_extension_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if extension_id is not None: + _path_params['extensionId'] = extension_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_extension_body is not None: + _body_params = update_extension_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/extensions/{extensionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/extensions_v1_api.py b/corellium/api/extensions_v1_api.py new file mode 100644 index 0000000..99ec807 --- /dev/null +++ b/corellium/api/extensions_v1_api.py @@ -0,0 +1,2002 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated +from corellium.models.extension_v1 import ExtensionV1 +from corellium.models.update_extension import UpdateExtension +from corellium.models.v1_load_extension_parameters import V1LoadExtensionParameters + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ExtensionsV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_delete_extension( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete an existing extension + + + :param extension_id: Extension ID (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_extension_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_extension_with_http_info( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete an existing extension + + + :param extension_id: Extension ID (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_extension_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_extension_without_preload_content( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete an existing extension + + + :param extension_id: Extension ID (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_extension_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_extension_serialize( + self, + extension_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if extension_id is not None: + _path_params['extensionId'] = extension_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/extensions/{extensionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_extension_by_id( + self, + extension_id: Annotated[StrictStr, Field(description="Extension Id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtensionV1: + """(Deprecated) Get extension by id + + + :param extension_id: Extension Id (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_extension_by_id_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_extension_by_id_with_http_info( + self, + extension_id: Annotated[StrictStr, Field(description="Extension Id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtensionV1]: + """(Deprecated) Get extension by id + + + :param extension_id: Extension Id (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_extension_by_id_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_extension_by_id_without_preload_content( + self, + extension_id: Annotated[StrictStr, Field(description="Extension Id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get extension by id + + + :param extension_id: Extension Id (required) + :type extension_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_extension_by_id_serialize( + extension_id=extension_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_extension_by_id_serialize( + self, + extension_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if extension_id is not None: + _path_params['extensionId'] = extension_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/extensions/{extensionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_extensions( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 20")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + if_none_match: Annotated[Optional[StrictStr], Field(description="sha256sum of the last response with the same parameters (optional)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ExtensionV1]: + """(Deprecated) Get all extensions + + + :param limit: limit for pagination results, defaults to 20 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param if_none_match: sha256sum of the last response with the same parameters (optional) + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/extensions is deprecated.", DeprecationWarning) + + _param = self._v1_get_extensions_serialize( + limit=limit, + offset=offset, + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ExtensionV1]", + '304': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_extensions_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 20")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + if_none_match: Annotated[Optional[StrictStr], Field(description="sha256sum of the last response with the same parameters (optional)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ExtensionV1]]: + """(Deprecated) Get all extensions + + + :param limit: limit for pagination results, defaults to 20 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param if_none_match: sha256sum of the last response with the same parameters (optional) + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/extensions is deprecated.", DeprecationWarning) + + _param = self._v1_get_extensions_serialize( + limit=limit, + offset=offset, + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ExtensionV1]", + '304': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_extensions_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 20")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + if_none_match: Annotated[Optional[StrictStr], Field(description="sha256sum of the last response with the same parameters (optional)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get all extensions + + + :param limit: limit for pagination results, defaults to 20 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param if_none_match: sha256sum of the last response with the same parameters (optional) + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/extensions is deprecated.", DeprecationWarning) + + _param = self._v1_get_extensions_serialize( + limit=limit, + offset=offset, + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ExtensionV1]", + '304': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_extensions_serialize( + self, + limit, + offset, + if_none_match, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + if if_none_match is not None: + _header_params['if-none-match'] = if_none_match + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/extensions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_load_extension( + self, + v1_load_extension_parameters: Annotated[V1LoadExtensionParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtensionV1: + """(Deprecated) Load an extension + + + :param v1_load_extension_parameters: application/json (required) + :type v1_load_extension_parameters: V1LoadExtensionParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/extensions is deprecated.", DeprecationWarning) + + _param = self._v1_load_extension_serialize( + v1_load_extension_parameters=v1_load_extension_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_load_extension_with_http_info( + self, + v1_load_extension_parameters: Annotated[V1LoadExtensionParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtensionV1]: + """(Deprecated) Load an extension + + + :param v1_load_extension_parameters: application/json (required) + :type v1_load_extension_parameters: V1LoadExtensionParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/extensions is deprecated.", DeprecationWarning) + + _param = self._v1_load_extension_serialize( + v1_load_extension_parameters=v1_load_extension_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_load_extension_without_preload_content( + self, + v1_load_extension_parameters: Annotated[V1LoadExtensionParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Load an extension + + + :param v1_load_extension_parameters: application/json (required) + :type v1_load_extension_parameters: V1LoadExtensionParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/extensions is deprecated.", DeprecationWarning) + + _param = self._v1_load_extension_serialize( + v1_load_extension_parameters=v1_load_extension_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtensionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_load_extension_serialize( + self, + v1_load_extension_parameters, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if v1_load_extension_parameters is not None: + _body_params = v1_load_extension_parameters + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/extensions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_parse_extension_json( + self, + extension_v1: Annotated[ExtensionV1, Field(description="extension.json contents")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """(Deprecated) Validates extension.json + + + :param extension_v1: extension.json contents (required) + :type extension_v1: ExtensionV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/extensions/parse/extension.json is deprecated.", DeprecationWarning) + + _param = self._v1_parse_extension_json_serialize( + extension_v1=extension_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_parse_extension_json_with_http_info( + self, + extension_v1: Annotated[ExtensionV1, Field(description="extension.json contents")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """(Deprecated) Validates extension.json + + + :param extension_v1: extension.json contents (required) + :type extension_v1: ExtensionV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/extensions/parse/extension.json is deprecated.", DeprecationWarning) + + _param = self._v1_parse_extension_json_serialize( + extension_v1=extension_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_parse_extension_json_without_preload_content( + self, + extension_v1: Annotated[ExtensionV1, Field(description="extension.json contents")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Validates extension.json + + + :param extension_v1: extension.json contents (required) + :type extension_v1: ExtensionV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/extensions/parse/extension.json is deprecated.", DeprecationWarning) + + _param = self._v1_parse_extension_json_serialize( + extension_v1=extension_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_parse_extension_json_serialize( + self, + extension_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if extension_v1 is not None: + _body_params = extension_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/extensions/parse/extension.json', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_extension( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID")], + update_extension: Annotated[UpdateExtension, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Update an existing extension + + + :param extension_id: Extension ID (required) + :type extension_id: str + :param update_extension: application/json (required) + :type update_extension: UpdateExtension + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_extension_serialize( + extension_id=extension_id, + update_extension=update_extension, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_extension_with_http_info( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID")], + update_extension: Annotated[UpdateExtension, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Update an existing extension + + + :param extension_id: Extension ID (required) + :type extension_id: str + :param update_extension: application/json (required) + :type update_extension: UpdateExtension + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_extension_serialize( + extension_id=extension_id, + update_extension=update_extension, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_extension_without_preload_content( + self, + extension_id: Annotated[StrictStr, Field(description="Extension ID")], + update_extension: Annotated[UpdateExtension, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update an existing extension + + + :param extension_id: Extension ID (required) + :type extension_id: str + :param update_extension: application/json (required) + :type update_extension: UpdateExtension + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/extensions/{extensionId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_extension_serialize( + extension_id=extension_id, + update_extension=update_extension, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_extension_serialize( + self, + extension_id, + update_extension, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if extension_id is not None: + _path_params['extensionId'] = extension_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_extension is not None: + _body_params = update_extension + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/extensions/{extensionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/external_services_api.py b/corellium/api/external_services_api.py new file mode 100644 index 0000000..51f2da2 --- /dev/null +++ b/corellium/api/external_services_api.py @@ -0,0 +1,1763 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ExternalServicesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def delete_external_service( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Proxy a DELETE request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._delete_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_external_service_with_http_info( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Proxy a DELETE request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._delete_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_external_service_without_preload_content( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Proxy a DELETE request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._delete_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_external_service_serialize( + self, + api_version, + service_name, + path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_version is not None: + _path_params['apiVersion'] = api_version + if service_name is not None: + _path_params['serviceName'] = service_name + if path is not None: + _path_params['path'] = path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/{apiVersion}/external-services/{serviceName}/{path}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_external_service( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Proxy a GET request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._get_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_external_service_with_http_info( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Proxy a GET request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._get_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_external_service_without_preload_content( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Proxy a GET request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._get_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_external_service_serialize( + self, + api_version, + service_name, + path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_version is not None: + _path_params['apiVersion'] = api_version + if service_name is not None: + _path_params['serviceName'] = service_name + if path is not None: + _path_params['path'] = path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/{apiVersion}/external-services/{serviceName}/{path}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def patch_external_service( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Proxy a PATCH request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._patch_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def patch_external_service_with_http_info( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Proxy a PATCH request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._patch_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def patch_external_service_without_preload_content( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Proxy a PATCH request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._patch_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _patch_external_service_serialize( + self, + api_version, + service_name, + path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_version is not None: + _path_params['apiVersion'] = api_version + if service_name is not None: + _path_params['serviceName'] = service_name + if path is not None: + _path_params['path'] = path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/{apiVersion}/external-services/{serviceName}/{path}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_external_service( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Proxy a POST request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._post_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_external_service_with_http_info( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Proxy a POST request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._post_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_external_service_without_preload_content( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Proxy a POST request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._post_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_external_service_serialize( + self, + api_version, + service_name, + path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_version is not None: + _path_params['apiVersion'] = api_version + if service_name is not None: + _path_params['serviceName'] = service_name + if path is not None: + _path_params['path'] = path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/{apiVersion}/external-services/{serviceName}/{path}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def put_external_service( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Proxy a PUT request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._put_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def put_external_service_with_http_info( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Proxy a PUT request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._put_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def put_external_service_without_preload_content( + self, + api_version: Annotated[StrictStr, Field(description="API version (e.g. v1, v3).")], + service_name: Annotated[StrictStr, Field(description="Target service name.")], + path: Annotated[StrictStr, Field(description="The path to call on the external service. Slashes are kept as path separators.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Proxy a PUT request to an external service + + Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + + :param api_version: API version (e.g. v1, v3). (required) + :type api_version: str + :param service_name: Target service name. (required) + :type service_name: str + :param path: The path to call on the external service. Slashes are kept as path separators. (required) + :type path: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._put_external_service_serialize( + api_version=api_version, + service_name=service_name, + path=path, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': "ApiError", + '403': "ApiError", + '503': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _put_external_service_serialize( + self, + api_version, + service_name, + path, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if api_version is not None: + _path_params['apiVersion'] = api_version + if service_name is not None: + _path_params['serviceName'] = service_name + if path is not None: + _path_params['path'] = path + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/{apiVersion}/external-services/{serviceName}/{path}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/firmware_service_api.py b/corellium/api/firmware_service_api.py new file mode 100644 index 0000000..f7ae9a5 --- /dev/null +++ b/corellium/api/firmware_service_api.py @@ -0,0 +1,3281 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr +from typing import Dict, Optional +from typing_extensions import Annotated +from corellium.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo +from corellium.models.firmware_asset_filter import FirmwareAssetFilter +from corellium.models.firmware_asset_list import FirmwareAssetList +from corellium.models.firmware_device_list import FirmwareDeviceList +from corellium.models.firmware_list import FirmwareList +from corellium.models.firmware_service_config import FirmwareServiceConfig +from corellium.models.firmware_service_settings import FirmwareServiceSettings +from corellium.models.patch_firmware_service_config_body import PatchFirmwareServiceConfigBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class FirmwareServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_firmware_assets( + self, + request_body: Optional[Dict[str, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Add firmware assets + + **Required role:** Cluster administrator. Adds firmware assets to the cluster, so firmware that needs them can boot. Returns 201 with the firmware service's response message. Requires a cluster administrator. For a single project, `POST /v3/projects/{projectId}/firmware-assets` fetches missing assets by URL; on air-gapped deployments, upload them and use `POST /v3/images/install-firmware-assets`. + + :param request_body: + :type request_body: Dict[str, str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_firmware_assets_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "str", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_firmware_assets_with_http_info( + self, + request_body: Optional[Dict[str, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Add firmware assets + + **Required role:** Cluster administrator. Adds firmware assets to the cluster, so firmware that needs them can boot. Returns 201 with the firmware service's response message. Requires a cluster administrator. For a single project, `POST /v3/projects/{projectId}/firmware-assets` fetches missing assets by URL; on air-gapped deployments, upload them and use `POST /v3/images/install-firmware-assets`. + + :param request_body: + :type request_body: Dict[str, str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_firmware_assets_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "str", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_firmware_assets_without_preload_content( + self, + request_body: Optional[Dict[str, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add firmware assets + + **Required role:** Cluster administrator. Adds firmware assets to the cluster, so firmware that needs them can boot. Returns 201 with the firmware service's response message. Requires a cluster administrator. For a single project, `POST /v3/projects/{projectId}/firmware-assets` fetches missing assets by URL; on air-gapped deployments, upload them and use `POST /v3/images/install-firmware-assets`. + + :param request_body: + :type request_body: Dict[str, str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_firmware_assets_serialize( + request_body=request_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "str", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_firmware_assets_serialize( + self, + request_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if request_body is not None: + _body_params = request_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/cluster/firmware-service/firmware-assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_firmware( + self, + filename: Annotated[StrictStr, Field(description="Firmware filename.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a firmware + + **Required role:** Cluster administrator. Removes a firmware build from the cluster firmware catalog, so it can no longer be chosen when creating devices. Identify it by its filename from `v3ListFirmwares`. Requires a cluster administrator. This endpoint proxies the request to the firmware service. A filename the service no longer has is a successful no-op: both a successful upstream delete and an upstream \"not there\" answer 204, and repeated calls return 204 as well. A firmware-service outage or refusal is still reported as a failure. + + :param filename: Firmware filename. (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_firmware_serialize( + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_firmware_with_http_info( + self, + filename: Annotated[StrictStr, Field(description="Firmware filename.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a firmware + + **Required role:** Cluster administrator. Removes a firmware build from the cluster firmware catalog, so it can no longer be chosen when creating devices. Identify it by its filename from `v3ListFirmwares`. Requires a cluster administrator. This endpoint proxies the request to the firmware service. A filename the service no longer has is a successful no-op: both a successful upstream delete and an upstream \"not there\" answer 204, and repeated calls return 204 as well. A firmware-service outage or refusal is still reported as a failure. + + :param filename: Firmware filename. (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_firmware_serialize( + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_firmware_without_preload_content( + self, + filename: Annotated[StrictStr, Field(description="Firmware filename.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a firmware + + **Required role:** Cluster administrator. Removes a firmware build from the cluster firmware catalog, so it can no longer be chosen when creating devices. Identify it by its filename from `v3ListFirmwares`. Requires a cluster administrator. This endpoint proxies the request to the firmware service. A filename the service no longer has is a successful no-op: both a successful upstream delete and an upstream \"not there\" answer 204, and repeated calls return 204 as well. A firmware-service outage or refusal is still reported as a failure. + + :param filename: Firmware filename. (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_firmware_serialize( + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_firmware_serialize( + self, + filename, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if filename is not None: + _path_params['filename'] = filename + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/cluster/firmware-service/firmwares/{filename}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_firmware_asset( + self, + asset_url: Annotated[StrictStr, Field(description="Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a firmware asset + + **Required role:** Cluster administrator. Removes a firmware asset from the cluster. Firmware that needs it can no longer boot until it is added again. Requires a cluster administrator. This endpoint proxies the request to the firmware service. An asset the service no longer has is a successful no-op: both a successful upstream delete and an upstream \"not there\" answer 204, and repeated calls return 204 as well. A firmware-service outage or refusal is still reported as a failure. + + :param asset_url: Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_firmware_asset_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_firmware_asset_with_http_info( + self, + asset_url: Annotated[StrictStr, Field(description="Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a firmware asset + + **Required role:** Cluster administrator. Removes a firmware asset from the cluster. Firmware that needs it can no longer boot until it is added again. Requires a cluster administrator. This endpoint proxies the request to the firmware service. An asset the service no longer has is a successful no-op: both a successful upstream delete and an upstream \"not there\" answer 204, and repeated calls return 204 as well. A firmware-service outage or refusal is still reported as a failure. + + :param asset_url: Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_firmware_asset_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_firmware_asset_without_preload_content( + self, + asset_url: Annotated[StrictStr, Field(description="Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a firmware asset + + **Required role:** Cluster administrator. Removes a firmware asset from the cluster. Firmware that needs it can no longer boot until it is added again. Requires a cluster administrator. This endpoint proxies the request to the firmware service. An asset the service no longer has is a successful no-op: both a successful upstream delete and an upstream \"not there\" answer 204, and repeated calls return 204 as well. A firmware-service outage or refusal is still reported as a failure. + + :param asset_url: Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_firmware_asset_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_firmware_asset_serialize( + self, + asset_url, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if asset_url is not None: + _path_params['assetUrl'] = asset_url + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/cluster/firmware-service/firmware-assets/{assetUrl}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_firmware_asset_extended( + self, + asset_url: Annotated[StrictStr, Field(description="Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExtendedFirmwareAssetInfo: + """Get extended firmware asset info + + **Required role:** Cluster administrator. Shows where a firmware asset is used: the firmware builds that need it and the devices using those builds. Check this before deleting an asset. Requires a cluster administrator. + + :param asset_url: Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_firmware_asset_extended_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtendedFirmwareAssetInfo", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_firmware_asset_extended_with_http_info( + self, + asset_url: Annotated[StrictStr, Field(description="Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExtendedFirmwareAssetInfo]: + """Get extended firmware asset info + + **Required role:** Cluster administrator. Shows where a firmware asset is used: the firmware builds that need it and the devices using those builds. Check this before deleting an asset. Requires a cluster administrator. + + :param asset_url: Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_firmware_asset_extended_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtendedFirmwareAssetInfo", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_firmware_asset_extended_without_preload_content( + self, + asset_url: Annotated[StrictStr, Field(description="Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get extended firmware asset info + + **Required role:** Cluster administrator. Shows where a firmware asset is used: the firmware builds that need it and the devices using those builds. Check this before deleting an asset. Requires a cluster administrator. + + :param asset_url: Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. (required) + :type asset_url: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_firmware_asset_extended_serialize( + asset_url=asset_url, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExtendedFirmwareAssetInfo", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_firmware_asset_extended_serialize( + self, + asset_url, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if asset_url is not None: + _path_params['assetUrl'] = asset_url + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/firmware-service/firmware-assets/{assetUrl}/extended', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_firmware_service_config( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirmwareServiceConfig: + """Get firmware service configuration + + **Required role:** Cluster administrator. Returns the settings of the cluster firmware service: the cluster-wide catalog of operating-system builds that devices can be created from (what `GET /v3/models/{model}/software` lists). Settings control things such as whether firmware is downloaded and cached. Requires a cluster administrator. Change them with `v3PatchFirmwareServiceConfig`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_firmware_service_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareServiceConfig", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_firmware_service_config_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirmwareServiceConfig]: + """Get firmware service configuration + + **Required role:** Cluster administrator. Returns the settings of the cluster firmware service: the cluster-wide catalog of operating-system builds that devices can be created from (what `GET /v3/models/{model}/software` lists). Settings control things such as whether firmware is downloaded and cached. Requires a cluster administrator. Change them with `v3PatchFirmwareServiceConfig`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_firmware_service_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareServiceConfig", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_firmware_service_config_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get firmware service configuration + + **Required role:** Cluster administrator. Returns the settings of the cluster firmware service: the cluster-wide catalog of operating-system builds that devices can be created from (what `GET /v3/models/{model}/software` lists). Settings control things such as whether firmware is downloaded and cached. Requires a cluster administrator. Change them with `v3PatchFirmwareServiceConfig`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_firmware_service_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareServiceConfig", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_firmware_service_config_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/firmware-service/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_firmware_assets( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + filter: Annotated[Optional[FirmwareAssetFilter], Field(description="Exact-match filters (filter[url], filter[domain]).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirmwareAssetList: + """List firmware assets + + **Required role:** Cluster administrator. Lists the firmware assets stored in the cluster: side files some firmware needs in order to boot, such as Apple decryption keys. A firmware build lists the asset URLs it needs; device creation fails if one is missing. Requires a cluster administrator. Results are paginated. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param filter: Exact-match filters (filter[url], filter[domain]). + :type filter: FirmwareAssetFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmware_assets_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareAssetList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_firmware_assets_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + filter: Annotated[Optional[FirmwareAssetFilter], Field(description="Exact-match filters (filter[url], filter[domain]).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirmwareAssetList]: + """List firmware assets + + **Required role:** Cluster administrator. Lists the firmware assets stored in the cluster: side files some firmware needs in order to boot, such as Apple decryption keys. A firmware build lists the asset URLs it needs; device creation fails if one is missing. Requires a cluster administrator. Results are paginated. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param filter: Exact-match filters (filter[url], filter[domain]). + :type filter: FirmwareAssetFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmware_assets_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareAssetList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_firmware_assets_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + filter: Annotated[Optional[FirmwareAssetFilter], Field(description="Exact-match filters (filter[url], filter[domain]).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List firmware assets + + **Required role:** Cluster administrator. Lists the firmware assets stored in the cluster: side files some firmware needs in order to boot, such as Apple decryption keys. A firmware build lists the asset URLs it needs; device creation fails if one is missing. Requires a cluster administrator. Results are paginated. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param filter: Exact-match filters (filter[url], filter[domain]). + :type filter: FirmwareAssetFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmware_assets_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareAssetList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_firmware_assets_serialize( + self, + limit, + offset, + search, + order, + filter, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if search is not None: + + _query_params.append(('search', search)) + + if order is not None: + + _query_params.append(('order', order)) + + if filter is not None: + + _query_params.append(('filter', filter)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/firmware-service/firmware-assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_firmware_devices( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type.")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact name.")] = None, + platform: Annotated[Optional[StrictStr], Field(description="Filter by exact platform.")] = None, + hw_model: Annotated[Optional[StrictStr], Field(description="Filter by exact hardware model.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirmwareDeviceList: + """List firmware service devices + + **Required role:** Cluster administrator. Lists the device models the firmware service has firmware records for. Requires a cluster administrator. Results are paginated. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param type: Filter by exact type. + :type type: str + :param model: Filter by exact model. + :type model: str + :param name: Filter by exact name. + :type name: str + :param platform: Filter by exact platform. + :type platform: str + :param hw_model: Filter by exact hardware model. + :type hw_model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmware_devices_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + type=type, + model=model, + name=name, + platform=platform, + hw_model=hw_model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareDeviceList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_firmware_devices_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type.")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact name.")] = None, + platform: Annotated[Optional[StrictStr], Field(description="Filter by exact platform.")] = None, + hw_model: Annotated[Optional[StrictStr], Field(description="Filter by exact hardware model.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirmwareDeviceList]: + """List firmware service devices + + **Required role:** Cluster administrator. Lists the device models the firmware service has firmware records for. Requires a cluster administrator. Results are paginated. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param type: Filter by exact type. + :type type: str + :param model: Filter by exact model. + :type model: str + :param name: Filter by exact name. + :type name: str + :param platform: Filter by exact platform. + :type platform: str + :param hw_model: Filter by exact hardware model. + :type hw_model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmware_devices_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + type=type, + model=model, + name=name, + platform=platform, + hw_model=hw_model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareDeviceList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_firmware_devices_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type.")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact name.")] = None, + platform: Annotated[Optional[StrictStr], Field(description="Filter by exact platform.")] = None, + hw_model: Annotated[Optional[StrictStr], Field(description="Filter by exact hardware model.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List firmware service devices + + **Required role:** Cluster administrator. Lists the device models the firmware service has firmware records for. Requires a cluster administrator. Results are paginated. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param type: Filter by exact type. + :type type: str + :param model: Filter by exact model. + :type model: str + :param name: Filter by exact name. + :type name: str + :param platform: Filter by exact platform. + :type platform: str + :param hw_model: Filter by exact hardware model. + :type hw_model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmware_devices_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + type=type, + model=model, + name=name, + platform=platform, + hw_model=hw_model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareDeviceList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_firmware_devices_serialize( + self, + limit, + offset, + search, + order, + type, + model, + name, + platform, + hw_model, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if search is not None: + + _query_params.append(('search', search)) + + if order is not None: + + _query_params.append(('order', order)) + + if type is not None: + + _query_params.append(('type', type)) + + if model is not None: + + _query_params.append(('model', model)) + + if name is not None: + + _query_params.append(('name', name)) + + if platform is not None: + + _query_params.append(('platform', platform)) + + if hw_model is not None: + + _query_params.append(('hwModel', hw_model)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/firmware-service/devices', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_firmwares( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + filename: Annotated[Optional[StrictStr], Field(description="Filter by exact filename.")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type.")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by exact version.")] = None, + build_id: Annotated[Optional[StrictStr], Field(description="Filter by exact build ID.")] = None, + firmware_assets: Annotated[Optional[StrictStr], Field(description="Filter by exact asset URL/ID.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Filter by exact Corellium checksum (upload preflight).")] = None, + installed: Annotated[Optional[StrictBool], Field(description="Filter by installed status.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirmwareList: + """List firmwares + + **Required role:** Cluster administrator. Lists the firmware builds in the cluster firmware catalog, including builds installed with `POST /v3/images/install-firmware`. Requires a cluster administrator. Results are paginated. Users see the builds for one model with `GET /v3/models/{model}/software`. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param filename: Filter by exact filename. + :type filename: str + :param model: Filter by exact model. + :type model: str + :param type: Filter by exact type. + :type type: str + :param version: Filter by exact version. + :type version: str + :param build_id: Filter by exact build ID. + :type build_id: str + :param firmware_assets: Filter by exact asset URL/ID. + :type firmware_assets: str + :param corellium_checksum: Filter by exact Corellium checksum (upload preflight). + :type corellium_checksum: str + :param installed: Filter by installed status. + :type installed: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmwares_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filename=filename, + model=model, + type=type, + version=version, + build_id=build_id, + firmware_assets=firmware_assets, + corellium_checksum=corellium_checksum, + installed=installed, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_firmwares_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + filename: Annotated[Optional[StrictStr], Field(description="Filter by exact filename.")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type.")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by exact version.")] = None, + build_id: Annotated[Optional[StrictStr], Field(description="Filter by exact build ID.")] = None, + firmware_assets: Annotated[Optional[StrictStr], Field(description="Filter by exact asset URL/ID.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Filter by exact Corellium checksum (upload preflight).")] = None, + installed: Annotated[Optional[StrictBool], Field(description="Filter by installed status.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirmwareList]: + """List firmwares + + **Required role:** Cluster administrator. Lists the firmware builds in the cluster firmware catalog, including builds installed with `POST /v3/images/install-firmware`. Requires a cluster administrator. Results are paginated. Users see the builds for one model with `GET /v3/models/{model}/software`. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param filename: Filter by exact filename. + :type filename: str + :param model: Filter by exact model. + :type model: str + :param type: Filter by exact type. + :type type: str + :param version: Filter by exact version. + :type version: str + :param build_id: Filter by exact build ID. + :type build_id: str + :param firmware_assets: Filter by exact asset URL/ID. + :type firmware_assets: str + :param corellium_checksum: Filter by exact Corellium checksum (upload preflight). + :type corellium_checksum: str + :param installed: Filter by installed status. + :type installed: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmwares_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filename=filename, + model=model, + type=type, + version=version, + build_id=build_id, + firmware_assets=firmware_assets, + corellium_checksum=corellium_checksum, + installed=installed, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_firmwares_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Number of results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Index of the first row to return.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive partial match across key fields.")] = None, + order: Annotated[Optional[StrictStr], Field(description="Comma-separated sort fields; prefix with \"-\" for descending order.")] = None, + filename: Annotated[Optional[StrictStr], Field(description="Filter by exact filename.")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by exact model.")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by exact type.")] = None, + version: Annotated[Optional[StrictStr], Field(description="Filter by exact version.")] = None, + build_id: Annotated[Optional[StrictStr], Field(description="Filter by exact build ID.")] = None, + firmware_assets: Annotated[Optional[StrictStr], Field(description="Filter by exact asset URL/ID.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Filter by exact Corellium checksum (upload preflight).")] = None, + installed: Annotated[Optional[StrictBool], Field(description="Filter by installed status.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List firmwares + + **Required role:** Cluster administrator. Lists the firmware builds in the cluster firmware catalog, including builds installed with `POST /v3/images/install-firmware`. Requires a cluster administrator. Results are paginated. Users see the builds for one model with `GET /v3/models/{model}/software`. + + :param limit: Number of results to return. + :type limit: float + :param offset: Index of the first row to return. + :type offset: float + :param search: Case-insensitive partial match across key fields. + :type search: str + :param order: Comma-separated sort fields; prefix with \"-\" for descending order. + :type order: str + :param filename: Filter by exact filename. + :type filename: str + :param model: Filter by exact model. + :type model: str + :param type: Filter by exact type. + :type type: str + :param version: Filter by exact version. + :type version: str + :param build_id: Filter by exact build ID. + :type build_id: str + :param firmware_assets: Filter by exact asset URL/ID. + :type firmware_assets: str + :param corellium_checksum: Filter by exact Corellium checksum (upload preflight). + :type corellium_checksum: str + :param installed: Filter by installed status. + :type installed: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_firmwares_serialize( + limit=limit, + offset=offset, + search=search, + order=order, + filename=filename, + model=model, + type=type, + version=version, + build_id=build_id, + firmware_assets=firmware_assets, + corellium_checksum=corellium_checksum, + installed=installed, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareList", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_firmwares_serialize( + self, + limit, + offset, + search, + order, + filename, + model, + type, + version, + build_id, + firmware_assets, + corellium_checksum, + installed, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if search is not None: + + _query_params.append(('search', search)) + + if order is not None: + + _query_params.append(('order', order)) + + if filename is not None: + + _query_params.append(('filename', filename)) + + if model is not None: + + _query_params.append(('model', model)) + + if type is not None: + + _query_params.append(('type', type)) + + if version is not None: + + _query_params.append(('version', version)) + + if build_id is not None: + + _query_params.append(('buildId', build_id)) + + if firmware_assets is not None: + + _query_params.append(('firmwareAssets', firmware_assets)) + + if corellium_checksum is not None: + + _query_params.append(('corelliumChecksum', corellium_checksum)) + + if installed is not None: + + _query_params.append(('installed', installed)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/firmware-service/firmwares', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_firmware_service_config( + self, + patch_firmware_service_config_body: Optional[PatchFirmwareServiceConfigBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirmwareServiceSettings: + """Update firmware service configuration + + **Required role:** Cluster administrator. Changes firmware service settings. Send only the settings you want to change; they are merged into the current settings, and the full result is returned. Requires a cluster administrator. + + :param patch_firmware_service_config_body: + :type patch_firmware_service_config_body: PatchFirmwareServiceConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_firmware_service_config_serialize( + patch_firmware_service_config_body=patch_firmware_service_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareServiceSettings", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_firmware_service_config_with_http_info( + self, + patch_firmware_service_config_body: Optional[PatchFirmwareServiceConfigBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirmwareServiceSettings]: + """Update firmware service configuration + + **Required role:** Cluster administrator. Changes firmware service settings. Send only the settings you want to change; they are merged into the current settings, and the full result is returned. Requires a cluster administrator. + + :param patch_firmware_service_config_body: + :type patch_firmware_service_config_body: PatchFirmwareServiceConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_firmware_service_config_serialize( + patch_firmware_service_config_body=patch_firmware_service_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareServiceSettings", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_firmware_service_config_without_preload_content( + self, + patch_firmware_service_config_body: Optional[PatchFirmwareServiceConfigBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update firmware service configuration + + **Required role:** Cluster administrator. Changes firmware service settings. Send only the settings you want to change; they are merged into the current settings, and the full result is returned. Requires a cluster administrator. + + :param patch_firmware_service_config_body: + :type patch_firmware_service_config_body: PatchFirmwareServiceConfigBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_firmware_service_config_serialize( + patch_firmware_service_config_body=patch_firmware_service_config_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirmwareServiceSettings", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_firmware_service_config_serialize( + self, + patch_firmware_service_config_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_firmware_service_config_body is not None: + _body_params = patch_firmware_service_config_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/cluster/firmware-service/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/flavors_api.py b/corellium/api/flavors_api.py new file mode 100644 index 0000000..a6fc163 --- /dev/null +++ b/corellium/api/flavors_api.py @@ -0,0 +1,969 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictStr +from typing import Tuple, Union +from typing_extensions import Annotated +from corellium.models.flavor_frame import FlavorFrame + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class FlavorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_get_frame( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FlavorFrame: + """Get the device frame layout for a model + + Returns the layout of the on-screen device frame (the picture of the phone drawn around the screen) for a model: its size, where the screen sits inside it, and where the home button is. Use it to draw a device image around a screenshot or live display. `flavorId` is a model `flavor` from `GET /v3/models`. Returns 404 if the model has no frame. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_frame_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FlavorFrame", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_frame_with_http_info( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FlavorFrame]: + """Get the device frame layout for a model + + Returns the layout of the on-screen device frame (the picture of the phone drawn around the screen) for a model: its size, where the screen sits inside it, and where the home button is. Use it to draw a device image around a screenshot or live display. `flavorId` is a model `flavor` from `GET /v3/models`. Returns 404 if the model has no frame. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_frame_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FlavorFrame", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_frame_without_preload_content( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the device frame layout for a model + + Returns the layout of the on-screen device frame (the picture of the phone drawn around the screen) for a model: its size, where the screen sits inside it, and where the home button is. Use it to draw a device image around a screenshot or live display. `flavorId` is a model `flavor` from `GET /v3/models`. Returns 404 if the model has no frame. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_frame_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FlavorFrame", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_frame_serialize( + self, + flavor_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if flavor_id is not None: + _path_params['flavorId'] = flavor_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/flavors/{flavorId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_frame_image( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Get the device frame image for a model + + Downloads the picture of the device frame (the phone body drawn around the screen) for a model, to combine with the layout from `v3GetFrame`. Returns 404 if the model has no frame image. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_frame_image_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_frame_image_with_http_info( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Get the device frame image for a model + + Downloads the picture of the device frame (the phone body drawn around the screen) for a model, to combine with the layout from `v3GetFrame`. Returns 404 if the model has no frame image. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_frame_image_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_frame_image_without_preload_content( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the device frame image for a model + + Downloads the picture of the device frame (the phone body drawn around the screen) for a model, to combine with the layout from `v3GetFrame`. Returns 404 if the model has no frame image. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_frame_image_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_frame_image_serialize( + self, + flavor_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if flavor_id is not None: + _path_params['flavorId'] = flavor_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/flavors/{flavorId}/image', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_product_image( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Get the product image for a model + + Downloads a product picture of the device model, for example to show in a model picker. Returns 404 if the model has no product image. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_product_image_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_product_image_with_http_info( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Get the product image for a model + + Downloads a product picture of the device model, for example to show in a model picker. Returns 404 if the model has no product image. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_product_image_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_product_image_without_preload_content( + self, + flavor_id: Annotated[StrictStr, Field(description="Flavor ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the product image for a model + + Downloads a product picture of the device model, for example to show in a model picker. Returns 404 if the model has no product image. + + :param flavor_id: Flavor ID. (required) + :type flavor_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_product_image_serialize( + flavor_id=flavor_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_product_image_serialize( + self, + flavor_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if flavor_id is not None: + _path_params['flavorId'] = flavor_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/flavors/{flavorId}/productimage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/hyper_trace_api.py b/corellium/api/hyper_trace_api.py new file mode 100644 index 0000000..da05aa6 --- /dev/null +++ b/corellium/api/hyper_trace_api.py @@ -0,0 +1,1645 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.enable_btrace_body import EnableBtraceBody +from corellium.models.kcrange import Kcrange +from corellium.models.token import Token + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class HyperTraceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_btrace_preauthorize( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Token: + """Get a HyperTrace download token + + Returns a short-lived token that authorizes downloading this device's HyperTrace output without an `Authorization` header. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's trace and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_btrace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_btrace_preauthorize_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Token]: + """Get a HyperTrace download token + + Returns a short-lived token that authorizes downloading this device's HyperTrace output without an `Authorization` header. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's trace and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_btrace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_btrace_preauthorize_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a HyperTrace download token + + Returns a short-lived token that authorizes downloading this device's HyperTrace output without an `Authorization` header. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's trace and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_btrace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_btrace_preauthorize_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/btrace-authorize', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_clear_hyper_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Clear HyperTrace output + + Deletes the HyperTrace output recorded so far on this device. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_clear_hyper_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Clear HyperTrace output + + Deletes the HyperTrace output recorded so far on this device. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_clear_hyper_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Clear HyperTrace output + + Deletes the HyperTrace output recorded so far on this device. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_clear_hyper_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}/btrace', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_kcrange( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Kcrange]: + """List kernel extension address ranges + + Lists the kernel extensions loaded on the device with the memory address range each occupies. Pass a `range` to `v3StartHyperTrace` to trace code in just that extension. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_kcrange_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Kcrange]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_kcrange_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Kcrange]]: + """List kernel extension address ranges + + Lists the kernel extensions loaded on the device with the memory address range each occupies. Pass a `range` to `v3StartHyperTrace` to trace code in just that extension. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_kcrange_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Kcrange]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_kcrange_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List kernel extension address ranges + + Lists the kernel extensions loaded on the device with the memory address range each occupies. Pass a `range` to `v3StartHyperTrace` to trace code in just that extension. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_kcrange_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Kcrange]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_kcrange_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/btrace-kcrange', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_hyper_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_btrace_body: EnableBtraceBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start HyperTrace + + Starts HyperTrace on a running device. HyperTrace records which kernel code runs inside the address ranges you choose, without changing the device's software, so you can measure kernel code coverage. **Workflow:** list kernel extensions with `v3GetInstanceKcrange`, start tracing with the `ranges` you want (this call), exercise the device, stop with `v3StopHyperTrace`, then download with `v3BtracePreauthorize`. Clear old output with `v3ClearHyperTrace`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_btrace_body: (required) + :type enable_btrace_body: EnableBtraceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_hyper_trace_serialize( + instance_id=instance_id, + enable_btrace_body=enable_btrace_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_hyper_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_btrace_body: EnableBtraceBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start HyperTrace + + Starts HyperTrace on a running device. HyperTrace records which kernel code runs inside the address ranges you choose, without changing the device's software, so you can measure kernel code coverage. **Workflow:** list kernel extensions with `v3GetInstanceKcrange`, start tracing with the `ranges` you want (this call), exercise the device, stop with `v3StopHyperTrace`, then download with `v3BtracePreauthorize`. Clear old output with `v3ClearHyperTrace`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_btrace_body: (required) + :type enable_btrace_body: EnableBtraceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_hyper_trace_serialize( + instance_id=instance_id, + enable_btrace_body=enable_btrace_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_hyper_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_btrace_body: EnableBtraceBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start HyperTrace + + Starts HyperTrace on a running device. HyperTrace records which kernel code runs inside the address ranges you choose, without changing the device's software, so you can measure kernel code coverage. **Workflow:** list kernel extensions with `v3GetInstanceKcrange`, start tracing with the `ranges` you want (this call), exercise the device, stop with `v3StopHyperTrace`, then download with `v3BtracePreauthorize`. Clear old output with `v3ClearHyperTrace`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_btrace_body: (required) + :type enable_btrace_body: EnableBtraceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_hyper_trace_serialize( + instance_id=instance_id, + enable_btrace_body=enable_btrace_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_hyper_trace_serialize( + self, + instance_id, + enable_btrace_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if enable_btrace_body is not None: + _body_params = enable_btrace_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/btrace/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_stop_hyper_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop HyperTrace + + Stops HyperTrace on this device. The trace recorded so far is kept for download with `v3BtracePreauthorize`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_stop_hyper_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop HyperTrace + + Stops HyperTrace on this device. The trace recorded so far is kept for download with `v3BtracePreauthorize`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_stop_hyper_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop HyperTrace + + Stops HyperTrace on this device. The trace recorded so far is kept for download with `v3BtracePreauthorize`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_stop_hyper_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/btrace/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/hyper_trace_v1_api.py b/corellium/api/hyper_trace_v1_api.py new file mode 100644 index 0000000..461b975 --- /dev/null +++ b/corellium/api/hyper_trace_v1_api.py @@ -0,0 +1,1627 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.btrace_enable_options import BtraceEnableOptions +from corellium.models.kcrange_v1 import KcrangeV1 +from corellium.models.token_v1 import TokenV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class HyperTraceV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_btrace_preauthorize( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TokenV1: + """(Deprecated) Pre-authorize an btrace download + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/btrace-authorize is deprecated.", DeprecationWarning) + + _param = self._v1_btrace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_btrace_preauthorize_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TokenV1]: + """(Deprecated) Pre-authorize an btrace download + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/btrace-authorize is deprecated.", DeprecationWarning) + + _param = self._v1_btrace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_btrace_preauthorize_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Pre-authorize an btrace download + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/btrace-authorize is deprecated.", DeprecationWarning) + + _param = self._v1_btrace_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_btrace_preauthorize_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/btrace-authorize', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_clear_hyper_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Clear HyperTrace logs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/btrace is deprecated.", DeprecationWarning) + + _param = self._v1_clear_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_clear_hyper_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Clear HyperTrace logs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/btrace is deprecated.", DeprecationWarning) + + _param = self._v1_clear_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_clear_hyper_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Clear HyperTrace logs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/btrace is deprecated.", DeprecationWarning) + + _param = self._v1_clear_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_clear_hyper_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}/btrace', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_kcrange( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[KcrangeV1]: + """(Deprecated) Get Kernel extension ranges + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/btrace-kcrange is deprecated.", DeprecationWarning) + + _param = self._v1_kcrange_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KcrangeV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_kcrange_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[KcrangeV1]]: + """(Deprecated) Get Kernel extension ranges + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/btrace-kcrange is deprecated.", DeprecationWarning) + + _param = self._v1_kcrange_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KcrangeV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_kcrange_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Kernel extension ranges + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/btrace-kcrange is deprecated.", DeprecationWarning) + + _param = self._v1_kcrange_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[KcrangeV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_kcrange_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/btrace-kcrange', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_start_hyper_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + btrace_enable_options: BtraceEnableOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Start HyperTrace on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param btrace_enable_options: (required) + :type btrace_enable_options: BtraceEnableOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/btrace/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_hyper_trace_serialize( + instance_id=instance_id, + btrace_enable_options=btrace_enable_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_start_hyper_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + btrace_enable_options: BtraceEnableOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Start HyperTrace on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param btrace_enable_options: (required) + :type btrace_enable_options: BtraceEnableOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/btrace/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_hyper_trace_serialize( + instance_id=instance_id, + btrace_enable_options=btrace_enable_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_start_hyper_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + btrace_enable_options: BtraceEnableOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start HyperTrace on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param btrace_enable_options: (required) + :type btrace_enable_options: BtraceEnableOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/btrace/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_hyper_trace_serialize( + instance_id=instance_id, + btrace_enable_options=btrace_enable_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_start_hyper_trace_serialize( + self, + instance_id, + btrace_enable_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if btrace_enable_options is not None: + _body_params = btrace_enable_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/btrace/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_stop_hyper_trace( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Stop HyperTrace on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/btrace/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_stop_hyper_trace_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Stop HyperTrace on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/btrace/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_stop_hyper_trace_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Stop HyperTrace on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/btrace/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_hyper_trace_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_stop_hyper_trace_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/btrace/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/hypertune_api.py b/corellium/api/hypertune_api.py new file mode 100644 index 0000000..e89d647 --- /dev/null +++ b/corellium/api/hypertune_api.py @@ -0,0 +1,725 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from corellium.models.hypertune_hash_response import HypertuneHashResponse +from corellium.models.hypertune_init_response import HypertuneInitResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class HypertuneApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_hypertune_hash( + self, + token: Annotated[Optional[StrictStr], Field(description="Hypertune access token.")] = None, + branch: Annotated[Optional[StrictStr], Field(description="Hypertune branch name.")] = None, + body: Annotated[Optional[StrictStr], Field(description="URL-encoded Hypertune SDK request body.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HypertuneHashResponse: + """Get Hypertune state hash + + Returns a short fingerprint of the current feature-flag settings for this cluster. The web interface compares it with its cached copy and downloads the full settings with `v3HypertuneInit` only when it changes. Most API clients do not need this. + + :param token: Hypertune access token. + :type token: str + :param branch: Hypertune branch name. + :type branch: str + :param body: URL-encoded Hypertune SDK request body. + :type body: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_hypertune_hash_serialize( + token=token, + branch=branch, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HypertuneHashResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_hypertune_hash_with_http_info( + self, + token: Annotated[Optional[StrictStr], Field(description="Hypertune access token.")] = None, + branch: Annotated[Optional[StrictStr], Field(description="Hypertune branch name.")] = None, + body: Annotated[Optional[StrictStr], Field(description="URL-encoded Hypertune SDK request body.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HypertuneHashResponse]: + """Get Hypertune state hash + + Returns a short fingerprint of the current feature-flag settings for this cluster. The web interface compares it with its cached copy and downloads the full settings with `v3HypertuneInit` only when it changes. Most API clients do not need this. + + :param token: Hypertune access token. + :type token: str + :param branch: Hypertune branch name. + :type branch: str + :param body: URL-encoded Hypertune SDK request body. + :type body: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_hypertune_hash_serialize( + token=token, + branch=branch, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HypertuneHashResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_hypertune_hash_without_preload_content( + self, + token: Annotated[Optional[StrictStr], Field(description="Hypertune access token.")] = None, + branch: Annotated[Optional[StrictStr], Field(description="Hypertune branch name.")] = None, + body: Annotated[Optional[StrictStr], Field(description="URL-encoded Hypertune SDK request body.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Hypertune state hash + + Returns a short fingerprint of the current feature-flag settings for this cluster. The web interface compares it with its cached copy and downloads the full settings with `v3HypertuneInit` only when it changes. Most API clients do not need this. + + :param token: Hypertune access token. + :type token: str + :param branch: Hypertune branch name. + :type branch: str + :param body: URL-encoded Hypertune SDK request body. + :type body: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_hypertune_hash_serialize( + token=token, + branch=branch, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HypertuneHashResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_hypertune_hash_serialize( + self, + token, + branch, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token is not None: + + _query_params.append(('token', token)) + + if branch is not None: + + _query_params.append(('branch', branch)) + + if body is not None: + + _query_params.append(('body', body)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/hypertune/hash', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_hypertune_init( + self, + token: Annotated[Optional[StrictStr], Field(description="Hypertune access token.")] = None, + branch: Annotated[Optional[StrictStr], Field(description="Hypertune branch name.")] = None, + body: Annotated[Optional[StrictStr], Field(description="URL-encoded Hypertune SDK request body.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HypertuneInitResponse: + """Get Hypertune initialization data + + Returns the full feature-flag settings for this cluster, which the web interface uses to decide which features to show. Most API clients do not need this; use `GET /v3/config` to learn what a deployment supports. + + :param token: Hypertune access token. + :type token: str + :param branch: Hypertune branch name. + :type branch: str + :param body: URL-encoded Hypertune SDK request body. + :type body: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_hypertune_init_serialize( + token=token, + branch=branch, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HypertuneInitResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_hypertune_init_with_http_info( + self, + token: Annotated[Optional[StrictStr], Field(description="Hypertune access token.")] = None, + branch: Annotated[Optional[StrictStr], Field(description="Hypertune branch name.")] = None, + body: Annotated[Optional[StrictStr], Field(description="URL-encoded Hypertune SDK request body.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HypertuneInitResponse]: + """Get Hypertune initialization data + + Returns the full feature-flag settings for this cluster, which the web interface uses to decide which features to show. Most API clients do not need this; use `GET /v3/config` to learn what a deployment supports. + + :param token: Hypertune access token. + :type token: str + :param branch: Hypertune branch name. + :type branch: str + :param body: URL-encoded Hypertune SDK request body. + :type body: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_hypertune_init_serialize( + token=token, + branch=branch, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HypertuneInitResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_hypertune_init_without_preload_content( + self, + token: Annotated[Optional[StrictStr], Field(description="Hypertune access token.")] = None, + branch: Annotated[Optional[StrictStr], Field(description="Hypertune branch name.")] = None, + body: Annotated[Optional[StrictStr], Field(description="URL-encoded Hypertune SDK request body.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Hypertune initialization data + + Returns the full feature-flag settings for this cluster, which the web interface uses to decide which features to show. Most API clients do not need this; use `GET /v3/config` to learn what a deployment supports. + + :param token: Hypertune access token. + :type token: str + :param branch: Hypertune branch name. + :type branch: str + :param body: URL-encoded Hypertune SDK request body. + :type body: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_hypertune_init_serialize( + token=token, + branch=branch, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HypertuneInitResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_hypertune_init_serialize( + self, + token, + branch, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token is not None: + + _query_params.append(('token', token)) + + if branch is not None: + + _query_params.append(('branch', branch)) + + if body is not None: + + _query_params.append(('body', body)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/hypertune/init', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/hypervisor_hooks_api.py b/corellium/api/hypervisor_hooks_api.py new file mode 100644 index 0000000..f39899c --- /dev/null +++ b/corellium/api/hypervisor_hooks_api.py @@ -0,0 +1,2340 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from corellium.models.create_hook_body import CreateHookBody +from corellium.models.hook import Hook +from corellium.models.hook_list import HookList +from corellium.models.update_hook_body import UpdateHookBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class HypervisorHooksApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_clear_hyper_trace_hooks( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop hypervisor hooks + + Deactivates the hypervisor hooks on this device, so they stop running. The hook definitions are kept and can be activated again with `v3ExecuteHyperTraceHooks`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_clear_hyper_trace_hooks_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop hypervisor hooks + + Deactivates the hypervisor hooks on this device, so they stop running. The hook definitions are kept and can be activated again with `v3ExecuteHyperTraceHooks`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_clear_hyper_trace_hooks_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop hypervisor hooks + + Deactivates the hypervisor hooks on this device, so they stop running. The hook definitions are kept and can be activated again with `v3ExecuteHyperTraceHooks`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_clear_hyper_trace_hooks_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/hooks/clear', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_create_hook( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + create_hook_body: CreateHookBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Hook: + """Create a hypervisor hook for an instance + + Adds a hypervisor hook to a device: the `patch` code runs each time the device executes `address`. Hooks are enabled by default. Activate the device's hooks with `POST /v3/instances/{instanceId}/hooks/execute` and deactivate them with `.../hooks/clear`. Returns 201 with the new hook. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param create_hook_body: (required) + :type create_hook_body: CreateHookBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_hook_serialize( + instance_id=instance_id, + create_hook_body=create_hook_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Hook", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_hook_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + create_hook_body: CreateHookBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Hook]: + """Create a hypervisor hook for an instance + + Adds a hypervisor hook to a device: the `patch` code runs each time the device executes `address`. Hooks are enabled by default. Activate the device's hooks with `POST /v3/instances/{instanceId}/hooks/execute` and deactivate them with `.../hooks/clear`. Returns 201 with the new hook. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param create_hook_body: (required) + :type create_hook_body: CreateHookBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_hook_serialize( + instance_id=instance_id, + create_hook_body=create_hook_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Hook", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_hook_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + create_hook_body: CreateHookBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a hypervisor hook for an instance + + Adds a hypervisor hook to a device: the `patch` code runs each time the device executes `address`. Hooks are enabled by default. Activate the device's hooks with `POST /v3/instances/{instanceId}/hooks/execute` and deactivate them with `.../hooks/clear`. Returns 201 with the new hook. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param create_hook_body: (required) + :type create_hook_body: CreateHookBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_hook_serialize( + instance_id=instance_id, + create_hook_body=create_hook_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Hook", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_hook_serialize( + self, + instance_id, + create_hook_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_hook_body is not None: + _body_params = create_hook_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/hooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_hook( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a hypervisor hook + + Deletes a hypervisor hook from its device. Deletes are idempotent: an unknown `hookId`, or a hook that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_hook_with_http_info( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a hypervisor hook + + Deletes a hypervisor hook from its device. Deletes are idempotent: an unknown `hookId`, or a hook that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_hook_without_preload_content( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a hypervisor hook + + Deletes a hypervisor hook from its device. Deletes are idempotent: an unknown `hookId`, or a hook that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_hook_serialize( + self, + hook_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if hook_id is not None: + _path_params['hookId'] = hook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/hooks/{hookId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_execute_hyper_trace_hooks( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Run hypervisor hooks + + Activates the hypervisor hooks configured for this device. A hook is a small patch, written in a C-like (`csmfcc`) or assembly-like (`csmfvm`) language, that runs whenever the device executes a chosen memory address; create and manage hooks with the Hypervisor Hooks endpoints (`POST /v3/instances/{instanceId}/hooks`). Only hooks marked `enabled` run. Does nothing if no hooks are configured. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_execute_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_execute_hyper_trace_hooks_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Run hypervisor hooks + + Activates the hypervisor hooks configured for this device. A hook is a small patch, written in a C-like (`csmfcc`) or assembly-like (`csmfvm`) language, that runs whenever the device executes a chosen memory address; create and manage hooks with the Hypervisor Hooks endpoints (`POST /v3/instances/{instanceId}/hooks`). Only hooks marked `enabled` run. Does nothing if no hooks are configured. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_execute_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_execute_hyper_trace_hooks_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Run hypervisor hooks + + Activates the hypervisor hooks configured for this device. A hook is a small patch, written in a C-like (`csmfcc`) or assembly-like (`csmfvm`) language, that runs whenever the device executes a chosen memory address; create and manage hooks with the Hypervisor Hooks endpoints (`POST /v3/instances/{instanceId}/hooks`). Only hooks marked `enabled` run. Does nothing if no hooks are configured. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_execute_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_execute_hyper_trace_hooks_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/hooks/execute', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_hook( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Hook: + """Get a hypervisor hook by ID + + Returns one hypervisor hook, including its address, patch code and whether it is enabled. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Hook", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_hook_with_http_info( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Hook]: + """Get a hypervisor hook by ID + + Returns one hypervisor hook, including its address, patch code and whether it is enabled. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Hook", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_hook_without_preload_content( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a hypervisor hook by ID + + Returns one hypervisor hook, including its address, patch code and whether it is enabled. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Hook", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_hook_serialize( + self, + hook_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if hook_id is not None: + _path_params['hookId'] = hook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/hooks/{hookId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_hooks( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order by creation date.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HookList: + """List hypervisor hooks for an instance + + Lists the hypervisor hooks set up on a device. A hook is a small piece of code, written in a C-like or assembly-like language, that the hypervisor runs whenever the device executes a chosen memory address, without changing the software on the device. Use hooks to log values, change behavior, or bypass checks while testing. Results are paginated; `sort` orders them by creation date. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order by creation date. + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_hooks_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookList", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_hooks_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order by creation date.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HookList]: + """List hypervisor hooks for an instance + + Lists the hypervisor hooks set up on a device. A hook is a small piece of code, written in a C-like or assembly-like language, that the hypervisor runs whenever the device executes a chosen memory address, without changing the software on the device. Use hooks to log values, change behavior, or bypass checks while testing. Results are paginated; `sort` orders them by creation date. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order by creation date. + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_hooks_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookList", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_hooks_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order by creation date.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List hypervisor hooks for an instance + + Lists the hypervisor hooks set up on a device. A hook is a small piece of code, written in a C-like or assembly-like language, that the hypervisor runs whenever the device executes a chosen memory address, without changing the software on the device. Use hooks to log values, change behavior, or bypass checks while testing. Results are paginated; `sort` orders them by creation date. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order by creation date. + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_hooks_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookList", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_hooks_serialize( + self, + instance_id, + limit, + offset, + sort, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/hooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_update_hook( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + update_hook_body: Optional[UpdateHookBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Hook: + """Update a hypervisor hook + + Changes a hypervisor hook. Send only the fields you want to change, for example `enabled: false` to switch it off without deleting it. Returns the updated hook. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param update_hook_body: + :type update_hook_body: UpdateHookBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_hook_serialize( + hook_id=hook_id, + update_hook_body=update_hook_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Hook", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_update_hook_with_http_info( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + update_hook_body: Optional[UpdateHookBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Hook]: + """Update a hypervisor hook + + Changes a hypervisor hook. Send only the fields you want to change, for example `enabled: false` to switch it off without deleting it. Returns the updated hook. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param update_hook_body: + :type update_hook_body: UpdateHookBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_hook_serialize( + hook_id=hook_id, + update_hook_body=update_hook_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Hook", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_update_hook_without_preload_content( + self, + hook_id: Annotated[StrictStr, Field(description="Hook identifier.")], + update_hook_body: Optional[UpdateHookBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a hypervisor hook + + Changes a hypervisor hook. Send only the fields you want to change, for example `enabled: false` to switch it off without deleting it. Returns the updated hook. + + :param hook_id: Hook identifier. (required) + :type hook_id: str + :param update_hook_body: + :type update_hook_body: UpdateHookBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_hook_serialize( + hook_id=hook_id, + update_hook_body=update_hook_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Hook", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_update_hook_serialize( + self, + hook_id, + update_hook_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if hook_id is not None: + _path_params['hookId'] = hook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_hook_body is not None: + _body_params = update_hook_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/hooks/{hookId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/hypervisor_hooks_v1_api.py b/corellium/api/hypervisor_hooks_v1_api.py new file mode 100644 index 0000000..e2aec86 --- /dev/null +++ b/corellium/api/hypervisor_hooks_v1_api.py @@ -0,0 +1,2333 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import List, Optional, Union +from typing_extensions import Annotated +from corellium.models.hook_v1 import HookV1 +from corellium.models.v1_create_hook_parameters import V1CreateHookParameters +from corellium.models.v1_update_hook_parameters import V1UpdateHookParameters + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class HypervisorHooksV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_clear_hyper_trace_hooks( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Clear Hooks on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks/clear is deprecated.", DeprecationWarning) + + _param = self._v1_clear_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_clear_hyper_trace_hooks_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Clear Hooks on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks/clear is deprecated.", DeprecationWarning) + + _param = self._v1_clear_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_clear_hyper_trace_hooks_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Clear Hooks on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks/clear is deprecated.", DeprecationWarning) + + _param = self._v1_clear_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_clear_hyper_trace_hooks_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/hooks/clear', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_create_hook( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + v1_create_hook_parameters: Annotated[V1CreateHookParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HookV1: + """(Deprecated) Create hypervisor hook for Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param v1_create_hook_parameters: application/json (required) + :type v1_create_hook_parameters: V1CreateHookParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks is deprecated.", DeprecationWarning) + + _param = self._v1_create_hook_serialize( + instance_id=instance_id, + v1_create_hook_parameters=v1_create_hook_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_hook_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + v1_create_hook_parameters: Annotated[V1CreateHookParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HookV1]: + """(Deprecated) Create hypervisor hook for Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param v1_create_hook_parameters: application/json (required) + :type v1_create_hook_parameters: V1CreateHookParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks is deprecated.", DeprecationWarning) + + _param = self._v1_create_hook_serialize( + instance_id=instance_id, + v1_create_hook_parameters=v1_create_hook_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_hook_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + v1_create_hook_parameters: Annotated[V1CreateHookParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create hypervisor hook for Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param v1_create_hook_parameters: application/json (required) + :type v1_create_hook_parameters: V1CreateHookParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks is deprecated.", DeprecationWarning) + + _param = self._v1_create_hook_serialize( + instance_id=instance_id, + v1_create_hook_parameters=v1_create_hook_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_hook_serialize( + self, + instance_id, + v1_create_hook_parameters, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if v1_create_hook_parameters is not None: + _body_params = v1_create_hook_parameters + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/hooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_hook( + self, + hook_id: Annotated[StrictStr, Field(description="Hook ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete an existing hypervisor hook + + + :param hook_id: Hook ID (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_hook_with_http_info( + self, + hook_id: Annotated[StrictStr, Field(description="Hook ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete an existing hypervisor hook + + + :param hook_id: Hook ID (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_hook_without_preload_content( + self, + hook_id: Annotated[StrictStr, Field(description="Hook ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete an existing hypervisor hook + + + :param hook_id: Hook ID (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_hook_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_hook_serialize( + self, + hook_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if hook_id is not None: + _path_params['hookId'] = hook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/hooks/{hookId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_execute_hyper_trace_hooks( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Execute Hooks on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks/execute is deprecated.", DeprecationWarning) + + _param = self._v1_execute_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_execute_hyper_trace_hooks_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Execute Hooks on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks/execute is deprecated.", DeprecationWarning) + + _param = self._v1_execute_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_execute_hyper_trace_hooks_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Execute Hooks on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/hooks/execute is deprecated.", DeprecationWarning) + + _param = self._v1_execute_hyper_trace_hooks_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_execute_hyper_trace_hooks_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/hooks/execute', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_hook_by_id( + self, + hook_id: Annotated[StrictStr, Field(description="Hook Id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HookV1: + """(Deprecated) Get hypervisor hook by id + + + :param hook_id: Hook Id (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_hook_by_id_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_hook_by_id_with_http_info( + self, + hook_id: Annotated[StrictStr, Field(description="Hook Id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HookV1]: + """(Deprecated) Get hypervisor hook by id + + + :param hook_id: Hook Id (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_hook_by_id_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_hook_by_id_without_preload_content( + self, + hook_id: Annotated[StrictStr, Field(description="Hook Id")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get hypervisor hook by id + + + :param hook_id: Hook Id (required) + :type hook_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_hook_by_id_serialize( + hook_id=hook_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_hook_by_id_serialize( + self, + hook_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if hook_id is not None: + _path_params['hookId'] = hook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/hooks/{hookId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_hooks( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 20")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + sort: Annotated[Optional[StrictStr], Field(description="sort ASC or DESC, defaults to DESC")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[HookV1]: + """(Deprecated) Get all hypervisor hooks for Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param limit: limit for pagination results, defaults to 20 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param sort: sort ASC or DESC, defaults to DESC + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/hooks is deprecated.", DeprecationWarning) + + _param = self._v1_get_hooks_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[HookV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_hooks_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 20")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + sort: Annotated[Optional[StrictStr], Field(description="sort ASC or DESC, defaults to DESC")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[HookV1]]: + """(Deprecated) Get all hypervisor hooks for Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param limit: limit for pagination results, defaults to 20 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param sort: sort ASC or DESC, defaults to DESC + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/hooks is deprecated.", DeprecationWarning) + + _param = self._v1_get_hooks_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[HookV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_hooks_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="limit for pagination results, defaults to 20")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="offset for pagination results, defaults to 0")] = None, + sort: Annotated[Optional[StrictStr], Field(description="sort ASC or DESC, defaults to DESC")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get all hypervisor hooks for Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param limit: limit for pagination results, defaults to 20 + :type limit: float + :param offset: offset for pagination results, defaults to 0 + :type offset: float + :param sort: sort ASC or DESC, defaults to DESC + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/hooks is deprecated.", DeprecationWarning) + + _param = self._v1_get_hooks_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[HookV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_hooks_serialize( + self, + instance_id, + limit, + offset, + sort, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/hooks', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_hook( + self, + hook_id: Annotated[StrictStr, Field(description="Hook ID")], + v1_update_hook_parameters: Annotated[V1UpdateHookParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HookV1: + """(Deprecated) Update an existing hypervisor hook + + + :param hook_id: Hook ID (required) + :type hook_id: str + :param v1_update_hook_parameters: application/json (required) + :type v1_update_hook_parameters: V1UpdateHookParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_hook_serialize( + hook_id=hook_id, + v1_update_hook_parameters=v1_update_hook_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_hook_with_http_info( + self, + hook_id: Annotated[StrictStr, Field(description="Hook ID")], + v1_update_hook_parameters: Annotated[V1UpdateHookParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HookV1]: + """(Deprecated) Update an existing hypervisor hook + + + :param hook_id: Hook ID (required) + :type hook_id: str + :param v1_update_hook_parameters: application/json (required) + :type v1_update_hook_parameters: V1UpdateHookParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_hook_serialize( + hook_id=hook_id, + v1_update_hook_parameters=v1_update_hook_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_hook_without_preload_content( + self, + hook_id: Annotated[StrictStr, Field(description="Hook ID")], + v1_update_hook_parameters: Annotated[V1UpdateHookParameters, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update an existing hypervisor hook + + + :param hook_id: Hook ID (required) + :type hook_id: str + :param v1_update_hook_parameters: application/json (required) + :type v1_update_hook_parameters: V1UpdateHookParameters + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/hooks/{hookId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_hook_serialize( + hook_id=hook_id, + v1_update_hook_parameters=v1_update_hook_parameters, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HookV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_hook_serialize( + self, + hook_id, + v1_update_hook_parameters, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if hook_id is not None: + _path_params['hookId'] = hook_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if v1_update_hook_parameters is not None: + _body_params = v1_update_hook_parameters + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/hooks/{hookId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/images_api.py b/corellium/api/images_api.py new file mode 100644 index 0000000..e0d98e8 --- /dev/null +++ b/corellium/api/images_api.py @@ -0,0 +1,3943 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictStr +from typing import Any, Dict, Optional, Tuple, Union +from typing_extensions import Annotated +from corellium.models.create_image_body import CreateImageBody +from corellium.models.get_firmware_info_body import GetFirmwareInfoBody +from corellium.models.image import Image +from corellium.models.image_firmware_info import ImageFirmwareInfo +from corellium.models.image_list import ImageList +from corellium.models.install_firmware_assets_body import InstallFirmwareAssetsBody +from corellium.models.install_firmware_assets_response import InstallFirmwareAssetsResponse +from corellium.models.install_firmware_body import InstallFirmwareBody +from corellium.models.install_firmware_response import InstallFirmwareResponse +from corellium.models.install_firmware_status_response import InstallFirmwareStatusResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ImagesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_image( + self, + create_image_body: CreateImageBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Image: + """Create an image + + Creates an image: a stored file such as firmware, a kernel, a partition, or a MATRIX wordlist. Every upload starts here. The response is the new image, including its `id`. **Choosing how to upload the file:** - **Two steps (recommended).** Send this request as `application/json` without a file; it returns **201**. Then upload the contents with [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) (one request) or [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file) (in pieces, resumable, best for large files). This is the only way to have the server verify the file against a `corelliumChecksum`. - **One step.** Send this request as `multipart/form-data` with the file in a `file` part; it returns **200** once the file is stored. Put the `type` field before the `file` part. Convenient for small files, but no checksum verification. The response body is the same image in both cases; the status code (201 or 200) tells you whether the file was included. **Where the image lives** depends on the optional IDs: - `instanceId` set: attached to that device. Replaces the device's existing image of the same type. - `projectId` set: stored in that project and counted against its quota. - Neither: a domain-level image. Domain-level `fw` and `clbi` images are also offered when you create a device, in addition to installed firmware. See the `projectId` and `instanceId` fields for side effects. Other upload endpoints (`PUT /v3/projects/{projectId}/image-upload/...`, `PUT /v3/instances/{instanceId}/image-upload/...`, `PUT /v3/domain/image-upload/...`) use the same chunked protocol but create the image on the first chunk instead of requiring this call. They exist mainly for the web interface; new code should use this endpoint followed by [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). `name` is not unique; sending the same request twice creates two images. For firmware, continue with [`installFirmware`](#tag/images/POST/v3/images/install-firmware) or [`installFirmwareAssets`](#tag/images/POST/v3/images/install-firmware-assets). + + :param create_image_body: (required) + :type create_image_body: CreateImageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_image_serialize( + create_image_body=create_image_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '201': "Image", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_image_with_http_info( + self, + create_image_body: CreateImageBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Image]: + """Create an image + + Creates an image: a stored file such as firmware, a kernel, a partition, or a MATRIX wordlist. Every upload starts here. The response is the new image, including its `id`. **Choosing how to upload the file:** - **Two steps (recommended).** Send this request as `application/json` without a file; it returns **201**. Then upload the contents with [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) (one request) or [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file) (in pieces, resumable, best for large files). This is the only way to have the server verify the file against a `corelliumChecksum`. - **One step.** Send this request as `multipart/form-data` with the file in a `file` part; it returns **200** once the file is stored. Put the `type` field before the `file` part. Convenient for small files, but no checksum verification. The response body is the same image in both cases; the status code (201 or 200) tells you whether the file was included. **Where the image lives** depends on the optional IDs: - `instanceId` set: attached to that device. Replaces the device's existing image of the same type. - `projectId` set: stored in that project and counted against its quota. - Neither: a domain-level image. Domain-level `fw` and `clbi` images are also offered when you create a device, in addition to installed firmware. See the `projectId` and `instanceId` fields for side effects. Other upload endpoints (`PUT /v3/projects/{projectId}/image-upload/...`, `PUT /v3/instances/{instanceId}/image-upload/...`, `PUT /v3/domain/image-upload/...`) use the same chunked protocol but create the image on the first chunk instead of requiring this call. They exist mainly for the web interface; new code should use this endpoint followed by [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). `name` is not unique; sending the same request twice creates two images. For firmware, continue with [`installFirmware`](#tag/images/POST/v3/images/install-firmware) or [`installFirmwareAssets`](#tag/images/POST/v3/images/install-firmware-assets). + + :param create_image_body: (required) + :type create_image_body: CreateImageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_image_serialize( + create_image_body=create_image_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '201': "Image", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_image_without_preload_content( + self, + create_image_body: CreateImageBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an image + + Creates an image: a stored file such as firmware, a kernel, a partition, or a MATRIX wordlist. Every upload starts here. The response is the new image, including its `id`. **Choosing how to upload the file:** - **Two steps (recommended).** Send this request as `application/json` without a file; it returns **201**. Then upload the contents with [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) (one request) or [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file) (in pieces, resumable, best for large files). This is the only way to have the server verify the file against a `corelliumChecksum`. - **One step.** Send this request as `multipart/form-data` with the file in a `file` part; it returns **200** once the file is stored. Put the `type` field before the `file` part. Convenient for small files, but no checksum verification. The response body is the same image in both cases; the status code (201 or 200) tells you whether the file was included. **Where the image lives** depends on the optional IDs: - `instanceId` set: attached to that device. Replaces the device's existing image of the same type. - `projectId` set: stored in that project and counted against its quota. - Neither: a domain-level image. Domain-level `fw` and `clbi` images are also offered when you create a device, in addition to installed firmware. See the `projectId` and `instanceId` fields for side effects. Other upload endpoints (`PUT /v3/projects/{projectId}/image-upload/...`, `PUT /v3/instances/{instanceId}/image-upload/...`, `PUT /v3/domain/image-upload/...`) use the same chunked protocol but create the image on the first chunk instead of requiring this call. They exist mainly for the web interface; new code should use this endpoint followed by [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). `name` is not unique; sending the same request twice creates two images. For firmware, continue with [`installFirmware`](#tag/images/POST/v3/images/install-firmware) or [`installFirmwareAssets`](#tag/images/POST/v3/images/install-firmware-assets). + + :param create_image_body: (required) + :type create_image_body: CreateImageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_image_serialize( + create_image_body=create_image_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '201': "Image", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_image_serialize( + self, + create_image_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_image_body is not None: + _body_params = create_image_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/images', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_image( + self, + image_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an image + + Permanently deletes the image. This action cannot be undone. Deletion is synchronous. Deletes are idempotent: an unknown `imageId`, or an image that has already been deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param image_id: (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_image_with_http_info( + self, + image_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an image + + Permanently deletes the image. This action cannot be undone. Deletion is synchronous. Deletes are idempotent: an unknown `imageId`, or an image that has already been deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param image_id: (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_image_without_preload_content( + self, + image_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an image + + Permanently deletes the image. This action cannot be undone. Deletion is synchronous. Deletes are idempotent: an unknown `imageId`, or an image that has already been deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param image_id: (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_image_serialize( + self, + image_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/images/{imageId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_image( + self, + image_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Image: + """Get image metadata + + Returns metadata for a single image. File contents are not returned by this endpoint. + + :param image_id: (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_image_with_http_info( + self, + image_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Image]: + """Get image metadata + + Returns metadata for a single image. File contents are not returned by this endpoint. + + :param image_id: (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_image_without_preload_content( + self, + image_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get image metadata + + Returns metadata for a single image. File contents are not returned by this endpoint. + + :param image_id: (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_image_serialize( + self, + image_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/images/{imageId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_image_chunk( + self, + image_id: StrictStr, + resumable_chunk_number: Annotated[int, Field(strict=True, gt=0, description="Chunk sequence number.")], + resumable_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of each chunk.")], + resumable_current_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of the current chunk.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Check whether an image chunk was already uploaded + + Probes whether a single chunk of a chunked upload is already stored, so an interrupted upload can resume without re-sending data. Used together with [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). Returns 200 when the chunk is present and 204 when it still needs to be uploaded. The chunk is identified exactly as in the upload request, by `resumableChunkNumber`, `resumableChunkSize` and `resumableCurrentChunkSize`, all of which are required. The image must already exist; an unknown `imageId` is a 404 rather than a 204. + + :param image_id: (required) + :type image_id: str + :param resumable_chunk_number: Chunk sequence number. (required) + :type resumable_chunk_number: float + :param resumable_chunk_size: Size of each chunk. (required) + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Size of the current chunk. (required) + :type resumable_current_chunk_size: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_chunk_serialize( + image_id=image_id, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_image_chunk_with_http_info( + self, + image_id: StrictStr, + resumable_chunk_number: Annotated[int, Field(strict=True, gt=0, description="Chunk sequence number.")], + resumable_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of each chunk.")], + resumable_current_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of the current chunk.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Check whether an image chunk was already uploaded + + Probes whether a single chunk of a chunked upload is already stored, so an interrupted upload can resume without re-sending data. Used together with [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). Returns 200 when the chunk is present and 204 when it still needs to be uploaded. The chunk is identified exactly as in the upload request, by `resumableChunkNumber`, `resumableChunkSize` and `resumableCurrentChunkSize`, all of which are required. The image must already exist; an unknown `imageId` is a 404 rather than a 204. + + :param image_id: (required) + :type image_id: str + :param resumable_chunk_number: Chunk sequence number. (required) + :type resumable_chunk_number: float + :param resumable_chunk_size: Size of each chunk. (required) + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Size of the current chunk. (required) + :type resumable_current_chunk_size: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_chunk_serialize( + image_id=image_id, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_image_chunk_without_preload_content( + self, + image_id: StrictStr, + resumable_chunk_number: Annotated[int, Field(strict=True, gt=0, description="Chunk sequence number.")], + resumable_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of each chunk.")], + resumable_current_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of the current chunk.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check whether an image chunk was already uploaded + + Probes whether a single chunk of a chunked upload is already stored, so an interrupted upload can resume without re-sending data. Used together with [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). Returns 200 when the chunk is present and 204 when it still needs to be uploaded. The chunk is identified exactly as in the upload request, by `resumableChunkNumber`, `resumableChunkSize` and `resumableCurrentChunkSize`, all of which are required. The image must already exist; an unknown `imageId` is a 404 rather than a 204. + + :param image_id: (required) + :type image_id: str + :param resumable_chunk_number: Chunk sequence number. (required) + :type resumable_chunk_number: float + :param resumable_chunk_size: Size of each chunk. (required) + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Size of the current chunk. (required) + :type resumable_current_chunk_size: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_chunk_serialize( + image_id=image_id, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_image_chunk_serialize( + self, + image_id, + resumable_chunk_number, + resumable_chunk_size, + resumable_current_chunk_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + if resumable_chunk_number is not None: + + _query_params.append(('resumableChunkNumber', resumable_chunk_number)) + + if resumable_chunk_size is not None: + + _query_params.append(('resumableChunkSize', resumable_chunk_size)) + + if resumable_current_chunk_size is not None: + + _query_params.append(('resumableCurrentChunkSize', resumable_current_chunk_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/images/{imageId}/file', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_image_firmware_info( + self, + image_id: StrictStr, + get_firmware_info_body: Annotated[Optional[GetFirmwareInfoBody], Field(description="Optional decryption password and extended-info flag.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ImageFirmwareInfo: + """Get firmware info embedded in an image + + Reads the version information built into an uploaded firmware file, without installing it or creating a device. Use it to check what a file is before you install it or create a device from it: which operating-system version and build it contains, and which device models it supports. Works on these kinds of uploaded files: an Apple iOS firmware file (IPSW), a Corellium firmware package (`.coreimg`), a Cellebrite firmware image, a Cellebrite extraction (UFD), and a Corellium extension. The image must be fully uploaded first; see [`createImage`](#tag/images/POST/v3/images). The request body is optional: - `password`: needed only if the file is encrypted. A wrong password returns 400. - `extended`: set to `true` to also get chip and board details and the supported device model this firmware matches (`device`). Use the matched model's `flavor` when you create an instance. Returns 404 if the image does not exist, or if the file contains no version information that can be read (for example, it is not firmware). + + :param image_id: (required) + :type image_id: str + :param get_firmware_info_body: Optional decryption password and extended-info flag. + :type get_firmware_info_body: GetFirmwareInfoBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_firmware_info_serialize( + image_id=image_id, + get_firmware_info_body=get_firmware_info_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageFirmwareInfo", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_image_firmware_info_with_http_info( + self, + image_id: StrictStr, + get_firmware_info_body: Annotated[Optional[GetFirmwareInfoBody], Field(description="Optional decryption password and extended-info flag.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ImageFirmwareInfo]: + """Get firmware info embedded in an image + + Reads the version information built into an uploaded firmware file, without installing it or creating a device. Use it to check what a file is before you install it or create a device from it: which operating-system version and build it contains, and which device models it supports. Works on these kinds of uploaded files: an Apple iOS firmware file (IPSW), a Corellium firmware package (`.coreimg`), a Cellebrite firmware image, a Cellebrite extraction (UFD), and a Corellium extension. The image must be fully uploaded first; see [`createImage`](#tag/images/POST/v3/images). The request body is optional: - `password`: needed only if the file is encrypted. A wrong password returns 400. - `extended`: set to `true` to also get chip and board details and the supported device model this firmware matches (`device`). Use the matched model's `flavor` when you create an instance. Returns 404 if the image does not exist, or if the file contains no version information that can be read (for example, it is not firmware). + + :param image_id: (required) + :type image_id: str + :param get_firmware_info_body: Optional decryption password and extended-info flag. + :type get_firmware_info_body: GetFirmwareInfoBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_firmware_info_serialize( + image_id=image_id, + get_firmware_info_body=get_firmware_info_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageFirmwareInfo", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_image_firmware_info_without_preload_content( + self, + image_id: StrictStr, + get_firmware_info_body: Annotated[Optional[GetFirmwareInfoBody], Field(description="Optional decryption password and extended-info flag.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get firmware info embedded in an image + + Reads the version information built into an uploaded firmware file, without installing it or creating a device. Use it to check what a file is before you install it or create a device from it: which operating-system version and build it contains, and which device models it supports. Works on these kinds of uploaded files: an Apple iOS firmware file (IPSW), a Corellium firmware package (`.coreimg`), a Cellebrite firmware image, a Cellebrite extraction (UFD), and a Corellium extension. The image must be fully uploaded first; see [`createImage`](#tag/images/POST/v3/images). The request body is optional: - `password`: needed only if the file is encrypted. A wrong password returns 400. - `extended`: set to `true` to also get chip and board details and the supported device model this firmware matches (`device`). Use the matched model's `flavor` when you create an instance. Returns 404 if the image does not exist, or if the file contains no version information that can be read (for example, it is not firmware). + + :param image_id: (required) + :type image_id: str + :param get_firmware_info_body: Optional decryption password and extended-info flag. + :type get_firmware_info_body: GetFirmwareInfoBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_image_firmware_info_serialize( + image_id=image_id, + get_firmware_info_body=get_firmware_info_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageFirmwareInfo", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_image_firmware_info_serialize( + self, + image_id, + get_firmware_info_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if get_firmware_info_body is not None: + _body_params = get_firmware_info_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/images/{imageId}/fwinfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_install_firmware_status( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstallFirmwareStatusResponse: + """Get install-firmware task status + + Returns the current status of a firmware installation task previously created via [`installFirmware`](#tag/images/POST/v3/images/install-firmware). Clients should poll this endpoint until `status` is `complete` or `error`. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_install_firmware_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareStatusResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_install_firmware_status_with_http_info( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstallFirmwareStatusResponse]: + """Get install-firmware task status + + Returns the current status of a firmware installation task previously created via [`installFirmware`](#tag/images/POST/v3/images/install-firmware). Clients should poll this endpoint until `status` is `complete` or `error`. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_install_firmware_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareStatusResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_install_firmware_status_without_preload_content( + self, + task_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get install-firmware task status + + Returns the current status of a firmware installation task previously created via [`installFirmware`](#tag/images/POST/v3/images/install-firmware). Clients should poll this endpoint until `status` is `complete` or `error`. + + :param task_id: (required) + :type task_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_install_firmware_status_serialize( + task_id=task_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareStatusResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_install_firmware_status_serialize( + self, + task_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if task_id is not None: + _path_params['taskId'] = task_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/images/install-firmware/{taskId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_install_firmware( + self, + install_firmware_body: InstallFirmwareBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstallFirmwareResponse: + """Install firmware cluster-wide + + Makes an uploaded `fw` image available for creating devices across the whole cluster. After it is installed, the firmware appears in `GET /v3/models/{model}/software` for the matching model and can be chosen when creating an instance. **Workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ \"name\": \"...\", \"type\": \"fw\", \"encoding\": \"plain\" }` as JSON. Keep the returned `id`. 2. Upload the file with [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) or, for large files, [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). Supplying `corelliumChecksum` there lets the server verify the file. 3. **`installFirmware`** with `{ \"imageId\": \"\" }`. Returns a `taskId`. 4. Poll [`getInstallFirmwareStatus`](#tag/images/GET/v3/images/install-firmware/{taskId}) with the `taskId` until `status` is `complete` or `error`. **What happens.** The server hands the file to the firmware service and returns 201 with a `taskId` as soon as the hand-off succeeds; installation continues in the background and can take a long time (up to 45 minutes for files around 10 GB). The source image is deleted from `/v3/images` at the moment of hand-off, before installation finishes. If installation then fails, upload the file again to retry. A 400 can mean the firmware service rejected the image's checksum. Check that the file uploaded completely and, if you supplied `corelliumChecksum`, that it was correct. + + :param install_firmware_body: (required) + :type install_firmware_body: InstallFirmwareBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_firmware_serialize( + install_firmware_body=install_firmware_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_install_firmware_with_http_info( + self, + install_firmware_body: InstallFirmwareBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstallFirmwareResponse]: + """Install firmware cluster-wide + + Makes an uploaded `fw` image available for creating devices across the whole cluster. After it is installed, the firmware appears in `GET /v3/models/{model}/software` for the matching model and can be chosen when creating an instance. **Workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ \"name\": \"...\", \"type\": \"fw\", \"encoding\": \"plain\" }` as JSON. Keep the returned `id`. 2. Upload the file with [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) or, for large files, [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). Supplying `corelliumChecksum` there lets the server verify the file. 3. **`installFirmware`** with `{ \"imageId\": \"\" }`. Returns a `taskId`. 4. Poll [`getInstallFirmwareStatus`](#tag/images/GET/v3/images/install-firmware/{taskId}) with the `taskId` until `status` is `complete` or `error`. **What happens.** The server hands the file to the firmware service and returns 201 with a `taskId` as soon as the hand-off succeeds; installation continues in the background and can take a long time (up to 45 minutes for files around 10 GB). The source image is deleted from `/v3/images` at the moment of hand-off, before installation finishes. If installation then fails, upload the file again to retry. A 400 can mean the firmware service rejected the image's checksum. Check that the file uploaded completely and, if you supplied `corelliumChecksum`, that it was correct. + + :param install_firmware_body: (required) + :type install_firmware_body: InstallFirmwareBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_firmware_serialize( + install_firmware_body=install_firmware_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_install_firmware_without_preload_content( + self, + install_firmware_body: InstallFirmwareBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Install firmware cluster-wide + + Makes an uploaded `fw` image available for creating devices across the whole cluster. After it is installed, the firmware appears in `GET /v3/models/{model}/software` for the matching model and can be chosen when creating an instance. **Workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ \"name\": \"...\", \"type\": \"fw\", \"encoding\": \"plain\" }` as JSON. Keep the returned `id`. 2. Upload the file with [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) or, for large files, [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). Supplying `corelliumChecksum` there lets the server verify the file. 3. **`installFirmware`** with `{ \"imageId\": \"\" }`. Returns a `taskId`. 4. Poll [`getInstallFirmwareStatus`](#tag/images/GET/v3/images/install-firmware/{taskId}) with the `taskId` until `status` is `complete` or `error`. **What happens.** The server hands the file to the firmware service and returns 201 with a `taskId` as soon as the hand-off succeeds; installation continues in the background and can take a long time (up to 45 minutes for files around 10 GB). The source image is deleted from `/v3/images` at the moment of hand-off, before installation finishes. If installation then fails, upload the file again to retry. A 400 can mean the firmware service rejected the image's checksum. Check that the file uploaded completely and, if you supplied `corelliumChecksum`, that it was correct. + + :param install_firmware_body: (required) + :type install_firmware_body: InstallFirmwareBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_firmware_serialize( + install_firmware_body=install_firmware_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "InstallFirmwareResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_install_firmware_serialize( + self, + install_firmware_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if install_firmware_body is not None: + _body_params = install_firmware_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/images/install-firmware', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_install_firmware_assets( + self, + install_firmware_assets_body: InstallFirmwareAssetsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstallFirmwareAssetsResponse: + """Install firmware assets cluster-wide + + Installs an uploaded firmware-assets JSON blob for cluster-wide use. On success the source Image is deleted from the Images store. The blob is forwarded to the firmware service, which merges it into the cluster-wide firmware-assets manifest. **This is step 3 of the firmware-assets-install workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ name: 'fcs-keys.json', type: 'fwasset' }` → returns an `imageId`. 2. [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) with the assets file → uploads contents. 3. **`installFirmwareAssets`** with `{ imageId }` → installs the assets. Unlike [`installFirmware`](#tag/images/POST/v3/images/install-firmware), this endpoint completes synchronously and returns the firmware service's response message directly; there is no task to poll. + + :param install_firmware_assets_body: (required) + :type install_firmware_assets_body: InstallFirmwareAssetsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_firmware_assets_serialize( + install_firmware_assets_body=install_firmware_assets_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareAssetsResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_install_firmware_assets_with_http_info( + self, + install_firmware_assets_body: InstallFirmwareAssetsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstallFirmwareAssetsResponse]: + """Install firmware assets cluster-wide + + Installs an uploaded firmware-assets JSON blob for cluster-wide use. On success the source Image is deleted from the Images store. The blob is forwarded to the firmware service, which merges it into the cluster-wide firmware-assets manifest. **This is step 3 of the firmware-assets-install workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ name: 'fcs-keys.json', type: 'fwasset' }` → returns an `imageId`. 2. [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) with the assets file → uploads contents. 3. **`installFirmwareAssets`** with `{ imageId }` → installs the assets. Unlike [`installFirmware`](#tag/images/POST/v3/images/install-firmware), this endpoint completes synchronously and returns the firmware service's response message directly; there is no task to poll. + + :param install_firmware_assets_body: (required) + :type install_firmware_assets_body: InstallFirmwareAssetsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_firmware_assets_serialize( + install_firmware_assets_body=install_firmware_assets_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareAssetsResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_install_firmware_assets_without_preload_content( + self, + install_firmware_assets_body: InstallFirmwareAssetsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Install firmware assets cluster-wide + + Installs an uploaded firmware-assets JSON blob for cluster-wide use. On success the source Image is deleted from the Images store. The blob is forwarded to the firmware service, which merges it into the cluster-wide firmware-assets manifest. **This is step 3 of the firmware-assets-install workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ name: 'fcs-keys.json', type: 'fwasset' }` → returns an `imageId`. 2. [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) with the assets file → uploads contents. 3. **`installFirmwareAssets`** with `{ imageId }` → installs the assets. Unlike [`installFirmware`](#tag/images/POST/v3/images/install-firmware), this endpoint completes synchronously and returns the firmware service's response message directly; there is no task to poll. + + :param install_firmware_assets_body: (required) + :type install_firmware_assets_body: InstallFirmwareAssetsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_install_firmware_assets_serialize( + install_firmware_assets_body=install_firmware_assets_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstallFirmwareAssetsResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_install_firmware_assets_serialize( + self, + install_firmware_assets_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if install_firmware_assets_body is not None: + _body_params = install_firmware_assets_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/images/install-firmware-assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_images( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Filter results to a single project.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ImageList: + """List image metadata + + Lists the images you can see: images in your projects plus domain-level images. File contents are not included; use the download or upload endpoints for those. Set `projectId` to list only one project's images. Results are paginated with `limit` and `offset`. Installed firmware is not listed here: once `installFirmware` hands an image off, it disappears from this list and shows up in `GET /v3/models/{model}/software` instead. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param project_id: Filter results to a single project. + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_images_serialize( + limit=limit, + offset=offset, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageList", + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_images_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Filter results to a single project.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ImageList]: + """List image metadata + + Lists the images you can see: images in your projects plus domain-level images. File contents are not included; use the download or upload endpoints for those. Set `projectId` to list only one project's images. Results are paginated with `limit` and `offset`. Installed firmware is not listed here: once `installFirmware` hands an image off, it disappears from this list and shows up in `GET /v3/models/{model}/software` instead. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param project_id: Filter results to a single project. + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_images_serialize( + limit=limit, + offset=offset, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageList", + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_images_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Filter results to a single project.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List image metadata + + Lists the images you can see: images in your projects plus domain-level images. File contents are not included; use the download or upload endpoints for those. Set `projectId` to list only one project's images. Results are paginated with `limit` and `offset`. Installed firmware is not listed here: once `installFirmware` hands an image off, it disappears from this list and shows up in `GET /v3/models/{model}/software` instead. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param project_id: Filter results to a single project. + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_images_serialize( + limit=limit, + offset=offset, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageList", + '401': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_images_serialize( + self, + limit, + offset, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/images', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_upload_image_chunk( + self, + image_id: StrictStr, + resumable_chunk_number: Annotated[int, Field(strict=True, gt=0, description="Chunk sequence number.")], + resumable_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of each chunk.")], + resumable_current_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of the current chunk.")], + resumable_total_size: Annotated[int, Field(strict=True, gt=0, description="Total file size.")], + resumable_total_chunks: Annotated[int, Field(strict=True, gt=0, description="Total number of chunks.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_identifier: Annotated[Optional[StrictStr], Field(description="Client-side identifier of the file being uploaded.")] = None, + resumable_filename: Annotated[Optional[StrictStr], Field(description="Original filename.")] = None, + resumable_relative_path: Annotated[Optional[StrictStr], Field(description="Relative path.")] = None, + resumable_type: Annotated[Optional[StrictStr], Field(description="MIME type.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Expected Corellium checksum of the complete file, formatted `algorithm$blockSize$hash`. When supplied, every chunk is re-hashed and the upload is rejected (and the image removed) unless the recomputed checksum matches. The chunk size used for the upload must equal the block size embedded in the checksum. Required for `fw` uploads on airgapped deployments.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictStr], Field(description="Total size of the whole file in bytes. Send it on every chunk so the image-pool pre-flight check sees the full upload size rather than the size of a single chunk.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Upload one chunk of an image file + + Uploads a single chunk of an Image previously created via [`createImage`](#tag/images/POST/v3/images), using the resumable upload protocol. This is the recommended way to upload large images: the transfer survives interruptions, because any chunk can be re-sent and already-stored chunks can be skipped. **Chunked upload workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ name, type, encoding }` → returns an `imageId`. 2. Split the file into fixed-size chunks and **`uploadImageChunk`** each one with the `resumable*` query parameters describing it. Chunks may be uploaded in any order and concurrently. 3. Optionally probe a chunk with [`getImageChunk`](#tag/images/GET/v3/images/{imageId}/file) before (re-)sending it, so an interrupted upload only re-sends what is missing. The image is finalized automatically by the request that completes the chunk set, so the last chunk to arrive also validates `corelliumChecksum` (when supplied) and runs the firmware post-processing. Re-sending a chunk that was already stored is safe. If the upload fails for any reason other than a retryable transport error, the partially uploaded image is deleted, so the client must create a new image record before retrying. The image's `encoding` and `encapsulated` settings are fixed when the record is created by [`createImage`](#tag/images/POST/v3/images) and cannot be changed by a chunk request. + + :param image_id: (required) + :type image_id: str + :param resumable_chunk_number: Chunk sequence number. (required) + :type resumable_chunk_number: float + :param resumable_chunk_size: Size of each chunk. (required) + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Size of the current chunk. (required) + :type resumable_current_chunk_size: float + :param resumable_total_size: Total file size. (required) + :type resumable_total_size: float + :param resumable_total_chunks: Total number of chunks. (required) + :type resumable_total_chunks: float + :param body: (required) + :type body: bytearray + :param resumable_identifier: Client-side identifier of the file being uploaded. + :type resumable_identifier: str + :param resumable_filename: Original filename. + :type resumable_filename: str + :param resumable_relative_path: Relative path. + :type resumable_relative_path: str + :param resumable_type: MIME type. + :type resumable_type: str + :param corellium_checksum: Expected Corellium checksum of the complete file, formatted `algorithm$blockSize$hash`. When supplied, every chunk is re-hashed and the upload is rejected (and the image removed) unless the recomputed checksum matches. The chunk size used for the upload must equal the block size embedded in the checksum. Required for `fw` uploads on airgapped deployments. + :type corellium_checksum: str + :param x_corellium_total_file_size: Total size of the whole file in bytes. Send it on every chunk so the image-pool pre-flight check sees the full upload size rather than the size of a single chunk. + :type x_corellium_total_file_size: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_image_chunk_serialize( + image_id=image_id, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + body=body, + resumable_identifier=resumable_identifier, + resumable_filename=resumable_filename, + resumable_relative_path=resumable_relative_path, + resumable_type=resumable_type, + corellium_checksum=corellium_checksum, + x_corellium_total_file_size=x_corellium_total_file_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '413': "UploadSizeError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_upload_image_chunk_with_http_info( + self, + image_id: StrictStr, + resumable_chunk_number: Annotated[int, Field(strict=True, gt=0, description="Chunk sequence number.")], + resumable_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of each chunk.")], + resumable_current_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of the current chunk.")], + resumable_total_size: Annotated[int, Field(strict=True, gt=0, description="Total file size.")], + resumable_total_chunks: Annotated[int, Field(strict=True, gt=0, description="Total number of chunks.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_identifier: Annotated[Optional[StrictStr], Field(description="Client-side identifier of the file being uploaded.")] = None, + resumable_filename: Annotated[Optional[StrictStr], Field(description="Original filename.")] = None, + resumable_relative_path: Annotated[Optional[StrictStr], Field(description="Relative path.")] = None, + resumable_type: Annotated[Optional[StrictStr], Field(description="MIME type.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Expected Corellium checksum of the complete file, formatted `algorithm$blockSize$hash`. When supplied, every chunk is re-hashed and the upload is rejected (and the image removed) unless the recomputed checksum matches. The chunk size used for the upload must equal the block size embedded in the checksum. Required for `fw` uploads on airgapped deployments.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictStr], Field(description="Total size of the whole file in bytes. Send it on every chunk so the image-pool pre-flight check sees the full upload size rather than the size of a single chunk.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Upload one chunk of an image file + + Uploads a single chunk of an Image previously created via [`createImage`](#tag/images/POST/v3/images), using the resumable upload protocol. This is the recommended way to upload large images: the transfer survives interruptions, because any chunk can be re-sent and already-stored chunks can be skipped. **Chunked upload workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ name, type, encoding }` → returns an `imageId`. 2. Split the file into fixed-size chunks and **`uploadImageChunk`** each one with the `resumable*` query parameters describing it. Chunks may be uploaded in any order and concurrently. 3. Optionally probe a chunk with [`getImageChunk`](#tag/images/GET/v3/images/{imageId}/file) before (re-)sending it, so an interrupted upload only re-sends what is missing. The image is finalized automatically by the request that completes the chunk set, so the last chunk to arrive also validates `corelliumChecksum` (when supplied) and runs the firmware post-processing. Re-sending a chunk that was already stored is safe. If the upload fails for any reason other than a retryable transport error, the partially uploaded image is deleted, so the client must create a new image record before retrying. The image's `encoding` and `encapsulated` settings are fixed when the record is created by [`createImage`](#tag/images/POST/v3/images) and cannot be changed by a chunk request. + + :param image_id: (required) + :type image_id: str + :param resumable_chunk_number: Chunk sequence number. (required) + :type resumable_chunk_number: float + :param resumable_chunk_size: Size of each chunk. (required) + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Size of the current chunk. (required) + :type resumable_current_chunk_size: float + :param resumable_total_size: Total file size. (required) + :type resumable_total_size: float + :param resumable_total_chunks: Total number of chunks. (required) + :type resumable_total_chunks: float + :param body: (required) + :type body: bytearray + :param resumable_identifier: Client-side identifier of the file being uploaded. + :type resumable_identifier: str + :param resumable_filename: Original filename. + :type resumable_filename: str + :param resumable_relative_path: Relative path. + :type resumable_relative_path: str + :param resumable_type: MIME type. + :type resumable_type: str + :param corellium_checksum: Expected Corellium checksum of the complete file, formatted `algorithm$blockSize$hash`. When supplied, every chunk is re-hashed and the upload is rejected (and the image removed) unless the recomputed checksum matches. The chunk size used for the upload must equal the block size embedded in the checksum. Required for `fw` uploads on airgapped deployments. + :type corellium_checksum: str + :param x_corellium_total_file_size: Total size of the whole file in bytes. Send it on every chunk so the image-pool pre-flight check sees the full upload size rather than the size of a single chunk. + :type x_corellium_total_file_size: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_image_chunk_serialize( + image_id=image_id, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + body=body, + resumable_identifier=resumable_identifier, + resumable_filename=resumable_filename, + resumable_relative_path=resumable_relative_path, + resumable_type=resumable_type, + corellium_checksum=corellium_checksum, + x_corellium_total_file_size=x_corellium_total_file_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '413': "UploadSizeError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_upload_image_chunk_without_preload_content( + self, + image_id: StrictStr, + resumable_chunk_number: Annotated[int, Field(strict=True, gt=0, description="Chunk sequence number.")], + resumable_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of each chunk.")], + resumable_current_chunk_size: Annotated[int, Field(strict=True, gt=0, description="Size of the current chunk.")], + resumable_total_size: Annotated[int, Field(strict=True, gt=0, description="Total file size.")], + resumable_total_chunks: Annotated[int, Field(strict=True, gt=0, description="Total number of chunks.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_identifier: Annotated[Optional[StrictStr], Field(description="Client-side identifier of the file being uploaded.")] = None, + resumable_filename: Annotated[Optional[StrictStr], Field(description="Original filename.")] = None, + resumable_relative_path: Annotated[Optional[StrictStr], Field(description="Relative path.")] = None, + resumable_type: Annotated[Optional[StrictStr], Field(description="MIME type.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Expected Corellium checksum of the complete file, formatted `algorithm$blockSize$hash`. When supplied, every chunk is re-hashed and the upload is rejected (and the image removed) unless the recomputed checksum matches. The chunk size used for the upload must equal the block size embedded in the checksum. Required for `fw` uploads on airgapped deployments.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictStr], Field(description="Total size of the whole file in bytes. Send it on every chunk so the image-pool pre-flight check sees the full upload size rather than the size of a single chunk.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload one chunk of an image file + + Uploads a single chunk of an Image previously created via [`createImage`](#tag/images/POST/v3/images), using the resumable upload protocol. This is the recommended way to upload large images: the transfer survives interruptions, because any chunk can be re-sent and already-stored chunks can be skipped. **Chunked upload workflow:** 1. [`createImage`](#tag/images/POST/v3/images) with `{ name, type, encoding }` → returns an `imageId`. 2. Split the file into fixed-size chunks and **`uploadImageChunk`** each one with the `resumable*` query parameters describing it. Chunks may be uploaded in any order and concurrently. 3. Optionally probe a chunk with [`getImageChunk`](#tag/images/GET/v3/images/{imageId}/file) before (re-)sending it, so an interrupted upload only re-sends what is missing. The image is finalized automatically by the request that completes the chunk set, so the last chunk to arrive also validates `corelliumChecksum` (when supplied) and runs the firmware post-processing. Re-sending a chunk that was already stored is safe. If the upload fails for any reason other than a retryable transport error, the partially uploaded image is deleted, so the client must create a new image record before retrying. The image's `encoding` and `encapsulated` settings are fixed when the record is created by [`createImage`](#tag/images/POST/v3/images) and cannot be changed by a chunk request. + + :param image_id: (required) + :type image_id: str + :param resumable_chunk_number: Chunk sequence number. (required) + :type resumable_chunk_number: float + :param resumable_chunk_size: Size of each chunk. (required) + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Size of the current chunk. (required) + :type resumable_current_chunk_size: float + :param resumable_total_size: Total file size. (required) + :type resumable_total_size: float + :param resumable_total_chunks: Total number of chunks. (required) + :type resumable_total_chunks: float + :param body: (required) + :type body: bytearray + :param resumable_identifier: Client-side identifier of the file being uploaded. + :type resumable_identifier: str + :param resumable_filename: Original filename. + :type resumable_filename: str + :param resumable_relative_path: Relative path. + :type resumable_relative_path: str + :param resumable_type: MIME type. + :type resumable_type: str + :param corellium_checksum: Expected Corellium checksum of the complete file, formatted `algorithm$blockSize$hash`. When supplied, every chunk is re-hashed and the upload is rejected (and the image removed) unless the recomputed checksum matches. The chunk size used for the upload must equal the block size embedded in the checksum. Required for `fw` uploads on airgapped deployments. + :type corellium_checksum: str + :param x_corellium_total_file_size: Total size of the whole file in bytes. Send it on every chunk so the image-pool pre-flight check sees the full upload size rather than the size of a single chunk. + :type x_corellium_total_file_size: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_image_chunk_serialize( + image_id=image_id, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + body=body, + resumable_identifier=resumable_identifier, + resumable_filename=resumable_filename, + resumable_relative_path=resumable_relative_path, + resumable_type=resumable_type, + corellium_checksum=corellium_checksum, + x_corellium_total_file_size=x_corellium_total_file_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '413': "UploadSizeError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_upload_image_chunk_serialize( + self, + image_id, + resumable_chunk_number, + resumable_chunk_size, + resumable_current_chunk_size, + resumable_total_size, + resumable_total_chunks, + body, + resumable_identifier, + resumable_filename, + resumable_relative_path, + resumable_type, + corellium_checksum, + x_corellium_total_file_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + if resumable_chunk_number is not None: + + _query_params.append(('resumableChunkNumber', resumable_chunk_number)) + + if resumable_chunk_size is not None: + + _query_params.append(('resumableChunkSize', resumable_chunk_size)) + + if resumable_current_chunk_size is not None: + + _query_params.append(('resumableCurrentChunkSize', resumable_current_chunk_size)) + + if resumable_total_size is not None: + + _query_params.append(('resumableTotalSize', resumable_total_size)) + + if resumable_total_chunks is not None: + + _query_params.append(('resumableTotalChunks', resumable_total_chunks)) + + if resumable_identifier is not None: + + _query_params.append(('resumableIdentifier', resumable_identifier)) + + if resumable_filename is not None: + + _query_params.append(('resumableFilename', resumable_filename)) + + if resumable_relative_path is not None: + + _query_params.append(('resumableRelativePath', resumable_relative_path)) + + if resumable_type is not None: + + _query_params.append(('resumableType', resumable_type)) + + if corellium_checksum is not None: + + _query_params.append(('corelliumChecksum', corellium_checksum)) + + # process the header parameters + if x_corellium_total_file_size is not None: + _header_params['x-corellium-total-file-size'] = x_corellium_total_file_size + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/images/{imageId}/file', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_upload_image_data( + self, + image_id: StrictStr, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional. Expected Corellium checksum of the whole file, formatted `algorithm$blockSize$hash` (for example `sha256$1048576$`). When supplied, the upload is rejected and the image removed if the file does not match.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Image: + """Upload image file contents + + Uploads the whole file for an image created with [`createImage`](#tag/images/POST/v3/images), in a single `multipart/form-data` request with the file in the `file` part. Returns the updated image, whose `size` and checksums are now filled in. Supply `corelliumChecksum` to have the server verify the file: if the uploaded contents do not match, the upload is rejected with 400 and the image is removed. Compute it with the same algorithm and block size you pass in the value (`algorithm$blockSize$hash`). The upload counts against the owning project's storage quota. If the connection drops, the whole file must be sent again. For large images (firmware in particular) use [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file), which can resume. + + :param image_id: (required) + :type image_id: str + :param file: (required) + :type file: bytearray + :param corellium_checksum: Optional. Expected Corellium checksum of the whole file, formatted `algorithm$blockSize$hash` (for example `sha256$1048576$`). When supplied, the upload is rejected and the image removed if the file does not match. + :type corellium_checksum: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_image_data_serialize( + image_id=image_id, + file=file, + corellium_checksum=corellium_checksum, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_upload_image_data_with_http_info( + self, + image_id: StrictStr, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional. Expected Corellium checksum of the whole file, formatted `algorithm$blockSize$hash` (for example `sha256$1048576$`). When supplied, the upload is rejected and the image removed if the file does not match.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Image]: + """Upload image file contents + + Uploads the whole file for an image created with [`createImage`](#tag/images/POST/v3/images), in a single `multipart/form-data` request with the file in the `file` part. Returns the updated image, whose `size` and checksums are now filled in. Supply `corelliumChecksum` to have the server verify the file: if the uploaded contents do not match, the upload is rejected with 400 and the image is removed. Compute it with the same algorithm and block size you pass in the value (`algorithm$blockSize$hash`). The upload counts against the owning project's storage quota. If the connection drops, the whole file must be sent again. For large images (firmware in particular) use [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file), which can resume. + + :param image_id: (required) + :type image_id: str + :param file: (required) + :type file: bytearray + :param corellium_checksum: Optional. Expected Corellium checksum of the whole file, formatted `algorithm$blockSize$hash` (for example `sha256$1048576$`). When supplied, the upload is rejected and the image removed if the file does not match. + :type corellium_checksum: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_image_data_serialize( + image_id=image_id, + file=file, + corellium_checksum=corellium_checksum, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_upload_image_data_without_preload_content( + self, + image_id: StrictStr, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional. Expected Corellium checksum of the whole file, formatted `algorithm$blockSize$hash` (for example `sha256$1048576$`). When supplied, the upload is rejected and the image removed if the file does not match.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload image file contents + + Uploads the whole file for an image created with [`createImage`](#tag/images/POST/v3/images), in a single `multipart/form-data` request with the file in the `file` part. Returns the updated image, whose `size` and checksums are now filled in. Supply `corelliumChecksum` to have the server verify the file: if the uploaded contents do not match, the upload is rejected with 400 and the image is removed. Compute it with the same algorithm and block size you pass in the value (`algorithm$blockSize$hash`). The upload counts against the owning project's storage quota. If the connection drops, the whole file must be sent again. For large images (firmware in particular) use [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file), which can resume. + + :param image_id: (required) + :type image_id: str + :param file: (required) + :type file: bytearray + :param corellium_checksum: Optional. Expected Corellium checksum of the whole file, formatted `algorithm$blockSize$hash` (for example `sha256$1048576$`). When supplied, the upload is rejected and the image removed if the file does not match. + :type corellium_checksum: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upload_image_data_serialize( + image_id=image_id, + file=file, + corellium_checksum=corellium_checksum, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Image", + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_upload_image_data_serialize( + self, + image_id, + file, + corellium_checksum, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + if corellium_checksum is not None: + + _query_params.append(('corelliumChecksum', corellium_checksum)) + + # process the header parameters + # process the form parameters + if file is not None: + _files['file'] = file + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/images/{imageId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/images_v1_api.py b/corellium/api/images_v1_api.py new file mode 100644 index 0000000..6d3bab8 --- /dev/null +++ b/corellium/api/images_v1_api.py @@ -0,0 +1,657 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from corellium.models.image_v1 import ImageV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ImagesV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_get_image( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ImageV1: + """(Deprecated) Get Image Metadata + + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_image_with_http_info( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ImageV1]: + """(Deprecated) Get Image Metadata + + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_image_without_preload_content( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Image Metadata + + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ImageV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_image_serialize( + self, + image_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/images/{imageId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_images( + self, + project: Annotated[Optional[StrictStr], Field(description="Optionally filter by project - uuid")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ImageV1]: + """(Deprecated) Get all Images Metadata + + + :param project: Optionally filter by project - uuid + :type project: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images is deprecated.", DeprecationWarning) + + _param = self._v1_get_images_serialize( + project=project, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ImageV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_images_with_http_info( + self, + project: Annotated[Optional[StrictStr], Field(description="Optionally filter by project - uuid")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ImageV1]]: + """(Deprecated) Get all Images Metadata + + + :param project: Optionally filter by project - uuid + :type project: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images is deprecated.", DeprecationWarning) + + _param = self._v1_get_images_serialize( + project=project, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ImageV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_images_without_preload_content( + self, + project: Annotated[Optional[StrictStr], Field(description="Optionally filter by project - uuid")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get all Images Metadata + + + :param project: Optionally filter by project - uuid + :type project: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/images is deprecated.", DeprecationWarning) + + _param = self._v1_get_images_serialize( + project=project, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ImageV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_images_serialize( + self, + project, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if project is not None: + + _query_params.append(('project', project)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/images', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/images_v2_api.py b/corellium/api/images_v2_api.py new file mode 100644 index 0000000..2bbb528 --- /dev/null +++ b/corellium/api/images_v2_api.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ImagesV2Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_delete_image( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete Image + + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v2/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_image_with_http_info( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete Image + + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v2/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_image_without_preload_content( + self, + image_id: Annotated[StrictStr, Field(description="Image ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete Image + + + :param image_id: Image ID - uuid (required) + :type image_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v2/images/{imageId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_image_serialize( + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_image_serialize( + self, + image_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if image_id is not None: + _path_params['imageId'] = image_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/images/{imageId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/instances_api.py b/corellium/api/instances_api.py new file mode 100644 index 0000000..cb9b372 --- /dev/null +++ b/corellium/api/instances_api.py @@ -0,0 +1,14621 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from corellium.models.attach_interface_body import AttachInterfaceBody +from corellium.models.create_instance_body import CreateInstanceBody +from corellium.models.create_instance_response import CreateInstanceResponse +from corellium.models.detach_interface_body import DetachInterfaceBody +from corellium.models.enable_netdump_body import EnableNetdumpBody +from corellium.models.enable_sslsplit_body import EnableSslsplitBody +from corellium.models.gpios_state import GpiosState +from corellium.models.input_response import InputResponse +from corellium.models.instance import Instance +from corellium.models.instance_console_endpoint import InstanceConsoleEndpoint +from corellium.models.instance_input_body import InstanceInputBody +from corellium.models.instance_list import InstanceList +from corellium.models.instance_state import InstanceState +from corellium.models.instance_upgrade_body import InstanceUpgradeBody +from corellium.models.instance_upgrade_response import InstanceUpgradeResponse +from corellium.models.media_play_body import MediaPlayBody +from corellium.models.message_body import MessageBody +from corellium.models.patch_instance_body import PatchInstanceBody +from corellium.models.patch_instance_read_only_body import PatchInstanceReadOnlyBody +from corellium.models.peripherals_data import PeripheralsData +from corellium.models.restore_backup_body import RestoreBackupBody +from corellium.models.rotate_body import RotateBody +from corellium.models.start_instance_body import StartInstanceBody +from corellium.models.stop_instance_body import StopInstanceBody +from corellium.models.token import Token +from corellium.models.token_validate_body import TokenValidateBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class InstancesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_attach_instance_interface( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + attach_interface_body: Annotated[AttachInterfaceBody, Field(description="Interface attachment request.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Connect an I/O interface + + Connects one of this device's I/O interfaces (for example a GPIO bank, `gpio/0`) to an I/O interconnect, a virtual wire that links interfaces on different devices so they can signal each other. Create the interconnect first with the Interconnects endpoints. Requires the configurable I/O license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param attach_interface_body: Interface attachment request. (required) + :type attach_interface_body: AttachInterfaceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_attach_instance_interface_serialize( + instance_id=instance_id, + attach_interface_body=attach_interface_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_attach_instance_interface_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + attach_interface_body: Annotated[AttachInterfaceBody, Field(description="Interface attachment request.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Connect an I/O interface + + Connects one of this device's I/O interfaces (for example a GPIO bank, `gpio/0`) to an I/O interconnect, a virtual wire that links interfaces on different devices so they can signal each other. Create the interconnect first with the Interconnects endpoints. Requires the configurable I/O license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param attach_interface_body: Interface attachment request. (required) + :type attach_interface_body: AttachInterfaceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_attach_instance_interface_serialize( + instance_id=instance_id, + attach_interface_body=attach_interface_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_attach_instance_interface_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + attach_interface_body: Annotated[AttachInterfaceBody, Field(description="Interface attachment request.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Connect an I/O interface + + Connects one of this device's I/O interfaces (for example a GPIO bank, `gpio/0`) to an I/O interconnect, a virtual wire that links interfaces on different devices so they can signal each other. Create the interconnect first with the Interconnects endpoints. Requires the configurable I/O license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param attach_interface_body: Interface attachment request. (required) + :type attach_interface_body: AttachInterfaceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_attach_instance_interface_serialize( + instance_id=instance_id, + attach_interface_body=attach_interface_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_attach_instance_interface_serialize( + self, + instance_id, + attach_interface_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if attach_interface_body is not None: + _body_params = attach_interface_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/interfaces', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_clear_instance_panics( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Clear kernel panics + + Deletes the recorded kernel panics for this device, so the next `v3GetInstancePanics` shows only new ones. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_clear_instance_panics_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Clear kernel panics + + Deletes the recorded kernel panics for this device, so the next `v3GetInstancePanics` shows only new ones. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_clear_instance_panics_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Clear kernel panics + + Deletes the recorded kernel panics for this device, so the next `v3GetInstancePanics` shows only new ones. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_clear_instance_panics_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}/panics', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_create_instance( + self, + create_instance_body: Annotated[CreateInstanceBody, Field(description="The VM definition to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateInstanceResponse: + """Create a device + + Creates a new virtual device (instance) in a project. This returns quickly with the new `id` and `state: \"creating\"`; the device is then built in the background, which can take several minutes. Poll `v3GetInstanceState` (or `v3GetInstance`) until the state is `on` before using it. If it becomes `error`, read the instance's `error` field. **Minimum request:** `projectId`, `flavor`, and `osVersion` and/or `osBuild`. **Typical steps:** 1. `GET /v3/models`: pick a model and note its `flavor`, allowed cores, and memory. 2. `GET /v3/models/{model}/software`: pick a build and note its `osVersion` and `osBuild`. 3. `POST /v3/instances` with `{ \"projectId\", \"flavor\", \"osVersion\", \"osBuild\" }`. Add `name` so you can find it later, and `bootOptions` (for example `cores`, `ram`) to change the defaults. 4. Poll the state until `on`. **How the operating system is chosen.** With both `osVersion` and `osBuild`, that exact build is used. With only `osBuild`, the build with that ID is used. With only `osVersion`, the newest build of that version is used. To boot your own firmware file instead, set `fwPackage`. Some options need license features (for example creating devices from custom firmware, or custom model definitions via `charmBootArgs`); using one your license lacks returns 403. + + :param create_instance_body: The VM definition to create. (required) + :type create_instance_body: CreateInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_instance_serialize( + create_instance_body=create_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_instance_with_http_info( + self, + create_instance_body: Annotated[CreateInstanceBody, Field(description="The VM definition to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateInstanceResponse]: + """Create a device + + Creates a new virtual device (instance) in a project. This returns quickly with the new `id` and `state: \"creating\"`; the device is then built in the background, which can take several minutes. Poll `v3GetInstanceState` (or `v3GetInstance`) until the state is `on` before using it. If it becomes `error`, read the instance's `error` field. **Minimum request:** `projectId`, `flavor`, and `osVersion` and/or `osBuild`. **Typical steps:** 1. `GET /v3/models`: pick a model and note its `flavor`, allowed cores, and memory. 2. `GET /v3/models/{model}/software`: pick a build and note its `osVersion` and `osBuild`. 3. `POST /v3/instances` with `{ \"projectId\", \"flavor\", \"osVersion\", \"osBuild\" }`. Add `name` so you can find it later, and `bootOptions` (for example `cores`, `ram`) to change the defaults. 4. Poll the state until `on`. **How the operating system is chosen.** With both `osVersion` and `osBuild`, that exact build is used. With only `osBuild`, the build with that ID is used. With only `osVersion`, the newest build of that version is used. To boot your own firmware file instead, set `fwPackage`. Some options need license features (for example creating devices from custom firmware, or custom model definitions via `charmBootArgs`); using one your license lacks returns 403. + + :param create_instance_body: The VM definition to create. (required) + :type create_instance_body: CreateInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_instance_serialize( + create_instance_body=create_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_instance_without_preload_content( + self, + create_instance_body: Annotated[CreateInstanceBody, Field(description="The VM definition to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a device + + Creates a new virtual device (instance) in a project. This returns quickly with the new `id` and `state: \"creating\"`; the device is then built in the background, which can take several minutes. Poll `v3GetInstanceState` (or `v3GetInstance`) until the state is `on` before using it. If it becomes `error`, read the instance's `error` field. **Minimum request:** `projectId`, `flavor`, and `osVersion` and/or `osBuild`. **Typical steps:** 1. `GET /v3/models`: pick a model and note its `flavor`, allowed cores, and memory. 2. `GET /v3/models/{model}/software`: pick a build and note its `osVersion` and `osBuild`. 3. `POST /v3/instances` with `{ \"projectId\", \"flavor\", \"osVersion\", \"osBuild\" }`. Add `name` so you can find it later, and `bootOptions` (for example `cores`, `ram`) to change the defaults. 4. Poll the state until `on`. **How the operating system is chosen.** With both `osVersion` and `osBuild`, that exact build is used. With only `osBuild`, the build with that ID is used. With only `osVersion`, the newest build of that version is used. To boot your own firmware file instead, set `fwPackage`. Some options need license features (for example creating devices from custom firmware, or custom model definitions via `charmBootArgs`); using one your license lacks returns 403. + + :param create_instance_body: The VM definition to create. (required) + :type create_instance_body: CreateInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_instance_serialize( + create_instance_body=create_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateInstanceResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_instance_serialize( + self, + create_instance_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_instance_body is not None: + _body_params = create_instance_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove Instance + + Removes the instance. Deletion is asynchronous: the call schedules the teardown and returns 204 immediately, while the instance remains visible in a `deleting` state until teardown completes. An `instanceId` that does not exist also returns 204. The API cannot tell a call with an invalid ID apart from a second call made to confirm an earlier delete succeeded, so both succeed. Repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the record is still present in the `deleting` state and after it has disappeared. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove Instance + + Removes the instance. Deletion is asynchronous: the call schedules the teardown and returns 204 immediately, while the instance remains visible in a `deleting` state until teardown completes. An `instanceId` that does not exist also returns 204. The API cannot tell a call with an invalid ID apart from a second call made to confirm an earlier delete succeeded, so both succeed. Repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the record is still present in the `deleting` state and after it has disappeared. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove Instance + + Removes the instance. Deletion is asynchronous: the call schedules the teardown and returns 204 immediately, while the instance remains visible in a `deleting` state until teardown completes. An `instanceId` that does not exist also returns 204. The API cannot tell a call with an invalid ID apart from a second call made to confirm an earlier delete succeeded, so both succeed. Repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the record is still present in the `deleting` state and after it has disappeared. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_instance_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_detach_instance_interface( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + interface_id: Annotated[StrictStr, Field(description="Interface ID.")], + detach_interface_body: Annotated[DetachInterfaceBody, Field(description="Interface detachment request.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Disconnect an I/O interface + + Disconnects one of this device's I/O interfaces from an I/O interconnect. Requires the configurable I/O license feature. Deletes are idempotent: an unknown instance, interconnect or interface, including one that was already detached, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param interface_id: Interface ID. (required) + :type interface_id: str + :param detach_interface_body: Interface detachment request. (required) + :type detach_interface_body: DetachInterfaceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_detach_instance_interface_serialize( + instance_id=instance_id, + interface_id=interface_id, + detach_interface_body=detach_interface_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_detach_instance_interface_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + interface_id: Annotated[StrictStr, Field(description="Interface ID.")], + detach_interface_body: Annotated[DetachInterfaceBody, Field(description="Interface detachment request.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Disconnect an I/O interface + + Disconnects one of this device's I/O interfaces from an I/O interconnect. Requires the configurable I/O license feature. Deletes are idempotent: an unknown instance, interconnect or interface, including one that was already detached, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param interface_id: Interface ID. (required) + :type interface_id: str + :param detach_interface_body: Interface detachment request. (required) + :type detach_interface_body: DetachInterfaceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_detach_instance_interface_serialize( + instance_id=instance_id, + interface_id=interface_id, + detach_interface_body=detach_interface_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_detach_instance_interface_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + interface_id: Annotated[StrictStr, Field(description="Interface ID.")], + detach_interface_body: Annotated[DetachInterfaceBody, Field(description="Interface detachment request.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Disconnect an I/O interface + + Disconnects one of this device's I/O interfaces from an I/O interconnect. Requires the configurable I/O license feature. Deletes are idempotent: an unknown instance, interconnect or interface, including one that was already detached, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param interface_id: Interface ID. (required) + :type interface_id: str + :param detach_interface_body: Interface detachment request. (required) + :type detach_interface_body: DetachInterfaceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_detach_instance_interface_serialize( + instance_id=instance_id, + interface_id=interface_id, + detach_interface_body=detach_interface_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_detach_instance_interface_serialize( + self, + instance_id, + interface_id, + detach_interface_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if interface_id is not None: + _path_params['interfaceId'] = interface_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if detach_interface_body is not None: + _body_params = detach_interface_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}/interfaces/{interfaceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_disable_expose_port( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop exposing the device port + + Turns off the exposed port enabled with `v3EnableExposePort`. Runs as a background task on the device; returns 204 once it is scheduled. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_disable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_disable_expose_port_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop exposing the device port + + Turns off the exposed port enabled with `v3EnableExposePort`. Runs as a background task on the device; returns 204 once it is scheduled. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_disable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_disable_expose_port_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop exposing the device port + + Turns off the exposed port enabled with `v3EnableExposePort`. Runs as a background task on the device; returns 204 once it is scheduled. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_disable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_disable_expose_port_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/exposeport/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_download_netdump_pcap( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Download the Enhanced Network Monitor capture + + Downloads the packets recorded by Enhanced Network Monitor (see `v3StartNetdump`) as a pcapng file, which packet analyzers such as Wireshark open directly. Requires the Enhanced Network Monitor feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_netdump_pcap_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_download_netdump_pcap_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Download the Enhanced Network Monitor capture + + Downloads the packets recorded by Enhanced Network Monitor (see `v3StartNetdump`) as a pcapng file, which packet analyzers such as Wireshark open directly. Requires the Enhanced Network Monitor feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_netdump_pcap_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_download_netdump_pcap_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download the Enhanced Network Monitor capture + + Downloads the packets recorded by Enhanced Network Monitor (see `v3StartNetdump`) as a pcapng file, which packet analyzers such as Wireshark open directly. Requires the Enhanced Network Monitor feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_netdump_pcap_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_download_netdump_pcap_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.tcpdump.pcap', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/netdump.pcap', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_download_network_monitor_pcap( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Download the Network Monitor capture + + Downloads the traffic recorded by Network Monitor (see `v3StartNetworkMonitor`) as a pcap file. Save it with a `.pcap` extension and open it in a packet analyzer such as Wireshark. Download while monitoring runs or after stopping it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_network_monitor_pcap_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_download_network_monitor_pcap_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Download the Network Monitor capture + + Downloads the traffic recorded by Network Monitor (see `v3StartNetworkMonitor`) as a pcap file. Save it with a `.pcap` extension and open it in a packet analyzer such as Wireshark. Download while monitoring runs or after stopping it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_network_monitor_pcap_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_download_network_monitor_pcap_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download the Network Monitor capture + + Downloads the traffic recorded by Network Monitor (see `v3StartNetworkMonitor`) as a pcap file. Save it with a `.pcap` extension and open it in a packet analyzer such as Wireshark. Download while monitoring runs or after stopping it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_download_network_monitor_pcap_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_download_network_monitor_pcap_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.tcpdump.pcap', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/networkMonitor.pcap', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_enable_expose_port( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Expose the device port + + Turns on the exposed port for this device, for device access. This runs as a background task on the device; returns 204 once it is scheduled. Undo with `v3DisableExposePort`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_enable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_enable_expose_port_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Expose the device port + + Turns on the exposed port for this device, for device access. This runs as a background task on the device; returns 204 once it is scheduled. Undo with `v3DisableExposePort`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_enable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_enable_expose_port_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Expose the device port + + Turns on the exposed port for this device, for device access. This runs as a background task on the device; returns 204 once it is scheduled. Undo with `v3DisableExposePort`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_enable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_enable_expose_port_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/exposeport/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Instance: + """Get a device + + Returns everything about one device: its name, model, operating system, state, boot options, network details and consoles. Use `state` to see whether it is ready, and `error` to see why it failed. Pass `returnAttr` to get only some fields. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param return_attr: Attributes to include in instance return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Instance]: + """Get a device + + Returns everything about one device: its name, model, operating system, state, boot options, network details and consoles. Use `state` to see whether it is ready, and `error` to see why it failed. Pass `returnAttr` to get only some fields. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param return_attr: Attributes to include in instance return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a device + + Returns everything about one device: its name, model, operating system, state, boot options, network details and consoles. Use `state` to see whether it is ready, and `error` to see why it failed. Pass `returnAttr` to get only some fields. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param return_attr: Attributes to include in instance return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_serialize( + self, + instance_id, + return_attr, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'returnAttr': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if return_attr is not None: + + _query_params.append(('returnAttr', return_attr)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_console( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[Optional[StrictStr], Field(description="Console to connect to: a `consoles[].id` from Get Instance with the `port-` prefix removed. Defaults to `cons`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceConsoleEndpoint: + """Get console websocket URL + + Get console WebSocket URL. Instances can have more than one console. To connect to a specific console: 1. Call Get Instance and read the `consoles` array. 2. Take the `id` of the console you want and remove the `port-` prefix (e.g. `port-uart7-cons` becomes `uart7-cons`). 3. Pass that value as the `type` query parameter (e.g. `?type=uart7-cons`). If `type` is omitted, the default console (`cons`) is used. Some models have no default console and require `type`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param type: Console to connect to: a `consoles[].id` from Get Instance with the `port-` prefix removed. Defaults to `cons`. + :type type: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_console_serialize( + instance_id=instance_id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceConsoleEndpoint", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_console_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[Optional[StrictStr], Field(description="Console to connect to: a `consoles[].id` from Get Instance with the `port-` prefix removed. Defaults to `cons`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceConsoleEndpoint]: + """Get console websocket URL + + Get console WebSocket URL. Instances can have more than one console. To connect to a specific console: 1. Call Get Instance and read the `consoles` array. 2. Take the `id` of the console you want and remove the `port-` prefix (e.g. `port-uart7-cons` becomes `uart7-cons`). 3. Pass that value as the `type` query parameter (e.g. `?type=uart7-cons`). If `type` is omitted, the default console (`cons`) is used. Some models have no default console and require `type`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param type: Console to connect to: a `consoles[].id` from Get Instance with the `port-` prefix removed. Defaults to `cons`. + :type type: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_console_serialize( + instance_id=instance_id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceConsoleEndpoint", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_console_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[Optional[StrictStr], Field(description="Console to connect to: a `consoles[].id` from Get Instance with the `port-` prefix removed. Defaults to `cons`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get console websocket URL + + Get console WebSocket URL. Instances can have more than one console. To connect to a specific console: 1. Call Get Instance and read the `consoles` array. 2. Take the `id` of the console you want and remove the `port-` prefix (e.g. `port-uart7-cons` becomes `uart7-cons`). 3. Pass that value as the `type` query parameter (e.g. `?type=uart7-cons`). If `type` is omitted, the default console (`cons`) is used. Some models have no default console and require `type`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param type: Console to connect to: a `consoles[].id` from Get Instance with the `port-` prefix removed. Defaults to `cons`. + :type type: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_console_serialize( + instance_id=instance_id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceConsoleEndpoint", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_console_serialize( + self, + instance_id, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/console', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_console_log( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Read the console log + + Returns the text output of the device's main console (serial output from boot messages, the kernel and system services) as plain text. Useful for seeing why a device will not boot. For a live, interactive console, use `v3GetInstanceConsole` instead. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_console_log_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_console_log_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Read the console log + + Returns the text output of the device's main console (serial output from boot messages, the kernel and system services) as plain text. Useful for seeing why a device will not boot. For a live, interactive console, use `v3GetInstanceConsole` instead. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_console_log_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_console_log_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read the console log + + Returns the text output of the device's main console (serial output from boot messages, the kernel and system services) as plain text. Useful for seeing why a device will not boot. For a live, interactive console, use `v3GetInstanceConsole` instead. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_console_log_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_console_log_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/consoleLog', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_gpios( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GpiosState: + """Read board LEDs, buttons and switches + + Returns the current state of the simulated LEDs, buttons and switches (GPIO pins) on an IoT or embedded board model, for example whether an LED your firmware drives is lit. The device must be running. Phone models do not have these, and the request fails for them. See `GpiosState` for the format. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_gpios_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosState", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_gpios_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GpiosState]: + """Read board LEDs, buttons and switches + + Returns the current state of the simulated LEDs, buttons and switches (GPIO pins) on an IoT or embedded board model, for example whether an LED your firmware drives is lit. The device must be running. Phone models do not have these, and the request fails for them. See `GpiosState` for the format. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_gpios_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosState", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_gpios_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read board LEDs, buttons and switches + + Returns the current state of the simulated LEDs, buttons and switches (GPIO pins) on an IoT or embedded board model, for example whether an LED your firmware drives is lit. The device must be running. Phone models do not have these, and the request fails for them. See `GpiosState` for the format. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_gpios_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosState", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_gpios_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/gpios', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_image_upload( + self, + instance: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Get image upload status + + Checks the progress of a chunked upload made with `v3PutInstanceImageUpload`, or downloads the finished file. With chunk parameters (`resumableChunkNumber` and friends) it returns 200 if that chunk is already stored and 204 if it still needs to be sent; without them it downloads the image file. + + :param instance: Instance ID. (required) + :type instance: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_image_upload_serialize( + instance=instance, + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_image_upload_with_http_info( + self, + instance: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Get image upload status + + Checks the progress of a chunked upload made with `v3PutInstanceImageUpload`, or downloads the finished file. With chunk parameters (`resumableChunkNumber` and friends) it returns 200 if that chunk is already stored and 204 if it still needs to be sent; without them it downloads the image file. + + :param instance: Instance ID. (required) + :type instance: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_image_upload_serialize( + instance=instance, + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_image_upload_without_preload_content( + self, + instance: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get image upload status + + Checks the progress of a chunked upload made with `v3PutInstanceImageUpload`, or downloads the finished file. With chunk parameters (`resumableChunkNumber` and friends) it returns 200 if that chunk is already stored and 204 if it still needs to be sent; without them it downloads the image file. + + :param instance: Instance ID. (required) + :type instance: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_image_upload_serialize( + instance=instance, + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_image_upload_serialize( + self, + instance, + type, + image_id, + name, + resumable_chunk_number, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance is not None: + _path_params['instance'] = instance + if type is not None: + _path_params['type'] = type + if image_id is not None: + _path_params['imageId'] = image_id + if name is not None: + _path_params['name'] = name + # process the query parameters + if resumable_chunk_number is not None: + + _query_params.append(('resumableChunkNumber', resumable_chunk_number)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instance}/image-upload/{type}/{imageId}/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_panics( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Dict[str, Optional[object]]]: + """List kernel panics + + Returns the kernel panics (crashes of the operating system itself) recorded on this device, as a list of panic records. An empty list means none have happened since the last clear. Clear them with `v3ClearInstancePanics`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Dict[str, Optional[object]]]", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_panics_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Dict[str, Optional[object]]]]: + """List kernel panics + + Returns the kernel panics (crashes of the operating system itself) recorded on this device, as a list of panic records. An empty list means none have happened since the last clear. Clear them with `v3ClearInstancePanics`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Dict[str, Optional[object]]]", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_panics_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List kernel panics + + Returns the kernel panics (crashes of the operating system itself) recorded on this device, as a list of panic records. An empty list means none have happened since the last clear. Clear them with `v3ClearInstancePanics`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Dict[str, Optional[object]]]", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_panics_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/panics', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_peripherals( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PeripheralsData: + """Read simulated sensors + + Returns the current values of the device's simulated sensors and hardware: motion (accelerometer, gyroscope, compass), environment (temperature, light, pressure, humidity, proximity), GPS location, battery, and biometric bypass. Only values the device reports are included; a missing field does not mean zero. See `PeripheralsData`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_peripherals_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsData", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_peripherals_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PeripheralsData]: + """Read simulated sensors + + Returns the current values of the device's simulated sensors and hardware: motion (accelerometer, gyroscope, compass), environment (temperature, light, pressure, humidity, proximity), GPS location, battery, and biometric bypass. Only values the device reports are included; a missing field does not mean zero. See `PeripheralsData`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_peripherals_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsData", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_peripherals_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read simulated sensors + + Returns the current values of the device's simulated sensors and hardware: motion (accelerometer, gyroscope, compass), environment (temperature, light, pressure, humidity, proximity), GPS location, battery, and biometric bypass. Only values the device reports are included; a missing field does not mean zero. See `PeripheralsData`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_peripherals_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsData", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_peripherals_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/peripherals', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_quick_connect_command( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Get the SSH quick-connect command + + Returns a ready-to-paste SSH command for connecting to this device, as a JSON string. Run it in a terminal on a computer that can reach the device, for example one connected with the project VPN (`GET /v3/projects/{projectId}/vpnconfig/{format}`). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_quick_connect_command_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_quick_connect_command_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Get the SSH quick-connect command + + Returns a ready-to-paste SSH command for connecting to this device, as a JSON string. Run it in a terminal on a computer that can reach the device, for example one connected with the project VPN (`GET /v3/projects/{projectId}/vpnconfig/{format}`). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_quick_connect_command_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_quick_connect_command_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the SSH quick-connect command + + Returns a ready-to-paste SSH command for connecting to this device, as a JSON string. Run it in a terminal on a computer that can reach the device, for example one connected with the project VPN (`GET /v3/projects/{projectId}/vpnconfig/{format}`). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_quick_connect_command_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_quick_connect_command_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/quickConnectCommand', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_screenshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + format: Annotated[StrictStr, Field(description="Image file type: `png` (lossless, larger) or `jpeg` (smaller).")], + scale: Annotated[Optional[StrictInt], Field(description="Shrink factor. The image is 1/N of full size in each direction. Whole number; defaults to 1 (full size).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Take a screenshot + + Captures what the device's screen shows right now and returns it as an image. Choose the file type in the path: `screenshot.png` or `screenshot.jpeg`. Use `scale` to shrink it: `scale=2` returns half the width and height, `scale=4` a quarter; the default 1 is full size. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param format: Image file type: `png` (lossless, larger) or `jpeg` (smaller). (required) + :type format: str + :param scale: Shrink factor. The image is 1/N of full size in each direction. Whole number; defaults to 1 (full size). + :type scale: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_screenshot_serialize( + instance_id=instance_id, + format=format, + scale=scale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_screenshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + format: Annotated[StrictStr, Field(description="Image file type: `png` (lossless, larger) or `jpeg` (smaller).")], + scale: Annotated[Optional[StrictInt], Field(description="Shrink factor. The image is 1/N of full size in each direction. Whole number; defaults to 1 (full size).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Take a screenshot + + Captures what the device's screen shows right now and returns it as an image. Choose the file type in the path: `screenshot.png` or `screenshot.jpeg`. Use `scale` to shrink it: `scale=2` returns half the width and height, `scale=4` a quarter; the default 1 is full size. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param format: Image file type: `png` (lossless, larger) or `jpeg` (smaller). (required) + :type format: str + :param scale: Shrink factor. The image is 1/N of full size in each direction. Whole number; defaults to 1 (full size). + :type scale: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_screenshot_serialize( + instance_id=instance_id, + format=format, + scale=scale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_screenshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + format: Annotated[StrictStr, Field(description="Image file type: `png` (lossless, larger) or `jpeg` (smaller).")], + scale: Annotated[Optional[StrictInt], Field(description="Shrink factor. The image is 1/N of full size in each direction. Whole number; defaults to 1 (full size).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Take a screenshot + + Captures what the device's screen shows right now and returns it as an image. Choose the file type in the path: `screenshot.png` or `screenshot.jpeg`. Use `scale` to shrink it: `scale=2` returns half the width and height, `scale=4` a quarter; the default 1 is full size. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param format: Image file type: `png` (lossless, larger) or `jpeg` (smaller). (required) + :type format: str + :param scale: Shrink factor. The image is 1/N of full size in each direction. Whole number; defaults to 1 (full size). + :type scale: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_screenshot_serialize( + instance_id=instance_id, + format=format, + scale=scale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_screenshot_serialize( + self, + instance_id, + format, + scale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if format is not None: + _path_params['format'] = format + # process the query parameters + if scale is not None: + + _query_params.append(('scale', scale)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'image/png', + 'image/jpeg', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/screenshot.{format}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_state( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="The attributes to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceState: + """Get a device's state + + Returns only the device's current state (for example `creating`, `on`, `off`), as a bare JSON string. This is the call to poll while waiting for a device to finish creating, starting, stopping or rebooting. See `InstanceState` for what each value means. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param return_attr: The attributes to return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_state_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceState", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_state_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="The attributes to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceState]: + """Get a device's state + + Returns only the device's current state (for example `creating`, `on`, `off`), as a bare JSON string. This is the call to poll while waiting for a device to finish creating, starting, stopping or rebooting. See `InstanceState` for what each value means. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param return_attr: The attributes to return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_state_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceState", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_state_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="The attributes to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a device's state + + Returns only the device's current state (for example `creating`, `on`, `off`), as a bare JSON string. This is the call to poll while waiting for a device to finish creating, starting, stopping or rebooting. See `InstanceState` for what each value means. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param return_attr: The attributes to return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_state_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceState", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_state_serialize( + self, + instance_id, + return_attr, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'returnAttr': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if return_attr is not None: + + _query_params.append(('returnAttr', return_attr)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/state', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_inject_message( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + message_body: Annotated[MessageBody, Field(description="Message data.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Send an SMS message to an iOS device + + Delivers a text message to an iOS device as if it arrived over the cellular network, so apps see a normal incoming SMS. Useful for testing one-time-password and verification-code flows. Send either `number` (the sender's phone number) and `message` (the text), or `raw` with the message bytes in hexadecimal for low-level testing. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param message_body: Message data. (required) + :type message_body: MessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_inject_message_serialize( + instance_id=instance_id, + message_body=message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_inject_message_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + message_body: Annotated[MessageBody, Field(description="Message data.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Send an SMS message to an iOS device + + Delivers a text message to an iOS device as if it arrived over the cellular network, so apps see a normal incoming SMS. Useful for testing one-time-password and verification-code flows. Send either `number` (the sender's phone number) and `message` (the text), or `raw` with the message bytes in hexadecimal for low-level testing. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param message_body: Message data. (required) + :type message_body: MessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_inject_message_serialize( + instance_id=instance_id, + message_body=message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_inject_message_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + message_body: Annotated[MessageBody, Field(description="Message data.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send an SMS message to an iOS device + + Delivers a text message to an iOS device as if it arrived over the cellular network, so apps see a normal incoming SMS. Useful for testing one-time-password and verification-code flows. Send either `number` (the sender's phone number) and `message` (the text), or `raw` with the message bytes in hexadecimal for low-level testing. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param message_body: Message data. (required) + :type message_body: MessageBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_inject_message_serialize( + instance_id=instance_id, + message_body=message_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_inject_message_serialize( + self, + instance_id, + message_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if message_body is not None: + _body_params = message_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/message', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_kernel_preauthorize( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Token: + """Get a kernel download token + + Returns a short-lived token that authorizes downloading this device's kernel file without an `Authorization` header, for loading into a disassembler or debugger. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's kernel and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kernel_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_kernel_preauthorize_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Token]: + """Get a kernel download token + + Returns a short-lived token that authorizes downloading this device's kernel file without an `Authorization` header, for loading into a disassembler or debugger. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's kernel and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kernel_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_kernel_preauthorize_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a kernel download token + + Returns a short-lived token that authorizes downloading this device's kernel file without an `Authorization` header, for loading into a disassembler or debugger. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's kernel and expires when your current session token expires. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_kernel_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_kernel_preauthorize_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/kernel-authorize', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_instances( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Optionally filter by instance name.")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceList: + """List Instances + + Lists the devices (instances) you can access across your projects. Results are paginated with `limit` and `offset`; use `name` to find a device by name. To list only one project's devices, use `GET /v3/projects/{projectId}/instances`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Optionally filter by instance name. + :type name: str + :param return_attr: Attributes to include in instance return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_instances_serialize( + limit=limit, + offset=offset, + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_instances_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Optionally filter by instance name.")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceList]: + """List Instances + + Lists the devices (instances) you can access across your projects. Results are paginated with `limit` and `offset`; use `name` to find a device by name. To list only one project's devices, use `GET /v3/projects/{projectId}/instances`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Optionally filter by instance name. + :type name: str + :param return_attr: Attributes to include in instance return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_instances_serialize( + limit=limit, + offset=offset, + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_instances_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Optionally filter by instance name.")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Instances + + Lists the devices (instances) you can access across your projects. Results are paginated with `limit` and `offset`; use `name` to find a device by name. To list only one project's devices, use `GET /v3/projects/{projectId}/instances`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Optionally filter by instance name. + :type name: str + :param return_attr: Attributes to include in instance return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_instances_serialize( + limit=limit, + offset=offset, + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_instances_serialize( + self, + limit, + offset, + name, + return_attr, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'returnAttr': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if name is not None: + + _query_params.append(('name', name)) + + if return_attr is not None: + + _query_params.append(('returnAttr', return_attr)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_media_play( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + media_play_body: MediaPlayBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Play a video or audio file into the device + + Plays a media file into the device, so apps receive it as if it came from the device's camera (video) and microphone (audio). Use it to test camera or scanning features, for example feeding a QR code video to an app. Open the camera app on the device to see it. Give exactly one source: `imageId` of a `media` image you uploaded with `POST /v3/images`, or a `url` the platform can download the file from. Returns 204 once playback starts. Call `v3MediaStop` to stop it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param media_play_body: (required) + :type media_play_body: MediaPlayBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_media_play_serialize( + instance_id=instance_id, + media_play_body=media_play_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_media_play_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + media_play_body: MediaPlayBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Play a video or audio file into the device + + Plays a media file into the device, so apps receive it as if it came from the device's camera (video) and microphone (audio). Use it to test camera or scanning features, for example feeding a QR code video to an app. Open the camera app on the device to see it. Give exactly one source: `imageId` of a `media` image you uploaded with `POST /v3/images`, or a `url` the platform can download the file from. Returns 204 once playback starts. Call `v3MediaStop` to stop it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param media_play_body: (required) + :type media_play_body: MediaPlayBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_media_play_serialize( + instance_id=instance_id, + media_play_body=media_play_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_media_play_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + media_play_body: MediaPlayBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Play a video or audio file into the device + + Plays a media file into the device, so apps receive it as if it came from the device's camera (video) and microphone (audio). Use it to test camera or scanning features, for example feeding a QR code video to an app. Open the camera app on the device to see it. Give exactly one source: `imageId` of a `media` image you uploaded with `POST /v3/images`, or a `url` the platform can download the file from. Returns 204 once playback starts. Call `v3MediaStop` to stop it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param media_play_body: (required) + :type media_play_body: MediaPlayBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_media_play_serialize( + instance_id=instance_id, + media_play_body=media_play_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_media_play_serialize( + self, + instance_id, + media_play_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if media_play_body is not None: + _body_params = media_play_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/media/play', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_media_stop( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop playing media + + Stops media started with `v3MediaPlay`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_media_stop_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_media_stop_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop playing media + + Stops media started with `v3MediaPlay`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_media_stop_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_media_stop_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop playing media + + Stops media started with `v3MediaPlay`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_media_stop_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_media_stop_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/media/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + patch_instance_body: PatchInstanceBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Instance: + """Change device settings + + Changes a device's settings. Send only the fields you want to change: `name` (the label shown in lists), `bootOptions` (for example `cores`, `ram`, boot arguments), `proxy` (which device ports are forwarded, and whether they are reachable from outside the project), and `straceFilter` (which processes CoreTrace records, by name, process ID or thread ID; see `v3ListThreads`). Returns the updated device. This call does not turn the device on or off; use `v3StartInstance`, `v3StopInstance`, `v3RebootInstance`, `v3PauseInstance` and `v3UnpauseInstance` for that. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param patch_instance_body: (required) + :type patch_instance_body: PatchInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_serialize( + instance_id=instance_id, + patch_instance_body=patch_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + patch_instance_body: PatchInstanceBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Instance]: + """Change device settings + + Changes a device's settings. Send only the fields you want to change: `name` (the label shown in lists), `bootOptions` (for example `cores`, `ram`, boot arguments), `proxy` (which device ports are forwarded, and whether they are reachable from outside the project), and `straceFilter` (which processes CoreTrace records, by name, process ID or thread ID; see `v3ListThreads`). Returns the updated device. This call does not turn the device on or off; use `v3StartInstance`, `v3StopInstance`, `v3RebootInstance`, `v3PauseInstance` and `v3UnpauseInstance` for that. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param patch_instance_body: (required) + :type patch_instance_body: PatchInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_serialize( + instance_id=instance_id, + patch_instance_body=patch_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + patch_instance_body: PatchInstanceBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Change device settings + + Changes a device's settings. Send only the fields you want to change: `name` (the label shown in lists), `bootOptions` (for example `cores`, `ram`, boot arguments), `proxy` (which device ports are forwarded, and whether they are reachable from outside the project), and `straceFilter` (which processes CoreTrace records, by name, process ID or thread ID; see `v3ListThreads`). Returns the updated device. This call does not turn the device on or off; use `v3StartInstance`, `v3StopInstance`, `v3RebootInstance`, `v3PauseInstance` and `v3UnpauseInstance` for that. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param patch_instance_body: (required) + :type patch_instance_body: PatchInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_serialize( + instance_id=instance_id, + patch_instance_body=patch_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_instance_serialize( + self, + instance_id, + patch_instance_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_instance_body is not None: + _body_params = patch_instance_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/instances/{instanceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_instance_read_only( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + patch_instance_read_only_body: PatchInstanceReadOnlyBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Instance: + """Update Instance Read Only + + Turns read-only mode on or off for the device. Returns the updated device. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param patch_instance_read_only_body: (required) + :type patch_instance_read_only_body: PatchInstanceReadOnlyBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_read_only_serialize( + instance_id=instance_id, + patch_instance_read_only_body=patch_instance_read_only_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_instance_read_only_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + patch_instance_read_only_body: PatchInstanceReadOnlyBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Instance]: + """Update Instance Read Only + + Turns read-only mode on or off for the device. Returns the updated device. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param patch_instance_read_only_body: (required) + :type patch_instance_read_only_body: PatchInstanceReadOnlyBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_read_only_serialize( + instance_id=instance_id, + patch_instance_read_only_body=patch_instance_read_only_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_instance_read_only_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + patch_instance_read_only_body: PatchInstanceReadOnlyBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Instance Read Only + + Turns read-only mode on or off for the device. Returns the updated device. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param patch_instance_read_only_body: (required) + :type patch_instance_read_only_body: PatchInstanceReadOnlyBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_read_only_serialize( + instance_id=instance_id, + patch_instance_read_only_body=patch_instance_read_only_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_instance_read_only_serialize( + self, + instance_id, + patch_instance_read_only_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_instance_read_only_body is not None: + _body_params = patch_instance_read_only_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/instances/{instanceId}/read-only', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_pause_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Pause a device + + Freezes a running device in place without shutting it down: it stops executing but keeps its memory and state, so `v3UnpauseInstance` resumes it exactly where it stopped. The state becomes `paused`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_pause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_pause_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Pause a device + + Freezes a running device in place without shutting it down: it stops executing but keeps its memory and state, so `v3UnpauseInstance` resumes it exactly where it stopped. The state becomes `paused`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_pause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_pause_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Pause a device + + Freezes a running device in place without shutting it down: it stops executing but keeps its memory and state, so `v3UnpauseInstance` resumes it exactly where it stopped. The state becomes `paused`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_pause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_pause_instance_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/pause', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_post_instance_input( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + instance_input_body: Annotated[List[InstanceInputBody], Field(description="Array of input events to send to the VM.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InputResponse: + """Provide Instance Input + + Sends a touch or button event to the VM. Events in the request array are processed in order. Each element of the request array is one of: - **TouchInputRequest** – holds buttons (or keys) and/or touches at a screen position. - Set `buttons` to `[\"finger\"]` to press down and `[]` to release all buttons. - Omit `buttons` to leave the current press state unchanged. - `position` is an array of per-finger `[x, y]` coordinates. May be omitted for button-only input. - **TouchCurveInputRequest** – animates a drag/swipe from `start` to `end` over `duration` ms. - Optional `bezierPoints` shape the path; omit for a straight-line drag. - **TextInputRequest** – types the given text. Buttons (or keys) accepted by `buttons` / `startButtons` / `endButtons` are an array of strings, each either a single ASCII character or one of the following keywords: - VM buttons (case-insensitive): `finger`, `homeButton`, `holdButton` (Power/Hold), `volumeUp`, `volumeDown`, `backButton`, `overviewButton`. `ringerSwitch` is not supported. - Keyboard key names: `again`, `alt`, `alterase`, `apostrophe`, `back`, `backslash`, `backspace`, `bassboost`, `bookmarks`, `bsp`, `calc`, `camera`, `cancel`, `caps`, `capslock`, `chat`, `close`, `closecd`, `comma`, `compose`, `computer`, `config`, `connect`, `copy`, `ctrl`, `cut`, `cyclewindows`, `dashboard`, `del`, `delete`, `deletefile`, `dot`, `down`, `edit`, `eject`, `ejectclose`, `email`, `end`, `enter`, `equal`, `esc`, `escape`, `exit`, `f1`–`f24`, `fastfwd`, `file`, `finance`, `find`, `forward`, `front`, `grave`, `hangeul`, `hanja`, `help`, `henkan`, `home`, `homepage`, `hp`, `hrgn`, `ins`, `insert`, `iso`, `k102`, `kp0`–`kp9`, `kpasterisk`, `kpcomma`, `kpdot`, `kpenter`, `kpequal`, `kpjpcomma`, `kpleftparen`, `kpminus`, `kpplus`, `kpplusminus`, `kprightparen`, `kpslash`, `ktkn`, `ktknhrgn`, `left`, `leftalt`, `leftbrace`, `leftctrl`, `leftmeta`, `leftshift`, `linefeed`, `macro`, `mail`, `menu`, `meta`, `minus`, `move`, `msdos`, `muhenkan`, `mute`, `new`, `next`, `numlock`, `open`, `pagedown`, `pageup`, `paste`, `pause`, `pausecd`, `pgdn`, `pgup`, `phone`, `play`, `playcd`, `playpause`, `power`, `previous`, `print`, `prog1`–`prog4`, `props`, `question`, `record`, `redo`, `refresh`, `return`, `rewind`, `right`, `rightalt`, `rightbrace`, `rightctrl`, `rightmeta`, `rightshift`, `ro`, `rotate`, `scale`, `screenlock`, `scrolldown`, `scrolllock`, `scrollup`, `search`, `semicolon`, `sendfile`, `setup`, `shift`, `shop`, `slash`, `sleep`, `sound`, `space`, `sport`, `stop`, `stopcd`, `suspend`, `sysrq`, `tab`, `undo`, `up`, `voldown`, `volup`, `wakeup`, `www`, `xfer`, `yen`, `zkhk`. Use `finger:1` to press the fingerprint sensor (see the `fingerprint` example). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param instance_input_body: Array of input events to send to the VM. (required) + :type instance_input_body: List[InstanceInputBody] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_post_instance_input_serialize( + instance_id=instance_id, + instance_input_body=instance_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InputResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_post_instance_input_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + instance_input_body: Annotated[List[InstanceInputBody], Field(description="Array of input events to send to the VM.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InputResponse]: + """Provide Instance Input + + Sends a touch or button event to the VM. Events in the request array are processed in order. Each element of the request array is one of: - **TouchInputRequest** – holds buttons (or keys) and/or touches at a screen position. - Set `buttons` to `[\"finger\"]` to press down and `[]` to release all buttons. - Omit `buttons` to leave the current press state unchanged. - `position` is an array of per-finger `[x, y]` coordinates. May be omitted for button-only input. - **TouchCurveInputRequest** – animates a drag/swipe from `start` to `end` over `duration` ms. - Optional `bezierPoints` shape the path; omit for a straight-line drag. - **TextInputRequest** – types the given text. Buttons (or keys) accepted by `buttons` / `startButtons` / `endButtons` are an array of strings, each either a single ASCII character or one of the following keywords: - VM buttons (case-insensitive): `finger`, `homeButton`, `holdButton` (Power/Hold), `volumeUp`, `volumeDown`, `backButton`, `overviewButton`. `ringerSwitch` is not supported. - Keyboard key names: `again`, `alt`, `alterase`, `apostrophe`, `back`, `backslash`, `backspace`, `bassboost`, `bookmarks`, `bsp`, `calc`, `camera`, `cancel`, `caps`, `capslock`, `chat`, `close`, `closecd`, `comma`, `compose`, `computer`, `config`, `connect`, `copy`, `ctrl`, `cut`, `cyclewindows`, `dashboard`, `del`, `delete`, `deletefile`, `dot`, `down`, `edit`, `eject`, `ejectclose`, `email`, `end`, `enter`, `equal`, `esc`, `escape`, `exit`, `f1`–`f24`, `fastfwd`, `file`, `finance`, `find`, `forward`, `front`, `grave`, `hangeul`, `hanja`, `help`, `henkan`, `home`, `homepage`, `hp`, `hrgn`, `ins`, `insert`, `iso`, `k102`, `kp0`–`kp9`, `kpasterisk`, `kpcomma`, `kpdot`, `kpenter`, `kpequal`, `kpjpcomma`, `kpleftparen`, `kpminus`, `kpplus`, `kpplusminus`, `kprightparen`, `kpslash`, `ktkn`, `ktknhrgn`, `left`, `leftalt`, `leftbrace`, `leftctrl`, `leftmeta`, `leftshift`, `linefeed`, `macro`, `mail`, `menu`, `meta`, `minus`, `move`, `msdos`, `muhenkan`, `mute`, `new`, `next`, `numlock`, `open`, `pagedown`, `pageup`, `paste`, `pause`, `pausecd`, `pgdn`, `pgup`, `phone`, `play`, `playcd`, `playpause`, `power`, `previous`, `print`, `prog1`–`prog4`, `props`, `question`, `record`, `redo`, `refresh`, `return`, `rewind`, `right`, `rightalt`, `rightbrace`, `rightctrl`, `rightmeta`, `rightshift`, `ro`, `rotate`, `scale`, `screenlock`, `scrolldown`, `scrolllock`, `scrollup`, `search`, `semicolon`, `sendfile`, `setup`, `shift`, `shop`, `slash`, `sleep`, `sound`, `space`, `sport`, `stop`, `stopcd`, `suspend`, `sysrq`, `tab`, `undo`, `up`, `voldown`, `volup`, `wakeup`, `www`, `xfer`, `yen`, `zkhk`. Use `finger:1` to press the fingerprint sensor (see the `fingerprint` example). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param instance_input_body: Array of input events to send to the VM. (required) + :type instance_input_body: List[InstanceInputBody] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_post_instance_input_serialize( + instance_id=instance_id, + instance_input_body=instance_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InputResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_post_instance_input_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + instance_input_body: Annotated[List[InstanceInputBody], Field(description="Array of input events to send to the VM.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Provide Instance Input + + Sends a touch or button event to the VM. Events in the request array are processed in order. Each element of the request array is one of: - **TouchInputRequest** – holds buttons (or keys) and/or touches at a screen position. - Set `buttons` to `[\"finger\"]` to press down and `[]` to release all buttons. - Omit `buttons` to leave the current press state unchanged. - `position` is an array of per-finger `[x, y]` coordinates. May be omitted for button-only input. - **TouchCurveInputRequest** – animates a drag/swipe from `start` to `end` over `duration` ms. - Optional `bezierPoints` shape the path; omit for a straight-line drag. - **TextInputRequest** – types the given text. Buttons (or keys) accepted by `buttons` / `startButtons` / `endButtons` are an array of strings, each either a single ASCII character or one of the following keywords: - VM buttons (case-insensitive): `finger`, `homeButton`, `holdButton` (Power/Hold), `volumeUp`, `volumeDown`, `backButton`, `overviewButton`. `ringerSwitch` is not supported. - Keyboard key names: `again`, `alt`, `alterase`, `apostrophe`, `back`, `backslash`, `backspace`, `bassboost`, `bookmarks`, `bsp`, `calc`, `camera`, `cancel`, `caps`, `capslock`, `chat`, `close`, `closecd`, `comma`, `compose`, `computer`, `config`, `connect`, `copy`, `ctrl`, `cut`, `cyclewindows`, `dashboard`, `del`, `delete`, `deletefile`, `dot`, `down`, `edit`, `eject`, `ejectclose`, `email`, `end`, `enter`, `equal`, `esc`, `escape`, `exit`, `f1`–`f24`, `fastfwd`, `file`, `finance`, `find`, `forward`, `front`, `grave`, `hangeul`, `hanja`, `help`, `henkan`, `home`, `homepage`, `hp`, `hrgn`, `ins`, `insert`, `iso`, `k102`, `kp0`–`kp9`, `kpasterisk`, `kpcomma`, `kpdot`, `kpenter`, `kpequal`, `kpjpcomma`, `kpleftparen`, `kpminus`, `kpplus`, `kpplusminus`, `kprightparen`, `kpslash`, `ktkn`, `ktknhrgn`, `left`, `leftalt`, `leftbrace`, `leftctrl`, `leftmeta`, `leftshift`, `linefeed`, `macro`, `mail`, `menu`, `meta`, `minus`, `move`, `msdos`, `muhenkan`, `mute`, `new`, `next`, `numlock`, `open`, `pagedown`, `pageup`, `paste`, `pause`, `pausecd`, `pgdn`, `pgup`, `phone`, `play`, `playcd`, `playpause`, `power`, `previous`, `print`, `prog1`–`prog4`, `props`, `question`, `record`, `redo`, `refresh`, `return`, `rewind`, `right`, `rightalt`, `rightbrace`, `rightctrl`, `rightmeta`, `rightshift`, `ro`, `rotate`, `scale`, `screenlock`, `scrolldown`, `scrolllock`, `scrollup`, `search`, `semicolon`, `sendfile`, `setup`, `shift`, `shop`, `slash`, `sleep`, `sound`, `space`, `sport`, `stop`, `stopcd`, `suspend`, `sysrq`, `tab`, `undo`, `up`, `voldown`, `volup`, `wakeup`, `www`, `xfer`, `yen`, `zkhk`. Use `finger:1` to press the fingerprint sensor (see the `fingerprint` example). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param instance_input_body: Array of input events to send to the VM. (required) + :type instance_input_body: List[InstanceInputBody] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_post_instance_input_serialize( + instance_id=instance_id, + instance_input_body=instance_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InputResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_post_instance_input_serialize( + self, + instance_id, + instance_input_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'InstanceInputBody': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if instance_input_body is not None: + _body_params = instance_input_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/input', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_put_instance_image_upload( + self, + instance: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, Optional[object]]: + """Upload image chunk + + Uploads one chunk of a file attached to this device, using the same resumable protocol as `PUT /v3/images/{imageId}/file`. You choose the image ID (a new random UUID) and the image record is created on the first chunk; `type` and `name` in the path set the image type and name. Because the image is attached to the device, it replaces any image of the same `type` already attached (for `partition`, only the one with the same `name`), and it is deleted when the device is deleted. The web interface uses this route, for example to replace a kernel. For your own code, `POST /v3/images` with `instanceId` followed by `PUT /v3/images/{imageId}/file` is easier to follow. Returns 200 with an empty object for each stored chunk. + + :param instance: Instance ID. (required) + :type instance: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_instance_image_upload_serialize( + instance=instance, + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_put_instance_image_upload_with_http_info( + self, + instance: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, Optional[object]]]: + """Upload image chunk + + Uploads one chunk of a file attached to this device, using the same resumable protocol as `PUT /v3/images/{imageId}/file`. You choose the image ID (a new random UUID) and the image record is created on the first chunk; `type` and `name` in the path set the image type and name. Because the image is attached to the device, it replaces any image of the same `type` already attached (for `partition`, only the one with the same `name`), and it is deleted when the device is deleted. The web interface uses this route, for example to replace a kernel. For your own code, `POST /v3/images` with `instanceId` followed by `PUT /v3/images/{imageId}/file` is easier to follow. Returns 200 with an empty object for each stored chunk. + + :param instance: Instance ID. (required) + :type instance: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_instance_image_upload_serialize( + instance=instance, + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_put_instance_image_upload_without_preload_content( + self, + instance: Annotated[StrictStr, Field(description="Instance ID.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload image chunk + + Uploads one chunk of a file attached to this device, using the same resumable protocol as `PUT /v3/images/{imageId}/file`. You choose the image ID (a new random UUID) and the image record is created on the first chunk; `type` and `name` in the path set the image type and name. Because the image is attached to the device, it replaces any image of the same `type` already attached (for `partition`, only the one with the same `name`), and it is deleted when the device is deleted. The web interface uses this route, for example to replace a kernel. For your own code, `POST /v3/images` with `instanceId` followed by `PUT /v3/images/{imageId}/file` is easier to follow. Returns 200 with an empty object for each stored chunk. + + :param instance: Instance ID. (required) + :type instance: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_instance_image_upload_serialize( + instance=instance, + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_put_instance_image_upload_serialize( + self, + instance, + type, + image_id, + name, + body, + resumable_chunk_number, + resumable_chunk_size, + resumable_current_chunk_size, + resumable_total_size, + resumable_total_chunks, + corellium_checksum, + flavor, + x_corellium_image_encoding, + x_corellium_image_encapsulated, + x_corellium_total_file_size, + x_corellium_image_password, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance is not None: + _path_params['instance'] = instance + if type is not None: + _path_params['type'] = type + if image_id is not None: + _path_params['imageId'] = image_id + if name is not None: + _path_params['name'] = name + # process the query parameters + if resumable_chunk_number is not None: + + _query_params.append(('resumableChunkNumber', resumable_chunk_number)) + + if resumable_chunk_size is not None: + + _query_params.append(('resumableChunkSize', resumable_chunk_size)) + + if resumable_current_chunk_size is not None: + + _query_params.append(('resumableCurrentChunkSize', resumable_current_chunk_size)) + + if resumable_total_size is not None: + + _query_params.append(('resumableTotalSize', resumable_total_size)) + + if resumable_total_chunks is not None: + + _query_params.append(('resumableTotalChunks', resumable_total_chunks)) + + if corellium_checksum is not None: + + _query_params.append(('corelliumChecksum', corellium_checksum)) + + if flavor is not None: + + _query_params.append(('flavor', flavor)) + + # process the header parameters + if x_corellium_image_encoding is not None: + _header_params['x-corellium-image-encoding'] = x_corellium_image_encoding + if x_corellium_image_encapsulated is not None: + _header_params['x-corellium-image-encapsulated'] = x_corellium_image_encapsulated + if x_corellium_total_file_size is not None: + _header_params['x-corellium-total-file-size'] = x_corellium_total_file_size + if x_corellium_image_password is not None: + _header_params['x-corellium-image-password'] = x_corellium_image_password + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/instances/{instance}/image-upload/{type}/{imageId}/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_reboot_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Restart a device + + Restarts a running device. Returns 204 once the reboot is accepted; the state becomes `rebooting` and then `on`. Poll `v3GetInstanceState` to see when it is back. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_reboot_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_reboot_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Restart a device + + Restarts a running device. Returns 204 once the reboot is accepted; the state becomes `rebooting` and then `on`. Poll `v3GetInstanceState` to see when it is back. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_reboot_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_reboot_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restart a device + + Restarts a running device. Returns 204 once the reboot is accepted; the state becomes `rebooting` and then `on`. Poll `v3GetInstanceState` to see when it is back. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_reboot_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_reboot_instance_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/reboot', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_restore_backup( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + restore_backup_body: Annotated[Optional[RestoreBackupBody], Field(description="Restore backup data.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Restore a backup onto a device + + Restores the backup attached to this device, replacing the device's data with the backup's contents. First attach the backup file by uploading it with `POST /v3/images` using `type: \"backup\"` and `instanceId` set to this device. Returns 204 once the restore has been scheduled; it runs in the background, so poll `v3GetInstanceState` until the device settles. Supply `password` if the backup is encrypted. Fails with 404 if no backup is attached. Requires the backup-restore license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param restore_backup_body: Restore backup data. + :type restore_backup_body: RestoreBackupBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_restore_backup_serialize( + instance_id=instance_id, + restore_backup_body=restore_backup_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_restore_backup_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + restore_backup_body: Annotated[Optional[RestoreBackupBody], Field(description="Restore backup data.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Restore a backup onto a device + + Restores the backup attached to this device, replacing the device's data with the backup's contents. First attach the backup file by uploading it with `POST /v3/images` using `type: \"backup\"` and `instanceId` set to this device. Returns 204 once the restore has been scheduled; it runs in the background, so poll `v3GetInstanceState` until the device settles. Supply `password` if the backup is encrypted. Fails with 404 if no backup is attached. Requires the backup-restore license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param restore_backup_body: Restore backup data. + :type restore_backup_body: RestoreBackupBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_restore_backup_serialize( + instance_id=instance_id, + restore_backup_body=restore_backup_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_restore_backup_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + restore_backup_body: Annotated[Optional[RestoreBackupBody], Field(description="Restore backup data.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore a backup onto a device + + Restores the backup attached to this device, replacing the device's data with the backup's contents. First attach the backup file by uploading it with `POST /v3/images` using `type: \"backup\"` and `instanceId` set to this device. Returns 204 once the restore has been scheduled; it runs in the background, so poll `v3GetInstanceState` until the device settles. Supply `password` if the backup is encrypted. Fails with 404 if no backup is attached. Requires the backup-restore license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param restore_backup_body: Restore backup data. + :type restore_backup_body: RestoreBackupBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_restore_backup_serialize( + instance_id=instance_id, + restore_backup_body=restore_backup_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_restore_backup_serialize( + self, + instance_id, + restore_backup_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if restore_backup_body is not None: + _body_params = restore_backup_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/restoreBackup', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_rotate_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + rotate_body: RotateBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Rotate the device + + Turns the device to a new orientation, as if you rotated the phone in your hand; apps receive the rotation event. `orientation` is 1 = portrait, 2 = portrait upside down, 3 = landscape (top of device on the left), 4 = landscape (top of device on the right). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param rotate_body: (required) + :type rotate_body: RotateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_rotate_instance_serialize( + instance_id=instance_id, + rotate_body=rotate_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_rotate_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + rotate_body: RotateBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Rotate the device + + Turns the device to a new orientation, as if you rotated the phone in your hand; apps receive the rotation event. `orientation` is 1 = portrait, 2 = portrait upside down, 3 = landscape (top of device on the left), 4 = landscape (top of device on the right). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param rotate_body: (required) + :type rotate_body: RotateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_rotate_instance_serialize( + instance_id=instance_id, + rotate_body=rotate_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_rotate_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + rotate_body: RotateBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Rotate the device + + Turns the device to a new orientation, as if you rotated the phone in your hand; apps receive the rotation event. `orientation` is 1 = portrait, 2 = portrait upside down, 3 = landscape (top of device on the left), 4 = landscape (top of device on the right). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param rotate_body: (required) + :type rotate_body: RotateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_rotate_instance_serialize( + instance_id=instance_id, + rotate_body=rotate_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_rotate_instance_serialize( + self, + instance_id, + rotate_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if rotate_body is not None: + _body_params = rotate_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/rotate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_set_instance_gpios( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + gpios_state: Annotated[GpiosState, Field(description="New GPIO state.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GpiosState: + """Press board buttons or flip switches + + Sets the state of the simulated buttons and switches (GPIO pins) on an IoT or embedded board model, as if you pressed a button or flipped a switch on real hardware; your firmware sees the change. Send the full bank layout you got from `v3GetInstanceGpios`, with the bits you want changed. Returns the state after the change. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param gpios_state: New GPIO state. (required) + :type gpios_state: GpiosState + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_instance_gpios_serialize( + instance_id=instance_id, + gpios_state=gpios_state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosState", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_set_instance_gpios_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + gpios_state: Annotated[GpiosState, Field(description="New GPIO state.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GpiosState]: + """Press board buttons or flip switches + + Sets the state of the simulated buttons and switches (GPIO pins) on an IoT or embedded board model, as if you pressed a button or flipped a switch on real hardware; your firmware sees the change. Send the full bank layout you got from `v3GetInstanceGpios`, with the bits you want changed. Returns the state after the change. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param gpios_state: New GPIO state. (required) + :type gpios_state: GpiosState + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_instance_gpios_serialize( + instance_id=instance_id, + gpios_state=gpios_state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosState", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_set_instance_gpios_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + gpios_state: Annotated[GpiosState, Field(description="New GPIO state.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Press board buttons or flip switches + + Sets the state of the simulated buttons and switches (GPIO pins) on an IoT or embedded board model, as if you pressed a button or flipped a switch on real hardware; your firmware sees the change. Send the full bank layout you got from `v3GetInstanceGpios`, with the bits you want changed. Returns the state after the change. The device must be running. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param gpios_state: New GPIO state. (required) + :type gpios_state: GpiosState + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_instance_gpios_serialize( + instance_id=instance_id, + gpios_state=gpios_state, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosState", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_set_instance_gpios_serialize( + self, + instance_id, + gpios_state, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if gpios_state is not None: + _body_params = gpios_state + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/instances/{instanceId}/gpios', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_set_instance_peripherals( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + peripherals_data: Annotated[PeripheralsData, Field(description="New peripherals state.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PeripheralsData: + """Change simulated sensors + + Changes what the device's simulated sensors report to apps, for example to fake a GPS location, a low battery, or a tilt. Send only the fields you want to change. The new values are saved with the device and then the current readings are returned. A field is applied only if its feature is enabled for the device (motion, environment, location, battery, biometric bypass); values for disabled features are ignored silently, so check the response. `biometricPass: 1` makes fingerprint and face checks succeed. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param peripherals_data: New peripherals state. (required) + :type peripherals_data: PeripheralsData + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_instance_peripherals_serialize( + instance_id=instance_id, + peripherals_data=peripherals_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsData", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_set_instance_peripherals_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + peripherals_data: Annotated[PeripheralsData, Field(description="New peripherals state.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PeripheralsData]: + """Change simulated sensors + + Changes what the device's simulated sensors report to apps, for example to fake a GPS location, a low battery, or a tilt. Send only the fields you want to change. The new values are saved with the device and then the current readings are returned. A field is applied only if its feature is enabled for the device (motion, environment, location, battery, biometric bypass); values for disabled features are ignored silently, so check the response. `biometricPass: 1` makes fingerprint and face checks succeed. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param peripherals_data: New peripherals state. (required) + :type peripherals_data: PeripheralsData + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_instance_peripherals_serialize( + instance_id=instance_id, + peripherals_data=peripherals_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsData", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_set_instance_peripherals_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + peripherals_data: Annotated[PeripheralsData, Field(description="New peripherals state.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Change simulated sensors + + Changes what the device's simulated sensors report to apps, for example to fake a GPS location, a low battery, or a tilt. Send only the fields you want to change. The new values are saved with the device and then the current readings are returned. A field is applied only if its feature is enabled for the device (motion, environment, location, battery, biometric bypass); values for disabled features are ignored silently, so check the response. `biometricPass: 1` makes fingerprint and face checks succeed. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param peripherals_data: New peripherals state. (required) + :type peripherals_data: PeripheralsData + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_instance_peripherals_serialize( + instance_id=instance_id, + peripherals_data=peripherals_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsData", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_set_instance_peripherals_serialize( + self, + instance_id, + peripherals_data, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if peripherals_data is not None: + _body_params = peripherals_data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/instances/{instanceId}/peripherals', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + start_instance_body: Annotated[Optional[StartInstanceBody], Field(description="Start options.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Turn a device on + + Turns on a device that is `off`. Returns 204 as soon as the start is accepted; the device then boots in the background. Poll `v3GetInstanceState` until it is `on`. Returns 409 if the device is already on. **Starting paused (`paused: true`).** The device is powered on but no code runs until you call `v3UnpauseInstance` or resume it from a debugger. This is the standard way to debug a device from its very first instruction, for example custom or IoT firmware, or code that runs early in boot: 1. Upload your firmware and create the device (or stop an existing one). 2. `v3StartInstance` with `{ \"paused\": true }`. 3. Connect your debugger (for example GDB) to the device's debug port, shown in the device's connection details. 4. Load symbols from your firmware or kernel file, set breakpoints, or load code into memory. 5. Continue execution from the debugger (`c` in GDB). Once a debugger is attached, pause and resume from the debugger rather than with `v3PauseInstance` / `v3UnpauseInstance`: GDB expects to control pausing itself, and pausing through the API can confuse its session. **Network monitoring (`sockCap: true`).** Starts the device with process network monitoring enabled, so network activity can be attributed to the processes that made it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param start_instance_body: Start options. + :type start_instance_body: StartInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_instance_serialize( + instance_id=instance_id, + start_instance_body=start_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + start_instance_body: Annotated[Optional[StartInstanceBody], Field(description="Start options.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Turn a device on + + Turns on a device that is `off`. Returns 204 as soon as the start is accepted; the device then boots in the background. Poll `v3GetInstanceState` until it is `on`. Returns 409 if the device is already on. **Starting paused (`paused: true`).** The device is powered on but no code runs until you call `v3UnpauseInstance` or resume it from a debugger. This is the standard way to debug a device from its very first instruction, for example custom or IoT firmware, or code that runs early in boot: 1. Upload your firmware and create the device (or stop an existing one). 2. `v3StartInstance` with `{ \"paused\": true }`. 3. Connect your debugger (for example GDB) to the device's debug port, shown in the device's connection details. 4. Load symbols from your firmware or kernel file, set breakpoints, or load code into memory. 5. Continue execution from the debugger (`c` in GDB). Once a debugger is attached, pause and resume from the debugger rather than with `v3PauseInstance` / `v3UnpauseInstance`: GDB expects to control pausing itself, and pausing through the API can confuse its session. **Network monitoring (`sockCap: true`).** Starts the device with process network monitoring enabled, so network activity can be attributed to the processes that made it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param start_instance_body: Start options. + :type start_instance_body: StartInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_instance_serialize( + instance_id=instance_id, + start_instance_body=start_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + start_instance_body: Annotated[Optional[StartInstanceBody], Field(description="Start options.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Turn a device on + + Turns on a device that is `off`. Returns 204 as soon as the start is accepted; the device then boots in the background. Poll `v3GetInstanceState` until it is `on`. Returns 409 if the device is already on. **Starting paused (`paused: true`).** The device is powered on but no code runs until you call `v3UnpauseInstance` or resume it from a debugger. This is the standard way to debug a device from its very first instruction, for example custom or IoT firmware, or code that runs early in boot: 1. Upload your firmware and create the device (or stop an existing one). 2. `v3StartInstance` with `{ \"paused\": true }`. 3. Connect your debugger (for example GDB) to the device's debug port, shown in the device's connection details. 4. Load symbols from your firmware or kernel file, set breakpoints, or load code into memory. 5. Continue execution from the debugger (`c` in GDB). Once a debugger is attached, pause and resume from the debugger rather than with `v3PauseInstance` / `v3UnpauseInstance`: GDB expects to control pausing itself, and pausing through the API can confuse its session. **Network monitoring (`sockCap: true`).** Starts the device with process network monitoring enabled, so network activity can be attributed to the processes that made it. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param start_instance_body: Start options. + :type start_instance_body: StartInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_instance_serialize( + instance_id=instance_id, + start_instance_body=start_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_instance_serialize( + self, + instance_id, + start_instance_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if start_instance_body is not None: + _body_params = start_instance_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_netdump( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_netdump_body: Optional[EnableNetdumpBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start Enhanced Network Monitor + + Starts Enhanced Network Monitor on this device. It captures raw network packets, and every filter in the body is optional: limit the capture to certain ports, protocols, hosts, or process names to keep it small. Download it with `v3DownloadNetdumpPcap`. Requires the Enhanced Network Monitor feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_netdump_body: + :type enable_netdump_body: EnableNetdumpBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_netdump_serialize( + instance_id=instance_id, + enable_netdump_body=enable_netdump_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_netdump_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_netdump_body: Optional[EnableNetdumpBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start Enhanced Network Monitor + + Starts Enhanced Network Monitor on this device. It captures raw network packets, and every filter in the body is optional: limit the capture to certain ports, protocols, hosts, or process names to keep it small. Download it with `v3DownloadNetdumpPcap`. Requires the Enhanced Network Monitor feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_netdump_body: + :type enable_netdump_body: EnableNetdumpBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_netdump_serialize( + instance_id=instance_id, + enable_netdump_body=enable_netdump_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_netdump_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_netdump_body: Optional[EnableNetdumpBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start Enhanced Network Monitor + + Starts Enhanced Network Monitor on this device. It captures raw network packets, and every filter in the body is optional: limit the capture to certain ports, protocols, hosts, or process names to keep it small. Download it with `v3DownloadNetdumpPcap`. Requires the Enhanced Network Monitor feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_netdump_body: + :type enable_netdump_body: EnableNetdumpBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_netdump_serialize( + instance_id=instance_id, + enable_netdump_body=enable_netdump_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_netdump_serialize( + self, + instance_id, + enable_netdump_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if enable_netdump_body is not None: + _body_params = enable_netdump_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/netdump/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_network_monitor( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_sslsplit_body: Optional[EnableSslsplitBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start Network Monitor + + Starts Network Monitor on this device. It records the device's network traffic, including HTTPS traffic decrypted by intercepting its encryption, so you can see what apps send and receive. Download the capture as a pcap file (open it with Wireshark) with `v3DownloadNetworkMonitorPcap`. Apps that pin their certificates may refuse the intercepted connections. Requires the Network Monitor license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_sslsplit_body: + :type enable_sslsplit_body: EnableSslsplitBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_network_monitor_serialize( + instance_id=instance_id, + enable_sslsplit_body=enable_sslsplit_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_network_monitor_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_sslsplit_body: Optional[EnableSslsplitBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start Network Monitor + + Starts Network Monitor on this device. It records the device's network traffic, including HTTPS traffic decrypted by intercepting its encryption, so you can see what apps send and receive. Download the capture as a pcap file (open it with Wireshark) with `v3DownloadNetworkMonitorPcap`. Apps that pin their certificates may refuse the intercepted connections. Requires the Network Monitor license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_sslsplit_body: + :type enable_sslsplit_body: EnableSslsplitBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_network_monitor_serialize( + instance_id=instance_id, + enable_sslsplit_body=enable_sslsplit_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_network_monitor_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + enable_sslsplit_body: Optional[EnableSslsplitBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start Network Monitor + + Starts Network Monitor on this device. It records the device's network traffic, including HTTPS traffic decrypted by intercepting its encryption, so you can see what apps send and receive. Download the capture as a pcap file (open it with Wireshark) with `v3DownloadNetworkMonitorPcap`. Apps that pin their certificates may refuse the intercepted connections. Requires the Network Monitor license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param enable_sslsplit_body: + :type enable_sslsplit_body: EnableSslsplitBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_network_monitor_serialize( + instance_id=instance_id, + enable_sslsplit_body=enable_sslsplit_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_network_monitor_serialize( + self, + instance_id, + enable_sslsplit_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if enable_sslsplit_body is not None: + _body_params = enable_sslsplit_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/sslsplit/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_stop_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + stop_instance_body: Annotated[Optional[StopInstanceBody], Field(description="Stop options.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Turn a device off + + Turns a running device off. By default (`soft: true`) the operating system is asked to shut down cleanly. Send `{ \"soft\": false }` to force an immediate stop instead; use it when a clean shutdown does not finish. Returns 204 once the stop is accepted; poll `v3GetInstanceState` until it is `off`. Returns 409 if the device is already off. A stopped device keeps its storage and can be turned on again with `v3StartInstance`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param stop_instance_body: Stop options. + :type stop_instance_body: StopInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_instance_serialize( + instance_id=instance_id, + stop_instance_body=stop_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_stop_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + stop_instance_body: Annotated[Optional[StopInstanceBody], Field(description="Stop options.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Turn a device off + + Turns a running device off. By default (`soft: true`) the operating system is asked to shut down cleanly. Send `{ \"soft\": false }` to force an immediate stop instead; use it when a clean shutdown does not finish. Returns 204 once the stop is accepted; poll `v3GetInstanceState` until it is `off`. Returns 409 if the device is already off. A stopped device keeps its storage and can be turned on again with `v3StartInstance`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param stop_instance_body: Stop options. + :type stop_instance_body: StopInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_instance_serialize( + instance_id=instance_id, + stop_instance_body=stop_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_stop_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + stop_instance_body: Annotated[Optional[StopInstanceBody], Field(description="Stop options.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Turn a device off + + Turns a running device off. By default (`soft: true`) the operating system is asked to shut down cleanly. Send `{ \"soft\": false }` to force an immediate stop instead; use it when a clean shutdown does not finish. Returns 204 once the stop is accepted; poll `v3GetInstanceState` until it is `off`. Returns 409 if the device is already off. A stopped device keeps its storage and can be turned on again with `v3StartInstance`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param stop_instance_body: Stop options. + :type stop_instance_body: StopInstanceBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_instance_serialize( + instance_id=instance_id, + stop_instance_body=stop_instance_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_stop_instance_serialize( + self, + instance_id, + stop_instance_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if stop_instance_body is not None: + _body_params = stop_instance_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_stop_netdump( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop Enhanced Network Monitor + + Stops Enhanced Network Monitor on this device. The capture so far can still be downloaded with `v3DownloadNetdumpPcap`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_netdump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_stop_netdump_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop Enhanced Network Monitor + + Stops Enhanced Network Monitor on this device. The capture so far can still be downloaded with `v3DownloadNetdumpPcap`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_netdump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_stop_netdump_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop Enhanced Network Monitor + + Stops Enhanced Network Monitor on this device. The capture so far can still be downloaded with `v3DownloadNetdumpPcap`. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_netdump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_stop_netdump_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/netdump/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_stop_network_monitor( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Stop Network Monitor + + Stops Network Monitor on this device. The capture so far can still be downloaded with `v3DownloadNetworkMonitorPcap`. Requires the Network Monitor license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_network_monitor_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_stop_network_monitor_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Stop Network Monitor + + Stops Network Monitor on this device. The capture so far can still be downloaded with `v3DownloadNetworkMonitorPcap`. Requires the Network Monitor license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_network_monitor_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_stop_network_monitor_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Stop Network Monitor + + Stops Network Monitor on this device. The capture so far can still be downloaded with `v3DownloadNetworkMonitorPcap`. Requires the Network Monitor license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_stop_network_monitor_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_stop_network_monitor_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/sslsplit/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_unpause_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Resume a paused device + + Resumes a device that was paused with `v3PauseInstance`, or started with `paused: true`. It continues from exactly where it stopped. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_unpause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_unpause_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Resume a paused device + + Resumes a device that was paused with `v3PauseInstance`, or started with `paused: true`. It continues from exactly where it stopped. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_unpause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_unpause_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Resume a paused device + + Resumes a device that was paused with `v3PauseInstance`, or started with `paused: true`. It continues from exactly where it stopped. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_unpause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_unpause_instance_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/unpause', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_upgrade_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + instance_upgrade_body: InstanceUpgradeBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceUpgradeResponse: + """Upgrade the iOS version + + Upgrades an iOS device to a newer iOS version while keeping it as the same device. Returns 202 with `state: \"updating\"` once accepted; the upgrade runs in the background, so poll `v3GetInstanceState` until it is `on`. Pick the version from `GET /v3/models/{model}/software`. Use `osVersion`; the old `os` field is rejected. Requires the OS update license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param instance_upgrade_body: (required) + :type instance_upgrade_body: InstanceUpgradeBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upgrade_instance_serialize( + instance_id=instance_id, + instance_upgrade_body=instance_upgrade_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "InstanceUpgradeResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_upgrade_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + instance_upgrade_body: InstanceUpgradeBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceUpgradeResponse]: + """Upgrade the iOS version + + Upgrades an iOS device to a newer iOS version while keeping it as the same device. Returns 202 with `state: \"updating\"` once accepted; the upgrade runs in the background, so poll `v3GetInstanceState` until it is `on`. Pick the version from `GET /v3/models/{model}/software`. Use `osVersion`; the old `os` field is rejected. Requires the OS update license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param instance_upgrade_body: (required) + :type instance_upgrade_body: InstanceUpgradeBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upgrade_instance_serialize( + instance_id=instance_id, + instance_upgrade_body=instance_upgrade_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "InstanceUpgradeResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_upgrade_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + instance_upgrade_body: InstanceUpgradeBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upgrade the iOS version + + Upgrades an iOS device to a newer iOS version while keeping it as the same device. Returns 202 with `state: \"updating\"` once accepted; the upgrade runs in the background, so poll `v3GetInstanceState` until it is `on`. Pick the version from `GET /v3/models/{model}/software`. Use `osVersion`; the old `os` field is rejected. Requires the OS update license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param instance_upgrade_body: (required) + :type instance_upgrade_body: InstanceUpgradeBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_upgrade_instance_serialize( + instance_id=instance_id, + instance_upgrade_body=instance_upgrade_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "InstanceUpgradeResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_upgrade_instance_serialize( + self, + instance_id, + instance_upgrade_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if instance_upgrade_body is not None: + _body_params = instance_upgrade_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/upgrade', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_validate_instance_token( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + token_validate_body: TokenValidateBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Check a device connection token + + Checks whether a connection token issued for this device is still valid. Returns 204 if it is. This call needs no `Authorization` header; the token in the body is what is checked. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param token_validate_body: (required) + :type token_validate_body: TokenValidateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_validate_instance_token_serialize( + instance_id=instance_id, + token_validate_body=token_validate_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_validate_instance_token_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + token_validate_body: TokenValidateBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Check a device connection token + + Checks whether a connection token issued for this device is still valid. Returns 204 if it is. This call needs no `Authorization` header; the token in the body is what is checked. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param token_validate_body: (required) + :type token_validate_body: TokenValidateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_validate_instance_token_serialize( + instance_id=instance_id, + token_validate_body=token_validate_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_validate_instance_token_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + token_validate_body: TokenValidateBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check a device connection token + + Checks whether a connection token issued for this device is still valid. Returns 204 if it is. This call needs no `Authorization` header; the token in the body is what is checked. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param token_validate_body: (required) + :type token_validate_body: TokenValidateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_validate_instance_token_serialize( + instance_id=instance_id, + token_validate_body=token_validate_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_validate_instance_token_serialize( + self, + instance_id, + token_validate_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if token_validate_body is not None: + _body_params = token_validate_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/token/validate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/instances_v1_api.py b/corellium/api/instances_v1_api.py new file mode 100644 index 0000000..9f8ed46 --- /dev/null +++ b/corellium/api/instances_v1_api.py @@ -0,0 +1,12532 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated +from corellium.models.attach_interface_request import AttachInterfaceRequest +from corellium.models.detach_interface_request import DetachInterfaceRequest +from corellium.models.gpios_state_v1 import GpiosStateV1 +from corellium.models.input_response_v1 import InputResponseV1 +from corellium.models.instance_console_endpoint_v1 import InstanceConsoleEndpointV1 +from corellium.models.instance_create_options import InstanceCreateOptions +from corellium.models.instance_input_request import InstanceInputRequest +from corellium.models.instance_return import InstanceReturn +from corellium.models.instance_start_options import InstanceStartOptions +from corellium.models.instance_stop_options import InstanceStopOptions +from corellium.models.instance_upgrade_body_v1 import InstanceUpgradeBodyV1 +from corellium.models.instance_v1 import InstanceV1 +from corellium.models.media_play_body_v1 import MediaPlayBodyV1 +from corellium.models.netdump_filter import NetdumpFilter +from corellium.models.patch_instance_options import PatchInstanceOptions +from corellium.models.patch_instance_read_only import PatchInstanceReadOnly +from corellium.models.peripherals_data_v1 import PeripheralsDataV1 +from corellium.models.restore_backup_data import RestoreBackupData +from corellium.models.rotate_body_v1 import RotateBodyV1 +from corellium.models.sslsplit_filter import SslsplitFilter +from corellium.models.v1_set_state_body import V1SetStateBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class InstancesV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_attach_instance_interface( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + attach_interface_request: Annotated[AttachInterfaceRequest, Field(description="Interface attachment request")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Attach I/O Interface + + Attach an I/O interface to an I/O interconnect for the specified instance identifier. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param attach_interface_request: Interface attachment request (required) + :type attach_interface_request: AttachInterfaceRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/interfaces is deprecated.", DeprecationWarning) + + _param = self._v1_attach_instance_interface_serialize( + instance_id=instance_id, + attach_interface_request=attach_interface_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_attach_instance_interface_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + attach_interface_request: Annotated[AttachInterfaceRequest, Field(description="Interface attachment request")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Attach I/O Interface + + Attach an I/O interface to an I/O interconnect for the specified instance identifier. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param attach_interface_request: Interface attachment request (required) + :type attach_interface_request: AttachInterfaceRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/interfaces is deprecated.", DeprecationWarning) + + _param = self._v1_attach_instance_interface_serialize( + instance_id=instance_id, + attach_interface_request=attach_interface_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_attach_instance_interface_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + attach_interface_request: Annotated[AttachInterfaceRequest, Field(description="Interface attachment request")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Attach I/O Interface + + Attach an I/O interface to an I/O interconnect for the specified instance identifier. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param attach_interface_request: Interface attachment request (required) + :type attach_interface_request: AttachInterfaceRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/interfaces is deprecated.", DeprecationWarning) + + _param = self._v1_attach_instance_interface_serialize( + instance_id=instance_id, + attach_interface_request=attach_interface_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_attach_instance_interface_serialize( + self, + instance_id, + attach_interface_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if attach_interface_request is not None: + _body_params = attach_interface_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/interfaces', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_clear_instance_panics( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Clear Panics + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/panics is deprecated.", DeprecationWarning) + + _param = self._v1_clear_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_clear_instance_panics_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Clear Panics + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/panics is deprecated.", DeprecationWarning) + + _param = self._v1_clear_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_clear_instance_panics_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Clear Panics + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/panics is deprecated.", DeprecationWarning) + + _param = self._v1_clear_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_clear_instance_panics_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}/panics', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_create_instance( + self, + instance_create_options: Annotated[InstanceCreateOptions, Field(description="The vm definition to create")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceReturn: + """(Deprecated) Create Instance + + + :param instance_create_options: The vm definition to create (required) + :type instance_create_options: InstanceCreateOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances is deprecated.", DeprecationWarning) + + _param = self._v1_create_instance_serialize( + instance_create_options=instance_create_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceReturn", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_instance_with_http_info( + self, + instance_create_options: Annotated[InstanceCreateOptions, Field(description="The vm definition to create")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceReturn]: + """(Deprecated) Create Instance + + + :param instance_create_options: The vm definition to create (required) + :type instance_create_options: InstanceCreateOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances is deprecated.", DeprecationWarning) + + _param = self._v1_create_instance_serialize( + instance_create_options=instance_create_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceReturn", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_instance_without_preload_content( + self, + instance_create_options: Annotated[InstanceCreateOptions, Field(description="The vm definition to create")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create Instance + + + :param instance_create_options: The vm definition to create (required) + :type instance_create_options: InstanceCreateOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances is deprecated.", DeprecationWarning) + + _param = self._v1_create_instance_serialize( + instance_create_options=instance_create_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceReturn", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_instance_serialize( + self, + instance_create_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if instance_create_options is not None: + _body_params = instance_create_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Remove Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Remove Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Remove Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_instance_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_detach_instance_interface( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + interface_id: Annotated[StrictStr, Field(description="Interface ID")], + detach_interface_request: Annotated[DetachInterfaceRequest, Field(description="Interface detachment request")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Detach I/O Interface + + Detach an I/O interface from an I/O interconnect for the specified instance identifier. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param interface_id: Interface ID (required) + :type interface_id: str + :param detach_interface_request: Interface detachment request (required) + :type detach_interface_request: DetachInterfaceRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/interfaces/{interfaceId} is deprecated.", DeprecationWarning) + + _param = self._v1_detach_instance_interface_serialize( + instance_id=instance_id, + interface_id=interface_id, + detach_interface_request=detach_interface_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_detach_instance_interface_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + interface_id: Annotated[StrictStr, Field(description="Interface ID")], + detach_interface_request: Annotated[DetachInterfaceRequest, Field(description="Interface detachment request")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Detach I/O Interface + + Detach an I/O interface from an I/O interconnect for the specified instance identifier. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param interface_id: Interface ID (required) + :type interface_id: str + :param detach_interface_request: Interface detachment request (required) + :type detach_interface_request: DetachInterfaceRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/interfaces/{interfaceId} is deprecated.", DeprecationWarning) + + _param = self._v1_detach_instance_interface_serialize( + instance_id=instance_id, + interface_id=interface_id, + detach_interface_request=detach_interface_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_detach_instance_interface_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + interface_id: Annotated[StrictStr, Field(description="Interface ID")], + detach_interface_request: Annotated[DetachInterfaceRequest, Field(description="Interface detachment request")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Detach I/O Interface + + Detach an I/O interface from an I/O interconnect for the specified instance identifier. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param interface_id: Interface ID (required) + :type interface_id: str + :param detach_interface_request: Interface detachment request (required) + :type detach_interface_request: DetachInterfaceRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/interfaces/{interfaceId} is deprecated.", DeprecationWarning) + + _param = self._v1_detach_instance_interface_serialize( + instance_id=instance_id, + interface_id=interface_id, + detach_interface_request=detach_interface_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '401': "ApiErrorV1", + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '500': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_detach_instance_interface_serialize( + self, + instance_id, + interface_id, + detach_interface_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if interface_id is not None: + _path_params['interfaceId'] = interface_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if detach_interface_request is not None: + _body_params = detach_interface_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}/interfaces/{interfaceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_disable_expose_port( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Disable an exposed port on an instance for device access. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/exposeport/disable is deprecated.", DeprecationWarning) + + _param = self._v1_disable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_disable_expose_port_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Disable an exposed port on an instance for device access. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/exposeport/disable is deprecated.", DeprecationWarning) + + _param = self._v1_disable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_disable_expose_port_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Disable an exposed port on an instance for device access. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/exposeport/disable is deprecated.", DeprecationWarning) + + _param = self._v1_disable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_disable_expose_port_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/exposeport/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_download_netdump_pcap_instances( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """(Deprecated) Download a netdump pcap file + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/netdump.pcap is deprecated.", DeprecationWarning) + + _param = self._v1_download_netdump_pcap_instances_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_download_netdump_pcap_instances_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """(Deprecated) Download a netdump pcap file + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/netdump.pcap is deprecated.", DeprecationWarning) + + _param = self._v1_download_netdump_pcap_instances_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_download_netdump_pcap_instances_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Download a netdump pcap file + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/netdump.pcap is deprecated.", DeprecationWarning) + + _param = self._v1_download_netdump_pcap_instances_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_download_netdump_pcap_instances_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.tcpdump.pcap', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/netdump.pcap', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_download_network_monitor_pcap_instances( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """(Deprecated) Download a Network Monitor pcap file + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/networkMonitor.pcap is deprecated.", DeprecationWarning) + + _param = self._v1_download_network_monitor_pcap_instances_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_download_network_monitor_pcap_instances_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """(Deprecated) Download a Network Monitor pcap file + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/networkMonitor.pcap is deprecated.", DeprecationWarning) + + _param = self._v1_download_network_monitor_pcap_instances_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_download_network_monitor_pcap_instances_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Download a Network Monitor pcap file + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/networkMonitor.pcap is deprecated.", DeprecationWarning) + + _param = self._v1_download_network_monitor_pcap_instances_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_download_network_monitor_pcap_instances_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.tcpdump.pcap', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/networkMonitor.pcap', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_enable_expose_port( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Enable an exposed port on an instance for device access. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/exposeport/enable is deprecated.", DeprecationWarning) + + _param = self._v1_enable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_enable_expose_port_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Enable an exposed port on an instance for device access. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/exposeport/enable is deprecated.", DeprecationWarning) + + _param = self._v1_enable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_enable_expose_port_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Enable an exposed port on an instance for device access. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/exposeport/enable is deprecated.", DeprecationWarning) + + _param = self._v1_enable_expose_port_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_enable_expose_port_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/exposeport/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceV1: + """(Deprecated) Get Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceV1]: + """(Deprecated) Get Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_serialize( + self, + instance_id, + return_attr, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'returnAttr': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if return_attr is not None: + + _query_params.append(('returnAttr', return_attr)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance_console( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceConsoleEndpointV1: + """(Deprecated) Get console websocket URL + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/console is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_console_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceConsoleEndpointV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_console_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceConsoleEndpointV1]: + """(Deprecated) Get console websocket URL + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/console is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_console_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceConsoleEndpointV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_console_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get console websocket URL + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/console is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_console_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceConsoleEndpointV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_console_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/console', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance_console_log( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """(Deprecated) Get Console Log + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/consoleLog is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_console_log_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_console_log_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """(Deprecated) Get Console Log + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/consoleLog is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_console_log_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_console_log_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Console Log + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/consoleLog is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_console_log_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_console_log_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/consoleLog', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance_gpios( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GpiosStateV1: + """(Deprecated) Get Instance GPIOs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/gpios is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_gpios_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_gpios_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GpiosStateV1]: + """(Deprecated) Get Instance GPIOs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/gpios is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_gpios_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_gpios_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Instance GPIOs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/gpios is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_gpios_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_gpios_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/gpios', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance_panics( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[object]: + """(Deprecated) Get Panics + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/panics is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[object]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_panics_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[object]]: + """(Deprecated) Get Panics + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/panics is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[object]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_panics_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Panics + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/panics is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_panics_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[object]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_panics_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/panics', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance_peripherals( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PeripheralsDataV1: + """(Deprecated) Get Instance Peripherals + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/peripherals is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_peripherals_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsDataV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_peripherals_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PeripheralsDataV1]: + """(Deprecated) Get Instance Peripherals + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/peripherals is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_peripherals_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsDataV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_peripherals_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Instance Peripherals + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/peripherals is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_peripherals_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsDataV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_peripherals_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/peripherals', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance_screenshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + format: Annotated[StrictStr, Field(description="New peripherals state")], + scale: Annotated[Optional[StrictInt], Field(description="Screenshot scale 1:N")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """(Deprecated) Get Instance Screenshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param format: New peripherals state (required) + :type format: str + :param scale: Screenshot scale 1:N + :type scale: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/screenshot.{format} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_screenshot_serialize( + instance_id=instance_id, + format=format, + scale=scale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_screenshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + format: Annotated[StrictStr, Field(description="New peripherals state")], + scale: Annotated[Optional[StrictInt], Field(description="Screenshot scale 1:N")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """(Deprecated) Get Instance Screenshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param format: New peripherals state (required) + :type format: str + :param scale: Screenshot scale 1:N + :type scale: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/screenshot.{format} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_screenshot_serialize( + instance_id=instance_id, + format=format, + scale=scale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_screenshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + format: Annotated[StrictStr, Field(description="New peripherals state")], + scale: Annotated[Optional[StrictInt], Field(description="Screenshot scale 1:N")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Instance Screenshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param format: New peripherals state (required) + :type format: str + :param scale: Screenshot scale 1:N + :type scale: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/screenshot.{format} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_screenshot_serialize( + instance_id=instance_id, + format=format, + scale=scale, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_screenshot_serialize( + self, + instance_id, + format, + scale, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if format is not None: + _path_params['format'] = format + # process the query parameters + if scale is not None: + + _query_params.append(('scale', scale)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'image/png', + 'image/jpeg', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/screenshot.{format}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instances( + self, + name: Annotated[Optional[StrictStr], Field(description="Optionally filter by instance name")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[InstanceV1]: + """(Deprecated) Get Instances + + + :param name: Optionally filter by instance name + :type name: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances is deprecated.", DeprecationWarning) + + _param = self._v1_get_instances_serialize( + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InstanceV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instances_with_http_info( + self, + name: Annotated[Optional[StrictStr], Field(description="Optionally filter by instance name")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[InstanceV1]]: + """(Deprecated) Get Instances + + + :param name: Optionally filter by instance name + :type name: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances is deprecated.", DeprecationWarning) + + _param = self._v1_get_instances_serialize( + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InstanceV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instances_without_preload_content( + self, + name: Annotated[Optional[StrictStr], Field(description="Optionally filter by instance name")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Instances + + + :param name: Optionally filter by instance name + :type name: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances is deprecated.", DeprecationWarning) + + _param = self._v1_get_instances_serialize( + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InstanceV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instances_serialize( + self, + name, + return_attr, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'returnAttr': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if name is not None: + + _query_params.append(('name', name)) + + if return_attr is not None: + + _query_params.append(('returnAttr', return_attr)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_inject_message_instances( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Dict[str, Any], Field(description="Message data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Inject a message into an iOS VM + + Given a message and source phone number, place this message as an incoming SMS message on the iOS VM. For advanced usage, a raw message of bytes may be sent. In this case, the parameter should provide hex encoded bytes (0x00 0x11 0x22 0x33 in the example below) which are sent verbatim. The user must ensure that the body is the correct format for the underlying device stack. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Message data (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/message is deprecated.", DeprecationWarning) + + _param = self._v1_inject_message_instances_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_inject_message_instances_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Dict[str, Any], Field(description="Message data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Inject a message into an iOS VM + + Given a message and source phone number, place this message as an incoming SMS message on the iOS VM. For advanced usage, a raw message of bytes may be sent. In this case, the parameter should provide hex encoded bytes (0x00 0x11 0x22 0x33 in the example below) which are sent verbatim. The user must ensure that the body is the correct format for the underlying device stack. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Message data (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/message is deprecated.", DeprecationWarning) + + _param = self._v1_inject_message_instances_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_inject_message_instances_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + body: Annotated[Dict[str, Any], Field(description="Message data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Inject a message into an iOS VM + + Given a message and source phone number, place this message as an incoming SMS message on the iOS VM. For advanced usage, a raw message of bytes may be sent. In this case, the parameter should provide hex encoded bytes (0x00 0x11 0x22 0x33 in the example below) which are sent verbatim. The user must ensure that the body is the correct format for the underlying device stack. + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param body: Message data (required) + :type body: object + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/message is deprecated.", DeprecationWarning) + + _param = self._v1_inject_message_instances_serialize( + instance_id=instance_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_inject_message_instances_serialize( + self, + instance_id, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/message', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_media_play( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + media_play_body_v1: Annotated[MediaPlayBodyV1, Field(description="Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Start playing media + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param media_play_body_v1: Request Body (required) + :type media_play_body_v1: MediaPlayBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/media/play is deprecated.", DeprecationWarning) + + _param = self._v1_media_play_serialize( + instance_id=instance_id, + media_play_body_v1=media_play_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '404': "UserErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_media_play_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + media_play_body_v1: Annotated[MediaPlayBodyV1, Field(description="Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Start playing media + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param media_play_body_v1: Request Body (required) + :type media_play_body_v1: MediaPlayBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/media/play is deprecated.", DeprecationWarning) + + _param = self._v1_media_play_serialize( + instance_id=instance_id, + media_play_body_v1=media_play_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '404': "UserErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_media_play_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + media_play_body_v1: Annotated[MediaPlayBodyV1, Field(description="Request Body")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start playing media + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param media_play_body_v1: Request Body (required) + :type media_play_body_v1: MediaPlayBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/media/play is deprecated.", DeprecationWarning) + + _param = self._v1_media_play_serialize( + instance_id=instance_id, + media_play_body_v1=media_play_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '404': "UserErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_media_play_serialize( + self, + instance_id, + media_play_body_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if media_play_body_v1 is not None: + _body_params = media_play_body_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/media/play', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_media_stop( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Stop playing media + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/media/stop is deprecated.", DeprecationWarning) + + _param = self._v1_media_stop_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_media_stop_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Stop playing media + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/media/stop is deprecated.", DeprecationWarning) + + _param = self._v1_media_stop_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_media_stop_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Stop playing media + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/media/stop is deprecated.", DeprecationWarning) + + _param = self._v1_media_stop_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_media_stop_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/media/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_patch_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + patch_instance_options: PatchInstanceOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceV1: + """(Deprecated) Update Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param patch_instance_options: (required) + :type patch_instance_options: PatchInstanceOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_instance_serialize( + instance_id=instance_id, + patch_instance_options=patch_instance_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_patch_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + patch_instance_options: PatchInstanceOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceV1]: + """(Deprecated) Update Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param patch_instance_options: (required) + :type patch_instance_options: PatchInstanceOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_instance_serialize( + instance_id=instance_id, + patch_instance_options=patch_instance_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_patch_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + patch_instance_options: PatchInstanceOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update Instance + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param patch_instance_options: (required) + :type patch_instance_options: PatchInstanceOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_instance_serialize( + instance_id=instance_id, + patch_instance_options=patch_instance_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_patch_instance_serialize( + self, + instance_id, + patch_instance_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_instance_options is not None: + _body_params = patch_instance_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/instances/{instanceId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_patch_instance_read_only( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + patch_instance_read_only: PatchInstanceReadOnly, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceV1: + """(Deprecated) Update Instance Read Only + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param patch_instance_read_only: (required) + :type patch_instance_read_only: PatchInstanceReadOnly + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/read-only is deprecated.", DeprecationWarning) + + _param = self._v1_patch_instance_read_only_serialize( + instance_id=instance_id, + patch_instance_read_only=patch_instance_read_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_patch_instance_read_only_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + patch_instance_read_only: PatchInstanceReadOnly, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceV1]: + """(Deprecated) Update Instance Read Only + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param patch_instance_read_only: (required) + :type patch_instance_read_only: PatchInstanceReadOnly + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/read-only is deprecated.", DeprecationWarning) + + _param = self._v1_patch_instance_read_only_serialize( + instance_id=instance_id, + patch_instance_read_only=patch_instance_read_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_patch_instance_read_only_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID")], + patch_instance_read_only: PatchInstanceReadOnly, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update Instance Read Only + + + :param instance_id: Instance ID (required) + :type instance_id: str + :param patch_instance_read_only: (required) + :type patch_instance_read_only: PatchInstanceReadOnly + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/read-only is deprecated.", DeprecationWarning) + + _param = self._v1_patch_instance_read_only_serialize( + instance_id=instance_id, + patch_instance_read_only=patch_instance_read_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_patch_instance_read_only_serialize( + self, + instance_id, + patch_instance_read_only, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_instance_read_only is not None: + _body_params = patch_instance_read_only + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/instances/{instanceId}/read-only', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_pause_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Pause an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/pause is deprecated.", DeprecationWarning) + + _param = self._v1_pause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_pause_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Pause an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/pause is deprecated.", DeprecationWarning) + + _param = self._v1_pause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_pause_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Pause an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/pause is deprecated.", DeprecationWarning) + + _param = self._v1_pause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_pause_instance_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/pause', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_post_instance_input( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_input_request: Annotated[List[InstanceInputRequest], Field(description="The input to send to the VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InputResponseV1: + """(Deprecated) Provide Instance Input + + Sends a touch or button event to the VM. - Buttons (or keys) to be held during the input are specified as an array of strings, each string must be either a single ascii character or one of the following keywords: - VM Buttons (case-insensitive): finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. ringerSwitch is not supported. - Keyboard Buttons: again, alt, alterase, apostrophe, back, backslash, backspace, bassboost, bookmarks, bsp, calc, camera, cancel, caps, capslock, chat, close, closecd, comma, compose, computer, config, connect, copy, ctrl, cut, cyclewindows, dashboard, del, delete, deletefile, dot, down, edit, eject, ejectclose, email, end, enter, equal, esc, escape, exit, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, fastfwd, file, finance, find, forward, front, grave, hangeul, hanja, help, henkan, home, homepage, hp, hrgn, ins, insert, iso, k102, kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9, kpasterisk, kpcomma, kpdot, kpenter, kpequal, kpjpcomma, kpleftparen, kpminus, kpplus, kpplusminus, kprightparen, kpslash, ktkn, ktknhrgn, left, leftalt, leftbrace, leftctrl, leftmeta, leftshift, linefeed, macro, mail, menu, meta, minus, move, msdos, muhenkan, mute, new, next, numlock, open, pagedown, pageup, paste, pause, pausecd, pgdn, pgup, phone, play, playcd, playpause, power, previous, print, prog1, prog2, prog3, prog4, props, question, record, redo, refresh, return, rewind, right, rightalt, rightbrace, rightctrl, rightmeta, rightshift, ro, rotate, scale, screenlock, scrolldown, scrolllock, scrollup, search, semicolon, sendfile, setup, shift, shop, slash, sleep, sound, space, sport, stop, stopcd, suspend, sysrq, tab, undo, up, voldown, volup, wakeup, www, xfer, yen, zkhk + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_input_request: The input to send to the VM (required) + :type instance_input_request: List[InstanceInputRequest] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/input is deprecated.", DeprecationWarning) + + _param = self._v1_post_instance_input_serialize( + instance_id=instance_id, + instance_input_request=instance_input_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InputResponseV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_post_instance_input_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_input_request: Annotated[List[InstanceInputRequest], Field(description="The input to send to the VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InputResponseV1]: + """(Deprecated) Provide Instance Input + + Sends a touch or button event to the VM. - Buttons (or keys) to be held during the input are specified as an array of strings, each string must be either a single ascii character or one of the following keywords: - VM Buttons (case-insensitive): finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. ringerSwitch is not supported. - Keyboard Buttons: again, alt, alterase, apostrophe, back, backslash, backspace, bassboost, bookmarks, bsp, calc, camera, cancel, caps, capslock, chat, close, closecd, comma, compose, computer, config, connect, copy, ctrl, cut, cyclewindows, dashboard, del, delete, deletefile, dot, down, edit, eject, ejectclose, email, end, enter, equal, esc, escape, exit, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, fastfwd, file, finance, find, forward, front, grave, hangeul, hanja, help, henkan, home, homepage, hp, hrgn, ins, insert, iso, k102, kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9, kpasterisk, kpcomma, kpdot, kpenter, kpequal, kpjpcomma, kpleftparen, kpminus, kpplus, kpplusminus, kprightparen, kpslash, ktkn, ktknhrgn, left, leftalt, leftbrace, leftctrl, leftmeta, leftshift, linefeed, macro, mail, menu, meta, minus, move, msdos, muhenkan, mute, new, next, numlock, open, pagedown, pageup, paste, pause, pausecd, pgdn, pgup, phone, play, playcd, playpause, power, previous, print, prog1, prog2, prog3, prog4, props, question, record, redo, refresh, return, rewind, right, rightalt, rightbrace, rightctrl, rightmeta, rightshift, ro, rotate, scale, screenlock, scrolldown, scrolllock, scrollup, search, semicolon, sendfile, setup, shift, shop, slash, sleep, sound, space, sport, stop, stopcd, suspend, sysrq, tab, undo, up, voldown, volup, wakeup, www, xfer, yen, zkhk + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_input_request: The input to send to the VM (required) + :type instance_input_request: List[InstanceInputRequest] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/input is deprecated.", DeprecationWarning) + + _param = self._v1_post_instance_input_serialize( + instance_id=instance_id, + instance_input_request=instance_input_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InputResponseV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_post_instance_input_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_input_request: Annotated[List[InstanceInputRequest], Field(description="The input to send to the VM")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Provide Instance Input + + Sends a touch or button event to the VM. - Buttons (or keys) to be held during the input are specified as an array of strings, each string must be either a single ascii character or one of the following keywords: - VM Buttons (case-insensitive): finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. ringerSwitch is not supported. - Keyboard Buttons: again, alt, alterase, apostrophe, back, backslash, backspace, bassboost, bookmarks, bsp, calc, camera, cancel, caps, capslock, chat, close, closecd, comma, compose, computer, config, connect, copy, ctrl, cut, cyclewindows, dashboard, del, delete, deletefile, dot, down, edit, eject, ejectclose, email, end, enter, equal, esc, escape, exit, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, fastfwd, file, finance, find, forward, front, grave, hangeul, hanja, help, henkan, home, homepage, hp, hrgn, ins, insert, iso, k102, kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9, kpasterisk, kpcomma, kpdot, kpenter, kpequal, kpjpcomma, kpleftparen, kpminus, kpplus, kpplusminus, kprightparen, kpslash, ktkn, ktknhrgn, left, leftalt, leftbrace, leftctrl, leftmeta, leftshift, linefeed, macro, mail, menu, meta, minus, move, msdos, muhenkan, mute, new, next, numlock, open, pagedown, pageup, paste, pause, pausecd, pgdn, pgup, phone, play, playcd, playpause, power, previous, print, prog1, prog2, prog3, prog4, props, question, record, redo, refresh, return, rewind, right, rightalt, rightbrace, rightctrl, rightmeta, rightshift, ro, rotate, scale, screenlock, scrolldown, scrolllock, scrollup, search, semicolon, sendfile, setup, shift, shop, slash, sleep, sound, space, sport, stop, stopcd, suspend, sysrq, tab, undo, up, voldown, volup, wakeup, www, xfer, yen, zkhk + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_input_request: The input to send to the VM (required) + :type instance_input_request: List[InstanceInputRequest] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/input is deprecated.", DeprecationWarning) + + _param = self._v1_post_instance_input_serialize( + instance_id=instance_id, + instance_input_request=instance_input_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InputResponseV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_post_instance_input_serialize( + self, + instance_id, + instance_input_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'InstanceInputRequest': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if instance_input_request is not None: + _body_params = instance_input_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/input', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_reboot_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Reboot an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/reboot is deprecated.", DeprecationWarning) + + _param = self._v1_reboot_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_reboot_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Reboot an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/reboot is deprecated.", DeprecationWarning) + + _param = self._v1_reboot_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_reboot_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Reboot an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/reboot is deprecated.", DeprecationWarning) + + _param = self._v1_reboot_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_reboot_instance_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/reboot', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_restore_backup( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + restore_backup_data: Annotated[Optional[RestoreBackupData], Field(description="Restore backup data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Restore backup + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param restore_backup_data: Restore backup data + :type restore_backup_data: RestoreBackupData + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/restoreBackup is deprecated.", DeprecationWarning) + + _param = self._v1_restore_backup_serialize( + instance_id=instance_id, + restore_backup_data=restore_backup_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_restore_backup_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + restore_backup_data: Annotated[Optional[RestoreBackupData], Field(description="Restore backup data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Restore backup + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param restore_backup_data: Restore backup data + :type restore_backup_data: RestoreBackupData + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/restoreBackup is deprecated.", DeprecationWarning) + + _param = self._v1_restore_backup_serialize( + instance_id=instance_id, + restore_backup_data=restore_backup_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_restore_backup_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + restore_backup_data: Annotated[Optional[RestoreBackupData], Field(description="Restore backup data")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Restore backup + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param restore_backup_data: Restore backup data + :type restore_backup_data: RestoreBackupData + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/restoreBackup is deprecated.", DeprecationWarning) + + _param = self._v1_restore_backup_serialize( + instance_id=instance_id, + restore_backup_data=restore_backup_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_restore_backup_serialize( + self, + instance_id, + restore_backup_data, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if restore_backup_data is not None: + _body_params = restore_backup_data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/restoreBackup', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_rotate_instance( + self, + instance_id: StrictStr, + rotate_body_v1: RotateBodyV1, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Rotate device to specified orientation + + Rotate device to orientation. Accepted orientations: 1. Portrait 2. Portrait vertically inverted (up-side-down) 3. Landscape with top of the device to the left 4. Landscape with top of the device to the right + + :param instance_id: (required) + :type instance_id: str + :param rotate_body_v1: (required) + :type rotate_body_v1: RotateBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/rotate is deprecated.", DeprecationWarning) + + _param = self._v1_rotate_instance_serialize( + instance_id=instance_id, + rotate_body_v1=rotate_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_rotate_instance_with_http_info( + self, + instance_id: StrictStr, + rotate_body_v1: RotateBodyV1, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Rotate device to specified orientation + + Rotate device to orientation. Accepted orientations: 1. Portrait 2. Portrait vertically inverted (up-side-down) 3. Landscape with top of the device to the left 4. Landscape with top of the device to the right + + :param instance_id: (required) + :type instance_id: str + :param rotate_body_v1: (required) + :type rotate_body_v1: RotateBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/rotate is deprecated.", DeprecationWarning) + + _param = self._v1_rotate_instance_serialize( + instance_id=instance_id, + rotate_body_v1=rotate_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_rotate_instance_without_preload_content( + self, + instance_id: StrictStr, + rotate_body_v1: RotateBodyV1, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Rotate device to specified orientation + + Rotate device to orientation. Accepted orientations: 1. Portrait 2. Portrait vertically inverted (up-side-down) 3. Landscape with top of the device to the left 4. Landscape with top of the device to the right + + :param instance_id: (required) + :type instance_id: str + :param rotate_body_v1: (required) + :type rotate_body_v1: RotateBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/rotate is deprecated.", DeprecationWarning) + + _param = self._v1_rotate_instance_serialize( + instance_id=instance_id, + rotate_body_v1=rotate_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_rotate_instance_serialize( + self, + instance_id, + rotate_body_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if rotate_body_v1 is not None: + _body_params = rotate_body_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/rotate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_set_instance_gpios( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + gpios_state_v1: Annotated[GpiosStateV1, Field(description="New GPIO state")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GpiosStateV1: + """(Deprecated) Set Instance GPIOs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param gpios_state_v1: New GPIO state (required) + :type gpios_state_v1: GpiosStateV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/gpios is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_gpios_serialize( + instance_id=instance_id, + gpios_state_v1=gpios_state_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_set_instance_gpios_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + gpios_state_v1: Annotated[GpiosStateV1, Field(description="New GPIO state")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GpiosStateV1]: + """(Deprecated) Set Instance GPIOs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param gpios_state_v1: New GPIO state (required) + :type gpios_state_v1: GpiosStateV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/gpios is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_gpios_serialize( + instance_id=instance_id, + gpios_state_v1=gpios_state_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_set_instance_gpios_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + gpios_state_v1: Annotated[GpiosStateV1, Field(description="New GPIO state")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Set Instance GPIOs + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param gpios_state_v1: New GPIO state (required) + :type gpios_state_v1: GpiosStateV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/gpios is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_gpios_serialize( + instance_id=instance_id, + gpios_state_v1=gpios_state_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GpiosStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_set_instance_gpios_serialize( + self, + instance_id, + gpios_state_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if gpios_state_v1 is not None: + _body_params = gpios_state_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/instances/{instanceId}/gpios', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_set_instance_peripherals( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + peripherals_data_v1: Annotated[PeripheralsDataV1, Field(description="New peripherals state")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PeripheralsDataV1: + """(Deprecated) Update Instance Peripherals + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param peripherals_data_v1: New peripherals state (required) + :type peripherals_data_v1: PeripheralsDataV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/peripherals is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_peripherals_serialize( + instance_id=instance_id, + peripherals_data_v1=peripherals_data_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsDataV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_set_instance_peripherals_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + peripherals_data_v1: Annotated[PeripheralsDataV1, Field(description="New peripherals state")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PeripheralsDataV1]: + """(Deprecated) Update Instance Peripherals + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param peripherals_data_v1: New peripherals state (required) + :type peripherals_data_v1: PeripheralsDataV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/peripherals is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_peripherals_serialize( + instance_id=instance_id, + peripherals_data_v1=peripherals_data_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsDataV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_set_instance_peripherals_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + peripherals_data_v1: Annotated[PeripheralsDataV1, Field(description="New peripherals state")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update Instance Peripherals + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param peripherals_data_v1: New peripherals state (required) + :type peripherals_data_v1: PeripheralsDataV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/peripherals is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_peripherals_serialize( + instance_id=instance_id, + peripherals_data_v1=peripherals_data_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PeripheralsDataV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_set_instance_peripherals_serialize( + self, + instance_id, + peripherals_data_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if peripherals_data_v1 is not None: + _body_params = peripherals_data_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/instances/{instanceId}/peripherals', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_set_instance_state( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + v1_set_state_body: Annotated[V1SetStateBody, Field(description="Desired State")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Set state of Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param v1_set_state_body: Desired State (required) + :type v1_set_state_body: V1SetStateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/state is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_state_serialize( + instance_id=instance_id, + v1_set_state_body=v1_set_state_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_set_instance_state_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + v1_set_state_body: Annotated[V1SetStateBody, Field(description="Desired State")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Set state of Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param v1_set_state_body: Desired State (required) + :type v1_set_state_body: V1SetStateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/state is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_state_serialize( + instance_id=instance_id, + v1_set_state_body=v1_set_state_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_set_instance_state_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + v1_set_state_body: Annotated[V1SetStateBody, Field(description="Desired State")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Set state of Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param v1_set_state_body: Desired State (required) + :type v1_set_state_body: V1SetStateBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/instances/{instanceId}/state is deprecated.", DeprecationWarning) + + _param = self._v1_set_instance_state_serialize( + instance_id=instance_id, + v1_set_state_body=v1_set_state_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_set_instance_state_serialize( + self, + instance_id, + v1_set_state_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if v1_set_state_body is not None: + _body_params = v1_set_state_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/instances/{instanceId}/state', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_start_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_start_options: Annotated[Optional[InstanceStartOptions], Field(description="Start options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Start an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_start_options: Start options + :type instance_start_options: InstanceStartOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_instance_serialize( + instance_id=instance_id, + instance_start_options=instance_start_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_start_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_start_options: Annotated[Optional[InstanceStartOptions], Field(description="Start options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Start an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_start_options: Start options + :type instance_start_options: InstanceStartOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_instance_serialize( + instance_id=instance_id, + instance_start_options=instance_start_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_start_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_start_options: Annotated[Optional[InstanceStartOptions], Field(description="Start options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_start_options: Start options + :type instance_start_options: InstanceStartOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_instance_serialize( + instance_id=instance_id, + instance_start_options=instance_start_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_start_instance_serialize( + self, + instance_id, + instance_start_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if instance_start_options is not None: + _body_params = instance_start_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_start_netdump( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + netdump_filter: Optional[NetdumpFilter] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Start Enhanced Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param netdump_filter: + :type netdump_filter: NetdumpFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/netdump/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_netdump_serialize( + instance_id=instance_id, + netdump_filter=netdump_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_start_netdump_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + netdump_filter: Optional[NetdumpFilter] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Start Enhanced Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param netdump_filter: + :type netdump_filter: NetdumpFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/netdump/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_netdump_serialize( + instance_id=instance_id, + netdump_filter=netdump_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_start_netdump_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + netdump_filter: Optional[NetdumpFilter] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start Enhanced Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param netdump_filter: + :type netdump_filter: NetdumpFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/netdump/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_netdump_serialize( + instance_id=instance_id, + netdump_filter=netdump_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_start_netdump_serialize( + self, + instance_id, + netdump_filter, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if netdump_filter is not None: + _body_params = netdump_filter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/netdump/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_start_network_monitor( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + sslsplit_filter: Optional[SslsplitFilter] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Start Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param sslsplit_filter: + :type sslsplit_filter: SslsplitFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/sslsplit/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_network_monitor_serialize( + instance_id=instance_id, + sslsplit_filter=sslsplit_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_start_network_monitor_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + sslsplit_filter: Optional[SslsplitFilter] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Start Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param sslsplit_filter: + :type sslsplit_filter: SslsplitFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/sslsplit/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_network_monitor_serialize( + instance_id=instance_id, + sslsplit_filter=sslsplit_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_start_network_monitor_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + sslsplit_filter: Optional[SslsplitFilter] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param sslsplit_filter: + :type sslsplit_filter: SslsplitFilter + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/sslsplit/enable is deprecated.", DeprecationWarning) + + _param = self._v1_start_network_monitor_serialize( + instance_id=instance_id, + sslsplit_filter=sslsplit_filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_start_network_monitor_serialize( + self, + instance_id, + sslsplit_filter, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if sslsplit_filter is not None: + _body_params = sslsplit_filter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/sslsplit/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_stop_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_stop_options: Annotated[Optional[InstanceStopOptions], Field(description="Stop options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Stop an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_stop_options: Stop options + :type instance_stop_options: InstanceStopOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/stop is deprecated.", DeprecationWarning) + + _param = self._v1_stop_instance_serialize( + instance_id=instance_id, + instance_stop_options=instance_stop_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_stop_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_stop_options: Annotated[Optional[InstanceStopOptions], Field(description="Stop options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Stop an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_stop_options: Stop options + :type instance_stop_options: InstanceStopOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/stop is deprecated.", DeprecationWarning) + + _param = self._v1_stop_instance_serialize( + instance_id=instance_id, + instance_stop_options=instance_stop_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_stop_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + instance_stop_options: Annotated[Optional[InstanceStopOptions], Field(description="Stop options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Stop an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param instance_stop_options: Stop options + :type instance_stop_options: InstanceStopOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/stop is deprecated.", DeprecationWarning) + + _param = self._v1_stop_instance_serialize( + instance_id=instance_id, + instance_stop_options=instance_stop_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiErrorV1", + '409': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_stop_instance_serialize( + self, + instance_id, + instance_stop_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if instance_stop_options is not None: + _body_params = instance_stop_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/stop', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_stop_netdump( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Stop Enhanced Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/netdump/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_netdump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_stop_netdump_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Stop Enhanced Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/netdump/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_netdump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_stop_netdump_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Stop Enhanced Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/netdump/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_netdump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_stop_netdump_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/netdump/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_stop_network_monitor( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Stop Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/sslsplit/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_network_monitor_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_stop_network_monitor_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Stop Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/sslsplit/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_network_monitor_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_stop_network_monitor_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Stop Network Monitor on an instance. + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/sslsplit/disable is deprecated.", DeprecationWarning) + + _param = self._v1_stop_network_monitor_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_stop_network_monitor_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/sslsplit/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_unpause_instance( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Unpause an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/unpause is deprecated.", DeprecationWarning) + + _param = self._v1_unpause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_unpause_instance_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Unpause an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/unpause is deprecated.", DeprecationWarning) + + _param = self._v1_unpause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_unpause_instance_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Unpause an Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/unpause is deprecated.", DeprecationWarning) + + _param = self._v1_unpause_instance_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_unpause_instance_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/unpause', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_upgrade_instance( + self, + instance_id: StrictStr, + instance_upgrade_body_v1: InstanceUpgradeBodyV1, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Upgrade iOS version + + + :param instance_id: (required) + :type instance_id: str + :param instance_upgrade_body_v1: (required) + :type instance_upgrade_body_v1: InstanceUpgradeBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/upgrade is deprecated.", DeprecationWarning) + + _param = self._v1_upgrade_instance_serialize( + instance_id=instance_id, + instance_upgrade_body_v1=instance_upgrade_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_upgrade_instance_with_http_info( + self, + instance_id: StrictStr, + instance_upgrade_body_v1: InstanceUpgradeBodyV1, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Upgrade iOS version + + + :param instance_id: (required) + :type instance_id: str + :param instance_upgrade_body_v1: (required) + :type instance_upgrade_body_v1: InstanceUpgradeBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/upgrade is deprecated.", DeprecationWarning) + + _param = self._v1_upgrade_instance_serialize( + instance_id=instance_id, + instance_upgrade_body_v1=instance_upgrade_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_upgrade_instance_without_preload_content( + self, + instance_id: StrictStr, + instance_upgrade_body_v1: InstanceUpgradeBodyV1, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Upgrade iOS version + + + :param instance_id: (required) + :type instance_id: str + :param instance_upgrade_body_v1: (required) + :type instance_upgrade_body_v1: InstanceUpgradeBodyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/upgrade is deprecated.", DeprecationWarning) + + _param = self._v1_upgrade_instance_serialize( + instance_id=instance_id, + instance_upgrade_body_v1=instance_upgrade_body_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_upgrade_instance_serialize( + self, + instance_id, + instance_upgrade_body_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if instance_upgrade_body_v1 is not None: + _body_params = instance_upgrade_body_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/upgrade', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/instances_v2_api.py b/corellium/api/instances_v2_api.py new file mode 100644 index 0000000..5393ba6 --- /dev/null +++ b/corellium/api/instances_v2_api.py @@ -0,0 +1,682 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from corellium.models.instance_state_v1 import InstanceStateV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class InstancesV2Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v2_get_instance_quick_connect_command( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """(Deprecated) Recommended SSH Command for Quick Connect + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v2/instances/{instanceId}/quickConnectCommand is deprecated.", DeprecationWarning) + + _param = self._v2_get_instance_quick_connect_command_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v2_get_instance_quick_connect_command_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """(Deprecated) Recommended SSH Command for Quick Connect + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v2/instances/{instanceId}/quickConnectCommand is deprecated.", DeprecationWarning) + + _param = self._v2_get_instance_quick_connect_command_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v2_get_instance_quick_connect_command_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Recommended SSH Command for Quick Connect + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v2/instances/{instanceId}/quickConnectCommand is deprecated.", DeprecationWarning) + + _param = self._v2_get_instance_quick_connect_command_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v2_get_instance_quick_connect_command_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/instances/{instanceId}/quickConnectCommand', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v2_get_instance_state( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="The attributes to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceStateV1: + """(Deprecated) Get state of Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param return_attr: The attributes to return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v2/instances/{instanceId}/state is deprecated.", DeprecationWarning) + + _param = self._v2_get_instance_state_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v2_get_instance_state_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="The attributes to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceStateV1]: + """(Deprecated) Get state of Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param return_attr: The attributes to return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v2/instances/{instanceId}/state is deprecated.", DeprecationWarning) + + _param = self._v2_get_instance_state_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v2_get_instance_state_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + return_attr: Annotated[Optional[List[StrictStr]], Field(description="The attributes to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get state of Instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param return_attr: The attributes to return. + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v2/instances/{instanceId}/state is deprecated.", DeprecationWarning) + + _param = self._v2_get_instance_state_serialize( + instance_id=instance_id, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceStateV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v2_get_instance_state_serialize( + self, + instance_id, + return_attr, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'returnAttr': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if return_attr is not None: + + _query_params.append(('returnAttr', return_attr)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/instances/{instanceId}/state', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/interconnects_api.py b/corellium/api/interconnects_api.py new file mode 100644 index 0000000..89f779a --- /dev/null +++ b/corellium/api/interconnects_api.py @@ -0,0 +1,2139 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from corellium.models.create_interconnect_v3_body import CreateInterconnectV3Body +from corellium.models.interconnect import Interconnect +from corellium.models.interconnect_list import InterconnectList +from corellium.models.patch_interconnect_body import PatchInterconnectBody +from corellium.models.update_interconnect_v3_body import UpdateInterconnectV3Body + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class InterconnectsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_interconnect( + self, + create_interconnect_v3_body: CreateInterconnectV3Body, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Interconnect: + """Create I/O Interconnect + + Creates an I/O interconnect: a virtual wire, hub or switch that links interfaces on your devices so they can talk to each other, as if you had cabled real hardware together (for example connecting the Ethernet ports of two boards). Give it a `name`, the `projectId`, a `protocol` and `type`, and the device `interfaces` to connect; every device must be in that project. Returns the new interconnect, which starts with status `detached`. You can also connect or disconnect one device interface later with `POST /v3/instances/{instanceId}/interfaces` and `DELETE /v3/instances/{instanceId}/interfaces/{interfaceId}`; those device-level calls require the configurable I/O license feature. + + :param create_interconnect_v3_body: (required) + :type create_interconnect_v3_body: CreateInterconnectV3Body + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_interconnect_serialize( + create_interconnect_v3_body=create_interconnect_v3_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_interconnect_with_http_info( + self, + create_interconnect_v3_body: CreateInterconnectV3Body, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Interconnect]: + """Create I/O Interconnect + + Creates an I/O interconnect: a virtual wire, hub or switch that links interfaces on your devices so they can talk to each other, as if you had cabled real hardware together (for example connecting the Ethernet ports of two boards). Give it a `name`, the `projectId`, a `protocol` and `type`, and the device `interfaces` to connect; every device must be in that project. Returns the new interconnect, which starts with status `detached`. You can also connect or disconnect one device interface later with `POST /v3/instances/{instanceId}/interfaces` and `DELETE /v3/instances/{instanceId}/interfaces/{interfaceId}`; those device-level calls require the configurable I/O license feature. + + :param create_interconnect_v3_body: (required) + :type create_interconnect_v3_body: CreateInterconnectV3Body + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_interconnect_serialize( + create_interconnect_v3_body=create_interconnect_v3_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_interconnect_without_preload_content( + self, + create_interconnect_v3_body: CreateInterconnectV3Body, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create I/O Interconnect + + Creates an I/O interconnect: a virtual wire, hub or switch that links interfaces on your devices so they can talk to each other, as if you had cabled real hardware together (for example connecting the Ethernet ports of two boards). Give it a `name`, the `projectId`, a `protocol` and `type`, and the device `interfaces` to connect; every device must be in that project. Returns the new interconnect, which starts with status `detached`. You can also connect or disconnect one device interface later with `POST /v3/instances/{instanceId}/interfaces` and `DELETE /v3/instances/{instanceId}/interfaces/{interfaceId}`; those device-level calls require the configurable I/O license feature. + + :param create_interconnect_v3_body: (required) + :type create_interconnect_v3_body: CreateInterconnectV3Body + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_interconnect_serialize( + create_interconnect_v3_body=create_interconnect_v3_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_interconnect_serialize( + self, + create_interconnect_v3_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_interconnect_v3_body is not None: + _body_params = create_interconnect_v3_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/interconnects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_interconnect( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete I/O Interconnect + + Deletes an I/O interconnect, disconnecting every device interface on it. The devices themselves are not affected. Deletes are idempotent: an unknown `interconnectId`, or one that is not visible to the caller, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_interconnect_with_http_info( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete I/O Interconnect + + Deletes an I/O interconnect, disconnecting every device interface on it. The devices themselves are not affected. Deletes are idempotent: an unknown `interconnectId`, or one that is not visible to the caller, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_interconnect_without_preload_content( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete I/O Interconnect + + Deletes an I/O interconnect, disconnecting every device interface on it. The devices themselves are not affected. Deletes are idempotent: an unknown `interconnectId`, or one that is not visible to the caller, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_interconnect_serialize( + self, + interconnect_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interconnect_id is not None: + _path_params['interconnectId'] = interconnect_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/interconnects/{interconnectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_interconnect( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Interconnect: + """Get Interconnect + + Returns one I/O interconnect, including which device interfaces it connects and its current status. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_interconnect_with_http_info( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Interconnect]: + """Get Interconnect + + Returns one I/O interconnect, including which device interfaces it connects and its current status. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_interconnect_without_preload_content( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Interconnect + + Returns one I/O interconnect, including which device interfaces it connects and its current status. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_interconnect_serialize( + self, + interconnect_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interconnect_id is not None: + _path_params['interconnectId'] = interconnect_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/interconnects/{interconnectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_interconnects( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by interconnect name (case insensitive).")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Filter by protocol (comma separated).")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (comma separated).")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma separated).")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated).")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Filter by project ID (comma separated).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InterconnectList: + """List I/O Interconnects + + Lists the I/O interconnects in your projects, with their status and how many devices each connects. Filter by name, protocol, type, status or project, sort with `sort`, and page with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by interconnect name (case insensitive). + :type name: str + :param protocol: Filter by protocol (comma separated). + :type protocol: str + :param type: Filter by type (comma separated). + :type type: str + :param status: Filter by status (comma separated). + :type status: str + :param sort: Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated). + :type sort: str + :param project_id: Filter by project ID (comma separated). + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_interconnects_serialize( + limit=limit, + offset=offset, + name=name, + protocol=protocol, + type=type, + status=status, + sort=sort, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_interconnects_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by interconnect name (case insensitive).")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Filter by protocol (comma separated).")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (comma separated).")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma separated).")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated).")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Filter by project ID (comma separated).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InterconnectList]: + """List I/O Interconnects + + Lists the I/O interconnects in your projects, with their status and how many devices each connects. Filter by name, protocol, type, status or project, sort with `sort`, and page with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by interconnect name (case insensitive). + :type name: str + :param protocol: Filter by protocol (comma separated). + :type protocol: str + :param type: Filter by type (comma separated). + :type type: str + :param status: Filter by status (comma separated). + :type status: str + :param sort: Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated). + :type sort: str + :param project_id: Filter by project ID (comma separated). + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_interconnects_serialize( + limit=limit, + offset=offset, + name=name, + protocol=protocol, + type=type, + status=status, + sort=sort, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_interconnects_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by interconnect name (case insensitive).")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Filter by protocol (comma separated).")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (comma separated).")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma separated).")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated).")] = None, + project_id: Annotated[Optional[StrictStr], Field(description="Filter by project ID (comma separated).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List I/O Interconnects + + Lists the I/O interconnects in your projects, with their status and how many devices each connects. Filter by name, protocol, type, status or project, sort with `sort`, and page with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by interconnect name (case insensitive). + :type name: str + :param protocol: Filter by protocol (comma separated). + :type protocol: str + :param type: Filter by type (comma separated). + :type type: str + :param status: Filter by status (comma separated). + :type status: str + :param sort: Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated). + :type sort: str + :param project_id: Filter by project ID (comma separated). + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_interconnects_serialize( + limit=limit, + offset=offset, + name=name, + protocol=protocol, + type=type, + status=status, + sort=sort, + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_interconnects_serialize( + self, + limit, + offset, + name, + protocol, + type, + status, + sort, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if name is not None: + + _query_params.append(('name', name)) + + if protocol is not None: + + _query_params.append(('protocol', protocol)) + + if type is not None: + + _query_params.append(('type', type)) + + if status is not None: + + _query_params.append(('status', status)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if project_id is not None: + + _query_params.append(('projectId', project_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/interconnects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_interconnect( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + patch_interconnect_body: Optional[PatchInterconnectBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Interconnect: + """Patch I/O Interconnect + + Changes only the fields you send: `name` and/or `interfaces`. When you send `interfaces`, it replaces the whole list of connected interfaces. Returns the updated interconnect. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param patch_interconnect_body: + :type patch_interconnect_body: PatchInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_interconnect_serialize( + interconnect_id=interconnect_id, + patch_interconnect_body=patch_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_interconnect_with_http_info( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + patch_interconnect_body: Optional[PatchInterconnectBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Interconnect]: + """Patch I/O Interconnect + + Changes only the fields you send: `name` and/or `interfaces`. When you send `interfaces`, it replaces the whole list of connected interfaces. Returns the updated interconnect. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param patch_interconnect_body: + :type patch_interconnect_body: PatchInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_interconnect_serialize( + interconnect_id=interconnect_id, + patch_interconnect_body=patch_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_interconnect_without_preload_content( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + patch_interconnect_body: Optional[PatchInterconnectBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Patch I/O Interconnect + + Changes only the fields you send: `name` and/or `interfaces`. When you send `interfaces`, it replaces the whole list of connected interfaces. Returns the updated interconnect. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param patch_interconnect_body: + :type patch_interconnect_body: PatchInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_interconnect_serialize( + interconnect_id=interconnect_id, + patch_interconnect_body=patch_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_interconnect_serialize( + self, + interconnect_id, + patch_interconnect_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interconnect_id is not None: + _path_params['interconnectId'] = interconnect_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_interconnect_body is not None: + _body_params = patch_interconnect_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/interconnects/{interconnectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_update_interconnect( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + update_interconnect_v3_body: UpdateInterconnectV3Body, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Interconnect: + """Update I/O Interconnect + + Replaces an interconnect's `name` and full list of connected `interfaces`. Interfaces you leave out are disconnected. `projectId`, `protocol` and `type` cannot be changed; if you send them they must match the current values. To change only some fields, use `v3PatchInterconnect`. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param update_interconnect_v3_body: (required) + :type update_interconnect_v3_body: UpdateInterconnectV3Body + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_interconnect_serialize( + interconnect_id=interconnect_id, + update_interconnect_v3_body=update_interconnect_v3_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_update_interconnect_with_http_info( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + update_interconnect_v3_body: UpdateInterconnectV3Body, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Interconnect]: + """Update I/O Interconnect + + Replaces an interconnect's `name` and full list of connected `interfaces`. Interfaces you leave out are disconnected. `projectId`, `protocol` and `type` cannot be changed; if you send them they must match the current values. To change only some fields, use `v3PatchInterconnect`. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param update_interconnect_v3_body: (required) + :type update_interconnect_v3_body: UpdateInterconnectV3Body + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_interconnect_serialize( + interconnect_id=interconnect_id, + update_interconnect_v3_body=update_interconnect_v3_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_update_interconnect_without_preload_content( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier.")], + update_interconnect_v3_body: UpdateInterconnectV3Body, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update I/O Interconnect + + Replaces an interconnect's `name` and full list of connected `interfaces`. Interfaces you leave out are disconnected. `projectId`, `protocol` and `type` cannot be changed; if you send them they must match the current values. To change only some fields, use `v3PatchInterconnect`. + + :param interconnect_id: The interconnect identifier. (required) + :type interconnect_id: str + :param update_interconnect_v3_body: (required) + :type update_interconnect_v3_body: UpdateInterconnectV3Body + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_interconnect_serialize( + interconnect_id=interconnect_id, + update_interconnect_v3_body=update_interconnect_v3_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Interconnect", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_update_interconnect_serialize( + self, + interconnect_id, + update_interconnect_v3_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interconnect_id is not None: + _path_params['interconnectId'] = interconnect_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_interconnect_v3_body is not None: + _body_params = update_interconnect_v3_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/interconnects/{interconnectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/interconnects_v1_api.py b/corellium/api/interconnects_v1_api.py new file mode 100644 index 0000000..029fd5a --- /dev/null +++ b/corellium/api/interconnects_v1_api.py @@ -0,0 +1,2151 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import Optional, Union +from typing_extensions import Annotated +from corellium.models.create_interconnect_body import CreateInterconnectBody +from corellium.models.get_interconnects_response import GetInterconnectsResponse +from corellium.models.interconnect_response import InterconnectResponse +from corellium.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest +from corellium.models.update_interconnect_body import UpdateInterconnectBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class InterconnectsV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_create_interconnect( + self, + create_interconnect_body: Annotated[CreateInterconnectBody, Field(description="The interconnect details")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InterconnectResponse: + """(Deprecated) Create I/O Interconnect + + Create an I/O Interconnect for the specified project and attach virtual device interfaces. + + :param create_interconnect_body: The interconnect details (required) + :type create_interconnect_body: CreateInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/interconnects is deprecated.", DeprecationWarning) + + _param = self._v1_create_interconnect_serialize( + create_interconnect_body=create_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_interconnect_with_http_info( + self, + create_interconnect_body: Annotated[CreateInterconnectBody, Field(description="The interconnect details")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InterconnectResponse]: + """(Deprecated) Create I/O Interconnect + + Create an I/O Interconnect for the specified project and attach virtual device interfaces. + + :param create_interconnect_body: The interconnect details (required) + :type create_interconnect_body: CreateInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/interconnects is deprecated.", DeprecationWarning) + + _param = self._v1_create_interconnect_serialize( + create_interconnect_body=create_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_interconnect_without_preload_content( + self, + create_interconnect_body: Annotated[CreateInterconnectBody, Field(description="The interconnect details")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create I/O Interconnect + + Create an I/O Interconnect for the specified project and attach virtual device interfaces. + + :param create_interconnect_body: The interconnect details (required) + :type create_interconnect_body: CreateInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/interconnects is deprecated.", DeprecationWarning) + + _param = self._v1_create_interconnect_serialize( + create_interconnect_body=create_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_interconnect_serialize( + self, + create_interconnect_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_interconnect_body is not None: + _body_params = create_interconnect_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/interconnects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_interconnect( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete I/O Interconnect + + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_interconnect_with_http_info( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete I/O Interconnect + + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_interconnect_without_preload_content( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete I/O Interconnect + + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_interconnect_serialize( + self, + interconnect_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interconnect_id is not None: + _path_params['interconnectId'] = interconnect_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/interconnects/{interconnectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_interconnect( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InterconnectResponse: + """(Deprecated) Get Interconnect + + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_interconnect_with_http_info( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InterconnectResponse]: + """(Deprecated) Get Interconnect + + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_interconnect_without_preload_content( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Interconnect + + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_interconnect_serialize( + interconnect_id=interconnect_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_interconnect_serialize( + self, + interconnect_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interconnect_id is not None: + _path_params['interconnectId'] = interconnect_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/interconnects/{interconnectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_interconnects( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1-1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by interconnect name (case insensitive)")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Filter by protocol (comma separated)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (comma separated)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma separated)")] = None, + project: Annotated[Optional[StrictStr], Field(description="Filter by project ID (comma separated)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetInterconnectsResponse: + """(Deprecated) Get all I/O Interconnects + + + :param limit: Maximum number of results to return (1-1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param name: Filter by interconnect name (case insensitive) + :type name: str + :param protocol: Filter by protocol (comma separated) + :type protocol: str + :param type: Filter by type (comma separated) + :type type: str + :param status: Filter by status (comma separated) + :type status: str + :param project: Filter by project ID (comma separated) + :type project: str + :param sort: Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/interconnects is deprecated.", DeprecationWarning) + + _param = self._v1_list_interconnects_serialize( + limit=limit, + offset=offset, + name=name, + protocol=protocol, + type=type, + status=status, + project=project, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInterconnectsResponse", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_interconnects_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1-1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by interconnect name (case insensitive)")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Filter by protocol (comma separated)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (comma separated)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma separated)")] = None, + project: Annotated[Optional[StrictStr], Field(description="Filter by project ID (comma separated)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetInterconnectsResponse]: + """(Deprecated) Get all I/O Interconnects + + + :param limit: Maximum number of results to return (1-1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param name: Filter by interconnect name (case insensitive) + :type name: str + :param protocol: Filter by protocol (comma separated) + :type protocol: str + :param type: Filter by type (comma separated) + :type type: str + :param status: Filter by status (comma separated) + :type status: str + :param project: Filter by project ID (comma separated) + :type project: str + :param sort: Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/interconnects is deprecated.", DeprecationWarning) + + _param = self._v1_list_interconnects_serialize( + limit=limit, + offset=offset, + name=name, + protocol=protocol, + type=type, + status=status, + project=project, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInterconnectsResponse", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_interconnects_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1-1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by interconnect name (case insensitive)")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Filter by protocol (comma separated)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (comma separated)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (comma separated)")] = None, + project: Annotated[Optional[StrictStr], Field(description="Filter by project ID (comma separated)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get all I/O Interconnects + + + :param limit: Maximum number of results to return (1-1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param name: Filter by interconnect name (case insensitive) + :type name: str + :param protocol: Filter by protocol (comma separated) + :type protocol: str + :param type: Filter by type (comma separated) + :type type: str + :param status: Filter by status (comma separated) + :type status: str + :param project: Filter by project ID (comma separated) + :type project: str + :param sort: Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/interconnects is deprecated.", DeprecationWarning) + + _param = self._v1_list_interconnects_serialize( + limit=limit, + offset=offset, + name=name, + protocol=protocol, + type=type, + status=status, + project=project, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetInterconnectsResponse", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_interconnects_serialize( + self, + limit, + offset, + name, + protocol, + type, + status, + project, + sort, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if name is not None: + + _query_params.append(('name', name)) + + if protocol is not None: + + _query_params.append(('protocol', protocol)) + + if type is not None: + + _query_params.append(('type', type)) + + if status is not None: + + _query_params.append(('status', status)) + + if project is not None: + + _query_params.append(('project', project)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/interconnects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_patch_interconnect( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + partial_update_interconnect_request: Annotated[PartialUpdateInterconnectRequest, Field(description="The interconnect details to update")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InterconnectResponse: + """(Deprecated) Partial Update Interconnect + + Update some interconnect details for the specified interconnect identifier. + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param partial_update_interconnect_request: The interconnect details to update (required) + :type partial_update_interconnect_request: PartialUpdateInterconnectRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_interconnect_serialize( + interconnect_id=interconnect_id, + partial_update_interconnect_request=partial_update_interconnect_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_patch_interconnect_with_http_info( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + partial_update_interconnect_request: Annotated[PartialUpdateInterconnectRequest, Field(description="The interconnect details to update")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InterconnectResponse]: + """(Deprecated) Partial Update Interconnect + + Update some interconnect details for the specified interconnect identifier. + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param partial_update_interconnect_request: The interconnect details to update (required) + :type partial_update_interconnect_request: PartialUpdateInterconnectRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_interconnect_serialize( + interconnect_id=interconnect_id, + partial_update_interconnect_request=partial_update_interconnect_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_patch_interconnect_without_preload_content( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + partial_update_interconnect_request: Annotated[PartialUpdateInterconnectRequest, Field(description="The interconnect details to update")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Partial Update Interconnect + + Update some interconnect details for the specified interconnect identifier. + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param partial_update_interconnect_request: The interconnect details to update (required) + :type partial_update_interconnect_request: PartialUpdateInterconnectRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_patch_interconnect_serialize( + interconnect_id=interconnect_id, + partial_update_interconnect_request=partial_update_interconnect_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_patch_interconnect_serialize( + self, + interconnect_id, + partial_update_interconnect_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interconnect_id is not None: + _path_params['interconnectId'] = interconnect_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if partial_update_interconnect_request is not None: + _body_params = partial_update_interconnect_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/interconnects/{interconnectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_interconnect( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + update_interconnect_body: Annotated[UpdateInterconnectBody, Field(description="The interconnect details to update")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InterconnectResponse: + """(Deprecated) Update Interconnect + + Update interconnect details for the specified interconnect identifier. + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param update_interconnect_body: The interconnect details to update (required) + :type update_interconnect_body: UpdateInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_interconnect_serialize( + interconnect_id=interconnect_id, + update_interconnect_body=update_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_interconnect_with_http_info( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + update_interconnect_body: Annotated[UpdateInterconnectBody, Field(description="The interconnect details to update")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InterconnectResponse]: + """(Deprecated) Update Interconnect + + Update interconnect details for the specified interconnect identifier. + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param update_interconnect_body: The interconnect details to update (required) + :type update_interconnect_body: UpdateInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_interconnect_serialize( + interconnect_id=interconnect_id, + update_interconnect_body=update_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_interconnect_without_preload_content( + self, + interconnect_id: Annotated[StrictStr, Field(description="The interconnect identifier")], + update_interconnect_body: Annotated[UpdateInterconnectBody, Field(description="The interconnect details to update")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update Interconnect + + Update interconnect details for the specified interconnect identifier. + + :param interconnect_id: The interconnect identifier (required) + :type interconnect_id: str + :param update_interconnect_body: The interconnect details to update (required) + :type update_interconnect_body: UpdateInterconnectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/interconnects/{interconnectId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_interconnect_serialize( + interconnect_id=interconnect_id, + update_interconnect_body=update_interconnect_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InterconnectResponse", + '400': "object", + '401': "object", + '403': "object", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_interconnect_serialize( + self, + interconnect_id, + update_interconnect_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if interconnect_id is not None: + _path_params['interconnectId'] = interconnect_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_interconnect_body is not None: + _body_params = update_interconnect_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/interconnects/{interconnectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/invites_api.py b/corellium/api/invites_api.py new file mode 100644 index 0000000..7117dac --- /dev/null +++ b/corellium/api/invites_api.py @@ -0,0 +1,2001 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field +from typing import Dict, Optional +from typing_extensions import Annotated +from corellium.models.create_invites_body import CreateInvitesBody +from corellium.models.edit_invites_body import EditInvitesBody +from corellium.models.get_invite_by_token_body import GetInviteByTokenBody +from corellium.models.invitation import Invitation +from corellium.models.invitation_by_token import InvitationByToken +from corellium.models.invite_result import InviteResult +from corellium.models.invite_signup_body import InviteSignupBody +from corellium.models.invite_signup_response import InviteSignupResponse +from corellium.models.invites_list_response import InvitesListResponse +from corellium.models.revoke_invites_body import RevokeInvitesBody +from corellium.models.revoke_invites_response import RevokeInvitesResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class InvitesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_invites( + self, + create_invites_body: CreateInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, InviteResult]: + """Create invites + + **Required role:** Domain administrator or project administrator. Invites people by email to create an account in your domain. Requires a domain or project administrator. Each person is emailed a signup link; they create their account with `v3SignupFromInvite`. Use `settings` to add them to teams and give them project access automatically when they sign up. The response has one entry per email address: either the created `invite`, or an `error`. An address fails if someone in your domain already uses it, or if it already has a pending invite. To email a pending invite again, send the same address with `resend: true`; this issues a new signup link and the old one stops working. + + :param create_invites_body: (required) + :type create_invites_body: CreateInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_invites_serialize( + create_invites_body=create_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, InviteResult]", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_invites_with_http_info( + self, + create_invites_body: CreateInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, InviteResult]]: + """Create invites + + **Required role:** Domain administrator or project administrator. Invites people by email to create an account in your domain. Requires a domain or project administrator. Each person is emailed a signup link; they create their account with `v3SignupFromInvite`. Use `settings` to add them to teams and give them project access automatically when they sign up. The response has one entry per email address: either the created `invite`, or an `error`. An address fails if someone in your domain already uses it, or if it already has a pending invite. To email a pending invite again, send the same address with `resend: true`; this issues a new signup link and the old one stops working. + + :param create_invites_body: (required) + :type create_invites_body: CreateInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_invites_serialize( + create_invites_body=create_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, InviteResult]", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_invites_without_preload_content( + self, + create_invites_body: CreateInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create invites + + **Required role:** Domain administrator or project administrator. Invites people by email to create an account in your domain. Requires a domain or project administrator. Each person is emailed a signup link; they create their account with `v3SignupFromInvite`. Use `settings` to add them to teams and give them project access automatically when they sign up. The response has one entry per email address: either the created `invite`, or an `error`. An address fails if someone in your domain already uses it, or if it already has a pending invite. To email a pending invite again, send the same address with `resend: true`; this issues a new signup link and the old one stops working. + + :param create_invites_body: (required) + :type create_invites_body: CreateInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_invites_serialize( + create_invites_body=create_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, InviteResult]", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_invites_serialize( + self, + create_invites_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_invites_body is not None: + _body_params = create_invites_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/invites', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_edit_invites( + self, + edit_invites_body: EditInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Invitation: + """Edit invites + + **Required role:** Domain administrator or project administrator. Changes the teams and projects a pending invite will grant when the person signs up. Requires a domain or project administrator. Only the first invite matching the given IDs is changed, so send one ID per request. Team and project IDs not in your domain are dropped. Returns the invite after the change. The person is not emailed again. + + :param edit_invites_body: (required) + :type edit_invites_body: EditInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_edit_invites_serialize( + edit_invites_body=edit_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Invitation", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_edit_invites_with_http_info( + self, + edit_invites_body: EditInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Invitation]: + """Edit invites + + **Required role:** Domain administrator or project administrator. Changes the teams and projects a pending invite will grant when the person signs up. Requires a domain or project administrator. Only the first invite matching the given IDs is changed, so send one ID per request. Team and project IDs not in your domain are dropped. Returns the invite after the change. The person is not emailed again. + + :param edit_invites_body: (required) + :type edit_invites_body: EditInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_edit_invites_serialize( + edit_invites_body=edit_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Invitation", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_edit_invites_without_preload_content( + self, + edit_invites_body: EditInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit invites + + **Required role:** Domain administrator or project administrator. Changes the teams and projects a pending invite will grant when the person signs up. Requires a domain or project administrator. Only the first invite matching the given IDs is changed, so send one ID per request. Team and project IDs not in your domain are dropped. Returns the invite after the change. The person is not emailed again. + + :param edit_invites_body: (required) + :type edit_invites_body: EditInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_edit_invites_serialize( + edit_invites_body=edit_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Invitation", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_edit_invites_serialize( + self, + edit_invites_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if edit_invites_body is not None: + _body_params = edit_invites_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/invites/edit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_invite_by_token( + self, + get_invite_by_token_body: GetInviteByTokenBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitationByToken: + """Get an invite by token + + Looks up an invitation from the token in a signup link, so a signup page can show which domain and email the invite is for before the person creates their account. Needs no sign-in. Returns 403 if the invite has expired, the token does not match, or the domain is disabled, and 404 if no invite has this token. + + :param get_invite_by_token_body: (required) + :type get_invite_by_token_body: GetInviteByTokenBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_invite_by_token_serialize( + get_invite_by_token_body=get_invite_by_token_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationByToken", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_invite_by_token_with_http_info( + self, + get_invite_by_token_body: GetInviteByTokenBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitationByToken]: + """Get an invite by token + + Looks up an invitation from the token in a signup link, so a signup page can show which domain and email the invite is for before the person creates their account. Needs no sign-in. Returns 403 if the invite has expired, the token does not match, or the domain is disabled, and 404 if no invite has this token. + + :param get_invite_by_token_body: (required) + :type get_invite_by_token_body: GetInviteByTokenBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_invite_by_token_serialize( + get_invite_by_token_body=get_invite_by_token_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationByToken", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_invite_by_token_without_preload_content( + self, + get_invite_by_token_body: GetInviteByTokenBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an invite by token + + Looks up an invitation from the token in a signup link, so a signup page can show which domain and email the invite is for before the person creates their account. Needs no sign-in. Returns 403 if the invite has expired, the token does not match, or the domain is disabled, and 404 if no invite has this token. + + :param get_invite_by_token_body: (required) + :type get_invite_by_token_body: GetInviteByTokenBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_invite_by_token_serialize( + get_invite_by_token_body=get_invite_by_token_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitationByToken", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_invite_by_token_serialize( + self, + get_invite_by_token_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if get_invite_by_token_body is not None: + _body_params = get_invite_by_token_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/invites-by-token', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_invites( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InvitesListResponse: + """List invites + + **Required role:** Domain administrator or project administrator. Lists invitations that have been sent in your domain but not yet used or revoked, with each invite's email and the teams and projects it will grant. Requires a domain or project administrator. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_invites_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_invites_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InvitesListResponse]: + """List invites + + **Required role:** Domain administrator or project administrator. Lists invitations that have been sent in your domain but not yet used or revoked, with each invite's email and the teams and projects it will grant. Requires a domain or project administrator. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_invites_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_invites_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List invites + + **Required role:** Domain administrator or project administrator. Lists invitations that have been sent in your domain but not yet used or revoked, with each invite's email and the teams and projects it will grant. Requires a domain or project administrator. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_invites_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InvitesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_invites_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/invites', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_revoke_invites( + self, + revoke_invites_body: RevokeInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RevokeInvitesResponse: + """Revoke invites + + **Required role:** Domain administrator or project administrator. Cancels pending invites, so their signup links stop working. Requires a domain or project administrator. Returns how many invites were removed; IDs that do not match a pending invite in your domain are ignored. People who already signed up are not affected; remove their accounts with `DELETE /v3/users/{userId}`. + + :param revoke_invites_body: (required) + :type revoke_invites_body: RevokeInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_revoke_invites_serialize( + revoke_invites_body=revoke_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RevokeInvitesResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_revoke_invites_with_http_info( + self, + revoke_invites_body: RevokeInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RevokeInvitesResponse]: + """Revoke invites + + **Required role:** Domain administrator or project administrator. Cancels pending invites, so their signup links stop working. Requires a domain or project administrator. Returns how many invites were removed; IDs that do not match a pending invite in your domain are ignored. People who already signed up are not affected; remove their accounts with `DELETE /v3/users/{userId}`. + + :param revoke_invites_body: (required) + :type revoke_invites_body: RevokeInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_revoke_invites_serialize( + revoke_invites_body=revoke_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RevokeInvitesResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_revoke_invites_without_preload_content( + self, + revoke_invites_body: RevokeInvitesBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke invites + + **Required role:** Domain administrator or project administrator. Cancels pending invites, so their signup links stop working. Requires a domain or project administrator. Returns how many invites were removed; IDs that do not match a pending invite in your domain are ignored. People who already signed up are not affected; remove their accounts with `DELETE /v3/users/{userId}`. + + :param revoke_invites_body: (required) + :type revoke_invites_body: RevokeInvitesBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_revoke_invites_serialize( + revoke_invites_body=revoke_invites_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RevokeInvitesResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_revoke_invites_serialize( + self, + revoke_invites_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if revoke_invites_body is not None: + _body_params = revoke_invites_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/invites/revoke', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_signup_from_invite( + self, + invite_signup_body: InviteSignupBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InviteSignupResponse: + """Sign up from an invite + + Creates a new user account from the token in an invitation email. Needs no sign-in. The account uses the invited email (or `email` from a single sign-on provider, if given) as its username. The teams and project access set on the invite are applied, and the invite is then used up. If your domain requires agreeing to its terms, `agreed` must be true. Returns 403 if the invite has expired or the domain is disabled, and 404 if the token is unknown or already used. + + :param invite_signup_body: (required) + :type invite_signup_body: InviteSignupBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_signup_from_invite_serialize( + invite_signup_body=invite_signup_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InviteSignupResponse", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_signup_from_invite_with_http_info( + self, + invite_signup_body: InviteSignupBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InviteSignupResponse]: + """Sign up from an invite + + Creates a new user account from the token in an invitation email. Needs no sign-in. The account uses the invited email (or `email` from a single sign-on provider, if given) as its username. The teams and project access set on the invite are applied, and the invite is then used up. If your domain requires agreeing to its terms, `agreed` must be true. Returns 403 if the invite has expired or the domain is disabled, and 404 if the token is unknown or already used. + + :param invite_signup_body: (required) + :type invite_signup_body: InviteSignupBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_signup_from_invite_serialize( + invite_signup_body=invite_signup_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InviteSignupResponse", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_signup_from_invite_without_preload_content( + self, + invite_signup_body: InviteSignupBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sign up from an invite + + Creates a new user account from the token in an invitation email. Needs no sign-in. The account uses the invited email (or `email` from a single sign-on provider, if given) as its username. The teams and project access set on the invite are applied, and the invite is then used up. If your domain requires agreeing to its terms, `agreed` must be true. Returns 403 if the invite has expired or the domain is disabled, and 404 if the token is unknown or already used. + + :param invite_signup_body: (required) + :type invite_signup_body: InviteSignupBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_signup_from_invite_serialize( + invite_signup_body=invite_signup_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InviteSignupResponse", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_signup_from_invite_serialize( + self, + invite_signup_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if invite_signup_body is not None: + _body_params = invite_signup_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/invites/signup', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/invites_v1_api.py b/corellium/api/invites_v1_api.py new file mode 100644 index 0000000..4f84286 --- /dev/null +++ b/corellium/api/invites_v1_api.py @@ -0,0 +1,1835 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field +from typing import Dict, List +from typing_extensions import Annotated +from corellium.models.invitation_v1 import InvitationV1 +from corellium.models.invite_created_entry import InviteCreatedEntry +from corellium.models.invite_revoke_params import InviteRevokeParams + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class InvitesV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_create_user_invites( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, InviteCreatedEntry]: + """(Deprecated) Create Invite + + Domain Admin route to invite a new user to create an account + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites is deprecated.", DeprecationWarning) + + _param = self._v1_create_user_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, InviteCreatedEntry]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_user_invites_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, InviteCreatedEntry]]: + """(Deprecated) Create Invite + + Domain Admin route to invite a new user to create an account + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites is deprecated.", DeprecationWarning) + + _param = self._v1_create_user_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, InviteCreatedEntry]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_user_invites_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create Invite + + Domain Admin route to invite a new user to create an account + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites is deprecated.", DeprecationWarning) + + _param = self._v1_create_user_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, InviteCreatedEntry]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_user_invites_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/invites', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_edit_invites( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/edit is deprecated.", DeprecationWarning) + + _param = self._v1_edit_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_edit_invites_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/edit is deprecated.", DeprecationWarning) + + _param = self._v1_edit_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_edit_invites_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/edit is deprecated.", DeprecationWarning) + + _param = self._v1_edit_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_edit_invites_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/invites/edit', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_invites( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[InvitationV1]: + """(Deprecated) Get Invites + + Gets all invites for a user's domain + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/invites is deprecated.", DeprecationWarning) + + _param = self._v1_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InvitationV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_invites_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[InvitationV1]]: + """(Deprecated) Get Invites + + Gets all invites for a user's domain + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/invites is deprecated.", DeprecationWarning) + + _param = self._v1_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InvitationV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_invites_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Invites + + Gets all invites for a user's domain + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/invites is deprecated.", DeprecationWarning) + + _param = self._v1_invites_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InvitationV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_invites_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/invites', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_invites_by_token( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/invites-by-token is deprecated.", DeprecationWarning) + + _param = self._v1_invites_by_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_invites_by_token_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/invites-by-token is deprecated.", DeprecationWarning) + + _param = self._v1_invites_by_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_invites_by_token_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/invites-by-token is deprecated.", DeprecationWarning) + + _param = self._v1_invites_by_token_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_invites_by_token_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/invites-by-token', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_revoke_user_invite( + self, + invite_revoke_params: Annotated[InviteRevokeParams, Field(description="Invitations to revoke")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Revoke Invite + + + :param invite_revoke_params: Invitations to revoke (required) + :type invite_revoke_params: InviteRevokeParams + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/revoke is deprecated.", DeprecationWarning) + + _param = self._v1_revoke_user_invite_serialize( + invite_revoke_params=invite_revoke_params, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_revoke_user_invite_with_http_info( + self, + invite_revoke_params: Annotated[InviteRevokeParams, Field(description="Invitations to revoke")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Revoke Invite + + + :param invite_revoke_params: Invitations to revoke (required) + :type invite_revoke_params: InviteRevokeParams + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/revoke is deprecated.", DeprecationWarning) + + _param = self._v1_revoke_user_invite_serialize( + invite_revoke_params=invite_revoke_params, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_revoke_user_invite_without_preload_content( + self, + invite_revoke_params: Annotated[InviteRevokeParams, Field(description="Invitations to revoke")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Revoke Invite + + + :param invite_revoke_params: Invitations to revoke (required) + :type invite_revoke_params: InviteRevokeParams + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/revoke is deprecated.", DeprecationWarning) + + _param = self._v1_revoke_user_invite_serialize( + invite_revoke_params=invite_revoke_params, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_revoke_user_invite_serialize( + self, + invite_revoke_params, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if invite_revoke_params is not None: + _body_params = invite_revoke_params + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/invites/revoke', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_user_create_from_invite( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/signup is deprecated.", DeprecationWarning) + + _param = self._v1_user_create_from_invite_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_user_create_from_invite_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/signup is deprecated.", DeprecationWarning) + + _param = self._v1_user_create_from_invite_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_user_create_from_invite_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/invites/signup is deprecated.", DeprecationWarning) + + _param = self._v1_user_create_from_invite_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_user_create_from_invite_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/invites/signup', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/models_api.py b/corellium/api/models_api.py new file mode 100644 index 0000000..4f1250d --- /dev/null +++ b/corellium/api/models_api.py @@ -0,0 +1,671 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from corellium.models.model import Model +from corellium.models.model_firmware import ModelFirmware + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ModelsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_get_model_software( + self, + model: Annotated[StrictStr, Field(description="Which model to list software for: a flavor ID (the `flavor` value from `v3GetModels`, for example \"iphone17a\") or a product identifier such as \"iPhone18,4\". Only a flavor ID returns `springboardSnapshot`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ModelFirmware]: + """List software for a model + + Lists the operating-system builds you can install on a new instance of one model. Identify the model by its flavor ID (for example `iphone17a`) or its product identifier. Each entry's `osVersion` and `osBuild` are the values to pass to `POST /v3/instances`. **Where the list comes from.** It includes vendor builds the platform supports for this model (for example public iOS releases), firmware installed cluster-wide with `POST /v3/images/install-firmware`, and firmware uploaded at domain level with `POST /v3/images` (no `projectId` or `instanceId`). It does **not** include images that belong to a project or instance; to boot one of those, reference it explicitly when creating the instance. **Choosing a build.** - `installed: true` builds are already on your deployment and start fastest. Others are downloaded when first used. - On Android there are usually two builds per version; `rooted` tells them apart. MATRIX needs the rooted build. - `springboardSnapshot` present means the build supports rapid start. Returns 404 if the model is unknown or has no software. + + :param model: Which model to list software for: a flavor ID (the `flavor` value from `v3GetModels`, for example \"iphone17a\") or a product identifier such as \"iPhone18,4\". Only a flavor ID returns `springboardSnapshot`. (required) + :type model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_model_software_serialize( + model=model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ModelFirmware]", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_model_software_with_http_info( + self, + model: Annotated[StrictStr, Field(description="Which model to list software for: a flavor ID (the `flavor` value from `v3GetModels`, for example \"iphone17a\") or a product identifier such as \"iPhone18,4\". Only a flavor ID returns `springboardSnapshot`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ModelFirmware]]: + """List software for a model + + Lists the operating-system builds you can install on a new instance of one model. Identify the model by its flavor ID (for example `iphone17a`) or its product identifier. Each entry's `osVersion` and `osBuild` are the values to pass to `POST /v3/instances`. **Where the list comes from.** It includes vendor builds the platform supports for this model (for example public iOS releases), firmware installed cluster-wide with `POST /v3/images/install-firmware`, and firmware uploaded at domain level with `POST /v3/images` (no `projectId` or `instanceId`). It does **not** include images that belong to a project or instance; to boot one of those, reference it explicitly when creating the instance. **Choosing a build.** - `installed: true` builds are already on your deployment and start fastest. Others are downloaded when first used. - On Android there are usually two builds per version; `rooted` tells them apart. MATRIX needs the rooted build. - `springboardSnapshot` present means the build supports rapid start. Returns 404 if the model is unknown or has no software. + + :param model: Which model to list software for: a flavor ID (the `flavor` value from `v3GetModels`, for example \"iphone17a\") or a product identifier such as \"iPhone18,4\". Only a flavor ID returns `springboardSnapshot`. (required) + :type model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_model_software_serialize( + model=model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ModelFirmware]", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_model_software_without_preload_content( + self, + model: Annotated[StrictStr, Field(description="Which model to list software for: a flavor ID (the `flavor` value from `v3GetModels`, for example \"iphone17a\") or a product identifier such as \"iPhone18,4\". Only a flavor ID returns `springboardSnapshot`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List software for a model + + Lists the operating-system builds you can install on a new instance of one model. Identify the model by its flavor ID (for example `iphone17a`) or its product identifier. Each entry's `osVersion` and `osBuild` are the values to pass to `POST /v3/instances`. **Where the list comes from.** It includes vendor builds the platform supports for this model (for example public iOS releases), firmware installed cluster-wide with `POST /v3/images/install-firmware`, and firmware uploaded at domain level with `POST /v3/images` (no `projectId` or `instanceId`). It does **not** include images that belong to a project or instance; to boot one of those, reference it explicitly when creating the instance. **Choosing a build.** - `installed: true` builds are already on your deployment and start fastest. Others are downloaded when first used. - On Android there are usually two builds per version; `rooted` tells them apart. MATRIX needs the rooted build. - `springboardSnapshot` present means the build supports rapid start. Returns 404 if the model is unknown or has no software. + + :param model: Which model to list software for: a flavor ID (the `flavor` value from `v3GetModels`, for example \"iphone17a\") or a product identifier such as \"iPhone18,4\". Only a flavor ID returns `springboardSnapshot`. (required) + :type model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_model_software_serialize( + model=model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ModelFirmware]", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_model_software_serialize( + self, + model, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if model is not None: + _path_params['model'] = model + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/models/{model}/software', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_models( + self, + if_none_match: Annotated[Optional[StrictStr], Field(description="An ETag a previous response carried, quotes included.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[Model]: + """List device models + + Lists every device model you can create an instance of. Call it first when creating a device: pick a model, then list its software with `v3GetModelSoftware`, then create the instance with `POST /v3/instances`. The list only includes models your account can use. iOS models are left out if iOS is disabled for your domain, models from vendors your domain has not enabled are left out, and beta models appear only on deployments that allow them. Each entry tells you what you need to create a valid instance: - `flavor`: the value to pass as `flavor` when creating the instance. - `cores`, `coresMin`, `coresMax`, `coresStep`, `coresAllowed`: which CPU core counts are allowed. - `ram`, `ramMin`, `ramMax`: allowed memory, in MiB. - `hasSoftware`: false means there is no operating system available for this model yet, so an instance cannot be created from a standard build. - `mast`: whether MATRIX assessments work on it. **Caching.** The response carries an `ETag` header. Send it back as `If-None-Match` on later calls; if nothing has changed you get 304 with no body and can reuse your copy. + + :param if_none_match: An ETag a previous response carried, quotes included. + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_models_serialize( + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Model]", + '304': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_models_with_http_info( + self, + if_none_match: Annotated[Optional[StrictStr], Field(description="An ETag a previous response carried, quotes included.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[Model]]: + """List device models + + Lists every device model you can create an instance of. Call it first when creating a device: pick a model, then list its software with `v3GetModelSoftware`, then create the instance with `POST /v3/instances`. The list only includes models your account can use. iOS models are left out if iOS is disabled for your domain, models from vendors your domain has not enabled are left out, and beta models appear only on deployments that allow them. Each entry tells you what you need to create a valid instance: - `flavor`: the value to pass as `flavor` when creating the instance. - `cores`, `coresMin`, `coresMax`, `coresStep`, `coresAllowed`: which CPU core counts are allowed. - `ram`, `ramMin`, `ramMax`: allowed memory, in MiB. - `hasSoftware`: false means there is no operating system available for this model yet, so an instance cannot be created from a standard build. - `mast`: whether MATRIX assessments work on it. **Caching.** The response carries an `ETag` header. Send it back as `If-None-Match` on later calls; if nothing has changed you get 304 with no body and can reuse your copy. + + :param if_none_match: An ETag a previous response carried, quotes included. + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_models_serialize( + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Model]", + '304': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_models_without_preload_content( + self, + if_none_match: Annotated[Optional[StrictStr], Field(description="An ETag a previous response carried, quotes included.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List device models + + Lists every device model you can create an instance of. Call it first when creating a device: pick a model, then list its software with `v3GetModelSoftware`, then create the instance with `POST /v3/instances`. The list only includes models your account can use. iOS models are left out if iOS is disabled for your domain, models from vendors your domain has not enabled are left out, and beta models appear only on deployments that allow them. Each entry tells you what you need to create a valid instance: - `flavor`: the value to pass as `flavor` when creating the instance. - `cores`, `coresMin`, `coresMax`, `coresStep`, `coresAllowed`: which CPU core counts are allowed. - `ram`, `ramMin`, `ramMax`: allowed memory, in MiB. - `hasSoftware`: false means there is no operating system available for this model yet, so an instance cannot be created from a standard build. - `mast`: whether MATRIX assessments work on it. **Caching.** The response carries an `ETag` header. Send it back as `If-None-Match` on later calls; if nothing has changed you get 304 with no body and can reuse your copy. + + :param if_none_match: An ETag a previous response carried, quotes included. + :type if_none_match: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_models_serialize( + if_none_match=if_none_match, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Model]", + '304': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_models_serialize( + self, + if_none_match, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['if-none-match'] = if_none_match + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/models', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/models_v1_api.py b/corellium/api/models_v1_api.py new file mode 100644 index 0000000..f9f1127 --- /dev/null +++ b/corellium/api/models_v1_api.py @@ -0,0 +1,638 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.firmware_v1 import FirmwareV1 +from corellium.models.model_v1 import ModelV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ModelsV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_get_model_software( + self, + model: Annotated[StrictStr, Field(description="Model to list available software for")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[FirmwareV1]: + """(Deprecated) Get Software for Model + + + :param model: Model to list available software for (required) + :type model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/models/{model}/software is deprecated.", DeprecationWarning) + + _param = self._v1_get_model_software_serialize( + model=model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_model_software_with_http_info( + self, + model: Annotated[StrictStr, Field(description="Model to list available software for")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[FirmwareV1]]: + """(Deprecated) Get Software for Model + + + :param model: Model to list available software for (required) + :type model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/models/{model}/software is deprecated.", DeprecationWarning) + + _param = self._v1_get_model_software_serialize( + model=model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_model_software_without_preload_content( + self, + model: Annotated[StrictStr, Field(description="Model to list available software for")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Software for Model + + + :param model: Model to list available software for (required) + :type model: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/models/{model}/software is deprecated.", DeprecationWarning) + + _param = self._v1_get_model_software_serialize( + model=model, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[FirmwareV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_model_software_serialize( + self, + model, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if model is not None: + _path_params['model'] = model + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/models/{model}/software', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_models( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ModelV1]: + """(Deprecated) Get Supported Models + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/models is deprecated.", DeprecationWarning) + + _param = self._v1_get_models_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ModelV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_models_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ModelV1]]: + """(Deprecated) Get Supported Models + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/models is deprecated.", DeprecationWarning) + + _param = self._v1_get_models_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ModelV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_models_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Supported Models + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/models is deprecated.", DeprecationWarning) + + _param = self._v1_get_models_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ModelV1]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_models_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/models', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/net_connect_api.py b/corellium/api/net_connect_api.py new file mode 100644 index 0000000..3c55329 --- /dev/null +++ b/corellium/api/net_connect_api.py @@ -0,0 +1,2688 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from corellium.models.create_network_connection_body import CreateNetworkConnectionBody +from corellium.models.network_connection_providers import NetworkConnectionProviders +from corellium.models.network_connections import NetworkConnections +from corellium.models.network_interfaces import NetworkInterfaces +from corellium.models.partial_update_network_connection_body import PartialUpdateNetworkConnectionBody +from corellium.models.provider_network_connection import ProviderNetworkConnection +from corellium.models.update_network_connection_body import UpdateNetworkConnectionBody +from corellium.models.v3_delete_network_connection_request import V3DeleteNetworkConnectionRequest + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class NetConnectApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_network_connection( + self, + create_network_connection_body: CreateNetworkConnectionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ProviderNetworkConnection]: + """Create a new Network Connection + + Creates a network connection that projects can route their outbound device traffic through. Pick a provider type from `v3ListNetworkProviders` and supply its settings; for a VLAN, pick a physical interface from `v3ListNetworkInterfaces`. VLAN networks are only supported in bridged networking mode. Afterwards, attach it to a project by setting the project's `settings.connection`. You must have the domain administrator role to create a network connection. + + :param create_network_connection_body: (required) + :type create_network_connection_body: CreateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_network_connection_serialize( + create_network_connection_body=create_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProviderNetworkConnection]", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_network_connection_with_http_info( + self, + create_network_connection_body: CreateNetworkConnectionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ProviderNetworkConnection]]: + """Create a new Network Connection + + Creates a network connection that projects can route their outbound device traffic through. Pick a provider type from `v3ListNetworkProviders` and supply its settings; for a VLAN, pick a physical interface from `v3ListNetworkInterfaces`. VLAN networks are only supported in bridged networking mode. Afterwards, attach it to a project by setting the project's `settings.connection`. You must have the domain administrator role to create a network connection. + + :param create_network_connection_body: (required) + :type create_network_connection_body: CreateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_network_connection_serialize( + create_network_connection_body=create_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProviderNetworkConnection]", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_network_connection_without_preload_content( + self, + create_network_connection_body: CreateNetworkConnectionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a new Network Connection + + Creates a network connection that projects can route their outbound device traffic through. Pick a provider type from `v3ListNetworkProviders` and supply its settings; for a VLAN, pick a physical interface from `v3ListNetworkInterfaces`. VLAN networks are only supported in bridged networking mode. Afterwards, attach it to a project by setting the project's `settings.connection`. You must have the domain administrator role to create a network connection. + + :param create_network_connection_body: (required) + :type create_network_connection_body: CreateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_network_connection_serialize( + create_network_connection_body=create_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProviderNetworkConnection]", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_network_connection_serialize( + self, + create_network_connection_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_network_connection_body is not None: + _body_params = create_network_connection_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/network/connections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_network_connection( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + v3_delete_network_connection_request: Optional[V3DeleteNetworkConnectionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an existing Network Connection + + Delete an existing Network Connection. You must have the domain administrator role to delete a network connection. Deletes are idempotent: an unknown `id`, or a connection that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A connection still attached to projects returns 400 unless `force` is set. + + :param id: Network Connection Identifier. (required) + :type id: str + :param v3_delete_network_connection_request: + :type v3_delete_network_connection_request: V3DeleteNetworkConnectionRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_network_connection_serialize( + id=id, + v3_delete_network_connection_request=v3_delete_network_connection_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_network_connection_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + v3_delete_network_connection_request: Optional[V3DeleteNetworkConnectionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an existing Network Connection + + Delete an existing Network Connection. You must have the domain administrator role to delete a network connection. Deletes are idempotent: an unknown `id`, or a connection that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A connection still attached to projects returns 400 unless `force` is set. + + :param id: Network Connection Identifier. (required) + :type id: str + :param v3_delete_network_connection_request: + :type v3_delete_network_connection_request: V3DeleteNetworkConnectionRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_network_connection_serialize( + id=id, + v3_delete_network_connection_request=v3_delete_network_connection_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_network_connection_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + v3_delete_network_connection_request: Optional[V3DeleteNetworkConnectionRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an existing Network Connection + + Delete an existing Network Connection. You must have the domain administrator role to delete a network connection. Deletes are idempotent: an unknown `id`, or a connection that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A connection still attached to projects returns 400 unless `force` is set. + + :param id: Network Connection Identifier. (required) + :type id: str + :param v3_delete_network_connection_request: + :type v3_delete_network_connection_request: V3DeleteNetworkConnectionRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_network_connection_serialize( + id=id, + v3_delete_network_connection_request=v3_delete_network_connection_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_network_connection_serialize( + self, + id, + v3_delete_network_connection_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if v3_delete_network_connection_request is not None: + _body_params = v3_delete_network_connection_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/network/connections/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_network_connection( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProviderNetworkConnection: + """Fetch an existing Network Connection + + Returns one network connection: its settings and, for each project using it, the connection's current state there. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN. You must have the domain administrator or project administrator role to fetch a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_network_connection_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_network_connection_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProviderNetworkConnection]: + """Fetch an existing Network Connection + + Returns one network connection: its settings and, for each project using it, the connection's current state there. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN. You must have the domain administrator or project administrator role to fetch a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_network_connection_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_network_connection_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fetch an existing Network Connection + + Returns one network connection: its settings and, for each project using it, the connection's current state there. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN. You must have the domain administrator or project administrator role to fetch a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_network_connection_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_network_connection_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/network/connections/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_network_connections( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkConnections: + """List available network connections + + Lists the network connections set up in your domain. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN; a project uses one when its `settings.connection` is set to the connection's ID (see `PATCH /v3/projects/{projectId}`). You must have the domain administrator or project administrator role to list network connections. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_connections_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnections", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_network_connections_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkConnections]: + """List available network connections + + Lists the network connections set up in your domain. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN; a project uses one when its `settings.connection` is set to the connection's ID (see `PATCH /v3/projects/{projectId}`). You must have the domain administrator or project administrator role to list network connections. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_connections_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnections", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_network_connections_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List available network connections + + Lists the network connections set up in your domain. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN; a project uses one when its `settings.connection` is set to the connection's ID (see `PATCH /v3/projects/{projectId}`). You must have the domain administrator or project administrator role to list network connections. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_connections_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnections", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_network_connections_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/network/connections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_network_interfaces( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkInterfaces: + """List available physical network interfaces + + Lists the physical network ports on the server that can carry a VLAN network connection. Use one of these names when creating a VLAN connection. You must have the domain administrator role to list network interfaces. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_interfaces_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkInterfaces", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_network_interfaces_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkInterfaces]: + """List available physical network interfaces + + Lists the physical network ports on the server that can carry a VLAN network connection. Use one of these names when creating a VLAN connection. You must have the domain administrator role to list network interfaces. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_interfaces_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkInterfaces", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_network_interfaces_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List available physical network interfaces + + Lists the physical network ports on the server that can carry a VLAN network connection. Use one of these names when creating a VLAN connection. You must have the domain administrator role to list network interfaces. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_interfaces_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkInterfaces", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_network_interfaces_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/network/interfaces', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_network_providers( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkConnectionProviders: + """List available network providers + + Provides a list of registered network providers to be used when creating network connections via [`createNetworkConnection`](#tag/netconnect/POST/v3/network/connections). You must have the domain administrator role to list network providers. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_providers_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionProviders", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_network_providers_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkConnectionProviders]: + """List available network providers + + Provides a list of registered network providers to be used when creating network connections via [`createNetworkConnection`](#tag/netconnect/POST/v3/network/connections). You must have the domain administrator role to list network providers. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_providers_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionProviders", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_network_providers_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List available network providers + + Provides a list of registered network providers to be used when creating network connections via [`createNetworkConnection`](#tag/netconnect/POST/v3/network/connections). You must have the domain administrator role to list network providers. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_network_providers_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionProviders", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_network_providers_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/network/providers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_partial_update_network_connection( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + partial_update_network_connection_body: Optional[PartialUpdateNetworkConnectionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProviderNetworkConnection: + """Update Network Connection (patch) + + Only updates the specified attributes. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param partial_update_network_connection_body: + :type partial_update_network_connection_body: PartialUpdateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_partial_update_network_connection_serialize( + id=id, + partial_update_network_connection_body=partial_update_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_partial_update_network_connection_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + partial_update_network_connection_body: Optional[PartialUpdateNetworkConnectionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProviderNetworkConnection]: + """Update Network Connection (patch) + + Only updates the specified attributes. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param partial_update_network_connection_body: + :type partial_update_network_connection_body: PartialUpdateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_partial_update_network_connection_serialize( + id=id, + partial_update_network_connection_body=partial_update_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_partial_update_network_connection_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + partial_update_network_connection_body: Optional[PartialUpdateNetworkConnectionBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Network Connection (patch) + + Only updates the specified attributes. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param partial_update_network_connection_body: + :type partial_update_network_connection_body: PartialUpdateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_partial_update_network_connection_serialize( + id=id, + partial_update_network_connection_body=partial_update_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_partial_update_network_connection_serialize( + self, + id, + partial_update_network_connection_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if partial_update_network_connection_body is not None: + _body_params = partial_update_network_connection_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/network/connections/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_update_network_connection( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + update_network_connection_body: UpdateNetworkConnectionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProviderNetworkConnection: + """Update Network Connection + + Replaces all of a network connection's settings. To change only some of them, use `v3PartialUpdateNetworkConnection`. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param update_network_connection_body: (required) + :type update_network_connection_body: UpdateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_network_connection_serialize( + id=id, + update_network_connection_body=update_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_update_network_connection_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + update_network_connection_body: UpdateNetworkConnectionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProviderNetworkConnection]: + """Update Network Connection + + Replaces all of a network connection's settings. To change only some of them, use `v3PartialUpdateNetworkConnection`. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param update_network_connection_body: (required) + :type update_network_connection_body: UpdateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_network_connection_serialize( + id=id, + update_network_connection_body=update_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_update_network_connection_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier.")], + update_network_connection_body: UpdateNetworkConnectionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Network Connection + + Replaces all of a network connection's settings. To change only some of them, use `v3PartialUpdateNetworkConnection`. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier. (required) + :type id: str + :param update_network_connection_body: (required) + :type update_network_connection_body: UpdateNetworkConnectionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_network_connection_serialize( + id=id, + update_network_connection_body=update_network_connection_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProviderNetworkConnection", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_update_network_connection_serialize( + self, + id, + update_network_connection_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_network_connection_body is not None: + _body_params = update_network_connection_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/network/connections/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/net_connect_v1_api.py b/corellium/api/net_connect_v1_api.py new file mode 100644 index 0000000..aeffd38 --- /dev/null +++ b/corellium/api/net_connect_v1_api.py @@ -0,0 +1,2637 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import List, Optional, Union +from typing_extensions import Annotated +from corellium.models.create_network_connection_options import CreateNetworkConnectionOptions +from corellium.models.delete_network_connection_options import DeleteNetworkConnectionOptions +from corellium.models.network_connection import NetworkConnection +from corellium.models.network_connection_pagination_result import NetworkConnectionPaginationResult +from corellium.models.network_connection_provider_pagination_result import NetworkConnectionProviderPaginationResult +from corellium.models.partial_update_network_connection_options import PartialUpdateNetworkConnectionOptions +from corellium.models.update_network_connection_options import UpdateNetworkConnectionOptions + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class NetConnectV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_create_network_connection( + self, + create_network_connection_options: Annotated[CreateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkConnection: + """(Deprecated) Create a new Network Connection + + You must have the domain administrator role to create a network connection. VLAN networks are only supported in bridged networking mode. + + :param create_network_connection_options: Network Connection Options (required) + :type create_network_connection_options: CreateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/network/connections is deprecated.", DeprecationWarning) + + _param = self._v1_create_network_connection_serialize( + create_network_connection_options=create_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_network_connection_with_http_info( + self, + create_network_connection_options: Annotated[CreateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkConnection]: + """(Deprecated) Create a new Network Connection + + You must have the domain administrator role to create a network connection. VLAN networks are only supported in bridged networking mode. + + :param create_network_connection_options: Network Connection Options (required) + :type create_network_connection_options: CreateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/network/connections is deprecated.", DeprecationWarning) + + _param = self._v1_create_network_connection_serialize( + create_network_connection_options=create_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_network_connection_without_preload_content( + self, + create_network_connection_options: Annotated[CreateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create a new Network Connection + + You must have the domain administrator role to create a network connection. VLAN networks are only supported in bridged networking mode. + + :param create_network_connection_options: Network Connection Options (required) + :type create_network_connection_options: CreateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/network/connections is deprecated.", DeprecationWarning) + + _param = self._v1_create_network_connection_serialize( + create_network_connection_options=create_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_network_connection_serialize( + self, + create_network_connection_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_network_connection_options is not None: + _body_params = create_network_connection_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/network/connections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_network_connection( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + delete_network_connection_options: Annotated[Optional[DeleteNetworkConnectionOptions], Field(description="Delete options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete an existing Network Connection + + You must have the domain administrator role to delete a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param delete_network_connection_options: Delete options + :type delete_network_connection_options: DeleteNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_network_connection_serialize( + id=id, + delete_network_connection_options=delete_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_network_connection_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + delete_network_connection_options: Annotated[Optional[DeleteNetworkConnectionOptions], Field(description="Delete options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete an existing Network Connection + + You must have the domain administrator role to delete a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param delete_network_connection_options: Delete options + :type delete_network_connection_options: DeleteNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_network_connection_serialize( + id=id, + delete_network_connection_options=delete_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_network_connection_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + delete_network_connection_options: Annotated[Optional[DeleteNetworkConnectionOptions], Field(description="Delete options")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete an existing Network Connection + + You must have the domain administrator role to delete a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param delete_network_connection_options: Delete options + :type delete_network_connection_options: DeleteNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_network_connection_serialize( + id=id, + delete_network_connection_options=delete_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_network_connection_serialize( + self, + id, + delete_network_connection_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if delete_network_connection_options is not None: + _body_params = delete_network_connection_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/network/connections/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_network_connection( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkConnection: + """(Deprecated) Return the configuration and per project statuses for a single network provider. + + You must have the domain administrator or project administrator role to fetch a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_get_network_connection_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_network_connection_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkConnection]: + """(Deprecated) Return the configuration and per project statuses for a single network provider. + + You must have the domain administrator or project administrator role to fetch a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_get_network_connection_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_network_connection_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Return the configuration and per project statuses for a single network provider. + + You must have the domain administrator or project administrator role to fetch a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_get_network_connection_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_network_connection_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/network/connections/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_network_connections( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The maximum number of items to return.")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The starting index of the items to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkConnectionPaginationResult: + """(Deprecated) List available network connections + + You must have the domain administrator or project administrator role to list network connections. + + :param limit: The maximum number of items to return. + :type limit: float + :param offset: The starting index of the items to return. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/connections is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_connections_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionPaginationResult", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_network_connections_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The maximum number of items to return.")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The starting index of the items to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkConnectionPaginationResult]: + """(Deprecated) List available network connections + + You must have the domain administrator or project administrator role to list network connections. + + :param limit: The maximum number of items to return. + :type limit: float + :param offset: The starting index of the items to return. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/connections is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_connections_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionPaginationResult", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_network_connections_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The maximum number of items to return.")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The starting index of the items to return.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List available network connections + + You must have the domain administrator or project administrator role to list network connections. + + :param limit: The maximum number of items to return. + :type limit: float + :param offset: The starting index of the items to return. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/connections is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_connections_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionPaginationResult", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_network_connections_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/network/connections', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_network_interfaces( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[str]: + """(Deprecated) List available physical network interfaces + + Lists available physical network interfaces that can be used for VLAN configuration. You must have the domain administrator role to list network interfaces. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/interfaces is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_interfaces_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_network_interfaces_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[str]]: + """(Deprecated) List available physical network interfaces + + Lists available physical network interfaces that can be used for VLAN configuration. You must have the domain administrator role to list network interfaces. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/interfaces is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_interfaces_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_network_interfaces_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List available physical network interfaces + + Lists available physical network interfaces that can be used for VLAN configuration. You must have the domain administrator role to list network interfaces. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/interfaces is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_interfaces_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_network_interfaces_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/network/interfaces', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_network_providers( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkConnectionProviderPaginationResult: + """(Deprecated) List available network providers + + Provides a list of registered network providers to be used when [creating network connections](#post-/v1/network/connections). You must have the domain administrator role to list network providers. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/providers is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_providers_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionProviderPaginationResult", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_network_providers_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkConnectionProviderPaginationResult]: + """(Deprecated) List available network providers + + Provides a list of registered network providers to be used when [creating network connections](#post-/v1/network/connections). You must have the domain administrator role to list network providers. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/providers is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_providers_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionProviderPaginationResult", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_network_providers_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List available network providers + + Provides a list of registered network providers to be used when [creating network connections](#post-/v1/network/connections). You must have the domain administrator role to list network providers. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/network/providers is deprecated.", DeprecationWarning) + + _param = self._v1_list_network_providers_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnectionProviderPaginationResult", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_network_providers_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/network/providers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_partial_update_network_connection( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + partial_update_network_connection_options: Annotated[PartialUpdateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkConnection: + """(Deprecated) Update Network Connection (partial) + + Only updates the specified attributes. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param partial_update_network_connection_options: Network Connection Options (required) + :type partial_update_network_connection_options: PartialUpdateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_partial_update_network_connection_serialize( + id=id, + partial_update_network_connection_options=partial_update_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '400': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_partial_update_network_connection_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + partial_update_network_connection_options: Annotated[PartialUpdateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkConnection]: + """(Deprecated) Update Network Connection (partial) + + Only updates the specified attributes. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param partial_update_network_connection_options: Network Connection Options (required) + :type partial_update_network_connection_options: PartialUpdateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_partial_update_network_connection_serialize( + id=id, + partial_update_network_connection_options=partial_update_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '400': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_partial_update_network_connection_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + partial_update_network_connection_options: Annotated[PartialUpdateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update Network Connection (partial) + + Only updates the specified attributes. You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param partial_update_network_connection_options: Network Connection Options (required) + :type partial_update_network_connection_options: PartialUpdateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_partial_update_network_connection_serialize( + id=id, + partial_update_network_connection_options=partial_update_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '400': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_partial_update_network_connection_serialize( + self, + id, + partial_update_network_connection_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if partial_update_network_connection_options is not None: + _body_params = partial_update_network_connection_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/network/connections/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_network_connection( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + update_network_connection_options: Annotated[UpdateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkConnection: + """(Deprecated) Update Network Connection + + You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param update_network_connection_options: Network Connection Options (required) + :type update_network_connection_options: UpdateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_update_network_connection_serialize( + id=id, + update_network_connection_options=update_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_network_connection_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + update_network_connection_options: Annotated[UpdateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkConnection]: + """(Deprecated) Update Network Connection + + You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param update_network_connection_options: Network Connection Options (required) + :type update_network_connection_options: UpdateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_update_network_connection_serialize( + id=id, + update_network_connection_options=update_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_network_connection_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Network Connection Identifier - uuid")], + update_network_connection_options: Annotated[UpdateNetworkConnectionOptions, Field(description="Network Connection Options")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update Network Connection + + You must have the domain administrator role to update a network connection. + + :param id: Network Connection Identifier - uuid (required) + :type id: str + :param update_network_connection_options: Network Connection Options (required) + :type update_network_connection_options: UpdateNetworkConnectionOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/network/connections/{id} is deprecated.", DeprecationWarning) + + _param = self._v1_update_network_connection_serialize( + id=id, + update_network_connection_options=update_network_connection_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkConnection", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_network_connection_serialize( + self, + id, + update_network_connection_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_network_connection_options is not None: + _body_params = update_network_connection_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/network/connections/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/projects_api.py b/corellium/api/projects_api.py new file mode 100644 index 0000000..bf381b9 --- /dev/null +++ b/corellium/api/projects_api.py @@ -0,0 +1,5710 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from typing import Any, Dict, Optional, Tuple, Union +from typing_extensions import Annotated +from corellium.models.create_project_body import CreateProjectBody +from corellium.models.create_project_key_body import CreateProjectKeyBody +from corellium.models.fetch_firmware_assets_body import FetchFirmwareAssetsBody +from corellium.models.fetch_firmware_assets_response import FetchFirmwareAssetsResponse +from corellium.models.network_status import NetworkStatus +from corellium.models.patch_project_body import PatchProjectBody +from corellium.models.project import Project +from corellium.models.project_instance_list import ProjectInstanceList +from corellium.models.project_key import ProjectKey +from corellium.models.project_key_list import ProjectKeyList +from corellium.models.project_list import ProjectList +from corellium.models.vpn_config_preauthorization import VpnConfigPreauthorization + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ProjectsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_project( + self, + create_project_body: Annotated[CreateProjectBody, Field(description="Project to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Project: + """Create a project + + **Required role:** Domain administrator. Creates a new project in your domain. Requires a domain administrator. **Give it quota, or it cannot run devices.** A new project created without `quotas` has zero quota. Quota is reserved out of your domain's total allowance, so if the whole allowance is already reserved by other projects, lower one of them with `v3PatchProject` first. When you set `quotas`, `cores` is required. `instances` is derived from `cores` if you leave it out, and memory is always calculated from cores (6144 MiB per core); any `ram` you send is ignored. Returns 201 with the new project, including its `id`. + + :param create_project_body: Project to create. (required) + :type create_project_body: CreateProjectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_project_serialize( + create_project_body=create_project_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Project", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_project_with_http_info( + self, + create_project_body: Annotated[CreateProjectBody, Field(description="Project to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Project]: + """Create a project + + **Required role:** Domain administrator. Creates a new project in your domain. Requires a domain administrator. **Give it quota, or it cannot run devices.** A new project created without `quotas` has zero quota. Quota is reserved out of your domain's total allowance, so if the whole allowance is already reserved by other projects, lower one of them with `v3PatchProject` first. When you set `quotas`, `cores` is required. `instances` is derived from `cores` if you leave it out, and memory is always calculated from cores (6144 MiB per core); any `ram` you send is ignored. Returns 201 with the new project, including its `id`. + + :param create_project_body: Project to create. (required) + :type create_project_body: CreateProjectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_project_serialize( + create_project_body=create_project_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Project", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_project_without_preload_content( + self, + create_project_body: Annotated[CreateProjectBody, Field(description="Project to create.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a project + + **Required role:** Domain administrator. Creates a new project in your domain. Requires a domain administrator. **Give it quota, or it cannot run devices.** A new project created without `quotas` has zero quota. Quota is reserved out of your domain's total allowance, so if the whole allowance is already reserved by other projects, lower one of them with `v3PatchProject` first. When you set `quotas`, `cores` is required. `instances` is derived from `cores` if you leave it out, and memory is always calculated from cores (6144 MiB per core); any `ram` you send is ignored. Returns 201 with the new project, including its `id`. + + :param create_project_body: Project to create. (required) + :type create_project_body: CreateProjectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_project_serialize( + create_project_body=create_project_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Project", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_project_serialize( + self, + create_project_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_project_body is not None: + _body_params = create_project_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/projects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_create_project_key( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + create_project_key_body: Annotated[CreateProjectKeyBody, Field(description="Key to add.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectKey: + """Add a project key + + **Required role:** Domain administrator or project administrator. Authorizes a public key on the project, so its holder can connect to the project's devices. Requires a domain or project administrator. Set `kind` to `ssh` for SSH access or `adb` for Android Debug Bridge access, and put the public key (never the private key) in `key`, in the same one-line format as an OpenSSH `authorized_keys` entry. `label` is an optional note to help you recognise the key later. Returns 400 if the key cannot be parsed. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param create_project_key_body: Key to add. (required) + :type create_project_key_body: CreateProjectKeyBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_project_key_serialize( + project_id=project_id, + create_project_key_body=create_project_key_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ProjectKey", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_project_key_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + create_project_key_body: Annotated[CreateProjectKeyBody, Field(description="Key to add.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectKey]: + """Add a project key + + **Required role:** Domain administrator or project administrator. Authorizes a public key on the project, so its holder can connect to the project's devices. Requires a domain or project administrator. Set `kind` to `ssh` for SSH access or `adb` for Android Debug Bridge access, and put the public key (never the private key) in `key`, in the same one-line format as an OpenSSH `authorized_keys` entry. `label` is an optional note to help you recognise the key later. Returns 400 if the key cannot be parsed. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param create_project_key_body: Key to add. (required) + :type create_project_key_body: CreateProjectKeyBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_project_key_serialize( + project_id=project_id, + create_project_key_body=create_project_key_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ProjectKey", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_project_key_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + create_project_key_body: Annotated[CreateProjectKeyBody, Field(description="Key to add.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a project key + + **Required role:** Domain administrator or project administrator. Authorizes a public key on the project, so its holder can connect to the project's devices. Requires a domain or project administrator. Set `kind` to `ssh` for SSH access or `adb` for Android Debug Bridge access, and put the public key (never the private key) in `key`, in the same one-line format as an OpenSSH `authorized_keys` entry. `label` is an optional note to help you recognise the key later. Returns 400 if the key cannot be parsed. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param create_project_key_body: Key to add. (required) + :type create_project_key_body: CreateProjectKeyBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_project_key_serialize( + project_id=project_id, + create_project_key_body=create_project_key_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ProjectKey", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_project_key_serialize( + self, + project_id, + create_project_key_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_project_key_body is not None: + _body_params = create_project_key_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/projects/{projectId}/keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_project( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a project + + **Required role:** Domain administrator. Deletes a project together with every file (image) uploaded to it. Requires a domain administrator. The project must not contain any devices: if it does, the request fails with 409 and nothing is deleted. Delete the devices first with `DELETE /v3/instances/{instanceId}` and wait until they are gone. Deletes are idempotent: an unknown `projectId`, or a project that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a project + + **Required role:** Domain administrator. Deletes a project together with every file (image) uploaded to it. Requires a domain administrator. The project must not contain any devices: if it does, the request fails with 409 and nothing is deleted. Delete the devices first with `DELETE /v3/instances/{instanceId}` and wait until they are gone. Deletes are idempotent: an unknown `projectId`, or a project that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a project + + **Required role:** Domain administrator. Deletes a project together with every file (image) uploaded to it. Requires a domain administrator. The project must not contain any devices: if it does, the request fails with 409 and nothing is deleted. Delete the devices first with `DELETE /v3/instances/{instanceId}` and wait until they are gone. Deletes are idempotent: an unknown `projectId`, or a project that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_project_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/projects/{projectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_project_key( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + key_id: Annotated[StrictStr, Field(description="Project key identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a project key + + **Required role:** Domain administrator or project administrator. Removes an authorized key from the project, so it can no longer be used to connect to the project's devices. Requires a domain or project administrator. Deletes are idempotent: a `keyId` that is not present on the project, or an unknown `projectId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param key_id: Project key identifier. (required) + :type key_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_project_key_serialize( + project_id=project_id, + key_id=key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_project_key_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + key_id: Annotated[StrictStr, Field(description="Project key identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a project key + + **Required role:** Domain administrator or project administrator. Removes an authorized key from the project, so it can no longer be used to connect to the project's devices. Requires a domain or project administrator. Deletes are idempotent: a `keyId` that is not present on the project, or an unknown `projectId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param key_id: Project key identifier. (required) + :type key_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_project_key_serialize( + project_id=project_id, + key_id=key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_project_key_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + key_id: Annotated[StrictStr, Field(description="Project key identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a project key + + **Required role:** Domain administrator or project administrator. Removes an authorized key from the project, so it can no longer be used to connect to the project's devices. Requires a domain or project administrator. Deletes are idempotent: a `keyId` that is not present on the project, or an unknown `projectId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param key_id: Project key identifier. (required) + :type key_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_project_key_serialize( + project_id=project_id, + key_id=key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_project_key_serialize( + self, + project_id, + key_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if key_id is not None: + _path_params['keyId'] = key_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/projects/{projectId}/keys/{keyId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_fetch_project_firmware_assets( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + fetch_firmware_assets_body: Annotated[FetchFirmwareAssetsBody, Field(description="Firmware asset URLs to fetch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FetchFirmwareAssetsResponse: + """Fetch firmware assets for a project + + Asks the platform to download firmware assets (for example the decryption keys some iOS versions need to boot) from the given URLs and store them for your domain. Use it when device creation reports that assets are missing: the missing asset URLs appear in that error and in each firmware entry. The response lists which URLs were newly stored, which were already present, and which failed and why. Returns 409 if downloading assets is turned off on this deployment (for example an air-gapped one); there, upload the assets as a file and install them with `POST /v3/images/install-firmware-assets` instead. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param fetch_firmware_assets_body: Firmware asset URLs to fetch. (required) + :type fetch_firmware_assets_body: FetchFirmwareAssetsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_fetch_project_firmware_assets_serialize( + project_id=project_id, + fetch_firmware_assets_body=fetch_firmware_assets_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FetchFirmwareAssetsResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + '503': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_fetch_project_firmware_assets_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + fetch_firmware_assets_body: Annotated[FetchFirmwareAssetsBody, Field(description="Firmware asset URLs to fetch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FetchFirmwareAssetsResponse]: + """Fetch firmware assets for a project + + Asks the platform to download firmware assets (for example the decryption keys some iOS versions need to boot) from the given URLs and store them for your domain. Use it when device creation reports that assets are missing: the missing asset URLs appear in that error and in each firmware entry. The response lists which URLs were newly stored, which were already present, and which failed and why. Returns 409 if downloading assets is turned off on this deployment (for example an air-gapped one); there, upload the assets as a file and install them with `POST /v3/images/install-firmware-assets` instead. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param fetch_firmware_assets_body: Firmware asset URLs to fetch. (required) + :type fetch_firmware_assets_body: FetchFirmwareAssetsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_fetch_project_firmware_assets_serialize( + project_id=project_id, + fetch_firmware_assets_body=fetch_firmware_assets_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FetchFirmwareAssetsResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + '503': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_fetch_project_firmware_assets_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + fetch_firmware_assets_body: Annotated[FetchFirmwareAssetsBody, Field(description="Firmware asset URLs to fetch.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fetch firmware assets for a project + + Asks the platform to download firmware assets (for example the decryption keys some iOS versions need to boot) from the given URLs and store them for your domain. Use it when device creation reports that assets are missing: the missing asset URLs appear in that error and in each firmware entry. The response lists which URLs were newly stored, which were already present, and which failed and why. Returns 409 if downloading assets is turned off on this deployment (for example an air-gapped one); there, upload the assets as a file and install them with `POST /v3/images/install-firmware-assets` instead. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param fetch_firmware_assets_body: Firmware asset URLs to fetch. (required) + :type fetch_firmware_assets_body: FetchFirmwareAssetsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_fetch_project_firmware_assets_serialize( + project_id=project_id, + fetch_firmware_assets_body=fetch_firmware_assets_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FetchFirmwareAssetsResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '409': "ApiConflictError", + '503': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_fetch_project_firmware_assets_serialize( + self, + project_id, + fetch_firmware_assets_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if fetch_firmware_assets_body is not None: + _body_params = fetch_firmware_assets_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/projects/{projectId}/firmware-assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_project( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Project: + """Get a project + + Returns one project with its settings, quotas, and current resource usage (`quotasUsed`). Compare `quotas` with `quotasUsed` to see whether there is room for another device before creating one. Returns 404 if the project does not exist and 403 if you cannot access it. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Project", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Project]: + """Get a project + + Returns one project with its settings, quotas, and current resource usage (`quotasUsed`). Compare `quotas` with `quotasUsed` to see whether there is room for another device before creating one. Returns 404 if the project does not exist and 403 if you cannot access it. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Project", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a project + + Returns one project with its settings, quotas, and current resource usage (`quotasUsed`). Compare `quotas` with `quotasUsed` to see whether there is room for another device before creating one. Returns 404 if the project does not exist and 403 if you cannot access it. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Project", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_project_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/projects/{projectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_project_image_upload( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Get image upload status + + Checks the progress of a chunked upload made with `v3PutProjectImageUpload`, or downloads the finished file. - **With chunk parameters** (`resumableChunkNumber` and friends): returns 200 if that chunk is already stored, or 204 if it still needs to be sent. Use this to resume an interrupted upload without re-sending data. - **Without them:** downloads the image file. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_image_upload_serialize( + project_id=project_id, + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_project_image_upload_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Get image upload status + + Checks the progress of a chunked upload made with `v3PutProjectImageUpload`, or downloads the finished file. - **With chunk parameters** (`resumableChunkNumber` and friends): returns 200 if that chunk is already stored, or 204 if it still needs to be sent. Use this to resume an interrupted upload without re-sending data. - **Without them:** downloads the image file. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_image_upload_serialize( + project_id=project_id, + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_project_image_upload_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get image upload status + + Checks the progress of a chunked upload made with `v3PutProjectImageUpload`, or downloads the finished file. - **With chunk parameters** (`resumableChunkNumber` and friends): returns 200 if that chunk is already stored, or 204 if it still needs to be sent. Use this to resume an interrupted upload without re-sending data. - **Without them:** downloads the image file. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param resumable_chunk_number: Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. + :type resumable_chunk_number: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_image_upload_serialize( + project_id=project_id, + type=type, + image_id=image_id, + name=name, + resumable_chunk_number=resumable_chunk_number, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '204': None, + '302': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_project_image_upload_serialize( + self, + project_id, + type, + image_id, + name, + resumable_chunk_number, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if type is not None: + _path_params['type'] = type + if image_id is not None: + _path_params['imageId'] = image_id + if name is not None: + _path_params['name'] = name + # process the query parameters + if resumable_chunk_number is not None: + + _query_params.append(('resumableChunkNumber', resumable_chunk_number)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/projects/{projectId}/image-upload/{type}/{imageId}/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_project_network_log( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Get project network log + + Returns the log of the project's outbound VPN connection as plain text. Use it to diagnose a connection that will not come up. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_network_log_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_project_network_log_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Get project network log + + Returns the log of the project's outbound VPN connection as plain text. Use it to diagnose a connection that will not come up. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_network_log_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_project_network_log_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get project network log + + Returns the log of the project's outbound VPN connection as plain text. Use it to diagnose a connection that will not come up. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_network_log_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_project_network_log_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/projects/{projectId}/network/log', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_project_network_status( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkStatus: + """Get project network status + + Returns the state of the project's outbound VPN connection (the connection set in `settings.connection`), such as whether it is connected, and error details if it is not. Use it to check that device traffic is flowing through your VPN. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_network_status_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkStatus", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_project_network_status_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkStatus]: + """Get project network status + + Returns the state of the project's outbound VPN connection (the connection set in `settings.connection`), such as whether it is connected, and error details if it is not. Use it to check that device traffic is flowing through your VPN. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_network_status_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkStatus", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_project_network_status_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get project network status + + Returns the state of the project's outbound VPN connection (the connection set in `settings.connection`), such as whether it is connected, and error details if it is not. Use it to check that device traffic is flowing through your VPN. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_network_status_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkStatus", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_project_network_status_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/projects/{projectId}/network/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_project_vpn_config( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + format: Annotated[StrictStr, Field(description="VPN configuration format: 'ovpn' for an OpenVPN profile; any other value returns a Tunnelblick zip.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Get project VPN configuration + + Downloads a VPN configuration that lets your computer join the project's device network, so you can reach the devices directly (for example by SSH or a local debugger). Set `format` to 'ovpn' to get an OpenVPN profile to import into any OpenVPN client. Any other value returns a zip for the Tunnelblick client on macOS. Returns 400 if the project does not have a VPN endpoint yet. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param format: VPN configuration format: 'ovpn' for an OpenVPN profile; any other value returns a Tunnelblick zip. (required) + :type format: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_vpn_config_serialize( + project_id=project_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_project_vpn_config_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + format: Annotated[StrictStr, Field(description="VPN configuration format: 'ovpn' for an OpenVPN profile; any other value returns a Tunnelblick zip.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Get project VPN configuration + + Downloads a VPN configuration that lets your computer join the project's device network, so you can reach the devices directly (for example by SSH or a local debugger). Set `format` to 'ovpn' to get an OpenVPN profile to import into any OpenVPN client. Any other value returns a zip for the Tunnelblick client on macOS. Returns 400 if the project does not have a VPN endpoint yet. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param format: VPN configuration format: 'ovpn' for an OpenVPN profile; any other value returns a Tunnelblick zip. (required) + :type format: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_vpn_config_serialize( + project_id=project_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_project_vpn_config_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + format: Annotated[StrictStr, Field(description="VPN configuration format: 'ovpn' for an OpenVPN profile; any other value returns a Tunnelblick zip.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get project VPN configuration + + Downloads a VPN configuration that lets your computer join the project's device network, so you can reach the devices directly (for example by SSH or a local debugger). Set `format` to 'ovpn' to get an OpenVPN profile to import into any OpenVPN client. Any other value returns a zip for the Tunnelblick client on macOS. Returns 400 if the project does not have a VPN endpoint yet. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param format: VPN configuration format: 'ovpn' for an OpenVPN profile; any other value returns a Tunnelblick zip. (required) + :type format: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_project_vpn_config_serialize( + project_id=project_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_project_vpn_config_serialize( + self, + project_id, + format, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if format is not None: + _path_params['format'] = format + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/x-openvpn-profile', + 'application/zip', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/projects/{projectId}/vpnconfig/{format}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_project_instances( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact instance name.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectInstanceList: + """List project instances + + Lists the devices (instances) in a project, with their ID, name and current state. Results are paginated with `limit` and `offset`; use `name` to find a device by its exact name. For full device details, call `GET /v3/instances/{instanceId}`. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by exact instance name. + :type name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_project_instances_serialize( + project_id=project_id, + limit=limit, + offset=offset, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectInstanceList", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_project_instances_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact instance name.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectInstanceList]: + """List project instances + + Lists the devices (instances) in a project, with their ID, name and current state. Results are paginated with `limit` and `offset`; use `name` to find a device by its exact name. For full device details, call `GET /v3/instances/{instanceId}`. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by exact instance name. + :type name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_project_instances_serialize( + project_id=project_id, + limit=limit, + offset=offset, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectInstanceList", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_project_instances_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact instance name.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List project instances + + Lists the devices (instances) in a project, with their ID, name and current state. Results are paginated with `limit` and `offset`; use `name` to find a device by its exact name. For full device details, call `GET /v3/instances/{instanceId}`. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by exact instance name. + :type name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_project_instances_serialize( + project_id=project_id, + limit=limit, + offset=offset, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectInstanceList", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_project_instances_serialize( + self, + project_id, + limit, + offset, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if name is not None: + + _query_params.append(('name', name)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/projects/{projectId}/instances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_project_keys( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectKeyList: + """List project keys + + Lists the public keys authorized on this project. Keys let you connect to the project's devices over SSH, or to Android devices over ADB, without a password. Returns 403 if your deployment is not licensed for key pairing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_project_keys_serialize( + project_id=project_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectKeyList", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_project_keys_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectKeyList]: + """List project keys + + Lists the public keys authorized on this project. Keys let you connect to the project's devices over SSH, or to Android devices over ADB, without a password. Returns 403 if your deployment is not licensed for key pairing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_project_keys_serialize( + project_id=project_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectKeyList", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_project_keys_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List project keys + + Lists the public keys authorized on this project. Keys let you connect to the project's devices over SSH, or to Android devices over ADB, without a password. Returns 403 if your deployment is not licensed for key pairing. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_project_keys_serialize( + project_id=project_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectKeyList", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_project_keys_serialize( + self, + project_id, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/projects/{projectId}/keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_projects( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact project name (case-insensitive).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectList: + """List projects + + Lists the projects you can access. A project is a workspace that holds devices (instances), the files uploaded for them, and a share of your domain's resources (CPU cores, memory and device count). Almost every other call needs a project ID, so this is usually the first call after you sign in. Results are paginated with `limit` and `offset`. Use `name` to find one project by its exact name (not case-sensitive). Each entry includes its quotas, current usage, and the number of authorized keys. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by exact project name (case-insensitive). + :type name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_projects_serialize( + limit=limit, + offset=offset, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectList", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_projects_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact project name (case-insensitive).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectList]: + """List projects + + Lists the projects you can access. A project is a workspace that holds devices (instances), the files uploaded for them, and a share of your domain's resources (CPU cores, memory and device count). Almost every other call needs a project ID, so this is usually the first call after you sign in. Results are paginated with `limit` and `offset`. Use `name` to find one project by its exact name (not case-sensitive). Each entry includes its quotas, current usage, and the number of authorized keys. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by exact project name (case-insensitive). + :type name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_projects_serialize( + limit=limit, + offset=offset, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectList", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_projects_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by exact project name (case-insensitive).")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List projects + + Lists the projects you can access. A project is a workspace that holds devices (instances), the files uploaded for them, and a share of your domain's resources (CPU cores, memory and device count). Almost every other call needs a project ID, so this is usually the first call after you sign in. Results are paginated with `limit` and `offset`. Use `name` to find one project by its exact name (not case-sensitive). Each entry includes its quotas, current usage, and the number of authorized keys. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param name: Filter by exact project name (case-insensitive). + :type name: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_projects_serialize( + limit=limit, + offset=offset, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectList", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_projects_serialize( + self, + limit, + offset, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if name is not None: + + _query_params.append(('name', name)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/projects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_project( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + patch_project_body: Annotated[PatchProjectBody, Field(description="Fields to update.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Project: + """Update a project + + Changes a project's name, settings or quotas. Send only the fields you want to change. - `settings` is merged into the existing settings: fields you leave out keep their current values. - `quotas` follows the same rules as on create: `cores` is required, `instances` is derived when omitted, and memory is always calculated from cores. - Changing the network connection (`settings.connection`) is refused with 400 while any device in the project is running. Stop the devices first. Returns the updated project. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param patch_project_body: Fields to update. (required) + :type patch_project_body: PatchProjectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_project_serialize( + project_id=project_id, + patch_project_body=patch_project_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Project", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + patch_project_body: Annotated[PatchProjectBody, Field(description="Fields to update.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Project]: + """Update a project + + Changes a project's name, settings or quotas. Send only the fields you want to change. - `settings` is merged into the existing settings: fields you leave out keep their current values. - `quotas` follows the same rules as on create: `cores` is required, `instances` is derived when omitted, and memory is always calculated from cores. - Changing the network connection (`settings.connection`) is refused with 400 while any device in the project is running. Stop the devices first. Returns the updated project. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param patch_project_body: Fields to update. (required) + :type patch_project_body: PatchProjectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_project_serialize( + project_id=project_id, + patch_project_body=patch_project_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Project", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + patch_project_body: Annotated[PatchProjectBody, Field(description="Fields to update.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a project + + Changes a project's name, settings or quotas. Send only the fields you want to change. - `settings` is merged into the existing settings: fields you leave out keep their current values. - `quotas` follows the same rules as on create: `cores` is required, `instances` is derived when omitted, and memory is always calculated from cores. - Changing the network connection (`settings.connection`) is refused with 400 while any device in the project is running. Stop the devices first. Returns the updated project. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param patch_project_body: Fields to update. (required) + :type patch_project_body: PatchProjectBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_project_serialize( + project_id=project_id, + patch_project_body=patch_project_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Project", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_project_serialize( + self, + project_id, + patch_project_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_project_body is not None: + _body_params = patch_project_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/projects/{projectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_preauth_vpn_config( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + filename: Annotated[StrictStr, Field(description="VPN configuration filename, as '.'. The client identifier becomes the common name of the issued client certificate; a format of 'ovpn' yields an OpenVPN profile and any other value yields a Tunnelblick zip.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VpnConfigPreauthorization: + """Pre-authorize a VPN configuration download + + Pre-authorize a VPN configuration download. Returns a short-lived signed token that authorizes the download without an Authorization header, so it can be embedded in a plain download URL: GET /v1/preauthed-vpn-configs/{token}/{filename}. The token carries the client identifier and the format, and expires with the calling session token. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param filename: VPN configuration filename, as '.'. The client identifier becomes the common name of the issued client certificate; a format of 'ovpn' yields an OpenVPN profile and any other value yields a Tunnelblick zip. (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauth_vpn_config_serialize( + project_id=project_id, + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VpnConfigPreauthorization", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_preauth_vpn_config_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + filename: Annotated[StrictStr, Field(description="VPN configuration filename, as '.'. The client identifier becomes the common name of the issued client certificate; a format of 'ovpn' yields an OpenVPN profile and any other value yields a Tunnelblick zip.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VpnConfigPreauthorization]: + """Pre-authorize a VPN configuration download + + Pre-authorize a VPN configuration download. Returns a short-lived signed token that authorizes the download without an Authorization header, so it can be embedded in a plain download URL: GET /v1/preauthed-vpn-configs/{token}/{filename}. The token carries the client identifier and the format, and expires with the calling session token. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param filename: VPN configuration filename, as '.'. The client identifier becomes the common name of the issued client certificate; a format of 'ovpn' yields an OpenVPN profile and any other value yields a Tunnelblick zip. (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauth_vpn_config_serialize( + project_id=project_id, + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VpnConfigPreauthorization", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_preauth_vpn_config_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + filename: Annotated[StrictStr, Field(description="VPN configuration filename, as '.'. The client identifier becomes the common name of the issued client certificate; a format of 'ovpn' yields an OpenVPN profile and any other value yields a Tunnelblick zip.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Pre-authorize a VPN configuration download + + Pre-authorize a VPN configuration download. Returns a short-lived signed token that authorizes the download without an Authorization header, so it can be embedded in a plain download URL: GET /v1/preauthed-vpn-configs/{token}/{filename}. The token carries the client identifier and the format, and expires with the calling session token. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param filename: VPN configuration filename, as '.'. The client identifier becomes the common name of the issued client certificate; a format of 'ovpn' yields an OpenVPN profile and any other value yields a Tunnelblick zip. (required) + :type filename: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_preauth_vpn_config_serialize( + project_id=project_id, + filename=filename, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VpnConfigPreauthorization", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_preauth_vpn_config_serialize( + self, + project_id, + filename, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if filename is not None: + _path_params['filename'] = filename + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/projects/{projectId}/preauth-vpn-config/{filename}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_put_project_image_upload( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, Optional[object]]: + """Upload image chunk + + Uploads one chunk of a file into this project, using the same resumable protocol as `PUT /v3/images/{imageId}/file`. The difference is that you choose the image ID yourself (a new random UUID) and the image record is created automatically when the first chunk arrives, so no `POST /v3/images` call is needed. The `type` and `name` in the path set the image type and name. The image belongs to the project and is deleted with it. The web interface uses this route when uploading firmware while creating a device. For your own code, `POST /v3/images` followed by `PUT /v3/images/{imageId}/file` is easier to follow. Returns 200 with an empty object for each stored chunk. If an upload fails for a reason other than a network error, the partial image is deleted. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_project_image_upload_serialize( + project_id=project_id, + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_put_project_image_upload_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, Optional[object]]]: + """Upload image chunk + + Uploads one chunk of a file into this project, using the same resumable protocol as `PUT /v3/images/{imageId}/file`. The difference is that you choose the image ID yourself (a new random UUID) and the image record is created automatically when the first chunk arrives, so no `POST /v3/images` call is needed. The `type` and `name` in the path set the image type and name. The image belongs to the project and is deleted with it. The web interface uses this route when uploading firmware while creating a device. For your own code, `POST /v3/images` followed by `PUT /v3/images/{imageId}/file` is easier to follow. Returns 200 with an empty object for each stored chunk. If an upload fails for a reason other than a network error, the partial image is deleted. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_project_image_upload_serialize( + project_id=project_id, + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_put_project_image_upload_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created.")], + type: Annotated[StrictStr, Field(description="What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403.")], + image_id: Annotated[StrictStr, Field(description="An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload.")], + name: Annotated[StrictStr, Field(description="The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`.")], + body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + resumable_chunk_number: Annotated[Optional[StrictInt], Field(description="Which chunk this is, counting from 1.")] = None, + resumable_chunk_size: Annotated[Optional[StrictInt], Field(description="The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it.")] = None, + resumable_current_chunk_size: Annotated[Optional[StrictInt], Field(description="Actual size in bytes of this chunk's body.")] = None, + resumable_total_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes.")] = None, + resumable_total_chunks: Annotated[Optional[StrictInt], Field(description="How many chunks the whole file is split into. The upload completes when the last one arrives.")] = None, + corellium_checksum: Annotated[Optional[StrictStr], Field(description="Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments.")] = None, + flavor: Annotated[Optional[StrictStr], Field(description="Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model.")] = None, + x_corellium_image_encoding: Annotated[Optional[StrictStr], Field(description="How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it.")] = None, + x_corellium_image_encapsulated: Annotated[Optional[StrictBool], Field(description="Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created.")] = None, + x_corellium_total_file_size: Annotated[Optional[StrictInt], Field(description="Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data.")] = None, + x_corellium_image_password: Annotated[Optional[StrictStr], Field(description="Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload image chunk + + Uploads one chunk of a file into this project, using the same resumable protocol as `PUT /v3/images/{imageId}/file`. The difference is that you choose the image ID yourself (a new random UUID) and the image record is created automatically when the first chunk arrives, so no `POST /v3/images` call is needed. The `type` and `name` in the path set the image type and name. The image belongs to the project and is deleted with it. The web interface uses this route when uploading firmware while creating a device. For your own code, `POST /v3/images` followed by `PUT /v3/images/{imageId}/file` is easier to follow. Returns 200 with an empty object for each stored chunk. If an upload fails for a reason other than a network error, the partial image is deleted. + + :param project_id: ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. (required) + :type project_id: str + :param type: What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. (required) + :type type: str + :param image_id: An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. (required) + :type image_id: str + :param name: The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. (required) + :type name: str + :param body: (required) + :type body: bytearray + :param resumable_chunk_number: Which chunk this is, counting from 1. + :type resumable_chunk_number: float + :param resumable_chunk_size: The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. + :type resumable_chunk_size: float + :param resumable_current_chunk_size: Actual size in bytes of this chunk's body. + :type resumable_current_chunk_size: float + :param resumable_total_size: Size of the whole file in bytes. + :type resumable_total_size: float + :param resumable_total_chunks: How many chunks the whole file is split into. The upload completes when the last one arrives. + :type resumable_total_chunks: float + :param corellium_checksum: Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. + :type corellium_checksum: str + :param flavor: Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. + :type flavor: str + :param x_corellium_image_encoding: How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. + :type x_corellium_image_encoding: str + :param x_corellium_image_encapsulated: Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. + :type x_corellium_image_encapsulated: bool + :param x_corellium_total_file_size: Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. + :type x_corellium_total_file_size: float + :param x_corellium_image_password: Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. + :type x_corellium_image_password: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_put_project_image_upload_serialize( + project_id=project_id, + type=type, + image_id=image_id, + name=name, + body=body, + resumable_chunk_number=resumable_chunk_number, + resumable_chunk_size=resumable_chunk_size, + resumable_current_chunk_size=resumable_current_chunk_size, + resumable_total_size=resumable_total_size, + resumable_total_chunks=resumable_total_chunks, + corellium_checksum=corellium_checksum, + flavor=flavor, + x_corellium_image_encoding=x_corellium_image_encoding, + x_corellium_image_encapsulated=x_corellium_image_encapsulated, + x_corellium_total_file_size=x_corellium_total_file_size, + x_corellium_image_password=x_corellium_image_password, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '507': "InsufficientStorageError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_put_project_image_upload_serialize( + self, + project_id, + type, + image_id, + name, + body, + resumable_chunk_number, + resumable_chunk_size, + resumable_current_chunk_size, + resumable_total_size, + resumable_total_chunks, + corellium_checksum, + flavor, + x_corellium_image_encoding, + x_corellium_image_encapsulated, + x_corellium_total_file_size, + x_corellium_image_password, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if type is not None: + _path_params['type'] = type + if image_id is not None: + _path_params['imageId'] = image_id + if name is not None: + _path_params['name'] = name + # process the query parameters + if resumable_chunk_number is not None: + + _query_params.append(('resumableChunkNumber', resumable_chunk_number)) + + if resumable_chunk_size is not None: + + _query_params.append(('resumableChunkSize', resumable_chunk_size)) + + if resumable_current_chunk_size is not None: + + _query_params.append(('resumableCurrentChunkSize', resumable_current_chunk_size)) + + if resumable_total_size is not None: + + _query_params.append(('resumableTotalSize', resumable_total_size)) + + if resumable_total_chunks is not None: + + _query_params.append(('resumableTotalChunks', resumable_total_chunks)) + + if corellium_checksum is not None: + + _query_params.append(('corelliumChecksum', corellium_checksum)) + + if flavor is not None: + + _query_params.append(('flavor', flavor)) + + # process the header parameters + if x_corellium_image_encoding is not None: + _header_params['x-corellium-image-encoding'] = x_corellium_image_encoding + if x_corellium_image_encapsulated is not None: + _header_params['x-corellium-image-encapsulated'] = x_corellium_image_encapsulated + if x_corellium_total_file_size is not None: + _header_params['x-corellium-total-file-size'] = x_corellium_total_file_size + if x_corellium_image_password is not None: + _header_params['x-corellium-image-password'] = x_corellium_image_password + # process the form parameters + # process the body parameter + if body is not None: + # convert to byte array if the input is a file name (str) + if isinstance(body, str): + with open(body, "rb") as _fp: + _body_params = _fp.read() + elif isinstance(body, tuple): + # drop the filename from the tuple + _body_params = body[1] + else: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/octet-stream' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/projects/{projectId}/image-upload/{type}/{imageId}/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/projects_v1_api.py b/corellium/api/projects_v1_api.py new file mode 100644 index 0000000..36eb77b --- /dev/null +++ b/corellium/api/projects_v1_api.py @@ -0,0 +1,4267 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated +from corellium.models.instance_v1 import InstanceV1 +from corellium.models.network_status_response import NetworkStatusResponse +from corellium.models.project_key_v1 import ProjectKeyV1 +from corellium.models.project_settings_v1 import ProjectSettingsV1 +from corellium.models.project_v1 import ProjectV1 +from corellium.models.project_with_keys_v1 import ProjectWithKeysV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class ProjectsV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_add_project_key( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_key_v1: Annotated[ProjectKeyV1, Field(description="Key to add")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectKeyV1: + """(Deprecated) Add Project Authorized Key + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_key_v1: Key to add (required) + :type project_key_v1: ProjectKeyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/projects/{projectId}/keys is deprecated.", DeprecationWarning) + + _param = self._v1_add_project_key_serialize( + project_id=project_id, + project_key_v1=project_key_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectKeyV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_add_project_key_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_key_v1: Annotated[ProjectKeyV1, Field(description="Key to add")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectKeyV1]: + """(Deprecated) Add Project Authorized Key + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_key_v1: Key to add (required) + :type project_key_v1: ProjectKeyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/projects/{projectId}/keys is deprecated.", DeprecationWarning) + + _param = self._v1_add_project_key_serialize( + project_id=project_id, + project_key_v1=project_key_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectKeyV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_add_project_key_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_key_v1: Annotated[ProjectKeyV1, Field(description="Key to add")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Add Project Authorized Key + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_key_v1: Key to add (required) + :type project_key_v1: ProjectKeyV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/projects/{projectId}/keys is deprecated.", DeprecationWarning) + + _param = self._v1_add_project_key_serialize( + project_id=project_id, + project_key_v1=project_key_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectKeyV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_add_project_key_serialize( + self, + project_id, + project_key_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if project_key_v1 is not None: + _body_params = project_key_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/projects/{projectId}/keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_create_project( + self, + project_v1: Annotated[ProjectV1, Field(description="Project")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectV1: + """(Deprecated) Create a Project + + + :param project_v1: Project (required) + :type project_v1: ProjectV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/projects is deprecated.", DeprecationWarning) + + _param = self._v1_create_project_serialize( + project_v1=project_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_project_with_http_info( + self, + project_v1: Annotated[ProjectV1, Field(description="Project")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectV1]: + """(Deprecated) Create a Project + + + :param project_v1: Project (required) + :type project_v1: ProjectV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/projects is deprecated.", DeprecationWarning) + + _param = self._v1_create_project_serialize( + project_v1=project_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_project_without_preload_content( + self, + project_v1: Annotated[ProjectV1, Field(description="Project")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create a Project + + + :param project_v1: Project (required) + :type project_v1: ProjectV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/projects is deprecated.", DeprecationWarning) + + _param = self._v1_create_project_serialize( + project_v1=project_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_project_serialize( + self, + project_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if project_v1 is not None: + _body_params = project_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/projects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_project( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_project_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/projects/{projectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_project( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectWithKeysV1: + """(Deprecated) Get a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectWithKeysV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectWithKeysV1]: + """(Deprecated) Get a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectWithKeysV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectWithKeysV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_project_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_project_instances( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + name: Annotated[Optional[StrictStr], Field(description="Filter by project name")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[InstanceV1]: + """(Deprecated) Get Instances in Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param name: Filter by project name + :type name: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/instances is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_instances_serialize( + project_id=project_id, + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InstanceV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_project_instances_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + name: Annotated[Optional[StrictStr], Field(description="Filter by project name")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[InstanceV1]]: + """(Deprecated) Get Instances in Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param name: Filter by project name + :type name: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/instances is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_instances_serialize( + project_id=project_id, + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InstanceV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_project_instances_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + name: Annotated[Optional[StrictStr], Field(description="Filter by project name")] = None, + return_attr: Annotated[Optional[List[StrictStr]], Field(description="Attributes to include in instance return")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Instances in Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param name: Filter by project name + :type name: str + :param return_attr: Attributes to include in instance return + :type return_attr: List[str] + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/instances is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_instances_serialize( + project_id=project_id, + name=name, + return_attr=return_attr, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[InstanceV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_project_instances_serialize( + self, + project_id, + name, + return_attr, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'returnAttr': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + if name is not None: + + _query_params.append(('name', name)) + + if return_attr is not None: + + _query_params.append(('returnAttr', return_attr)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectId}/instances', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_project_keys( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ProjectKeyV1]: + """(Deprecated) Get Project Authorized Keys + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/keys is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_keys_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProjectKeyV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_project_keys_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ProjectKeyV1]]: + """(Deprecated) Get Project Authorized Keys + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/keys is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_keys_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProjectKeyV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_project_keys_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Project Authorized Keys + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/keys is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_keys_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProjectKeyV1]", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_project_keys_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectId}/keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_project_network_log( + self, + project_id: Annotated[StrictStr, Field(description="Project ID (must be a valid UUID)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """(Deprecated) Retrieve the network connection log for a project + + + :param project_id: Project ID (must be a valid UUID) (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/network/log is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_network_log_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + '503': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_project_network_log_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID (must be a valid UUID)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """(Deprecated) Retrieve the network connection log for a project + + + :param project_id: Project ID (must be a valid UUID) (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/network/log is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_network_log_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + '503': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_project_network_log_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID (must be a valid UUID)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Retrieve the network connection log for a project + + + :param project_id: Project ID (must be a valid UUID) (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/network/log is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_network_log_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + '503': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_project_network_log_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectId}/network/log', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_project_network_status( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NetworkStatusResponse: + """(Deprecated) Retrieve the network connection status for a project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/network/status is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_network_status_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkStatusResponse", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_project_network_status_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NetworkStatusResponse]: + """(Deprecated) Retrieve the network connection status for a project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/network/status is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_network_status_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkStatusResponse", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_project_network_status_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Retrieve the network connection status for a project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/network/status is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_network_status_serialize( + project_id=project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "NetworkStatusResponse", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_project_network_status_serialize( + self, + project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectId}/network/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_project_vpn_config( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + format: Annotated[StrictStr, Field(description="VPN Config format")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """(Deprecated) Get Project VPN Configuration + + A Project VPN allows connection _into_ virtual devices in the project (e.g., connecting a researcher's computer as a VPN client to a virtual device within the project). If a Project VPN has been defined, this will return the configuration. + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param format: VPN Config format (required) + :type format: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/vpnconfig/{format} is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_vpn_config_serialize( + project_id=project_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_project_vpn_config_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + format: Annotated[StrictStr, Field(description="VPN Config format")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """(Deprecated) Get Project VPN Configuration + + A Project VPN allows connection _into_ virtual devices in the project (e.g., connecting a researcher's computer as a VPN client to a virtual device within the project). If a Project VPN has been defined, this will return the configuration. + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param format: VPN Config format (required) + :type format: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/vpnconfig/{format} is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_vpn_config_serialize( + project_id=project_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_project_vpn_config_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + format: Annotated[StrictStr, Field(description="VPN Config format")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Project VPN Configuration + + A Project VPN allows connection _into_ virtual devices in the project (e.g., connecting a researcher's computer as a VPN client to a virtual device within the project). If a Project VPN has been defined, this will return the configuration. + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param format: VPN Config format (required) + :type format: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects/{projectId}/vpnconfig/{format} is deprecated.", DeprecationWarning) + + _param = self._v1_get_project_vpn_config_serialize( + project_id=project_id, + format=format, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_project_vpn_config_serialize( + self, + project_id, + format, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if format is not None: + _path_params['format'] = format + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects/{projectId}/vpnconfig/{format}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_projects( + self, + name: Annotated[Optional[StrictStr], Field(description="Filter by project name")] = None, + ids_only: Annotated[Optional[StrictBool], Field(description="Only include id of project in results")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ProjectWithKeysV1]: + """(Deprecated) Get Projects + + + :param name: Filter by project name + :type name: str + :param ids_only: Only include id of project in results + :type ids_only: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects is deprecated.", DeprecationWarning) + + _param = self._v1_get_projects_serialize( + name=name, + ids_only=ids_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProjectWithKeysV1]", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_projects_with_http_info( + self, + name: Annotated[Optional[StrictStr], Field(description="Filter by project name")] = None, + ids_only: Annotated[Optional[StrictBool], Field(description="Only include id of project in results")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ProjectWithKeysV1]]: + """(Deprecated) Get Projects + + + :param name: Filter by project name + :type name: str + :param ids_only: Only include id of project in results + :type ids_only: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects is deprecated.", DeprecationWarning) + + _param = self._v1_get_projects_serialize( + name=name, + ids_only=ids_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProjectWithKeysV1]", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_projects_without_preload_content( + self, + name: Annotated[Optional[StrictStr], Field(description="Filter by project name")] = None, + ids_only: Annotated[Optional[StrictBool], Field(description="Only include id of project in results")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Projects + + + :param name: Filter by project name + :type name: str + :param ids_only: Only include id of project in results + :type ids_only: bool + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/projects is deprecated.", DeprecationWarning) + + _param = self._v1_get_projects_serialize( + name=name, + ids_only=ids_only, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ProjectWithKeysV1]", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_projects_serialize( + self, + name, + ids_only, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if name is not None: + + _query_params.append(('name', name)) + + if ids_only is not None: + + _query_params.append(('ids_only', ids_only)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/projects', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_remove_project_key( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + key_id: Annotated[StrictStr, Field(description="Key ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete Project Authorized Key + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param key_id: Key ID - uuid (required) + :type key_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId}/keys/{keyId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_project_key_serialize( + project_id=project_id, + key_id=key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_remove_project_key_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + key_id: Annotated[StrictStr, Field(description="Key ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete Project Authorized Key + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param key_id: Key ID - uuid (required) + :type key_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId}/keys/{keyId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_project_key_serialize( + project_id=project_id, + key_id=key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_remove_project_key_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + key_id: Annotated[StrictStr, Field(description="Key ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete Project Authorized Key + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param key_id: Key ID - uuid (required) + :type key_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/projects/{projectId}/keys/{keyId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_project_key_serialize( + project_id=project_id, + key_id=key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_remove_project_key_serialize( + self, + project_id, + key_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if key_id is not None: + _path_params['keyId'] = key_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/projects/{projectId}/keys/{keyId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_project( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_v1: Annotated[ProjectV1, Field(description="Updated Project Settings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectV1: + """(Deprecated) Update a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_v1: Updated Project Settings (required) + :type project_v1: ProjectV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_project_serialize( + project_id=project_id, + project_v1=project_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_v1: Annotated[ProjectV1, Field(description="Updated Project Settings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectV1]: + """(Deprecated) Update a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_v1: Updated Project Settings (required) + :type project_v1: ProjectV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_project_serialize( + project_id=project_id, + project_v1=project_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_v1: Annotated[ProjectV1, Field(description="Updated Project Settings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update a Project + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_v1: Updated Project Settings (required) + :type project_v1: ProjectV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/projects/{projectId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_project_serialize( + project_id=project_id, + project_v1=project_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_project_serialize( + self, + project_id, + project_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if project_v1 is not None: + _body_params = project_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/projects/{projectId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_project_settings( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_settings_v1: Annotated[ProjectSettingsV1, Field(description="New settings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Change Project Settings + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_settings_v1: New settings (required) + :type project_settings_v1: ProjectSettingsV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/projects/{projectId}/settings is deprecated.", DeprecationWarning) + + _param = self._v1_update_project_settings_serialize( + project_id=project_id, + project_settings_v1=project_settings_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_project_settings_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_settings_v1: Annotated[ProjectSettingsV1, Field(description="New settings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Change Project Settings + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_settings_v1: New settings (required) + :type project_settings_v1: ProjectSettingsV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/projects/{projectId}/settings is deprecated.", DeprecationWarning) + + _param = self._v1_update_project_settings_serialize( + project_id=project_id, + project_settings_v1=project_settings_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_project_settings_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + project_settings_v1: Annotated[ProjectSettingsV1, Field(description="New settings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Change Project Settings + + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param project_settings_v1: New settings (required) + :type project_settings_v1: ProjectSettingsV1 + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/projects/{projectId}/settings is deprecated.", DeprecationWarning) + + _param = self._v1_update_project_settings_serialize( + project_id=project_id, + project_settings_v1=project_settings_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_project_settings_serialize( + self, + project_id, + project_settings_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if project_settings_v1 is not None: + _body_params = project_settings_v1 + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/projects/{projectId}/settings', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/ram_dump_api.py b/corellium/api/ram_dump_api.py new file mode 100644 index 0000000..040ab53 --- /dev/null +++ b/corellium/api/ram_dump_api.py @@ -0,0 +1,987 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from corellium.models.token import Token + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class RAMDumpApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_clear_ram_dump( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a RAM dump + + Deletes this device's RAM dump file. Returns 204 whether or not a dump existed. Requires the RAM dump license feature. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_clear_ram_dump_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a RAM dump + + Deletes this device's RAM dump file. Returns 204 whether or not a dump existed. Requires the RAM dump license feature. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_clear_ram_dump_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a RAM dump + + Deletes this device's RAM dump file. Returns 204 whether or not a dump existed. Requires the RAM dump license feature. An unknown `instanceId` is a successful no-op that returns 204. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_clear_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_clear_ram_dump_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}/ramdump', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_ram_dump_preauthorize( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Token: + """Get a RAM dump download token + + Returns a short-lived token that authorizes downloading this device's RAM dump without an `Authorization` header, so you can hand the link to a download manager or browser. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's RAM dump and expires when your current session token expires. Requires the RAM dump license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_ram_dump_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_ram_dump_preauthorize_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Token]: + """Get a RAM dump download token + + Returns a short-lived token that authorizes downloading this device's RAM dump without an `Authorization` header, so you can hand the link to a download manager or browser. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's RAM dump and expires when your current session token expires. Requires the RAM dump license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_ram_dump_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_ram_dump_preauthorize_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a RAM dump download token + + Returns a short-lived token that authorizes downloading this device's RAM dump without an `Authorization` header, so you can hand the link to a download manager or browser. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's RAM dump and expires when your current session token expires. Requires the RAM dump license feature. + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_ram_dump_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Token", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_ram_dump_preauthorize_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/ramdump-authorize', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_start_ram_dump( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Start a RAM dump + + Captures the full contents of the device's memory to a file, for offline analysis with memory forensics tools. Returns 202 as soon as the dump has started; it is written in the background, and large memory sizes take a while. Download it with `v3RamDumpPreauthorize` when it is done, and delete it with `v3ClearRamDump`. Requires the RAM dump license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_start_ram_dump_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Start a RAM dump + + Captures the full contents of the device's memory to a file, for offline analysis with memory forensics tools. Returns 202 as soon as the dump has started; it is written in the background, and large memory sizes take a while. Download it with `v3RamDumpPreauthorize` when it is done, and delete it with `v3ClearRamDump`. Requires the RAM dump license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_start_ram_dump_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Start a RAM dump + + Captures the full contents of the device's memory to a file, for offline analysis with memory forensics tools. Returns 202 as soon as the dump has started; it is written in the background, and large memory sizes take a while. Download it with `v3RamDumpPreauthorize` when it is done, and delete it with `v3ClearRamDump`. Requires the RAM dump license feature (403 otherwise). + + :param instance_id: Instance ID. (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_start_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '409': "ApiConflictError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_start_ram_dump_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/ramdump/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/ram_dump_v1_api.py b/corellium/api/ram_dump_v1_api.py new file mode 100644 index 0000000..5b8a2ca --- /dev/null +++ b/corellium/api/ram_dump_v1_api.py @@ -0,0 +1,978 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from corellium.models.token_v1 import TokenV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class RAMDumpV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_clear_ram_dump( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Clear RAM Dump + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/ramdump is deprecated.", DeprecationWarning) + + _param = self._v1_clear_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_clear_ram_dump_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Clear RAM Dump + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/ramdump is deprecated.", DeprecationWarning) + + _param = self._v1_clear_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_clear_ram_dump_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Clear RAM Dump + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/ramdump is deprecated.", DeprecationWarning) + + _param = self._v1_clear_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_clear_ram_dump_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}/ramdump', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_ram_dump_preauthorize( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TokenV1: + """(Deprecated) Pre-authorize a RAM Dump download + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/ramdump-authorize is deprecated.", DeprecationWarning) + + _param = self._v1_ram_dump_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_ram_dump_preauthorize_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TokenV1]: + """(Deprecated) Pre-authorize a RAM Dump download + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/ramdump-authorize is deprecated.", DeprecationWarning) + + _param = self._v1_ram_dump_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_ram_dump_preauthorize_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Pre-authorize a RAM Dump download + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/ramdump-authorize is deprecated.", DeprecationWarning) + + _param = self._v1_ram_dump_preauthorize_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_ram_dump_preauthorize_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/ramdump-authorize', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_start_ram_dump( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Start a RAM Dump on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/ramdump/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '409': "ApiConflictErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_start_ram_dump_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Start a RAM Dump on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/ramdump/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '409': "ApiConflictErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_start_ram_dump_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Start a RAM Dump on an instance + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/ramdump/start is deprecated.", DeprecationWarning) + + _param = self._v1_start_ram_dump_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + '409': "ApiConflictErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_start_ram_dump_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/ramdump/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/roles_api.py b/corellium/api/roles_api.py new file mode 100644 index 0000000..01e1e00 --- /dev/null +++ b/corellium/api/roles_api.py @@ -0,0 +1,3450 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from corellium.models.roles_list_response import RolesListResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class RolesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_add_team_role_to_deployment( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Add team role to deployment + + **Required role:** Domain administrator. Grants a team a role within a deployment. Available for Enterprise accounts only. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_team_role_to_deployment_serialize( + deployment_id=deployment_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_add_team_role_to_deployment_with_http_info( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add team role to deployment + + **Required role:** Domain administrator. Grants a team a role within a deployment. Available for Enterprise accounts only. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_team_role_to_deployment_serialize( + deployment_id=deployment_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_add_team_role_to_deployment_without_preload_content( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add team role to deployment + + **Required role:** Domain administrator. Grants a team a role within a deployment. Available for Enterprise accounts only. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_team_role_to_deployment_serialize( + deployment_id=deployment_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_add_team_role_to_deployment_serialize( + self, + deployment_id, + team_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deploymentId'] = deployment_id + if team_id is not None: + _path_params['teamId'] = team_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/roles/deployments/{deploymentId}/teams/{teamId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_add_team_role_to_project( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + team_id: Annotated[StrictStr, Field(description="Team ID from `GET /v3/teams`, or `all-users` to grant the role to everyone in your domain at once.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Add team role to project + + **Required role:** Domain administrator or project administrator. Gives every member of a team a role on a project. Pass `all-users` as `teamId` to give the role to everyone in your domain. People added to the team later get the access automatically. Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. + + :param project_id: Project identifier. (required) + :type project_id: str + :param team_id: Team ID from `GET /v3/teams`, or `all-users` to grant the role to everyone in your domain at once. (required) + :type team_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_team_role_to_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_add_team_role_to_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + team_id: Annotated[StrictStr, Field(description="Team ID from `GET /v3/teams`, or `all-users` to grant the role to everyone in your domain at once.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add team role to project + + **Required role:** Domain administrator or project administrator. Gives every member of a team a role on a project. Pass `all-users` as `teamId` to give the role to everyone in your domain. People added to the team later get the access automatically. Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. + + :param project_id: Project identifier. (required) + :type project_id: str + :param team_id: Team ID from `GET /v3/teams`, or `all-users` to grant the role to everyone in your domain at once. (required) + :type team_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_team_role_to_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_add_team_role_to_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + team_id: Annotated[StrictStr, Field(description="Team ID from `GET /v3/teams`, or `all-users` to grant the role to everyone in your domain at once.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add team role to project + + **Required role:** Domain administrator or project administrator. Gives every member of a team a role on a project. Pass `all-users` as `teamId` to give the role to everyone in your domain. People added to the team later get the access automatically. Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. + + :param project_id: Project identifier. (required) + :type project_id: str + :param team_id: Team ID from `GET /v3/teams`, or `all-users` to grant the role to everyone in your domain at once. (required) + :type team_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_team_role_to_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_add_team_role_to_project_serialize( + self, + project_id, + team_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if team_id is not None: + _path_params['teamId'] = team_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_add_user_role_to_deployment( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Add user role to deployment + + **Required role:** Domain administrator. Grants a user a role within a deployment. Available for Enterprise accounts only. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_role_to_deployment_serialize( + deployment_id=deployment_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_add_user_role_to_deployment_with_http_info( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add user role to deployment + + **Required role:** Domain administrator. Grants a user a role within a deployment. Available for Enterprise accounts only. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_role_to_deployment_serialize( + deployment_id=deployment_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_add_user_role_to_deployment_without_preload_content( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add user role to deployment + + **Required role:** Domain administrator. Grants a user a role within a deployment. Available for Enterprise accounts only. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_role_to_deployment_serialize( + deployment_id=deployment_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_add_user_role_to_deployment_serialize( + self, + deployment_id, + user_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deploymentId'] = deployment_id + if user_id is not None: + _path_params['userId'] = user_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/roles/deployments/{deploymentId}/users/{userId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_add_user_role_to_project( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Add user role to project + + **Required role:** Domain administrator or project administrator. Gives a user a role on a project: `member` to use the project and its devices, or `admin` to also manage it. This is how a new user gets access to a project. Requires a domain administrator, or a project administrator of that project. Returns 404 if the project, user or role does not exist. Available for Enterprise accounts only. + + :param project_id: Project identifier. (required) + :type project_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_role_to_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_add_user_role_to_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add user role to project + + **Required role:** Domain administrator or project administrator. Gives a user a role on a project: `member` to use the project and its devices, or `admin` to also manage it. This is how a new user gets access to a project. Requires a domain administrator, or a project administrator of that project. Returns 404 if the project, user or role does not exist. Available for Enterprise accounts only. + + :param project_id: Project identifier. (required) + :type project_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_role_to_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_add_user_role_to_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add user role to project + + **Required role:** Domain administrator or project administrator. Gives a user a role on a project: `member` to use the project and its devices, or `admin` to also manage it. This is how a new user gets access to a project. Requires a domain administrator, or a project administrator of that project. Returns 404 if the project, user or role does not exist. Available for Enterprise accounts only. + + :param project_id: Project identifier. (required) + :type project_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_role_to_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_add_user_role_to_project_serialize( + self, + project_id, + user_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if user_id is not None: + _path_params['userId'] = user_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/roles/projects/{projectId}/users/{userId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_deployment_roles( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RolesListResponse: + """List deployment role assignments + + **Required role:** Domain administrator or project administrator. Returns paginated role assignments scoped to deployments. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_deployment_roles_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RolesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_deployment_roles_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RolesListResponse]: + """List deployment role assignments + + **Required role:** Domain administrator or project administrator. Returns paginated role assignments scoped to deployments. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_deployment_roles_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RolesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_deployment_roles_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List deployment role assignments + + **Required role:** Domain administrator or project administrator. Returns paginated role assignments scoped to deployments. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_deployment_roles_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RolesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_deployment_roles_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/roles/deployments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_roles( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RolesListResponse: + """List all role assignments for the caller's domain + + **Required role:** Domain administrator or project administrator. Lists who has which role on which project in your domain, for both individual users and teams: each entry names a role and either a `user` or a `team`, plus the `project`. Use it to audit access. Requires a domain or project administrator. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_roles_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RolesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_roles_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RolesListResponse]: + """List all role assignments for the caller's domain + + **Required role:** Domain administrator or project administrator. Lists who has which role on which project in your domain, for both individual users and teams: each entry names a role and either a `user` or a `team`, plus the `project`. Use it to audit access. Requires a domain or project administrator. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_roles_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RolesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_roles_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List all role assignments for the caller's domain + + **Required role:** Domain administrator or project administrator. Lists who has which role on which project in your domain, for both individual users and teams: each entry names a role and either a `user` or a `team`, plus the `project`. Use it to audit access. Requires a domain or project administrator. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_roles_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RolesListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_roles_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/roles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_remove_team_role_from_deployment( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove team role from deployment + + **Required role:** Domain administrator. Revokes a team role within a deployment. Available for Enterprise accounts only. Revocation is idempotent: if the team does not currently hold that role in the deployment, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `deploymentId` or `teamId` that does not exist is also a successful no-op that returns 204. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_team_role_from_deployment_serialize( + deployment_id=deployment_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_remove_team_role_from_deployment_with_http_info( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove team role from deployment + + **Required role:** Domain administrator. Revokes a team role within a deployment. Available for Enterprise accounts only. Revocation is idempotent: if the team does not currently hold that role in the deployment, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `deploymentId` or `teamId` that does not exist is also a successful no-op that returns 204. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_team_role_from_deployment_serialize( + deployment_id=deployment_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_remove_team_role_from_deployment_without_preload_content( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove team role from deployment + + **Required role:** Domain administrator. Revokes a team role within a deployment. Available for Enterprise accounts only. Revocation is idempotent: if the team does not currently hold that role in the deployment, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `deploymentId` or `teamId` that does not exist is also a successful no-op that returns 204. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_team_role_from_deployment_serialize( + deployment_id=deployment_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_remove_team_role_from_deployment_serialize( + self, + deployment_id, + team_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deploymentId'] = deployment_id + if team_id is not None: + _path_params['teamId'] = team_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/roles/deployments/{deploymentId}/teams/{teamId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_remove_team_role_from_project( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove team role from project + + **Required role:** Domain administrator or project administrator. Takes a role on a project away from a team, so its members lose the access they had through it. Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. Revocation is idempotent: if the team does not currently hold that role in the project, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `projectId` or `teamId` that does not exist is also a successful no-op that returns 204. A project administrator acting on another project in their own domain receives 403. An unrecognized `roleId` returns 400. + + :param project_id: Project identifier. (required) + :type project_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_team_role_from_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_remove_team_role_from_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove team role from project + + **Required role:** Domain administrator or project administrator. Takes a role on a project away from a team, so its members lose the access they had through it. Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. Revocation is idempotent: if the team does not currently hold that role in the project, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `projectId` or `teamId` that does not exist is also a successful no-op that returns 204. A project administrator acting on another project in their own domain receives 403. An unrecognized `roleId` returns 400. + + :param project_id: Project identifier. (required) + :type project_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_team_role_from_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_remove_team_role_from_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove team role from project + + **Required role:** Domain administrator or project administrator. Takes a role on a project away from a team, so its members lose the access they had through it. Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. Revocation is idempotent: if the team does not currently hold that role in the project, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `projectId` or `teamId` that does not exist is also a successful no-op that returns 204. A project administrator acting on another project in their own domain receives 403. An unrecognized `roleId` returns 400. + + :param project_id: Project identifier. (required) + :type project_id: str + :param team_id: Team identifier. (required) + :type team_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_team_role_from_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_remove_team_role_from_project_serialize( + self, + project_id, + team_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if team_id is not None: + _path_params['teamId'] = team_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_remove_user_role_from_deployment( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove user role from deployment + + **Required role:** Domain administrator. Revokes a user role within a deployment. Available for Enterprise accounts only. Revocation is idempotent: if the user does not currently hold that role in the deployment, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `deploymentId` or `userId` that does not exist is also a successful no-op that returns 204. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_role_from_deployment_serialize( + deployment_id=deployment_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_remove_user_role_from_deployment_with_http_info( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove user role from deployment + + **Required role:** Domain administrator. Revokes a user role within a deployment. Available for Enterprise accounts only. Revocation is idempotent: if the user does not currently hold that role in the deployment, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `deploymentId` or `userId` that does not exist is also a successful no-op that returns 204. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_role_from_deployment_serialize( + deployment_id=deployment_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_remove_user_role_from_deployment_without_preload_content( + self, + deployment_id: Annotated[StrictStr, Field(description="Deployment identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove user role from deployment + + **Required role:** Domain administrator. Revokes a user role within a deployment. Available for Enterprise accounts only. Revocation is idempotent: if the user does not currently hold that role in the deployment, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `deploymentId` or `userId` that does not exist is also a successful no-op that returns 204. + + :param deployment_id: Deployment identifier. (required) + :type deployment_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role identifier. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_role_from_deployment_serialize( + deployment_id=deployment_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_remove_user_role_from_deployment_serialize( + self, + deployment_id, + user_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if deployment_id is not None: + _path_params['deploymentId'] = deployment_id + if user_id is not None: + _path_params['userId'] = user_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/roles/deployments/{deploymentId}/users/{userId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_remove_user_role_from_project( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove user role from project + + **Required role:** Domain administrator or project administrator. Takes a role on a project away from a user, so they lose that access (unless they also have it through a team). Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. Revocation is idempotent: if the user does not currently hold that role in the project, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `projectId` or `userId` that does not exist is also a successful no-op that returns 204. A project administrator acting on another project in their own domain receives 403. An unrecognized `roleId` returns 400. + + :param project_id: Project identifier. (required) + :type project_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_role_from_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_remove_user_role_from_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove user role from project + + **Required role:** Domain administrator or project administrator. Takes a role on a project away from a user, so they lose that access (unless they also have it through a team). Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. Revocation is idempotent: if the user does not currently hold that role in the project, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `projectId` or `userId` that does not exist is also a successful no-op that returns 204. A project administrator acting on another project in their own domain receives 403. An unrecognized `roleId` returns 400. + + :param project_id: Project identifier. (required) + :type project_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_role_from_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_remove_user_role_from_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + role_id: Annotated[StrictStr, Field(description="Role to grant or remove: `admin` or `member`. See `RoleName`.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove user role from project + + **Required role:** Domain administrator or project administrator. Takes a role on a project away from a user, so they lose that access (unless they also have it through a team). Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. Revocation is idempotent: if the user does not currently hold that role in the project, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `projectId` or `userId` that does not exist is also a successful no-op that returns 204. A project administrator acting on another project in their own domain receives 403. An unrecognized `roleId` returns 400. + + :param project_id: Project identifier. (required) + :type project_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param role_id: Role to grant or remove: `admin` or `member`. See `RoleName`. (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_role_from_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_remove_user_role_from_project_serialize( + self, + project_id, + user_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if user_id is not None: + _path_params['userId'] = user_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/roles/projects/{projectId}/users/{userId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/roles_v1_api.py b/corellium/api/roles_v1_api.py new file mode 100644 index 0000000..d36d11e --- /dev/null +++ b/corellium/api/roles_v1_api.py @@ -0,0 +1,1720 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.role_v1 import RoleV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class RolesV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_add_team_role_to_project( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Add team role to project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param team_id: Team ID - uuid (required) + :type team_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_team_role_to_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_add_team_role_to_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Add team role to project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param team_id: Team ID - uuid (required) + :type team_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_team_role_to_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_add_team_role_to_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Add team role to project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param team_id: Team ID - uuid (required) + :type team_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_team_role_to_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_add_team_role_to_project_serialize( + self, + project_id, + team_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if team_id is not None: + _path_params['teamId'] = team_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_add_user_role_to_project( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Add user role to project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_user_role_to_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_add_user_role_to_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Add user role to project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_user_role_to_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_add_user_role_to_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Add user role to project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_user_role_to_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_add_user_role_to_project_serialize( + self, + project_id, + user_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if user_id is not None: + _path_params['userId'] = user_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/roles/projects/{projectId}/users/{userId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_remove_team_role_from_project( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Remove team role from project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param team_id: Team ID - uuid (required) + :type team_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_team_role_from_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_remove_team_role_from_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Remove team role from project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param team_id: Team ID - uuid (required) + :type team_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_team_role_from_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_remove_team_role_from_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Remove team role from project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param team_id: Team ID - uuid (required) + :type team_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_team_role_from_project_serialize( + project_id=project_id, + team_id=team_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_remove_team_role_from_project_serialize( + self, + project_id, + team_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if team_id is not None: + _path_params['teamId'] = team_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_remove_user_role_from_project( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Remove user role from project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_user_role_from_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_remove_user_role_from_project_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Remove user role from project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_user_role_from_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_remove_user_role_from_project_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + role_id: Annotated[StrictStr, Field(description="Role ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Remove user role from project + + This endpoint is available for Enterprise accounts only + + :param project_id: Project ID - uuid (required) + :type project_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param role_id: Role ID (required) + :type role_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_user_role_from_project_serialize( + project_id=project_id, + user_id=user_id, + role_id=role_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_remove_user_role_from_project_serialize( + self, + project_id, + user_id, + role_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if user_id is not None: + _path_params['userId'] = user_id + if role_id is not None: + _path_params['roleId'] = role_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/roles/projects/{projectId}/users/{userId}/roles/{roleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_roles( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[RoleV1]: + """(Deprecated) Get all roles + + This endpoint is available for Enterprise accounts only + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/roles is deprecated.", DeprecationWarning) + + _param = self._v1_roles_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[RoleV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_roles_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[RoleV1]]: + """(Deprecated) Get all roles + + This endpoint is available for Enterprise accounts only + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/roles is deprecated.", DeprecationWarning) + + _param = self._v1_roles_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[RoleV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_roles_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get all roles + + This endpoint is available for Enterprise accounts only + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/roles is deprecated.", DeprecationWarning) + + _param = self._v1_roles_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[RoleV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_roles_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/roles', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/snapshot_sharing_api.py b/corellium/api/snapshot_sharing_api.py new file mode 100644 index 0000000..76963b2 --- /dev/null +++ b/corellium/api/snapshot_sharing_api.py @@ -0,0 +1,1691 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from corellium.models.accept_snapshot_body import AcceptSnapshotBody +from corellium.models.set_snapshot_permissions_body import SetSnapshotPermissionsBody +from corellium.models.share_snapshot_body import ShareSnapshotBody +from corellium.models.shared_snapshots_response import SharedSnapshotsResponse +from corellium.models.snapshot import Snapshot + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class SnapshotSharingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_accept_shared_snapshot( + self, + accept_snapshot_body: AcceptSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Snapshot: + """Accept a shared snapshot + + Checks that you may use a snapshot someone shared with you, using the access code they gave you (and the password, for `passwordPublicLink`). Returns the snapshot. To create a device from it, call `POST /v3/instances` with `sharedSnapshot` set to the snapshot's `id` (and `sharedSnapshotPassword` for password-protected shares). Returns 403 if the snapshot is not shared with you, for example it is limited to another domain or you are not on its member list. + + :param accept_snapshot_body: (required) + :type accept_snapshot_body: AcceptSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_accept_shared_snapshot_serialize( + accept_snapshot_body=accept_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_accept_shared_snapshot_with_http_info( + self, + accept_snapshot_body: AcceptSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Snapshot]: + """Accept a shared snapshot + + Checks that you may use a snapshot someone shared with you, using the access code they gave you (and the password, for `passwordPublicLink`). Returns the snapshot. To create a device from it, call `POST /v3/instances` with `sharedSnapshot` set to the snapshot's `id` (and `sharedSnapshotPassword` for password-protected shares). Returns 403 if the snapshot is not shared with you, for example it is limited to another domain or you are not on its member list. + + :param accept_snapshot_body: (required) + :type accept_snapshot_body: AcceptSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_accept_shared_snapshot_serialize( + accept_snapshot_body=accept_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_accept_shared_snapshot_without_preload_content( + self, + accept_snapshot_body: AcceptSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Accept a shared snapshot + + Checks that you may use a snapshot someone shared with you, using the access code they gave you (and the password, for `passwordPublicLink`). Returns the snapshot. To create a device from it, call `POST /v3/instances` with `sharedSnapshot` set to the snapshot's `id` (and `sharedSnapshotPassword` for password-protected shares). Returns 403 if the snapshot is not shared with you, for example it is limited to another domain or you are not on its member list. + + :param accept_snapshot_body: (required) + :type accept_snapshot_body: AcceptSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_accept_shared_snapshot_serialize( + accept_snapshot_body=accept_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_accept_shared_snapshot_serialize( + self, + accept_snapshot_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if accept_snapshot_body is not None: + _body_params = accept_snapshot_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/snapshots/accept', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_snapshot_permissions( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + set_snapshot_permissions_body: SetSnapshotPermissionsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete member(s) + + Deletes one or more members from the list of members who have access to the snapshot. Members that do not currently have access are ignored rather than reported as an error. Deletes are idempotent: an unknown `snapshotId` is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param set_snapshot_permissions_body: (required) + :type set_snapshot_permissions_body: SetSnapshotPermissionsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + set_snapshot_permissions_body=set_snapshot_permissions_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_snapshot_permissions_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + set_snapshot_permissions_body: SetSnapshotPermissionsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete member(s) + + Deletes one or more members from the list of members who have access to the snapshot. Members that do not currently have access are ignored rather than reported as an error. Deletes are idempotent: an unknown `snapshotId` is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param set_snapshot_permissions_body: (required) + :type set_snapshot_permissions_body: SetSnapshotPermissionsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + set_snapshot_permissions_body=set_snapshot_permissions_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_snapshot_permissions_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + set_snapshot_permissions_body: SetSnapshotPermissionsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete member(s) + + Deletes one or more members from the list of members who have access to the snapshot. Members that do not currently have access are ignored rather than reported as an error. Deletes are idempotent: an unknown `snapshotId` is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param set_snapshot_permissions_body: (required) + :type set_snapshot_permissions_body: SetSnapshotPermissionsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + set_snapshot_permissions_body=set_snapshot_permissions_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_snapshot_permissions_serialize( + self, + snapshot_id, + set_snapshot_permissions_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_snapshot_permissions_body is not None: + _body_params = set_snapshot_permissions_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/snapshots/{snapshotId}/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_shared_snapshots( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SharedSnapshotsResponse: + """Fetch shared snapshots + + Lists snapshots involving you: `sharedWithUser` holds snapshots other people shared with you, and `sharedByUser` holds snapshots you shared. Use it to find a snapshot to create a device from, or to review what you are sharing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_shared_snapshots_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SharedSnapshotsResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_shared_snapshots_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SharedSnapshotsResponse]: + """Fetch shared snapshots + + Lists snapshots involving you: `sharedWithUser` holds snapshots other people shared with you, and `sharedByUser` holds snapshots you shared. Use it to find a snapshot to create a device from, or to review what you are sharing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_shared_snapshots_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SharedSnapshotsResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_shared_snapshots_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Fetch shared snapshots + + Lists snapshots involving you: `sharedWithUser` holds snapshots other people shared with you, and `sharedByUser` holds snapshots you shared. Use it to find a snapshot to create a device from, or to review what you are sharing. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_shared_snapshots_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SharedSnapshotsResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_shared_snapshots_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/snapshots/shared', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_set_snapshot_permissions( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + set_snapshot_permissions_body: SetSnapshotPermissionsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Snapshot: + """Set member list + + Sets who may use a snapshot shared by email invitation: send the full list of members, by email address or user ID. The list replaces the previous one. If the snapshot was not shared yet, this shares it with sharing type `emailInvite`. Returns the snapshot with its updated `sharing` details. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param set_snapshot_permissions_body: (required) + :type set_snapshot_permissions_body: SetSnapshotPermissionsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + set_snapshot_permissions_body=set_snapshot_permissions_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_set_snapshot_permissions_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + set_snapshot_permissions_body: SetSnapshotPermissionsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Snapshot]: + """Set member list + + Sets who may use a snapshot shared by email invitation: send the full list of members, by email address or user ID. The list replaces the previous one. If the snapshot was not shared yet, this shares it with sharing type `emailInvite`. Returns the snapshot with its updated `sharing` details. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param set_snapshot_permissions_body: (required) + :type set_snapshot_permissions_body: SetSnapshotPermissionsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + set_snapshot_permissions_body=set_snapshot_permissions_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_set_snapshot_permissions_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + set_snapshot_permissions_body: SetSnapshotPermissionsBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set member list + + Sets who may use a snapshot shared by email invitation: send the full list of members, by email address or user ID. The list replaces the previous one. If the snapshot was not shared yet, this shares it with sharing type `emailInvite`. Returns the snapshot with its updated `sharing` details. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param set_snapshot_permissions_body: (required) + :type set_snapshot_permissions_body: SetSnapshotPermissionsBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_set_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + set_snapshot_permissions_body=set_snapshot_permissions_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_set_snapshot_permissions_serialize( + self, + snapshot_id, + set_snapshot_permissions_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_snapshot_permissions_body is not None: + _body_params = set_snapshot_permissions_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/snapshots/{snapshotId}/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_share_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + share_snapshot_body: ShareSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Snapshot: + """Create or update snapshot sharing + + Shares one of your snapshots so other people can create devices from it, or stops sharing it. Choose who can use it with `sharingType` (see `SnapshotSharingType`); for `passwordPublicLink` also set `password`. The response is the snapshot with its `sharing` details, including the `accessCode` to give to the people you share with. Send `notShared` to stop sharing. Returns 403 if snapshot sharing, or that sharing type, is not enabled for your domain or license. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param share_snapshot_body: (required) + :type share_snapshot_body: ShareSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_share_snapshot_serialize( + snapshot_id=snapshot_id, + share_snapshot_body=share_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_share_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + share_snapshot_body: ShareSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Snapshot]: + """Create or update snapshot sharing + + Shares one of your snapshots so other people can create devices from it, or stops sharing it. Choose who can use it with `sharingType` (see `SnapshotSharingType`); for `passwordPublicLink` also set `password`. The response is the snapshot with its `sharing` details, including the `accessCode` to give to the people you share with. Send `notShared` to stop sharing. Returns 403 if snapshot sharing, or that sharing type, is not enabled for your domain or license. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param share_snapshot_body: (required) + :type share_snapshot_body: ShareSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_share_snapshot_serialize( + snapshot_id=snapshot_id, + share_snapshot_body=share_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_share_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + share_snapshot_body: ShareSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create or update snapshot sharing + + Shares one of your snapshots so other people can create devices from it, or stops sharing it. Choose who can use it with `sharingType` (see `SnapshotSharingType`); for `passwordPublicLink` also set `password`. The response is the snapshot with its `sharing` details, including the `accessCode` to give to the people you share with. Send `notShared` to stop sharing. Returns 403 if snapshot sharing, or that sharing type, is not enabled for your domain or license. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param share_snapshot_body: (required) + :type share_snapshot_body: ShareSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_share_snapshot_serialize( + snapshot_id=snapshot_id, + share_snapshot_body=share_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_share_snapshot_serialize( + self, + snapshot_id, + share_snapshot_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if share_snapshot_body is not None: + _body_params = share_snapshot_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/snapshots/{snapshotId}/share', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/snapshot_sharing_v1_api.py b/corellium/api/snapshot_sharing_v1_api.py new file mode 100644 index 0000000..8061a08 --- /dev/null +++ b/corellium/api/snapshot_sharing_v1_api.py @@ -0,0 +1,1707 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from corellium.models.accept_snapshot_request_payload import AcceptSnapshotRequestPayload +from corellium.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload +from corellium.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.models.user_snapshots import UserSnapshots + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class SnapshotSharingV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_accept_shared_snapshot( + self, + accept_snapshot_request_payload: AcceptSnapshotRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Accept a snapshot shared with you + + + :param accept_snapshot_request_payload: (required) + :type accept_snapshot_request_payload: AcceptSnapshotRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/accept is deprecated.", DeprecationWarning) + + _param = self._v1_accept_shared_snapshot_serialize( + accept_snapshot_request_payload=accept_snapshot_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_accept_shared_snapshot_with_http_info( + self, + accept_snapshot_request_payload: AcceptSnapshotRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Accept a snapshot shared with you + + + :param accept_snapshot_request_payload: (required) + :type accept_snapshot_request_payload: AcceptSnapshotRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/accept is deprecated.", DeprecationWarning) + + _param = self._v1_accept_shared_snapshot_serialize( + accept_snapshot_request_payload=accept_snapshot_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_accept_shared_snapshot_without_preload_content( + self, + accept_snapshot_request_payload: AcceptSnapshotRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Accept a snapshot shared with you + + + :param accept_snapshot_request_payload: (required) + :type accept_snapshot_request_payload: AcceptSnapshotRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/accept is deprecated.", DeprecationWarning) + + _param = self._v1_accept_shared_snapshot_serialize( + accept_snapshot_request_payload=accept_snapshot_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_accept_shared_snapshot_serialize( + self, + accept_snapshot_request_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if accept_snapshot_request_payload is not None: + _body_params = accept_snapshot_request_payload + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/snapshots/accept', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_snapshot_permissions( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Delete member(s) + + Deletes one or more members from the list of members who have access to the snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_permissions_request_payload: (required) + :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/snapshots/{snapshotId}/permissions is deprecated.", DeprecationWarning) + + _param = self._v1_delete_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + snapshot_permissions_request_payload=snapshot_permissions_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_snapshot_permissions_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Delete member(s) + + Deletes one or more members from the list of members who have access to the snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_permissions_request_payload: (required) + :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/snapshots/{snapshotId}/permissions is deprecated.", DeprecationWarning) + + _param = self._v1_delete_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + snapshot_permissions_request_payload=snapshot_permissions_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_snapshot_permissions_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete member(s) + + Deletes one or more members from the list of members who have access to the snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_permissions_request_payload: (required) + :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/snapshots/{snapshotId}/permissions is deprecated.", DeprecationWarning) + + _param = self._v1_delete_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + snapshot_permissions_request_payload=snapshot_permissions_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_snapshot_permissions_serialize( + self, + snapshot_id, + snapshot_permissions_request_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if snapshot_permissions_request_payload is not None: + _body_params = snapshot_permissions_request_payload + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/snapshots/{snapshotId}/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_shared_snapshots( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserSnapshots: + """(Deprecated) Fetch shared snapshots + + Fetch snapshots shared with and shared by the requesting user + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/snapshots/shared is deprecated.", DeprecationWarning) + + _param = self._v1_get_shared_snapshots_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSnapshots", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_shared_snapshots_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserSnapshots]: + """(Deprecated) Fetch shared snapshots + + Fetch snapshots shared with and shared by the requesting user + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/snapshots/shared is deprecated.", DeprecationWarning) + + _param = self._v1_get_shared_snapshots_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSnapshots", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_shared_snapshots_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Fetch shared snapshots + + Fetch snapshots shared with and shared by the requesting user + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/snapshots/shared is deprecated.", DeprecationWarning) + + _param = self._v1_get_shared_snapshots_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserSnapshots", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_shared_snapshots_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/snapshots/shared', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_set_snapshot_permissions( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Set member list + + Sets the list of members who have access to the snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_permissions_request_payload: (required) + :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/{snapshotId}/permissions is deprecated.", DeprecationWarning) + + _param = self._v1_set_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + snapshot_permissions_request_payload=snapshot_permissions_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_set_snapshot_permissions_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Set member list + + Sets the list of members who have access to the snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_permissions_request_payload: (required) + :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/{snapshotId}/permissions is deprecated.", DeprecationWarning) + + _param = self._v1_set_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + snapshot_permissions_request_payload=snapshot_permissions_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_set_snapshot_permissions_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Set member list + + Sets the list of members who have access to the snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_permissions_request_payload: (required) + :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/{snapshotId}/permissions is deprecated.", DeprecationWarning) + + _param = self._v1_set_snapshot_permissions_serialize( + snapshot_id=snapshot_id, + snapshot_permissions_request_payload=snapshot_permissions_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_set_snapshot_permissions_serialize( + self, + snapshot_id, + snapshot_permissions_request_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if snapshot_permissions_request_payload is not None: + _body_params = snapshot_permissions_request_payload + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/snapshots/{snapshotId}/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_share_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + post_share_snapshot_request_payload: PostShareSnapshotRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Share snapshot + + Share a snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param post_share_snapshot_request_payload: (required) + :type post_share_snapshot_request_payload: PostShareSnapshotRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/{snapshotId}/share is deprecated.", DeprecationWarning) + + _param = self._v1_share_snapshot_serialize( + snapshot_id=snapshot_id, + post_share_snapshot_request_payload=post_share_snapshot_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_share_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + post_share_snapshot_request_payload: PostShareSnapshotRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Share snapshot + + Share a snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param post_share_snapshot_request_payload: (required) + :type post_share_snapshot_request_payload: PostShareSnapshotRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/{snapshotId}/share is deprecated.", DeprecationWarning) + + _param = self._v1_share_snapshot_serialize( + snapshot_id=snapshot_id, + post_share_snapshot_request_payload=post_share_snapshot_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_share_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + post_share_snapshot_request_payload: PostShareSnapshotRequestPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Share snapshot + + Share a snapshot + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param post_share_snapshot_request_payload: (required) + :type post_share_snapshot_request_payload: PostShareSnapshotRequestPayload + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/snapshots/{snapshotId}/share is deprecated.", DeprecationWarning) + + _param = self._v1_share_snapshot_serialize( + snapshot_id=snapshot_id, + post_share_snapshot_request_payload=post_share_snapshot_request_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_share_snapshot_serialize( + self, + snapshot_id, + post_share_snapshot_request_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if post_share_snapshot_request_payload is not None: + _body_params = post_share_snapshot_request_payload + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/snapshots/{snapshotId}/share', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/snapshots_api.py b/corellium/api/snapshots_api.py new file mode 100644 index 0000000..5abe642 --- /dev/null +++ b/corellium/api/snapshots_api.py @@ -0,0 +1,3029 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from corellium.models.create_snapshot_body import CreateSnapshotBody +from corellium.models.instance_snapshots_list import InstanceSnapshotsList +from corellium.models.snapshot import Snapshot +from corellium.models.v3_update_snapshot_request import V3UpdateSnapshotRequest + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class SnapshotsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + create_snapshot_body: Optional[CreateSnapshotBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Snapshot: + """Create instance snapshot + + Saves a snapshot of the device's current state, so you can return to it later with `v3RestoreInstanceSnapshot`. Take one before a risky change (an app install, a jailbreak step, an OS change) to be able to undo it. **Running or off.** A device that is off can always be snapshotted. A running device can only be snapshotted if its model supports live snapshots; otherwise the request fails with 400, so stop the device first (`v3StopInstance`). The snapshot is saved in the background: the response is the new snapshot with status `creating`. Poll `v3GetInstanceSnapshot` until it is ready. Each device can keep a limited number of snapshots (`snapshotLimit` in `GET /v3/config`); at the limit, delete an old one first. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param create_snapshot_body: + :type create_snapshot_body: CreateSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_instance_snapshot_serialize( + instance_id=instance_id, + create_snapshot_body=create_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + create_snapshot_body: Optional[CreateSnapshotBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Snapshot]: + """Create instance snapshot + + Saves a snapshot of the device's current state, so you can return to it later with `v3RestoreInstanceSnapshot`. Take one before a risky change (an app install, a jailbreak step, an OS change) to be able to undo it. **Running or off.** A device that is off can always be snapshotted. A running device can only be snapshotted if its model supports live snapshots; otherwise the request fails with 400, so stop the device first (`v3StopInstance`). The snapshot is saved in the background: the response is the new snapshot with status `creating`. Poll `v3GetInstanceSnapshot` until it is ready. Each device can keep a limited number of snapshots (`snapshotLimit` in `GET /v3/config`); at the limit, delete an old one first. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param create_snapshot_body: + :type create_snapshot_body: CreateSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_instance_snapshot_serialize( + instance_id=instance_id, + create_snapshot_body=create_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + create_snapshot_body: Optional[CreateSnapshotBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create instance snapshot + + Saves a snapshot of the device's current state, so you can return to it later with `v3RestoreInstanceSnapshot`. Take one before a risky change (an app install, a jailbreak step, an OS change) to be able to undo it. **Running or off.** A device that is off can always be snapshotted. A running device can only be snapshotted if its model supports live snapshots; otherwise the request fails with 400, so stop the device first (`v3StopInstance`). The snapshot is saved in the background: the response is the new snapshot with status `creating`. Poll `v3GetInstanceSnapshot` until it is ready. Each device can keep a limited number of snapshots (`snapshotLimit` in `GET /v3/config`); at the limit, delete an old one first. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param create_snapshot_body: + :type create_snapshot_body: CreateSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_instance_snapshot_serialize( + instance_id=instance_id, + create_snapshot_body=create_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_instance_snapshot_serialize( + self, + instance_id, + create_snapshot_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_snapshot_body is not None: + _body_params = create_snapshot_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an instance snapshot + + Delete an instance snapshot. Deletion is asynchronous: the snapshot is marked `deleting` and the call returns 204 before the underlying storage has been reclaimed. Deletes are idempotent: an unknown `snapshotId`, or an unknown `instanceId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the snapshot is still present in the `deleting` state and after it has disappeared. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an instance snapshot + + Delete an instance snapshot. Deletion is asynchronous: the snapshot is marked `deleting` and the call returns 204 before the underlying storage has been reclaimed. Deletes are idempotent: an unknown `snapshotId`, or an unknown `instanceId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the snapshot is still present in the `deleting` state and after it has disappeared. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an instance snapshot + + Delete an instance snapshot. Deletion is asynchronous: the snapshot is marked `deleting` and the call returns 204 before the underlying storage has been reclaimed. Deletes are idempotent: an unknown `snapshotId`, or an unknown `instanceId`, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the snapshot is still present in the `deleting` state and after it has disappeared. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_instance_snapshot_serialize( + self, + instance_id, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/instances/{instanceId}/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a snapshot + + Delete a snapshot by ID. Deletion is asynchronous: the snapshot is marked `deleting` and the call returns 204 before the underlying storage has been reclaimed. Deletes are idempotent: an unknown `snapshotId`, or a snapshot that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the snapshot is still present in the `deleting` state and after it has disappeared. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a snapshot + + Delete a snapshot by ID. Deletion is asynchronous: the snapshot is marked `deleting` and the call returns 204 before the underlying storage has been reclaimed. Deletes are idempotent: an unknown `snapshotId`, or a snapshot that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the snapshot is still present in the `deleting` state and after it has disappeared. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a snapshot + + Delete a snapshot by ID. Deletion is asynchronous: the snapshot is marked `deleting` and the call returns 204 before the underlying storage has been reclaimed. Deletes are idempotent: an unknown `snapshotId`, or a snapshot that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. A repeat therefore returns 204 both while the snapshot is still present in the `deleting` state and after it has disappeared. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_snapshot_serialize( + self, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Snapshot: + """Get instance snapshot + + Returns one snapshot of this device, including its status. Poll it after `v3CreateInstanceSnapshot` until the snapshot has finished `creating`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Snapshot]: + """Get instance snapshot + + Returns one snapshot of this device, including its status. Poll it after `v3CreateInstanceSnapshot` until the snapshot has finished `creating`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get instance snapshot + + Returns one snapshot of this device, including its status. Poll it after `v3CreateInstanceSnapshot` until the snapshot has finished `creating`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_instance_snapshot_serialize( + self, + instance_id, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Snapshot: + """Get snapshot + + Returns one snapshot by its ID, including its status and sharing details. Works for snapshots of your devices; use `v3AcceptSharedSnapshot` for snapshots shared with you. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Snapshot]: + """Get snapshot + + Returns one snapshot by its ID, including its status and sharing details. Works for snapshots of your devices; use `v3AcceptSharedSnapshot` for snapshots shared with you. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get snapshot + + Returns one snapshot by its ID, including its status and sharing details. Works for snapshots of your devices; use `v3AcceptSharedSnapshot` for snapshots shared with you. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_snapshot_serialize( + self, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_instance_snapshots( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> InstanceSnapshotsList: + """List instance snapshots + + Lists the snapshots saved for one device, with each snapshot's ID, name and status. A snapshot is a saved copy of the device's storage at a moment in time; restore it with `v3RestoreInstanceSnapshot` to put the device back to that state. Results are paginated with `limit` and `offset`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_instance_snapshots_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceSnapshotsList", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_instance_snapshots_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[InstanceSnapshotsList]: + """List instance snapshots + + Lists the snapshots saved for one device, with each snapshot's ID, name and status. A snapshot is a saved copy of the device's storage at a moment in time; restore it with `v3RestoreInstanceSnapshot` to put the device back to that state. Results are paginated with `limit` and `offset`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_instance_snapshots_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceSnapshotsList", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_instance_snapshots_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List instance snapshots + + Lists the snapshots saved for one device, with each snapshot's ID, name and status. A snapshot is a saved copy of the device's storage at a moment in time; restore it with `v3RestoreInstanceSnapshot` to put the device back to that state. Results are paginated with `limit` and `offset`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_instance_snapshots_serialize( + instance_id=instance_id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "InstanceSnapshotsList", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_instance_snapshots_serialize( + self, + instance_id, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/instances/{instanceId}/snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + create_snapshot_body: CreateSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Snapshot: + """Update an instance snapshot + + Renames a snapshot. Send the new `name`. Returns the updated snapshot. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param create_snapshot_body: (required) + :type create_snapshot_body: CreateSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + create_snapshot_body=create_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + create_snapshot_body: CreateSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Snapshot]: + """Update an instance snapshot + + Renames a snapshot. Send the new `name`. Returns the updated snapshot. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param create_snapshot_body: (required) + :type create_snapshot_body: CreateSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + create_snapshot_body=create_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + create_snapshot_body: CreateSnapshotBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an instance snapshot + + Renames a snapshot. Send the new `name`. Returns the updated snapshot. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param create_snapshot_body: (required) + :type create_snapshot_body: CreateSnapshotBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + create_snapshot_body=create_snapshot_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_instance_snapshot_serialize( + self, + instance_id, + snapshot_id, + create_snapshot_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_snapshot_body is not None: + _body_params = create_snapshot_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/instances/{instanceId}/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_restore_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Restore instance snapshot + + Puts the device back to the state saved in a snapshot, replacing its current storage. Anything changed since the snapshot was taken is lost; take a new snapshot first if you want to keep it. The restore runs in the background and starts the device from the snapshot; returns 204 once it has been accepted. Poll `v3GetInstanceState` until the device is `on`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_restore_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_restore_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Restore instance snapshot + + Puts the device back to the state saved in a snapshot, replacing its current storage. Anything changed since the snapshot was taken is lost; take a new snapshot first if you want to keep it. The restore runs in the background and starts the device from the snapshot; returns 204 once it has been accepted. Poll `v3GetInstanceState` until the device is `on`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_restore_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_restore_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance identifier.")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore instance snapshot + + Puts the device back to the state saved in a snapshot, replacing its current storage. Anything changed since the snapshot was taken is lost; take a new snapshot first if you want to keep it. The restore runs in the background and starts the device from the snapshot; returns 204 once it has been accepted. Poll `v3GetInstanceState` until the device is `on`. + + :param instance_id: Instance identifier. (required) + :type instance_id: str + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_restore_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_restore_instance_snapshot_serialize( + self, + instance_id, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/instances/{instanceId}/snapshots/{snapshotId}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_update_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + v3_update_snapshot_request: V3UpdateSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Snapshot: + """Update snapshot name + + Renames a snapshot. Send the new `name`. Returns the updated snapshot. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param v3_update_snapshot_request: (required) + :type v3_update_snapshot_request: V3UpdateSnapshotRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_snapshot_serialize( + snapshot_id=snapshot_id, + v3_update_snapshot_request=v3_update_snapshot_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_update_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + v3_update_snapshot_request: V3UpdateSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Snapshot]: + """Update snapshot name + + Renames a snapshot. Send the new `name`. Returns the updated snapshot. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param v3_update_snapshot_request: (required) + :type v3_update_snapshot_request: V3UpdateSnapshotRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_snapshot_serialize( + snapshot_id=snapshot_id, + v3_update_snapshot_request=v3_update_snapshot_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_update_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot identifier.")], + v3_update_snapshot_request: V3UpdateSnapshotRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update snapshot name + + Renames a snapshot. Send the new `name`. Returns the updated snapshot. + + :param snapshot_id: Snapshot identifier. (required) + :type snapshot_id: str + :param v3_update_snapshot_request: (required) + :type v3_update_snapshot_request: V3UpdateSnapshotRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_snapshot_serialize( + snapshot_id=snapshot_id, + v3_update_snapshot_request=v3_update_snapshot_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Snapshot", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_update_snapshot_serialize( + self, + snapshot_id, + v3_update_snapshot_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if v3_update_snapshot_request is not None: + _body_params = v3_update_snapshot_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/snapshots_v1_api.py b/corellium/api/snapshots_v1_api.py new file mode 100644 index 0000000..232bb3c --- /dev/null +++ b/corellium/api/snapshots_v1_api.py @@ -0,0 +1,2993 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.snapshot_creation_options import SnapshotCreationOptions +from corellium.models.snapshot_v1 import SnapshotV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class SnapshotsV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_create_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Create Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_create_snapshot_serialize( + instance_id=instance_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Create Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_create_snapshot_serialize( + instance_id=instance_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_create_snapshot_serialize( + instance_id=instance_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_snapshot_serialize( + self, + instance_id, + snapshot_creation_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if snapshot_creation_options is not None: + _body_params = snapshot_creation_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_instance_snapshot_serialize( + self, + instance_id, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/instances/{instanceId}/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete a Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete a Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete a Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_snapshot_serialize( + self, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Get Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Get Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_snapshot_serialize( + self, + instance_id, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_instance_snapshots( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[SnapshotV1]: + """(Deprecated) Get Instance Snapshots + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_snapshots_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SnapshotV1]", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_instance_snapshots_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[SnapshotV1]]: + """(Deprecated) Get Instance Snapshots + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_snapshots_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SnapshotV1]", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_instance_snapshots_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Instance Snapshots + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/instances/{instanceId}/snapshots is deprecated.", DeprecationWarning) + + _param = self._v1_get_instance_snapshots_serialize( + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[SnapshotV1]", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_instance_snapshots_serialize( + self, + instance_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/instances/{instanceId}/snapshots', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Get Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Get Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_get_snapshot_serialize( + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_snapshot_serialize( + self, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_rename_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Rename an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_rename_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_rename_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Rename an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_rename_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_rename_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Rename an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/instances/{instanceId}/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_rename_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '400': "ApiErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_rename_instance_snapshot_serialize( + self, + instance_id, + snapshot_id, + snapshot_creation_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if snapshot_creation_options is not None: + _body_params = snapshot_creation_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/instances/{instanceId}/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_restore_instance_snapshot( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Restore an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/snapshots/{snapshotId}/restore is deprecated.", DeprecationWarning) + + _param = self._v1_restore_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_restore_instance_snapshot_with_http_info( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Restore an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/snapshots/{snapshotId}/restore is deprecated.", DeprecationWarning) + + _param = self._v1_restore_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_restore_instance_snapshot_without_preload_content( + self, + instance_id: Annotated[StrictStr, Field(description="Instance ID - uuid")], + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Restore an Instance Snapshot + + + :param instance_id: Instance ID - uuid (required) + :type instance_id: str + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/instances/{instanceId}/snapshots/{snapshotId}/restore is deprecated.", DeprecationWarning) + + _param = self._v1_restore_instance_snapshot_serialize( + instance_id=instance_id, + snapshot_id=snapshot_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_restore_instance_snapshot_serialize( + self, + instance_id, + snapshot_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if instance_id is not None: + _path_params['instanceId'] = instance_id + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/instances/{instanceId}/snapshots/{snapshotId}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_snapshot_rename( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SnapshotV1: + """(Deprecated) Rename a Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_snapshot_rename_serialize( + snapshot_id=snapshot_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_snapshot_rename_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SnapshotV1]: + """(Deprecated) Rename a Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_snapshot_rename_serialize( + snapshot_id=snapshot_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_snapshot_rename_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="Snapshot ID - uuid")], + snapshot_creation_options: SnapshotCreationOptions, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Rename a Snapshot + + + :param snapshot_id: Snapshot ID - uuid (required) + :type snapshot_id: str + :param snapshot_creation_options: (required) + :type snapshot_creation_options: SnapshotCreationOptions + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/snapshots/{snapshotId} is deprecated.", DeprecationWarning) + + _param = self._v1_snapshot_rename_serialize( + snapshot_id=snapshot_id, + snapshot_creation_options=snapshot_creation_options, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SnapshotV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_snapshot_rename_serialize( + self, + snapshot_id, + snapshot_creation_options, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if snapshot_creation_options is not None: + _body_params = snapshot_creation_options + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/snapshots/{snapshotId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/status_api.py b/corellium/api/status_api.py new file mode 100644 index 0000000..fd8cb40 --- /dev/null +++ b/corellium/api/status_api.py @@ -0,0 +1,330 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class StatusApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_ready( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Check that the API is ready + + Health check. Returns 204 (no body) when the API is up and accepting requests, and 503 while it is shutting down. Needs no sign-in, so monitoring tools and scripts can call it before doing real work, for example to wait for a deployment to come back after an upgrade. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '503': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_ready_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Check that the API is ready + + Health check. Returns 204 (no body) when the API is up and accepting requests, and 503 while it is shutting down. Needs no sign-in, so monitoring tools and scripts can call it before doing real work, for example to wait for a deployment to come back after an upgrade. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '503': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_ready_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check that the API is ready + + Health check. Returns 204 (no body) when the API is up and accepting requests, and 503 while it is shutting down. Needs no sign-in, so monitoring tools and scripts can call it before doing real work, for example to wait for a deployment to come back after an upgrade. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '503': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_ready_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/ready', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/status_v1_api.py b/corellium/api/status_v1_api.py new file mode 100644 index 0000000..54ef1b2 --- /dev/null +++ b/corellium/api/status_v1_api.py @@ -0,0 +1,332 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class StatusV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_ready( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) API Status + + Check if API is ready for queries + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/ready is deprecated.", DeprecationWarning) + + _param = self._v1_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '503': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_ready_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) API Status + + Check if API is ready for queries + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/ready is deprecated.", DeprecationWarning) + + _param = self._v1_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '503': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_ready_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) API Status + + Check if API is ready for queries + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/ready is deprecated.", DeprecationWarning) + + _param = self._v1_ready_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '503': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_ready_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/ready', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/storage_api.py b/corellium/api/storage_api.py new file mode 100644 index 0000000..f5951c3 --- /dev/null +++ b/corellium/api/storage_api.py @@ -0,0 +1,2067 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from corellium.models.storage_already_mounted_response import StorageAlreadyMountedResponse +from corellium.models.storage_device_list import StorageDeviceList +from corellium.models.storage_eject_already_unmounted_response import StorageEjectAlreadyUnmountedResponse +from corellium.models.storage_file_list import StorageFileList +from corellium.models.storage_list import StorageList + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class StorageApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_attach_cluster_storage( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StorageAlreadyMountedResponse: + """Attach storage device + + **Required role:** Cluster administrator. Mounts an attached storage device so its files can be used. Mounting runs in the background: returns 202 when the mount has been queued, or 200 if the device is already mounted. Browse its files with `GET /v3/storage/{id}/files/{path}`. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param id: Storage device identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_attach_cluster_storage_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageAlreadyMountedResponse", + '202': "StorageAttachResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '500': "StorageQueueError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_attach_cluster_storage_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StorageAlreadyMountedResponse]: + """Attach storage device + + **Required role:** Cluster administrator. Mounts an attached storage device so its files can be used. Mounting runs in the background: returns 202 when the mount has been queued, or 200 if the device is already mounted. Browse its files with `GET /v3/storage/{id}/files/{path}`. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param id: Storage device identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_attach_cluster_storage_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageAlreadyMountedResponse", + '202': "StorageAttachResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '500': "StorageQueueError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_attach_cluster_storage_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Attach storage device + + **Required role:** Cluster administrator. Mounts an attached storage device so its files can be used. Mounting runs in the background: returns 202 when the mount has been queued, or 200 if the device is already mounted. Browse its files with `GET /v3/storage/{id}/files/{path}`. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param id: Storage device identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_attach_cluster_storage_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageAlreadyMountedResponse", + '202': "StorageAttachResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '500': "StorageQueueError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_attach_cluster_storage_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/cluster/storage/{id}/attach', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_eject_cluster_storage( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StorageEjectAlreadyUnmountedResponse: + """Eject storage device + + **Required role:** Cluster administrator. Unmounts an attached storage device so it can be unplugged safely. Unmounting runs in the background: returns 202 when the unmount has been queued, or 200 if the device is already unmounted. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param id: Storage device identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_eject_cluster_storage_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageEjectAlreadyUnmountedResponse", + '202': "StorageAttachResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '500': "StorageQueueError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_eject_cluster_storage_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StorageEjectAlreadyUnmountedResponse]: + """Eject storage device + + **Required role:** Cluster administrator. Unmounts an attached storage device so it can be unplugged safely. Unmounting runs in the background: returns 202 when the unmount has been queued, or 200 if the device is already unmounted. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param id: Storage device identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_eject_cluster_storage_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageEjectAlreadyUnmountedResponse", + '202': "StorageAttachResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '500': "StorageQueueError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_eject_cluster_storage_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Eject storage device + + **Required role:** Cluster administrator. Unmounts an attached storage device so it can be unplugged safely. Unmounting runs in the background: returns 202 when the unmount has been queued, or 200 if the device is already unmounted. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param id: Storage device identifier. (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_eject_cluster_storage_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageEjectAlreadyUnmountedResponse", + '202': "StorageAttachResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + '500': "StorageQueueError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_eject_cluster_storage_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/cluster/storage/{id}/eject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_cluster_storage( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Results to skip.")] = None, + id: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma-separated for multiple).")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match).")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma-separated).")] = None, + fs_uuid: Annotated[Optional[StrictStr], Field(description="Filter by filesystem UUID (partial match).")] = None, + label: Annotated[Optional[StrictStr], Field(description="Filter by label (partial match).")] = None, + serial: Annotated[Optional[StrictStr], Field(description="Filter by serial number (partial match).")] = None, + vendor: Annotated[Optional[StrictStr], Field(description="Filter by vendor (partial match).")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by model (partial match).")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by mount status.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. 'device' or '-device').")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StorageDeviceList: + """List cluster storage devices + + **Required role:** Cluster administrator. Lists the physical storage devices (for example USB drives) attached to the cluster's servers, for cluster administrators. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param limit: Maximum results to return. + :type limit: float + :param offset: Results to skip. + :type offset: float + :param id: Filter by identifier (comma-separated for multiple). + :type id: str + :param device: Filter by device name (partial match). + :type device: str + :param fs_type: Filter by filesystem type (comma-separated). + :type fs_type: str + :param fs_uuid: Filter by filesystem UUID (partial match). + :type fs_uuid: str + :param label: Filter by label (partial match). + :type label: str + :param serial: Filter by serial number (partial match). + :type serial: str + :param vendor: Filter by vendor (partial match). + :type vendor: str + :param model: Filter by model (partial match). + :type model: str + :param mount_policy: Filter by mount policy. + :type mount_policy: str + :param status: Filter by mount status. + :type status: str + :param sort: Sort order (e.g. 'device' or '-device'). + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_storage_serialize( + limit=limit, + offset=offset, + id=id, + device=device, + fs_type=fs_type, + fs_uuid=fs_uuid, + label=label, + serial=serial, + vendor=vendor, + model=model, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageDeviceList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_cluster_storage_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Results to skip.")] = None, + id: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma-separated for multiple).")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match).")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma-separated).")] = None, + fs_uuid: Annotated[Optional[StrictStr], Field(description="Filter by filesystem UUID (partial match).")] = None, + label: Annotated[Optional[StrictStr], Field(description="Filter by label (partial match).")] = None, + serial: Annotated[Optional[StrictStr], Field(description="Filter by serial number (partial match).")] = None, + vendor: Annotated[Optional[StrictStr], Field(description="Filter by vendor (partial match).")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by model (partial match).")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by mount status.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. 'device' or '-device').")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StorageDeviceList]: + """List cluster storage devices + + **Required role:** Cluster administrator. Lists the physical storage devices (for example USB drives) attached to the cluster's servers, for cluster administrators. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param limit: Maximum results to return. + :type limit: float + :param offset: Results to skip. + :type offset: float + :param id: Filter by identifier (comma-separated for multiple). + :type id: str + :param device: Filter by device name (partial match). + :type device: str + :param fs_type: Filter by filesystem type (comma-separated). + :type fs_type: str + :param fs_uuid: Filter by filesystem UUID (partial match). + :type fs_uuid: str + :param label: Filter by label (partial match). + :type label: str + :param serial: Filter by serial number (partial match). + :type serial: str + :param vendor: Filter by vendor (partial match). + :type vendor: str + :param model: Filter by model (partial match). + :type model: str + :param mount_policy: Filter by mount policy. + :type mount_policy: str + :param status: Filter by mount status. + :type status: str + :param sort: Sort order (e.g. 'device' or '-device'). + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_storage_serialize( + limit=limit, + offset=offset, + id=id, + device=device, + fs_type=fs_type, + fs_uuid=fs_uuid, + label=label, + serial=serial, + vendor=vendor, + model=model, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageDeviceList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_cluster_storage_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum results to return.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Results to skip.")] = None, + id: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma-separated for multiple).")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match).")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma-separated).")] = None, + fs_uuid: Annotated[Optional[StrictStr], Field(description="Filter by filesystem UUID (partial match).")] = None, + label: Annotated[Optional[StrictStr], Field(description="Filter by label (partial match).")] = None, + serial: Annotated[Optional[StrictStr], Field(description="Filter by serial number (partial match).")] = None, + vendor: Annotated[Optional[StrictStr], Field(description="Filter by vendor (partial match).")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by model (partial match).")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by mount status.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. 'device' or '-device').")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List cluster storage devices + + **Required role:** Cluster administrator. Lists the physical storage devices (for example USB drives) attached to the cluster's servers, for cluster administrators. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + + :param limit: Maximum results to return. + :type limit: float + :param offset: Results to skip. + :type offset: float + :param id: Filter by identifier (comma-separated for multiple). + :type id: str + :param device: Filter by device name (partial match). + :type device: str + :param fs_type: Filter by filesystem type (comma-separated). + :type fs_type: str + :param fs_uuid: Filter by filesystem UUID (partial match). + :type fs_uuid: str + :param label: Filter by label (partial match). + :type label: str + :param serial: Filter by serial number (partial match). + :type serial: str + :param vendor: Filter by vendor (partial match). + :type vendor: str + :param model: Filter by model (partial match). + :type model: str + :param mount_policy: Filter by mount policy. + :type mount_policy: str + :param status: Filter by mount status. + :type status: str + :param sort: Sort order (e.g. 'device' or '-device'). + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_cluster_storage_serialize( + limit=limit, + offset=offset, + id=id, + device=device, + fs_type=fs_type, + fs_uuid=fs_uuid, + label=label, + serial=serial, + vendor=vendor, + model=model, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageDeviceList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_cluster_storage_serialize( + self, + limit, + offset, + id, + device, + fs_type, + fs_uuid, + label, + serial, + vendor, + model, + mount_policy, + status, + sort, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if id is not None: + + _query_params.append(('id', id)) + + if device is not None: + + _query_params.append(('device', device)) + + if fs_type is not None: + + _query_params.append(('fsType', fs_type)) + + if fs_uuid is not None: + + _query_params.append(('fsUuid', fs_uuid)) + + if label is not None: + + _query_params.append(('label', label)) + + if serial is not None: + + _query_params.append(('serial', serial)) + + if vendor is not None: + + _query_params.append(('vendor', vendor)) + + if model is not None: + + _query_params.append(('model', model)) + + if mount_policy is not None: + + _query_params.append(('mountPolicy', mount_policy)) + + if status is not None: + + _query_params.append(('status', status)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/cluster/storage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_storage( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (prefix a field with \"-\" for descending).")] = None, + identifier: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma separated).")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match).")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated).")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by mount status.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StorageList: + """List server-attached storage devices + + Lists the physical storage devices (for example USB drives or disks) plugged into an on-site Corellium server, with their name, filesystem, label, vendor, whether they are mounted, and whether they are mounted read-only (`RO`) or read-write (`RW`). Use a device's `id` with `v3ListStorageFiles` to browse its contents. For cluster administrators on on-site deployments; not available on cloud installations. Results are paginated and can be filtered and sorted with the query parameters. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order (prefix a field with \"-\" for descending). + :type sort: str + :param identifier: Filter by identifier (comma separated). + :type identifier: str + :param device: Filter by device name (partial match). + :type device: str + :param fs_type: Filter by filesystem type (comma separated). + :type fs_type: str + :param mount_policy: Filter by mount policy. + :type mount_policy: str + :param status: Filter by mount status. + :type status: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_storage_serialize( + limit=limit, + offset=offset, + sort=sort, + identifier=identifier, + device=device, + fs_type=fs_type, + mount_policy=mount_policy, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_storage_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (prefix a field with \"-\" for descending).")] = None, + identifier: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma separated).")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match).")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated).")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by mount status.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StorageList]: + """List server-attached storage devices + + Lists the physical storage devices (for example USB drives or disks) plugged into an on-site Corellium server, with their name, filesystem, label, vendor, whether they are mounted, and whether they are mounted read-only (`RO`) or read-write (`RW`). Use a device's `id` with `v3ListStorageFiles` to browse its contents. For cluster administrators on on-site deployments; not available on cloud installations. Results are paginated and can be filtered and sorted with the query parameters. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order (prefix a field with \"-\" for descending). + :type sort: str + :param identifier: Filter by identifier (comma separated). + :type identifier: str + :param device: Filter by device name (partial match). + :type device: str + :param fs_type: Filter by filesystem type (comma separated). + :type fs_type: str + :param mount_policy: Filter by mount policy. + :type mount_policy: str + :param status: Filter by mount status. + :type status: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_storage_serialize( + limit=limit, + offset=offset, + sort=sort, + identifier=identifier, + device=device, + fs_type=fs_type, + mount_policy=mount_policy, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_storage_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (prefix a field with \"-\" for descending).")] = None, + identifier: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma separated).")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match).")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated).")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy.")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by mount status.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List server-attached storage devices + + Lists the physical storage devices (for example USB drives or disks) plugged into an on-site Corellium server, with their name, filesystem, label, vendor, whether they are mounted, and whether they are mounted read-only (`RO`) or read-write (`RW`). Use a device's `id` with `v3ListStorageFiles` to browse its contents. For cluster administrators on on-site deployments; not available on cloud installations. Results are paginated and can be filtered and sorted with the query parameters. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order (prefix a field with \"-\" for descending). + :type sort: str + :param identifier: Filter by identifier (comma separated). + :type identifier: str + :param device: Filter by device name (partial match). + :type device: str + :param fs_type: Filter by filesystem type (comma separated). + :type fs_type: str + :param mount_policy: Filter by mount policy. + :type mount_policy: str + :param status: Filter by mount status. + :type status: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_storage_serialize( + limit=limit, + offset=offset, + sort=sort, + identifier=identifier, + device=device, + fs_type=fs_type, + mount_policy=mount_policy, + status=status, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_storage_serialize( + self, + limit, + offset, + sort, + identifier, + device, + fs_type, + mount_policy, + status, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if identifier is not None: + + _query_params.append(('identifier', identifier)) + + if device is not None: + + _query_params.append(('device', device)) + + if fs_type is not None: + + _query_params.append(('fsType', fs_type)) + + if mount_policy is not None: + + _query_params.append(('mountPolicy', mount_policy)) + + if status is not None: + + _query_params.append(('status', status)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/storage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_storage_files( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + path: Annotated[StrictStr, Field(description="Folder to list, relative to the top of the storage device. Slashes are kept as path separators.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (prefix a field with \"-\" for descending).")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by name (case-insensitive exact match, comma separated).")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (case-insensitive partial match, e.g. \"file\" or \"dir\").")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StorageFileList: + """List storage files + + Lists the files and folders at one path on a server-attached storage device (see `v3ListStorage`), with each entry's name, type, size and modification time. Use `/` to list the top level, then pass a folder's path to go deeper. The path must be a folder; a file path returns 400, and paths that try to leave the device (for example with `..`) are rejected. Returns 404 if the device or path does not exist. + + :param id: Storage device identifier. (required) + :type id: str + :param path: Folder to list, relative to the top of the storage device. Slashes are kept as path separators. (required) + :type path: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order (prefix a field with \"-\" for descending). + :type sort: str + :param name: Filter by name (case-insensitive exact match, comma separated). + :type name: str + :param type: Filter by type (case-insensitive partial match, e.g. \"file\" or \"dir\"). + :type type: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_storage_files_serialize( + id=id, + path=path, + limit=limit, + offset=offset, + sort=sort, + name=name, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageFileList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_storage_files_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + path: Annotated[StrictStr, Field(description="Folder to list, relative to the top of the storage device. Slashes are kept as path separators.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (prefix a field with \"-\" for descending).")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by name (case-insensitive exact match, comma separated).")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (case-insensitive partial match, e.g. \"file\" or \"dir\").")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StorageFileList]: + """List storage files + + Lists the files and folders at one path on a server-attached storage device (see `v3ListStorage`), with each entry's name, type, size and modification time. Use `/` to list the top level, then pass a folder's path to go deeper. The path must be a folder; a file path returns 400, and paths that try to leave the device (for example with `..`) are rejected. Returns 404 if the device or path does not exist. + + :param id: Storage device identifier. (required) + :type id: str + :param path: Folder to list, relative to the top of the storage device. Slashes are kept as path separators. (required) + :type path: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order (prefix a field with \"-\" for descending). + :type sort: str + :param name: Filter by name (case-insensitive exact match, comma separated). + :type name: str + :param type: Filter by type (case-insensitive partial match, e.g. \"file\" or \"dir\"). + :type type: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_storage_files_serialize( + id=id, + path=path, + limit=limit, + offset=offset, + sort=sort, + name=name, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageFileList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_storage_files_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier.")], + path: Annotated[StrictStr, Field(description="Folder to list, relative to the top of the storage device. Slashes are kept as path separators.")], + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (prefix a field with \"-\" for descending).")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by name (case-insensitive exact match, comma separated).")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (case-insensitive partial match, e.g. \"file\" or \"dir\").")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List storage files + + Lists the files and folders at one path on a server-attached storage device (see `v3ListStorage`), with each entry's name, type, size and modification time. Use `/` to list the top level, then pass a folder's path to go deeper. The path must be a folder; a file path returns 400, and paths that try to leave the device (for example with `..`) are rejected. Returns 404 if the device or path does not exist. + + :param id: Storage device identifier. (required) + :type id: str + :param path: Folder to list, relative to the top of the storage device. Slashes are kept as path separators. (required) + :type path: str + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param sort: Sort order (prefix a field with \"-\" for descending). + :type sort: str + :param name: Filter by name (case-insensitive exact match, comma separated). + :type name: str + :param type: Filter by type (case-insensitive partial match, e.g. \"file\" or \"dir\"). + :type type: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_storage_files_serialize( + id=id, + path=path, + limit=limit, + offset=offset, + sort=sort, + name=name, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "StorageFileList", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_storage_files_serialize( + self, + id, + path, + limit, + offset, + sort, + name, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + if path is not None: + _path_params['path'] = path + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if name is not None: + + _query_params.append(('name', name)) + + if type is not None: + + _query_params.append(('type', type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/storage/{id}/files/{path}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/storage_v1_api.py b/corellium/api/storage_v1_api.py new file mode 100644 index 0000000..29ee774 --- /dev/null +++ b/corellium/api/storage_v1_api.py @@ -0,0 +1,2052 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictFloat, StrictInt, StrictStr +from typing import Any, Dict, Optional, Union +from typing_extensions import Annotated +from corellium.models.get_storage_response import GetStorageResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class StorageV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_attach_storage_cluster( + self, + id: Annotated[StrictStr, Field(description="The unique identifier of the storage media")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """(Deprecated) Mount and attach a storage device + + Initiates an asynchronous mount job for a registered storage device. If already mounted, returns status 200. If not, queues a background job and returns 202. + + :param id: The unique identifier of the storage media (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/storage/{id}/attach is deprecated.", DeprecationWarning) + + _param = self._v1_attach_storage_cluster_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '202': "object", + '403': "ApiErrorV1", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_attach_storage_cluster_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The unique identifier of the storage media")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """(Deprecated) Mount and attach a storage device + + Initiates an asynchronous mount job for a registered storage device. If already mounted, returns status 200. If not, queues a background job and returns 202. + + :param id: The unique identifier of the storage media (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/storage/{id}/attach is deprecated.", DeprecationWarning) + + _param = self._v1_attach_storage_cluster_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '202': "object", + '403': "ApiErrorV1", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_attach_storage_cluster_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The unique identifier of the storage media")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Mount and attach a storage device + + Initiates an asynchronous mount job for a registered storage device. If already mounted, returns status 200. If not, queues a background job and returns 202. + + :param id: The unique identifier of the storage media (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/storage/{id}/attach is deprecated.", DeprecationWarning) + + _param = self._v1_attach_storage_cluster_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '202': "object", + '403': "ApiErrorV1", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_attach_storage_cluster_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/cluster/storage/{id}/attach', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_eject_storage_cluster( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier (UUID)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """(Deprecated) Eject/Unmount removable media + + Initiates an asynchronous unmount job for the physical storage device. If the device is already unmounted, returns success. If mounted, creates a background job to safely unmount. + + :param id: Storage device identifier (UUID) (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/storage/{id}/eject is deprecated.", DeprecationWarning) + + _param = self._v1_eject_storage_cluster_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '202': "object", + '403': "ApiErrorV1", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_eject_storage_cluster_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier (UUID)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """(Deprecated) Eject/Unmount removable media + + Initiates an asynchronous unmount job for the physical storage device. If the device is already unmounted, returns success. If mounted, creates a background job to safely unmount. + + :param id: Storage device identifier (UUID) (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/storage/{id}/eject is deprecated.", DeprecationWarning) + + _param = self._v1_eject_storage_cluster_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '202': "object", + '403': "ApiErrorV1", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_eject_storage_cluster_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier (UUID)")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Eject/Unmount removable media + + Initiates an asynchronous unmount job for the physical storage device. If the device is already unmounted, returns success. If mounted, creates a background job to safely unmount. + + :param id: Storage device identifier (UUID) (required) + :type id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/cluster/storage/{id}/eject is deprecated.", DeprecationWarning) + + _param = self._v1_eject_storage_cluster_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '202': "object", + '403': "ApiErrorV1", + '404': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_eject_storage_cluster_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/cluster/storage/{id}/eject', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_storage( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + identifier: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma separated)")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match)")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated)")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy (RO or RW)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (unmounted or mounted)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"device\" or \"-device\")")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetStorageResponse: + """(Deprecated) Get storage devices + + List all attached storage devices. This endpoint is only available to all authenticated users. + + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param identifier: Filter by identifier (comma separated) + :type identifier: str + :param device: Filter by device name (partial match) + :type device: str + :param fs_type: Filter by filesystem type (comma separated) + :type fs_type: str + :param mount_policy: Filter by mount policy (RO or RW) + :type mount_policy: str + :param status: Filter by status (unmounted or mounted) + :type status: str + :param sort: Sort order (e.g. \"device\" or \"-device\") + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/storage is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_serialize( + limit=limit, + offset=offset, + identifier=identifier, + device=device, + fs_type=fs_type, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetStorageResponse", + '401': "object", + '403': "ApiErrorV1", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_storage_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + identifier: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma separated)")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match)")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated)")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy (RO or RW)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (unmounted or mounted)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"device\" or \"-device\")")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetStorageResponse]: + """(Deprecated) Get storage devices + + List all attached storage devices. This endpoint is only available to all authenticated users. + + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param identifier: Filter by identifier (comma separated) + :type identifier: str + :param device: Filter by device name (partial match) + :type device: str + :param fs_type: Filter by filesystem type (comma separated) + :type fs_type: str + :param mount_policy: Filter by mount policy (RO or RW) + :type mount_policy: str + :param status: Filter by status (unmounted or mounted) + :type status: str + :param sort: Sort order (e.g. \"device\" or \"-device\") + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/storage is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_serialize( + limit=limit, + offset=offset, + identifier=identifier, + device=device, + fs_type=fs_type, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetStorageResponse", + '401': "object", + '403': "ApiErrorV1", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_storage_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + identifier: Annotated[Optional[StrictStr], Field(description="Filter by identifier (comma separated)")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match)")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated)")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy (RO or RW)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (unmounted or mounted)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"device\" or \"-device\")")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get storage devices + + List all attached storage devices. This endpoint is only available to all authenticated users. + + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param identifier: Filter by identifier (comma separated) + :type identifier: str + :param device: Filter by device name (partial match) + :type device: str + :param fs_type: Filter by filesystem type (comma separated) + :type fs_type: str + :param mount_policy: Filter by mount policy (RO or RW) + :type mount_policy: str + :param status: Filter by status (unmounted or mounted) + :type status: str + :param sort: Sort order (e.g. \"device\" or \"-device\") + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/storage is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_serialize( + limit=limit, + offset=offset, + identifier=identifier, + device=device, + fs_type=fs_type, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetStorageResponse", + '401': "object", + '403': "ApiErrorV1", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_storage_serialize( + self, + limit, + offset, + identifier, + device, + fs_type, + mount_policy, + status, + sort, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if identifier is not None: + + _query_params.append(('identifier', identifier)) + + if device is not None: + + _query_params.append(('device', device)) + + if fs_type is not None: + + _query_params.append(('fsType', fs_type)) + + if mount_policy is not None: + + _query_params.append(('mountPolicy', mount_policy)) + + if status is not None: + + _query_params.append(('status', status)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/storage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_storage_cluster( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match)")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated)")] = None, + fs_uuid: Annotated[Optional[StrictStr], Field(description="Filter by filesystem UUID (partial match)")] = None, + label: Annotated[Optional[StrictStr], Field(description="Filter by label (partial match)")] = None, + serial: Annotated[Optional[StrictStr], Field(description="Filter by serial number (partial match)")] = None, + vendor: Annotated[Optional[StrictStr], Field(description="Filter by vendor (partial match)")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by model (partial match)")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy (RO or RW)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (unmounted or mounted)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"device\" or \"-device\")")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetStorageResponse: + """(Deprecated) Get storage devices + + List all attached storage devices. This endpoint is only available to cluster administrators. + + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param device: Filter by device name (partial match) + :type device: str + :param fs_type: Filter by filesystem type (comma separated) + :type fs_type: str + :param fs_uuid: Filter by filesystem UUID (partial match) + :type fs_uuid: str + :param label: Filter by label (partial match) + :type label: str + :param serial: Filter by serial number (partial match) + :type serial: str + :param vendor: Filter by vendor (partial match) + :type vendor: str + :param model: Filter by model (partial match) + :type model: str + :param mount_policy: Filter by mount policy (RO or RW) + :type mount_policy: str + :param status: Filter by status (unmounted or mounted) + :type status: str + :param sort: Sort order (e.g. \"device\" or \"-device\") + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/storage is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_cluster_serialize( + limit=limit, + offset=offset, + device=device, + fs_type=fs_type, + fs_uuid=fs_uuid, + label=label, + serial=serial, + vendor=vendor, + model=model, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetStorageResponse", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_storage_cluster_with_http_info( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match)")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated)")] = None, + fs_uuid: Annotated[Optional[StrictStr], Field(description="Filter by filesystem UUID (partial match)")] = None, + label: Annotated[Optional[StrictStr], Field(description="Filter by label (partial match)")] = None, + serial: Annotated[Optional[StrictStr], Field(description="Filter by serial number (partial match)")] = None, + vendor: Annotated[Optional[StrictStr], Field(description="Filter by vendor (partial match)")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by model (partial match)")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy (RO or RW)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (unmounted or mounted)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"device\" or \"-device\")")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetStorageResponse]: + """(Deprecated) Get storage devices + + List all attached storage devices. This endpoint is only available to cluster administrators. + + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param device: Filter by device name (partial match) + :type device: str + :param fs_type: Filter by filesystem type (comma separated) + :type fs_type: str + :param fs_uuid: Filter by filesystem UUID (partial match) + :type fs_uuid: str + :param label: Filter by label (partial match) + :type label: str + :param serial: Filter by serial number (partial match) + :type serial: str + :param vendor: Filter by vendor (partial match) + :type vendor: str + :param model: Filter by model (partial match) + :type model: str + :param mount_policy: Filter by mount policy (RO or RW) + :type mount_policy: str + :param status: Filter by status (unmounted or mounted) + :type status: str + :param sort: Sort order (e.g. \"device\" or \"-device\") + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/storage is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_cluster_serialize( + limit=limit, + offset=offset, + device=device, + fs_type=fs_type, + fs_uuid=fs_uuid, + label=label, + serial=serial, + vendor=vendor, + model=model, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetStorageResponse", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_storage_cluster_without_preload_content( + self, + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + device: Annotated[Optional[StrictStr], Field(description="Filter by device name (partial match)")] = None, + fs_type: Annotated[Optional[StrictStr], Field(description="Filter by filesystem type (comma separated)")] = None, + fs_uuid: Annotated[Optional[StrictStr], Field(description="Filter by filesystem UUID (partial match)")] = None, + label: Annotated[Optional[StrictStr], Field(description="Filter by label (partial match)")] = None, + serial: Annotated[Optional[StrictStr], Field(description="Filter by serial number (partial match)")] = None, + vendor: Annotated[Optional[StrictStr], Field(description="Filter by vendor (partial match)")] = None, + model: Annotated[Optional[StrictStr], Field(description="Filter by model (partial match)")] = None, + mount_policy: Annotated[Optional[StrictStr], Field(description="Filter by mount policy (RO or RW)")] = None, + status: Annotated[Optional[StrictStr], Field(description="Filter by status (unmounted or mounted)")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g. \"device\" or \"-device\")")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get storage devices + + List all attached storage devices. This endpoint is only available to cluster administrators. + + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param device: Filter by device name (partial match) + :type device: str + :param fs_type: Filter by filesystem type (comma separated) + :type fs_type: str + :param fs_uuid: Filter by filesystem UUID (partial match) + :type fs_uuid: str + :param label: Filter by label (partial match) + :type label: str + :param serial: Filter by serial number (partial match) + :type serial: str + :param vendor: Filter by vendor (partial match) + :type vendor: str + :param model: Filter by model (partial match) + :type model: str + :param mount_policy: Filter by mount policy (RO or RW) + :type mount_policy: str + :param status: Filter by status (unmounted or mounted) + :type status: str + :param sort: Sort order (e.g. \"device\" or \"-device\") + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/cluster/storage is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_cluster_serialize( + limit=limit, + offset=offset, + device=device, + fs_type=fs_type, + fs_uuid=fs_uuid, + label=label, + serial=serial, + vendor=vendor, + model=model, + mount_policy=mount_policy, + status=status, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetStorageResponse", + '401': "object", + '403': "object", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_storage_cluster_serialize( + self, + limit, + offset, + device, + fs_type, + fs_uuid, + label, + serial, + vendor, + model, + mount_policy, + status, + sort, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if device is not None: + + _query_params.append(('device', device)) + + if fs_type is not None: + + _query_params.append(('fsType', fs_type)) + + if fs_uuid is not None: + + _query_params.append(('fsUUID', fs_uuid)) + + if label is not None: + + _query_params.append(('label', label)) + + if serial is not None: + + _query_params.append(('serial', serial)) + + if vendor is not None: + + _query_params.append(('vendor', vendor)) + + if model is not None: + + _query_params.append(('model', model)) + + if mount_policy is not None: + + _query_params.append(('mountPolicy', mount_policy)) + + if status is not None: + + _query_params.append(('status', status)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/cluster/storage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_list_storage_files( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier (MediaStore identifier)")], + path: Annotated[StrictStr, Field(description="Path within the storage device to list")], + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by name (case insensitive exact match, comma separated for multiple values)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (case insensitive partial match, e.g. \"file\" or \"dir\")")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g., 'name', '-name', 'type,-size,-lastModifiedTime'). Prefix with '-' for descending.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """(Deprecated) List Storage Files + + List files from attached storage devices. Looks up the storage device by identifier, then lists filesystem contents at the given path within the device's mount point. This endpoint is available to all authenticated users. + + :param id: Storage device identifier (MediaStore identifier) (required) + :type id: str + :param path: Path within the storage device to list (required) + :type path: str + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param name: Filter by name (case insensitive exact match, comma separated for multiple values) + :type name: str + :param type: Filter by type (case insensitive partial match, e.g. \"file\" or \"dir\") + :type type: str + :param sort: Sort order (e.g., 'name', '-name', 'type,-size,-lastModifiedTime'). Prefix with '-' for descending. + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/storage/{id}/files/{path} is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_files_serialize( + id=id, + path=path, + limit=limit, + offset=offset, + name=name, + type=type, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ValidationError", + '401': "object", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_list_storage_files_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier (MediaStore identifier)")], + path: Annotated[StrictStr, Field(description="Path within the storage device to list")], + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by name (case insensitive exact match, comma separated for multiple values)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (case insensitive partial match, e.g. \"file\" or \"dir\")")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g., 'name', '-name', 'type,-size,-lastModifiedTime'). Prefix with '-' for descending.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """(Deprecated) List Storage Files + + List files from attached storage devices. Looks up the storage device by identifier, then lists filesystem contents at the given path within the device's mount point. This endpoint is available to all authenticated users. + + :param id: Storage device identifier (MediaStore identifier) (required) + :type id: str + :param path: Path within the storage device to list (required) + :type path: str + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param name: Filter by name (case insensitive exact match, comma separated for multiple values) + :type name: str + :param type: Filter by type (case insensitive partial match, e.g. \"file\" or \"dir\") + :type type: str + :param sort: Sort order (e.g., 'name', '-name', 'type,-size,-lastModifiedTime'). Prefix with '-' for descending. + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/storage/{id}/files/{path} is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_files_serialize( + id=id, + path=path, + limit=limit, + offset=offset, + name=name, + type=type, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ValidationError", + '401': "object", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_list_storage_files_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Storage device identifier (MediaStore identifier)")], + path: Annotated[StrictStr, Field(description="Path within the storage device to list")], + limit: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Maximum number of results to return (1–1000, default: 100)")] = None, + offset: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Number of results to skip (default: 0)")] = None, + name: Annotated[Optional[StrictStr], Field(description="Filter by name (case insensitive exact match, comma separated for multiple values)")] = None, + type: Annotated[Optional[StrictStr], Field(description="Filter by type (case insensitive partial match, e.g. \"file\" or \"dir\")")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Sort order (e.g., 'name', '-name', 'type,-size,-lastModifiedTime'). Prefix with '-' for descending.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List Storage Files + + List files from attached storage devices. Looks up the storage device by identifier, then lists filesystem contents at the given path within the device's mount point. This endpoint is available to all authenticated users. + + :param id: Storage device identifier (MediaStore identifier) (required) + :type id: str + :param path: Path within the storage device to list (required) + :type path: str + :param limit: Maximum number of results to return (1–1000, default: 100) + :type limit: float + :param offset: Number of results to skip (default: 0) + :type offset: float + :param name: Filter by name (case insensitive exact match, comma separated for multiple values) + :type name: str + :param type: Filter by type (case insensitive partial match, e.g. \"file\" or \"dir\") + :type type: str + :param sort: Sort order (e.g., 'name', '-name', 'type,-size,-lastModifiedTime'). Prefix with '-' for descending. + :type sort: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/storage/{id}/files/{path} is deprecated.", DeprecationWarning) + + _param = self._v1_list_storage_files_serialize( + id=id, + path=path, + limit=limit, + offset=offset, + name=name, + type=type, + sort=sort, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ValidationError", + '401': "object", + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + '500': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_list_storage_files_serialize( + self, + id, + path, + limit, + offset, + name, + type, + sort, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + if path is not None: + _path_params['path'] = path + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + if name is not None: + + _query_params.append(('name', name)) + + if type is not None: + + _query_params.append(('type', type)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/storage/{id}/files/{path}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/teams_api.py b/corellium/api/teams_api.py new file mode 100644 index 0000000..02506c4 --- /dev/null +++ b/corellium/api/teams_api.py @@ -0,0 +1,1996 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from corellium.models.create_team_body import CreateTeamBody +from corellium.models.team_created import TeamCreated +from corellium.models.teams_list_response import TeamsListResponse +from corellium.models.update_team_body import UpdateTeamBody + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class TeamsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_add_user_to_team( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Add a user to a team + + **Required role:** Domain administrator. Adds a user to a team, so the user gets every project role the team has. Requires a domain administrator. Available for Enterprise accounts only. + + :param team_id: Team identifier. (required) + :type team_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_to_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_add_user_to_team_with_http_info( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add a user to a team + + **Required role:** Domain administrator. Adds a user to a team, so the user gets every project role the team has. Requires a domain administrator. Available for Enterprise accounts only. + + :param team_id: Team identifier. (required) + :type team_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_to_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_add_user_to_team_without_preload_content( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add a user to a team + + **Required role:** Domain administrator. Adds a user to a team, so the user gets every project role the team has. Requires a domain administrator. Available for Enterprise accounts only. + + :param team_id: Team identifier. (required) + :type team_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_add_user_to_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_add_user_to_team_serialize( + self, + team_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['teamId'] = team_id + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/teams/{teamId}/users/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_create_team( + self, + create_team_body: CreateTeamBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TeamCreated: + """Create a team + + **Required role:** Domain administrator. Creates an empty team in your domain and returns its ID. Requires a domain administrator. Next, add members with `v3AddUserToTeam` and give the team project access with `PUT /v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}`. Available for Enterprise accounts only. + + :param create_team_body: (required) + :type create_team_body: CreateTeamBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_team_serialize( + create_team_body=create_team_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TeamCreated", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_team_with_http_info( + self, + create_team_body: CreateTeamBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamCreated]: + """Create a team + + **Required role:** Domain administrator. Creates an empty team in your domain and returns its ID. Requires a domain administrator. Next, add members with `v3AddUserToTeam` and give the team project access with `PUT /v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}`. Available for Enterprise accounts only. + + :param create_team_body: (required) + :type create_team_body: CreateTeamBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_team_serialize( + create_team_body=create_team_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TeamCreated", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_team_without_preload_content( + self, + create_team_body: CreateTeamBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a team + + **Required role:** Domain administrator. Creates an empty team in your domain and returns its ID. Requires a domain administrator. Next, add members with `v3AddUserToTeam` and give the team project access with `PUT /v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}`. Available for Enterprise accounts only. + + :param create_team_body: (required) + :type create_team_body: CreateTeamBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_team_serialize( + create_team_body=create_team_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TeamCreated", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_team_serialize( + self, + create_team_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_team_body is not None: + _body_params = create_team_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/teams', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_team( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a team + + **Required role:** Domain administrator. Deletes a team. Requires a domain administrator. The users in it are not deleted, but they lose any project access they had only through this team. Available for Enterprise accounts only. Deletes are idempotent: a `teamId` that does not exist, including one that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param team_id: Team identifier. (required) + :type team_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_team_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_team_with_http_info( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a team + + **Required role:** Domain administrator. Deletes a team. Requires a domain administrator. The users in it are not deleted, but they lose any project access they had only through this team. Available for Enterprise accounts only. Deletes are idempotent: a `teamId` that does not exist, including one that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param team_id: Team identifier. (required) + :type team_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_team_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_team_without_preload_content( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a team + + **Required role:** Domain administrator. Deletes a team. Requires a domain administrator. The users in it are not deleted, but they lose any project access they had only through this team. Available for Enterprise accounts only. Deletes are idempotent: a `teamId` that does not exist, including one that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param team_id: Team identifier. (required) + :type team_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_team_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_team_serialize( + self, + team_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['teamId'] = team_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/teams/{teamId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_teams( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TeamsListResponse: + """List teams + + Lists the teams in your domain. A team is a named group of users; giving a team a role on a project (with the Roles endpoints) gives every member that access, which is easier than granting each user separately. Includes the built-in `all-users` team, which always contains everyone in the domain. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_teams_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamsListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_teams_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamsListResponse]: + """List teams + + Lists the teams in your domain. A team is a named group of users; giving a team a role on a project (with the Roles endpoints) gives every member that access, which is easier than granting each user separately. Includes the built-in `all-users` team, which always contains everyone in the domain. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_teams_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamsListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_teams_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List teams + + Lists the teams in your domain. A team is a named group of users; giving a team a role on a project (with the Roles endpoints) gives every member that access, which is easier than granting each user separately. Includes the built-in `all-users` team, which always contains everyone in the domain. Available for Enterprise accounts only. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_teams_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamsListResponse", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_teams_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/teams', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_remove_user_from_team( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove a user from a team + + **Required role:** Domain administrator. Removes a user from a team, so the user loses the project access they had only through this team. Requires a domain administrator. Available for Enterprise accounts only. Removal is idempotent: if the user is not a member of the team, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `teamId` or `userId` that does not exist is also a successful no-op that returns 204. + + :param team_id: Team identifier. (required) + :type team_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_from_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_remove_user_from_team_with_http_info( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove a user from a team + + **Required role:** Domain administrator. Removes a user from a team, so the user loses the project access they had only through this team. Requires a domain administrator. Available for Enterprise accounts only. Removal is idempotent: if the user is not a member of the team, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `teamId` or `userId` that does not exist is also a successful no-op that returns 204. + + :param team_id: Team identifier. (required) + :type team_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_from_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_remove_user_from_team_without_preload_content( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove a user from a team + + **Required role:** Domain administrator. Removes a user from a team, so the user loses the project access they had only through this team. Requires a domain administrator. Available for Enterprise accounts only. Removal is idempotent: if the user is not a member of the team, the call is a no-op and still returns 204. Repeated calls therefore also return 204. A `teamId` or `userId` that does not exist is also a successful no-op that returns 204. + + :param team_id: Team identifier. (required) + :type team_id: str + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_remove_user_from_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_remove_user_from_team_serialize( + self, + team_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['teamId'] = team_id + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/teams/{teamId}/users/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_update_team( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + update_team_body: Optional[UpdateTeamBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Update a team + + **Required role:** Domain administrator. Renames a team or changes its settings. Requires a domain administrator. Available for Enterprise accounts only. + + :param team_id: Team identifier. (required) + :type team_id: str + :param update_team_body: + :type update_team_body: UpdateTeamBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_team_serialize( + team_id=team_id, + update_team_body=update_team_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_update_team_with_http_info( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + update_team_body: Optional[UpdateTeamBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Update a team + + **Required role:** Domain administrator. Renames a team or changes its settings. Requires a domain administrator. Available for Enterprise accounts only. + + :param team_id: Team identifier. (required) + :type team_id: str + :param update_team_body: + :type update_team_body: UpdateTeamBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_team_serialize( + team_id=team_id, + update_team_body=update_team_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_update_team_without_preload_content( + self, + team_id: Annotated[StrictStr, Field(description="Team identifier.")], + update_team_body: Optional[UpdateTeamBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a team + + **Required role:** Domain administrator. Renames a team or changes its settings. Requires a domain administrator. Available for Enterprise accounts only. + + :param team_id: Team identifier. (required) + :type team_id: str + :param update_team_body: + :type update_team_body: UpdateTeamBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_team_serialize( + team_id=team_id, + update_team_body=update_team_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_update_team_serialize( + self, + team_id, + update_team_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['teamId'] = team_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_team_body is not None: + _body_params = update_team_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/teams/{teamId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/teams_v1_api.py b/corellium/api/teams_v1_api.py new file mode 100644 index 0000000..cfbcf00 --- /dev/null +++ b/corellium/api/teams_v1_api.py @@ -0,0 +1,1985 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.create_team import CreateTeam +from corellium.models.team_create import TeamCreate +from corellium.models.team_v1 import TeamV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class TeamsV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_add_user_to_team( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Add user to team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/teams/{teamId}/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_user_to_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_add_user_to_team_with_http_info( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Add user to team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/teams/{teamId}/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_user_to_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_add_user_to_team_without_preload_content( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Add user to team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PUT /v1/teams/{teamId}/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_add_user_to_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_add_user_to_team_serialize( + self, + team_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['teamId'] = team_id + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v1/teams/{teamId}/users/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_remove_user_from_team( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Remove user from team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/teams/{teamId}/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_user_from_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_remove_user_from_team_with_http_info( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Remove user from team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/teams/{teamId}/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_user_from_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_remove_user_from_team_without_preload_content( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + user_id: Annotated[StrictStr, Field(description="User ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Remove user from team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param user_id: User ID - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/teams/{teamId}/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_remove_user_from_team_serialize( + team_id=team_id, + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_remove_user_from_team_serialize( + self, + team_id, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['teamId'] = team_id + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/teams/{teamId}/users/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_team_change( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + create_team: CreateTeam, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Update team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param create_team: (required) + :type create_team: CreateTeam + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/teams/{teamId} is deprecated.", DeprecationWarning) + + _param = self._v1_team_change_serialize( + team_id=team_id, + create_team=create_team, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_team_change_with_http_info( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + create_team: CreateTeam, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Update team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param create_team: (required) + :type create_team: CreateTeam + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/teams/{teamId} is deprecated.", DeprecationWarning) + + _param = self._v1_team_change_serialize( + team_id=team_id, + create_team=create_team, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_team_change_without_preload_content( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + create_team: CreateTeam, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param create_team: (required) + :type create_team: CreateTeam + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/teams/{teamId} is deprecated.", DeprecationWarning) + + _param = self._v1_team_change_serialize( + team_id=team_id, + create_team=create_team, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '404': "ApiNotFoundErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_team_change_serialize( + self, + team_id, + create_team, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['teamId'] = team_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_team is not None: + _body_params = create_team + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/teams/{teamId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_team_create( + self, + create_team: CreateTeam, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TeamCreate: + """(Deprecated) Create team + + This endpoint is available for Enterprise accounts only + + :param create_team: (required) + :type create_team: CreateTeam + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/teams is deprecated.", DeprecationWarning) + + _param = self._v1_team_create_serialize( + create_team=create_team, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamCreate", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_team_create_with_http_info( + self, + create_team: CreateTeam, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TeamCreate]: + """(Deprecated) Create team + + This endpoint is available for Enterprise accounts only + + :param create_team: (required) + :type create_team: CreateTeam + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/teams is deprecated.", DeprecationWarning) + + _param = self._v1_team_create_serialize( + create_team=create_team, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamCreate", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_team_create_without_preload_content( + self, + create_team: CreateTeam, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create team + + This endpoint is available for Enterprise accounts only + + :param create_team: (required) + :type create_team: CreateTeam + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/teams is deprecated.", DeprecationWarning) + + _param = self._v1_team_create_serialize( + create_team=create_team, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TeamCreate", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_team_create_serialize( + self, + create_team, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_team is not None: + _body_params = create_team + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/teams', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_team_delete( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/teams/{teamId} is deprecated.", DeprecationWarning) + + _param = self._v1_team_delete_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_team_delete_with_http_info( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/teams/{teamId} is deprecated.", DeprecationWarning) + + _param = self._v1_team_delete_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_team_delete_without_preload_content( + self, + team_id: Annotated[StrictStr, Field(description="Team ID - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete team + + This endpoint is available for Enterprise accounts only + + :param team_id: Team ID - uuid (required) + :type team_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/teams/{teamId} is deprecated.", DeprecationWarning) + + _param = self._v1_team_delete_serialize( + team_id=team_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + '500': "ApiInternalConsistencyError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_team_delete_serialize( + self, + team_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if team_id is not None: + _path_params['teamId'] = team_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/teams/{teamId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_teams( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[TeamV1]: + """(Deprecated) Get teams + + This endpoint is available for Enterprise accounts only + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/teams is deprecated.", DeprecationWarning) + + _param = self._v1_teams_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[TeamV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_teams_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[TeamV1]]: + """(Deprecated) Get teams + + This endpoint is available for Enterprise accounts only + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/teams is deprecated.", DeprecationWarning) + + _param = self._v1_teams_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[TeamV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_teams_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Get teams + + This endpoint is available for Enterprise accounts only + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/teams is deprecated.", DeprecationWarning) + + _param = self._v1_teams_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[TeamV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_teams_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/teams', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/totp_api.py b/corellium/api/totp_api.py new file mode 100644 index 0000000..355a138 --- /dev/null +++ b/corellium/api/totp_api.py @@ -0,0 +1,1002 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from corellium.models.login_result import LoginResult +from corellium.models.totp_disable_body import TotpDisableBody +from corellium.models.totp_enable_body import TotpEnableBody +from corellium.models.totp_generate_response import TotpGenerateResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class TOTPApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_disable_totp( + self, + totp_disable_body: TotpDisableBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LoginResult: + """Disable TOTP for this user + + Turns two-factor sign-in off for your account. Send your `password` and a current six-digit code (`totpToken`) from your authenticator app. On success a confirmation email is sent, signing in no longer needs a code, and the response is a fresh login result with a new session token. Returns 401 if the password or code is wrong. + + :param totp_disable_body: (required) + :type totp_disable_body: TotpDisableBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_disable_totp_serialize( + totp_disable_body=totp_disable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_disable_totp_with_http_info( + self, + totp_disable_body: TotpDisableBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LoginResult]: + """Disable TOTP for this user + + Turns two-factor sign-in off for your account. Send your `password` and a current six-digit code (`totpToken`) from your authenticator app. On success a confirmation email is sent, signing in no longer needs a code, and the response is a fresh login result with a new session token. Returns 401 if the password or code is wrong. + + :param totp_disable_body: (required) + :type totp_disable_body: TotpDisableBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_disable_totp_serialize( + totp_disable_body=totp_disable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_disable_totp_without_preload_content( + self, + totp_disable_body: TotpDisableBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Disable TOTP for this user + + Turns two-factor sign-in off for your account. Send your `password` and a current six-digit code (`totpToken`) from your authenticator app. On success a confirmation email is sent, signing in no longer needs a code, and the response is a fresh login result with a new session token. Returns 401 if the password or code is wrong. + + :param totp_disable_body: (required) + :type totp_disable_body: TotpDisableBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_disable_totp_serialize( + totp_disable_body=totp_disable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_disable_totp_serialize( + self, + totp_disable_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if totp_disable_body is not None: + _body_params = totp_disable_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/totp/disable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_enable_totp( + self, + totp_enable_body: TotpEnableBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LoginResult: + """Enable TOTP for this user + + Step 2 of turning on two-factor sign-in. Send the `secret` from `v3GenerateTotp`, the current six-digit code (`totpToken`) the authenticator app shows for it, and your account `password`. If the password is right and the code matches, two-factor sign-in is turned on and a confirmation email is sent. From then on, signing in with a username and password also needs `totpToken` (see `v3AuthLogin`). The response is a fresh login result with a new session token; use it for later requests. Returns 401 if the password or code is wrong; generate a new code and retry. + + :param totp_enable_body: (required) + :type totp_enable_body: TotpEnableBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_enable_totp_serialize( + totp_enable_body=totp_enable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_enable_totp_with_http_info( + self, + totp_enable_body: TotpEnableBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LoginResult]: + """Enable TOTP for this user + + Step 2 of turning on two-factor sign-in. Send the `secret` from `v3GenerateTotp`, the current six-digit code (`totpToken`) the authenticator app shows for it, and your account `password`. If the password is right and the code matches, two-factor sign-in is turned on and a confirmation email is sent. From then on, signing in with a username and password also needs `totpToken` (see `v3AuthLogin`). The response is a fresh login result with a new session token; use it for later requests. Returns 401 if the password or code is wrong; generate a new code and retry. + + :param totp_enable_body: (required) + :type totp_enable_body: TotpEnableBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_enable_totp_serialize( + totp_enable_body=totp_enable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_enable_totp_without_preload_content( + self, + totp_enable_body: TotpEnableBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable TOTP for this user + + Step 2 of turning on two-factor sign-in. Send the `secret` from `v3GenerateTotp`, the current six-digit code (`totpToken`) the authenticator app shows for it, and your account `password`. If the password is right and the code matches, two-factor sign-in is turned on and a confirmation email is sent. From then on, signing in with a username and password also needs `totpToken` (see `v3AuthLogin`). The response is a fresh login result with a new session token; use it for later requests. Returns 401 if the password or code is wrong; generate a new code and retry. + + :param totp_enable_body: (required) + :type totp_enable_body: TotpEnableBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_enable_totp_serialize( + totp_enable_body=totp_enable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LoginResult", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_enable_totp_serialize( + self, + totp_enable_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if totp_enable_body is not None: + _body_params = totp_enable_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/totp/enable', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_generate_totp( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TotpGenerateResponse: + """Generate a TOTP secret + + Step 1 of turning on two-factor sign-in (TOTP: six-digit codes from an authenticator app such as Google Authenticator, 1Password or Authy). Creates a new secret and returns it both as text (`secret`) and as a QR code image. Show the QR code to the user to scan with their authenticator app, or let them type the secret in. Nothing is turned on yet, and the secret is not saved: two-factor sign-in starts only after step 2, `v3EnableTotp`, succeeds. Keep the `secret` value; step 2 needs it. Calling this again creates a different secret. Returns 403 if your deployment is not licensed for two-factor sign-in. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_generate_totp_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TotpGenerateResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_generate_totp_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TotpGenerateResponse]: + """Generate a TOTP secret + + Step 1 of turning on two-factor sign-in (TOTP: six-digit codes from an authenticator app such as Google Authenticator, 1Password or Authy). Creates a new secret and returns it both as text (`secret`) and as a QR code image. Show the QR code to the user to scan with their authenticator app, or let them type the secret in. Nothing is turned on yet, and the secret is not saved: two-factor sign-in starts only after step 2, `v3EnableTotp`, succeeds. Keep the `secret` value; step 2 needs it. Calling this again creates a different secret. Returns 403 if your deployment is not licensed for two-factor sign-in. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_generate_totp_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TotpGenerateResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_generate_totp_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Generate a TOTP secret + + Step 1 of turning on two-factor sign-in (TOTP: six-digit codes from an authenticator app such as Google Authenticator, 1Password or Authy). Creates a new secret and returns it both as text (`secret`) and as a QR code image. Show the QR code to the user to scan with their authenticator app, or let them type the secret in. Nothing is turned on yet, and the secret is not saved: two-factor sign-in starts only after step 2, `v3EnableTotp`, succeeds. Keep the `secret` value; step 2 needs it. Calling this again creates a different secret. Returns 403 if your deployment is not licensed for two-factor sign-in. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_generate_totp_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TotpGenerateResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_generate_totp_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/totp/generate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/users_api.py b/corellium/api/users_api.py new file mode 100644 index 0000000..4892085 --- /dev/null +++ b/corellium/api/users_api.py @@ -0,0 +1,2953 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from corellium.models.agreed_ack import AgreedAck +from corellium.models.change_password_body import ChangePasswordBody +from corellium.models.create_user_body import CreateUserBody +from corellium.models.get_reset_link_info_body import GetResetLinkInfoBody +from corellium.models.patch_user_body import PatchUserBody +from corellium.models.reset_link_info import ResetLinkInfo +from corellium.models.reset_password_body import ResetPasswordBody +from corellium.models.send_reset_link_body import SendResetLinkBody +from corellium.models.update_own_profile_body import UpdateOwnProfileBody +from corellium.models.user_created import UserCreated + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class UsersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_agree_to_terms( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgreedAck: + """Agree to terms + + Records that you, the signed-in user, accept the current terms and conditions, and returns the time of agreement. The web interface calls this when it shows the terms; call it yourself if your domain requires agreement before using the platform. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_agree_to_terms_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgreedAck", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_agree_to_terms_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgreedAck]: + """Agree to terms + + Records that you, the signed-in user, accept the current terms and conditions, and returns the time of agreement. The web interface calls this when it shows the terms; call it yourself if your domain requires agreement before using the platform. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_agree_to_terms_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgreedAck", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_agree_to_terms_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Agree to terms + + Records that you, the signed-in user, accept the current terms and conditions, and returns the time of agreement. The web interface calls this when it shows the terms; call it yourself if your domain requires agreement before using the platform. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_agree_to_terms_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgreedAck", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_agree_to_terms_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/users/agree', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_change_password( + self, + change_password_body: ChangePasswordBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Change password + + Changes a password when you know the current one. Needs no sign-in: send the user's ID in `user`, the current password in `oldPassword`, and the new one in `newPassword`. Returns 204 on success and 403 if the old password is wrong. If you have forgotten the password, use the reset flow instead (`v3SendResetLink`). + + :param change_password_body: (required) + :type change_password_body: ChangePasswordBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_change_password_serialize( + change_password_body=change_password_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "InvalidCredentialsError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_change_password_with_http_info( + self, + change_password_body: ChangePasswordBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Change password + + Changes a password when you know the current one. Needs no sign-in: send the user's ID in `user`, the current password in `oldPassword`, and the new one in `newPassword`. Returns 204 on success and 403 if the old password is wrong. If you have forgotten the password, use the reset flow instead (`v3SendResetLink`). + + :param change_password_body: (required) + :type change_password_body: ChangePasswordBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_change_password_serialize( + change_password_body=change_password_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "InvalidCredentialsError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_change_password_without_preload_content( + self, + change_password_body: ChangePasswordBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Change password + + Changes a password when you know the current one. Needs no sign-in: send the user's ID in `user`, the current password in `oldPassword`, and the new one in `newPassword`. Returns 204 on success and 403 if the old password is wrong. If you have forgotten the password, use the reset flow instead (`v3SendResetLink`). + + :param change_password_body: (required) + :type change_password_body: ChangePasswordBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_change_password_serialize( + change_password_body=change_password_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "InvalidCredentialsError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_change_password_serialize( + self, + change_password_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if change_password_body is not None: + _body_params = change_password_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/users/change-password', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_create_user( + self, + create_user_body: CreateUserBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserCreated: + """Create a user + + **Required role:** Domain administrator. Creates a user account in your domain directly, with a username and password you choose, without sending an invitation. Requires a domain administrator. Returns 201 with the new user's ID. To let people set their own password instead, invite them with `POST /v3/invites`. A new user has no project access until you grant it with the Roles endpoints or add them to a team. + + :param create_user_body: (required) + :type create_user_body: CreateUserBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_user_serialize( + create_user_body=create_user_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "UserCreated", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_user_with_http_info( + self, + create_user_body: CreateUserBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserCreated]: + """Create a user + + **Required role:** Domain administrator. Creates a user account in your domain directly, with a username and password you choose, without sending an invitation. Requires a domain administrator. Returns 201 with the new user's ID. To let people set their own password instead, invite them with `POST /v3/invites`. A new user has no project access until you grant it with the Roles endpoints or add them to a team. + + :param create_user_body: (required) + :type create_user_body: CreateUserBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_user_serialize( + create_user_body=create_user_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "UserCreated", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_user_without_preload_content( + self, + create_user_body: CreateUserBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a user + + **Required role:** Domain administrator. Creates a user account in your domain directly, with a username and password you choose, without sending an invitation. Requires a domain administrator. Returns 201 with the new user's ID. To let people set their own password instead, invite them with `POST /v3/invites`. A new user has no project access until you grant it with the Roles endpoints or add them to a team. + + :param create_user_body: (required) + :type create_user_body: CreateUserBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_user_serialize( + create_user_body=create_user_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "UserCreated", + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_user_serialize( + self, + create_user_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_user_body is not None: + _body_params = create_user_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_user( + self, + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a user + + **Required role:** Domain administrator. Deletes the user identified by the given userId. Deletes are idempotent: a `userId` that does not exist, including one that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_user_with_http_info( + self, + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a user + + **Required role:** Domain administrator. Deletes the user identified by the given userId. Deletes are idempotent: a `userId` that does not exist, including one that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_user_without_preload_content( + self, + user_id: Annotated[StrictStr, Field(description="User identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a user + + **Required role:** Domain administrator. Deletes the user identified by the given userId. Deletes are idempotent: a `userId` that does not exist, including one that was already deleted, is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param user_id: User identifier. (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_user_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/users/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_reset_link_info( + self, + get_reset_link_info_body: GetResetLinkInfoBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResetLinkInfo: + """Get reset link info + + Step 2 (optional) of resetting a forgotten password: checks the token from a reset email and returns the account it belongs to (user ID, username and domain), so a reset page can show whose password is being changed. Needs no sign-in. Returns 400 or 401 if the token is missing, invalid or expired. + + :param get_reset_link_info_body: (required) + :type get_reset_link_info_body: GetResetLinkInfoBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_reset_link_info_serialize( + get_reset_link_info_body=get_reset_link_info_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResetLinkInfo", + '400': "UserErrorResponse", + '401': "UnauthorizedError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_reset_link_info_with_http_info( + self, + get_reset_link_info_body: GetResetLinkInfoBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResetLinkInfo]: + """Get reset link info + + Step 2 (optional) of resetting a forgotten password: checks the token from a reset email and returns the account it belongs to (user ID, username and domain), so a reset page can show whose password is being changed. Needs no sign-in. Returns 400 or 401 if the token is missing, invalid or expired. + + :param get_reset_link_info_body: (required) + :type get_reset_link_info_body: GetResetLinkInfoBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_reset_link_info_serialize( + get_reset_link_info_body=get_reset_link_info_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResetLinkInfo", + '400': "UserErrorResponse", + '401': "UnauthorizedError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_reset_link_info_without_preload_content( + self, + get_reset_link_info_body: GetResetLinkInfoBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get reset link info + + Step 2 (optional) of resetting a forgotten password: checks the token from a reset email and returns the account it belongs to (user ID, username and domain), so a reset page can show whose password is being changed. Needs no sign-in. Returns 400 or 401 if the token is missing, invalid or expired. + + :param get_reset_link_info_body: (required) + :type get_reset_link_info_body: GetResetLinkInfoBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_reset_link_info_serialize( + get_reset_link_info_body=get_reset_link_info_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResetLinkInfo", + '400': "UserErrorResponse", + '401': "UnauthorizedError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_reset_link_info_serialize( + self, + get_reset_link_info_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if get_reset_link_info_body is not None: + _body_params = get_reset_link_info_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/users/reset-link-info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_patch_user( + self, + user_id: Annotated[StrictStr, Field(description="User identifier.")], + patch_user_body: Optional[PatchUserBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Update a user + + Changes a user's account details, such as their name, display label, email or password. Send only the fields you want to change. Only cluster administrators may set or change `clusterAdministrator`, which gives a user control over the whole cluster. + + :param user_id: User identifier. (required) + :type user_id: str + :param patch_user_body: + :type patch_user_body: PatchUserBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_user_serialize( + user_id=user_id, + patch_user_body=patch_user_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_patch_user_with_http_info( + self, + user_id: Annotated[StrictStr, Field(description="User identifier.")], + patch_user_body: Optional[PatchUserBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Update a user + + Changes a user's account details, such as their name, display label, email or password. Send only the fields you want to change. Only cluster administrators may set or change `clusterAdministrator`, which gives a user control over the whole cluster. + + :param user_id: User identifier. (required) + :type user_id: str + :param patch_user_body: + :type patch_user_body: PatchUserBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_user_serialize( + user_id=user_id, + patch_user_body=patch_user_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_patch_user_without_preload_content( + self, + user_id: Annotated[StrictStr, Field(description="User identifier.")], + patch_user_body: Optional[PatchUserBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a user + + Changes a user's account details, such as their name, display label, email or password. Send only the fields you want to change. Only cluster administrators may set or change `clusterAdministrator`, which gives a user control over the whole cluster. + + :param user_id: User identifier. (required) + :type user_id: str + :param patch_user_body: + :type patch_user_body: PatchUserBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_patch_user_serialize( + user_id=user_id, + patch_user_body=patch_user_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_patch_user_serialize( + self, + user_id, + patch_user_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_user_body is not None: + _body_params = patch_user_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/users/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_reset_password( + self, + reset_password_body: ResetPasswordBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Reset password + + Step 3 of resetting a forgotten password. Send the `token` from the reset email, the `newPassword`, and, if the account has two-factor sign-in turned on, a current six-digit code in `totpToken`. Returns 204 when the password has been changed; sign in with the new password. **Reset flow:** 1. `v3SendResetLink` with the account's email address. 2. Optionally `v3GetResetLinkInfo` with the token from the email, to show which account is being reset. 3. `v3ResetPassword` (this call). Returns 401 if the token is invalid or expired, or the two-factor code is wrong. + + :param reset_password_body: (required) + :type reset_password_body: ResetPasswordBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_reset_password_serialize( + reset_password_body=reset_password_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ResetUnauthorizedResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_reset_password_with_http_info( + self, + reset_password_body: ResetPasswordBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Reset password + + Step 3 of resetting a forgotten password. Send the `token` from the reset email, the `newPassword`, and, if the account has two-factor sign-in turned on, a current six-digit code in `totpToken`. Returns 204 when the password has been changed; sign in with the new password. **Reset flow:** 1. `v3SendResetLink` with the account's email address. 2. Optionally `v3GetResetLinkInfo` with the token from the email, to show which account is being reset. 3. `v3ResetPassword` (this call). Returns 401 if the token is invalid or expired, or the two-factor code is wrong. + + :param reset_password_body: (required) + :type reset_password_body: ResetPasswordBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_reset_password_serialize( + reset_password_body=reset_password_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ResetUnauthorizedResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_reset_password_without_preload_content( + self, + reset_password_body: ResetPasswordBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Reset password + + Step 3 of resetting a forgotten password. Send the `token` from the reset email, the `newPassword`, and, if the account has two-factor sign-in turned on, a current six-digit code in `totpToken`. Returns 204 when the password has been changed; sign in with the new password. **Reset flow:** 1. `v3SendResetLink` with the account's email address. 2. Optionally `v3GetResetLinkInfo` with the token from the email, to show which account is being reset. 3. `v3ResetPassword` (this call). Returns 401 if the token is invalid or expired, or the two-factor code is wrong. + + :param reset_password_body: (required) + :type reset_password_body: ResetPasswordBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_reset_password_serialize( + reset_password_body=reset_password_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ResetUnauthorizedResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_reset_password_serialize( + self, + reset_password_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if reset_password_body is not None: + _body_params = reset_password_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/users/reset-password', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_send_reset_link( + self, + send_reset_link_body: Optional[SendResetLinkBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Send a password reset link + + Step 1 of resetting a forgotten password: emails a password reset link to the given address, if it belongs to an account in the domain you are calling. Needs no sign-in. Always returns 204, whether or not the address matched an account, so the response does not reveal which emails are registered. The link contains the token used by `v3ResetPassword`. + + :param send_reset_link_body: + :type send_reset_link_body: SendResetLinkBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_send_reset_link_serialize( + send_reset_link_body=send_reset_link_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_send_reset_link_with_http_info( + self, + send_reset_link_body: Optional[SendResetLinkBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Send a password reset link + + Step 1 of resetting a forgotten password: emails a password reset link to the given address, if it belongs to an account in the domain you are calling. Needs no sign-in. Always returns 204, whether or not the address matched an account, so the response does not reveal which emails are registered. The link contains the token used by `v3ResetPassword`. + + :param send_reset_link_body: + :type send_reset_link_body: SendResetLinkBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_send_reset_link_serialize( + send_reset_link_body=send_reset_link_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_send_reset_link_without_preload_content( + self, + send_reset_link_body: Optional[SendResetLinkBody] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send a password reset link + + Step 1 of resetting a forgotten password: emails a password reset link to the given address, if it belongs to an account in the domain you are calling. Needs no sign-in. Always returns 204, whether or not the address matched an account, so the response does not reveal which emails are registered. The link contains the token used by `v3ResetPassword`. + + :param send_reset_link_body: + :type send_reset_link_body: SendResetLinkBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_send_reset_link_serialize( + send_reset_link_body=send_reset_link_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_send_reset_link_serialize( + self, + send_reset_link_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if send_reset_link_body is not None: + _body_params = send_reset_link_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/users/send-reset-link', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_update_own_profile( + self, + update_own_profile_body: UpdateOwnProfileBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Update your profile + + Updates the caller's own display name. Needs no administrator role. Users created through an authentication provider cannot change their label, because the provider owns it. + + :param update_own_profile_body: (required) + :type update_own_profile_body: UpdateOwnProfileBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_own_profile_serialize( + update_own_profile_body=update_own_profile_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_update_own_profile_with_http_info( + self, + update_own_profile_body: UpdateOwnProfileBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Update your profile + + Updates the caller's own display name. Needs no administrator role. Users created through an authentication provider cannot change their label, because the provider owns it. + + :param update_own_profile_body: (required) + :type update_own_profile_body: UpdateOwnProfileBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_own_profile_serialize( + update_own_profile_body=update_own_profile_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_update_own_profile_without_preload_content( + self, + update_own_profile_body: UpdateOwnProfileBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update your profile + + Updates the caller's own display name. Needs no administrator role. Users created through an authentication provider cannot change their label, because the provider owns it. + + :param update_own_profile_body: (required) + :type update_own_profile_body: UpdateOwnProfileBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_update_own_profile_serialize( + update_own_profile_body=update_own_profile_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_update_own_profile_serialize( + self, + update_own_profile_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_own_profile_body is not None: + _body_params = update_own_profile_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/users/me', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/users_v1_api.py b/corellium/api/users_v1_api.py new file mode 100644 index 0000000..e432b0f --- /dev/null +++ b/corellium/api/users_v1_api.py @@ -0,0 +1,2910 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from corellium.models.agreed_ack_v1 import AgreedAckV1 +from corellium.models.credentials import Credentials +from corellium.models.password_change_body import PasswordChangeBody +from corellium.models.password_reset_body import PasswordResetBody +from corellium.models.reset_link_body import ResetLinkBody +from corellium.models.reset_link_info_return import ResetLinkInfoReturn +from corellium.models.token_v1 import TokenV1 +from corellium.models.user_create import UserCreate +from corellium.models.user_create_return import UserCreateReturn +from corellium.models.user_update import UserUpdate + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class UsersV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_change_password_users( + self, + password_change_body: PasswordChangeBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Change User Password + + Authenticated solely by the old-password. + + :param password_change_body: (required) + :type password_change_body: PasswordChangeBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/change-password is deprecated.", DeprecationWarning) + + _param = self._v1_change_password_users_serialize( + password_change_body=password_change_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_change_password_users_with_http_info( + self, + password_change_body: PasswordChangeBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Change User Password + + Authenticated solely by the old-password. + + :param password_change_body: (required) + :type password_change_body: PasswordChangeBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/change-password is deprecated.", DeprecationWarning) + + _param = self._v1_change_password_users_serialize( + password_change_body=password_change_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_change_password_users_without_preload_content( + self, + password_change_body: PasswordChangeBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Change User Password + + Authenticated solely by the old-password. + + :param password_change_body: (required) + :type password_change_body: PasswordChangeBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/change-password is deprecated.", DeprecationWarning) + + _param = self._v1_change_password_users_serialize( + password_change_body=password_change_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_change_password_users_serialize( + self, + password_change_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if password_change_body is not None: + _body_params = password_change_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/users/change-password', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_create_user( + self, + user_create: Annotated[UserCreate, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserCreateReturn: + """(Deprecated) Create User + + + :param user_create: User data (required) + :type user_create: UserCreate + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users is deprecated.", DeprecationWarning) + + _param = self._v1_create_user_serialize( + user_create=user_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserCreateReturn", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_create_user_with_http_info( + self, + user_create: Annotated[UserCreate, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserCreateReturn]: + """(Deprecated) Create User + + + :param user_create: User data (required) + :type user_create: UserCreate + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users is deprecated.", DeprecationWarning) + + _param = self._v1_create_user_serialize( + user_create=user_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserCreateReturn", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_create_user_without_preload_content( + self, + user_create: Annotated[UserCreate, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create User + + + :param user_create: User data (required) + :type user_create: UserCreate + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users is deprecated.", DeprecationWarning) + + _param = self._v1_create_user_serialize( + user_create=user_create, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserCreateReturn", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_create_user_serialize( + self, + user_create, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_create is not None: + _body_params = user_create + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_delete_user( + self, + user_id: Annotated[StrictStr, Field(description="userId - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Delete User + + + :param user_id: userId - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_delete_user_with_http_info( + self, + user_id: Annotated[StrictStr, Field(description="userId - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Delete User + + + :param user_id: userId - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_delete_user_without_preload_content( + self, + user_id: Annotated[StrictStr, Field(description="userId - uuid")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Delete User + + + :param user_id: userId - uuid (required) + :type user_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_delete_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_delete_user_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/users/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_get_reset_link_info( + self, + token: Annotated[StrictStr, Field(description="Reset token")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResetLinkInfoReturn: + """(Deprecated) Send Password Reset Link Info + + + :param token: Reset token (required) + :type token: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/users/reset-link-info is deprecated.", DeprecationWarning) + + _param = self._v1_get_reset_link_info_serialize( + token=token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResetLinkInfoReturn", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_get_reset_link_info_with_http_info( + self, + token: Annotated[StrictStr, Field(description="Reset token")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResetLinkInfoReturn]: + """(Deprecated) Send Password Reset Link Info + + + :param token: Reset token (required) + :type token: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/users/reset-link-info is deprecated.", DeprecationWarning) + + _param = self._v1_get_reset_link_info_serialize( + token=token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResetLinkInfoReturn", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_get_reset_link_info_without_preload_content( + self, + token: Annotated[StrictStr, Field(description="Reset token")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Send Password Reset Link Info + + + :param token: Reset token (required) + :type token: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/users/reset-link-info is deprecated.", DeprecationWarning) + + _param = self._v1_get_reset_link_info_serialize( + token=token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResetLinkInfoReturn", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_get_reset_link_info_serialize( + self, + token, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if token is not None: + + _query_params.append(('token', token)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/users/reset-link-info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_reset_user_password( + self, + password_reset_body: Annotated[PasswordResetBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Reset User Password + + + :param password_reset_body: application/json (required) + :type password_reset_body: PasswordResetBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/reset-password is deprecated.", DeprecationWarning) + + _param = self._v1_reset_user_password_serialize( + password_reset_body=password_reset_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_reset_user_password_with_http_info( + self, + password_reset_body: Annotated[PasswordResetBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Reset User Password + + + :param password_reset_body: application/json (required) + :type password_reset_body: PasswordResetBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/reset-password is deprecated.", DeprecationWarning) + + _param = self._v1_reset_user_password_serialize( + password_reset_body=password_reset_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_reset_user_password_without_preload_content( + self, + password_reset_body: Annotated[PasswordResetBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Reset User Password + + + :param password_reset_body: application/json (required) + :type password_reset_body: PasswordResetBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/reset-password is deprecated.", DeprecationWarning) + + _param = self._v1_reset_user_password_serialize( + password_reset_body=password_reset_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_reset_user_password_serialize( + self, + password_reset_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if password_reset_body is not None: + _body_params = password_reset_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/users/reset-password', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_send_user_reset_link( + self, + reset_link_body: Annotated[ResetLinkBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Send Password Reset Link + + + :param reset_link_body: application/json (required) + :type reset_link_body: ResetLinkBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/send-reset-link is deprecated.", DeprecationWarning) + + _param = self._v1_send_user_reset_link_serialize( + reset_link_body=reset_link_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_send_user_reset_link_with_http_info( + self, + reset_link_body: Annotated[ResetLinkBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Send Password Reset Link + + + :param reset_link_body: application/json (required) + :type reset_link_body: ResetLinkBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/send-reset-link is deprecated.", DeprecationWarning) + + _param = self._v1_send_user_reset_link_serialize( + reset_link_body=reset_link_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_send_user_reset_link_without_preload_content( + self, + reset_link_body: Annotated[ResetLinkBody, Field(description="application/json")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Send Password Reset Link + + + :param reset_link_body: application/json (required) + :type reset_link_body: ResetLinkBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/send-reset-link is deprecated.", DeprecationWarning) + + _param = self._v1_send_user_reset_link_serialize( + reset_link_body=reset_link_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_send_user_reset_link_serialize( + self, + reset_link_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if reset_link_body is not None: + _body_params = reset_link_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/users/send-reset-link', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_update_user( + self, + user_id: Annotated[StrictStr, Field(description="userId - uuid")], + user_update: Annotated[UserUpdate, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Update User + + Update a user. Fields such as `name`, `label`, `password`, and `clusterAdministrator` can be updated. Only users with the Cluster Administrator role can set or modify the `clusterAdministrator` flag. + + :param user_id: userId - uuid (required) + :type user_id: str + :param user_update: User data (required) + :type user_update: UserUpdate + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_user_serialize( + user_id=user_id, + user_update=user_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_update_user_with_http_info( + self, + user_id: Annotated[StrictStr, Field(description="userId - uuid")], + user_update: Annotated[UserUpdate, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Update User + + Update a user. Fields such as `name`, `label`, `password`, and `clusterAdministrator` can be updated. Only users with the Cluster Administrator role can set or modify the `clusterAdministrator` flag. + + :param user_id: userId - uuid (required) + :type user_id: str + :param user_update: User data (required) + :type user_update: UserUpdate + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_user_serialize( + user_id=user_id, + user_update=user_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_update_user_without_preload_content( + self, + user_id: Annotated[StrictStr, Field(description="userId - uuid")], + user_update: Annotated[UserUpdate, Field(description="User data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Update User + + Update a user. Fields such as `name`, `label`, `password`, and `clusterAdministrator` can be updated. Only users with the Cluster Administrator role can set or modify the `clusterAdministrator` flag. + + :param user_id: userId - uuid (required) + :type user_id: str + :param user_update: User data (required) + :type user_update: UserUpdate + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("PATCH /v1/users/{userId} is deprecated.", DeprecationWarning) + + _param = self._v1_update_user_serialize( + user_id=user_id, + user_update=user_update, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_update_user_serialize( + self, + user_id, + user_update, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_update is not None: + _body_params = user_update + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v1/users/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_user_agree_terms( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AgreedAckV1: + """(Deprecated) Consent to the current terms and conditions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/agree is deprecated.", DeprecationWarning) + + _param = self._v1_user_agree_terms_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgreedAckV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_user_agree_terms_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AgreedAckV1]: + """(Deprecated) Consent to the current terms and conditions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/agree is deprecated.", DeprecationWarning) + + _param = self._v1_user_agree_terms_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgreedAckV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_user_agree_terms_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Consent to the current terms and conditions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/agree is deprecated.", DeprecationWarning) + + _param = self._v1_user_agree_terms_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgreedAckV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_user_agree_terms_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/users/agree', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_users_login( + self, + credentials: Annotated[Credentials, Field(description="Authorization data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TokenV1: + """(Deprecated) Log In + + + :param credentials: Authorization data (required) + :type credentials: Credentials + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/login is deprecated.", DeprecationWarning) + + _param = self._v1_users_login_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_users_login_with_http_info( + self, + credentials: Annotated[Credentials, Field(description="Authorization data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TokenV1]: + """(Deprecated) Log In + + + :param credentials: Authorization data (required) + :type credentials: Credentials + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/login is deprecated.", DeprecationWarning) + + _param = self._v1_users_login_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_users_login_without_preload_content( + self, + credentials: Annotated[Credentials, Field(description="Authorization data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Log In + + + :param credentials: Authorization data (required) + :type credentials: Credentials + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/users/login is deprecated.", DeprecationWarning) + + _param = self._v1_users_login_serialize( + credentials=credentials, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_users_login_serialize( + self, + credentials, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if credentials is not None: + _body_params = credentials + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/users/login', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/web_player_api.py b/corellium/api/web_player_api.py new file mode 100644 index 0000000..cb3b6c0 --- /dev/null +++ b/corellium/api/web_player_api.py @@ -0,0 +1,1639 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from corellium.models.create_web_player_session_body import CreateWebPlayerSessionBody +from corellium.models.web_player_allowed_domains import WebPlayerAllowedDomains +from corellium.models.web_player_created_session import WebPlayerCreatedSession +from corellium.models.web_player_session import WebPlayerSession +from corellium.models.web_player_session_list_response import WebPlayerSessionListResponse + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class WebPlayerApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_create_web_player_session( + self, + create_web_player_session_body: CreateWebPlayerSessionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebPlayerCreatedSession: + """Create a webplayer session + + **Required role:** Domain administrator. Creates a Web Player session: a limited token that lets someone use one device, embedded in your own web page, without giving them a Corellium account. Requires a domain administrator. Choose the device (`projectId`, `instanceId`), how long the session lasts (`expiresIn`, at least 1800 seconds), and which parts of the device interface the viewer may use (`features`). Pass the returned `token` to the Web Player in your page. The website domains configured for embedding are listed by `v3GetWebPlayerAllowedDomains` and set with `webplayer.allowedDomains` on `PATCH /v3/domain`. End the session early with `v3DeleteWebPlayerSession`. + + :param create_web_player_session_body: (required) + :type create_web_player_session_body: CreateWebPlayerSessionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_web_player_session_serialize( + create_web_player_session_body=create_web_player_session_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerCreatedSession", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_create_web_player_session_with_http_info( + self, + create_web_player_session_body: CreateWebPlayerSessionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebPlayerCreatedSession]: + """Create a webplayer session + + **Required role:** Domain administrator. Creates a Web Player session: a limited token that lets someone use one device, embedded in your own web page, without giving them a Corellium account. Requires a domain administrator. Choose the device (`projectId`, `instanceId`), how long the session lasts (`expiresIn`, at least 1800 seconds), and which parts of the device interface the viewer may use (`features`). Pass the returned `token` to the Web Player in your page. The website domains configured for embedding are listed by `v3GetWebPlayerAllowedDomains` and set with `webplayer.allowedDomains` on `PATCH /v3/domain`. End the session early with `v3DeleteWebPlayerSession`. + + :param create_web_player_session_body: (required) + :type create_web_player_session_body: CreateWebPlayerSessionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_web_player_session_serialize( + create_web_player_session_body=create_web_player_session_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerCreatedSession", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_create_web_player_session_without_preload_content( + self, + create_web_player_session_body: CreateWebPlayerSessionBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a webplayer session + + **Required role:** Domain administrator. Creates a Web Player session: a limited token that lets someone use one device, embedded in your own web page, without giving them a Corellium account. Requires a domain administrator. Choose the device (`projectId`, `instanceId`), how long the session lasts (`expiresIn`, at least 1800 seconds), and which parts of the device interface the viewer may use (`features`). Pass the returned `token` to the Web Player in your page. The website domains configured for embedding are listed by `v3GetWebPlayerAllowedDomains` and set with `webplayer.allowedDomains` on `PATCH /v3/domain`. End the session early with `v3DeleteWebPlayerSession`. + + :param create_web_player_session_body: (required) + :type create_web_player_session_body: CreateWebPlayerSessionBody + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_create_web_player_session_serialize( + create_web_player_session_body=create_web_player_session_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerCreatedSession", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_create_web_player_session_serialize( + self, + create_web_player_session_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_web_player_session_body is not None: + _body_params = create_web_player_session_body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/webplayer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_delete_web_player_session( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer session identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a webplayer session + + **Required role:** Domain administrator. Ends a Web Player session: its token stops working, so the embedded viewer loses access to the device. Requires a domain administrator. The device itself is not affected. Deletes are idempotent: an unknown `sessionId` is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param session_id: Webplayer session identifier. (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_web_player_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_delete_web_player_session_with_http_info( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer session identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a webplayer session + + **Required role:** Domain administrator. Ends a Web Player session: its token stops working, so the embedded viewer loses access to the device. Requires a domain administrator. The device itself is not affected. Deletes are idempotent: an unknown `sessionId` is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param session_id: Webplayer session identifier. (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_web_player_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_delete_web_player_session_without_preload_content( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer session identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a webplayer session + + **Required role:** Domain administrator. Ends a Web Player session: its token stops working, so the embedded viewer loses access to the device. Requires a domain administrator. The device itself is not affected. Deletes are idempotent: an unknown `sessionId` is a successful no-op that still returns 204, and repeated calls return 204 as well. A 404 means the request path did not match a delete route, not that the target was missing. + + :param session_id: Webplayer session identifier. (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_delete_web_player_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_delete_web_player_session_serialize( + self, + session_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if session_id is not None: + _path_params['sessionId'] = session_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v3/webplayer/{sessionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_web_player_allowed_domains( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebPlayerAllowedDomains: + """Get allowed webplayer domains + + Returns the website domains configured for embedding the Web Player (`webplayer.allowedDomains` in your domain settings). Change the list with `PATCH /v3/domain`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_web_player_allowed_domains_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerAllowedDomains", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_web_player_allowed_domains_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebPlayerAllowedDomains]: + """Get allowed webplayer domains + + Returns the website domains configured for embedding the Web Player (`webplayer.allowedDomains` in your domain settings). Change the list with `PATCH /v3/domain`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_web_player_allowed_domains_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerAllowedDomains", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_web_player_allowed_domains_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get allowed webplayer domains + + Returns the website domains configured for embedding the Web Player (`webplayer.allowedDomains` in your domain settings). Change the list with `PATCH /v3/domain`. + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_web_player_allowed_domains_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerAllowedDomains", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_web_player_allowed_domains_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/webplayer/allowedDomains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_get_web_player_session( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer session identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[WebPlayerSession]: + """Get a webplayer session + + **Required role:** Domain administrator. Returns one Web Player session, including its token and expiration. Requires a domain administrator. + + :param session_id: Webplayer session identifier. (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_web_player_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[WebPlayerSession]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_web_player_session_with_http_info( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer session identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[WebPlayerSession]]: + """Get a webplayer session + + **Required role:** Domain administrator. Returns one Web Player session, including its token and expiration. Requires a domain administrator. + + :param session_id: Webplayer session identifier. (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_web_player_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[WebPlayerSession]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_web_player_session_without_preload_content( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer session identifier.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a webplayer session + + **Required role:** Domain administrator. Returns one Web Player session, including its token and expiration. Requires a domain administrator. + + :param session_id: Webplayer session identifier. (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_get_web_player_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[WebPlayerSession]", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + '404': "ApiNotFoundError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_web_player_session_serialize( + self, + session_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if session_id is not None: + _path_params['sessionId'] = session_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/webplayer/{sessionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_list_web_player_sessions( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebPlayerSessionListResponse: + """List webplayer sessions + + **Required role:** Domain administrator. Lists the Web Player sessions in your domain, with each session's ID, token and expiration. Requires a domain administrator. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_web_player_sessions_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionListResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_web_player_sessions_with_http_info( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebPlayerSessionListResponse]: + """List webplayer sessions + + **Required role:** Domain administrator. Lists the Web Player sessions in your domain, with each session's ID, token and expiration. Requires a domain administrator. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_web_player_sessions_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionListResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_web_player_sessions_without_preload_content( + self, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400.")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List webplayer sessions + + **Required role:** Domain administrator. Lists the Web Player sessions in your domain, with each session's ID, token and expiration. Requires a domain administrator. Results are paginated with `limit` and `offset`. + + :param limit: Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. + :type limit: float + :param offset: How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. + :type offset: float + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + + _param = self._v3_list_web_player_sessions_serialize( + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionListResponse", + '400': "UserErrorResponse", + '401': "ApiError", + '403': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_web_player_sessions_serialize( + self, + limit, + offset, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/webplayer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api/web_player_v1_api.py b/corellium/api/web_player_v1_api.py new file mode 100644 index 0000000..adbec5d --- /dev/null +++ b/corellium/api/web_player_v1_api.py @@ -0,0 +1,1584 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import List +from typing_extensions import Annotated +from corellium.models.web_player_create_session_request import WebPlayerCreateSessionRequest +from corellium.models.web_player_session_v1 import WebPlayerSessionV1 + +from corellium.api_client import ApiClient, RequestSerialized +from corellium.api_response import ApiResponse +from corellium.rest import RESTResponseType + + +class WebPlayerV1Api: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v1_web_player_allowed_domains( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """(Deprecated) Retrieve the list of allowed domains for all Webplayer sessions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer/allowedDomains is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_allowed_domains_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_web_player_allowed_domains_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """(Deprecated) Retrieve the list of allowed domains for all Webplayer sessions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer/allowedDomains is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_allowed_domains_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_web_player_allowed_domains_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Retrieve the list of allowed domains for all Webplayer sessions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer/allowedDomains is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_allowed_domains_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_web_player_allowed_domains_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/webplayer/allowedDomains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_web_player_create_session( + self, + web_player_create_session_request: Annotated[WebPlayerCreateSessionRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebPlayerSessionV1: + """(Deprecated) Create a new Webplayer Session + + + :param web_player_create_session_request: Request Data (required) + :type web_player_create_session_request: WebPlayerCreateSessionRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/webplayer is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_create_session_serialize( + web_player_create_session_request=web_player_create_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_web_player_create_session_with_http_info( + self, + web_player_create_session_request: Annotated[WebPlayerCreateSessionRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebPlayerSessionV1]: + """(Deprecated) Create a new Webplayer Session + + + :param web_player_create_session_request: Request Data (required) + :type web_player_create_session_request: WebPlayerCreateSessionRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/webplayer is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_create_session_serialize( + web_player_create_session_request=web_player_create_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_web_player_create_session_without_preload_content( + self, + web_player_create_session_request: Annotated[WebPlayerCreateSessionRequest, Field(description="Request Data")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Create a new Webplayer Session + + + :param web_player_create_session_request: Request Data (required) + :type web_player_create_session_request: WebPlayerCreateSessionRequest + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("POST /v1/webplayer is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_create_session_serialize( + web_player_create_session_request=web_player_create_session_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_web_player_create_session_serialize( + self, + web_player_create_session_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if web_player_create_session_request is not None: + _body_params = web_player_create_session_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/webplayer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_web_player_destroy_session( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer Session identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[str]: + """(Deprecated) Tear down a Webplayer Session + + + :param session_id: Webplayer Session identifier (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/webplayer/{sessionId} is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_destroy_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_web_player_destroy_session_with_http_info( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer Session identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[str]]: + """(Deprecated) Tear down a Webplayer Session + + + :param session_id: Webplayer Session identifier (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/webplayer/{sessionId} is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_destroy_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_web_player_destroy_session_without_preload_content( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer Session identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Tear down a Webplayer Session + + + :param session_id: Webplayer Session identifier (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("DELETE /v1/webplayer/{sessionId} is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_destroy_session_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_web_player_destroy_session_serialize( + self, + session_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if session_id is not None: + _path_params['sessionId'] = session_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/webplayer/{sessionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_web_player_list_sessions( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[WebPlayerSessionV1]: + """(Deprecated) List all Webplayer sessions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_list_sessions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[WebPlayerSessionV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_web_player_list_sessions_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[WebPlayerSessionV1]]: + """(Deprecated) List all Webplayer sessions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_list_sessions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[WebPlayerSessionV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_web_player_list_sessions_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) List all Webplayer sessions + + + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_list_sessions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[WebPlayerSessionV1]", + '400': "UserErrorV1", + '403': "ApiErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_web_player_list_sessions_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/webplayer', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v1_web_player_session_info( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer Session identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebPlayerSessionV1: + """(Deprecated) Retrieve Webplayer Session Information + + + :param session_id: Webplayer Session identifier (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer/{sessionId} is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_session_info_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v1_web_player_session_info_with_http_info( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer Session identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebPlayerSessionV1]: + """(Deprecated) Retrieve Webplayer Session Information + + + :param session_id: Webplayer Session identifier (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer/{sessionId} is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_session_info_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v1_web_player_session_info_without_preload_content( + self, + session_id: Annotated[StrictStr, Field(description="Webplayer Session identifier")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """(Deprecated) Retrieve Webplayer Session Information + + + :param session_id: Webplayer Session identifier (required) + :type session_id: str + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ # noqa: E501 + warnings.warn("GET /v1/webplayer/{sessionId} is deprecated.", DeprecationWarning) + + _param = self._v1_web_player_session_info_serialize( + session_id=session_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebPlayerSessionV1", + '400': "UserErrorV1", + '403': "ApiErrorV1", + '404': "UserErrorV1", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v1_web_player_session_info_serialize( + self, + session_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if session_id is not None: + _path_params['sessionId'] = session_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/webplayer/{sessionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/corellium/api_client.py b/corellium/api_client.py new file mode 100644 index 0000000..5b3f352 --- /dev/null +++ b/corellium/api_client.py @@ -0,0 +1,841 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from corellium.configuration import Configuration +from corellium.api_response import ApiResponse, T as ApiResponseT +import corellium.models +from corellium import rest +from corellium.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/0.1.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + resource_path_template = resource_path + slash_path_parameters = frozenset({ + ("DELETE", "/{apiVersion}/external-services/{serviceName}/{path}", "path"), + ("DELETE", "/v1/instances/{instanceId}/agent/v1/file/device/{filePath}", "filePath"), + ("DELETE", "/v3/instances/{instanceId}/agent/v1/file/device/{filePath}", "filePath"), + ("GET", "/{apiVersion}/external-services/{serviceName}/{path}", "path"), + ("GET", "/v1/instances/{instanceId}/agent/v1/file/device/{filePath}", "filePath"), + ("GET", "/v1/storage/{id}/files/{path}", "path"), + ("GET", "/v3/instances/{instanceId}/agent/v1/file/device/{filePath}", "filePath"), + ("GET", "/v3/storage/{id}/files/{path}", "path"), + ("PATCH", "/{apiVersion}/external-services/{serviceName}/{path}", "path"), + ("PATCH", "/v1/instances/{instanceId}/agent/v1/file/device/{filePath}", "filePath"), + ("PATCH", "/v3/instances/{instanceId}/agent/v1/file/device/{filePath}", "filePath"), + ("POST", "/{apiVersion}/external-services/{serviceName}/{path}", "path"), + ("POST", "/v3/instances/{instanceId}/agent-authorize/v1/file/device/{filePath}", "filePath"), + ("PUT", "/{apiVersion}/external-services/{serviceName}/{path}", "path"), + ("PUT", "/v1/instances/{instanceId}/agent/v1/file/device/{filePath}", "filePath"), + ("PUT", "/v3/instances/{instanceId}/agent/v1/file/device/{filePath}", "filePath"), + }) + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + preserve_slashes = (method, resource_path_template, k) in slash_path_parameters + safe_chars = '/' if preserve_slashes else config.safe_chars_for_path_param + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=safe_chars) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + :return: RESTResponse + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(corellium.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/corellium/api_response.py b/corellium/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/corellium/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/corellium/configuration.py b/corellium/configuration.py new file mode 100644 index 0000000..67e0317 --- /dev/null +++ b/corellium/configuration.py @@ -0,0 +1,589 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "BearerAuth": BearerFormatAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + + :Example: + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "https://app.corellium.com/api" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("corellium") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'format': 'JWT', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 0.1.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://{serverName}/api", + 'description': "", + 'variables': { + 'serverName': { + 'description': "No description provided", + 'default_value': "app.corellium.com", + } + } + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables).rstrip('/') + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/corellium/corellium_client.py b/corellium/corellium_client.py new file mode 100644 index 0000000..5943263 --- /dev/null +++ b/corellium/corellium_client.py @@ -0,0 +1,1752 @@ +# Code generated by scripts/generate-python-client.js — do not edit manually. +"""Ergonomic Corellium API client. + +Unversioned namespaces (client.instances.*) resolve to the LATEST version of +each operation — a per-operation blend. Pin a specific version with client.v{n}.* +(e.g. client.v3.instances.*) for a contract that never moves. +See the coordinator docs/openapi-spec-convention.md. +""" + +from __future__ import annotations + +from .api_client import ApiClient +from .configuration import Configuration +from .api.activity_api import ActivityApi +from .api.activity_v1_api import ActivityV1Api +from .api.agent_api import AgentApi +from .api.agent_v1_api import AgentV1Api +from .api.assessments_api import AssessmentsApi +from .api.assessments_v1_api import AssessmentsV1Api +from .api.authentication_api import AuthenticationApi +from .api.authentication_v1_api import AuthenticationV1Api +from .api.billing_api import BillingApi +from .api.cluster_api import ClusterApi +from .api.cluster_administration_config_api import ClusterAdministrationConfigApi +from .api.cluster_administration_firmware_service_api import ClusterAdministrationFirmwareServiceApi +from .api.cluster_administration_nodes_api import ClusterAdministrationNodesApi +from .api.cluster_snapshots_api import ClusterSnapshotsApi +from .api.config_api import ConfigApi +from .api.config_v1_api import ConfigV1Api +from .api.core_trace_api import CoreTraceApi +from .api.core_trace_v1_api import CoreTraceV1Api +from .api.domain_api import DomainApi +from .api.domain_auth_provider_api import DomainAuthProviderApi +from .api.domain_auth_providers_api import DomainAuthProvidersApi +from .api.domain_v1_api import DomainV1Api +from .api.extensions_api import ExtensionsApi +from .api.extensions_v1_api import ExtensionsV1Api +from .api.firmware_service_api import FirmwareServiceApi +from .api.flavors_api import FlavorsApi +from .api.hyper_trace_api import HyperTraceApi +from .api.hyper_trace_v1_api import HyperTraceV1Api +from .api.hypertune_api import HypertuneApi +from .api.hypervisor_hooks_api import HypervisorHooksApi +from .api.hypervisor_hooks_v1_api import HypervisorHooksV1Api +from .api.images_api import ImagesApi +from .api.images_v1_api import ImagesV1Api +from .api.images_v2_api import ImagesV2Api +from .api.instances_api import InstancesApi +from .api.instances_v1_api import InstancesV1Api +from .api.instances_v2_api import InstancesV2Api +from .api.interconnects_api import InterconnectsApi +from .api.interconnects_v1_api import InterconnectsV1Api +from .api.invites_api import InvitesApi +from .api.invites_v1_api import InvitesV1Api +from .api.models_api import ModelsApi +from .api.models_v1_api import ModelsV1Api +from .api.net_connect_api import NetConnectApi +from .api.net_connect_v1_api import NetConnectV1Api +from .api.projects_api import ProjectsApi +from .api.projects_v1_api import ProjectsV1Api +from .api.ram_dump_api import RAMDumpApi +from .api.ram_dump_v1_api import RAMDumpV1Api +from .api.roles_api import RolesApi +from .api.roles_v1_api import RolesV1Api +from .api.snapshot_sharing_api import SnapshotSharingApi +from .api.snapshot_sharing_v1_api import SnapshotSharingV1Api +from .api.snapshots_api import SnapshotsApi +from .api.snapshots_v1_api import SnapshotsV1Api +from .api.status_api import StatusApi +from .api.status_v1_api import StatusV1Api +from .api.storage_api import StorageApi +from .api.storage_v1_api import StorageV1Api +from .api.totp_api import TOTPApi +from .api.teams_api import TeamsApi +from .api.teams_v1_api import TeamsV1Api +from .api.users_api import UsersApi +from .api.users_v1_api import UsersV1Api +from .api.web_player_api import WebPlayerApi +from .api.web_player_v1_api import WebPlayerV1Api + + +class _Ns_L_Activity: + def __init__(self, api_client: ApiClient): + activity_api = ActivityApi(api_client) + self.create_export = activity_api.v3_create_activity_export + self.download = activity_api.v3_download_activity + self.get_export_status = activity_api.v3_get_activity_export_status + self.list = activity_api.v3_list_activities + self.list_export_tasks = activity_api.v3_get_activity_export_tasks + + +class _Ns_L_AgentApps: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.get_icons = agent_api.v3_list_app_icons_agent + self.get_ready = agent_api.v3_get_app_ready_agent + self.get_status = agent_api.v3_list_apps_status_agent + self.install = agent_api.v3_install_agent + self.kill = agent_api.v3_kill_app_agent + self.list = agent_api.v3_list_apps_agent + self.run = agent_api.v3_run_app_agent + self.uninstall = agent_api.v3_uninstall_app_agent + + +class _Ns_L_AgentContainers: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.get_health = agent_api.v3_get_container_health_agent + self.list = agent_api.v3_list_containers_agent + self.start = agent_api.v3_start_container_agent + self.start_app = agent_api.v3_start_container_app_agent + self.start_app_monitored = agent_api.v3_start_container_app_monitored_agent + self.stop = agent_api.v3_stop_container_agent + self.stop_app = agent_api.v3_stop_container_app_agent + + +class _Ns_L_AgentFiles: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.delete = agent_api.v3_delete_file_agent + self.get = agent_api.v3_get_file_agent + self.get_temp = agent_api.v3_get_temp_file_agent + self.preauthorize_archive_download = agent_api.v3_preauthorize_file_archive_download_agent + self.preauthorize_download = agent_api.v3_preauthorize_file_download_agent + self.set_attributes = agent_api.v3_set_file_attributes_agent + self.upload = agent_api.v3_upload_file_agent + + +class _Ns_L_AgentFrida: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.kill = agent_api.v3_kill_frida_agent + self.list_processes = agent_api.v3_list_frida_processes_agent + self.run = agent_api.v3_run_frida_agent + + +class _Ns_L_AgentProfiles: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.install = agent_api.v3_install_profile_agent + self.list = agent_api.v3_list_profiles_agent + self.uninstall = agent_api.v3_uninstall_profile_agent + + +class _Ns_L_AgentRemoteIt: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.get_status = agent_api.v3_get_remote_it_status_agent + self.install = agent_api.v3_install_remote_it_agent + self.uninstall = agent_api.v3_uninstall_remote_it_agent + + +class _Ns_L_AgentSystem: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.get_adb_auth = agent_api.v3_get_adb_auth_agent + self.get_network = agent_api.v3_get_network_agent + self.get_prop = agent_api.v3_get_prop_agent + self.install_open_gapps = agent_api.v3_install_open_gapps_agent + self.lock = agent_api.v3_lock_agent + self.set_adb_auth = agent_api.v3_set_adb_auth_agent + self.set_device_properties = agent_api.v3_set_device_properties_agent + self.set_hostname = agent_api.v3_set_hostname_agent + self.shutdown = agent_api.v3_shutdown_agent + self.unlock = agent_api.v3_unlock_agent + + +class _Ns_L_Agent: + def __init__(self, api_client: ApiClient): + self.apps = _Ns_L_AgentApps(api_client) + self.containers = _Ns_L_AgentContainers(api_client) + self.files = _Ns_L_AgentFiles(api_client) + self.frida = _Ns_L_AgentFrida(api_client) + self.profiles = _Ns_L_AgentProfiles(api_client) + self.remote_it = _Ns_L_AgentRemoteIt(api_client) + self.system = _Ns_L_AgentSystem(api_client) + + +class _Ns_L_AuthApiToken: + def __init__(self, api_client: ApiClient): + authentication_api = AuthenticationApi(api_client) + self.delete = authentication_api.v3_delete_api_token + self.generate = authentication_api.v3_generate_api_token + + +class _Ns_L_AuthProviders: + def __init__(self, api_client: ApiClient): + authentication_api = AuthenticationApi(api_client) + self.fetch_metadata = authentication_api.v3_fetch_auth_provider_metadata + self.get_authorization_url = authentication_api.v3_get_auth_provider_authorization_url + self.get_callback = authentication_api.v3_get_auth_provider_callback + self.get_sp_metadata = authentication_api.v3_get_auth_provider_sp_metadata + self.list = authentication_api.v3_list_auth_providers + self.list_types = authentication_api.v3_list_auth_provider_types + self.post_callback = authentication_api.v3_post_auth_provider_callback + + +class _Ns_L_Auth: + def __init__(self, api_client: ApiClient): + authentication_api = AuthenticationApi(api_client) + self.api_token = _Ns_L_AuthApiToken(api_client) + self.login = authentication_api.v3_auth_login + self.logout = authentication_api.v3_auth_logout + self.providers = _Ns_L_AuthProviders(api_client) + + +class _Ns_L_Billing: + def __init__(self, api_client: ApiClient): + billing_api = BillingApi(api_client) + self.cancel = billing_api.v3_cancel_subscription + self.get_device_usage = billing_api.v3_get_device_usage + self.get_metered_usage = billing_api.v3_get_metered_subscription_usage + self.get_subscription = billing_api.v3_get_subscription + self.get_summary = billing_api.v3_get_billing_summary + self.subscribe_to_trial = billing_api.v3_subscribe_to_trial + self.uncancel = billing_api.v3_uncancel_subscription + + +class _Ns_L_ClusterConfig: + def __init__(self, api_client: ApiClient): + cluster_api = ClusterApi(api_client) + self.get = cluster_api.v3_get_cluster_config + self.patch = cluster_api.v3_patch_cluster_config + + +class _Ns_L_ClusterNodes: + def __init__(self, api_client: ApiClient): + cluster_api = ClusterApi(api_client) + self.get = cluster_api.v3_get_cluster_node + self.get_console = cluster_api.v3_get_cluster_node_console + self.list = cluster_api.v3_list_cluster_nodes + + +class _Ns_L_ClusterSnapshots: + def __init__(self, api_client: ApiClient): + cluster_api = ClusterApi(api_client) + self.delete = cluster_api.v3_delete_cluster_snapshot + self.get = cluster_api.v3_get_cluster_snapshot + self.list = cluster_api.v3_list_cluster_snapshots + + +class _Ns_L_ClusterStorage: + def __init__(self, api_client: ApiClient): + storage_api = StorageApi(api_client) + self.attach = storage_api.v3_attach_cluster_storage + self.eject = storage_api.v3_eject_cluster_storage + self.list = storage_api.v3_list_cluster_storage + + +class _Ns_L_Cluster: + def __init__(self, api_client: ApiClient): + self.config = _Ns_L_ClusterConfig(api_client) + self.nodes = _Ns_L_ClusterNodes(api_client) + self.snapshots = _Ns_L_ClusterSnapshots(api_client) + self.storage = _Ns_L_ClusterStorage(api_client) + + +class _Ns_L_Config: + def __init__(self, api_client: ApiClient): + config_api = ConfigApi(api_client) + self.get = config_api.v3_get_config + + +class _Ns_L_CoreTrace: + def __init__(self, api_client: ApiClient): + core_trace_api = CoreTraceApi(api_client) + self.clear = core_trace_api.v3_clear_core_trace + self.list_threads = core_trace_api.v3_list_threads + self.preauthorize = core_trace_api.v3_strace_preauthorize + self.start = core_trace_api.v3_start_core_trace + self.stop = core_trace_api.v3_stop_core_trace + + +class _Ns_L_DomainAuthProviders: + def __init__(self, api_client: ApiClient): + domain_auth_providers_api = DomainAuthProvidersApi(api_client) + self.create = domain_auth_providers_api.v3_create_domain_auth_provider + self.delete = domain_auth_providers_api.v3_delete_domain_auth_provider + self.list = domain_auth_providers_api.v3_list_domain_auth_providers + self.patch = domain_auth_providers_api.v3_patch_domain_auth_provider + self.update = domain_auth_providers_api.v3_update_domain_auth_provider + + +class _Ns_L_Domain: + def __init__(self, api_client: ApiClient): + domain_api = DomainApi(api_client) + self.auth_providers = _Ns_L_DomainAuthProviders(api_client) + self.create_welcome_message = domain_api.v3_create_domain_welcome_message + self.delete_welcome_message = domain_api.v3_delete_domain_welcome_message + self.get_image_upload = domain_api.v3_get_domain_image_upload + self.get_welcome_message = domain_api.v3_get_domain_welcome_message + self.list_software = domain_api.v3_list_domain_software + self.patch_welcome_message = domain_api.v3_patch_domain_welcome_message + self.put_image_upload = domain_api.v3_put_domain_image_upload + + +class _Ns_L_Extensions: + def __init__(self, api_client: ApiClient): + extensions_api = ExtensionsApi(api_client) + self.create = extensions_api.v3_load_extension + self.delete = extensions_api.v3_delete_extension + self.get = extensions_api.v3_get_extension_by_id + self.list = extensions_api.v3_list_extensions + self.parse_json = extensions_api.v3_parse_extension_json + self.update = extensions_api.v3_update_extension + + +class _Ns_L_FirmwareService: + def __init__(self, api_client: ApiClient): + firmware_service_api = FirmwareServiceApi(api_client) + self.create_assets = firmware_service_api.v3_create_firmware_assets + self.delete_asset = firmware_service_api.v3_delete_firmware_asset + self.delete_firmware = firmware_service_api.v3_delete_firmware + self.get_asset_extended = firmware_service_api.v3_get_firmware_asset_extended + self.get_config = firmware_service_api.v3_get_firmware_service_config + self.list_assets = firmware_service_api.v3_list_firmware_assets + self.list_devices = firmware_service_api.v3_list_firmware_devices + self.list_firmwares = firmware_service_api.v3_list_firmwares + self.patch_config = firmware_service_api.v3_patch_firmware_service_config + + +class _Ns_L_Flavors: + def __init__(self, api_client: ApiClient): + flavors_api = FlavorsApi(api_client) + self.get_frame = flavors_api.v3_get_frame + self.get_frame_image = flavors_api.v3_get_frame_image + self.get_product_image = flavors_api.v3_get_product_image + + +class _Ns_L_Hooks: + def __init__(self, api_client: ApiClient): + hypervisor_hooks_api = HypervisorHooksApi(api_client) + self.clear = hypervisor_hooks_api.v3_clear_hyper_trace_hooks + self.create = hypervisor_hooks_api.v3_create_hook + self.delete = hypervisor_hooks_api.v3_delete_hook + self.execute = hypervisor_hooks_api.v3_execute_hyper_trace_hooks + self.get = hypervisor_hooks_api.v3_get_hook + self.list = hypervisor_hooks_api.v3_list_hooks + self.update = hypervisor_hooks_api.v3_update_hook + + +class _Ns_L_HyperTrace: + def __init__(self, api_client: ApiClient): + hyper_trace_api = HyperTraceApi(api_client) + self.clear = hyper_trace_api.v3_clear_hyper_trace + self.get_kcrange = hyper_trace_api.v3_get_instance_kcrange + self.preauthorize = hyper_trace_api.v3_btrace_preauthorize + self.start = hyper_trace_api.v3_start_hyper_trace + self.stop = hyper_trace_api.v3_stop_hyper_trace + + +class _Ns_L_Hypertune: + def __init__(self, api_client: ApiClient): + hypertune_api = HypertuneApi(api_client) + self.hash = hypertune_api.v3_hypertune_hash + self.init = hypertune_api.v3_hypertune_init + + +class _Ns_L_Images: + def __init__(self, api_client: ApiClient): + images_api = ImagesApi(api_client) + self.create = images_api.v3_create_image + self.delete = images_api.v3_delete_image + self.get = images_api.v3_get_image + self.get_chunk = images_api.v3_get_image_chunk + self.get_firmware_info = images_api.v3_get_image_firmware_info + self.get_install_firmware_status = images_api.v3_get_install_firmware_status + self.install_firmware = images_api.v3_install_firmware + self.install_firmware_assets = images_api.v3_install_firmware_assets + self.list = images_api.v3_list_images + self.upload_chunk = images_api.v3_upload_image_chunk + self.upload_data = images_api.v3_upload_image_data + + +class _Ns_L_Instances: + def __init__(self, api_client: ApiClient): + instances_api = InstancesApi(api_client) + instances_v1_api = InstancesV1Api(api_client) + self.attach_interface = instances_api.v3_attach_instance_interface + self.clear_panics = instances_api.v3_clear_instance_panics + self.create = instances_api.v3_create_instance + self.delete = instances_api.v3_delete_instance + self.detach_interface = instances_api.v3_detach_instance_interface + self.disable_expose_port = instances_api.v3_disable_expose_port + self.download_netdump_pcap = instances_api.v3_download_netdump_pcap + self.download_network_monitor_pcap = instances_api.v3_download_network_monitor_pcap + self.enable_expose_port = instances_api.v3_enable_expose_port + self.get = instances_api.v3_get_instance + self.get_console = instances_api.v3_get_instance_console + self.get_console_log = instances_api.v3_get_instance_console_log + self.get_gpios = instances_api.v3_get_instance_gpios + self.get_image_upload = instances_api.v3_get_instance_image_upload + self.get_panics = instances_api.v3_get_instance_panics + self.get_peripherals = instances_api.v3_get_instance_peripherals + self.get_quick_connect_command = instances_api.v3_get_instance_quick_connect_command + self.get_screenshot = instances_api.v3_get_instance_screenshot + self.get_state = instances_api.v3_get_instance_state + self.inject_message = instances_api.v3_inject_message + self.list = instances_api.v3_list_instances + self.media_play = instances_api.v3_media_play + self.media_stop = instances_api.v3_media_stop + self.patch = instances_api.v3_patch_instance + self.patch_read_only = instances_api.v3_patch_instance_read_only + self.pause = instances_api.v3_pause_instance + self.preauthorize_kernel_download = instances_api.v3_kernel_preauthorize + self.put_image_upload = instances_api.v3_put_instance_image_upload + self.reboot = instances_api.v3_reboot_instance + self.restore_backup = instances_api.v3_restore_backup + self.rotate = instances_api.v3_rotate_instance + self.send_input = instances_api.v3_post_instance_input + self.set_gpios = instances_api.v3_set_instance_gpios + self.set_peripherals = instances_api.v3_set_instance_peripherals + self.set_state = instances_v1_api.v1_set_instance_state + self.start = instances_api.v3_start_instance + self.start_netdump = instances_api.v3_start_netdump + self.start_network_monitor = instances_api.v3_start_network_monitor + self.stop = instances_api.v3_stop_instance + self.stop_netdump = instances_api.v3_stop_netdump + self.stop_network_monitor = instances_api.v3_stop_network_monitor + self.unpause = instances_api.v3_unpause_instance + self.upgrade = instances_api.v3_upgrade_instance + self.validate_token = instances_api.v3_validate_instance_token + + +class _Ns_L_Interconnects: + def __init__(self, api_client: ApiClient): + interconnects_api = InterconnectsApi(api_client) + self.create = interconnects_api.v3_create_interconnect + self.delete = interconnects_api.v3_delete_interconnect + self.get = interconnects_api.v3_get_interconnect + self.list = interconnects_api.v3_list_interconnects + self.patch = interconnects_api.v3_patch_interconnect + self.update = interconnects_api.v3_update_interconnect + + +class _Ns_L_Invites: + def __init__(self, api_client: ApiClient): + invites_api = InvitesApi(api_client) + self.create = invites_api.v3_create_invites + self.edit = invites_api.v3_edit_invites + self.get_by_token = invites_api.v3_get_invite_by_token + self.list = invites_api.v3_list_invites + self.revoke = invites_api.v3_revoke_invites + self.signup = invites_api.v3_signup_from_invite + + +class _Ns_L_MatrixAssessments: + def __init__(self, api_client: ApiClient): + assessments_api = AssessmentsApi(api_client) + self.add_report_modification = assessments_api.v3_create_report_modification + self.create = assessments_api.v3_create_assessment + self.delete = assessments_api.v3_delete_assessment + self.delete_report_modification = assessments_api.v3_delete_report_modification + self.download_report = assessments_api.v3_download_report + self.get = assessments_api.v3_get_assessment_by_id + self.list = assessments_api.v3_get_assessments_by_instance_id + self.run_tests = assessments_api.v3_run_tests + self.start = assessments_api.v3_start_monitoring + self.stop = assessments_api.v3_stop_monitoring + self.update = assessments_api.v3_patch_assessment + + +class _Ns_L_Matrix: + def __init__(self, api_client: ApiClient): + self.assessments = _Ns_L_MatrixAssessments(api_client) + + +class _Ns_L_Models: + def __init__(self, api_client: ApiClient): + models_api = ModelsApi(api_client) + self.get_software = models_api.v3_get_model_software + self.list = models_api.v3_get_models + + +class _Ns_L_NetConnect: + def __init__(self, api_client: ApiClient): + net_connect_api = NetConnectApi(api_client) + self.create = net_connect_api.v3_create_network_connection + self.delete = net_connect_api.v3_delete_network_connection + self.get = net_connect_api.v3_get_network_connection + self.list = net_connect_api.v3_list_network_connections + self.list_interfaces = net_connect_api.v3_list_network_interfaces + self.list_providers = net_connect_api.v3_list_network_providers + self.patch = net_connect_api.v3_partial_update_network_connection + self.update = net_connect_api.v3_update_network_connection + + +class _Ns_L_ProjectsKeys: + def __init__(self, api_client: ApiClient): + projects_api = ProjectsApi(api_client) + self.create = projects_api.v3_create_project_key + self.delete = projects_api.v3_delete_project_key + self.list = projects_api.v3_list_project_keys + + +class _Ns_L_Projects: + def __init__(self, api_client: ApiClient): + projects_api = ProjectsApi(api_client) + projects_v1_api = ProjectsV1Api(api_client) + self.create = projects_api.v3_create_project + self.delete = projects_api.v3_delete_project + self.fetch_firmware_assets = projects_api.v3_fetch_project_firmware_assets + self.get = projects_api.v3_get_project + self.get_image_upload = projects_api.v3_get_project_image_upload + self.get_network_log = projects_api.v3_get_project_network_log + self.get_network_status = projects_api.v3_get_project_network_status + self.get_vpn_config = projects_api.v3_get_project_vpn_config + self.keys = _Ns_L_ProjectsKeys(api_client) + self.list = projects_api.v3_list_projects + self.list_instances = projects_api.v3_list_project_instances + self.patch = projects_api.v3_patch_project + self.patch_settings = projects_v1_api.v1_update_project_settings + self.preauthorize_vpn_config = projects_api.v3_preauth_vpn_config + self.put_image_upload = projects_api.v3_put_project_image_upload + + +class _Ns_L_RamDump: + def __init__(self, api_client: ApiClient): + ram_dump_api = RAMDumpApi(api_client) + self.clear = ram_dump_api.v3_clear_ram_dump + self.preauthorize = ram_dump_api.v3_ram_dump_preauthorize + self.start = ram_dump_api.v3_start_ram_dump + + +class _Ns_L_RolesDeployments: + def __init__(self, api_client: ApiClient): + roles_api = RolesApi(api_client) + self.add_team = roles_api.v3_add_team_role_to_deployment + self.add_user = roles_api.v3_add_user_role_to_deployment + self.list = roles_api.v3_list_deployment_roles + self.remove_team = roles_api.v3_remove_team_role_from_deployment + self.remove_user = roles_api.v3_remove_user_role_from_deployment + + +class _Ns_L_RolesProjects: + def __init__(self, api_client: ApiClient): + roles_api = RolesApi(api_client) + self.add_team = roles_api.v3_add_team_role_to_project + self.add_user = roles_api.v3_add_user_role_to_project + self.remove_team = roles_api.v3_remove_team_role_from_project + self.remove_user = roles_api.v3_remove_user_role_from_project + + +class _Ns_L_Roles: + def __init__(self, api_client: ApiClient): + roles_api = RolesApi(api_client) + self.deployments = _Ns_L_RolesDeployments(api_client) + self.list = roles_api.v3_list_roles + self.projects = _Ns_L_RolesProjects(api_client) + + +class _Ns_L_Snapshots: + def __init__(self, api_client: ApiClient): + snapshot_sharing_api = SnapshotSharingApi(api_client) + snapshots_api = SnapshotsApi(api_client) + self.accept = snapshot_sharing_api.v3_accept_shared_snapshot + self.create = snapshots_api.v3_create_instance_snapshot + self.delete = snapshots_api.v3_delete_instance_snapshot + self.delete_by_id = snapshots_api.v3_delete_snapshot + self.delete_permissions = snapshot_sharing_api.v3_delete_snapshot_permissions + self.get = snapshots_api.v3_get_instance_snapshot + self.get_by_id = snapshots_api.v3_get_snapshot + self.get_shared = snapshot_sharing_api.v3_get_shared_snapshots + self.list = snapshots_api.v3_list_instance_snapshots + self.patch = snapshots_api.v3_patch_instance_snapshot + self.restore = snapshots_api.v3_restore_instance_snapshot + self.set_permissions = snapshot_sharing_api.v3_set_snapshot_permissions + self.share = snapshot_sharing_api.v3_share_snapshot + self.update_by_id = snapshots_api.v3_update_snapshot + + +class _Ns_L_Status: + def __init__(self, api_client: ApiClient): + status_api = StatusApi(api_client) + self.ready = status_api.v3_ready + + +class _Ns_L_Storage: + def __init__(self, api_client: ApiClient): + storage_api = StorageApi(api_client) + self.list = storage_api.v3_list_storage + self.list_files = storage_api.v3_list_storage_files + + +class _Ns_L_Teams: + def __init__(self, api_client: ApiClient): + teams_api = TeamsApi(api_client) + self.add_user = teams_api.v3_add_user_to_team + self.create = teams_api.v3_create_team + self.delete = teams_api.v3_delete_team + self.list = teams_api.v3_list_teams + self.remove_user = teams_api.v3_remove_user_from_team + self.update = teams_api.v3_update_team + + +class _Ns_L_Totp: + def __init__(self, api_client: ApiClient): + totp_api = TOTPApi(api_client) + self.disable = totp_api.v3_disable_totp + self.enable = totp_api.v3_enable_totp + self.generate = totp_api.v3_generate_totp + + +class _Ns_L_Users: + def __init__(self, api_client: ApiClient): + users_api = UsersApi(api_client) + users_v1_api = UsersV1Api(api_client) + self.agree_to_terms = users_api.v3_agree_to_terms + self.change_password = users_api.v3_change_password + self.create = users_api.v3_create_user + self.delete = users_api.v3_delete_user + self.get_reset_link_info = users_api.v3_get_reset_link_info + self.login = users_v1_api.v1_users_login + self.patch = users_api.v3_patch_user + self.reset_password = users_api.v3_reset_password + self.send_reset_link = users_api.v3_send_reset_link + self.update_profile = users_api.v3_update_own_profile + + +class _Ns_L_Version: + def __init__(self, api_client: ApiClient): + config_api = ConfigApi(api_client) + self.get = config_api.v3_get_version + + +class _Ns_L_WebPlayer: + def __init__(self, api_client: ApiClient): + web_player_api = WebPlayerApi(api_client) + self.create = web_player_api.v3_create_web_player_session + self.delete = web_player_api.v3_delete_web_player_session + self.get = web_player_api.v3_get_web_player_session + self.get_allowed_domains = web_player_api.v3_get_web_player_allowed_domains + self.list = web_player_api.v3_list_web_player_sessions + + +class _Ns_V1_Activity: + def __init__(self, api_client: ApiClient): + activity_v1_api = ActivityV1Api(api_client) + self.create_export = activity_v1_api.v1_activity_export + self.download = activity_v1_api.v1_download_activity + self.get_export_status = activity_v1_api.v1_get_activity_export_status + self.list = activity_v1_api.v1_activity_list + self.list_export_tasks = activity_v1_api.v1_get_activity_export_tasks + + +class _Ns_V1_AgentApps: + def __init__(self, api_client: ApiClient): + agent_v1_api = AgentV1Api(api_client) + self.get_icons = agent_v1_api.v1_agent_list_app_icons + self.get_ready = agent_v1_api.v1_agent_app_ready + self.get_status = agent_v1_api.v1_agent_list_apps_status + self.install = agent_v1_api.v1_agent_install_app + self.kill = agent_v1_api.v1_agent_kill_app + self.list = agent_v1_api.v1_agent_list_apps + self.run = agent_v1_api.v1_agent_run_app + self.uninstall = agent_v1_api.v1_agent_uninstall_app + + +class _Ns_V1_AgentFiles: + def __init__(self, api_client: ApiClient): + agent_v1_api = AgentV1Api(api_client) + self.delete = agent_v1_api.v1_agent_delete_file + self.get = agent_v1_api.v1_agent_get_file + self.get_temp = agent_v1_api.v1_agent_get_temp_filename + self.set_attributes = agent_v1_api.v1_agent_set_file_attributes + self.upload = agent_v1_api.v1_agent_upload_file + + +class _Ns_V1_AgentProfiles: + def __init__(self, api_client: ApiClient): + agent_v1_api = AgentV1Api(api_client) + self.install = agent_v1_api.v1_agent_install_profile + self.list = agent_v1_api.v1_agent_list_profiles + self.uninstall = agent_v1_api.v1_agent_uninstall_profile + + +class _Ns_V1_AgentSystem: + def __init__(self, api_client: ApiClient): + agent_v1_api = AgentV1Api(api_client) + self.get_adb_auth = agent_v1_api.v1_agent_system_get_adb_auth + self.get_network = agent_v1_api.v1_agent_system_get_network + self.get_prop = agent_v1_api.v1_agent_system_get_prop + self.install_open_gapps = agent_v1_api.v1_agent_system_install_open_g_apps + self.lock = agent_v1_api.v1_agent_system_lock + self.set_adb_auth = agent_v1_api.v1_agent_system_set_adb_auth + self.set_hostname = agent_v1_api.v1_agent_system_set_hostname + self.shutdown = agent_v1_api.v1_agent_system_shutdown + self.unlock = agent_v1_api.v1_agent_system_unlock + + +class _Ns_V1_Agent: + def __init__(self, api_client: ApiClient): + self.apps = _Ns_V1_AgentApps(api_client) + self.files = _Ns_V1_AgentFiles(api_client) + self.profiles = _Ns_V1_AgentProfiles(api_client) + self.system = _Ns_V1_AgentSystem(api_client) + + +class _Ns_V1_AuthApiToken: + def __init__(self, api_client: ApiClient): + authentication_v1_api = AuthenticationV1Api(api_client) + self.delete = authentication_v1_api.v1_delete_api_token + self.generate = authentication_v1_api.v1_generate_api_token + + +class _Ns_V1_Auth: + def __init__(self, api_client: ApiClient): + authentication_v1_api = AuthenticationV1Api(api_client) + self.api_token = _Ns_V1_AuthApiToken(api_client) + self.login = authentication_v1_api.v1_auth_login + + +class _Ns_V1_ClusterConfig: + def __init__(self, api_client: ApiClient): + cluster_administration_config_api = ClusterAdministrationConfigApi(api_client) + self.get = cluster_administration_config_api.v1_get_cluster_config + self.patch = cluster_administration_config_api.v1_patch_cluster_config + + +class _Ns_V1_ClusterNodes: + def __init__(self, api_client: ApiClient): + cluster_administration_nodes_api = ClusterAdministrationNodesApi(api_client) + self.get = cluster_administration_nodes_api.v1_get_cluster_nodes + self.get_console = cluster_administration_nodes_api.v1_get_console_cluster_nodes + self.list = cluster_administration_nodes_api.v1_list_cluster_nodes + + +class _Ns_V1_ClusterSnapshots: + def __init__(self, api_client: ApiClient): + cluster_snapshots_api = ClusterSnapshotsApi(api_client) + self.delete = cluster_snapshots_api.v1_delete_cluster_snapshot + self.get = cluster_snapshots_api.v1_get_cluster_snapshot + self.list = cluster_snapshots_api.v1_get_cluster_snapshots + + +class _Ns_V1_ClusterStorage: + def __init__(self, api_client: ApiClient): + storage_v1_api = StorageV1Api(api_client) + self.attach = storage_v1_api.v1_attach_storage_cluster + self.eject = storage_v1_api.v1_eject_storage_cluster + self.list = storage_v1_api.v1_list_storage_cluster + + +class _Ns_V1_Cluster: + def __init__(self, api_client: ApiClient): + self.config = _Ns_V1_ClusterConfig(api_client) + self.nodes = _Ns_V1_ClusterNodes(api_client) + self.snapshots = _Ns_V1_ClusterSnapshots(api_client) + self.storage = _Ns_V1_ClusterStorage(api_client) + + +class _Ns_V1_Config: + def __init__(self, api_client: ApiClient): + config_v1_api = ConfigV1Api(api_client) + self.get = config_v1_api.v1_get_config + + +class _Ns_V1_CoreTrace: + def __init__(self, api_client: ApiClient): + core_trace_v1_api = CoreTraceV1Api(api_client) + self.clear = core_trace_v1_api.v1_clear_core_trace + self.list_threads = core_trace_v1_api.v1_list_threads + self.start = core_trace_v1_api.v1_start_core_trace + self.stop = core_trace_v1_api.v1_stop_core_trace + + +class _Ns_V1_DomainAuthProviders: + def __init__(self, api_client: ApiClient): + domain_auth_provider_api = DomainAuthProviderApi(api_client) + self.create = domain_auth_provider_api.v1_create_domain_auth_provider + self.delete = domain_auth_provider_api.v1_delete_domain_auth_provider + self.list = domain_auth_provider_api.v1_get_domain_auth_providers + self.update = domain_auth_provider_api.v1_update_domain_auth_provider + + +class _Ns_V1_Domain: + def __init__(self, api_client: ApiClient): + domain_v1_api = DomainV1Api(api_client) + self.auth_providers = _Ns_V1_DomainAuthProviders(api_client) + self.create_welcome_message = domain_v1_api.v1_create_domain_welcome_message + self.delete_welcome_message = domain_v1_api.v1_delete_domain_welcome_message + self.get_welcome_message = domain_v1_api.v1_get_domain_welcome_message + self.patch_welcome_message = domain_v1_api.v1_update_domain_welcome_message + + +class _Ns_V1_Extensions: + def __init__(self, api_client: ApiClient): + extensions_v1_api = ExtensionsV1Api(api_client) + self.create = extensions_v1_api.v1_load_extension + self.delete = extensions_v1_api.v1_delete_extension + self.get = extensions_v1_api.v1_get_extension_by_id + self.list = extensions_v1_api.v1_get_extensions + self.parse_json = extensions_v1_api.v1_parse_extension_json + self.update = extensions_v1_api.v1_update_extension + + +class _Ns_V1_FirmwareService: + def __init__(self, api_client: ApiClient): + cluster_administration_firmware_service_api = ClusterAdministrationFirmwareServiceApi(api_client) + self.create_assets = cluster_administration_firmware_service_api.v1_create_assets_firmware_service + self.delete_asset = cluster_administration_firmware_service_api.v1_delete_asset_firmware_service + self.delete_firmware = cluster_administration_firmware_service_api.v1_delete_firmware_firmware_service + self.get_asset_extended = cluster_administration_firmware_service_api.v1_get_asset_extended_firmware_service + self.get_config = cluster_administration_firmware_service_api.v1_get_config_firmware_service + self.list_assets = cluster_administration_firmware_service_api.v1_list_assets_firmware_service + self.list_devices = cluster_administration_firmware_service_api.v1_list_devices_firmware_service + self.list_firmwares = cluster_administration_firmware_service_api.v1_list_firmwares_firmware_service + self.patch_config = cluster_administration_firmware_service_api.v1_patch_config_firmware_service + + +class _Ns_V1_Hooks: + def __init__(self, api_client: ApiClient): + hypervisor_hooks_v1_api = HypervisorHooksV1Api(api_client) + self.clear = hypervisor_hooks_v1_api.v1_clear_hyper_trace_hooks + self.create = hypervisor_hooks_v1_api.v1_create_hook + self.delete = hypervisor_hooks_v1_api.v1_delete_hook + self.execute = hypervisor_hooks_v1_api.v1_execute_hyper_trace_hooks + self.get = hypervisor_hooks_v1_api.v1_get_hook_by_id + self.list = hypervisor_hooks_v1_api.v1_get_hooks + self.update = hypervisor_hooks_v1_api.v1_update_hook + + +class _Ns_V1_HyperTrace: + def __init__(self, api_client: ApiClient): + hyper_trace_v1_api = HyperTraceV1Api(api_client) + self.clear = hyper_trace_v1_api.v1_clear_hyper_trace + self.get_kcrange = hyper_trace_v1_api.v1_kcrange + self.preauthorize = hyper_trace_v1_api.v1_btrace_preauthorize + self.start = hyper_trace_v1_api.v1_start_hyper_trace + self.stop = hyper_trace_v1_api.v1_stop_hyper_trace + + +class _Ns_V1_Images: + def __init__(self, api_client: ApiClient): + cluster_administration_firmware_service_api = ClusterAdministrationFirmwareServiceApi(api_client) + images_v1_api = ImagesV1Api(api_client) + self.create = cluster_administration_firmware_service_api.v1_create_image + self.get = images_v1_api.v1_get_image + self.get_install_firmware_status = cluster_administration_firmware_service_api.v1_get_install_firmware_status + self.install_firmware = cluster_administration_firmware_service_api.v1_install_firmware + self.install_firmware_assets = cluster_administration_firmware_service_api.v1_install_firmware_assets + self.list = images_v1_api.v1_get_images + self.upload_data = cluster_administration_firmware_service_api.v1_upload_image_data + + +class _Ns_V1_Instances: + def __init__(self, api_client: ApiClient): + instances_v1_api = InstancesV1Api(api_client) + self.attach_interface = instances_v1_api.v1_attach_instance_interface + self.clear_panics = instances_v1_api.v1_clear_instance_panics + self.create = instances_v1_api.v1_create_instance + self.delete = instances_v1_api.v1_delete_instance + self.detach_interface = instances_v1_api.v1_detach_instance_interface + self.disable_expose_port = instances_v1_api.v1_disable_expose_port + self.download_netdump_pcap = instances_v1_api.v1_download_netdump_pcap_instances + self.download_network_monitor_pcap = instances_v1_api.v1_download_network_monitor_pcap_instances + self.enable_expose_port = instances_v1_api.v1_enable_expose_port + self.get = instances_v1_api.v1_get_instance + self.get_console = instances_v1_api.v1_get_instance_console + self.get_console_log = instances_v1_api.v1_get_instance_console_log + self.get_gpios = instances_v1_api.v1_get_instance_gpios + self.get_panics = instances_v1_api.v1_get_instance_panics + self.get_peripherals = instances_v1_api.v1_get_instance_peripherals + self.get_screenshot = instances_v1_api.v1_get_instance_screenshot + self.inject_message = instances_v1_api.v1_inject_message_instances + self.list = instances_v1_api.v1_get_instances + self.media_play = instances_v1_api.v1_media_play + self.media_stop = instances_v1_api.v1_media_stop + self.patch = instances_v1_api.v1_patch_instance + self.patch_read_only = instances_v1_api.v1_patch_instance_read_only + self.pause = instances_v1_api.v1_pause_instance + self.reboot = instances_v1_api.v1_reboot_instance + self.restore_backup = instances_v1_api.v1_restore_backup + self.rotate = instances_v1_api.v1_rotate_instance + self.send_input = instances_v1_api.v1_post_instance_input + self.set_gpios = instances_v1_api.v1_set_instance_gpios + self.set_peripherals = instances_v1_api.v1_set_instance_peripherals + self.set_state = instances_v1_api.v1_set_instance_state + self.start = instances_v1_api.v1_start_instance + self.start_netdump = instances_v1_api.v1_start_netdump + self.start_network_monitor = instances_v1_api.v1_start_network_monitor + self.stop = instances_v1_api.v1_stop_instance + self.stop_netdump = instances_v1_api.v1_stop_netdump + self.stop_network_monitor = instances_v1_api.v1_stop_network_monitor + self.unpause = instances_v1_api.v1_unpause_instance + self.upgrade = instances_v1_api.v1_upgrade_instance + + +class _Ns_V1_Interconnects: + def __init__(self, api_client: ApiClient): + interconnects_v1_api = InterconnectsV1Api(api_client) + self.create = interconnects_v1_api.v1_create_interconnect + self.delete = interconnects_v1_api.v1_delete_interconnect + self.get = interconnects_v1_api.v1_get_interconnect + self.list = interconnects_v1_api.v1_list_interconnects + self.patch = interconnects_v1_api.v1_patch_interconnect + self.update = interconnects_v1_api.v1_update_interconnect + + +class _Ns_V1_Invites: + def __init__(self, api_client: ApiClient): + invites_v1_api = InvitesV1Api(api_client) + self.create = invites_v1_api.v1_create_user_invites + self.edit = invites_v1_api.v1_edit_invites + self.get_by_token = invites_v1_api.v1_invites_by_token + self.list = invites_v1_api.v1_invites + self.revoke = invites_v1_api.v1_revoke_user_invite + self.signup = invites_v1_api.v1_user_create_from_invite + + +class _Ns_V1_MatrixAssessments: + def __init__(self, api_client: ApiClient): + assessments_v1_api = AssessmentsV1Api(api_client) + self.add_report_modification = assessments_v1_api.v1_create_report_modification + self.create = assessments_v1_api.v1_create_assessment + self.delete = assessments_v1_api.v1_delete_assessment + self.delete_report_modification = assessments_v1_api.v1_delete_report_modification + self.download_report = assessments_v1_api.v1_download_report + self.get = assessments_v1_api.v1_get_assessment_by_id + self.list = assessments_v1_api.v1_get_assessments_by_instance_id + self.run_tests = assessments_v1_api.v1_run_tests + self.start = assessments_v1_api.v1_start_monitoring + self.stop = assessments_v1_api.v1_stop_monitoring + self.update = assessments_v1_api.v1_patch_assessment + + +class _Ns_V1_Matrix: + def __init__(self, api_client: ApiClient): + self.assessments = _Ns_V1_MatrixAssessments(api_client) + + +class _Ns_V1_Models: + def __init__(self, api_client: ApiClient): + models_v1_api = ModelsV1Api(api_client) + self.get_software = models_v1_api.v1_get_model_software + self.list = models_v1_api.v1_get_models + + +class _Ns_V1_NetConnect: + def __init__(self, api_client: ApiClient): + net_connect_v1_api = NetConnectV1Api(api_client) + self.create = net_connect_v1_api.v1_create_network_connection + self.delete = net_connect_v1_api.v1_delete_network_connection + self.get = net_connect_v1_api.v1_get_network_connection + self.list = net_connect_v1_api.v1_list_network_connections + self.list_interfaces = net_connect_v1_api.v1_list_network_interfaces + self.list_providers = net_connect_v1_api.v1_list_network_providers + self.patch = net_connect_v1_api.v1_partial_update_network_connection + self.update = net_connect_v1_api.v1_update_network_connection + + +class _Ns_V1_ProjectsKeys: + def __init__(self, api_client: ApiClient): + projects_v1_api = ProjectsV1Api(api_client) + self.create = projects_v1_api.v1_add_project_key + self.delete = projects_v1_api.v1_remove_project_key + self.list = projects_v1_api.v1_get_project_keys + + +class _Ns_V1_Projects: + def __init__(self, api_client: ApiClient): + projects_v1_api = ProjectsV1Api(api_client) + self.create = projects_v1_api.v1_create_project + self.delete = projects_v1_api.v1_delete_project + self.get = projects_v1_api.v1_get_project + self.get_network_log = projects_v1_api.v1_get_project_network_log + self.get_network_status = projects_v1_api.v1_get_project_network_status + self.get_vpn_config = projects_v1_api.v1_get_project_vpn_config + self.keys = _Ns_V1_ProjectsKeys(api_client) + self.list = projects_v1_api.v1_get_projects + self.list_instances = projects_v1_api.v1_get_project_instances + self.patch = projects_v1_api.v1_update_project + self.patch_settings = projects_v1_api.v1_update_project_settings + + +class _Ns_V1_RamDump: + def __init__(self, api_client: ApiClient): + ram_dump_v1_api = RAMDumpV1Api(api_client) + self.clear = ram_dump_v1_api.v1_clear_ram_dump + self.preauthorize = ram_dump_v1_api.v1_ram_dump_preauthorize + self.start = ram_dump_v1_api.v1_start_ram_dump + + +class _Ns_V1_RolesProjects: + def __init__(self, api_client: ApiClient): + roles_v1_api = RolesV1Api(api_client) + self.add_team = roles_v1_api.v1_add_team_role_to_project + self.add_user = roles_v1_api.v1_add_user_role_to_project + self.remove_team = roles_v1_api.v1_remove_team_role_from_project + self.remove_user = roles_v1_api.v1_remove_user_role_from_project + + +class _Ns_V1_Roles: + def __init__(self, api_client: ApiClient): + roles_v1_api = RolesV1Api(api_client) + self.list = roles_v1_api.v1_roles + self.projects = _Ns_V1_RolesProjects(api_client) + + +class _Ns_V1_Snapshots: + def __init__(self, api_client: ApiClient): + snapshot_sharing_v1_api = SnapshotSharingV1Api(api_client) + snapshots_v1_api = SnapshotsV1Api(api_client) + self.accept = snapshot_sharing_v1_api.v1_accept_shared_snapshot + self.create = snapshots_v1_api.v1_create_snapshot + self.delete = snapshots_v1_api.v1_delete_instance_snapshot + self.delete_by_id = snapshots_v1_api.v1_delete_snapshot + self.delete_permissions = snapshot_sharing_v1_api.v1_delete_snapshot_permissions + self.get = snapshots_v1_api.v1_get_instance_snapshot + self.get_by_id = snapshots_v1_api.v1_get_snapshot + self.get_shared = snapshot_sharing_v1_api.v1_get_shared_snapshots + self.list = snapshots_v1_api.v1_get_instance_snapshots + self.patch = snapshots_v1_api.v1_rename_instance_snapshot + self.restore = snapshots_v1_api.v1_restore_instance_snapshot + self.set_permissions = snapshot_sharing_v1_api.v1_set_snapshot_permissions + self.share = snapshot_sharing_v1_api.v1_share_snapshot + self.update_by_id = snapshots_v1_api.v1_snapshot_rename + + +class _Ns_V1_Status: + def __init__(self, api_client: ApiClient): + status_v1_api = StatusV1Api(api_client) + self.ready = status_v1_api.v1_ready + + +class _Ns_V1_Storage: + def __init__(self, api_client: ApiClient): + storage_v1_api = StorageV1Api(api_client) + self.list = storage_v1_api.v1_list_storage + self.list_files = storage_v1_api.v1_list_storage_files + + +class _Ns_V1_Teams: + def __init__(self, api_client: ApiClient): + teams_v1_api = TeamsV1Api(api_client) + self.add_user = teams_v1_api.v1_add_user_to_team + self.create = teams_v1_api.v1_team_create + self.delete = teams_v1_api.v1_team_delete + self.list = teams_v1_api.v1_teams + self.remove_user = teams_v1_api.v1_remove_user_from_team + self.update = teams_v1_api.v1_team_change + + +class _Ns_V1_Users: + def __init__(self, api_client: ApiClient): + users_v1_api = UsersV1Api(api_client) + self.agree_to_terms = users_v1_api.v1_user_agree_terms + self.change_password = users_v1_api.v1_change_password_users + self.create = users_v1_api.v1_create_user + self.delete = users_v1_api.v1_delete_user + self.get_reset_link_info = users_v1_api.v1_get_reset_link_info + self.login = users_v1_api.v1_users_login + self.patch = users_v1_api.v1_update_user + self.reset_password = users_v1_api.v1_reset_user_password + self.send_reset_link = users_v1_api.v1_send_user_reset_link + + +class _Ns_V1_WebPlayer: + def __init__(self, api_client: ApiClient): + web_player_v1_api = WebPlayerV1Api(api_client) + self.create = web_player_v1_api.v1_web_player_create_session + self.delete = web_player_v1_api.v1_web_player_destroy_session + self.get = web_player_v1_api.v1_web_player_session_info + self.get_allowed_domains = web_player_v1_api.v1_web_player_allowed_domains + self.list = web_player_v1_api.v1_web_player_list_sessions + + +class _Ns_V1: + def __init__(self, api_client: ApiClient): + self.activity = _Ns_V1_Activity(api_client) + self.agent = _Ns_V1_Agent(api_client) + self.auth = _Ns_V1_Auth(api_client) + self.cluster = _Ns_V1_Cluster(api_client) + self.config = _Ns_V1_Config(api_client) + self.core_trace = _Ns_V1_CoreTrace(api_client) + self.domain = _Ns_V1_Domain(api_client) + self.extensions = _Ns_V1_Extensions(api_client) + self.firmware_service = _Ns_V1_FirmwareService(api_client) + self.hooks = _Ns_V1_Hooks(api_client) + self.hyper_trace = _Ns_V1_HyperTrace(api_client) + self.images = _Ns_V1_Images(api_client) + self.instances = _Ns_V1_Instances(api_client) + self.interconnects = _Ns_V1_Interconnects(api_client) + self.invites = _Ns_V1_Invites(api_client) + self.matrix = _Ns_V1_Matrix(api_client) + self.models = _Ns_V1_Models(api_client) + self.net_connect = _Ns_V1_NetConnect(api_client) + self.projects = _Ns_V1_Projects(api_client) + self.ram_dump = _Ns_V1_RamDump(api_client) + self.roles = _Ns_V1_Roles(api_client) + self.snapshots = _Ns_V1_Snapshots(api_client) + self.status = _Ns_V1_Status(api_client) + self.storage = _Ns_V1_Storage(api_client) + self.teams = _Ns_V1_Teams(api_client) + self.users = _Ns_V1_Users(api_client) + self.web_player = _Ns_V1_WebPlayer(api_client) + + +class _Ns_V2_Images: + def __init__(self, api_client: ApiClient): + images_v2_api = ImagesV2Api(api_client) + self.delete = images_v2_api.v1_delete_image + + +class _Ns_V2_Instances: + def __init__(self, api_client: ApiClient): + instances_v2_api = InstancesV2Api(api_client) + self.get_quick_connect_command = instances_v2_api.v2_get_instance_quick_connect_command + self.get_state = instances_v2_api.v2_get_instance_state + + +class _Ns_V2: + def __init__(self, api_client: ApiClient): + self.images = _Ns_V2_Images(api_client) + self.instances = _Ns_V2_Instances(api_client) + + +class _Ns_V3_Activity: + def __init__(self, api_client: ApiClient): + activity_api = ActivityApi(api_client) + self.create_export = activity_api.v3_create_activity_export + self.download = activity_api.v3_download_activity + self.get_export_status = activity_api.v3_get_activity_export_status + self.list = activity_api.v3_list_activities + self.list_export_tasks = activity_api.v3_get_activity_export_tasks + + +class _Ns_V3_AgentApps: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.get_icons = agent_api.v3_list_app_icons_agent + self.get_ready = agent_api.v3_get_app_ready_agent + self.get_status = agent_api.v3_list_apps_status_agent + self.install = agent_api.v3_install_agent + self.kill = agent_api.v3_kill_app_agent + self.list = agent_api.v3_list_apps_agent + self.run = agent_api.v3_run_app_agent + self.uninstall = agent_api.v3_uninstall_app_agent + + +class _Ns_V3_AgentContainers: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.get_health = agent_api.v3_get_container_health_agent + self.list = agent_api.v3_list_containers_agent + self.start = agent_api.v3_start_container_agent + self.start_app = agent_api.v3_start_container_app_agent + self.start_app_monitored = agent_api.v3_start_container_app_monitored_agent + self.stop = agent_api.v3_stop_container_agent + self.stop_app = agent_api.v3_stop_container_app_agent + + +class _Ns_V3_AgentFiles: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.delete = agent_api.v3_delete_file_agent + self.get = agent_api.v3_get_file_agent + self.get_temp = agent_api.v3_get_temp_file_agent + self.preauthorize_archive_download = agent_api.v3_preauthorize_file_archive_download_agent + self.preauthorize_download = agent_api.v3_preauthorize_file_download_agent + self.set_attributes = agent_api.v3_set_file_attributes_agent + self.upload = agent_api.v3_upload_file_agent + + +class _Ns_V3_AgentFrida: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.kill = agent_api.v3_kill_frida_agent + self.list_processes = agent_api.v3_list_frida_processes_agent + self.run = agent_api.v3_run_frida_agent + + +class _Ns_V3_AgentProfiles: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.install = agent_api.v3_install_profile_agent + self.list = agent_api.v3_list_profiles_agent + self.uninstall = agent_api.v3_uninstall_profile_agent + + +class _Ns_V3_AgentRemoteIt: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.get_status = agent_api.v3_get_remote_it_status_agent + self.install = agent_api.v3_install_remote_it_agent + self.uninstall = agent_api.v3_uninstall_remote_it_agent + + +class _Ns_V3_AgentSystem: + def __init__(self, api_client: ApiClient): + agent_api = AgentApi(api_client) + self.get_adb_auth = agent_api.v3_get_adb_auth_agent + self.get_network = agent_api.v3_get_network_agent + self.get_prop = agent_api.v3_get_prop_agent + self.install_open_gapps = agent_api.v3_install_open_gapps_agent + self.lock = agent_api.v3_lock_agent + self.set_adb_auth = agent_api.v3_set_adb_auth_agent + self.set_device_properties = agent_api.v3_set_device_properties_agent + self.set_hostname = agent_api.v3_set_hostname_agent + self.shutdown = agent_api.v3_shutdown_agent + self.unlock = agent_api.v3_unlock_agent + + +class _Ns_V3_Agent: + def __init__(self, api_client: ApiClient): + self.apps = _Ns_V3_AgentApps(api_client) + self.containers = _Ns_V3_AgentContainers(api_client) + self.files = _Ns_V3_AgentFiles(api_client) + self.frida = _Ns_V3_AgentFrida(api_client) + self.profiles = _Ns_V3_AgentProfiles(api_client) + self.remote_it = _Ns_V3_AgentRemoteIt(api_client) + self.system = _Ns_V3_AgentSystem(api_client) + + +class _Ns_V3_AuthApiToken: + def __init__(self, api_client: ApiClient): + authentication_api = AuthenticationApi(api_client) + self.delete = authentication_api.v3_delete_api_token + self.generate = authentication_api.v3_generate_api_token + + +class _Ns_V3_AuthProviders: + def __init__(self, api_client: ApiClient): + authentication_api = AuthenticationApi(api_client) + self.fetch_metadata = authentication_api.v3_fetch_auth_provider_metadata + self.get_authorization_url = authentication_api.v3_get_auth_provider_authorization_url + self.get_callback = authentication_api.v3_get_auth_provider_callback + self.get_sp_metadata = authentication_api.v3_get_auth_provider_sp_metadata + self.list = authentication_api.v3_list_auth_providers + self.list_types = authentication_api.v3_list_auth_provider_types + self.post_callback = authentication_api.v3_post_auth_provider_callback + + +class _Ns_V3_Auth: + def __init__(self, api_client: ApiClient): + authentication_api = AuthenticationApi(api_client) + self.api_token = _Ns_V3_AuthApiToken(api_client) + self.login = authentication_api.v3_auth_login + self.logout = authentication_api.v3_auth_logout + self.providers = _Ns_V3_AuthProviders(api_client) + + +class _Ns_V3_Billing: + def __init__(self, api_client: ApiClient): + billing_api = BillingApi(api_client) + self.cancel = billing_api.v3_cancel_subscription + self.get_device_usage = billing_api.v3_get_device_usage + self.get_metered_usage = billing_api.v3_get_metered_subscription_usage + self.get_subscription = billing_api.v3_get_subscription + self.get_summary = billing_api.v3_get_billing_summary + self.subscribe_to_trial = billing_api.v3_subscribe_to_trial + self.uncancel = billing_api.v3_uncancel_subscription + + +class _Ns_V3_ClusterConfig: + def __init__(self, api_client: ApiClient): + cluster_api = ClusterApi(api_client) + self.get = cluster_api.v3_get_cluster_config + self.patch = cluster_api.v3_patch_cluster_config + + +class _Ns_V3_ClusterNodes: + def __init__(self, api_client: ApiClient): + cluster_api = ClusterApi(api_client) + self.get = cluster_api.v3_get_cluster_node + self.get_console = cluster_api.v3_get_cluster_node_console + self.list = cluster_api.v3_list_cluster_nodes + + +class _Ns_V3_ClusterSnapshots: + def __init__(self, api_client: ApiClient): + cluster_api = ClusterApi(api_client) + self.delete = cluster_api.v3_delete_cluster_snapshot + self.get = cluster_api.v3_get_cluster_snapshot + self.list = cluster_api.v3_list_cluster_snapshots + + +class _Ns_V3_ClusterStorage: + def __init__(self, api_client: ApiClient): + storage_api = StorageApi(api_client) + self.attach = storage_api.v3_attach_cluster_storage + self.eject = storage_api.v3_eject_cluster_storage + self.list = storage_api.v3_list_cluster_storage + + +class _Ns_V3_Cluster: + def __init__(self, api_client: ApiClient): + self.config = _Ns_V3_ClusterConfig(api_client) + self.nodes = _Ns_V3_ClusterNodes(api_client) + self.snapshots = _Ns_V3_ClusterSnapshots(api_client) + self.storage = _Ns_V3_ClusterStorage(api_client) + + +class _Ns_V3_Config: + def __init__(self, api_client: ApiClient): + config_api = ConfigApi(api_client) + self.get = config_api.v3_get_config + + +class _Ns_V3_CoreTrace: + def __init__(self, api_client: ApiClient): + core_trace_api = CoreTraceApi(api_client) + self.clear = core_trace_api.v3_clear_core_trace + self.list_threads = core_trace_api.v3_list_threads + self.preauthorize = core_trace_api.v3_strace_preauthorize + self.start = core_trace_api.v3_start_core_trace + self.stop = core_trace_api.v3_stop_core_trace + + +class _Ns_V3_DomainAuthProviders: + def __init__(self, api_client: ApiClient): + domain_auth_providers_api = DomainAuthProvidersApi(api_client) + self.create = domain_auth_providers_api.v3_create_domain_auth_provider + self.delete = domain_auth_providers_api.v3_delete_domain_auth_provider + self.list = domain_auth_providers_api.v3_list_domain_auth_providers + self.patch = domain_auth_providers_api.v3_patch_domain_auth_provider + self.update = domain_auth_providers_api.v3_update_domain_auth_provider + + +class _Ns_V3_Domain: + def __init__(self, api_client: ApiClient): + domain_api = DomainApi(api_client) + self.auth_providers = _Ns_V3_DomainAuthProviders(api_client) + self.create_welcome_message = domain_api.v3_create_domain_welcome_message + self.delete_welcome_message = domain_api.v3_delete_domain_welcome_message + self.get_image_upload = domain_api.v3_get_domain_image_upload + self.get_welcome_message = domain_api.v3_get_domain_welcome_message + self.list_software = domain_api.v3_list_domain_software + self.patch_welcome_message = domain_api.v3_patch_domain_welcome_message + self.put_image_upload = domain_api.v3_put_domain_image_upload + + +class _Ns_V3_Extensions: + def __init__(self, api_client: ApiClient): + extensions_api = ExtensionsApi(api_client) + self.create = extensions_api.v3_load_extension + self.delete = extensions_api.v3_delete_extension + self.get = extensions_api.v3_get_extension_by_id + self.list = extensions_api.v3_list_extensions + self.parse_json = extensions_api.v3_parse_extension_json + self.update = extensions_api.v3_update_extension + + +class _Ns_V3_FirmwareService: + def __init__(self, api_client: ApiClient): + firmware_service_api = FirmwareServiceApi(api_client) + self.create_assets = firmware_service_api.v3_create_firmware_assets + self.delete_asset = firmware_service_api.v3_delete_firmware_asset + self.delete_firmware = firmware_service_api.v3_delete_firmware + self.get_asset_extended = firmware_service_api.v3_get_firmware_asset_extended + self.get_config = firmware_service_api.v3_get_firmware_service_config + self.list_assets = firmware_service_api.v3_list_firmware_assets + self.list_devices = firmware_service_api.v3_list_firmware_devices + self.list_firmwares = firmware_service_api.v3_list_firmwares + self.patch_config = firmware_service_api.v3_patch_firmware_service_config + + +class _Ns_V3_Flavors: + def __init__(self, api_client: ApiClient): + flavors_api = FlavorsApi(api_client) + self.get_frame = flavors_api.v3_get_frame + self.get_frame_image = flavors_api.v3_get_frame_image + self.get_product_image = flavors_api.v3_get_product_image + + +class _Ns_V3_Hooks: + def __init__(self, api_client: ApiClient): + hypervisor_hooks_api = HypervisorHooksApi(api_client) + self.clear = hypervisor_hooks_api.v3_clear_hyper_trace_hooks + self.create = hypervisor_hooks_api.v3_create_hook + self.delete = hypervisor_hooks_api.v3_delete_hook + self.execute = hypervisor_hooks_api.v3_execute_hyper_trace_hooks + self.get = hypervisor_hooks_api.v3_get_hook + self.list = hypervisor_hooks_api.v3_list_hooks + self.update = hypervisor_hooks_api.v3_update_hook + + +class _Ns_V3_HyperTrace: + def __init__(self, api_client: ApiClient): + hyper_trace_api = HyperTraceApi(api_client) + self.clear = hyper_trace_api.v3_clear_hyper_trace + self.get_kcrange = hyper_trace_api.v3_get_instance_kcrange + self.preauthorize = hyper_trace_api.v3_btrace_preauthorize + self.start = hyper_trace_api.v3_start_hyper_trace + self.stop = hyper_trace_api.v3_stop_hyper_trace + + +class _Ns_V3_Hypertune: + def __init__(self, api_client: ApiClient): + hypertune_api = HypertuneApi(api_client) + self.hash = hypertune_api.v3_hypertune_hash + self.init = hypertune_api.v3_hypertune_init + + +class _Ns_V3_Images: + def __init__(self, api_client: ApiClient): + images_api = ImagesApi(api_client) + self.create = images_api.v3_create_image + self.delete = images_api.v3_delete_image + self.get = images_api.v3_get_image + self.get_chunk = images_api.v3_get_image_chunk + self.get_firmware_info = images_api.v3_get_image_firmware_info + self.get_install_firmware_status = images_api.v3_get_install_firmware_status + self.install_firmware = images_api.v3_install_firmware + self.install_firmware_assets = images_api.v3_install_firmware_assets + self.list = images_api.v3_list_images + self.upload_chunk = images_api.v3_upload_image_chunk + self.upload_data = images_api.v3_upload_image_data + + +class _Ns_V3_Instances: + def __init__(self, api_client: ApiClient): + instances_api = InstancesApi(api_client) + self.attach_interface = instances_api.v3_attach_instance_interface + self.clear_panics = instances_api.v3_clear_instance_panics + self.create = instances_api.v3_create_instance + self.delete = instances_api.v3_delete_instance + self.detach_interface = instances_api.v3_detach_instance_interface + self.disable_expose_port = instances_api.v3_disable_expose_port + self.download_netdump_pcap = instances_api.v3_download_netdump_pcap + self.download_network_monitor_pcap = instances_api.v3_download_network_monitor_pcap + self.enable_expose_port = instances_api.v3_enable_expose_port + self.get = instances_api.v3_get_instance + self.get_console = instances_api.v3_get_instance_console + self.get_console_log = instances_api.v3_get_instance_console_log + self.get_gpios = instances_api.v3_get_instance_gpios + self.get_image_upload = instances_api.v3_get_instance_image_upload + self.get_panics = instances_api.v3_get_instance_panics + self.get_peripherals = instances_api.v3_get_instance_peripherals + self.get_quick_connect_command = instances_api.v3_get_instance_quick_connect_command + self.get_screenshot = instances_api.v3_get_instance_screenshot + self.get_state = instances_api.v3_get_instance_state + self.inject_message = instances_api.v3_inject_message + self.list = instances_api.v3_list_instances + self.media_play = instances_api.v3_media_play + self.media_stop = instances_api.v3_media_stop + self.patch = instances_api.v3_patch_instance + self.patch_read_only = instances_api.v3_patch_instance_read_only + self.pause = instances_api.v3_pause_instance + self.preauthorize_kernel_download = instances_api.v3_kernel_preauthorize + self.put_image_upload = instances_api.v3_put_instance_image_upload + self.reboot = instances_api.v3_reboot_instance + self.restore_backup = instances_api.v3_restore_backup + self.rotate = instances_api.v3_rotate_instance + self.send_input = instances_api.v3_post_instance_input + self.set_gpios = instances_api.v3_set_instance_gpios + self.set_peripherals = instances_api.v3_set_instance_peripherals + self.start = instances_api.v3_start_instance + self.start_netdump = instances_api.v3_start_netdump + self.start_network_monitor = instances_api.v3_start_network_monitor + self.stop = instances_api.v3_stop_instance + self.stop_netdump = instances_api.v3_stop_netdump + self.stop_network_monitor = instances_api.v3_stop_network_monitor + self.unpause = instances_api.v3_unpause_instance + self.upgrade = instances_api.v3_upgrade_instance + self.validate_token = instances_api.v3_validate_instance_token + + +class _Ns_V3_Interconnects: + def __init__(self, api_client: ApiClient): + interconnects_api = InterconnectsApi(api_client) + self.create = interconnects_api.v3_create_interconnect + self.delete = interconnects_api.v3_delete_interconnect + self.get = interconnects_api.v3_get_interconnect + self.list = interconnects_api.v3_list_interconnects + self.patch = interconnects_api.v3_patch_interconnect + self.update = interconnects_api.v3_update_interconnect + + +class _Ns_V3_Invites: + def __init__(self, api_client: ApiClient): + invites_api = InvitesApi(api_client) + self.create = invites_api.v3_create_invites + self.edit = invites_api.v3_edit_invites + self.get_by_token = invites_api.v3_get_invite_by_token + self.list = invites_api.v3_list_invites + self.revoke = invites_api.v3_revoke_invites + self.signup = invites_api.v3_signup_from_invite + + +class _Ns_V3_MatrixAssessments: + def __init__(self, api_client: ApiClient): + assessments_api = AssessmentsApi(api_client) + self.add_report_modification = assessments_api.v3_create_report_modification + self.create = assessments_api.v3_create_assessment + self.delete = assessments_api.v3_delete_assessment + self.delete_report_modification = assessments_api.v3_delete_report_modification + self.download_report = assessments_api.v3_download_report + self.get = assessments_api.v3_get_assessment_by_id + self.list = assessments_api.v3_get_assessments_by_instance_id + self.run_tests = assessments_api.v3_run_tests + self.start = assessments_api.v3_start_monitoring + self.stop = assessments_api.v3_stop_monitoring + self.update = assessments_api.v3_patch_assessment + + +class _Ns_V3_Matrix: + def __init__(self, api_client: ApiClient): + self.assessments = _Ns_V3_MatrixAssessments(api_client) + + +class _Ns_V3_Models: + def __init__(self, api_client: ApiClient): + models_api = ModelsApi(api_client) + self.get_software = models_api.v3_get_model_software + self.list = models_api.v3_get_models + + +class _Ns_V3_NetConnect: + def __init__(self, api_client: ApiClient): + net_connect_api = NetConnectApi(api_client) + self.create = net_connect_api.v3_create_network_connection + self.delete = net_connect_api.v3_delete_network_connection + self.get = net_connect_api.v3_get_network_connection + self.list = net_connect_api.v3_list_network_connections + self.list_interfaces = net_connect_api.v3_list_network_interfaces + self.list_providers = net_connect_api.v3_list_network_providers + self.patch = net_connect_api.v3_partial_update_network_connection + self.update = net_connect_api.v3_update_network_connection + + +class _Ns_V3_ProjectsKeys: + def __init__(self, api_client: ApiClient): + projects_api = ProjectsApi(api_client) + self.create = projects_api.v3_create_project_key + self.delete = projects_api.v3_delete_project_key + self.list = projects_api.v3_list_project_keys + + +class _Ns_V3_Projects: + def __init__(self, api_client: ApiClient): + projects_api = ProjectsApi(api_client) + self.create = projects_api.v3_create_project + self.delete = projects_api.v3_delete_project + self.fetch_firmware_assets = projects_api.v3_fetch_project_firmware_assets + self.get = projects_api.v3_get_project + self.get_image_upload = projects_api.v3_get_project_image_upload + self.get_network_log = projects_api.v3_get_project_network_log + self.get_network_status = projects_api.v3_get_project_network_status + self.get_vpn_config = projects_api.v3_get_project_vpn_config + self.keys = _Ns_V3_ProjectsKeys(api_client) + self.list = projects_api.v3_list_projects + self.list_instances = projects_api.v3_list_project_instances + self.patch = projects_api.v3_patch_project + self.preauthorize_vpn_config = projects_api.v3_preauth_vpn_config + self.put_image_upload = projects_api.v3_put_project_image_upload + + +class _Ns_V3_RamDump: + def __init__(self, api_client: ApiClient): + ram_dump_api = RAMDumpApi(api_client) + self.clear = ram_dump_api.v3_clear_ram_dump + self.preauthorize = ram_dump_api.v3_ram_dump_preauthorize + self.start = ram_dump_api.v3_start_ram_dump + + +class _Ns_V3_RolesDeployments: + def __init__(self, api_client: ApiClient): + roles_api = RolesApi(api_client) + self.add_team = roles_api.v3_add_team_role_to_deployment + self.add_user = roles_api.v3_add_user_role_to_deployment + self.list = roles_api.v3_list_deployment_roles + self.remove_team = roles_api.v3_remove_team_role_from_deployment + self.remove_user = roles_api.v3_remove_user_role_from_deployment + + +class _Ns_V3_RolesProjects: + def __init__(self, api_client: ApiClient): + roles_api = RolesApi(api_client) + self.add_team = roles_api.v3_add_team_role_to_project + self.add_user = roles_api.v3_add_user_role_to_project + self.remove_team = roles_api.v3_remove_team_role_from_project + self.remove_user = roles_api.v3_remove_user_role_from_project + + +class _Ns_V3_Roles: + def __init__(self, api_client: ApiClient): + roles_api = RolesApi(api_client) + self.deployments = _Ns_V3_RolesDeployments(api_client) + self.list = roles_api.v3_list_roles + self.projects = _Ns_V3_RolesProjects(api_client) + + +class _Ns_V3_Snapshots: + def __init__(self, api_client: ApiClient): + snapshot_sharing_api = SnapshotSharingApi(api_client) + snapshots_api = SnapshotsApi(api_client) + self.accept = snapshot_sharing_api.v3_accept_shared_snapshot + self.create = snapshots_api.v3_create_instance_snapshot + self.delete = snapshots_api.v3_delete_instance_snapshot + self.delete_by_id = snapshots_api.v3_delete_snapshot + self.delete_permissions = snapshot_sharing_api.v3_delete_snapshot_permissions + self.get = snapshots_api.v3_get_instance_snapshot + self.get_by_id = snapshots_api.v3_get_snapshot + self.get_shared = snapshot_sharing_api.v3_get_shared_snapshots + self.list = snapshots_api.v3_list_instance_snapshots + self.patch = snapshots_api.v3_patch_instance_snapshot + self.restore = snapshots_api.v3_restore_instance_snapshot + self.set_permissions = snapshot_sharing_api.v3_set_snapshot_permissions + self.share = snapshot_sharing_api.v3_share_snapshot + self.update_by_id = snapshots_api.v3_update_snapshot + + +class _Ns_V3_Status: + def __init__(self, api_client: ApiClient): + status_api = StatusApi(api_client) + self.ready = status_api.v3_ready + + +class _Ns_V3_Storage: + def __init__(self, api_client: ApiClient): + storage_api = StorageApi(api_client) + self.list = storage_api.v3_list_storage + self.list_files = storage_api.v3_list_storage_files + + +class _Ns_V3_Teams: + def __init__(self, api_client: ApiClient): + teams_api = TeamsApi(api_client) + self.add_user = teams_api.v3_add_user_to_team + self.create = teams_api.v3_create_team + self.delete = teams_api.v3_delete_team + self.list = teams_api.v3_list_teams + self.remove_user = teams_api.v3_remove_user_from_team + self.update = teams_api.v3_update_team + + +class _Ns_V3_Totp: + def __init__(self, api_client: ApiClient): + totp_api = TOTPApi(api_client) + self.disable = totp_api.v3_disable_totp + self.enable = totp_api.v3_enable_totp + self.generate = totp_api.v3_generate_totp + + +class _Ns_V3_Users: + def __init__(self, api_client: ApiClient): + users_api = UsersApi(api_client) + self.agree_to_terms = users_api.v3_agree_to_terms + self.change_password = users_api.v3_change_password + self.create = users_api.v3_create_user + self.delete = users_api.v3_delete_user + self.get_reset_link_info = users_api.v3_get_reset_link_info + self.patch = users_api.v3_patch_user + self.reset_password = users_api.v3_reset_password + self.send_reset_link = users_api.v3_send_reset_link + self.update_profile = users_api.v3_update_own_profile + + +class _Ns_V3_Version: + def __init__(self, api_client: ApiClient): + config_api = ConfigApi(api_client) + self.get = config_api.v3_get_version + + +class _Ns_V3_WebPlayer: + def __init__(self, api_client: ApiClient): + web_player_api = WebPlayerApi(api_client) + self.create = web_player_api.v3_create_web_player_session + self.delete = web_player_api.v3_delete_web_player_session + self.get = web_player_api.v3_get_web_player_session + self.get_allowed_domains = web_player_api.v3_get_web_player_allowed_domains + self.list = web_player_api.v3_list_web_player_sessions + + +class _Ns_V3: + def __init__(self, api_client: ApiClient): + self.activity = _Ns_V3_Activity(api_client) + self.agent = _Ns_V3_Agent(api_client) + self.auth = _Ns_V3_Auth(api_client) + self.billing = _Ns_V3_Billing(api_client) + self.cluster = _Ns_V3_Cluster(api_client) + self.config = _Ns_V3_Config(api_client) + self.core_trace = _Ns_V3_CoreTrace(api_client) + self.domain = _Ns_V3_Domain(api_client) + self.extensions = _Ns_V3_Extensions(api_client) + self.firmware_service = _Ns_V3_FirmwareService(api_client) + self.flavors = _Ns_V3_Flavors(api_client) + self.hooks = _Ns_V3_Hooks(api_client) + self.hyper_trace = _Ns_V3_HyperTrace(api_client) + self.hypertune = _Ns_V3_Hypertune(api_client) + self.images = _Ns_V3_Images(api_client) + self.instances = _Ns_V3_Instances(api_client) + self.interconnects = _Ns_V3_Interconnects(api_client) + self.invites = _Ns_V3_Invites(api_client) + self.matrix = _Ns_V3_Matrix(api_client) + self.models = _Ns_V3_Models(api_client) + self.net_connect = _Ns_V3_NetConnect(api_client) + self.projects = _Ns_V3_Projects(api_client) + self.ram_dump = _Ns_V3_RamDump(api_client) + self.roles = _Ns_V3_Roles(api_client) + self.snapshots = _Ns_V3_Snapshots(api_client) + self.status = _Ns_V3_Status(api_client) + self.storage = _Ns_V3_Storage(api_client) + self.teams = _Ns_V3_Teams(api_client) + self.totp = _Ns_V3_Totp(api_client) + self.users = _Ns_V3_Users(api_client) + self.version = _Ns_V3_Version(api_client) + self.web_player = _Ns_V3_WebPlayer(api_client) + + +class CorelliumClient: + """Typed Corellium API client. + + client..(...) — latest (blended high-water-mark per op) + client.v{n}..(...) — pinned, version-locked + """ + + def __init__(self, configuration: Configuration | None = None, api_client: ApiClient | None = None): + if api_client is None: + api_client = ApiClient(configuration or Configuration()) + self.api_client = api_client + + self.activity = _Ns_L_Activity(api_client) + self.agent = _Ns_L_Agent(api_client) + self.auth = _Ns_L_Auth(api_client) + self.billing = _Ns_L_Billing(api_client) + self.cluster = _Ns_L_Cluster(api_client) + self.config = _Ns_L_Config(api_client) + self.core_trace = _Ns_L_CoreTrace(api_client) + self.domain = _Ns_L_Domain(api_client) + self.extensions = _Ns_L_Extensions(api_client) + self.firmware_service = _Ns_L_FirmwareService(api_client) + self.flavors = _Ns_L_Flavors(api_client) + self.hooks = _Ns_L_Hooks(api_client) + self.hyper_trace = _Ns_L_HyperTrace(api_client) + self.hypertune = _Ns_L_Hypertune(api_client) + self.images = _Ns_L_Images(api_client) + self.instances = _Ns_L_Instances(api_client) + self.interconnects = _Ns_L_Interconnects(api_client) + self.invites = _Ns_L_Invites(api_client) + self.matrix = _Ns_L_Matrix(api_client) + self.models = _Ns_L_Models(api_client) + self.net_connect = _Ns_L_NetConnect(api_client) + self.projects = _Ns_L_Projects(api_client) + self.ram_dump = _Ns_L_RamDump(api_client) + self.roles = _Ns_L_Roles(api_client) + self.snapshots = _Ns_L_Snapshots(api_client) + self.status = _Ns_L_Status(api_client) + self.storage = _Ns_L_Storage(api_client) + self.teams = _Ns_L_Teams(api_client) + self.totp = _Ns_L_Totp(api_client) + self.users = _Ns_L_Users(api_client) + self.version = _Ns_L_Version(api_client) + self.web_player = _Ns_L_WebPlayer(api_client) + + self.v1 = _Ns_V1(api_client) + self.v2 = _Ns_V2(api_client) + self.v3 = _Ns_V3(api_client) + + +__all__ = ["CorelliumClient", "Configuration", "ApiClient"] diff --git a/corellium/exceptions.py b/corellium/exceptions.py new file mode 100644 index 0000000..3ea5340 --- /dev/null +++ b/corellium/exceptions.py @@ -0,0 +1,217 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/corellium/models/__init__.py b/corellium/models/__init__.py new file mode 100644 index 0000000..46bfbf4 --- /dev/null +++ b/corellium/models/__init__.py @@ -0,0 +1,707 @@ +# coding: utf-8 + +# flake8: noqa +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from corellium.models.accept_snapshot_body import AcceptSnapshotBody +from corellium.models.accept_snapshot_request_payload import AcceptSnapshotRequestPayload +from corellium.models.account_setup_response import AccountSetupResponse +from corellium.models.activity import Activity +from corellium.models.activity_export_dto import ActivityExportDto +from corellium.models.activity_export_format import ActivityExportFormat +from corellium.models.activity_export_response import ActivityExportResponse +from corellium.models.activity_export_status import ActivityExportStatus +from corellium.models.activity_export_task import ActivityExportTask +from corellium.models.activity_export_task_list import ActivityExportTaskList +from corellium.models.activity_list import ActivityList +from corellium.models.activity_list_response import ActivityListResponse +from corellium.models.activity_request import ActivityRequest +from corellium.models.activity_resource_not_starts_with_filter import ActivityResourceNotStartsWithFilter +from corellium.models.activity_resource_starts_with_filter import ActivityResourceStartsWithFilter +from corellium.models.activity_v1 import ActivityV1 +from corellium.models.address import Address +from corellium.models.agent_app import AgentApp +from corellium.models.agent_app_ready_response import AgentAppReadyResponse +from corellium.models.agent_app_ready_response_v1 import AgentAppReadyResponseV1 +from corellium.models.agent_app_status import AgentAppStatus +from corellium.models.agent_app_status_v1 import AgentAppStatusV1 +from corellium.models.agent_app_v1 import AgentAppV1 +from corellium.models.agent_apps_list import AgentAppsList +from corellium.models.agent_apps_list_v1 import AgentAppsListV1 +from corellium.models.agent_apps_status_list import AgentAppsStatusList +from corellium.models.agent_apps_status_list_v1 import AgentAppsStatusListV1 +from corellium.models.agent_container import AgentContainer +from corellium.models.agent_container_health import AgentContainerHealth +from corellium.models.agent_container_list import AgentContainerList +from corellium.models.agent_error import AgentError +from corellium.models.agent_error_v1 import AgentErrorV1 +from corellium.models.agent_file_archive_download_body import AgentFileArchiveDownloadBody +from corellium.models.agent_file_attributes_body import AgentFileAttributesBody +from corellium.models.agent_file_download_token import AgentFileDownloadToken +from corellium.models.agent_frida_process_list import AgentFridaProcessList +from corellium.models.agent_frida_process_list_attached import AgentFridaProcessListAttached +from corellium.models.agent_frida_response import AgentFridaResponse +from corellium.models.agent_frida_run_body import AgentFridaRunBody +from corellium.models.agent_icons import AgentIcons +from corellium.models.agent_icons_response import AgentIconsResponse +from corellium.models.agent_install_body import AgentInstallBody +from corellium.models.agent_install_body_v1 import AgentInstallBodyV1 +from corellium.models.agent_profile_list_response import AgentProfileListResponse +from corellium.models.agent_profiles_return import AgentProfilesReturn +from corellium.models.agent_remote_it_status import AgentRemoteItStatus +from corellium.models.agent_system_adb_auth import AgentSystemAdbAuth +from corellium.models.agent_system_adb_auth_v1 import AgentSystemAdbAuthV1 +from corellium.models.agent_system_get_prop_body import AgentSystemGetPropBody +from corellium.models.agent_system_get_prop_body_v1 import AgentSystemGetPropBodyV1 +from corellium.models.agent_system_get_prop_response import AgentSystemGetPropResponse +from corellium.models.agent_system_install_open_gapps_body import AgentSystemInstallOpenGappsBody +from corellium.models.agent_system_network_response import AgentSystemNetworkResponse +from corellium.models.agent_system_result import AgentSystemResult +from corellium.models.agent_system_set_device_properties_body import AgentSystemSetDevicePropertiesBody +from corellium.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody +from corellium.models.agent_system_set_hostname_body_v1 import AgentSystemSetHostnameBodyV1 +from corellium.models.agent_temp_file_response import AgentTempFileResponse +from corellium.models.agent_value_return import AgentValueReturn +from corellium.models.agreed_ack import AgreedAck +from corellium.models.agreed_ack_v1 import AgreedAckV1 +from corellium.models.ai_tools_config import AiToolsConfig +from corellium.models.ai_tools_config_v1 import AiToolsConfigV1 +from corellium.models.allowed_devices_filter_schema import AllowedDevicesFilterSchema +from corellium.models.allowed_domains_response import AllowedDomainsResponse +from corellium.models.allowed_firmware_schema import AllowedFirmwareSchema +from corellium.models.api_conflict_error import ApiConflictError +from corellium.models.api_conflict_error_v1 import ApiConflictErrorV1 +from corellium.models.api_error import ApiError +from corellium.models.api_error_v1 import ApiErrorV1 +from corellium.models.api_internal_consistency_error import ApiInternalConsistencyError +from corellium.models.api_not_found_error import ApiNotFoundError +from corellium.models.api_not_found_error_v1 import ApiNotFoundErrorV1 +from corellium.models.api_token import ApiToken +from corellium.models.api_token_result import ApiTokenResult +from corellium.models.artifacts_path import ArtifactsPath +from corellium.models.assessment import Assessment +from corellium.models.assessment_bundle import AssessmentBundle +from corellium.models.assessment_format import AssessmentFormat +from corellium.models.assessment_frida_script import AssessmentFridaScript +from corellium.models.assessment_history import AssessmentHistory +from corellium.models.assessment_history_line_item import AssessmentHistoryLineItem +from corellium.models.assessment_history_results_inner import AssessmentHistoryResultsInner +from corellium.models.assessment_history_v1 import AssessmentHistoryV1 +from corellium.models.assessment_id_status import AssessmentIdStatus +from corellium.models.assessment_metadata import AssessmentMetadata +from corellium.models.assessment_results import AssessmentResults +from corellium.models.assessment_severity_counts import AssessmentSeverityCounts +from corellium.models.assessment_status import AssessmentStatus +from corellium.models.assessment_wordlist import AssessmentWordlist +from corellium.models.attach_interface_body import AttachInterfaceBody +from corellium.models.attach_interface_request import AttachInterfaceRequest +from corellium.models.auth_provider import AuthProvider +from corellium.models.auth_provider_type import AuthProviderType +from corellium.models.auth_provider_types_list_response import AuthProviderTypesListResponse +from corellium.models.auth_provider_v1 import AuthProviderV1 +from corellium.models.auth_providers_list_response import AuthProvidersListResponse +from corellium.models.available_plans_list_response import AvailablePlansListResponse +from corellium.models.available_trial_plan import AvailableTrialPlan +from corellium.models.available_trial_plan_list import AvailableTrialPlanList +from corellium.models.aws_create_response import AwsCreateResponse +from corellium.models.billing_line_item import BillingLineItem +from corellium.models.billing_summary import BillingSummary +from corellium.models.billing_summary_pending_usage_based import BillingSummaryPendingUsageBased +from corellium.models.bit import Bit +from corellium.models.btrace_enable_options import BtraceEnableOptions +from corellium.models.button import Button +from corellium.models.cancel_subscription_body import CancelSubscriptionBody +from corellium.models.change_password_body import ChangePasswordBody +from corellium.models.charm_tag import CharmTag +from corellium.models.check_subdomain_response import CheckSubdomainResponse +from corellium.models.check_subdomain_response_v1 import CheckSubdomainResponseV1 +from corellium.models.cloud_notification_item import CloudNotificationItem +from corellium.models.cloud_notification_list import CloudNotificationList +from corellium.models.cluster_config import ClusterConfig +from corellium.models.cluster_config_coordinator_config import ClusterConfigCoordinatorConfig +from corellium.models.cluster_config_coordinator_config_auth_providers_inner import ClusterConfigCoordinatorConfigAuthProvidersInner +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of1 import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 +from corellium.models.cluster_config_coordinator_config_aws_marketplace import ClusterConfigCoordinatorConfigAwsMarketplace +from corellium.models.cluster_config_coordinator_config_ensure_domain import ClusterConfigCoordinatorConfigEnsureDomain +from corellium.models.cluster_config_coordinator_config_ensure_domain_properties import ClusterConfigCoordinatorConfigEnsureDomainProperties +from corellium.models.cluster_config_coordinator_config_ensure_domain_quotas import ClusterConfigCoordinatorConfigEnsureDomainQuotas +from corellium.models.cluster_config_coordinator_config_hubspot import ClusterConfigCoordinatorConfigHubspot +from corellium.models.cluster_config_coordinator_config_hypertune import ClusterConfigCoordinatorConfigHypertune +from corellium.models.cluster_config_coordinator_config_pipedrive import ClusterConfigCoordinatorConfigPipedrive +from corellium.models.cluster_config_coordinator_config_trial import ClusterConfigCoordinatorConfigTrial +from corellium.models.cluster_config_coordinator_config_webplayer import ClusterConfigCoordinatorConfigWebplayer +from corellium.models.cluster_config_firmware_service_config import ClusterConfigFirmwareServiceConfig +from corellium.models.cluster_config_ipsw_filters_inner import ClusterConfigIpswFiltersInner +from corellium.models.cluster_config_ipsw_filters_inner_device import ClusterConfigIpswFiltersInnerDevice +from corellium.models.cluster_config_ipsw_filters_inner_version import ClusterConfigIpswFiltersInnerVersion +from corellium.models.cluster_config_maintenance import ClusterConfigMaintenance +from corellium.models.cluster_config_net_mon_ca import ClusterConfigNetMonCA +from corellium.models.cluster_config_node_specific_config import ClusterConfigNodeSpecificConfig +from corellium.models.cluster_config_package_config import ClusterConfigPackageConfig +from corellium.models.cluster_config_package_config_components import ClusterConfigPackageConfigComponents +from corellium.models.cluster_config_package_config_features import ClusterConfigPackageConfigFeatures +from corellium.models.cluster_config_package_config_flavor_filters_inner import ClusterConfigPackageConfigFlavorFiltersInner +from corellium.models.cluster_config_package_config_flavor_filters_inner_apply import ClusterConfigPackageConfigFlavorFiltersInnerApply +from corellium.models.cluster_config_package_config_flavor_filters_inner_filter import ClusterConfigPackageConfigFlavorFiltersInnerFilter +from corellium.models.cluster_config_setup_config import ClusterConfigSetupConfig +from corellium.models.cluster_config_stripe import ClusterConfigStripe +from corellium.models.cluster_config_update_error import ClusterConfigUpdateError +from corellium.models.cluster_configuration_payload import ClusterConfigurationPayload +from corellium.models.cluster_node import ClusterNode +from corellium.models.cluster_node_available import ClusterNodeAvailable +from corellium.models.cluster_node_reserved import ClusterNodeReserved +from corellium.models.cluster_node_status import ClusterNodeStatus +from corellium.models.cluster_node_status_cluster_totals import ClusterNodeStatusClusterTotals +from corellium.models.cluster_node_status_cluster_totals_available import ClusterNodeStatusClusterTotalsAvailable +from corellium.models.cluster_node_status_cluster_totals_reserved import ClusterNodeStatusClusterTotalsReserved +from corellium.models.cluster_node_status_cluster_totals_total import ClusterNodeStatusClusterTotalsTotal +from corellium.models.cluster_node_total import ClusterNodeTotal +from corellium.models.cluster_snapshot import ClusterSnapshot +from corellium.models.cluster_snapshot_list import ClusterSnapshotList +from corellium.models.cluster_snapshot_metadata import ClusterSnapshotMetadata +from corellium.models.cluster_snapshot_status import ClusterSnapshotStatus +from corellium.models.cluster_snapshot_v1 import ClusterSnapshotV1 +from corellium.models.compute_node_file import ComputeNodeFile +from corellium.models.compute_node_file_list import ComputeNodeFileList +from corellium.models.config_auth_provider import ConfigAuthProvider +from corellium.models.config_response import ConfigResponse +from corellium.models.config_response_ai_tools_config import ConfigResponseAiToolsConfig +from corellium.models.config_response_maintenance import ConfigResponseMaintenance +from corellium.models.config_response_v1 import ConfigResponseV1 +from corellium.models.coordinator_config import CoordinatorConfig +from corellium.models.coordinator_config_v1 import CoordinatorConfigV1 +from corellium.models.coupon_options import CouponOptions +from corellium.models.create_activity_export_body import CreateActivityExportBody +from corellium.models.create_activity_export_response import CreateActivityExportResponse +from corellium.models.create_assessment_input import CreateAssessmentInput +from corellium.models.create_cloud_admin_trial_request_body import CreateCloudAdminTrialRequestBody +from corellium.models.create_domain_auth_provider_body import CreateDomainAuthProviderBody +from corellium.models.create_domain_auth_provider_response import CreateDomainAuthProviderResponse +from corellium.models.create_domain_auth_provider_response_config import CreateDomainAuthProviderResponseConfig +from corellium.models.create_domain_welcome_message_body import CreateDomainWelcomeMessageBody +from corellium.models.create_hook_body import CreateHookBody +from corellium.models.create_image_body import CreateImageBody +from corellium.models.create_instance_body import CreateInstanceBody +from corellium.models.create_instance_response import CreateInstanceResponse +from corellium.models.create_interconnect_body import CreateInterconnectBody +from corellium.models.create_interconnect_v3_body import CreateInterconnectV3Body +from corellium.models.create_invites_body import CreateInvitesBody +from corellium.models.create_network_connection_body import CreateNetworkConnectionBody +from corellium.models.create_network_connection_options import CreateNetworkConnectionOptions +from corellium.models.create_open_vpn_network_connection_body import CreateOpenVPNNetworkConnectionBody +from corellium.models.create_open_vpn_network_connection_body_v1 import CreateOpenVPNNetworkConnectionBodyV1 +from corellium.models.create_project_body import CreateProjectBody +from corellium.models.create_project_key_body import CreateProjectKeyBody +from corellium.models.create_snapshot_body import CreateSnapshotBody +from corellium.models.create_team import CreateTeam +from corellium.models.create_team_body import CreateTeamBody +from corellium.models.create_trial_request_body import CreateTrialRequestBody +from corellium.models.create_trial_request_response import CreateTrialRequestResponse +from corellium.models.create_trial_request_response_trial_request import CreateTrialRequestResponseTrialRequest +from corellium.models.create_user_body import CreateUserBody +from corellium.models.create_vlan_network_connection_body import CreateVLANNetworkConnectionBody +from corellium.models.create_vlan_network_connection_body_v1 import CreateVLANNetworkConnectionBodyV1 +from corellium.models.create_web_player_session_body import CreateWebPlayerSessionBody +from corellium.models.created_by import CreatedBy +from corellium.models.credentials import Credentials +from corellium.models.delete_modification_input import DeleteModificationInput +from corellium.models.delete_network_connection_options import DeleteNetworkConnectionOptions +from corellium.models.deployment_version import DeploymentVersion +from corellium.models.detach_interface_body import DetachInterfaceBody +from corellium.models.detach_interface_request import DetachInterfaceRequest +from corellium.models.device import Device +from corellium.models.device_auto_shutdown_schema import DeviceAutoShutdownSchema +from corellium.models.device_usage import DeviceUsage +from corellium.models.domain_auth_provider_config import DomainAuthProviderConfig +from corellium.models.domain_auth_provider_request import DomainAuthProviderRequest +from corellium.models.domain_auth_provider_response import DomainAuthProviderResponse +from corellium.models.domain_auth_provider_response_v1 import DomainAuthProviderResponseV1 +from corellium.models.domain_auth_providers_list import DomainAuthProvidersList +from corellium.models.domain_config import DomainConfig +from corellium.models.domain_config_input import DomainConfigInput +from corellium.models.domain_config_input_snapshot_sharing_permissions import DomainConfigInputSnapshotSharingPermissions +from corellium.models.domain_config_input_trial import DomainConfigInputTrial +from corellium.models.domain_config_input_webplayer import DomainConfigInputWebplayer +from corellium.models.domain_config_snapshot_sharing_permissions import DomainConfigSnapshotSharingPermissions +from corellium.models.domain_config_trial import DomainConfigTrial +from corellium.models.domain_config_trial_end_action import DomainConfigTrialEndAction +from corellium.models.domain_config_trial_subscribe_action import DomainConfigTrialSubscribeAction +from corellium.models.domain_config_webplayer import DomainConfigWebplayer +from corellium.models.domain_info import DomainInfo +from corellium.models.domain_list import DomainList +from corellium.models.domain_list_item import DomainListItem +from corellium.models.domain_list_item_disabled import DomainListItemDisabled +from corellium.models.domain_list_item_domain_usage_inner import DomainListItemDomainUsageInner +from corellium.models.domain_list_item_projects_inner import DomainListItemProjectsInner +from corellium.models.domain_list_item_projects_inner_instances_inner import DomainListItemProjectsInnerInstancesInner +from corellium.models.domain_list_item_projects_inner_instances_inner_images_inner import DomainListItemProjectsInnerInstancesInnerImagesInner +from corellium.models.domain_list_item_projects_inner_instances_inner_usage import DomainListItemProjectsInnerInstancesInnerUsage +from corellium.models.domain_list_item_projects_inner_quotas import DomainListItemProjectsInnerQuotas +from corellium.models.domain_list_item_projects_inner_usage import DomainListItemProjectsInnerUsage +from corellium.models.domain_list_item_quotas import DomainListItemQuotas +from corellium.models.domain_list_item_subscription import DomainListItemSubscription +from corellium.models.domain_list_item_subscription_history_inner import DomainListItemSubscriptionHistoryInner +from corellium.models.domain_list_item_subscription_history_inner_administrator import DomainListItemSubscriptionHistoryInnerAdministrator +from corellium.models.domain_list_item_usage import DomainListItemUsage +from corellium.models.domain_list_item_users_info_inner import DomainListItemUsersInfoInner +from corellium.models.domain_list_usage import DomainListUsage +from corellium.models.domain_options import DomainOptions +from corellium.models.domain_software import DomainSoftware +from corellium.models.domain_software_list import DomainSoftwareList +from corellium.models.domain_welcome_message_response import DomainWelcomeMessageResponse +from corellium.models.domain_welcome_message_response_v1 import DomainWelcomeMessageResponseV1 +from corellium.models.edit_invites_body import EditInvitesBody +from corellium.models.edit_invites_body_changes import EditInvitesBodyChanges +from corellium.models.enable_btrace_body import EnableBtraceBody +from corellium.models.enable_netdump_body import EnableNetdumpBody +from corellium.models.enable_sslsplit_body import EnableSslsplitBody +from corellium.models.ensure_domain_settings_body import EnsureDomainSettingsBody +from corellium.models.ensure_domain_settings_body_admin_user import EnsureDomainSettingsBodyAdminUser +from corellium.models.ensure_domain_settings_response import EnsureDomainSettingsResponse +from corellium.models.ensure_domain_settings_response_user import EnsureDomainSettingsResponseUser +from corellium.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo +from corellium.models.extended_firmware_asset_info_v1 import ExtendedFirmwareAssetInfoV1 +from corellium.models.extension import Extension +from corellium.models.extension_flavor import ExtensionFlavor +from corellium.models.extension_list import ExtensionList +from corellium.models.extension_v1 import ExtensionV1 +from corellium.models.features import Features +from corellium.models.fetch_firmware_assets_body import FetchFirmwareAssetsBody +from corellium.models.fetch_firmware_assets_response import FetchFirmwareAssetsResponse +from corellium.models.fetch_firmware_assets_response_failed_inner import FetchFirmwareAssetsResponseFailedInner +from corellium.models.file_changes import FileChanges +from corellium.models.firmware import Firmware +from corellium.models.firmware_asset import FirmwareAsset +from corellium.models.firmware_asset_filter import FirmwareAssetFilter +from corellium.models.firmware_asset_list import FirmwareAssetList +from corellium.models.firmware_asset_v1 import FirmwareAssetV1 +from corellium.models.firmware_device import FirmwareDevice +from corellium.models.firmware_device_list import FirmwareDeviceList +from corellium.models.firmware_info_device import FirmwareInfoDevice +from corellium.models.firmware_info_device_firmwares_inner import FirmwareInfoDeviceFirmwaresInner +from corellium.models.firmware_list import FirmwareList +from corellium.models.firmware_service_config import FirmwareServiceConfig +from corellium.models.firmware_service_config_cache_firmware import FirmwareServiceConfigCacheFirmware +from corellium.models.firmware_service_config_download_ipsw_filters import FirmwareServiceConfigDownloadIpswFilters +from corellium.models.firmware_service_config_value import FirmwareServiceConfigValue +from corellium.models.firmware_service_configuration import FirmwareServiceConfiguration +from corellium.models.firmware_service_settings import FirmwareServiceSettings +from corellium.models.firmware_v1 import FirmwareV1 +from corellium.models.flavor_frame import FlavorFrame +from corellium.models.flavor_frame_dimensions import FlavorFrameDimensions +from corellium.models.flavor_frame_home import FlavorFrameHome +from corellium.models.flavor_frame_inner import FlavorFrameInner +from corellium.models.get_firmware_info_body import GetFirmwareInfoBody +from corellium.models.get_interconnects_response import GetInterconnectsResponse +from corellium.models.get_invite_by_token_body import GetInviteByTokenBody +from corellium.models.get_reset_link_info_body import GetResetLinkInfoBody +from corellium.models.get_storage_response import GetStorageResponse +from corellium.models.gpio_state_definition import GpioStateDefinition +from corellium.models.gpio_state_definition_banks_inner_inner import GpioStateDefinitionBanksInnerInner +from corellium.models.gpio_state_definition_v1 import GpioStateDefinitionV1 +from corellium.models.gpios_state import GpiosState +from corellium.models.gpios_state_v1 import GpiosStateV1 +from corellium.models.hook import Hook +from corellium.models.hook_list import HookList +from corellium.models.hook_patch_type import HookPatchType +from corellium.models.hook_v1 import HookV1 +from corellium.models.hypertune_hash_response import HypertuneHashResponse +from corellium.models.hypertune_init_response import HypertuneInitResponse +from corellium.models.image import Image +from corellium.models.image_creation_options import ImageCreationOptions +from corellium.models.image_encoding import ImageEncoding +from corellium.models.image_extended import ImageExtended +from corellium.models.image_extended_device import ImageExtendedDevice +from corellium.models.image_firmware import ImageFirmware +from corellium.models.image_firmware_info import ImageFirmwareInfo +from corellium.models.image_firmware_info_boot_args import ImageFirmwareInfoBootArgs +from corellium.models.image_list import ImageList +from corellium.models.image_type import ImageType +from corellium.models.image_v1 import ImageV1 +from corellium.models.input_response import InputResponse +from corellium.models.input_response_v1 import InputResponseV1 +from corellium.models.install_firmware_assets_body import InstallFirmwareAssetsBody +from corellium.models.install_firmware_assets_body_v1 import InstallFirmwareAssetsBodyV1 +from corellium.models.install_firmware_assets_response import InstallFirmwareAssetsResponse +from corellium.models.install_firmware_assets_response_v1 import InstallFirmwareAssetsResponseV1 +from corellium.models.install_firmware_body import InstallFirmwareBody +from corellium.models.install_firmware_body_v1 import InstallFirmwareBodyV1 +from corellium.models.install_firmware_response import InstallFirmwareResponse +from corellium.models.install_firmware_response_v1 import InstallFirmwareResponseV1 +from corellium.models.install_firmware_status_response import InstallFirmwareStatusResponse +from corellium.models.instance import Instance +from corellium.models.instance_agent_state import InstanceAgentState +from corellium.models.instance_agent_state_v1 import InstanceAgentStateV1 +from corellium.models.instance_boot_options import InstanceBootOptions +from corellium.models.instance_boot_options_additional_tag import InstanceBootOptionsAdditionalTag +from corellium.models.instance_boot_options_fvp import InstanceBootOptionsFvp +from corellium.models.instance_boot_options_kernel import InstanceBootOptionsKernel +from corellium.models.instance_boot_options_kernel_v1 import InstanceBootOptionsKernelV1 +from corellium.models.instance_boot_options_pongo import InstanceBootOptionsPongo +from corellium.models.instance_boot_options_pongo_v1 import InstanceBootOptionsPongoV1 +from corellium.models.instance_boot_options_v1 import InstanceBootOptionsV1 +from corellium.models.instance_boot_options_vmmio_inner import InstanceBootOptionsVMMIOInner +from corellium.models.instance_console import InstanceConsole +from corellium.models.instance_console_endpoint import InstanceConsoleEndpoint +from corellium.models.instance_console_endpoint_v1 import InstanceConsoleEndpointV1 +from corellium.models.instance_console_v1 import InstanceConsoleV1 +from corellium.models.instance_create_options import InstanceCreateOptions +from corellium.models.instance_hyper_trace_state import InstanceHyperTraceState +from corellium.models.instance_hyper_trace_state_v1 import InstanceHyperTraceStateV1 +from corellium.models.instance_input_body import InstanceInputBody +from corellium.models.instance_input_request import InstanceInputRequest +from corellium.models.instance_interface import InstanceInterface +from corellium.models.instance_interface_status import InstanceInterfaceStatus +from corellium.models.instance_list import InstanceList +from corellium.models.instance_netdump_state import InstanceNetdumpState +from corellium.models.instance_netdump_state_v1 import InstanceNetdumpStateV1 +from corellium.models.instance_netmon_state import InstanceNetmonState +from corellium.models.instance_netmon_state_v1 import InstanceNetmonStateV1 +from corellium.models.instance_read_only_status import InstanceReadOnlyStatus +from corellium.models.instance_read_only_status_v1 import InstanceReadOnlyStatusV1 +from corellium.models.instance_restore_status import InstanceRestoreStatus +from corellium.models.instance_restore_status_v1 import InstanceRestoreStatusV1 +from corellium.models.instance_return import InstanceReturn +from corellium.models.instance_services import InstanceServices +from corellium.models.instance_services_v1 import InstanceServicesV1 +from corellium.models.instance_snapshots_list import InstanceSnapshotsList +from corellium.models.instance_start_options import InstanceStartOptions +from corellium.models.instance_state import InstanceState +from corellium.models.instance_state_v1 import InstanceStateV1 +from corellium.models.instance_stop_options import InstanceStopOptions +from corellium.models.instance_trace_filter import InstanceTraceFilter +from corellium.models.instance_trace_state import InstanceTraceState +from corellium.models.instance_trace_state_v1 import InstanceTraceStateV1 +from corellium.models.instance_uefi_bootloader import InstanceUefiBootloader +from corellium.models.instance_upgrade_body import InstanceUpgradeBody +from corellium.models.instance_upgrade_body_v1 import InstanceUpgradeBodyV1 +from corellium.models.instance_upgrade_response import InstanceUpgradeResponse +from corellium.models.instance_v1 import InstanceV1 +from corellium.models.insufficient_storage_error import InsufficientStorageError +from corellium.models.insufficient_storage_error_v1 import InsufficientStorageErrorV1 +from corellium.models.interconnect import Interconnect +from corellium.models.interconnect_list import InterconnectList +from corellium.models.interconnect_protocol import InterconnectProtocol +from corellium.models.interconnect_response import InterconnectResponse +from corellium.models.interfaces_schema_inner import InterfacesSchemaInner +from corellium.models.invalid_credentials_error import InvalidCredentialsError +from corellium.models.invalid_totp_error import InvalidTOTPError +from corellium.models.invitation import Invitation +from corellium.models.invitation_by_token import InvitationByToken +from corellium.models.invitation_v1 import InvitationV1 +from corellium.models.invite_created import InviteCreated +from corellium.models.invite_created_entry import InviteCreatedEntry +from corellium.models.invite_result import InviteResult +from corellium.models.invite_result_error import InviteResultError +from corellium.models.invite_revoke_params import InviteRevokeParams +from corellium.models.invite_settings import InviteSettings +from corellium.models.invite_signup_body import InviteSignupBody +from corellium.models.invite_signup_body_params import InviteSignupBodyParams +from corellium.models.invite_signup_response import InviteSignupResponse +from corellium.models.invites_list_response import InvitesListResponse +from corellium.models.ipsw_device_constraint import IpswDeviceConstraint +from corellium.models.ipsw_filter import IpswFilter +from corellium.models.ipsw_filter_v3 import IpswFilterV3 +from corellium.models.ipsw_filter_v3_device import IpswFilterV3Device +from corellium.models.ipsw_filter_v3_version import IpswFilterV3Version +from corellium.models.ipsw_version_constraint import IpswVersionConstraint +from corellium.models.kcrange import Kcrange +from corellium.models.kcrange_v1 import KcrangeV1 +from corellium.models.kernel_task import KernelTask +from corellium.models.kernel_task_v1 import KernelTaskV1 +from corellium.models.kernel_thread import KernelThread +from corellium.models.kernel_thread_v1 import KernelThreadV1 +from corellium.models.ldap_config import LDAPConfig +from corellium.models.layout_schema import LayoutSchema +from corellium.models.ldap_authentication_credentials import LdapAuthenticationCredentials +from corellium.models.ldap_group_search_configuration import LdapGroupSearchConfiguration +from corellium.models.ldap_server_connection_details import LdapServerConnectionDetails +from corellium.models.ldap_user_attribute_mapping import LdapUserAttributeMapping +from corellium.models.ldap_user_search_configuration import LdapUserSearchConfiguration +from corellium.models.load_extension_body import LoadExtensionBody +from corellium.models.logging import Logging +from corellium.models.logging_v1 import LoggingV1 +from corellium.models.login_body import LoginBody +from corellium.models.login_result import LoginResult +from corellium.models.login_result_disabled import LoginResultDisabled +from corellium.models.login_result_domain import LoginResultDomain +from corellium.models.login_result_domain_device_auto_shutdown import LoginResultDomainDeviceAutoShutdown +from corellium.models.login_result_domain_disabled import LoginResultDomainDisabled +from corellium.models.login_result_domain_snapshot_sharing_permissions import LoginResultDomainSnapshotSharingPermissions +from corellium.models.login_result_domain_trial import LoginResultDomainTrial +from corellium.models.login_result_domain_webplayer import LoginResultDomainWebplayer +from corellium.models.login_result_user import LoginResultUser +from corellium.models.maintenance import Maintenance +from corellium.models.matrix_error import MatrixError +from corellium.models.media_play_body import MediaPlayBody +from corellium.models.media_play_body_v1 import MediaPlayBodyV1 +from corellium.models.media_play_by_image import MediaPlayByImage +from corellium.models.media_play_by_url import MediaPlayByUrl +from corellium.models.media_store import MediaStore +from corellium.models.media_store_v1 import MediaStoreV1 +from corellium.models.message_body import MessageBody +from corellium.models.message_body_any_of import MessageBodyAnyOf +from corellium.models.message_body_any_of1 import MessageBodyAnyOf1 +from corellium.models.metered_subscription_usage import MeteredSubscriptionUsage +from corellium.models.metered_subscription_usage_v1 import MeteredSubscriptionUsageV1 +from corellium.models.model import Model +from corellium.models.model_firmware import ModelFirmware +from corellium.models.model_firmware_springboard_snapshot import ModelFirmwareSpringboardSnapshot +from corellium.models.model_firmware_springboard_snapshot_volumes_inner import ModelFirmwareSpringboardSnapshotVolumesInner +from corellium.models.model_frame import ModelFrame +from corellium.models.model_frame_dimensions import ModelFrameDimensions +from corellium.models.model_partition import ModelPartition +from corellium.models.model_product_image import ModelProductImage +from corellium.models.model_rect import ModelRect +from corellium.models.model_software_v1 import ModelSoftwareV1 +from corellium.models.model_v1 import ModelV1 +from corellium.models.netdump_filter import NetdumpFilter +from corellium.models.network_connection import NetworkConnection +from corellium.models.network_connection_config import NetworkConnectionConfig +from corellium.models.network_connection_pagination_result import NetworkConnectionPaginationResult +from corellium.models.network_connection_provider import NetworkConnectionProvider +from corellium.models.network_connection_provider_pagination_result import NetworkConnectionProviderPaginationResult +from corellium.models.network_connection_providers import NetworkConnectionProviders +from corellium.models.network_connection_providers_results_inner import NetworkConnectionProvidersResultsInner +from corellium.models.network_connections import NetworkConnections +from corellium.models.network_interfaces import NetworkInterfaces +from corellium.models.network_schema import NetworkSchema +from corellium.models.network_status import NetworkStatus +from corellium.models.network_status_response import NetworkStatusResponse +from corellium.models.network_status_v1 import NetworkStatusV1 +from corellium.models.node_console_endpoint import NodeConsoleEndpoint +from corellium.models.node_information import NodeInformation +from corellium.models.node_information_v1 import NodeInformationV1 +from corellium.models.node_list import NodeList +from corellium.models.node_updates_failed import NodeUpdatesFailed +from corellium.models.open_id_config import OpenIDConfig +from corellium.models.open_id_config_v1 import OpenIDConfigV1 +from corellium.models.open_vpn_config import OpenVPNConfig +from corellium.models.open_vpn_config_v1 import OpenVPNConfigV1 +from corellium.models.open_vpn_network_connection import OpenVPNNetworkConnection +from corellium.models.open_vpn_network_connection_projects_value import OpenVPNNetworkConnectionProjectsValue +from corellium.models.open_vpn_network_connection_v1 import OpenVPNNetworkConnectionV1 +from corellium.models.paginated_assessments import PaginatedAssessments +from corellium.models.pagination import Pagination +from corellium.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest +from corellium.models.partial_update_network_connection_body import PartialUpdateNetworkConnectionBody +from corellium.models.partial_update_network_connection_options import PartialUpdateNetworkConnectionOptions +from corellium.models.password_change_body import PasswordChangeBody +from corellium.models.password_reset_body import PasswordResetBody +from corellium.models.patch_cluster_config_body import PatchClusterConfigBody +from corellium.models.patch_domain_auth_provider_body import PatchDomainAuthProviderBody +from corellium.models.patch_domain_body import PatchDomainBody +from corellium.models.patch_domain_body_webplayer import PatchDomainBodyWebplayer +from corellium.models.patch_domain_welcome_message_body import PatchDomainWelcomeMessageBody +from corellium.models.patch_firmware_service_config_body import PatchFirmwareServiceConfigBody +from corellium.models.patch_instance_body import PatchInstanceBody +from corellium.models.patch_instance_body_proxy_inner import PatchInstanceBodyProxyInner +from corellium.models.patch_instance_body_strace_filter_inner import PatchInstanceBodyStraceFilterInner +from corellium.models.patch_instance_options import PatchInstanceOptions +from corellium.models.patch_instance_read_only import PatchInstanceReadOnly +from corellium.models.patch_instance_read_only_body import PatchInstanceReadOnlyBody +from corellium.models.patch_interconnect_body import PatchInterconnectBody +from corellium.models.patch_project_body import PatchProjectBody +from corellium.models.patch_user_body import PatchUserBody +from corellium.models.peripherals_data import PeripheralsData +from corellium.models.peripherals_data_v1 import PeripheralsDataV1 +from corellium.models.plan import Plan +from corellium.models.plan_v1 import PlanV1 +from corellium.models.pool_usage_schema import PoolUsageSchema +from corellium.models.portal_session import PortalSession +from corellium.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload +from corellium.models.project import Project +from corellium.models.project_config import ProjectConfig +from corellium.models.project_instance_list import ProjectInstanceList +from corellium.models.project_instance_summary import ProjectInstanceSummary +from corellium.models.project_key import ProjectKey +from corellium.models.project_key_list import ProjectKeyList +from corellium.models.project_key_v1 import ProjectKeyV1 +from corellium.models.project_list import ProjectList +from corellium.models.project_list_item import ProjectListItem +from corellium.models.project_network_state import ProjectNetworkState +from corellium.models.project_quota import ProjectQuota +from corellium.models.project_quota_input import ProjectQuotaInput +from corellium.models.project_quota_v1 import ProjectQuotaV1 +from corellium.models.project_settings import ProjectSettings +from corellium.models.project_settings_v1 import ProjectSettingsV1 +from corellium.models.project_usage import ProjectUsage +from corellium.models.project_usage_v1 import ProjectUsageV1 +from corellium.models.project_v1 import ProjectV1 +from corellium.models.project_with_keys_v1 import ProjectWithKeysV1 +from corellium.models.provider_network_connection import ProviderNetworkConnection +from corellium.models.proxy_config import ProxyConfig +from corellium.models.register_service_body import RegisterServiceBody +from corellium.models.report_modification_input import ReportModificationInput +from corellium.models.report_modification_result import ReportModificationResult +from corellium.models.reset_link_body import ResetLinkBody +from corellium.models.reset_link_info import ResetLinkInfo +from corellium.models.reset_link_info_return import ResetLinkInfoReturn +from corellium.models.reset_password_body import ResetPasswordBody +from corellium.models.reset_unauthorized_response import ResetUnauthorizedResponse +from corellium.models.restore_backup_body import RestoreBackupBody +from corellium.models.restore_backup_data import RestoreBackupData +from corellium.models.revoke_invites_body import RevokeInvitesBody +from corellium.models.revoke_invites_response import RevokeInvitesResponse +from corellium.models.role import Role +from corellium.models.role_name import RoleName +from corellium.models.role_v1 import RoleV1 +from corellium.models.roles_list_response import RolesListResponse +from corellium.models.rotate_body import RotateBody +from corellium.models.rotate_body_v1 import RotateBodyV1 +from corellium.models.saml_config import SAMLConfig +from corellium.models.saml_group_mapping import SamlGroupMapping +from corellium.models.saml_identity_provider_config import SamlIdentityProviderConfig +from corellium.models.saml_service_provider_config import SamlServiceProviderConfig +from corellium.models.saml_user_attribute_mapping import SamlUserAttributeMapping +from corellium.models.send_reset_link_body import SendResetLinkBody +from corellium.models.service_endpoint_schema import ServiceEndpointSchema +from corellium.models.service_status_request_body import ServiceStatusRequestBody +from corellium.models.service_status_request_body_vms_inner import ServiceStatusRequestBodyVmsInner +from corellium.models.set_domain_welcome_message_body import SetDomainWelcomeMessageBody +from corellium.models.set_snapshot_permissions_body import SetSnapshotPermissionsBody +from corellium.models.share_snapshot_body import ShareSnapshotBody +from corellium.models.shared_snapshot import SharedSnapshot +from corellium.models.shared_snapshots_info import SharedSnapshotsInfo +from corellium.models.shared_snapshots_response import SharedSnapshotsResponse +from corellium.models.snapshot import Snapshot +from corellium.models.snapshot_creation_options import SnapshotCreationOptions +from corellium.models.snapshot_list import SnapshotList +from corellium.models.snapshot_member import SnapshotMember +from corellium.models.snapshot_member_v1 import SnapshotMemberV1 +from corellium.models.snapshot_owner import SnapshotOwner +from corellium.models.snapshot_owner_v1 import SnapshotOwnerV1 +from corellium.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload +from corellium.models.snapshot_request import SnapshotRequest +from corellium.models.snapshot_sharing import SnapshotSharing +from corellium.models.snapshot_sharing_permissions import SnapshotSharingPermissions +from corellium.models.snapshot_sharing_permissions_request_schema import SnapshotSharingPermissionsRequestSchema +from corellium.models.snapshot_sharing_type import SnapshotSharingType +from corellium.models.snapshot_sharing_v1 import SnapshotSharingV1 +from corellium.models.snapshot_status import SnapshotStatus +from corellium.models.snapshot_status_v1 import SnapshotStatusV1 +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.models.sslsplit_filter import SslsplitFilter +from corellium.models.start_instance_body import StartInstanceBody +from corellium.models.stop_instance_body import StopInstanceBody +from corellium.models.storage_already_mounted_response import StorageAlreadyMountedResponse +from corellium.models.storage_attach_response import StorageAttachResponse +from corellium.models.storage_device import StorageDevice +from corellium.models.storage_device_list import StorageDeviceList +from corellium.models.storage_eject_already_unmounted_response import StorageEjectAlreadyUnmountedResponse +from corellium.models.storage_file import StorageFile +from corellium.models.storage_file_list import StorageFileList +from corellium.models.storage_list import StorageList +from corellium.models.storage_queue_error import StorageQueueError +from corellium.models.stripe_checkout_body import StripeCheckoutBody +from corellium.models.stripe_checkout_complete_body import StripeCheckoutCompleteBody +from corellium.models.stripe_webhook_ack import StripeWebhookAck +from corellium.models.subscribe_to_trial_body import SubscribeToTrialBody +from corellium.models.subscription import Subscription +from corellium.models.subscription_trial import SubscriptionTrial +from corellium.models.sys_info_schema import SysInfoSchema +from corellium.models.task_status import TaskStatus +from corellium.models.team import Team +from corellium.models.team_create import TeamCreate +from corellium.models.team_created import TeamCreated +from corellium.models.team_user import TeamUser +from corellium.models.team_v1 import TeamV1 +from corellium.models.teams_list_response import TeamsListResponse +from corellium.models.test_assessment_input import TestAssessmentInput +from corellium.models.text_input import TextInput +from corellium.models.text_input_request import TextInputRequest +from corellium.models.text_input_request_v1 import TextInputRequestV1 +from corellium.models.token import Token +from corellium.models.token_v1 import TokenV1 +from corellium.models.token_validate_body import TokenValidateBody +from corellium.models.totp_disable_body import TotpDisableBody +from corellium.models.totp_enable_body import TotpEnableBody +from corellium.models.totp_generate_response import TotpGenerateResponse +from corellium.models.touch_curve_input import TouchCurveInput +from corellium.models.touch_curve_input_request import TouchCurveInputRequest +from corellium.models.touch_curve_input_request_v1 import TouchCurveInputRequestV1 +from corellium.models.touch_input import TouchInput +from corellium.models.touch_input_request import TouchInputRequest +from corellium.models.touch_input_request_v1 import TouchInputRequestV1 +from corellium.models.trial import Trial +from corellium.models.trial_extension import TrialExtension +from corellium.models.trial_extension_v1 import TrialExtensionV1 +from corellium.models.trial_request import TrialRequest +from corellium.models.trial_request_detail import TrialRequestDetail +from corellium.models.trial_request_detail_organization import TrialRequestDetailOrganization +from corellium.models.trial_request_list_response import TrialRequestListResponse +from corellium.models.trial_request_metadata import TrialRequestMetadata +from corellium.models.trial_request_options import TrialRequestOptions +from corellium.models.trial_v1 import TrialV1 +from corellium.models.unauthorized_error import UnauthorizedError +from corellium.models.uncancel_subscription_body import UncancelSubscriptionBody +from corellium.models.update_assessment_input import UpdateAssessmentInput +from corellium.models.update_domain_settings_response import UpdateDomainSettingsResponse +from corellium.models.update_domain_settings_response_settings import UpdateDomainSettingsResponseSettings +from corellium.models.update_domain_settings_response_snapshot_sharing_permissions import UpdateDomainSettingsResponseSnapshotSharingPermissions +from corellium.models.update_domain_settings_response_webplayer import UpdateDomainSettingsResponseWebplayer +from corellium.models.update_domain_welcome_message_request import UpdateDomainWelcomeMessageRequest +from corellium.models.update_extension import UpdateExtension +from corellium.models.update_extension_body import UpdateExtensionBody +from corellium.models.update_hook_body import UpdateHookBody +from corellium.models.update_interconnect_body import UpdateInterconnectBody +from corellium.models.update_interconnect_v3_body import UpdateInterconnectV3Body +from corellium.models.update_network_connection_body import UpdateNetworkConnectionBody +from corellium.models.update_network_connection_options import UpdateNetworkConnectionOptions +from corellium.models.update_network_connection_options_config import UpdateNetworkConnectionOptionsConfig +from corellium.models.update_own_profile_body import UpdateOwnProfileBody +from corellium.models.update_team_body import UpdateTeamBody +from corellium.models.update_trial_request_body import UpdateTrialRequestBody +from corellium.models.update_trial_request_params import UpdateTrialRequestParams +from corellium.models.upload_size_error import UploadSizeError +from corellium.models.user import User +from corellium.models.user_create import UserCreate +from corellium.models.user_create_return import UserCreateReturn +from corellium.models.user_created import UserCreated +from corellium.models.user_error import UserError +from corellium.models.user_error_item import UserErrorItem +from corellium.models.user_error_response import UserErrorResponse +from corellium.models.user_error_v1 import UserErrorV1 +from corellium.models.user_errors import UserErrors +from corellium.models.user_errors_v1 import UserErrorsV1 +from corellium.models.user_snapshots import UserSnapshots +from corellium.models.user_update import UserUpdate +from corellium.models.v1_check_subdomain_existence_parameters import V1CheckSubdomainExistenceParameters +from corellium.models.v1_create_hook_parameters import V1CreateHookParameters +from corellium.models.v1_load_extension_parameters import V1LoadExtensionParameters +from corellium.models.v1_set_state_body import V1SetStateBody +from corellium.models.v1_update_hook_parameters import V1UpdateHookParameters +from corellium.models.v3_delete_network_connection_request import V3DeleteNetworkConnectionRequest +from corellium.models.v3_update_snapshot_request import V3UpdateSnapshotRequest +from corellium.models.vlan_config import VLANConfig +from corellium.models.vlan_config_v1 import VLANConfigV1 +from corellium.models.vlan_network_connection import VLANNetworkConnection +from corellium.models.vlan_network_connection_v1 import VLANNetworkConnectionV1 +from corellium.models.validation_error import ValidationError +from corellium.models.volume_options import VolumeOptions +from corellium.models.volume_options_v1 import VolumeOptionsV1 +from corellium.models.vpn_config_preauthorization import VpnConfigPreauthorization +from corellium.models.vpn_definition import VpnDefinition +from corellium.models.vpn_definition_v1 import VpnDefinitionV1 +from corellium.models.vpn_schema import VpnSchema +from corellium.models.web_player_allowed_domains import WebPlayerAllowedDomains +from corellium.models.web_player_create_session_request import WebPlayerCreateSessionRequest +from corellium.models.web_player_created_session import WebPlayerCreatedSession +from corellium.models.web_player_features import WebPlayerFeatures +from corellium.models.web_player_session import WebPlayerSession +from corellium.models.web_player_session_domain import WebPlayerSessionDomain +from corellium.models.web_player_session_list_response import WebPlayerSessionListResponse +from corellium.models.web_player_session_v1 import WebPlayerSessionV1 diff --git a/corellium/models/accept_snapshot_body.py b/corellium/models/accept_snapshot_body.py new file mode 100644 index 0000000..29bcfd2 --- /dev/null +++ b/corellium/models/accept_snapshot_body.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AcceptSnapshotBody(BaseModel): + """ + AcceptSnapshotBody + """ # noqa: E501 + access_code: StrictStr = Field(description="The access code the snapshot's owner gave you (shown in `sharing.accessCode` on their snapshot).", alias="accessCode") + password: Optional[StrictStr] = Field(default=None, description="Password of the shared snapshot, as set when it was shared. Required when the snapshot was shared with sharing type passwordPublicLink.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["accessCode", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AcceptSnapshotBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AcceptSnapshotBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accessCode": obj.get("accessCode"), + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/accept_snapshot_request_payload.py b/corellium/models/accept_snapshot_request_payload.py new file mode 100644 index 0000000..594ff48 --- /dev/null +++ b/corellium/models/accept_snapshot_request_payload.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AcceptSnapshotRequestPayload(BaseModel): + """ + + """ # noqa: E501 + access_code: StrictStr = Field(description="Access code of the shared snapshot.", alias="accessCode") + password: Optional[StrictStr] = Field(default=None, description="Password of the shared snapshot. Required when it was shared with sharing type passwordPublicLink.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["accessCode", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AcceptSnapshotRequestPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AcceptSnapshotRequestPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accessCode": obj.get("accessCode"), + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/account_setup_response.py b/corellium/models/account_setup_response.py new file mode 100644 index 0000000..7481f1f --- /dev/null +++ b/corellium/models/account_setup_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AccountSetupResponse(BaseModel): + """ + AccountSetupResponse + """ # noqa: E501 + success: StrictBool = Field(description="Whether account setup succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountSetupResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountSetupResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity.py b/corellium/models/activity.py new file mode 100644 index 0000000..5102217 --- /dev/null +++ b/corellium/models/activity.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Activity(BaseModel): + """ + Activity + """ # noqa: E501 + identifier: StrictStr = Field(description="Unique identifier for the activity entry.") + domain: StrictStr = Field(description="Unique identifier for the domain.") + actor: StrictStr = Field(description="Unique identifier for the user.") + event: StrictStr = Field(description="Resource associated with the activity.") + outcome: StrictStr = Field(description="The outcome of the activity.") + metadata: Optional[Dict[str, Any]] = Field(description="Related information that pertains to the activity.") + corellium_version: Optional[StrictStr] = Field(description="The Corellium version this activity occurred in.", alias="corelliumVersion") + project_id: Optional[StrictStr] = Field(description="Unique identifier for project if applicable.", alias="projectId") + instance_id: Optional[StrictStr] = Field(description="Unique identifier for instance if applicable.", alias="instanceId") + created_at: datetime = Field(description="Timestamp of when the activity was created.", alias="createdAt") + updated_at: datetime = Field(description="Timestamp of when the activity was last updated.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "domain", "actor", "event", "outcome", "metadata", "corelliumVersion", "projectId", "instanceId", "createdAt", "updatedAt"] + + @field_validator('event') + def event_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['domain.config.device_auto_shutdown', 'auth.provider.enabled', 'auth.provider.disabled', 'instance.status.shutoff', 'instance.status.active', 'user.logged_in', 'user.logged_out', 'user.password.updated', 'user.2fa.enabled', 'user.2fa.disabled', 'invite.created', 'invite.deleted', 'project.user.added', 'project.user.removed', 'project.team.added', 'team.user.added', 'project.team.removed', 'team.user.removed', 'user.updated', 'user.deleted', 'team.created', 'team.updated', 'team.deleted', 'instance.created', 'instance.cloned', 'instance.deleted', 'project.created', 'project.updated', 'project.deleted', 'network.created', 'network.updated', 'network.deleted', 'welcome.message.created', 'welcome.message.updated', 'mast_assessment.created', 'mast_assessment.deleted', 'mast_assessment.start_monitoring', 'mast_assessment.stop_monitoring', 'mast_assessment.run_checks', 'mast_assessment.report_generated', 'mast_assessment.check.severity', 'mast_assessment.check.outcome', 'mast_assessment.check.evidence']): + raise ValueError("must be one of enum values ('domain.config.device_auto_shutdown', 'auth.provider.enabled', 'auth.provider.disabled', 'instance.status.shutoff', 'instance.status.active', 'user.logged_in', 'user.logged_out', 'user.password.updated', 'user.2fa.enabled', 'user.2fa.disabled', 'invite.created', 'invite.deleted', 'project.user.added', 'project.user.removed', 'project.team.added', 'team.user.added', 'project.team.removed', 'team.user.removed', 'user.updated', 'user.deleted', 'team.created', 'team.updated', 'team.deleted', 'instance.created', 'instance.cloned', 'instance.deleted', 'project.created', 'project.updated', 'project.deleted', 'network.created', 'network.updated', 'network.deleted', 'welcome.message.created', 'welcome.message.updated', 'mast_assessment.created', 'mast_assessment.deleted', 'mast_assessment.start_monitoring', 'mast_assessment.stop_monitoring', 'mast_assessment.run_checks', 'mast_assessment.report_generated', 'mast_assessment.check.severity', 'mast_assessment.check.outcome', 'mast_assessment.check.evidence')") + return value + + @field_validator('outcome') + def outcome_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['success', 'fail']): + raise ValueError("must be one of enum values ('success', 'fail')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Activity from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if corellium_version (nullable) is None + # and model_fields_set contains the field + if self.corellium_version is None and "corellium_version" in self.model_fields_set: + _dict['corelliumVersion'] = None + + # set to None if project_id (nullable) is None + # and model_fields_set contains the field + if self.project_id is None and "project_id" in self.model_fields_set: + _dict['projectId'] = None + + # set to None if instance_id (nullable) is None + # and model_fields_set contains the field + if self.instance_id is None and "instance_id" in self.model_fields_set: + _dict['instanceId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Activity from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "domain": obj.get("domain"), + "actor": obj.get("actor"), + "event": obj.get("event"), + "outcome": obj.get("outcome"), + "metadata": obj.get("metadata"), + "corelliumVersion": obj.get("corelliumVersion"), + "projectId": obj.get("projectId"), + "instanceId": obj.get("instanceId"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_export_dto.py b/corellium/models/activity_export_dto.py new file mode 100644 index 0000000..697075e --- /dev/null +++ b/corellium/models/activity_export_dto.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActivityExportDto(BaseModel): + """ + + """ # noqa: E501 + resource: Optional[StrictStr] = Field(default=None, description="Event to filter on") + order_by: Optional[StrictStr] = Field(default=None, description="Column to order by", alias="orderBy") + instance: Optional[StrictStr] = Field(default=None, description="Instance ID") + project: Optional[StrictStr] = Field(default=None, description="Project ID") + actor: Optional[StrictStr] = Field(default=None, description="User ID") + search: Optional[StrictStr] = Field(default=None, description="Arbitrary search string against activity metadata") + to: Optional[StrictStr] = Field(default=None, description="Include activities up to given ISO 8601 Date") + var_from: Optional[StrictStr] = Field(default=None, description="Include activities from given ISO 8601 Date", alias="from") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource", "orderBy", "instance", "project", "actor", "search", "to", "from"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityExportDto from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if resource (nullable) is None + # and model_fields_set contains the field + if self.resource is None and "resource" in self.model_fields_set: + _dict['resource'] = None + + # set to None if order_by (nullable) is None + # and model_fields_set contains the field + if self.order_by is None and "order_by" in self.model_fields_set: + _dict['orderBy'] = None + + # set to None if instance (nullable) is None + # and model_fields_set contains the field + if self.instance is None and "instance" in self.model_fields_set: + _dict['instance'] = None + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if actor (nullable) is None + # and model_fields_set contains the field + if self.actor is None and "actor" in self.model_fields_set: + _dict['actor'] = None + + # set to None if search (nullable) is None + # and model_fields_set contains the field + if self.search is None and "search" in self.model_fields_set: + _dict['search'] = None + + # set to None if to (nullable) is None + # and model_fields_set contains the field + if self.to is None and "to" in self.model_fields_set: + _dict['to'] = None + + # set to None if var_from (nullable) is None + # and model_fields_set contains the field + if self.var_from is None and "var_from" in self.model_fields_set: + _dict['from'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityExportDto from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource": obj.get("resource"), + "orderBy": obj.get("orderBy"), + "instance": obj.get("instance"), + "project": obj.get("project"), + "actor": obj.get("actor"), + "search": obj.get("search"), + "to": obj.get("to"), + "from": obj.get("from") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_export_format.py b/corellium/models/activity_export_format.py new file mode 100644 index 0000000..24b06a5 --- /dev/null +++ b/corellium/models/activity_export_format.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ActivityExportFormat(str, Enum): + """ + Specifies the activity export file format. + """ + + """ + allowed enum values + """ + APPLICATION_SLASH_JSON = 'application/json' + TEXT_SLASH_CSV = 'text/csv' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ActivityExportFormat from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/activity_export_response.py b/corellium/models/activity_export_response.py new file mode 100644 index 0000000..cae0dce --- /dev/null +++ b/corellium/models/activity_export_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ActivityExportResponse(BaseModel): + """ + + """ # noqa: E501 + id: StrictStr = Field(description="Task identifier") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityExportResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityExportResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_export_status.py b/corellium/models/activity_export_status.py new file mode 100644 index 0000000..48c2f02 --- /dev/null +++ b/corellium/models/activity_export_status.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActivityExportStatus(BaseModel): + """ + ActivityExportStatus + """ # noqa: E501 + status: Optional[StrictStr] = Field(description="Where the export task is. Poll until it is `complete`, then download the file.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['in-progress', 'complete', 'error']): + raise ValueError("must be one of enum values ('in-progress', 'complete', 'error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityExportStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityExportStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_export_task.py b/corellium/models/activity_export_task.py new file mode 100644 index 0000000..9c88ba0 --- /dev/null +++ b/corellium/models/activity_export_task.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActivityExportTask(BaseModel): + """ + ActivityExportTask + """ # noqa: E501 + identifier: StrictStr = Field(description="Task identifier in the form `activity-export/`.") + scheduled_at: datetime = Field(description="Timestamp of when the task is scheduled to execute.", alias="scheduledAt") + status: Optional[StrictStr] = Field(description="Where the export task is. Poll until it is `complete`, then download the file.") + args: Dict[str, Any] = Field(description="Arguments passed to the task.") + created_at: datetime = Field(description="Timestamp of when the task was created.", alias="createdAt") + updated_at: datetime = Field(description="Timestamp of when the task was last updated.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "scheduledAt", "status", "args", "createdAt", "updatedAt"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['in-progress', 'complete', 'error']): + raise ValueError("must be one of enum values ('in-progress', 'complete', 'error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityExportTask from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityExportTask from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "scheduledAt": obj.get("scheduledAt"), + "status": obj.get("status"), + "args": obj.get("args"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_export_task_list.py b/corellium/models/activity_export_task_list.py new file mode 100644 index 0000000..d6a872c --- /dev/null +++ b/corellium/models/activity_export_task_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.activity_export_task import ActivityExportTask +from typing import Optional, Set +from typing_extensions import Self + +class ActivityExportTaskList(BaseModel): + """ + ActivityExportTaskList + """ # noqa: E501 + results: List[ActivityExportTask] = Field(description="List of export tasks.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityExportTaskList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityExportTaskList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ActivityExportTask.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_list.py b/corellium/models/activity_list.py new file mode 100644 index 0000000..0c4d085 --- /dev/null +++ b/corellium/models/activity_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.activity_v1 import ActivityV1 +from corellium.models.pagination import Pagination +from typing import Optional, Set +from typing_extensions import Self + +class ActivityList(BaseModel): + """ + + """ # noqa: E501 + data: Optional[List[ActivityV1]] = Field(default=None, description="List of activities") + pagination: Optional[Pagination] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["data", "pagination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ActivityV1.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_list_response.py b/corellium/models/activity_list_response.py new file mode 100644 index 0000000..414cc59 --- /dev/null +++ b/corellium/models/activity_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.activity import Activity +from typing import Optional, Set +from typing_extensions import Self + +class ActivityListResponse(BaseModel): + """ + ActivityListResponse + """ # noqa: E501 + results: List[Activity] = Field(description="Activity list.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Activity.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_request.py b/corellium/models/activity_request.py new file mode 100644 index 0000000..9c8c1b2 --- /dev/null +++ b/corellium/models/activity_request.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ActivityRequest(BaseModel): + """ + + """ # noqa: E501 + resource: Optional[StrictStr] = Field(default=None, description="Resource filter") + limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of entries to return, defaults to 10") + order_by: Optional[StrictStr] = Field(default=None, description="Sorting order ('-createdAt' or 'createdAt')", alias="orderBy") + page: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Paginated results. Must be a positive integer. If not provided, defaults to the first page.") + instance: Optional[StrictStr] = Field(default=None, description="Instance identifier used to filter instance resources") + project: Optional[StrictStr] = Field(default=None, description="Instance identifier used to filter instance resources") + actor: Optional[StrictStr] = Field(default=None, description="Actor identifier used to filter actor resources") + search: Optional[StrictStr] = Field(default=None, description="Last filter applied and is a fuzzy match on results") + to: Optional[StrictStr] = Field(default=None, description="Date to filter to, keyed off of createdAt") + var_from: Optional[StrictStr] = Field(default=None, description="Date to filter from, keyed off of createdAt", alias="from") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource", "limit", "orderBy", "page", "instance", "project", "actor", "search", "to", "from"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if resource (nullable) is None + # and model_fields_set contains the field + if self.resource is None and "resource" in self.model_fields_set: + _dict['resource'] = None + + # set to None if limit (nullable) is None + # and model_fields_set contains the field + if self.limit is None and "limit" in self.model_fields_set: + _dict['limit'] = None + + # set to None if order_by (nullable) is None + # and model_fields_set contains the field + if self.order_by is None and "order_by" in self.model_fields_set: + _dict['orderBy'] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict['page'] = None + + # set to None if instance (nullable) is None + # and model_fields_set contains the field + if self.instance is None and "instance" in self.model_fields_set: + _dict['instance'] = None + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if actor (nullable) is None + # and model_fields_set contains the field + if self.actor is None and "actor" in self.model_fields_set: + _dict['actor'] = None + + # set to None if search (nullable) is None + # and model_fields_set contains the field + if self.search is None and "search" in self.model_fields_set: + _dict['search'] = None + + # set to None if to (nullable) is None + # and model_fields_set contains the field + if self.to is None and "to" in self.model_fields_set: + _dict['to'] = None + + # set to None if var_from (nullable) is None + # and model_fields_set contains the field + if self.var_from is None and "var_from" in self.model_fields_set: + _dict['from'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource": obj.get("resource"), + "limit": obj.get("limit"), + "orderBy": obj.get("orderBy"), + "page": obj.get("page"), + "instance": obj.get("instance"), + "project": obj.get("project"), + "actor": obj.get("actor"), + "search": obj.get("search"), + "to": obj.get("to"), + "from": obj.get("from") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/activity_resource_not_starts_with_filter.py b/corellium/models/activity_resource_not_starts_with_filter.py new file mode 100644 index 0000000..d7f7b66 --- /dev/null +++ b/corellium/models/activity_resource_not_starts_with_filter.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActivityResourceNotStartsWithFilter(BaseModel): + """ + ActivityResourceNotStartsWithFilter + """ # noqa: E501 + starts_with: Optional[Any] = Field(description="Exclude resources beginning with one or more prefixes.", alias="!startsWith") + __properties: ClassVar[List[str]] = ["!startsWith"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityResourceNotStartsWithFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if starts_with (nullable) is None + # and model_fields_set contains the field + if self.starts_with is None and "starts_with" in self.model_fields_set: + _dict['!startsWith'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityResourceNotStartsWithFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "!startsWith": obj.get("!startsWith") + }) + return _obj + + diff --git a/corellium/models/activity_resource_starts_with_filter.py b/corellium/models/activity_resource_starts_with_filter.py new file mode 100644 index 0000000..955e8a1 --- /dev/null +++ b/corellium/models/activity_resource_starts_with_filter.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActivityResourceStartsWithFilter(BaseModel): + """ + ActivityResourceStartsWithFilter + """ # noqa: E501 + starts_with: Optional[Any] = Field(description="Match resources beginning with one or more prefixes.", alias="startsWith") + __properties: ClassVar[List[str]] = ["startsWith"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityResourceStartsWithFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if starts_with (nullable) is None + # and model_fields_set contains the field + if self.starts_with is None and "starts_with" in self.model_fields_set: + _dict['startsWith'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityResourceStartsWithFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startsWith": obj.get("startsWith") + }) + return _obj + + diff --git a/corellium/models/activity_v1.py b/corellium/models/activity_v1.py new file mode 100644 index 0000000..e9dbdba --- /dev/null +++ b/corellium/models/activity_v1.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActivityV1(BaseModel): + """ + + """ # noqa: E501 + identifier: Optional[StrictStr] = Field(default=None, description="Unique identifier for the activity entry") + domain: Optional[StrictStr] = Field(default=None, description="Unique identifier for the domain") + actor: Optional[StrictStr] = Field(default=None, description="Unique identifier for the user") + event: Optional[StrictStr] = Field(default=None, description="Resource associated with the activity") + outcome: Optional[StrictStr] = Field(default=None, description="The outcome of the activity") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Related information that pertains to the activity") + corellium_version: Optional[StrictStr] = Field(default=None, description="The Corellium version this activity occurred in", alias="corelliumVersion") + project_id: Optional[StrictStr] = Field(default=None, description="Unique identifier for project if applicable", alias="projectId") + instance_id: Optional[StrictStr] = Field(default=None, description="Unique identifier for instance if applicable", alias="instanceId") + created_at: Optional[StrictStr] = Field(default=None, description="Timestamp of when the activity was created", alias="createdAt") + updated_at: Optional[StrictStr] = Field(default=None, description="Timestamp of when the activity was last updated", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "domain", "actor", "event", "outcome", "metadata", "corelliumVersion", "projectId", "instanceId", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + # set to None if domain (nullable) is None + # and model_fields_set contains the field + if self.domain is None and "domain" in self.model_fields_set: + _dict['domain'] = None + + # set to None if actor (nullable) is None + # and model_fields_set contains the field + if self.actor is None and "actor" in self.model_fields_set: + _dict['actor'] = None + + # set to None if event (nullable) is None + # and model_fields_set contains the field + if self.event is None and "event" in self.model_fields_set: + _dict['event'] = None + + # set to None if outcome (nullable) is None + # and model_fields_set contains the field + if self.outcome is None and "outcome" in self.model_fields_set: + _dict['outcome'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if corellium_version (nullable) is None + # and model_fields_set contains the field + if self.corellium_version is None and "corellium_version" in self.model_fields_set: + _dict['corelliumVersion'] = None + + # set to None if project_id (nullable) is None + # and model_fields_set contains the field + if self.project_id is None and "project_id" in self.model_fields_set: + _dict['projectId'] = None + + # set to None if instance_id (nullable) is None + # and model_fields_set contains the field + if self.instance_id is None and "instance_id" in self.model_fields_set: + _dict['instanceId'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActivityV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "domain": obj.get("domain"), + "actor": obj.get("actor"), + "event": obj.get("event"), + "outcome": obj.get("outcome"), + "metadata": obj.get("metadata"), + "corelliumVersion": obj.get("corelliumVersion"), + "projectId": obj.get("projectId"), + "instanceId": obj.get("instanceId"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/address.py b/corellium/models/address.py new file mode 100644 index 0000000..4c9499c --- /dev/null +++ b/corellium/models/address.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Address(BaseModel): + """ + The user's address + """ # noqa: E501 + address1: Optional[StrictStr] = Field(default=None, description="Address line 1 (e.g., street, PO Box, or company name).") + address2: Optional[StrictStr] = Field(default=None, description="Address line 2 (e.g., apartment, suite, unit, or building).") + city: Optional[StrictStr] = Field(default=None, description="City, district, suburb, town, or village.") + country: Optional[StrictStr] = Field(default=None, description="Two-letter country code (ISO 3166-1 alpha-2).") + postal_code: Optional[StrictStr] = Field(default=None, description="ZIP or postal code.") + state: Optional[StrictStr] = Field(default=None, description="State, county, province, or region.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["address1", "address2", "city", "country", "postal_code", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Address from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if address1 (nullable) is None + # and model_fields_set contains the field + if self.address1 is None and "address1" in self.model_fields_set: + _dict['address1'] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict['address2'] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict['city'] = None + + # set to None if country (nullable) is None + # and model_fields_set contains the field + if self.country is None and "country" in self.model_fields_set: + _dict['country'] = None + + # set to None if postal_code (nullable) is None + # and model_fields_set contains the field + if self.postal_code is None and "postal_code" in self.model_fields_set: + _dict['postal_code'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Address from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address1": obj.get("address1"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "country": obj.get("country"), + "postal_code": obj.get("postal_code"), + "state": obj.get("state") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_app.py b/corellium/models/agent_app.py new file mode 100644 index 0000000..9a73016 --- /dev/null +++ b/corellium/models/agent_app.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AgentApp(BaseModel): + """ + AgentApp + """ # noqa: E501 + tags: Optional[List[StrictStr]] = Field(default=None, description="App tags (iOS only).") + running: Optional[StrictBool] = Field(default=None, description="Whether the app is currently running.") + disk_usage: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Disk usage in bytes.", alias="diskUsage") + var_date: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="Unix timestamp (seconds) of when the app was installed.", alias="date") + application_type: StrictStr = Field(description="Application type.", alias="applicationType") + name: Optional[StrictStr] = Field(default=None, description="App display name (not present for all Android apps).") + bundle_id: Annotated[str, Field(min_length=1, strict=True)] = Field(description="App bundle identifier.", alias="bundleId") + bundle_path: Optional[StrictStr] = Field(default=None, description="Path to the app bundle (iOS only).", alias="bundlePath") + bundle_data_path: Optional[StrictStr] = Field(default=None, description="Path to the app bundle data (iOS only).", alias="bundleDataPath") + is_launchable: Optional[StrictBool] = Field(default=None, description="Whether the app is launchable (Android only).", alias="isLaunchable") + icon: Optional[StrictStr] = Field(default=None, description="Base64-encoded app icon when loadIcons is enabled.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["tags", "running", "diskUsage", "date", "applicationType", "name", "bundleId", "bundlePath", "bundleDataPath", "isLaunchable", "icon"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentApp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentApp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": obj.get("tags"), + "running": obj.get("running"), + "diskUsage": obj.get("diskUsage"), + "date": obj.get("date"), + "applicationType": obj.get("applicationType"), + "name": obj.get("name"), + "bundleId": obj.get("bundleId"), + "bundlePath": obj.get("bundlePath"), + "bundleDataPath": obj.get("bundleDataPath"), + "isLaunchable": obj.get("isLaunchable"), + "icon": obj.get("icon") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_app_ready_response.py b/corellium/models/agent_app_ready_response.py new file mode 100644 index 0000000..bfade2d --- /dev/null +++ b/corellium/models/agent_app_ready_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppReadyResponse(BaseModel): + """ + AgentAppReadyResponse + """ # noqa: E501 + ready: StrictBool = Field(description="Whether the app subsystem is ready.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ready"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppReadyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppReadyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ready": obj.get("ready") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_app_ready_response_v1.py b/corellium/models/agent_app_ready_response_v1.py new file mode 100644 index 0000000..5d060c2 --- /dev/null +++ b/corellium/models/agent_app_ready_response_v1.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppReadyResponseV1(BaseModel): + """ + + """ # noqa: E501 + ready: StrictBool + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ready"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppReadyResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppReadyResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ready": obj.get("ready") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_app_status.py b/corellium/models/agent_app_status.py new file mode 100644 index 0000000..9d0363f --- /dev/null +++ b/corellium/models/agent_app_status.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppStatus(BaseModel): + """ + AgentAppStatus + """ # noqa: E501 + running: StrictBool = Field(description="Whether the app is currently running.") + bundle_id: StrictStr = Field(description="App bundle identifier.", alias="bundleId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["running", "bundleId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "running": obj.get("running"), + "bundleId": obj.get("bundleId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_app_status_v1.py b/corellium/models/agent_app_status_v1.py new file mode 100644 index 0000000..f9efc8e --- /dev/null +++ b/corellium/models/agent_app_status_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppStatusV1(BaseModel): + """ + + """ # noqa: E501 + running: Optional[StrictBool] = None + bundle_id: Optional[StrictStr] = Field(default=None, alias="bundleID") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["running", "bundleID"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppStatusV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if running (nullable) is None + # and model_fields_set contains the field + if self.running is None and "running" in self.model_fields_set: + _dict['running'] = None + + # set to None if bundle_id (nullable) is None + # and model_fields_set contains the field + if self.bundle_id is None and "bundle_id" in self.model_fields_set: + _dict['bundleID'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppStatusV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "running": obj.get("running"), + "bundleID": obj.get("bundleID") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_app_v1.py b/corellium/models/agent_app_v1.py new file mode 100644 index 0000000..dc44ece --- /dev/null +++ b/corellium/models/agent_app_v1.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppV1(BaseModel): + """ + + """ # noqa: E501 + tags: Optional[List[StrictStr]] = None + running: Optional[StrictBool] = None + disk_usage: Optional[StrictInt] = Field(default=None, alias="diskUsage") + var_date: Optional[StrictInt] = Field(default=None, alias="Date") + application_type: Optional[StrictStr] = Field(default=None, alias="applicationType") + name: Optional[StrictStr] = None + bundle_id: Optional[StrictStr] = Field(default=None, alias="bundleID") + bundle_path: Optional[StrictStr] = Field(default=None, alias="bundlePath") + bundle_data_path: Optional[StrictStr] = Field(default=None, alias="bundleDataPath") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["tags", "running", "diskUsage", "Date", "applicationType", "name", "bundleID", "bundlePath", "bundleDataPath"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if tags (nullable) is None + # and model_fields_set contains the field + if self.tags is None and "tags" in self.model_fields_set: + _dict['tags'] = None + + # set to None if running (nullable) is None + # and model_fields_set contains the field + if self.running is None and "running" in self.model_fields_set: + _dict['running'] = None + + # set to None if disk_usage (nullable) is None + # and model_fields_set contains the field + if self.disk_usage is None and "disk_usage" in self.model_fields_set: + _dict['diskUsage'] = None + + # set to None if var_date (nullable) is None + # and model_fields_set contains the field + if self.var_date is None and "var_date" in self.model_fields_set: + _dict['Date'] = None + + # set to None if application_type (nullable) is None + # and model_fields_set contains the field + if self.application_type is None and "application_type" in self.model_fields_set: + _dict['applicationType'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if bundle_id (nullable) is None + # and model_fields_set contains the field + if self.bundle_id is None and "bundle_id" in self.model_fields_set: + _dict['bundleID'] = None + + # set to None if bundle_path (nullable) is None + # and model_fields_set contains the field + if self.bundle_path is None and "bundle_path" in self.model_fields_set: + _dict['bundlePath'] = None + + # set to None if bundle_data_path (nullable) is None + # and model_fields_set contains the field + if self.bundle_data_path is None and "bundle_data_path" in self.model_fields_set: + _dict['bundleDataPath'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": obj.get("tags"), + "running": obj.get("running"), + "diskUsage": obj.get("diskUsage"), + "Date": obj.get("Date"), + "applicationType": obj.get("applicationType"), + "name": obj.get("name"), + "bundleID": obj.get("bundleID"), + "bundlePath": obj.get("bundlePath"), + "bundleDataPath": obj.get("bundleDataPath") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_apps_list.py b/corellium/models/agent_apps_list.py new file mode 100644 index 0000000..85e2325 --- /dev/null +++ b/corellium/models/agent_apps_list.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.agent_app import AgentApp +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppsList(BaseModel): + """ + AgentAppsList + """ # noqa: E501 + success: StrictBool = Field(description="Whether the agent request succeeded.") + apps: List[AgentApp] = Field(description="List of installed apps.") + frontmost: Optional[StrictStr] = Field(default=None, description="Bundle ID of the frontmost app or empty string if none (iOS only).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["success", "apps", "frontmost"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppsList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in apps (list) + _items = [] + if self.apps: + for _item_apps in self.apps: + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppsList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "apps": [AgentApp.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None, + "frontmost": obj.get("frontmost") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_apps_list_v1.py b/corellium/models/agent_apps_list_v1.py new file mode 100644 index 0000000..415b96b --- /dev/null +++ b/corellium/models/agent_apps_list_v1.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.agent_app_v1 import AgentAppV1 +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppsListV1(BaseModel): + """ + + """ # noqa: E501 + apps: Optional[List[AgentAppV1]] = None + frontmost: Optional[StrictStr] = Field(default=None, description="bundleID of frontmost app or empty string if none are frontmost") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["apps", "frontmost"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppsListV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in apps (list) + _items = [] + if self.apps: + for _item_apps in self.apps: + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if apps (nullable) is None + # and model_fields_set contains the field + if self.apps is None and "apps" in self.model_fields_set: + _dict['apps'] = None + + # set to None if frontmost (nullable) is None + # and model_fields_set contains the field + if self.frontmost is None and "frontmost" in self.model_fields_set: + _dict['frontmost'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppsListV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apps": [AgentAppV1.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None, + "frontmost": obj.get("frontmost") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_apps_status_list.py b/corellium/models/agent_apps_status_list.py new file mode 100644 index 0000000..019a0fc --- /dev/null +++ b/corellium/models/agent_apps_status_list.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.agent_app_status import AgentAppStatus +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppsStatusList(BaseModel): + """ + AgentAppsStatusList + """ # noqa: E501 + success: StrictBool = Field(description="Whether the agent request succeeded.") + id: Annotated[int, Field(strict=True, ge=0)] = Field(description="Agent sequence ID.") + apps: List[AgentAppStatus] = Field(description="List of app statuses.") + frontmost: Optional[StrictStr] = Field(default=None, description="Bundle ID of the frontmost app or empty string if none (iOS only).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["success", "id", "apps", "frontmost"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppsStatusList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in apps (list) + _items = [] + if self.apps: + for _item_apps in self.apps: + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppsStatusList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "id": obj.get("id"), + "apps": [AgentAppStatus.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None, + "frontmost": obj.get("frontmost") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_apps_status_list_v1.py b/corellium/models/agent_apps_status_list_v1.py new file mode 100644 index 0000000..bea682c --- /dev/null +++ b/corellium/models/agent_apps_status_list_v1.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.agent_app_status_v1 import AgentAppStatusV1 +from typing import Optional, Set +from typing_extensions import Self + +class AgentAppsStatusListV1(BaseModel): + """ + + """ # noqa: E501 + apps: Optional[List[AgentAppStatusV1]] = None + frontmost: Optional[StrictStr] = Field(default=None, description="bundleID of frontmost app or empty string if none are frontmost") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["apps", "frontmost"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentAppsStatusListV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in apps (list) + _items = [] + if self.apps: + for _item_apps in self.apps: + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if apps (nullable) is None + # and model_fields_set contains the field + if self.apps is None and "apps" in self.model_fields_set: + _dict['apps'] = None + + # set to None if frontmost (nullable) is None + # and model_fields_set contains the field + if self.frontmost is None and "frontmost" in self.model_fields_set: + _dict['frontmost'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentAppsStatusListV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apps": [AgentAppStatusV1.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None, + "frontmost": obj.get("frontmost") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_container.py b/corellium/models/agent_container.py new file mode 100644 index 0000000..3c802d7 --- /dev/null +++ b/corellium/models/agent_container.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentContainer(BaseModel): + """ + AgentContainer + """ # noqa: E501 + autostart: StrictStr = Field(description="Whether the container starts automatically.") + groups: StrictStr = Field(description="Container groups.") + ipv4: StrictStr = Field(description="IPv4 address.") + ipv6: StrictStr = Field(description="IPv6 address.") + name: StrictStr = Field(description="Container name.") + pid: StrictStr = Field(description="Process ID of the container.") + ram: StrictStr = Field(description="RAM usage.") + state: StrictStr = Field(description="Container state (e.g. RUNNING, STOPPED).") + swap: StrictStr = Field(description="Swap usage.") + unprivileged: StrictStr = Field(description="Whether the container is unprivileged.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["autostart", "groups", "ipv4", "ipv6", "name", "pid", "ram", "state", "swap", "unprivileged"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentContainer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentContainer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "autostart": obj.get("autostart"), + "groups": obj.get("groups"), + "ipv4": obj.get("ipv4"), + "ipv6": obj.get("ipv6"), + "name": obj.get("name"), + "pid": obj.get("pid"), + "ram": obj.get("ram"), + "state": obj.get("state"), + "swap": obj.get("swap"), + "unprivileged": obj.get("unprivileged") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_container_health.py b/corellium/models/agent_container_health.py new file mode 100644 index 0000000..22a8152 --- /dev/null +++ b/corellium/models/agent_container_health.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentContainerHealth(BaseModel): + """ + AgentContainerHealth + """ # noqa: E501 + healthy: StrictBool = Field(description="Whether the container is healthy.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["healthy"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentContainerHealth from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentContainerHealth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "healthy": obj.get("healthy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_container_list.py b/corellium/models/agent_container_list.py new file mode 100644 index 0000000..1bd31da --- /dev/null +++ b/corellium/models/agent_container_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from corellium.models.agent_container import AgentContainer +from typing import Optional, Set +from typing_extensions import Self + +class AgentContainerList(BaseModel): + """ + AgentContainerList + """ # noqa: E501 + containers: List[AgentContainer] = Field(description="List of containers on the VM.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["containers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentContainerList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in containers (list) + _items = [] + if self.containers: + for _item_containers in self.containers: + if _item_containers: + _items.append(_item_containers.to_dict()) + _dict['containers'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentContainerList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "containers": [AgentContainer.from_dict(_item) for _item in obj["containers"]] if obj.get("containers") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_error.py b/corellium/models/agent_error.py new file mode 100644 index 0000000..759bf6d --- /dev/null +++ b/corellium/models/agent_error.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentError(BaseModel): + """ + AgentError + """ # noqa: E501 + error: StrictStr = Field(description="The error encountered by the agent.") + error_id: StrictStr = Field(description="Error ID.", alias="errorID") + original_error: Optional[Dict[str, Any]] = Field(default=None, description="The full error object encountered by the agent.", alias="originalError") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "originalError"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['AgentError']): + raise ValueError("must be one of enum values ('AgentError')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "originalError": obj.get("originalError") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_error_v1.py b/corellium/models/agent_error_v1.py new file mode 100644 index 0000000..fbbd03f --- /dev/null +++ b/corellium/models/agent_error_v1.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentErrorV1(BaseModel): + """ + + """ # noqa: E501 + error: StrictStr = Field(description="The error encountered by the agent") + error_id: StrictStr = Field(description="AgentError", alias="errorID") + original_error: Optional[Dict[str, Any]] = Field(default=None, description="The full error encountered by the agent", alias="originalError") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "originalError"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['AgentError']): + raise ValueError("must be one of enum values ('AgentError')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentErrorV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if original_error (nullable) is None + # and model_fields_set contains the field + if self.original_error is None and "original_error" in self.model_fields_set: + _dict['originalError'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentErrorV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "originalError": obj.get("originalError") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_file_archive_download_body.py b/corellium/models/agent_file_archive_download_body.py new file mode 100644 index 0000000..5e6f111 --- /dev/null +++ b/corellium/models/agent_file_archive_download_body.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AgentFileArchiveDownloadBody(BaseModel): + """ + AgentFileArchiveDownloadBody + """ # noqa: E501 + paths: Annotated[List[Annotated[str, Field(min_length=1, strict=True)]], Field(min_length=1)] = Field(description="File and directory paths to include. Directory paths must end with a slash.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["paths"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentFileArchiveDownloadBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentFileArchiveDownloadBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "paths": obj.get("paths") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_file_attributes_body.py b/corellium/models/agent_file_attributes_body.py new file mode 100644 index 0000000..9b6fe5f --- /dev/null +++ b/corellium/models/agent_file_attributes_body.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AgentFileAttributesBody(BaseModel): + """ + AgentFileAttributesBody + """ # noqa: E501 + path: Optional[StrictStr] = Field(default=None, description="New path to move/rename the file to.") + mode: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="New file mode as a decimal integer (octal 0644 = 420).") + uid: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="New owner UID.") + gid: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="New group GID.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path", "mode", "uid", "gid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentFileAttributesBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentFileAttributesBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path"), + "mode": obj.get("mode"), + "uid": obj.get("uid"), + "gid": obj.get("gid") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_file_download_token.py b/corellium/models/agent_file_download_token.py new file mode 100644 index 0000000..798c9cf --- /dev/null +++ b/corellium/models/agent_file_download_token.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentFileDownloadToken(BaseModel): + """ + AgentFileDownloadToken + """ # noqa: E501 + token: StrictStr = Field(description="Authorization token for a preauthorized file download.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentFileDownloadToken from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentFileDownloadToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_frida_process_list.py b/corellium/models/agent_frida_process_list.py new file mode 100644 index 0000000..52d66d5 --- /dev/null +++ b/corellium/models/agent_frida_process_list.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.agent_frida_process_list_attached import AgentFridaProcessListAttached +from typing import Optional, Set +from typing_extensions import Self + +class AgentFridaProcessList(BaseModel): + """ + AgentFridaProcessList + """ # noqa: E501 + success: StrictBool = Field(description="Whether the agent request succeeded.") + exit_status: StrictInt = Field(description="Exit status of the frida-ps command.", alias="exitStatus") + output: StrictStr = Field(description="Raw output of the frida-ps command.") + attached: Optional[AgentFridaProcessListAttached] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["success", "exitStatus", "output", "attached"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentFridaProcessList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of attached + if self.attached: + _dict['attached'] = self.attached.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentFridaProcessList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "exitStatus": obj.get("exitStatus"), + "output": obj.get("output"), + "attached": AgentFridaProcessListAttached.from_dict(obj["attached"]) if obj.get("attached") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_frida_process_list_attached.py b/corellium/models/agent_frida_process_list_attached.py new file mode 100644 index 0000000..383592f --- /dev/null +++ b/corellium/models/agent_frida_process_list_attached.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentFridaProcessListAttached(BaseModel): + """ + The process Frida is currently attached to, if any. + """ # noqa: E501 + target_name: StrictStr = Field(description="Name of the target process to attach to.", alias="targetName") + target_pid: StrictInt = Field(description="PID of the process Frida is attached to.", alias="targetPid") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["targetName", "targetPid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentFridaProcessListAttached from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentFridaProcessListAttached from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetName": obj.get("targetName"), + "targetPid": obj.get("targetPid") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_frida_response.py b/corellium/models/agent_frida_response.py new file mode 100644 index 0000000..1b49c1d --- /dev/null +++ b/corellium/models/agent_frida_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AgentFridaResponse(BaseModel): + """ + AgentFridaResponse + """ # noqa: E501 + id: Annotated[int, Field(strict=True, ge=0)] = Field(description="Agent sequence ID.") + success: StrictBool = Field(description="Whether the agent request succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentFridaResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentFridaResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "success": obj.get("success") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_frida_run_body.py b/corellium/models/agent_frida_run_body.py new file mode 100644 index 0000000..a5687d9 --- /dev/null +++ b/corellium/models/agent_frida_run_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentFridaRunBody(BaseModel): + """ + AgentFridaRunBody + """ # noqa: E501 + target_pid: StrictStr = Field(description="PID of the target process to attach to.", alias="targetPid") + target_name: StrictStr = Field(description="Name of the target process to attach to.", alias="targetName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["targetPid", "targetName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentFridaRunBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentFridaRunBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetPid": obj.get("targetPid"), + "targetName": obj.get("targetName") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_icons.py b/corellium/models/agent_icons.py new file mode 100644 index 0000000..b9ce732 --- /dev/null +++ b/corellium/models/agent_icons.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AgentIcons(BaseModel): + """ + + """ # noqa: E501 + icon: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The data for an icon") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["icon"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentIcons from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentIcons from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "icon": obj.get("icon") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_icons_response.py b/corellium/models/agent_icons_response.py new file mode 100644 index 0000000..5897619 --- /dev/null +++ b/corellium/models/agent_icons_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AgentIconsResponse(BaseModel): + """ + AgentIconsResponse + """ # noqa: E501 + success: StrictBool = Field(description="Whether the agent request succeeded.") + id: Annotated[int, Field(strict=True, ge=0)] = Field(description="Agent sequence ID.") + icons: Dict[str, StrictStr] = Field(description="Map of bundle ID to base64-encoded icon data.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["success", "id", "icons"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentIconsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentIconsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "id": obj.get("id"), + "icons": obj.get("icons") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_install_body.py b/corellium/models/agent_install_body.py new file mode 100644 index 0000000..a151eb8 --- /dev/null +++ b/corellium/models/agent_install_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentInstallBody(BaseModel): + """ + AgentInstallBody + """ # noqa: E501 + path: StrictStr = Field(description="Path to the app to install on the VM filesystem.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentInstallBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentInstallBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_install_body_v1.py b/corellium/models/agent_install_body_v1.py new file mode 100644 index 0000000..adc68de --- /dev/null +++ b/corellium/models/agent_install_body_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentInstallBodyV1(BaseModel): + """ + + """ # noqa: E501 + path: Optional[StrictStr] = Field(default=None, description="path to app to install") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentInstallBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if path (nullable) is None + # and model_fields_set contains the field + if self.path is None and "path" in self.model_fields_set: + _dict['path'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentInstallBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_profile_list_response.py b/corellium/models/agent_profile_list_response.py new file mode 100644 index 0000000..ef2cdd5 --- /dev/null +++ b/corellium/models/agent_profile_list_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentProfileListResponse(BaseModel): + """ + AgentProfileListResponse + """ # noqa: E501 + profiles: List[StrictStr] = Field(description="Identifiers of the installed profiles.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["profiles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentProfileListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentProfileListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "profiles": obj.get("profiles") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_profiles_return.py b/corellium/models/agent_profiles_return.py new file mode 100644 index 0000000..33b0f1c --- /dev/null +++ b/corellium/models/agent_profiles_return.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentProfilesReturn(BaseModel): + """ + + """ # noqa: E501 + profiles: List[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["profiles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentProfilesReturn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentProfilesReturn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "profiles": obj.get("profiles") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_remote_it_status.py b/corellium/models/agent_remote_it_status.py new file mode 100644 index 0000000..55651bc --- /dev/null +++ b/corellium/models/agent_remote_it_status.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentRemoteItStatus(BaseModel): + """ + AgentRemoteItStatus + """ # noqa: E501 + remote_it_status: StrictStr = Field(description="Installation state of the Remote.It package.", alias="remoteItStatus") + claim_code: Optional[StrictStr] = Field(default=None, description="Remote.It claim code, present once the package is installed and claimable.", alias="claimCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["remoteItStatus", "claimCode"] + + @field_validator('remote_it_status') + def remote_it_status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['unknown', 'installed', 'uninstalled', 'installing', 'uninstalling', 'registered']): + raise ValueError("must be one of enum values ('unknown', 'installed', 'uninstalled', 'installing', 'uninstalling', 'registered')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentRemoteItStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentRemoteItStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "remoteItStatus": obj.get("remoteItStatus"), + "claimCode": obj.get("claimCode") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_adb_auth.py b/corellium/models/agent_system_adb_auth.py new file mode 100644 index 0000000..d52c1bd --- /dev/null +++ b/corellium/models/agent_system_adb_auth.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemAdbAuth(BaseModel): + """ + AgentSystemAdbAuth + """ # noqa: E501 + enabled: StrictBool = Field(description="Whether ADB authorization is enabled.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemAdbAuth from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemAdbAuth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_adb_auth_v1.py b/corellium/models/agent_system_adb_auth_v1.py new file mode 100644 index 0000000..7fa78dd --- /dev/null +++ b/corellium/models/agent_system_adb_auth_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemAdbAuthV1(BaseModel): + """ + + """ # noqa: E501 + enabled: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemAdbAuthV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemAdbAuthV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_get_prop_body.py b/corellium/models/agent_system_get_prop_body.py new file mode 100644 index 0000000..51a159f --- /dev/null +++ b/corellium/models/agent_system_get_prop_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemGetPropBody(BaseModel): + """ + AgentSystemGetPropBody + """ # noqa: E501 + var_property: StrictStr = Field(description="The system property to retrieve.", alias="property") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["property"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemGetPropBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemGetPropBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "property": obj.get("property") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_get_prop_body_v1.py b/corellium/models/agent_system_get_prop_body_v1.py new file mode 100644 index 0000000..11ba1eb --- /dev/null +++ b/corellium/models/agent_system_get_prop_body_v1.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemGetPropBodyV1(BaseModel): + """ + + """ # noqa: E501 + var_property: StrictStr = Field(alias="property") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["property"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemGetPropBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemGetPropBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "property": obj.get("property") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_get_prop_response.py b/corellium/models/agent_system_get_prop_response.py new file mode 100644 index 0000000..d25064c --- /dev/null +++ b/corellium/models/agent_system_get_prop_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemGetPropResponse(BaseModel): + """ + AgentSystemGetPropResponse + """ # noqa: E501 + id: Annotated[int, Field(strict=True, ge=0)] = Field(description="Agent sequence ID.") + success: StrictBool = Field(description="Whether the agent operation succeeded.") + value: Optional[StrictStr] = Field(default=None, description="The value of the requested property. Omitted when the property is unset.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "success", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemGetPropResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemGetPropResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "success": obj.get("success"), + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_install_open_gapps_body.py b/corellium/models/agent_system_install_open_gapps_body.py new file mode 100644 index 0000000..86b97e8 --- /dev/null +++ b/corellium/models/agent_system_install_open_gapps_body.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemInstallOpenGappsBody(BaseModel): + """ + AgentSystemInstallOpenGappsBody + """ # noqa: E501 + url: StrictStr = Field(description="URL to download the OpenGApps package from.") + hash: StrictStr = Field(description="Expected SHA-256 hash of the downloaded package.") + fingerprint: StrictStr = Field(description="Build fingerprint to install the package against.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "hash", "fingerprint"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemInstallOpenGappsBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemInstallOpenGappsBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "hash": obj.get("hash"), + "fingerprint": obj.get("fingerprint") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_network_response.py b/corellium/models/agent_system_network_response.py new file mode 100644 index 0000000..90350d6 --- /dev/null +++ b/corellium/models/agent_system_network_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemNetworkResponse(BaseModel): + """ + AgentSystemNetworkResponse + """ # noqa: E501 + value: StrictStr = Field(description="The IP address bound to eth0.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemNetworkResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemNetworkResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_result.py b/corellium/models/agent_system_result.py new file mode 100644 index 0000000..01dbb5d --- /dev/null +++ b/corellium/models/agent_system_result.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemResult(BaseModel): + """ + AgentSystemResult + """ # noqa: E501 + id: Annotated[int, Field(strict=True, ge=0)] = Field(description="Agent sequence ID.") + success: StrictBool = Field(description="Whether the agent operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "success": obj.get("success") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_set_device_properties_body.py b/corellium/models/agent_system_set_device_properties_body.py new file mode 100644 index 0000000..b594242 --- /dev/null +++ b/corellium/models/agent_system_set_device_properties_body.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemSetDevicePropertiesBody(BaseModel): + """ + AgentSystemSetDevicePropertiesBody + """ # noqa: E501 + model_id: Optional[StrictStr] = Field(default=None, description="New model ID for the instance. Use null to reset to the default model ID.", alias="modelId") + manufacturer_id: Optional[StrictStr] = Field(default=None, description="New manufacturer ID for the instance. Use null to reset to the default manufacturer ID.", alias="manufacturerId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["modelId", "manufacturerId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemSetDevicePropertiesBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if model_id (nullable) is None + # and model_fields_set contains the field + if self.model_id is None and "model_id" in self.model_fields_set: + _dict['modelId'] = None + + # set to None if manufacturer_id (nullable) is None + # and model_fields_set contains the field + if self.manufacturer_id is None and "manufacturer_id" in self.model_fields_set: + _dict['manufacturerId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemSetDevicePropertiesBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "modelId": obj.get("modelId"), + "manufacturerId": obj.get("manufacturerId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_set_hostname_body.py b/corellium/models/agent_system_set_hostname_body.py new file mode 100644 index 0000000..1a038f1 --- /dev/null +++ b/corellium/models/agent_system_set_hostname_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemSetHostnameBody(BaseModel): + """ + AgentSystemSetHostnameBody + """ # noqa: E501 + hostname: StrictStr = Field(description="New hostname for the instance.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hostname"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemSetHostnameBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemSetHostnameBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hostname": obj.get("hostname") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_system_set_hostname_body_v1.py b/corellium/models/agent_system_set_hostname_body_v1.py new file mode 100644 index 0000000..a80fb8b --- /dev/null +++ b/corellium/models/agent_system_set_hostname_body_v1.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentSystemSetHostnameBodyV1(BaseModel): + """ + + """ # noqa: E501 + hostname: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hostname"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSystemSetHostnameBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSystemSetHostnameBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hostname": obj.get("hostname") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_temp_file_response.py b/corellium/models/agent_temp_file_response.py new file mode 100644 index 0000000..ee94c58 --- /dev/null +++ b/corellium/models/agent_temp_file_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgentTempFileResponse(BaseModel): + """ + AgentTempFileResponse + """ # noqa: E501 + path: StrictStr = Field(description="Unique temporary file path on the VM filesystem.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentTempFileResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentTempFileResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agent_value_return.py b/corellium/models/agent_value_return.py new file mode 100644 index 0000000..61f9e1b --- /dev/null +++ b/corellium/models/agent_value_return.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgentValueReturn(BaseModel): + """ + + """ # noqa: E501 + value: Optional[StrictStr] = Field(default=None, description="The requested value") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentValueReturn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentValueReturn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agreed_ack.py b/corellium/models/agreed_ack.py new file mode 100644 index 0000000..42956ca --- /dev/null +++ b/corellium/models/agreed_ack.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AgreedAck(BaseModel): + """ + AgreedAck + """ # noqa: E501 + agreed_to_terms: datetime = Field(description="Timestamp the terms were agreed to.", alias="agreedToTerms") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["agreedToTerms"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgreedAck from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgreedAck from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agreedToTerms": obj.get("agreedToTerms") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/agreed_ack_v1.py b/corellium/models/agreed_ack_v1.py new file mode 100644 index 0000000..29fb6b6 --- /dev/null +++ b/corellium/models/agreed_ack_v1.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AgreedAckV1(BaseModel): + """ + + """ # noqa: E501 + agreed_to_terms: Optional[datetime] = Field(default=None, description="Date agreed", alias="agreedToTerms") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["agreedToTerms"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgreedAckV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if agreed_to_terms (nullable) is None + # and model_fields_set contains the field + if self.agreed_to_terms is None and "agreed_to_terms" in self.model_fields_set: + _dict['agreedToTerms'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgreedAckV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agreedToTerms": obj.get("agreedToTerms") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ai_tools_config.py b/corellium/models/ai_tools_config.py new file mode 100644 index 0000000..ddbcc35 --- /dev/null +++ b/corellium/models/ai_tools_config.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AiToolsConfig(BaseModel): + """ + AiToolsConfig + """ # noqa: E501 + ai_enabled: Optional[StrictBool] = Field(default=None, description="Whether cluster-hosted AI features (e.g. the MCP server) are enabled.", alias="aiEnabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["aiEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AiToolsConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AiToolsConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aiEnabled": obj.get("aiEnabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ai_tools_config_v1.py b/corellium/models/ai_tools_config_v1.py new file mode 100644 index 0000000..c8b3af6 --- /dev/null +++ b/corellium/models/ai_tools_config_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AiToolsConfigV1(BaseModel): + """ + + """ # noqa: E501 + ai_enabled: Optional[StrictBool] = Field(default=None, description="Designates whether cluster-hosted AI features are enabled", alias="aiEnabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["aiEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AiToolsConfigV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if ai_enabled (nullable) is None + # and model_fields_set contains the field + if self.ai_enabled is None and "ai_enabled" in self.model_fields_set: + _dict['aiEnabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AiToolsConfigV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aiEnabled": obj.get("aiEnabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/allowed_devices_filter_schema.py b/corellium/models/allowed_devices_filter_schema.py new file mode 100644 index 0000000..ee7c771 --- /dev/null +++ b/corellium/models/allowed_devices_filter_schema.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.allowed_firmware_schema import AllowedFirmwareSchema +from typing import Optional, Set +from typing_extensions import Self + +class AllowedDevicesFilterSchema(BaseModel): + """ + AllowedDevicesFilterSchema + """ # noqa: E501 + device_name: StrictStr = Field(description="Device flavor identifier.", alias="deviceName") + allowed_firmwares: List[AllowedFirmwareSchema] = Field(description="Firmware versions permitted on this device.", alias="allowedFirmwares") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deviceName", "allowedFirmwares"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AllowedDevicesFilterSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in allowed_firmwares (list) + _items = [] + if self.allowed_firmwares: + for _item_allowed_firmwares in self.allowed_firmwares: + if _item_allowed_firmwares: + _items.append(_item_allowed_firmwares.to_dict()) + _dict['allowedFirmwares'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllowedDevicesFilterSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deviceName": obj.get("deviceName"), + "allowedFirmwares": [AllowedFirmwareSchema.from_dict(_item) for _item in obj["allowedFirmwares"]] if obj.get("allowedFirmwares") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/allowed_domains_response.py b/corellium/models/allowed_domains_response.py new file mode 100644 index 0000000..d3e1e38 --- /dev/null +++ b/corellium/models/allowed_domains_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AllowedDomainsResponse(BaseModel): + """ + + """ # noqa: E501 + allowed_domains: Optional[List[StrictStr]] = Field(default=None, description="List of allowed domains", alias="allowedDomains") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["allowedDomains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AllowedDomainsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if allowed_domains (nullable) is None + # and model_fields_set contains the field + if self.allowed_domains is None and "allowed_domains" in self.model_fields_set: + _dict['allowedDomains'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllowedDomainsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedDomains": obj.get("allowedDomains") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/allowed_firmware_schema.py b/corellium/models/allowed_firmware_schema.py new file mode 100644 index 0000000..6e9ccd7 --- /dev/null +++ b/corellium/models/allowed_firmware_schema.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AllowedFirmwareSchema(BaseModel): + """ + AllowedFirmwareSchema + """ # noqa: E501 + version: StrictStr = Field(description="Firmware version.") + build_id: StrictStr = Field(description="Firmware build ID.", alias="buildId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["version", "buildId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AllowedFirmwareSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllowedFirmwareSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "buildId": obj.get("buildId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_conflict_error.py b/corellium/models/api_conflict_error.py new file mode 100644 index 0000000..042d261 --- /dev/null +++ b/corellium/models/api_conflict_error.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiConflictError(BaseModel): + """ + ApiConflictError + """ # noqa: E501 + error: StrictStr = Field(description="Human-readable explanation of the conflict.") + error_id: StrictStr = Field(description="Always `Conflict`: the request clashes with the current state, for example the resource already exists or is in a state that does not allow this action. Check the current state before retrying.", alias="errorID") + object: Optional[Dict[str, Any]] = Field(default=None, description="The existing object the request conflicted with, when there is one.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "object"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Conflict']): + raise ValueError("must be one of enum values ('Conflict')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiConflictError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiConflictError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "object": obj.get("object") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_conflict_error_v1.py b/corellium/models/api_conflict_error_v1.py new file mode 100644 index 0000000..caf7305 --- /dev/null +++ b/corellium/models/api_conflict_error_v1.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiConflictErrorV1(BaseModel): + """ + + """ # noqa: E501 + error: StrictStr = Field(description="Error text") + error_id: StrictStr = Field(description="Error ID", alias="errorID") + object: Optional[Dict[str, Any]] = Field(default=None, description="Object that is conflicted with") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "object"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Conflict']): + raise ValueError("must be one of enum values ('Conflict')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiConflictErrorV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if object (nullable) is None + # and model_fields_set contains the field + if self.object is None and "object" in self.model_fields_set: + _dict['object'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiConflictErrorV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "object": obj.get("object") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_error.py b/corellium/models/api_error.py new file mode 100644 index 0000000..ac7acb4 --- /dev/null +++ b/corellium/models/api_error.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiError(BaseModel): + """ + ApiError + """ # noqa: E501 + error: StrictStr = Field(description="Human-readable explanation of the error.") + error_id: StrictStr = Field(description="Short machine-readable error name, for example `PermissionDenied` or `NotFound`. Use this, not `error`, to decide what to do in code.", alias="errorID") + original_error: Optional[StrictStr] = Field(default=None, description="When the platform failed while talking to another service, the error that service reported. Useful when reporting a problem to support.", alias="originalError") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "originalError"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "originalError": obj.get("originalError") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_error_v1.py b/corellium/models/api_error_v1.py new file mode 100644 index 0000000..9007532 --- /dev/null +++ b/corellium/models/api_error_v1.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiErrorV1(BaseModel): + """ + + """ # noqa: E501 + error: StrictStr = Field(description="Error text") + error_id: StrictStr = Field(description="Error ID", alias="errorID") + original_error: Optional[StrictStr] = Field(default=None, description="Upstream error description", alias="originalError") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "originalError"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiErrorV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if original_error (nullable) is None + # and model_fields_set contains the field + if self.original_error is None and "original_error" in self.model_fields_set: + _dict['originalError'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiErrorV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "originalError": obj.get("originalError") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_internal_consistency_error.py b/corellium/models/api_internal_consistency_error.py new file mode 100644 index 0000000..a6894e2 --- /dev/null +++ b/corellium/models/api_internal_consistency_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiInternalConsistencyError(BaseModel): + """ + + """ # noqa: E501 + error: StrictStr = Field(description="Error text") + error_id: StrictStr = Field(description="Error ID", alias="errorID") + original_error: Optional[StrictStr] = Field(default=None, description="Upstream error description", alias="originalError") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "originalError"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiInternalConsistencyError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if original_error (nullable) is None + # and model_fields_set contains the field + if self.original_error is None and "original_error" in self.model_fields_set: + _dict['originalError'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiInternalConsistencyError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "originalError": obj.get("originalError") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_not_found_error.py b/corellium/models/api_not_found_error.py new file mode 100644 index 0000000..f768955 --- /dev/null +++ b/corellium/models/api_not_found_error.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiNotFoundError(BaseModel): + """ + ApiNotFoundError + """ # noqa: E501 + error: StrictStr = Field(description="Human-readable explanation of what was not found.") + error_id: StrictStr = Field(description="Short machine-readable error name, usually `NotFound`.", alias="errorID") + name: Optional[StrictStr] = Field(default=None, description="Kind of object that was not found, for example `instance`.") + params: Optional[Dict[str, Any]] = Field(default=None, description="The identifiers from your request that were looked up.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "name", "params"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiNotFoundError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiNotFoundError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "name": obj.get("name"), + "params": obj.get("params") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_not_found_error_v1.py b/corellium/models/api_not_found_error_v1.py new file mode 100644 index 0000000..fda55f8 --- /dev/null +++ b/corellium/models/api_not_found_error_v1.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiNotFoundErrorV1(BaseModel): + """ + + """ # noqa: E501 + error: StrictStr = Field(description="Error text") + error_id: StrictStr = Field(description="Error ID", alias="errorID") + name: Optional[StrictStr] = Field(default=None, description="Name of the object requested") + params: Optional[Dict[str, Any]] = Field(default=None, description="params provided by user") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "name", "params"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiNotFoundErrorV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if params (nullable) is None + # and model_fields_set contains the field + if self.params is None and "params" in self.model_fields_set: + _dict['params'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiNotFoundErrorV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "name": obj.get("name"), + "params": obj.get("params") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_token.py b/corellium/models/api_token.py new file mode 100644 index 0000000..5e7f26e --- /dev/null +++ b/corellium/models/api_token.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiToken(BaseModel): + """ + + """ # noqa: E501 + api_token: StrictStr = Field(description="Persistent API key created by the user (in the web UI or via POST /v3/auth/apitoken), used as an alternative to username/password. An opaque string, sent back verbatim. Also accepted as an Authorization Bearer credential and stored by the CLI as --token. Distinct from the session token.", alias="apiToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["apiToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiToken from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiToken": obj.get("apiToken") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/api_token_result.py b/corellium/models/api_token_result.py new file mode 100644 index 0000000..c015607 --- /dev/null +++ b/corellium/models/api_token_result.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiTokenResult(BaseModel): + """ + ApiTokenResult + """ # noqa: E501 + api_token: StrictStr = Field(description="The generated API token. Returned only once and cannot be retrieved later, so store it securely. Use it wherever an API token is accepted, such as the `apiToken` field of POST /v3/auth/login.", alias="apiToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["apiToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiTokenResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiTokenResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiToken": obj.get("apiToken") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/artifacts_path.py b/corellium/models/artifacts_path.py new file mode 100644 index 0000000..4774b04 --- /dev/null +++ b/corellium/models/artifacts_path.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ArtifactsPath(BaseModel): + """ + ArtifactsPath + """ # noqa: E501 + path: StrictStr = Field(description="Absolute path of the instance's artifacts volume on the compute node.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactsPath from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArtifactsPath from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment.py b/corellium/models/assessment.py new file mode 100644 index 0000000..09ab25f --- /dev/null +++ b/corellium/models/assessment.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.assessment_bundle import AssessmentBundle +from corellium.models.assessment_frida_script import AssessmentFridaScript +from corellium.models.assessment_metadata import AssessmentMetadata +from corellium.models.assessment_results import AssessmentResults +from corellium.models.assessment_severity_counts import AssessmentSeverityCounts +from corellium.models.assessment_status import AssessmentStatus +from corellium.models.assessment_wordlist import AssessmentWordlist +from typing import Optional, Set +from typing_extensions import Self + +class Assessment(BaseModel): + """ + Assessment + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the assessment.") + status: AssessmentStatus + instance_id: StrictStr = Field(description="Identifier of the instance under assessment.", alias="instanceId") + bundle: AssessmentBundle + wordlist: Optional[AssessmentWordlist] + frida_script: Optional[AssessmentFridaScript] = Field(alias="fridaScript") + report_id: Optional[StrictStr] = Field(description="Identifier of the generated report, or null if not yet available.", alias="reportId") + results: Optional[AssessmentResults] + metadata: Optional[AssessmentMetadata] + severity_counts: Optional[AssessmentSeverityCounts] = Field(alias="severityCounts") + error: Optional[StrictStr] = Field(description="Why the assessment failed, or null. Set only when monitoring fails, to one of: \"Insufficient memory; increase device's RAM.\", \"App closed too soon; keep open until report has generated.\", \"App unable to launch; check compatibility.\", or \"Unknown error.\". An assessment that fails while tests run has status `failed` with `error` null.") + created_by: Optional[StrictStr] = Field(description="Identifier of the user that created the assessment, or null.", alias="createdBy") + created_at: Optional[datetime] = Field(description="Creation timestamp.", alias="createdAt") + updated_at: Optional[datetime] = Field(description="Last-update timestamp.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "status", "instanceId", "bundle", "wordlist", "fridaScript", "reportId", "results", "metadata", "severityCounts", "error", "createdBy", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Assessment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of bundle + if self.bundle: + _dict['bundle'] = self.bundle.to_dict() + # override the default output from pydantic by calling `to_dict()` of wordlist + if self.wordlist: + _dict['wordlist'] = self.wordlist.to_dict() + # override the default output from pydantic by calling `to_dict()` of frida_script + if self.frida_script: + _dict['fridaScript'] = self.frida_script.to_dict() + # override the default output from pydantic by calling `to_dict()` of results + if self.results: + _dict['results'] = self.results.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of severity_counts + if self.severity_counts: + _dict['severityCounts'] = self.severity_counts.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if wordlist (nullable) is None + # and model_fields_set contains the field + if self.wordlist is None and "wordlist" in self.model_fields_set: + _dict['wordlist'] = None + + # set to None if frida_script (nullable) is None + # and model_fields_set contains the field + if self.frida_script is None and "frida_script" in self.model_fields_set: + _dict['fridaScript'] = None + + # set to None if report_id (nullable) is None + # and model_fields_set contains the field + if self.report_id is None and "report_id" in self.model_fields_set: + _dict['reportId'] = None + + # set to None if results (nullable) is None + # and model_fields_set contains the field + if self.results is None and "results" in self.model_fields_set: + _dict['results'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if severity_counts (nullable) is None + # and model_fields_set contains the field + if self.severity_counts is None and "severity_counts" in self.model_fields_set: + _dict['severityCounts'] = None + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['createdBy'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Assessment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status"), + "instanceId": obj.get("instanceId"), + "bundle": AssessmentBundle.from_dict(obj["bundle"]) if obj.get("bundle") is not None else None, + "wordlist": AssessmentWordlist.from_dict(obj["wordlist"]) if obj.get("wordlist") is not None else None, + "fridaScript": AssessmentFridaScript.from_dict(obj["fridaScript"]) if obj.get("fridaScript") is not None else None, + "reportId": obj.get("reportId"), + "results": AssessmentResults.from_dict(obj["results"]) if obj.get("results") is not None else None, + "metadata": AssessmentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "severityCounts": AssessmentSeverityCounts.from_dict(obj["severityCounts"]) if obj.get("severityCounts") is not None else None, + "error": obj.get("error"), + "createdBy": obj.get("createdBy"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_bundle.py b/corellium/models/assessment_bundle.py new file mode 100644 index 0000000..8bcb9dc --- /dev/null +++ b/corellium/models/assessment_bundle.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentBundle(BaseModel): + """ + AssessmentBundle + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the application bundle.") + name: StrictStr = Field(description="Display name of the application bundle.") + version: StrictStr = Field(description="Version of the application bundle.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentBundle from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentBundle from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "version": obj.get("version") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_format.py b/corellium/models/assessment_format.py new file mode 100644 index 0000000..6aa559a --- /dev/null +++ b/corellium/models/assessment_format.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssessmentFormat(str, Enum): + """ + Report download format. Defaults to \"html\". + """ + + """ + allowed enum values + """ + JSON = 'json' + HTML = 'html' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssessmentFormat from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/assessment_frida_script.py b/corellium/models/assessment_frida_script.py new file mode 100644 index 0000000..58461ed --- /dev/null +++ b/corellium/models/assessment_frida_script.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentFridaScript(BaseModel): + """ + Frida script used during the assessment, or null if none. + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the resource.") + name: StrictStr = Field(description="Name of the resource.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentFridaScript from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentFridaScript from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_history.py b/corellium/models/assessment_history.py new file mode 100644 index 0000000..3e21562 --- /dev/null +++ b/corellium/models/assessment_history.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.assessment_history_results_inner import AssessmentHistoryResultsInner +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentHistory(BaseModel): + """ + AssessmentHistory + """ # noqa: E501 + results: List[AssessmentHistoryResultsInner] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentHistory from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentHistory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [AssessmentHistoryResultsInner.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_history_line_item.py b/corellium/models/assessment_history_line_item.py new file mode 100644 index 0000000..f629c2f --- /dev/null +++ b/corellium/models/assessment_history_line_item.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentHistoryLineItem(BaseModel): + """ + + """ # noqa: E501 + var_date: Union[StrictFloat, StrictInt] = Field(description="UNIX Date representing the month", alias="date") + complete: Union[StrictFloat, StrictInt] = Field(description="The number of successful assessments") + incomplete: Union[StrictFloat, StrictInt] = Field(description="The number of failed assessments") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["date", "complete", "incomplete"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentHistoryLineItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentHistoryLineItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "complete": obj.get("complete"), + "incomplete": obj.get("incomplete") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_history_results_inner.py b/corellium/models/assessment_history_results_inner.py new file mode 100644 index 0000000..8a59f31 --- /dev/null +++ b/corellium/models/assessment_history_results_inner.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentHistoryResultsInner(BaseModel): + """ + AssessmentHistoryResultsInner + """ # noqa: E501 + var_date: Annotated[str, Field(strict=True)] = Field(description="Month label in \"MMM YYYY\" format (e.g. \"Jul 2025\").", alias="date") + complete: StrictInt = Field(description="Number of successful assessments.") + incomplete: StrictInt = Field(description="Number of failed assessments.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["date", "complete", "incomplete"] + + @field_validator('var_date') + def var_date_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Z][a-z]{2} \d{4}$", value): + raise ValueError(r"must validate the regular expression /^[A-Z][a-z]{2} \d{4}$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentHistoryResultsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentHistoryResultsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "complete": obj.get("complete"), + "incomplete": obj.get("incomplete") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_history_v1.py b/corellium/models/assessment_history_v1.py new file mode 100644 index 0000000..310cb23 --- /dev/null +++ b/corellium/models/assessment_history_v1.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from corellium.models.assessment_history_line_item import AssessmentHistoryLineItem +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentHistoryV1(BaseModel): + """ + + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Total number of items") + count: Union[StrictFloat, StrictInt] = Field(description="Number of items in current response") + limit: Union[StrictFloat, StrictInt] = Field(description="Limit used for the request") + offset: Union[StrictFloat, StrictInt] = Field(description="Offset used for the request") + results: List[AssessmentHistoryLineItem] = Field(description="The list of assessments") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "count", "limit", "offset", "results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentHistoryV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentHistoryV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "count": obj.get("count"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "results": [AssessmentHistoryLineItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_id_status.py b/corellium/models/assessment_id_status.py new file mode 100644 index 0000000..8fa042b --- /dev/null +++ b/corellium/models/assessment_id_status.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.assessment_status import AssessmentStatus +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentIdStatus(BaseModel): + """ + AssessmentIdStatus + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the assessment.") + status: AssessmentStatus + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentIdStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentIdStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_metadata.py b/corellium/models/assessment_metadata.py new file mode 100644 index 0000000..758aa09 --- /dev/null +++ b/corellium/models/assessment_metadata.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentMetadata(BaseModel): + """ + Assessment metadata, or null if unset. + """ # noqa: E501 + corellium_version: Optional[StrictStr] = Field(default=None, description="Corellium platform version captured when the assessment ran.", alias="corelliumVersion") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["corelliumVersion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "corelliumVersion": obj.get("corelliumVersion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_results.py b/corellium/models/assessment_results.py new file mode 100644 index 0000000..b229b65 --- /dev/null +++ b/corellium/models/assessment_results.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentResults(BaseModel): + """ + Aggregated check results, or null if the assessment has not produced results. + """ # noqa: E501 + var_pass: StrictInt = Field(description="Number of checks that passed.", alias="pass") + fail: StrictInt = Field(description="Number of checks that failed.") + error: StrictInt = Field(description="Number of checks that errored during execution.") + info: StrictInt = Field(description="Number of informational checks.") + na: StrictInt = Field(description="Number of checks marked not applicable.") + artifact: StrictInt = Field(description="Number of artifact-category outcomes.") + score: Optional[StrictInt] = Field(description="Computed MATRIX score, or null for assessments created before scoring was introduced.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["pass", "fail", "error", "info", "na", "artifact", "score"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentResults from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if score (nullable) is None + # and model_fields_set contains the field + if self.score is None and "score" in self.model_fields_set: + _dict['score'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pass": obj.get("pass"), + "fail": obj.get("fail"), + "error": obj.get("error"), + "info": obj.get("info"), + "na": obj.get("na"), + "artifact": obj.get("artifact"), + "score": obj.get("score") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_severity_counts.py b/corellium/models/assessment_severity_counts.py new file mode 100644 index 0000000..56ee918 --- /dev/null +++ b/corellium/models/assessment_severity_counts.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentSeverityCounts(BaseModel): + """ + Snapshot of available check counts by severity, or null if unset. + """ # noqa: E501 + high: StrictInt = Field(description="Number of high-severity checks available at assessment creation time.") + medium: StrictInt = Field(description="Number of medium-severity checks available at assessment creation time.") + low: StrictInt = Field(description="Number of low-severity checks available at assessment creation time.") + info: StrictInt = Field(description="Number of informational checks available at assessment creation time.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["high", "medium", "low", "info"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentSeverityCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentSeverityCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "high": obj.get("high"), + "medium": obj.get("medium"), + "low": obj.get("low"), + "info": obj.get("info") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/assessment_status.py b/corellium/models/assessment_status.py new file mode 100644 index 0000000..51d14b4 --- /dev/null +++ b/corellium/models/assessment_status.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssessmentStatus(str, Enum): + """ + Where the assessment is in its lifecycle. In the normal workflow, statuses ending in \"ing\" are temporary: background work moves the assessment on by itself, so poll `v3GetAssessmentById` to see the next status. (`v3PatchAssessment` can overwrite the status directly; do not use it to drive the workflow.) - `new`: created by `v3CreateAssessment`. Nothing is being watched yet. Next call: `v3StartMonitoring`. - `startingMonitoring`: MATRIX is attaching to the app. Moves to `monitoring` when ready, or `failed`. - `monitoring`: MATRIX is recording what the app does. Use the app on the device now (log in, open screens, enter data). Next call: `v3StopMonitoring`. - `stoppingMonitoring`: MATRIX is detaching and saving what it recorded. Moves to `readyForTesting`, or `failed`. - `readyForTesting`: recording is finished. Next call: `v3RunTests`. - `testing`: the security checks are running. Moves to `complete` or `failed`. - `complete`: the report is ready. You can download it and adjust its findings. - `failed`: the assessment stopped. It cannot be resumed; delete it and create a new one. See the `error` field. + """ + + """ + allowed enum values + """ + NEW = 'new' + STARTINGMONITORING = 'startingMonitoring' + MONITORING = 'monitoring' + STOPPINGMONITORING = 'stoppingMonitoring' + READYFORTESTING = 'readyForTesting' + TESTING = 'testing' + COMPLETE = 'complete' + FAILED = 'failed' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssessmentStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/assessment_wordlist.py b/corellium/models/assessment_wordlist.py new file mode 100644 index 0000000..486230e --- /dev/null +++ b/corellium/models/assessment_wordlist.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AssessmentWordlist(BaseModel): + """ + Wordlist used during the assessment, or null if none. + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the resource.") + name: StrictStr = Field(description="Name of the resource.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssessmentWordlist from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssessmentWordlist from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/attach_interface_body.py b/corellium/models/attach_interface_body.py new file mode 100644 index 0000000..eb3aa6b --- /dev/null +++ b/corellium/models/attach_interface_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AttachInterfaceBody(BaseModel): + """ + AttachInterfaceBody + """ # noqa: E501 + interface_id: StrictStr = Field(description="Which of the device's I/O interfaces to connect, for example `gpio/0`.", alias="interfaceId") + interconnect_id: StrictStr = Field(description="Interconnect identifier.", alias="interconnectId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interfaceId", "interconnectId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AttachInterfaceBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttachInterfaceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interfaceId": obj.get("interfaceId"), + "interconnectId": obj.get("interconnectId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/attach_interface_request.py b/corellium/models/attach_interface_request.py new file mode 100644 index 0000000..8e28ccd --- /dev/null +++ b/corellium/models/attach_interface_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AttachInterfaceRequest(BaseModel): + """ + + """ # noqa: E501 + interface_id: StrictStr = Field(description="Interface identifier", alias="interfaceId") + interconnect_id: StrictStr = Field(description="Interconnect identifier", alias="interconnectId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interfaceId", "interconnectId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AttachInterfaceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttachInterfaceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interfaceId": obj.get("interfaceId"), + "interconnectId": obj.get("interconnectId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/auth_provider.py b/corellium/models/auth_provider.py new file mode 100644 index 0000000..83374f8 --- /dev/null +++ b/corellium/models/auth_provider.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AuthProvider(BaseModel): + """ + AuthProvider + """ # noqa: E501 + identifier: StrictStr = Field(description="Provider identifier.") + provider_type: StrictStr = Field(description="Provider type (e.g. database, open-id-connect).", alias="providerType") + enabled: StrictBool = Field(description="Whether the provider is enabled.") + default: StrictBool = Field(description="Whether this is the default provider.") + label: Optional[StrictStr] = Field(description="Human-readable provider label.") + name: StrictStr = Field(description="Provider display name.") + authorization_url: StrictStr = Field(description="Relative authorization URL for the provider.", alias="authorizationUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "providerType", "enabled", "default", "label", "name", "authorizationUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthProvider from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "providerType": obj.get("providerType"), + "enabled": obj.get("enabled"), + "default": obj.get("default"), + "label": obj.get("label"), + "name": obj.get("name"), + "authorizationUrl": obj.get("authorizationUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/auth_provider_type.py b/corellium/models/auth_provider_type.py new file mode 100644 index 0000000..07200b9 --- /dev/null +++ b/corellium/models/auth_provider_type.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AuthProviderType(BaseModel): + """ + AuthProviderType + """ # noqa: E501 + provider_type: StrictStr = Field(description="Provider type identifier.", alias="providerType") + var_schema: Dict[str, Any] = Field(description="JSON Schema describing the provider configuration.", alias="schema") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["providerType", "schema"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthProviderType from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthProviderType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "schema": obj.get("schema") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/auth_provider_types_list_response.py b/corellium/models/auth_provider_types_list_response.py new file mode 100644 index 0000000..e7018c3 --- /dev/null +++ b/corellium/models/auth_provider_types_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.auth_provider_type import AuthProviderType +from typing import Optional, Set +from typing_extensions import Self + +class AuthProviderTypesListResponse(BaseModel): + """ + AuthProviderTypesListResponse + """ # noqa: E501 + results: List[AuthProviderType] = Field(description="Supported authentication provider types.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthProviderTypesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthProviderTypesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [AuthProviderType.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/auth_provider_v1.py b/corellium/models/auth_provider_v1.py new file mode 100644 index 0000000..b39ca25 --- /dev/null +++ b/corellium/models/auth_provider_v1.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AuthProviderV1(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Provider name for a given provider type") + identifier: Optional[StrictStr] = Field(default=None, description="The identifier for the provider") + provider_type: Optional[StrictStr] = Field(default=None, description="Provider type", alias="providerType") + default: Optional[StrictBool] = Field(default=None, description="Denotes whether it's the default") + label: Optional[StrictStr] = Field(default=None, description="Provider label") + enabled: Optional[StrictBool] = Field(default=None, description="Denotes whether they're enabled or not") + authorization_url: Optional[StrictStr] = Field(default=None, description="URL for provider auth", alias="authorizationUrl") + id: Optional[StrictStr] = Field(default=None, description="The identifier for the provider") + provider: Optional[StrictStr] = Field(default=None, description="Auth provider") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "identifier", "providerType", "default", "label", "enabled", "authorizationUrl", "id", "provider"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthProviderV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + # set to None if provider_type (nullable) is None + # and model_fields_set contains the field + if self.provider_type is None and "provider_type" in self.model_fields_set: + _dict['providerType'] = None + + # set to None if default (nullable) is None + # and model_fields_set contains the field + if self.default is None and "default" in self.model_fields_set: + _dict['default'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if authorization_url (nullable) is None + # and model_fields_set contains the field + if self.authorization_url is None and "authorization_url" in self.model_fields_set: + _dict['authorizationUrl'] = None + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if provider (nullable) is None + # and model_fields_set contains the field + if self.provider is None and "provider" in self.model_fields_set: + _dict['provider'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthProviderV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "identifier": obj.get("identifier"), + "providerType": obj.get("providerType"), + "default": obj.get("default"), + "label": obj.get("label"), + "enabled": obj.get("enabled"), + "authorizationUrl": obj.get("authorizationUrl"), + "id": obj.get("id"), + "provider": obj.get("provider") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/auth_providers_list_response.py b/corellium/models/auth_providers_list_response.py new file mode 100644 index 0000000..223236b --- /dev/null +++ b/corellium/models/auth_providers_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.auth_provider import AuthProvider +from typing import Optional, Set +from typing_extensions import Self + +class AuthProvidersListResponse(BaseModel): + """ + AuthProvidersListResponse + """ # noqa: E501 + results: List[AuthProvider] = Field(description="Configured authentication providers.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthProvidersListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthProvidersListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [AuthProvider.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/available_plans_list_response.py b/corellium/models/available_plans_list_response.py new file mode 100644 index 0000000..22faa8f --- /dev/null +++ b/corellium/models/available_plans_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.plan import Plan +from typing import Optional, Set +from typing_extensions import Self + +class AvailablePlansListResponse(BaseModel): + """ + AvailablePlansListResponse + """ # noqa: E501 + results: List[Plan] = Field(description="Available plans.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AvailablePlansListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AvailablePlansListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Plan.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/available_trial_plan.py b/corellium/models/available_trial_plan.py new file mode 100644 index 0000000..ab212a7 --- /dev/null +++ b/corellium/models/available_trial_plan.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AvailableTrialPlan(BaseModel): + """ + AvailableTrialPlan + """ # noqa: E501 + product_id: StrictStr = Field(description="Stripe product identifier.", alias="productId") + name: StrictStr = Field(description="Trial plan name.") + license: StrictStr = Field(description="License type.") + workspace: StrictBool = Field(description="Whether the trial includes a workspace.") + cores: StrictInt = Field(description="Number of cores included.") + devices: StrictInt = Field(description="Number of devices included.") + trial_duration: StrictInt = Field(description="Trial duration in days.", alias="trialDuration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["productId", "name", "license", "workspace", "cores", "devices", "trialDuration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AvailableTrialPlan from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AvailableTrialPlan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "productId": obj.get("productId"), + "name": obj.get("name"), + "license": obj.get("license"), + "workspace": obj.get("workspace"), + "cores": obj.get("cores"), + "devices": obj.get("devices"), + "trialDuration": obj.get("trialDuration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/available_trial_plan_list.py b/corellium/models/available_trial_plan_list.py new file mode 100644 index 0000000..0788128 --- /dev/null +++ b/corellium/models/available_trial_plan_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.available_trial_plan import AvailableTrialPlan +from typing import Optional, Set +from typing_extensions import Self + +class AvailableTrialPlanList(BaseModel): + """ + AvailableTrialPlanList + """ # noqa: E501 + results: List[AvailableTrialPlan] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AvailableTrialPlanList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AvailableTrialPlanList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [AvailableTrialPlan.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/aws_create_response.py b/corellium/models/aws_create_response.py new file mode 100644 index 0000000..61ae4c4 --- /dev/null +++ b/corellium/models/aws_create_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AwsCreateResponse(BaseModel): + """ + AwsCreateResponse + """ # noqa: E501 + ready: StrictBool = Field(description="Whether the account is ready.") + is_authed: StrictBool = Field(description="Whether the user is authenticated.", alias="isAuthed") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ready", "isAuthed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AwsCreateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AwsCreateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ready": obj.get("ready"), + "isAuthed": obj.get("isAuthed") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/billing_line_item.py b/corellium/models/billing_line_item.py new file mode 100644 index 0000000..9af6269 --- /dev/null +++ b/corellium/models/billing_line_item.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class BillingLineItem(BaseModel): + """ + BillingLineItem + """ # noqa: E501 + type: StrictStr = Field(description="Usage category name.") + name: StrictStr = Field(description="Line item name.") + short_name: StrictStr = Field(description="Short line item name.", alias="shortName") + description: StrictStr = Field(description="Line item description. May be empty.") + quantity: Union[StrictFloat, StrictInt] = Field(description="Units used.") + unit_cost: Union[StrictFloat, StrictInt] = Field(description="Cost per unit.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "name", "shortName", "description", "quantity", "unit_cost"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BillingLineItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BillingLineItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "shortName": obj.get("shortName"), + "description": obj.get("description"), + "quantity": obj.get("quantity"), + "unit_cost": obj.get("unit_cost") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/billing_summary.py b/corellium/models/billing_summary.py new file mode 100644 index 0000000..0cc8536 --- /dev/null +++ b/corellium/models/billing_summary.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.billing_summary_pending_usage_based import BillingSummaryPendingUsageBased +from typing import Optional, Set +from typing_extensions import Self + +class BillingSummary(BaseModel): + """ + BillingSummary + """ # noqa: E501 + pending_usage_based: Optional[BillingSummaryPendingUsageBased] = Field(alias="pendingUsageBased") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["pendingUsageBased"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BillingSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pending_usage_based + if self.pending_usage_based: + _dict['pendingUsageBased'] = self.pending_usage_based.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if pending_usage_based (nullable) is None + # and model_fields_set contains the field + if self.pending_usage_based is None and "pending_usage_based" in self.model_fields_set: + _dict['pendingUsageBased'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BillingSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pendingUsageBased": BillingSummaryPendingUsageBased.from_dict(obj["pendingUsageBased"]) if obj.get("pendingUsageBased") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/billing_summary_pending_usage_based.py b/corellium/models/billing_summary_pending_usage_based.py new file mode 100644 index 0000000..888845d --- /dev/null +++ b/corellium/models/billing_summary_pending_usage_based.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from corellium.models.billing_line_item import BillingLineItem +from typing import Optional, Set +from typing_extensions import Self + +class BillingSummaryPendingUsageBased(BaseModel): + """ + Pending usage-based bill report. Null unless the domain bills by usage. + """ # noqa: E501 + last_bill_date: Union[StrictFloat, StrictInt] = Field(description="Last bill unix timestamp (ms).", alias="lastBillDate") + next_bill_date: Union[StrictFloat, StrictInt] = Field(description="Next bill unix timestamp (ms).", alias="nextBillDate") + billing_threshold: Union[StrictFloat, StrictInt] = Field(description="Dollar threshold that triggers a usage bill.", alias="billingThreshold") + total: StrictStr = Field(description="Pending total in dollars, as a fixed two-decimal string.") + line_items: List[BillingLineItem] = Field(description="Pending usage line items. May be empty.", alias="lineItems") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["lastBillDate", "nextBillDate", "billingThreshold", "total", "lineItems"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BillingSummaryPendingUsageBased from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in line_items (list) + _items = [] + if self.line_items: + for _item_line_items in self.line_items: + if _item_line_items: + _items.append(_item_line_items.to_dict()) + _dict['lineItems'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BillingSummaryPendingUsageBased from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lastBillDate": obj.get("lastBillDate"), + "nextBillDate": obj.get("nextBillDate"), + "billingThreshold": obj.get("billingThreshold"), + "total": obj.get("total"), + "lineItems": [BillingLineItem.from_dict(_item) for _item in obj["lineItems"]] if obj.get("lineItems") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/bit.py b/corellium/models/bit.py new file mode 100644 index 0000000..0226f8b --- /dev/null +++ b/corellium/models/bit.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class Bit(int, Enum): + """ + Bit value + """ + + """ + allowed enum values + """ + NUMBER_0 = 0 + NUMBER_1 = 1 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Bit from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/btrace_enable_options.py b/corellium/models/btrace_enable_options.py new file mode 100644 index 0000000..421887f --- /dev/null +++ b/corellium/models/btrace_enable_options.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BtraceEnableOptions(BaseModel): + """ + + """ # noqa: E501 + ranges: Optional[List[List[StrictStr]]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ranges"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BtraceEnableOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if ranges (nullable) is None + # and model_fields_set contains the field + if self.ranges is None and "ranges" in self.model_fields_set: + _dict['ranges'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BtraceEnableOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ranges": obj.get("ranges") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/button.py b/corellium/models/button.py new file mode 100644 index 0000000..c3d0daf --- /dev/null +++ b/corellium/models/button.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class Button(str, Enum): + """ + Button definition + """ + + """ + allowed enum values + """ + FINGER = 'finger' + HOMEBUTTON = 'homeButton' + HOLDBUTTON = 'holdButton' + VOLUMEUP = 'volumeUp' + VOLUMEDOWN = 'volumeDown' + BACKBUTTON = 'backButton' + OVERVIEWBUTTON = 'overviewButton' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Button from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/cancel_subscription_body.py b/corellium/models/cancel_subscription_body.py new file mode 100644 index 0000000..e0b4d2e --- /dev/null +++ b/corellium/models/cancel_subscription_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CancelSubscriptionBody(BaseModel): + """ + CancelSubscriptionBody + """ # noqa: E501 + domain_id: Optional[StrictStr] = Field(default=None, description="Domain to cancel (defaults to the caller domain).", alias="domainId") + delete_domain: Optional[StrictBool] = Field(default=None, description="Delete the domain as part of cancellation.", alias="deleteDomain") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domainId", "deleteDomain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CancelSubscriptionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CancelSubscriptionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainId": obj.get("domainId"), + "deleteDomain": obj.get("deleteDomain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/change_password_body.py b/corellium/models/change_password_body.py new file mode 100644 index 0000000..ffff82d --- /dev/null +++ b/corellium/models/change_password_body.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ChangePasswordBody(BaseModel): + """ + ChangePasswordBody + """ # noqa: E501 + user: StrictStr = Field(description="User identifier.") + old_password: StrictStr = Field(description="Current password.", alias="oldPassword") + new_password: StrictStr = Field(description="New password.", alias="newPassword") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user", "oldPassword", "newPassword"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangePasswordBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangePasswordBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": obj.get("user"), + "oldPassword": obj.get("oldPassword"), + "newPassword": obj.get("newPassword") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/charm_tag.py b/corellium/models/charm_tag.py new file mode 100644 index 0000000..5e020a9 --- /dev/null +++ b/corellium/models/charm_tag.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class CharmTag(str, Enum): + """ + A valid charm boot tag. + """ + + """ + allowed enum values + """ + KALLOC = 'kalloc' + GPU = 'gpu' + NO_MINUS_KEYBOARD = 'no-keyboard' + NODEVMODE = 'nodevmode' + SEP_MINUS_CONS_MINUS_EXT = 'sep-cons-ext' + IBOOT_MINUS_JAILBREAK = 'iboot-jailbreak' + LLB_MINUS_JAILBREAK = 'llb-jailbreak' + ROM_MINUS_JAILBREAK = 'rom-jailbreak' + NOAPPASLR = 'noappaslr' + NODYLDASLR = 'nodyldaslr' + OBJDETECT = 'objdetect' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CharmTag from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/check_subdomain_response.py b/corellium/models/check_subdomain_response.py new file mode 100644 index 0000000..be6b3fa --- /dev/null +++ b/corellium/models/check_subdomain_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CheckSubdomainResponse(BaseModel): + """ + CheckSubdomainResponse + """ # noqa: E501 + available: StrictBool = Field(description="Whether the subdomain is available.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["available"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckSubdomainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckSubdomainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "available": obj.get("available") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/check_subdomain_response_v1.py b/corellium/models/check_subdomain_response_v1.py new file mode 100644 index 0000000..6a206bc --- /dev/null +++ b/corellium/models/check_subdomain_response_v1.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CheckSubdomainResponseV1(BaseModel): + """ + + """ # noqa: E501 + available: StrictBool = Field(description="Indicates whether the subdomain is available or not") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["available"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CheckSubdomainResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CheckSubdomainResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "available": obj.get("available") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cloud_notification_item.py b/corellium/models/cloud_notification_item.py new file mode 100644 index 0000000..e501546 --- /dev/null +++ b/corellium/models/cloud_notification_item.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CloudNotificationItem(BaseModel): + """ + CloudNotificationItem + """ # noqa: E501 + identifier: StrictStr = Field(description="Notification identifier.") + admin_only: StrictBool = Field(description="Whether the notification is admin-only.", alias="adminOnly") + quiet: StrictBool = Field(description="Whether the notification is quiet.") + scope: StrictStr = Field(description="Notification scope.") + level: StrictInt = Field(description="Alert level.") + title: StrictStr = Field(description="Notification title.") + message: StrictStr = Field(description="Notification message.") + metadata: Optional[Dict[str, Any]] = Field(description="Additional metadata.") + created_at: datetime = Field(description="ISO timestamp of creation.", alias="createdAt") + updated_at: datetime = Field(description="ISO timestamp of last update.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "adminOnly", "quiet", "scope", "level", "title", "message", "metadata", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CloudNotificationItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CloudNotificationItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "adminOnly": obj.get("adminOnly"), + "quiet": obj.get("quiet"), + "scope": obj.get("scope"), + "level": obj.get("level"), + "title": obj.get("title"), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cloud_notification_list.py b/corellium/models/cloud_notification_list.py new file mode 100644 index 0000000..02aca93 --- /dev/null +++ b/corellium/models/cloud_notification_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.cloud_notification_item import CloudNotificationItem +from typing import Optional, Set +from typing_extensions import Self + +class CloudNotificationList(BaseModel): + """ + CloudNotificationList + """ # noqa: E501 + results: List[CloudNotificationItem] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CloudNotificationList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CloudNotificationList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [CloudNotificationItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config.py b/corellium/models/cluster_config.py new file mode 100644 index 0000000..6f60a5b --- /dev/null +++ b/corellium/models/cluster_config.py @@ -0,0 +1,308 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.ai_tools_config import AiToolsConfig +from corellium.models.cluster_config_coordinator_config import ClusterConfigCoordinatorConfig +from corellium.models.cluster_config_coordinator_config_auth_providers_inner import ClusterConfigCoordinatorConfigAuthProvidersInner +from corellium.models.cluster_config_firmware_service_config import ClusterConfigFirmwareServiceConfig +from corellium.models.cluster_config_ipsw_filters_inner import ClusterConfigIpswFiltersInner +from corellium.models.cluster_config_maintenance import ClusterConfigMaintenance +from corellium.models.cluster_config_net_mon_ca import ClusterConfigNetMonCA +from corellium.models.cluster_config_node_specific_config import ClusterConfigNodeSpecificConfig +from corellium.models.cluster_config_package_config import ClusterConfigPackageConfig +from corellium.models.cluster_config_setup_config import ClusterConfigSetupConfig +from corellium.models.cluster_config_stripe import ClusterConfigStripe +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfig(BaseModel): + """ + ClusterConfig + """ # noqa: E501 + last_config_keys: List[StrictStr] = Field(alias="lastConfigKeys") + local_ip: StrictStr = Field(alias="localIp") + ip_block_netmask: StrictStr = Field(alias="ipBlockNetmask") + instance_gateway: StrictStr = Field(alias="instanceGateway") + instance_dns_servers: Optional[List[StrictStr]] = Field(default=None, alias="instanceDNSServers") + coordinator: Optional[StrictStr] = None + on_site: Optional[StrictBool] = Field(default=None, alias="onSite") + cloud_provider: Optional[StrictStr] = Field(alias="cloudProvider") + network_types: List[StrictStr] = Field(alias="networkTypes") + network_type: Optional[StrictStr] = Field(default=None, alias="networkType") + show_domain_settings: Optional[StrictBool] = Field(default=None, alias="showDomainSettings") + version: Optional[StrictStr] = None + ipsw_url: Optional[StrictStr] = Field(default=None, alias="ipswUrl") + coreimg_url: Optional[StrictStr] = Field(default=None, alias="coreimgUrl") + fw_service_url: Optional[StrictStr] = Field(default=None, alias="fwServiceUrl") + service_password: Optional[StrictStr] = Field(default=None, alias="servicePassword") + invalid_build: Optional[StrictBool] = Field(default=None, alias="invalidBuild") + sep_sim: Optional[StrictBool] = Field(default=None, alias="sepSim") + installer_available: Optional[StrictBool] = Field(default=None, alias="installerAvailable") + stripe: Optional[ClusterConfigStripe] = None + intercom_id: Optional[StrictStr] = Field(default=None, alias="intercomId") + aux_webhook: Optional[StrictStr] = Field(default=None, alias="auxWebhook") + gtm_id: Optional[StrictStr] = Field(default=None, alias="gtmId") + zapier_feedback_webhook: Optional[StrictStr] = Field(default=None, alias="zapierFeedbackWebhook") + zapier_bugs_webhook: Optional[StrictStr] = Field(default=None, alias="zapierBugsWebhook") + billing_backend: Optional[StrictStr] = Field(default=None, alias="billingBackend") + maintenance: Optional[ClusterConfigMaintenance] = None + cloud_domain: Optional[StrictStr] = Field(default=None, alias="cloudDomain") + development: Optional[StrictBool] = None + billing_domain: Optional[StrictStr] = Field(default=None, alias="billingDomain") + app_domain: Optional[StrictStr] = Field(default=None, alias="appDomain") + enable_firmware_image_upload: Optional[StrictBool] = Field(default=None, alias="enableFirmwareImageUpload") + net_mon_ca: Optional[ClusterConfigNetMonCA] = Field(default=None, alias="netMonCA") + snapshot_limit: Optional[StrictInt] = Field(default=None, alias="snapshotLimit") + max_kernel_size: Union[StrictFloat, StrictInt] = Field(alias="maxKernelSize") + max_ramdisk_size: Union[StrictFloat, StrictInt] = Field(alias="maxRamdiskSize") + charm_sdk: Optional[StrictBool] = Field(default=None, alias="charmSDK") + sentry_url: Optional[StrictStr] = Field(default=None, alias="sentryUrl") + remote_gpu: Optional[StrictBool] = Field(default=None, alias="remoteGpu") + rate_limit: Optional[StrictBool] = Field(default=None, alias="rateLimit") + cert_file_data: Optional[StrictStr] = Field(default=None, alias="certFileData") + ca_cert_file_src: StrictStr = Field(alias="caCertFileSrc") + vstrm_on_compute_nodes: Optional[StrictBool] = Field(default=None, alias="vstrmOnComputeNodes") + charm: Optional[Dict[str, Any]] = None + c3po_path_prefix: Optional[StrictStr] = Field(default=None, alias="c3poPathPrefix") + branding: StrictStr + open_g_apps_binary: StrictStr = Field(alias="openGAppsBinary") + airgapped: StrictBool + node_stale_timeout: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="nodeStaleTimeout") + report_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="reportInterval") + coordinator_config: Optional[ClusterConfigCoordinatorConfig] = Field(default=None, alias="coordinatorConfig") + setup_config: Optional[ClusterConfigSetupConfig] = Field(default=None, alias="setupConfig") + node_specific_config: Optional[ClusterConfigNodeSpecificConfig] = Field(default=None, alias="nodeSpecificConfig") + package_config: Optional[ClusterConfigPackageConfig] = Field(default=None, alias="packageConfig") + monitor_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="monitorInterval") + csp: Optional[StrictBool] = None + cdk: Optional[StrictBool] = None + charm_extension_paths: Optional[List[StrictStr]] = Field(default=None, alias="charmExtensionPaths") + firmware_cache: Optional[StrictStr] = Field(default=None, alias="firmwareCache") + vstrm: Optional[StrictStr] = None + console: Optional[StrictStr] = None + fetch_firmware_assets: Optional[StrictBool] = Field(default=None, alias="fetchFirmwareAssets") + cluster_firmware_assets: Optional[StrictBool] = Field(default=None, alias="clusterFirmwareAssets") + auth_providers: Optional[List[ClusterConfigCoordinatorConfigAuthProvidersInner]] = Field(default=None, alias="authProviders") + domain: Optional[StrictStr] = None + service_domain: Optional[StrictStr] = Field(default=None, alias="serviceDomain") + service_user: Optional[StrictStr] = Field(default=None, alias="serviceUser") + domain_image_upload_quota: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="domainImageUploadQuota") + ipsw_filters: Optional[List[ClusterConfigIpswFiltersInner]] = Field(default=None, alias="ipswFilters") + firmware_service_config: Optional[ClusterConfigFirmwareServiceConfig] = Field(default=None, alias="firmwareServiceConfig") + ai_tools_config: AiToolsConfig = Field(alias="aiToolsConfig") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["lastConfigKeys", "localIp", "ipBlockNetmask", "instanceGateway", "instanceDNSServers", "coordinator", "onSite", "cloudProvider", "networkTypes", "networkType", "showDomainSettings", "version", "ipswUrl", "coreimgUrl", "fwServiceUrl", "servicePassword", "invalidBuild", "sepSim", "installerAvailable", "stripe", "intercomId", "auxWebhook", "gtmId", "zapierFeedbackWebhook", "zapierBugsWebhook", "billingBackend", "maintenance", "cloudDomain", "development", "billingDomain", "appDomain", "enableFirmwareImageUpload", "netMonCA", "snapshotLimit", "maxKernelSize", "maxRamdiskSize", "charmSDK", "sentryUrl", "remoteGpu", "rateLimit", "certFileData", "caCertFileSrc", "vstrmOnComputeNodes", "charm", "c3poPathPrefix", "branding", "openGAppsBinary", "airgapped", "nodeStaleTimeout", "reportInterval", "coordinatorConfig", "setupConfig", "nodeSpecificConfig", "packageConfig", "monitorInterval", "csp", "cdk", "charmExtensionPaths", "firmwareCache", "vstrm", "console", "fetchFirmwareAssets", "clusterFirmwareAssets", "authProviders", "domain", "serviceDomain", "serviceUser", "domainImageUploadQuota", "ipswFilters", "firmwareServiceConfig", "aiToolsConfig"] + + @field_validator('network_type') + def network_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['bridged', 'nat', 'routed']): + raise ValueError("must be one of enum values ('bridged', 'nat', 'routed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of stripe + if self.stripe: + _dict['stripe'] = self.stripe.to_dict() + # override the default output from pydantic by calling `to_dict()` of maintenance + if self.maintenance: + _dict['maintenance'] = self.maintenance.to_dict() + # override the default output from pydantic by calling `to_dict()` of net_mon_ca + if self.net_mon_ca: + _dict['netMonCA'] = self.net_mon_ca.to_dict() + # override the default output from pydantic by calling `to_dict()` of coordinator_config + if self.coordinator_config: + _dict['coordinatorConfig'] = self.coordinator_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of setup_config + if self.setup_config: + _dict['setupConfig'] = self.setup_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of node_specific_config + if self.node_specific_config: + _dict['nodeSpecificConfig'] = self.node_specific_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of package_config + if self.package_config: + _dict['packageConfig'] = self.package_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in auth_providers (list) + _items = [] + if self.auth_providers: + for _item_auth_providers in self.auth_providers: + if _item_auth_providers: + _items.append(_item_auth_providers.to_dict()) + _dict['authProviders'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in ipsw_filters (list) + _items = [] + if self.ipsw_filters: + for _item_ipsw_filters in self.ipsw_filters: + if _item_ipsw_filters: + _items.append(_item_ipsw_filters.to_dict()) + _dict['ipswFilters'] = _items + # override the default output from pydantic by calling `to_dict()` of firmware_service_config + if self.firmware_service_config: + _dict['firmwareServiceConfig'] = self.firmware_service_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of ai_tools_config + if self.ai_tools_config: + _dict['aiToolsConfig'] = self.ai_tools_config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cloud_provider (nullable) is None + # and model_fields_set contains the field + if self.cloud_provider is None and "cloud_provider" in self.model_fields_set: + _dict['cloudProvider'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lastConfigKeys": obj.get("lastConfigKeys"), + "localIp": obj.get("localIp"), + "ipBlockNetmask": obj.get("ipBlockNetmask"), + "instanceGateway": obj.get("instanceGateway"), + "instanceDNSServers": obj.get("instanceDNSServers"), + "coordinator": obj.get("coordinator"), + "onSite": obj.get("onSite"), + "cloudProvider": obj.get("cloudProvider"), + "networkTypes": obj.get("networkTypes"), + "networkType": obj.get("networkType"), + "showDomainSettings": obj.get("showDomainSettings"), + "version": obj.get("version"), + "ipswUrl": obj.get("ipswUrl"), + "coreimgUrl": obj.get("coreimgUrl"), + "fwServiceUrl": obj.get("fwServiceUrl"), + "servicePassword": obj.get("servicePassword"), + "invalidBuild": obj.get("invalidBuild"), + "sepSim": obj.get("sepSim"), + "installerAvailable": obj.get("installerAvailable"), + "stripe": ClusterConfigStripe.from_dict(obj["stripe"]) if obj.get("stripe") is not None else None, + "intercomId": obj.get("intercomId"), + "auxWebhook": obj.get("auxWebhook"), + "gtmId": obj.get("gtmId"), + "zapierFeedbackWebhook": obj.get("zapierFeedbackWebhook"), + "zapierBugsWebhook": obj.get("zapierBugsWebhook"), + "billingBackend": obj.get("billingBackend"), + "maintenance": ClusterConfigMaintenance.from_dict(obj["maintenance"]) if obj.get("maintenance") is not None else None, + "cloudDomain": obj.get("cloudDomain"), + "development": obj.get("development"), + "billingDomain": obj.get("billingDomain"), + "appDomain": obj.get("appDomain"), + "enableFirmwareImageUpload": obj.get("enableFirmwareImageUpload"), + "netMonCA": ClusterConfigNetMonCA.from_dict(obj["netMonCA"]) if obj.get("netMonCA") is not None else None, + "snapshotLimit": obj.get("snapshotLimit"), + "maxKernelSize": obj.get("maxKernelSize"), + "maxRamdiskSize": obj.get("maxRamdiskSize"), + "charmSDK": obj.get("charmSDK"), + "sentryUrl": obj.get("sentryUrl"), + "remoteGpu": obj.get("remoteGpu"), + "rateLimit": obj.get("rateLimit"), + "certFileData": obj.get("certFileData"), + "caCertFileSrc": obj.get("caCertFileSrc"), + "vstrmOnComputeNodes": obj.get("vstrmOnComputeNodes"), + "charm": obj.get("charm"), + "c3poPathPrefix": obj.get("c3poPathPrefix"), + "branding": obj.get("branding"), + "openGAppsBinary": obj.get("openGAppsBinary"), + "airgapped": obj.get("airgapped"), + "nodeStaleTimeout": obj.get("nodeStaleTimeout"), + "reportInterval": obj.get("reportInterval"), + "coordinatorConfig": ClusterConfigCoordinatorConfig.from_dict(obj["coordinatorConfig"]) if obj.get("coordinatorConfig") is not None else None, + "setupConfig": ClusterConfigSetupConfig.from_dict(obj["setupConfig"]) if obj.get("setupConfig") is not None else None, + "nodeSpecificConfig": ClusterConfigNodeSpecificConfig.from_dict(obj["nodeSpecificConfig"]) if obj.get("nodeSpecificConfig") is not None else None, + "packageConfig": ClusterConfigPackageConfig.from_dict(obj["packageConfig"]) if obj.get("packageConfig") is not None else None, + "monitorInterval": obj.get("monitorInterval"), + "csp": obj.get("csp"), + "cdk": obj.get("cdk"), + "charmExtensionPaths": obj.get("charmExtensionPaths"), + "firmwareCache": obj.get("firmwareCache"), + "vstrm": obj.get("vstrm"), + "console": obj.get("console"), + "fetchFirmwareAssets": obj.get("fetchFirmwareAssets"), + "clusterFirmwareAssets": obj.get("clusterFirmwareAssets"), + "authProviders": [ClusterConfigCoordinatorConfigAuthProvidersInner.from_dict(_item) for _item in obj["authProviders"]] if obj.get("authProviders") is not None else None, + "domain": obj.get("domain"), + "serviceDomain": obj.get("serviceDomain"), + "serviceUser": obj.get("serviceUser"), + "domainImageUploadQuota": obj.get("domainImageUploadQuota"), + "ipswFilters": [ClusterConfigIpswFiltersInner.from_dict(_item) for _item in obj["ipswFilters"]] if obj.get("ipswFilters") is not None else None, + "firmwareServiceConfig": ClusterConfigFirmwareServiceConfig.from_dict(obj["firmwareServiceConfig"]) if obj.get("firmwareServiceConfig") is not None else None, + "aiToolsConfig": AiToolsConfig.from_dict(obj["aiToolsConfig"]) if obj.get("aiToolsConfig") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config.py b/corellium/models/cluster_config_coordinator_config.py new file mode 100644 index 0000000..f1316f3 --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.cluster_config_coordinator_config_auth_providers_inner import ClusterConfigCoordinatorConfigAuthProvidersInner +from corellium.models.cluster_config_coordinator_config_aws_marketplace import ClusterConfigCoordinatorConfigAwsMarketplace +from corellium.models.cluster_config_coordinator_config_ensure_domain import ClusterConfigCoordinatorConfigEnsureDomain +from corellium.models.cluster_config_coordinator_config_hubspot import ClusterConfigCoordinatorConfigHubspot +from corellium.models.cluster_config_coordinator_config_hypertune import ClusterConfigCoordinatorConfigHypertune +from corellium.models.cluster_config_coordinator_config_pipedrive import ClusterConfigCoordinatorConfigPipedrive +from corellium.models.cluster_config_coordinator_config_trial import ClusterConfigCoordinatorConfigTrial +from corellium.models.cluster_config_coordinator_config_webplayer import ClusterConfigCoordinatorConfigWebplayer +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfig(BaseModel): + """ + ClusterConfigCoordinatorConfig + """ # noqa: E501 + bind_host: StrictStr = Field(alias="bindHost") + bind_port: Union[StrictFloat, StrictInt] = Field(alias="bindPort") + db_database: StrictStr = Field(alias="dbDatabase") + db_host: StrictStr = Field(alias="dbHost") + db_port: Union[StrictFloat, StrictInt] = Field(alias="dbPort") + db_password: StrictStr = Field(alias="dbPassword") + db_user: StrictStr = Field(alias="dbUser") + db_logging_enabled: StrictBool = Field(alias="dbLoggingEnabled") + config_db_host: Optional[StrictStr] = Field(default=None, alias="configDbHost") + config_db_port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="configDbPort") + config_db_user: Optional[StrictStr] = Field(default=None, alias="configDbUser") + config_db_password: Optional[StrictStr] = Field(default=None, alias="configDbPassword") + config_db_name: Optional[StrictStr] = Field(default=None, alias="configDbName") + ip_block: StrictStr = Field(alias="ipBlock") + local_ip: StrictStr = Field(alias="localIp") + ip_block_netmask: StrictStr = Field(alias="ipBlockNetmask") + instance_dns_servers: Optional[List[StrictStr]] = Field(default=None, alias="instanceDNSServers") + on_site: StrictBool = Field(alias="onSite") + private_headers: List[StrictStr] = Field(alias="privateHeaders") + trial: Optional[ClusterConfigCoordinatorConfigTrial] = None + trial_survey_id: StrictStr = Field(alias="trialSurveyId") + auth_providers: Optional[List[ClusterConfigCoordinatorConfigAuthProvidersInner]] = Field(default=None, alias="authProviders") + per_project_storage_quota: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="perProjectStorageQuota") + image_data_path: Optional[StrictStr] = Field(default=None, alias="imageDataPath") + ensure_domain: Optional[ClusterConfigCoordinatorConfigEnsureDomain] = Field(default=None, alias="ensureDomain") + hubspot: Optional[ClusterConfigCoordinatorConfigHubspot] = None + nexus_url: Optional[StrictStr] = Field(default=None, alias="nexusUrl") + billing_trade_credit_days: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="billingTradeCreditDays") + jwt_token_expiration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="jwtTokenExpiration") + hypertune: Optional[ClusterConfigCoordinatorConfigHypertune] = None + aws_marketplace: Optional[ClusterConfigCoordinatorConfigAwsMarketplace] = Field(default=None, alias="awsMarketplace") + pipedrive: Optional[ClusterConfigCoordinatorConfigPipedrive] = None + webplayer: Optional[ClusterConfigCoordinatorConfigWebplayer] = None + postmark_server_token: Optional[StrictStr] = Field(default=None, alias="postmarkServerToken") + postmark_email_from: Optional[StrictStr] = Field(default=None, alias="postmarkEmailFrom") + postmark_email_template: Optional[StrictStr] = Field(default=None, alias="postmarkEmailTemplate") + s3: Optional[Dict[str, StrictStr]] = None + ofac_api_key: Optional[StrictStr] = Field(default=None, alias="ofacApiKey") + usb_media_queue_dir: Optional[StrictStr] = Field(default=None, alias="usbMediaQueueDir") + usb_media_access_enabled: Optional[StrictBool] = Field(default=None, alias="usbMediaAccessEnabled") + intercom_id_verify_secret: Optional[StrictStr] = Field(default=None, alias="intercomIdVerifySecret") + fvp_secret: Optional[StrictStr] = Field(default=None, alias="fvpSecret") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bindHost", "bindPort", "dbDatabase", "dbHost", "dbPort", "dbPassword", "dbUser", "dbLoggingEnabled", "configDbHost", "configDbPort", "configDbUser", "configDbPassword", "configDbName", "ipBlock", "localIp", "ipBlockNetmask", "instanceDNSServers", "onSite", "privateHeaders", "trial", "trialSurveyId", "authProviders", "perProjectStorageQuota", "imageDataPath", "ensureDomain", "hubspot", "nexusUrl", "billingTradeCreditDays", "jwtTokenExpiration", "hypertune", "awsMarketplace", "pipedrive", "webplayer", "postmarkServerToken", "postmarkEmailFrom", "postmarkEmailTemplate", "s3", "ofacApiKey", "usbMediaQueueDir", "usbMediaAccessEnabled", "intercomIdVerifySecret", "fvpSecret"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trial + if self.trial: + _dict['trial'] = self.trial.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in auth_providers (list) + _items = [] + if self.auth_providers: + for _item_auth_providers in self.auth_providers: + if _item_auth_providers: + _items.append(_item_auth_providers.to_dict()) + _dict['authProviders'] = _items + # override the default output from pydantic by calling `to_dict()` of ensure_domain + if self.ensure_domain: + _dict['ensureDomain'] = self.ensure_domain.to_dict() + # override the default output from pydantic by calling `to_dict()` of hubspot + if self.hubspot: + _dict['hubspot'] = self.hubspot.to_dict() + # override the default output from pydantic by calling `to_dict()` of hypertune + if self.hypertune: + _dict['hypertune'] = self.hypertune.to_dict() + # override the default output from pydantic by calling `to_dict()` of aws_marketplace + if self.aws_marketplace: + _dict['awsMarketplace'] = self.aws_marketplace.to_dict() + # override the default output from pydantic by calling `to_dict()` of pipedrive + if self.pipedrive: + _dict['pipedrive'] = self.pipedrive.to_dict() + # override the default output from pydantic by calling `to_dict()` of webplayer + if self.webplayer: + _dict['webplayer'] = self.webplayer.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bindHost": obj.get("bindHost"), + "bindPort": obj.get("bindPort"), + "dbDatabase": obj.get("dbDatabase"), + "dbHost": obj.get("dbHost"), + "dbPort": obj.get("dbPort"), + "dbPassword": obj.get("dbPassword"), + "dbUser": obj.get("dbUser"), + "dbLoggingEnabled": obj.get("dbLoggingEnabled"), + "configDbHost": obj.get("configDbHost"), + "configDbPort": obj.get("configDbPort"), + "configDbUser": obj.get("configDbUser"), + "configDbPassword": obj.get("configDbPassword"), + "configDbName": obj.get("configDbName"), + "ipBlock": obj.get("ipBlock"), + "localIp": obj.get("localIp"), + "ipBlockNetmask": obj.get("ipBlockNetmask"), + "instanceDNSServers": obj.get("instanceDNSServers"), + "onSite": obj.get("onSite"), + "privateHeaders": obj.get("privateHeaders"), + "trial": ClusterConfigCoordinatorConfigTrial.from_dict(obj["trial"]) if obj.get("trial") is not None else None, + "trialSurveyId": obj.get("trialSurveyId"), + "authProviders": [ClusterConfigCoordinatorConfigAuthProvidersInner.from_dict(_item) for _item in obj["authProviders"]] if obj.get("authProviders") is not None else None, + "perProjectStorageQuota": obj.get("perProjectStorageQuota"), + "imageDataPath": obj.get("imageDataPath"), + "ensureDomain": ClusterConfigCoordinatorConfigEnsureDomain.from_dict(obj["ensureDomain"]) if obj.get("ensureDomain") is not None else None, + "hubspot": ClusterConfigCoordinatorConfigHubspot.from_dict(obj["hubspot"]) if obj.get("hubspot") is not None else None, + "nexusUrl": obj.get("nexusUrl"), + "billingTradeCreditDays": obj.get("billingTradeCreditDays"), + "jwtTokenExpiration": obj.get("jwtTokenExpiration"), + "hypertune": ClusterConfigCoordinatorConfigHypertune.from_dict(obj["hypertune"]) if obj.get("hypertune") is not None else None, + "awsMarketplace": ClusterConfigCoordinatorConfigAwsMarketplace.from_dict(obj["awsMarketplace"]) if obj.get("awsMarketplace") is not None else None, + "pipedrive": ClusterConfigCoordinatorConfigPipedrive.from_dict(obj["pipedrive"]) if obj.get("pipedrive") is not None else None, + "webplayer": ClusterConfigCoordinatorConfigWebplayer.from_dict(obj["webplayer"]) if obj.get("webplayer") is not None else None, + "postmarkServerToken": obj.get("postmarkServerToken"), + "postmarkEmailFrom": obj.get("postmarkEmailFrom"), + "postmarkEmailTemplate": obj.get("postmarkEmailTemplate"), + "s3": obj.get("s3"), + "ofacApiKey": obj.get("ofacApiKey"), + "usbMediaQueueDir": obj.get("usbMediaQueueDir"), + "usbMediaAccessEnabled": obj.get("usbMediaAccessEnabled"), + "intercomIdVerifySecret": obj.get("intercomIdVerifySecret"), + "fvpSecret": obj.get("fvpSecret") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_auth_providers_inner.py b/corellium/models/cluster_config_coordinator_config_auth_providers_inner.py new file mode 100644 index 0000000..9cb1039 --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_auth_providers_inner.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of1 import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +CLUSTERCONFIGCOORDINATORCONFIGAUTHPROVIDERSINNER_ANY_OF_SCHEMAS = ["ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf", "ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1"] + +class ClusterConfigCoordinatorConfigAuthProvidersInner(BaseModel): + """ + ClusterConfigCoordinatorConfigAuthProvidersInner + """ + + # data type: ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf + anyof_schema_1_validator: Optional[ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf] = None + # data type: ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 + anyof_schema_2_validator: Optional[ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf, ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf", "ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = ClusterConfigCoordinatorConfigAuthProvidersInner.model_construct() + error_messages = [] + # validate data type: ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf + if not isinstance(v, ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf): + error_messages.append(f"Error! Input type `{type(v)}` is not `ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf`") + else: + return v + + # validate data type: ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 + if not isinstance(v, ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1): + error_messages.append(f"Error! Input type `{type(v)}` is not `ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ClusterConfigCoordinatorConfigAuthProvidersInner with anyOf schemas: ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf, ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf] = None + try: + instance.actual_instance = ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1] = None + try: + instance.actual_instance = ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ClusterConfigCoordinatorConfigAuthProvidersInner with anyOf schemas: ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf, ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf, ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/cluster_config_coordinator_config_auth_providers_inner_any_of.py b/corellium/models/cluster_config_coordinator_config_auth_providers_inner_any_of.py new file mode 100644 index 0000000..8a0596e --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_auth_providers_inner_any_of.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf(BaseModel): + """ + ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf + """ # noqa: E501 + provider: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["provider"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "provider": obj.get("provider") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_auth_providers_inner_any_of1.py b/corellium/models/cluster_config_coordinator_config_auth_providers_inner_any_of1.py new file mode 100644 index 0000000..0691883 --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_auth_providers_inner_any_of1.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1(BaseModel): + """ + ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 + """ # noqa: E501 + provider: StrictStr + discovery_url: StrictStr = Field(alias="discoveryUrl") + client_id: StrictStr = Field(alias="clientId") + client_secret: StrictStr = Field(alias="clientSecret") + label: StrictStr + invited_only: StrictBool = Field(alias="invitedOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["provider", "discoveryUrl", "clientId", "clientSecret", "label", "invitedOnly"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "provider": obj.get("provider"), + "discoveryUrl": obj.get("discoveryUrl"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "label": obj.get("label"), + "invitedOnly": obj.get("invitedOnly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_aws_marketplace.py b/corellium/models/cluster_config_coordinator_config_aws_marketplace.py new file mode 100644 index 0000000..dea3ead --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_aws_marketplace.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigAwsMarketplace(BaseModel): + """ + ClusterConfigCoordinatorConfigAwsMarketplace + """ # noqa: E501 + suger_token: StrictStr = Field(alias="sugerToken") + suger_webhook_secret: StrictStr = Field(alias="sugerWebhookSecret") + suger_api_client_secret: StrictStr = Field(alias="sugerAPIClientSecret") + suger_stripe_mapping: Dict[str, StrictStr] = Field(alias="sugerStripeMapping") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sugerToken", "sugerWebhookSecret", "sugerAPIClientSecret", "sugerStripeMapping"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigAwsMarketplace from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigAwsMarketplace from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sugerToken": obj.get("sugerToken"), + "sugerWebhookSecret": obj.get("sugerWebhookSecret"), + "sugerAPIClientSecret": obj.get("sugerAPIClientSecret"), + "sugerStripeMapping": obj.get("sugerStripeMapping") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_ensure_domain.py b/corellium/models/cluster_config_coordinator_config_ensure_domain.py new file mode 100644 index 0000000..92f1777 --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_ensure_domain.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.cluster_config_coordinator_config_ensure_domain_properties import ClusterConfigCoordinatorConfigEnsureDomainProperties +from corellium.models.cluster_config_coordinator_config_ensure_domain_quotas import ClusterConfigCoordinatorConfigEnsureDomainQuotas +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigEnsureDomain(BaseModel): + """ + ClusterConfigCoordinatorConfigEnsureDomain + """ # noqa: E501 + domain: StrictStr + domain_name: StrictStr = Field(alias="domainName") + quotas: ClusterConfigCoordinatorConfigEnsureDomainQuotas + properties: ClusterConfigCoordinatorConfigEnsureDomainProperties + admin_password_hash: StrictStr = Field(alias="adminPasswordHash") + admin_user_cloud_administrator: StrictBool = Field(alias="adminUserCloudAdministrator") + is_individual_aggregate: StrictBool = Field(alias="isIndividualAggregate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain", "domainName", "quotas", "properties", "adminPasswordHash", "adminUserCloudAdministrator", "isIndividualAggregate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigEnsureDomain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # override the default output from pydantic by calling `to_dict()` of properties + if self.properties: + _dict['properties'] = self.properties.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigEnsureDomain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "domainName": obj.get("domainName"), + "quotas": ClusterConfigCoordinatorConfigEnsureDomainQuotas.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None, + "properties": ClusterConfigCoordinatorConfigEnsureDomainProperties.from_dict(obj["properties"]) if obj.get("properties") is not None else None, + "adminPasswordHash": obj.get("adminPasswordHash"), + "adminUserCloudAdministrator": obj.get("adminUserCloudAdministrator"), + "isIndividualAggregate": obj.get("isIndividualAggregate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_ensure_domain_properties.py b/corellium/models/cluster_config_coordinator_config_ensure_domain_properties.py new file mode 100644 index 0000000..103209b --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_ensure_domain_properties.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigEnsureDomainProperties(BaseModel): + """ + ClusterConfigCoordinatorConfigEnsureDomainProperties + """ # noqa: E501 + license_type: StrictStr = Field(alias="licenseType") + android: StrictBool + no_ios: StrictBool = Field(alias="noIOS") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["licenseType", "android", "noIOS"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigEnsureDomainProperties from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigEnsureDomainProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "licenseType": obj.get("licenseType"), + "android": obj.get("android"), + "noIOS": obj.get("noIOS") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_ensure_domain_quotas.py b/corellium/models/cluster_config_coordinator_config_ensure_domain_quotas.py new file mode 100644 index 0000000..61078b6 --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_ensure_domain_quotas.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigEnsureDomainQuotas(BaseModel): + """ + ClusterConfigCoordinatorConfigEnsureDomainQuotas + """ # noqa: E501 + cores: Union[StrictFloat, StrictInt] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigEnsureDomainQuotas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigEnsureDomainQuotas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_hubspot.py b/corellium/models/cluster_config_coordinator_config_hubspot.py new file mode 100644 index 0000000..c2514c8 --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_hubspot.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigHubspot(BaseModel): + """ + ClusterConfigCoordinatorConfigHubspot + """ # noqa: E501 + access_token: StrictStr = Field(alias="accessToken") + hubspot_contact_link: StrictStr = Field(alias="hubspotContactLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["accessToken", "hubspotContactLink"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigHubspot from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigHubspot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accessToken": obj.get("accessToken"), + "hubspotContactLink": obj.get("hubspotContactLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_hypertune.py b/corellium/models/cluster_config_coordinator_config_hypertune.py new file mode 100644 index 0000000..2e8ba5c --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_hypertune.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigHypertune(BaseModel): + """ + ClusterConfigCoordinatorConfigHypertune + """ # noqa: E501 + token: StrictStr + branch_name: Optional[StrictStr] = Field(default=None, alias="branchName") + init_data_path: Optional[StrictStr] = Field(default=None, alias="initDataPath") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token", "branchName", "initDataPath"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigHypertune from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigHypertune from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "branchName": obj.get("branchName"), + "initDataPath": obj.get("initDataPath") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_pipedrive.py b/corellium/models/cluster_config_coordinator_config_pipedrive.py new file mode 100644 index 0000000..a9a64ef --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_pipedrive.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigPipedrive(BaseModel): + """ + ClusterConfigCoordinatorConfigPipedrive + """ # noqa: E501 + token: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigPipedrive from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigPipedrive from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_trial.py b/corellium/models/cluster_config_coordinator_config_trial.py new file mode 100644 index 0000000..6637586 --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_trial.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigTrial(BaseModel): + """ + ClusterConfigCoordinatorConfigTrial + """ # noqa: E501 + default_duration: Union[StrictFloat, StrictInt] = Field(alias="defaultDuration") + default_hours: Union[StrictFloat, StrictInt] = Field(alias="defaultHours") + default_devices: Union[StrictFloat, StrictInt] = Field(alias="defaultDevices") + default_cores: Union[StrictFloat, StrictInt] = Field(alias="defaultCores") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["defaultDuration", "defaultHours", "defaultDevices", "defaultCores"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigTrial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigTrial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultDuration": obj.get("defaultDuration"), + "defaultHours": obj.get("defaultHours"), + "defaultDevices": obj.get("defaultDevices"), + "defaultCores": obj.get("defaultCores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_coordinator_config_webplayer.py b/corellium/models/cluster_config_coordinator_config_webplayer.py new file mode 100644 index 0000000..f15315d --- /dev/null +++ b/corellium/models/cluster_config_coordinator_config_webplayer.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigCoordinatorConfigWebplayer(BaseModel): + """ + ClusterConfigCoordinatorConfigWebplayer + """ # noqa: E501 + inactivity_delete_timeout: Union[StrictFloat, StrictInt] = Field(alias="inactivityDeleteTimeout") + inactivity_shutdown_timeout: Union[StrictFloat, StrictInt] = Field(alias="inactivityShutdownTimeout") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["inactivityDeleteTimeout", "inactivityShutdownTimeout"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigWebplayer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigCoordinatorConfigWebplayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inactivityDeleteTimeout": obj.get("inactivityDeleteTimeout"), + "inactivityShutdownTimeout": obj.get("inactivityShutdownTimeout") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_firmware_service_config.py b/corellium/models/cluster_config_firmware_service_config.py new file mode 100644 index 0000000..c40c336 --- /dev/null +++ b/corellium/models/cluster_config_firmware_service_config.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigFirmwareServiceConfig(BaseModel): + """ + ClusterConfigFirmwareServiceConfig + """ # noqa: E501 + fetch_firmware_assets: Optional[StrictBool] = Field(default=None, alias="fetchFirmwareAssets") + cluster_firmware_assets: Optional[StrictBool] = Field(default=None, alias="clusterFirmwareAssets") + cache_firmware: Optional[StrictBool] = Field(default=None, alias="cacheFirmware") + should_download: Optional[StrictBool] = Field(default=None, alias="shouldDownload") + fallback_original_url: Optional[StrictBool] = Field(default=None, alias="fallbackOriginalUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fetchFirmwareAssets", "clusterFirmwareAssets", "cacheFirmware", "shouldDownload", "fallbackOriginalUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigFirmwareServiceConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigFirmwareServiceConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fetchFirmwareAssets": obj.get("fetchFirmwareAssets"), + "clusterFirmwareAssets": obj.get("clusterFirmwareAssets"), + "cacheFirmware": obj.get("cacheFirmware"), + "shouldDownload": obj.get("shouldDownload"), + "fallbackOriginalUrl": obj.get("fallbackOriginalUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_ipsw_filters_inner.py b/corellium/models/cluster_config_ipsw_filters_inner.py new file mode 100644 index 0000000..b361c97 --- /dev/null +++ b/corellium/models/cluster_config_ipsw_filters_inner.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.cluster_config_ipsw_filters_inner_device import ClusterConfigIpswFiltersInnerDevice +from corellium.models.cluster_config_ipsw_filters_inner_version import ClusterConfigIpswFiltersInnerVersion +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigIpswFiltersInner(BaseModel): + """ + ClusterConfigIpswFiltersInner + """ # noqa: E501 + device: Optional[ClusterConfigIpswFiltersInnerDevice] = None + version: Optional[ClusterConfigIpswFiltersInnerVersion] = None + include: Optional[StrictBool] = None + exclude: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["device", "version", "include", "exclude"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigIpswFiltersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of device + if self.device: + _dict['device'] = self.device.to_dict() + # override the default output from pydantic by calling `to_dict()` of version + if self.version: + _dict['version'] = self.version.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigIpswFiltersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "device": ClusterConfigIpswFiltersInnerDevice.from_dict(obj["device"]) if obj.get("device") is not None else None, + "version": ClusterConfigIpswFiltersInnerVersion.from_dict(obj["version"]) if obj.get("version") is not None else None, + "include": obj.get("include"), + "exclude": obj.get("exclude") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_ipsw_filters_inner_device.py b/corellium/models/cluster_config_ipsw_filters_inner_device.py new file mode 100644 index 0000000..efc749f --- /dev/null +++ b/corellium/models/cluster_config_ipsw_filters_inner_device.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigIpswFiltersInnerDevice(BaseModel): + """ + ClusterConfigIpswFiltersInnerDevice + """ # noqa: E501 + product: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["product"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigIpswFiltersInnerDevice from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigIpswFiltersInnerDevice from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "product": obj.get("product") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_ipsw_filters_inner_version.py b/corellium/models/cluster_config_ipsw_filters_inner_version.py new file mode 100644 index 0000000..c764923 --- /dev/null +++ b/corellium/models/cluster_config_ipsw_filters_inner_version.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigIpswFiltersInnerVersion(BaseModel): + """ + ClusterConfigIpswFiltersInnerVersion + """ # noqa: E501 + lt: Optional[StrictStr] = None + gt: Optional[StrictStr] = None + le: Optional[StrictStr] = None + ge: Optional[StrictStr] = None + eq: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["lt", "gt", "le", "ge", "eq"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigIpswFiltersInnerVersion from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigIpswFiltersInnerVersion from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lt": obj.get("lt"), + "gt": obj.get("gt"), + "le": obj.get("le"), + "ge": obj.get("ge"), + "eq": obj.get("eq") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_maintenance.py b/corellium/models/cluster_config_maintenance.py new file mode 100644 index 0000000..ee86687 --- /dev/null +++ b/corellium/models/cluster_config_maintenance.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigMaintenance(BaseModel): + """ + ClusterConfigMaintenance + """ # noqa: E501 + message: Optional[StrictStr] = None + header: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "header"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigMaintenance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigMaintenance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "header": obj.get("header") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_net_mon_ca.py b/corellium/models/cluster_config_net_mon_ca.py new file mode 100644 index 0000000..5b6b35c --- /dev/null +++ b/corellium/models/cluster_config_net_mon_ca.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigNetMonCA(BaseModel): + """ + ClusterConfigNetMonCA + """ # noqa: E501 + certificate: StrictStr + key: StrictStr + subject_hash2: StrictStr = Field(alias="subjectHash2") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["certificate", "key", "subjectHash2"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigNetMonCA from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigNetMonCA from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "certificate": obj.get("certificate"), + "key": obj.get("key"), + "subjectHash2": obj.get("subjectHash2") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_node_specific_config.py b/corellium/models/cluster_config_node_specific_config.py new file mode 100644 index 0000000..43f2745 --- /dev/null +++ b/corellium/models/cluster_config_node_specific_config.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigNodeSpecificConfig(BaseModel): + """ + ClusterConfigNodeSpecificConfig + """ # noqa: E501 + az: Optional[StrictStr] = None + external_ip: Optional[StrictStr] = Field(default=None, alias="externalIp") + node_id: Optional[StrictStr] = Field(default=None, alias="nodeId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["az", "externalIp", "nodeId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigNodeSpecificConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if az (nullable) is None + # and model_fields_set contains the field + if self.az is None and "az" in self.model_fields_set: + _dict['az'] = None + + # set to None if external_ip (nullable) is None + # and model_fields_set contains the field + if self.external_ip is None and "external_ip" in self.model_fields_set: + _dict['externalIp'] = None + + # set to None if node_id (nullable) is None + # and model_fields_set contains the field + if self.node_id is None and "node_id" in self.model_fields_set: + _dict['nodeId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigNodeSpecificConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "az": obj.get("az"), + "externalIp": obj.get("externalIp"), + "nodeId": obj.get("nodeId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_package_config.py b/corellium/models/cluster_config_package_config.py new file mode 100644 index 0000000..7bd7ab1 --- /dev/null +++ b/corellium/models/cluster_config_package_config.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.cluster_config_package_config_components import ClusterConfigPackageConfigComponents +from corellium.models.cluster_config_package_config_features import ClusterConfigPackageConfigFeatures +from corellium.models.cluster_config_package_config_flavor_filters_inner import ClusterConfigPackageConfigFlavorFiltersInner +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigPackageConfig(BaseModel): + """ + ClusterConfigPackageConfig + """ # noqa: E501 + license_type: Optional[StrictStr] = Field(default=None, alias="licenseType") + cluster_id: Optional[StrictStr] = Field(default=None, alias="clusterId") + network_type: Optional[StrictStr] = Field(default=None, alias="networkType") + physical_interfaces: Optional[Dict[str, StrictStr]] = Field(default=None, alias="physicalInterfaces") + features: Optional[ClusterConfigPackageConfigFeatures] = None + components: Optional[ClusterConfigPackageConfigComponents] = None + terms_of_service: Optional[StrictStr] = Field(default=None, alias="termsOfService") + domain_authentication_providers: Optional[StrictBool] = Field(default=None, alias="domainAuthenticationProviders") + max_network_monitor_file_size: Optional[StrictStr] = Field(default=None, alias="maxNetworkMonitorFileSize") + combined: Optional[StrictBool] = None + flavor_filters: List[ClusterConfigPackageConfigFlavorFiltersInner] = Field(alias="flavorFilters") + charm_sdk: Optional[StrictBool] = Field(default=None, alias="charmSDK") + highly_available: Optional[StrictBool] = Field(default=None, alias="highlyAvailable") + node_version: Optional[StrictStr] = Field(default=None, alias="nodeVersion") + invalid_build: Optional[StrictBool] = Field(default=None, alias="invalidBuild") + sep_sim: Optional[StrictBool] = Field(default=None, alias="sepSim") + kernel_gdb: Optional[StrictBool] = Field(default=None, alias="kernelGDB") + android: Optional[StrictBool] = None + no_ios: Optional[StrictBool] = Field(default=None, alias="noIOS") + ios_betas: Optional[StrictBool] = Field(default=None, alias="iosBetas") + charm_modules: Optional[StrictBool] = Field(default=None, alias="charmModules") + btrace: Optional[StrictBool] = None + strace: Optional[StrictBool] = None + game_streaming: Optional[StrictBool] = Field(default=None, alias="gameStreaming") + container_template_generation: Optional[StrictStr] = Field(default=None, alias="containerTemplateGeneration") + s3_supported: Optional[StrictBool] = Field(default=None, alias="s3Supported") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["licenseType", "clusterId", "networkType", "physicalInterfaces", "features", "components", "termsOfService", "domainAuthenticationProviders", "maxNetworkMonitorFileSize", "combined", "flavorFilters", "charmSDK", "highlyAvailable", "nodeVersion", "invalidBuild", "sepSim", "kernelGDB", "android", "noIOS", "iosBetas", "charmModules", "btrace", "strace", "gameStreaming", "containerTemplateGeneration", "s3Supported"] + + @field_validator('network_type') + def network_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['bridged', 'nat', 'routed']): + raise ValueError("must be one of enum values ('bridged', 'nat', 'routed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of features + if self.features: + _dict['features'] = self.features.to_dict() + # override the default output from pydantic by calling `to_dict()` of components + if self.components: + _dict['components'] = self.components.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in flavor_filters (list) + _items = [] + if self.flavor_filters: + for _item_flavor_filters in self.flavor_filters: + if _item_flavor_filters: + _items.append(_item_flavor_filters.to_dict()) + _dict['flavorFilters'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "licenseType": obj.get("licenseType"), + "clusterId": obj.get("clusterId"), + "networkType": obj.get("networkType"), + "physicalInterfaces": obj.get("physicalInterfaces"), + "features": ClusterConfigPackageConfigFeatures.from_dict(obj["features"]) if obj.get("features") is not None else None, + "components": ClusterConfigPackageConfigComponents.from_dict(obj["components"]) if obj.get("components") is not None else None, + "termsOfService": obj.get("termsOfService"), + "domainAuthenticationProviders": obj.get("domainAuthenticationProviders"), + "maxNetworkMonitorFileSize": obj.get("maxNetworkMonitorFileSize"), + "combined": obj.get("combined"), + "flavorFilters": [ClusterConfigPackageConfigFlavorFiltersInner.from_dict(_item) for _item in obj["flavorFilters"]] if obj.get("flavorFilters") is not None else None, + "charmSDK": obj.get("charmSDK"), + "highlyAvailable": obj.get("highlyAvailable"), + "nodeVersion": obj.get("nodeVersion"), + "invalidBuild": obj.get("invalidBuild"), + "sepSim": obj.get("sepSim"), + "kernelGDB": obj.get("kernelGDB"), + "android": obj.get("android"), + "noIOS": obj.get("noIOS"), + "iosBetas": obj.get("iosBetas"), + "charmModules": obj.get("charmModules"), + "btrace": obj.get("btrace"), + "strace": obj.get("strace"), + "gameStreaming": obj.get("gameStreaming"), + "containerTemplateGeneration": obj.get("containerTemplateGeneration"), + "s3Supported": obj.get("s3Supported") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_package_config_components.py b/corellium/models/cluster_config_package_config_components.py new file mode 100644 index 0000000..24d8f14 --- /dev/null +++ b/corellium/models/cluster_config_package_config_components.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigPackageConfigComponents(BaseModel): + """ + ClusterConfigPackageConfigComponents + """ # noqa: E501 + cellebrite_device_image: Optional[StrictBool] = Field(default=None, alias="cellebriteDeviceImage") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cellebriteDeviceImage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigComponents from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigComponents from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cellebriteDeviceImage": obj.get("cellebriteDeviceImage") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_package_config_features.py b/corellium/models/cluster_config_package_config_features.py new file mode 100644 index 0000000..5113726 --- /dev/null +++ b/corellium/models/cluster_config_package_config_features.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigPackageConfigFeatures(BaseModel): + """ + ClusterConfigPackageConfigFeatures + """ # noqa: E501 + net_mon_proc_map: Optional[StrictBool] = Field(default=None, alias="netMonProcMap") + cellebrite_device_image: Optional[StrictBool] = Field(default=None, alias="CellebriteDeviceImage") + custom_ramdisk: Optional[StrictBool] = Field(default=None, alias="CustomRamdisk") + injected_cdhashes: Optional[StrictBool] = Field(default=None, alias="InjectedCdhashes") + custom_kernel: Optional[StrictBool] = Field(default=None, alias="CustomKernel") + custom_ramdom_seed: Optional[StrictBool] = Field(default=None, alias="CustomRamdomSeed") + disable_snapshot_mount: Optional[StrictBool] = Field(default=None, alias="DisableSnapshotMount") + tracing_tools: Optional[StrictBool] = Field(default=None, alias="TracingTools") + sep_sim: Optional[StrictBool] = Field(default=None, alias="SepSim") + custom_boot_args: Optional[StrictBool] = Field(default=None, alias="CustomBootArgs") + netdump: Optional[StrictBool] = None + pac: Optional[StrictBool] = Field(default=None, alias="PAC") + vstrm_on_compute_nodes: Optional[StrictBool] = Field(default=None, alias="VstrmOnComputeNodes") + aprr: Optional[StrictBool] = Field(default=None, alias="APRR") + kernel_gdb: Optional[StrictBool] = Field(default=None, alias="KernelGDB") + kalloc_tracing: Optional[StrictBool] = Field(default=None, alias="KallocTracing") + track_project_instance_usage: Optional[StrictBool] = Field(default=None, alias="trackProjectInstanceUsage") + custom_device_tree: Optional[StrictBool] = Field(default=None, alias="CustomDeviceTree") + custom_kernel_patches: Optional[StrictBool] = Field(default=None, alias="CustomKernelPatches") + mast: Optional[StrictBool] = Field(default=None, alias="Mast") + charm_modules: Optional[StrictBool] = Field(default=None, alias="CharmModules") + sep: Optional[StrictBool] = Field(default=None, alias="SEP") + custom_boot_loader: Optional[StrictBool] = Field(default=None, alias="CustomBootLoader") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["netMonProcMap", "CellebriteDeviceImage", "CustomRamdisk", "InjectedCdhashes", "CustomKernel", "CustomRamdomSeed", "DisableSnapshotMount", "TracingTools", "SepSim", "CustomBootArgs", "netdump", "PAC", "VstrmOnComputeNodes", "APRR", "KernelGDB", "KallocTracing", "trackProjectInstanceUsage", "CustomDeviceTree", "CustomKernelPatches", "Mast", "CharmModules", "SEP", "CustomBootLoader"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigFeatures from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigFeatures from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "netMonProcMap": obj.get("netMonProcMap"), + "CellebriteDeviceImage": obj.get("CellebriteDeviceImage"), + "CustomRamdisk": obj.get("CustomRamdisk"), + "InjectedCdhashes": obj.get("InjectedCdhashes"), + "CustomKernel": obj.get("CustomKernel"), + "CustomRamdomSeed": obj.get("CustomRamdomSeed"), + "DisableSnapshotMount": obj.get("DisableSnapshotMount"), + "TracingTools": obj.get("TracingTools"), + "SepSim": obj.get("SepSim"), + "CustomBootArgs": obj.get("CustomBootArgs"), + "netdump": obj.get("netdump"), + "PAC": obj.get("PAC"), + "VstrmOnComputeNodes": obj.get("VstrmOnComputeNodes"), + "APRR": obj.get("APRR"), + "KernelGDB": obj.get("KernelGDB"), + "KallocTracing": obj.get("KallocTracing"), + "trackProjectInstanceUsage": obj.get("trackProjectInstanceUsage"), + "CustomDeviceTree": obj.get("CustomDeviceTree"), + "CustomKernelPatches": obj.get("CustomKernelPatches"), + "Mast": obj.get("Mast"), + "CharmModules": obj.get("CharmModules"), + "SEP": obj.get("SEP"), + "CustomBootLoader": obj.get("CustomBootLoader") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_package_config_flavor_filters_inner.py b/corellium/models/cluster_config_package_config_flavor_filters_inner.py new file mode 100644 index 0000000..20ec81a --- /dev/null +++ b/corellium/models/cluster_config_package_config_flavor_filters_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.cluster_config_package_config_flavor_filters_inner_apply import ClusterConfigPackageConfigFlavorFiltersInnerApply +from corellium.models.cluster_config_package_config_flavor_filters_inner_filter import ClusterConfigPackageConfigFlavorFiltersInnerFilter +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigPackageConfigFlavorFiltersInner(BaseModel): + """ + ClusterConfigPackageConfigFlavorFiltersInner + """ # noqa: E501 + filter: Optional[ClusterConfigPackageConfigFlavorFiltersInnerFilter] = None + apply: Optional[ClusterConfigPackageConfigFlavorFiltersInnerApply] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["filter", "apply"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigFlavorFiltersInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of filter + if self.filter: + _dict['filter'] = self.filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of apply + if self.apply: + _dict['apply'] = self.apply.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigFlavorFiltersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filter": ClusterConfigPackageConfigFlavorFiltersInnerFilter.from_dict(obj["filter"]) if obj.get("filter") is not None else None, + "apply": ClusterConfigPackageConfigFlavorFiltersInnerApply.from_dict(obj["apply"]) if obj.get("apply") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_package_config_flavor_filters_inner_apply.py b/corellium/models/cluster_config_package_config_flavor_filters_inner_apply.py new file mode 100644 index 0000000..faa8d67 --- /dev/null +++ b/corellium/models/cluster_config_package_config_flavor_filters_inner_apply.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigPackageConfigFlavorFiltersInnerApply(BaseModel): + """ + ClusterConfigPackageConfigFlavorFiltersInnerApply + """ # noqa: E501 + supports_core_trace: Optional[StrictBool] = Field(default=None, alias="supportsCoreTrace") + supports_port_frida: Optional[StrictBool] = Field(default=None, alias="supportsPortFrida") + supports_custom_firmware: Optional[StrictBool] = Field(default=None, alias="supportsCustomFirmware") + supports_custom_kernel: Optional[StrictBool] = Field(default=None, alias="supportsCustomKernel") + supports_gdb: Optional[StrictBool] = Field(default=None, alias="supportsGDB") + supports_custom_devicetree: Optional[StrictBool] = Field(default=None, alias="supportsCustomDevicetree") + supports_network_monitor: Optional[StrictBool] = Field(default=None, alias="supportsNetworkMonitor") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["supportsCoreTrace", "supportsPortFrida", "supportsCustomFirmware", "supportsCustomKernel", "supportsGDB", "supportsCustomDevicetree", "supportsNetworkMonitor"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigFlavorFiltersInnerApply from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigFlavorFiltersInnerApply from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "supportsCoreTrace": obj.get("supportsCoreTrace"), + "supportsPortFrida": obj.get("supportsPortFrida"), + "supportsCustomFirmware": obj.get("supportsCustomFirmware"), + "supportsCustomKernel": obj.get("supportsCustomKernel"), + "supportsGDB": obj.get("supportsGDB"), + "supportsCustomDevicetree": obj.get("supportsCustomDevicetree"), + "supportsNetworkMonitor": obj.get("supportsNetworkMonitor") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_package_config_flavor_filters_inner_filter.py b/corellium/models/cluster_config_package_config_flavor_filters_inner_filter.py new file mode 100644 index 0000000..8520b1c --- /dev/null +++ b/corellium/models/cluster_config_package_config_flavor_filters_inner_filter.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigPackageConfigFlavorFiltersInnerFilter(BaseModel): + """ + ClusterConfigPackageConfigFlavorFiltersInnerFilter + """ # noqa: E501 + license: Optional[StrictStr] = None + type: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["license", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigFlavorFiltersInnerFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigPackageConfigFlavorFiltersInnerFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "license": obj.get("license"), + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_setup_config.py b/corellium/models/cluster_config_setup_config.py new file mode 100644 index 0000000..73d799e --- /dev/null +++ b/corellium/models/cluster_config_setup_config.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigSetupConfig(BaseModel): + """ + ClusterConfigSetupConfig + """ # noqa: E501 + on_site: StrictBool = Field(alias="onSite") + artifacts_volume_size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="artifactsVolumeSize") + network_monitor_interval: Union[StrictFloat, StrictInt] = Field(alias="networkMonitorInterval") + max_network_monitor_file_size: StrictStr = Field(alias="maxNetworkMonitorFileSize") + ca_cert_file_src: StrictStr = Field(alias="caCertFileSrc") + local_ip: StrictStr = Field(alias="localIp") + instance_ip_block_netmask: StrictStr = Field(alias="instanceIpBlockNetmask") + instance_gateway: StrictStr = Field(alias="instanceGateway") + instance_dns_servers: Optional[List[StrictStr]] = Field(default=None, alias="instanceDNSServers") + report_interval: Union[StrictFloat, StrictInt] = Field(alias="reportInterval") + cert_key_file_data: Optional[StrictStr] = Field(default=None, alias="certKeyFileData") + default_ssid: Optional[StrictStr] = Field(default=None, alias="defaultSsid") + enable_experimental_devices: Optional[StrictBool] = Field(default=None, alias="enableExperimentalDevices") + controller_nodes: Optional[List[StrictStr]] = Field(default=None, alias="controllerNodes") + domain: Optional[StrictStr] = None + interface: StrictStr + virtual_device_interface: Optional[StrictStr] = Field(default=None, alias="virtualDeviceInterface") + auto_approve_trials: Optional[StrictStr] = Field(default=None, alias="autoApproveTrials") + snapshot_limit: Optional[StrictInt] = Field(default=None, alias="snapshotLimit") + max_download_agents_per_device: Optional[StrictInt] = Field(default=None, alias="maxDownloadAgentsPerDevice") + client_cert_file: Optional[StrictStr] = Field(default=None, alias="clientCertFile") + docker_host_ip: Optional[StrictStr] = Field(default=None, alias="dockerHostIp") + domain_name: Optional[StrictStr] = Field(default=None, alias="domainName") + vpn_client_ip: Optional[StrictStr] = Field(default=None, alias="vpnClientIP") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["onSite", "artifactsVolumeSize", "networkMonitorInterval", "maxNetworkMonitorFileSize", "caCertFileSrc", "localIp", "instanceIpBlockNetmask", "instanceGateway", "instanceDNSServers", "reportInterval", "certKeyFileData", "defaultSsid", "enableExperimentalDevices", "controllerNodes", "domain", "interface", "virtualDeviceInterface", "autoApproveTrials", "snapshotLimit", "maxDownloadAgentsPerDevice", "clientCertFile", "dockerHostIp", "domainName", "vpnClientIP"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigSetupConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigSetupConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "onSite": obj.get("onSite"), + "artifactsVolumeSize": obj.get("artifactsVolumeSize"), + "networkMonitorInterval": obj.get("networkMonitorInterval"), + "maxNetworkMonitorFileSize": obj.get("maxNetworkMonitorFileSize"), + "caCertFileSrc": obj.get("caCertFileSrc"), + "localIp": obj.get("localIp"), + "instanceIpBlockNetmask": obj.get("instanceIpBlockNetmask"), + "instanceGateway": obj.get("instanceGateway"), + "instanceDNSServers": obj.get("instanceDNSServers"), + "reportInterval": obj.get("reportInterval"), + "certKeyFileData": obj.get("certKeyFileData"), + "defaultSsid": obj.get("defaultSsid"), + "enableExperimentalDevices": obj.get("enableExperimentalDevices"), + "controllerNodes": obj.get("controllerNodes"), + "domain": obj.get("domain"), + "interface": obj.get("interface"), + "virtualDeviceInterface": obj.get("virtualDeviceInterface"), + "autoApproveTrials": obj.get("autoApproveTrials"), + "snapshotLimit": obj.get("snapshotLimit"), + "maxDownloadAgentsPerDevice": obj.get("maxDownloadAgentsPerDevice"), + "clientCertFile": obj.get("clientCertFile"), + "dockerHostIp": obj.get("dockerHostIp"), + "domainName": obj.get("domainName"), + "vpnClientIP": obj.get("vpnClientIP") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_stripe.py b/corellium/models/cluster_config_stripe.py new file mode 100644 index 0000000..139d1d3 --- /dev/null +++ b/corellium/models/cluster_config_stripe.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigStripe(BaseModel): + """ + ClusterConfigStripe + """ # noqa: E501 + public_key: StrictStr = Field(alias="publicKey") + private_key: StrictStr = Field(alias="privateKey") + webhook_key: StrictStr = Field(alias="webhookKey") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["publicKey", "privateKey", "webhookKey"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigStripe from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigStripe from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "publicKey": obj.get("publicKey"), + "privateKey": obj.get("privateKey"), + "webhookKey": obj.get("webhookKey") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_config_update_error.py b/corellium/models/cluster_config_update_error.py new file mode 100644 index 0000000..a9000c4 --- /dev/null +++ b/corellium/models/cluster_config_update_error.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.node_information import NodeInformation +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigUpdateError(BaseModel): + """ + ClusterConfigUpdateError + """ # noqa: E501 + message: StrictStr = Field(description="Human-readable instruction to retry or resolve manually.") + nodes: Optional[List[NodeInformation]] = Field(default=None, description="Nodes that failed to receive the configuration update.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "nodes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigUpdateError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in nodes (list) + _items = [] + if self.nodes: + for _item_nodes in self.nodes: + if _item_nodes: + _items.append(_item_nodes.to_dict()) + _dict['nodes'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigUpdateError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "nodes": [NodeInformation.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_configuration_payload.py b/corellium/models/cluster_configuration_payload.py new file mode 100644 index 0000000..79dbcc3 --- /dev/null +++ b/corellium/models/cluster_configuration_payload.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.ai_tools_config_v1 import AiToolsConfigV1 +from corellium.models.coordinator_config_v1 import CoordinatorConfigV1 +from typing import Optional, Set +from typing_extensions import Self + +class ClusterConfigurationPayload(BaseModel): + """ + + """ # noqa: E501 + snapshot_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Designates the maximum number of snapshots that can be taken in a cluster", alias="snapshotLimit") + coordinator_config: Optional[CoordinatorConfigV1] = Field(default=None, alias="coordinatorConfig") + ai_tools_config: Optional[AiToolsConfigV1] = Field(default=None, alias="aiToolsConfig") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["snapshotLimit", "coordinatorConfig", "aiToolsConfig"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterConfigurationPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of coordinator_config + if self.coordinator_config: + _dict['coordinatorConfig'] = self.coordinator_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of ai_tools_config + if self.ai_tools_config: + _dict['aiToolsConfig'] = self.ai_tools_config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if snapshot_limit (nullable) is None + # and model_fields_set contains the field + if self.snapshot_limit is None and "snapshot_limit" in self.model_fields_set: + _dict['snapshotLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterConfigurationPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "snapshotLimit": obj.get("snapshotLimit"), + "coordinatorConfig": CoordinatorConfigV1.from_dict(obj["coordinatorConfig"]) if obj.get("coordinatorConfig") is not None else None, + "aiToolsConfig": AiToolsConfigV1.from_dict(obj["aiToolsConfig"]) if obj.get("aiToolsConfig") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node.py b/corellium/models/cluster_node.py new file mode 100644 index 0000000..19faf3b --- /dev/null +++ b/corellium/models/cluster_node.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.cluster_node_available import ClusterNodeAvailable +from corellium.models.cluster_node_reserved import ClusterNodeReserved +from corellium.models.cluster_node_total import ClusterNodeTotal +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNode(BaseModel): + """ + ClusterNode + """ # noqa: E501 + reserved: ClusterNodeReserved + total: ClusterNodeTotal + available: ClusterNodeAvailable + hostname: Optional[StrictStr] = Field(description="Node hostname.") + address: StrictStr = Field(description="Node address (host:port).") + last_seen: datetime = Field(description="ISO timestamp of last heartbeat.", alias="lastSeen") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reserved", "total", "available", "hostname", "address", "lastSeen"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNode from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of reserved + if self.reserved: + _dict['reserved'] = self.reserved.to_dict() + # override the default output from pydantic by calling `to_dict()` of total + if self.total: + _dict['total'] = self.total.to_dict() + # override the default output from pydantic by calling `to_dict()` of available + if self.available: + _dict['available'] = self.available.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if hostname (nullable) is None + # and model_fields_set contains the field + if self.hostname is None and "hostname" in self.model_fields_set: + _dict['hostname'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reserved": ClusterNodeReserved.from_dict(obj["reserved"]) if obj.get("reserved") is not None else None, + "total": ClusterNodeTotal.from_dict(obj["total"]) if obj.get("total") is not None else None, + "available": ClusterNodeAvailable.from_dict(obj["available"]) if obj.get("available") is not None else None, + "hostname": obj.get("hostname"), + "address": obj.get("address"), + "lastSeen": obj.get("lastSeen") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node_available.py b/corellium/models/cluster_node_available.py new file mode 100644 index 0000000..f7dc633 --- /dev/null +++ b/corellium/models/cluster_node_available.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNodeAvailable(BaseModel): + """ + Resources currently available. + """ # noqa: E501 + cores: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of CPU cores.") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(description="RAM in MiB.") + disk: Optional[Union[StrictFloat, StrictInt]] = Field(description="Disk in GiB.") + slot: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of device slots.") + gpu: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of GPUs.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "ram", "disk", "slot", "gpu"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNodeAvailable from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cores (nullable) is None + # and model_fields_set contains the field + if self.cores is None and "cores" in self.model_fields_set: + _dict['cores'] = None + + # set to None if ram (nullable) is None + # and model_fields_set contains the field + if self.ram is None and "ram" in self.model_fields_set: + _dict['ram'] = None + + # set to None if disk (nullable) is None + # and model_fields_set contains the field + if self.disk is None and "disk" in self.model_fields_set: + _dict['disk'] = None + + # set to None if slot (nullable) is None + # and model_fields_set contains the field + if self.slot is None and "slot" in self.model_fields_set: + _dict['slot'] = None + + # set to None if gpu (nullable) is None + # and model_fields_set contains the field + if self.gpu is None and "gpu" in self.model_fields_set: + _dict['gpu'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNodeAvailable from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "slot": obj.get("slot"), + "gpu": obj.get("gpu") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node_reserved.py b/corellium/models/cluster_node_reserved.py new file mode 100644 index 0000000..7c0cac6 --- /dev/null +++ b/corellium/models/cluster_node_reserved.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNodeReserved(BaseModel): + """ + Resources currently reserved. + """ # noqa: E501 + cores: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of CPU cores.") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(description="RAM in MiB.") + disk: Optional[Union[StrictFloat, StrictInt]] = Field(description="Disk in GiB.") + slot: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of device slots.") + gpu: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of GPUs.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "ram", "disk", "slot", "gpu"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNodeReserved from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cores (nullable) is None + # and model_fields_set contains the field + if self.cores is None and "cores" in self.model_fields_set: + _dict['cores'] = None + + # set to None if ram (nullable) is None + # and model_fields_set contains the field + if self.ram is None and "ram" in self.model_fields_set: + _dict['ram'] = None + + # set to None if disk (nullable) is None + # and model_fields_set contains the field + if self.disk is None and "disk" in self.model_fields_set: + _dict['disk'] = None + + # set to None if slot (nullable) is None + # and model_fields_set contains the field + if self.slot is None and "slot" in self.model_fields_set: + _dict['slot'] = None + + # set to None if gpu (nullable) is None + # and model_fields_set contains the field + if self.gpu is None and "gpu" in self.model_fields_set: + _dict['gpu'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNodeReserved from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "slot": obj.get("slot"), + "gpu": obj.get("gpu") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node_status.py b/corellium/models/cluster_node_status.py new file mode 100644 index 0000000..c4099ef --- /dev/null +++ b/corellium/models/cluster_node_status.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from corellium.models.cluster_node import ClusterNode +from corellium.models.cluster_node_status_cluster_totals import ClusterNodeStatusClusterTotals +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNodeStatus(BaseModel): + """ + ClusterNodeStatus + """ # noqa: E501 + cluster_totals: ClusterNodeStatusClusterTotals = Field(alias="clusterTotals") + nodes: List[ClusterNode] = Field(description="Individual node statuses.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["clusterTotals", "nodes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNodeStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of cluster_totals + if self.cluster_totals: + _dict['clusterTotals'] = self.cluster_totals.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in nodes (list) + _items = [] + if self.nodes: + for _item_nodes in self.nodes: + if _item_nodes: + _items.append(_item_nodes.to_dict()) + _dict['nodes'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNodeStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clusterTotals": ClusterNodeStatusClusterTotals.from_dict(obj["clusterTotals"]) if obj.get("clusterTotals") is not None else None, + "nodes": [ClusterNode.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node_status_cluster_totals.py b/corellium/models/cluster_node_status_cluster_totals.py new file mode 100644 index 0000000..7776369 --- /dev/null +++ b/corellium/models/cluster_node_status_cluster_totals.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from corellium.models.cluster_node_status_cluster_totals_available import ClusterNodeStatusClusterTotalsAvailable +from corellium.models.cluster_node_status_cluster_totals_reserved import ClusterNodeStatusClusterTotalsReserved +from corellium.models.cluster_node_status_cluster_totals_total import ClusterNodeStatusClusterTotalsTotal +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNodeStatusClusterTotals(BaseModel): + """ + Aggregate cluster resource totals. + """ # noqa: E501 + reserved: ClusterNodeStatusClusterTotalsReserved + total: ClusterNodeStatusClusterTotalsTotal + available: ClusterNodeStatusClusterTotalsAvailable + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["reserved", "total", "available"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNodeStatusClusterTotals from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of reserved + if self.reserved: + _dict['reserved'] = self.reserved.to_dict() + # override the default output from pydantic by calling `to_dict()` of total + if self.total: + _dict['total'] = self.total.to_dict() + # override the default output from pydantic by calling `to_dict()` of available + if self.available: + _dict['available'] = self.available.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNodeStatusClusterTotals from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reserved": ClusterNodeStatusClusterTotalsReserved.from_dict(obj["reserved"]) if obj.get("reserved") is not None else None, + "total": ClusterNodeStatusClusterTotalsTotal.from_dict(obj["total"]) if obj.get("total") is not None else None, + "available": ClusterNodeStatusClusterTotalsAvailable.from_dict(obj["available"]) if obj.get("available") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node_status_cluster_totals_available.py b/corellium/models/cluster_node_status_cluster_totals_available.py new file mode 100644 index 0000000..0f38668 --- /dev/null +++ b/corellium/models/cluster_node_status_cluster_totals_available.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNodeStatusClusterTotalsAvailable(BaseModel): + """ + Total available across cluster. + """ # noqa: E501 + cores: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of CPU cores.") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(description="RAM in MiB.") + disk: Optional[Union[StrictFloat, StrictInt]] = Field(description="Disk in GiB.") + slot: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of device slots.") + gpu: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of GPUs.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "ram", "disk", "slot", "gpu"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNodeStatusClusterTotalsAvailable from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cores (nullable) is None + # and model_fields_set contains the field + if self.cores is None and "cores" in self.model_fields_set: + _dict['cores'] = None + + # set to None if ram (nullable) is None + # and model_fields_set contains the field + if self.ram is None and "ram" in self.model_fields_set: + _dict['ram'] = None + + # set to None if disk (nullable) is None + # and model_fields_set contains the field + if self.disk is None and "disk" in self.model_fields_set: + _dict['disk'] = None + + # set to None if slot (nullable) is None + # and model_fields_set contains the field + if self.slot is None and "slot" in self.model_fields_set: + _dict['slot'] = None + + # set to None if gpu (nullable) is None + # and model_fields_set contains the field + if self.gpu is None and "gpu" in self.model_fields_set: + _dict['gpu'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNodeStatusClusterTotalsAvailable from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "slot": obj.get("slot"), + "gpu": obj.get("gpu") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node_status_cluster_totals_reserved.py b/corellium/models/cluster_node_status_cluster_totals_reserved.py new file mode 100644 index 0000000..41ed26d --- /dev/null +++ b/corellium/models/cluster_node_status_cluster_totals_reserved.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNodeStatusClusterTotalsReserved(BaseModel): + """ + Total reserved across cluster. + """ # noqa: E501 + cores: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of CPU cores.") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(description="RAM in MiB.") + disk: Optional[Union[StrictFloat, StrictInt]] = Field(description="Disk in GiB.") + slot: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of device slots.") + gpu: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of GPUs.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "ram", "disk", "slot", "gpu"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNodeStatusClusterTotalsReserved from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cores (nullable) is None + # and model_fields_set contains the field + if self.cores is None and "cores" in self.model_fields_set: + _dict['cores'] = None + + # set to None if ram (nullable) is None + # and model_fields_set contains the field + if self.ram is None and "ram" in self.model_fields_set: + _dict['ram'] = None + + # set to None if disk (nullable) is None + # and model_fields_set contains the field + if self.disk is None and "disk" in self.model_fields_set: + _dict['disk'] = None + + # set to None if slot (nullable) is None + # and model_fields_set contains the field + if self.slot is None and "slot" in self.model_fields_set: + _dict['slot'] = None + + # set to None if gpu (nullable) is None + # and model_fields_set contains the field + if self.gpu is None and "gpu" in self.model_fields_set: + _dict['gpu'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNodeStatusClusterTotalsReserved from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "slot": obj.get("slot"), + "gpu": obj.get("gpu") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node_status_cluster_totals_total.py b/corellium/models/cluster_node_status_cluster_totals_total.py new file mode 100644 index 0000000..4e9e6f0 --- /dev/null +++ b/corellium/models/cluster_node_status_cluster_totals_total.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNodeStatusClusterTotalsTotal(BaseModel): + """ + Total resources across cluster. + """ # noqa: E501 + cores: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of CPU cores.") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(description="RAM in MiB.") + disk: Optional[Union[StrictFloat, StrictInt]] = Field(description="Disk in GiB.") + slot: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of device slots.") + gpu: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of GPUs.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "ram", "disk", "slot", "gpu"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNodeStatusClusterTotalsTotal from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cores (nullable) is None + # and model_fields_set contains the field + if self.cores is None and "cores" in self.model_fields_set: + _dict['cores'] = None + + # set to None if ram (nullable) is None + # and model_fields_set contains the field + if self.ram is None and "ram" in self.model_fields_set: + _dict['ram'] = None + + # set to None if disk (nullable) is None + # and model_fields_set contains the field + if self.disk is None and "disk" in self.model_fields_set: + _dict['disk'] = None + + # set to None if slot (nullable) is None + # and model_fields_set contains the field + if self.slot is None and "slot" in self.model_fields_set: + _dict['slot'] = None + + # set to None if gpu (nullable) is None + # and model_fields_set contains the field + if self.gpu is None and "gpu" in self.model_fields_set: + _dict['gpu'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNodeStatusClusterTotalsTotal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "slot": obj.get("slot"), + "gpu": obj.get("gpu") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_node_total.py b/corellium/models/cluster_node_total.py new file mode 100644 index 0000000..5675ee4 --- /dev/null +++ b/corellium/models/cluster_node_total.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ClusterNodeTotal(BaseModel): + """ + Total available resources. + """ # noqa: E501 + cores: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of CPU cores.") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(description="RAM in MiB.") + disk: Optional[Union[StrictFloat, StrictInt]] = Field(description="Disk in GiB.") + slot: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of device slots.") + gpu: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of GPUs.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "ram", "disk", "slot", "gpu"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterNodeTotal from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cores (nullable) is None + # and model_fields_set contains the field + if self.cores is None and "cores" in self.model_fields_set: + _dict['cores'] = None + + # set to None if ram (nullable) is None + # and model_fields_set contains the field + if self.ram is None and "ram" in self.model_fields_set: + _dict['ram'] = None + + # set to None if disk (nullable) is None + # and model_fields_set contains the field + if self.disk is None and "disk" in self.model_fields_set: + _dict['disk'] = None + + # set to None if slot (nullable) is None + # and model_fields_set contains the field + if self.slot is None and "slot" in self.model_fields_set: + _dict['slot'] = None + + # set to None if gpu (nullable) is None + # and model_fields_set contains the field + if self.gpu is None and "gpu" in self.model_fields_set: + _dict['gpu'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterNodeTotal from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "slot": obj.get("slot"), + "gpu": obj.get("gpu") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_snapshot.py b/corellium/models/cluster_snapshot.py new file mode 100644 index 0000000..83baad2 --- /dev/null +++ b/corellium/models/cluster_snapshot.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.cluster_snapshot_metadata import ClusterSnapshotMetadata +from corellium.models.cluster_snapshot_status import ClusterSnapshotStatus +from typing import Optional, Set +from typing_extensions import Self + +class ClusterSnapshot(BaseModel): + """ + ClusterSnapshot + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for the snapshot.") + name: Optional[StrictStr] = Field(default=None, description="Snapshot name.") + volume: Optional[StrictStr] = Field(description="Identifier of the volume this snapshot was taken from.") + instance: Optional[StrictStr] = Field(description="Identifier of the instance this snapshot is associated with.") + status: ClusterSnapshotStatus + type: StrictStr = Field(description="Storage backend type.") + compute_node: Optional[StrictStr] = Field(default=None, description="Address of the compute node that owns this snapshot.", alias="computeNode") + metadata: ClusterSnapshotMetadata + created_at: datetime = Field(description="Timestamp when the snapshot was created.", alias="createdAt") + updated_at: datetime = Field(description="Timestamp when the snapshot was last updated.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "volume", "instance", "status", "type", "computeNode", "metadata", "createdAt", "updatedAt"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['iscsi', 'local', 's3']): + raise ValueError("must be one of enum values ('iscsi', 'local', 's3')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterSnapshot from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if volume (nullable) is None + # and model_fields_set contains the field + if self.volume is None and "volume" in self.model_fields_set: + _dict['volume'] = None + + # set to None if instance (nullable) is None + # and model_fields_set contains the field + if self.instance is None and "instance" in self.model_fields_set: + _dict['instance'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterSnapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "volume": obj.get("volume"), + "instance": obj.get("instance"), + "status": ClusterSnapshotStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, + "type": obj.get("type"), + "computeNode": obj.get("computeNode"), + "metadata": ClusterSnapshotMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_snapshot_list.py b/corellium/models/cluster_snapshot_list.py new file mode 100644 index 0000000..2740299 --- /dev/null +++ b/corellium/models/cluster_snapshot_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.cluster_snapshot import ClusterSnapshot +from typing import Optional, Set +from typing_extensions import Self + +class ClusterSnapshotList(BaseModel): + """ + ClusterSnapshotList + """ # noqa: E501 + results: List[ClusterSnapshot] = Field(description="List of cluster snapshots.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterSnapshotList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterSnapshotList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ClusterSnapshot.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_snapshot_metadata.py b/corellium/models/cluster_snapshot_metadata.py new file mode 100644 index 0000000..422332f --- /dev/null +++ b/corellium/models/cluster_snapshot_metadata.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.instance_boot_options import InstanceBootOptions +from typing import Optional, Set +from typing_extensions import Self + +class ClusterSnapshotMetadata(BaseModel): + """ + Snapshot metadata. + """ # noqa: E501 + live: Optional[StrictBool] = Field(default=None, description="Whether this was a live snapshot.") + fresh: Optional[StrictBool] = Field(default=None, description="Whether the snapshot was created immediately after device restore.") + hw_pac: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Hardware PAC value.", alias="hwPac") + springboard: Optional[StrictBool] = Field(default=None, description="Whether this is a springboard snapshot.") + boot_options: Optional[InstanceBootOptions] = Field(default=None, description="Boot options.", alias="bootOptions") + device: Optional[Dict[str, Any]] = Field(default=None, description="Device metadata.") + flavor: Optional[StrictStr] = Field(default=None, description="Device flavor.") + os_version: Optional[StrictStr] = Field(default=None, description="OS version.", alias="osVersion") + os_build: Optional[StrictStr] = Field(default=None, description="OS build identifier.", alias="osBuild") + patches: Optional[StrictStr] = Field(default=None, description="Patches applied.") + cpid: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Chip ID.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["live", "fresh", "hwPac", "springboard", "bootOptions", "device", "flavor", "osVersion", "osBuild", "patches", "cpid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterSnapshotMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of boot_options + if self.boot_options: + _dict['bootOptions'] = self.boot_options.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterSnapshotMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "live": obj.get("live"), + "fresh": obj.get("fresh"), + "hwPac": obj.get("hwPac"), + "springboard": obj.get("springboard"), + "bootOptions": InstanceBootOptions.from_dict(obj["bootOptions"]) if obj.get("bootOptions") is not None else None, + "device": obj.get("device"), + "flavor": obj.get("flavor"), + "osVersion": obj.get("osVersion"), + "osBuild": obj.get("osBuild"), + "patches": obj.get("patches"), + "cpid": obj.get("cpid") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_snapshot_status.py b/corellium/models/cluster_snapshot_status.py new file mode 100644 index 0000000..d311746 --- /dev/null +++ b/corellium/models/cluster_snapshot_status.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterSnapshotStatus(BaseModel): + """ + Current status of the snapshot. + """ # noqa: E501 + task: Optional[StrictStr] = Field(default=None, description="Current task being performed on the snapshot.") + created: Optional[StrictBool] = Field(default=None, description="Whether the snapshot has been successfully created.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["task", "created"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterSnapshotStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterSnapshotStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "task": obj.get("task"), + "created": obj.get("created") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/cluster_snapshot_v1.py b/corellium/models/cluster_snapshot_v1.py new file mode 100644 index 0000000..382d721 --- /dev/null +++ b/corellium/models/cluster_snapshot_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClusterSnapshotV1(BaseModel): + """ + + """ # noqa: E501 + identifier: Optional[StrictStr] = Field(default=None, description="Unique identifier for the snapshot") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClusterSnapshotV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterSnapshotV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/compute_node_file.py b/corellium/models/compute_node_file.py new file mode 100644 index 0000000..c97a276 --- /dev/null +++ b/corellium/models/compute_node_file.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ComputeNodeFile(BaseModel): + """ + ComputeNodeFile + """ # noqa: E501 + path: StrictStr = Field(description="Absolute path to the file on the compute node.") + size: StrictInt = Field(description="Size of the file in bytes.") + mtime: datetime = Field(description="Time the file was last modified.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path", "size", "mtime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ComputeNodeFile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ComputeNodeFile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path"), + "size": obj.get("size"), + "mtime": obj.get("mtime") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/compute_node_file_list.py b/corellium/models/compute_node_file_list.py new file mode 100644 index 0000000..1d3ddb7 --- /dev/null +++ b/corellium/models/compute_node_file_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from corellium.models.compute_node_file import ComputeNodeFile +from typing import Optional, Set +from typing_extensions import Self + +class ComputeNodeFileList(BaseModel): + """ + ComputeNodeFileList + """ # noqa: E501 + files: List[ComputeNodeFile] = Field(description="Files that exist on disk, oldest first. Empty when there is nothing to read.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["files"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ComputeNodeFileList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in files (list) + _items = [] + if self.files: + for _item_files in self.files: + if _item_files: + _items.append(_item_files.to_dict()) + _dict['files'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ComputeNodeFileList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "files": [ComputeNodeFile.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/config_auth_provider.py b/corellium/models/config_auth_provider.py new file mode 100644 index 0000000..759965e --- /dev/null +++ b/corellium/models/config_auth_provider.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ConfigAuthProvider(BaseModel): + """ + ConfigAuthProvider + """ # noqa: E501 + name: StrictStr = Field(description="Provider name for a given provider type.") + provider_type: StrictStr = Field(description="Provider type.", alias="providerType") + default: StrictBool = Field(description="Denotes whether or not this is the default auth provider.") + label: StrictStr = Field(description="Provider label.") + enabled: StrictBool = Field(description="Denotes whether they're enabled or not.") + authorization_url: StrictStr = Field(description="URL for provider auth.", alias="authorizationUrl") + identifier: StrictStr = Field(description="Provider identifier.") + provider: StrictStr = Field(description="Auth provider.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "providerType", "default", "label", "enabled", "authorizationUrl", "identifier", "provider"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfigAuthProvider from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfigAuthProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "providerType": obj.get("providerType"), + "default": obj.get("default"), + "label": obj.get("label"), + "enabled": obj.get("enabled"), + "authorizationUrl": obj.get("authorizationUrl"), + "identifier": obj.get("identifier"), + "provider": obj.get("provider") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/config_response.py b/corellium/models/config_response.py new file mode 100644 index 0000000..45cc241 --- /dev/null +++ b/corellium/models/config_response.py @@ -0,0 +1,234 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.config_auth_provider import ConfigAuthProvider +from corellium.models.config_response_ai_tools_config import ConfigResponseAiToolsConfig +from corellium.models.config_response_maintenance import ConfigResponseMaintenance +from corellium.models.coordinator_config import CoordinatorConfig +from corellium.models.logging import Logging +from corellium.models.trial import Trial +from typing import Optional, Set +from typing_extensions import Self + +class ConfigResponse(BaseModel): + """ + Cluster configuration. Build-time feature flags may add further boolean properties beyond those listed. + """ # noqa: E501 + on_site: StrictBool = Field(description="Denotes whether it's an on-site install.", alias="onSite") + network_types: Optional[List[StrictStr]] = Field(description="Valid network types (e.g. \"nat\", \"bridged\", \"routed\").", alias="networkTypes") + network_type: StrictStr = Field(description="Current network type setting.", alias="networkType") + show_domain_settings: StrictBool = Field(description="Denotes whether to show domain settings.", alias="showDomainSettings") + version: StrictStr = Field(description="Denotes the version.") + invalid_build: Optional[StrictBool] = Field(default=None, description="Denotes whether the build is invalid.", alias="invalidBuild") + sep_sim: StrictBool = Field(description="Denotes whether sepSim is enabled.", alias="sepSim") + installer_available: StrictBool = Field(description="Denotes whether installer is available.", alias="installerAvailable") + stripe_public_key: Optional[StrictStr] = Field(default=None, description="Stripe public key.", alias="stripePublicKey") + intercom_id: Optional[StrictStr] = Field(default=None, description="Intercom app ID, also known as workspace ID.", alias="intercomId") + gtm_id: Optional[StrictStr] = Field(default=None, description="Google Tag Manager ID.", alias="gtmId") + billing_backend: Optional[StrictStr] = Field(default=None, description="Default backend billing API name for new subscriptions (e.g. \"stripe\").", alias="billingBackend") + maintenance: Optional[ConfigResponseMaintenance] = None + logging: Optional[Logging] = None + cloud_admin: StrictStr = Field(description="URL for cloud admin login.", alias="cloudAdmin") + files_admin: StrictStr = Field(description="URL for files admin login.", alias="filesAdmin") + cloud_domain: Optional[StrictStr] = Field(default=None, description="Cloud domain name (usually corellium.com or staging.corellium.com).", alias="cloudDomain") + billing_domain: Optional[StrictStr] = Field(default=None, description="Billing domain name.", alias="billingDomain") + app_domain: Optional[StrictStr] = Field(default=None, description="App domain name (usually app.corellium.com or app.staging.corellium.com).", alias="appDomain") + max_network_monitor_file_size: StrictStr = Field(description="Maximum network monitor file size.", alias="maxNetworkMonitorFileSize") + enable_firmware_image_upload: StrictBool = Field(description="Denotes whether users can upload firmware images.", alias="enableFirmwareImageUpload") + auth_providers: List[ConfigAuthProvider] = Field(description="Auth providers.", alias="authProviders") + welcome_message: Optional[StrictStr] = Field(default=None, description="Domain welcome message, when enabled.", alias="welcomeMessage") + snapshot_limit: Union[StrictFloat, StrictInt] = Field(description="Maximum number of snapshots to allow.", alias="snapshotLimit") + max_kernel_size: Union[StrictFloat, StrictInt] = Field(description="The maximum size, in bytes, (default: 100 MiB) that an uploaded kernel should be.", alias="maxKernelSize") + max_ramdisk_size: Union[StrictFloat, StrictInt] = Field(description="The maximum size, in bytes, (default: 500 MiB) that an uploaded ramdisk should be.", alias="maxRamdiskSize") + charm_sdk: Optional[StrictBool] = Field(default=None, description="Denotes whether charmSDK is enabled.", alias="charmSdk") + trial: Trial + sentry_url: Optional[StrictStr] = Field(default=None, description="Sentry URL.", alias="sentryUrl") + domain_authentication_providers: Optional[StrictBool] = Field(default=None, description="If enabled, adds the default providers in their current configuration.", alias="domainAuthenticationProviders") + remote_gpu: Optional[StrictBool] = Field(default=None, description="Whether remote GPU is enabled.", alias="remoteGpu") + default_ssid: StrictStr = Field(description="The configured default SSID from /etc/corellium/setup.json.", alias="defaultSsid") + aws_marketplace: Optional[StrictBool] = Field(default=None, description="Whether this is an AWS Marketplace deployment.", alias="awsMarketplace") + open_g_apps_binary: Optional[StrictStr] = Field(default=None, description="OpenGApps binary location.", alias="openGAppsBinary") + air_gapped: Optional[StrictBool] = Field(default=None, description="Whether the deployment is airgapped.", alias="airGapped") + coordinator_config: CoordinatorConfig = Field(description="Partial coordinator configuration.", alias="coordinatorConfig") + ai_tools_config: Optional[ConfigResponseAiToolsConfig] = Field(default=None, alias="aiToolsConfig") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["onSite", "networkTypes", "networkType", "showDomainSettings", "version", "invalidBuild", "sepSim", "installerAvailable", "stripePublicKey", "intercomId", "gtmId", "billingBackend", "maintenance", "logging", "cloudAdmin", "filesAdmin", "cloudDomain", "billingDomain", "appDomain", "maxNetworkMonitorFileSize", "enableFirmwareImageUpload", "authProviders", "welcomeMessage", "snapshotLimit", "maxKernelSize", "maxRamdiskSize", "charmSdk", "trial", "sentryUrl", "domainAuthenticationProviders", "remoteGpu", "defaultSsid", "awsMarketplace", "openGAppsBinary", "airGapped", "coordinatorConfig", "aiToolsConfig"] + + @field_validator('network_types') + def network_types_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(['bridged', 'nat', 'routed']): + raise ValueError("each list item must be one of ('bridged', 'nat', 'routed')") + return value + + @field_validator('network_type') + def network_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['bridged', 'nat', 'routed']): + raise ValueError("must be one of enum values ('bridged', 'nat', 'routed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfigResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of maintenance + if self.maintenance: + _dict['maintenance'] = self.maintenance.to_dict() + # override the default output from pydantic by calling `to_dict()` of logging + if self.logging: + _dict['logging'] = self.logging.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in auth_providers (list) + _items = [] + if self.auth_providers: + for _item_auth_providers in self.auth_providers: + if _item_auth_providers: + _items.append(_item_auth_providers.to_dict()) + _dict['authProviders'] = _items + # override the default output from pydantic by calling `to_dict()` of trial + if self.trial: + _dict['trial'] = self.trial.to_dict() + # override the default output from pydantic by calling `to_dict()` of coordinator_config + if self.coordinator_config: + _dict['coordinatorConfig'] = self.coordinator_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of ai_tools_config + if self.ai_tools_config: + _dict['aiToolsConfig'] = self.ai_tools_config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if network_types (nullable) is None + # and model_fields_set contains the field + if self.network_types is None and "network_types" in self.model_fields_set: + _dict['networkTypes'] = None + + # set to None if billing_backend (nullable) is None + # and model_fields_set contains the field + if self.billing_backend is None and "billing_backend" in self.model_fields_set: + _dict['billingBackend'] = None + + # set to None if maintenance (nullable) is None + # and model_fields_set contains the field + if self.maintenance is None and "maintenance" in self.model_fields_set: + _dict['maintenance'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfigResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "onSite": obj.get("onSite"), + "networkTypes": obj.get("networkTypes"), + "networkType": obj.get("networkType"), + "showDomainSettings": obj.get("showDomainSettings"), + "version": obj.get("version"), + "invalidBuild": obj.get("invalidBuild"), + "sepSim": obj.get("sepSim"), + "installerAvailable": obj.get("installerAvailable"), + "stripePublicKey": obj.get("stripePublicKey"), + "intercomId": obj.get("intercomId"), + "gtmId": obj.get("gtmId"), + "billingBackend": obj.get("billingBackend"), + "maintenance": ConfigResponseMaintenance.from_dict(obj["maintenance"]) if obj.get("maintenance") is not None else None, + "logging": Logging.from_dict(obj["logging"]) if obj.get("logging") is not None else None, + "cloudAdmin": obj.get("cloudAdmin"), + "filesAdmin": obj.get("filesAdmin"), + "cloudDomain": obj.get("cloudDomain"), + "billingDomain": obj.get("billingDomain"), + "appDomain": obj.get("appDomain"), + "maxNetworkMonitorFileSize": obj.get("maxNetworkMonitorFileSize"), + "enableFirmwareImageUpload": obj.get("enableFirmwareImageUpload"), + "authProviders": [ConfigAuthProvider.from_dict(_item) for _item in obj["authProviders"]] if obj.get("authProviders") is not None else None, + "welcomeMessage": obj.get("welcomeMessage"), + "snapshotLimit": obj.get("snapshotLimit"), + "maxKernelSize": obj.get("maxKernelSize"), + "maxRamdiskSize": obj.get("maxRamdiskSize"), + "charmSdk": obj.get("charmSdk"), + "trial": Trial.from_dict(obj["trial"]) if obj.get("trial") is not None else None, + "sentryUrl": obj.get("sentryUrl"), + "domainAuthenticationProviders": obj.get("domainAuthenticationProviders"), + "remoteGpu": obj.get("remoteGpu"), + "defaultSsid": obj.get("defaultSsid"), + "awsMarketplace": obj.get("awsMarketplace"), + "openGAppsBinary": obj.get("openGAppsBinary"), + "airGapped": obj.get("airGapped"), + "coordinatorConfig": CoordinatorConfig.from_dict(obj["coordinatorConfig"]) if obj.get("coordinatorConfig") is not None else None, + "aiToolsConfig": ConfigResponseAiToolsConfig.from_dict(obj["aiToolsConfig"]) if obj.get("aiToolsConfig") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/config_response_ai_tools_config.py b/corellium/models/config_response_ai_tools_config.py new file mode 100644 index 0000000..a5667ae --- /dev/null +++ b/corellium/models/config_response_ai_tools_config.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ConfigResponseAiToolsConfig(BaseModel): + """ + Configuration for all cluster-hosted AI tools. + """ # noqa: E501 + ai_enabled: Optional[StrictBool] = Field(default=None, description="Whether cluster-hosted AI tools are enabled.", alias="aiEnabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["aiEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfigResponseAiToolsConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfigResponseAiToolsConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aiEnabled": obj.get("aiEnabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/config_response_maintenance.py b/corellium/models/config_response_maintenance.py new file mode 100644 index 0000000..72ebc70 --- /dev/null +++ b/corellium/models/config_response_maintenance.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ConfigResponseMaintenance(BaseModel): + """ + Maintenance details when the server is undergoing maintenance; null/absent otherwise. + """ # noqa: E501 + message: StrictStr = Field(description="Maintenance message.") + header: StrictStr = Field(description="Maintenance header.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "header"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfigResponseMaintenance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfigResponseMaintenance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "header": obj.get("header") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/config_response_v1.py b/corellium/models/config_response_v1.py new file mode 100644 index 0000000..f561469 --- /dev/null +++ b/corellium/models/config_response_v1.py @@ -0,0 +1,328 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.auth_provider_v1 import AuthProviderV1 +from corellium.models.coordinator_config_v1 import CoordinatorConfigV1 +from corellium.models.logging_v1 import LoggingV1 +from corellium.models.trial_v1 import TrialV1 +from typing import Optional, Set +from typing_extensions import Self + +class ConfigResponseV1(BaseModel): + """ + + """ # noqa: E501 + on_site: Optional[StrictBool] = Field(default=None, description="Denotes whether it's an on-site install", alias="onSite") + network_types: Optional[List[StrictStr]] = Field(default=None, description="Valid network types (e.g. \"nat\", \"bridged\", \"routed\")", alias="networkTypes") + network_type: Optional[StrictStr] = Field(default=None, description="Current network type setting", alias="networkType") + show_domain_settings: Optional[StrictBool] = Field(default=None, description="Denotes whether to show domain settings", alias="showDomainSettings") + version: Optional[StrictStr] = Field(default=None, description="Denotes the version") + invalid_build: Optional[StrictBool] = Field(default=None, description="Denotes whether the build is invalid", alias="invalidBuild") + sep_sim: Optional[StrictBool] = Field(default=None, description="Denotes whether sepSim is enabled", alias="sepSim") + installer_available: Optional[StrictBool] = Field(default=None, description="Denotes whether installer is available", alias="installerAvailable") + invoiced_publishable_key: Optional[StrictStr] = Field(default=None, description="API publishable key to use for Invoiced", alias="invoicedPublishableKey") + stripe_public_key: Optional[StrictStr] = Field(default=None, description="Stripe public key", alias="stripePublicKey") + intercom_id: Optional[StrictStr] = Field(default=None, description="Intercom app ID, also known as workspace ID", alias="intercomId") + gtm_id: Optional[StrictStr] = Field(default=None, description="Google Tag Manager", alias="gtmId") + billing_backend: Optional[StrictStr] = Field(default=None, description="Default backend billing api name for new subscriptions (e.g. \"stripe\")", alias="billingBackend") + maintenance: Optional[Any] = Field(default=None, description="Denotes whether the server is undergoing maintenance (legacy v1 shape; v3 returns Maintenance|null)") + logging: Optional[LoggingV1] = None + cloud_admin: Optional[StrictStr] = Field(default=None, description="URL for cloud admin login", alias="cloudAdmin") + files_admin: Optional[StrictStr] = Field(default=None, description="URL for files admin login", alias="filesAdmin") + cloud_domain: Optional[StrictStr] = Field(default=None, description="Cloud domain name (usually corellium.com or staging.corellium.com)", alias="cloudDomain") + billing_domain: Optional[StrictStr] = Field(default=None, description="Billing domain name", alias="billingDomain") + app_domain: Optional[StrictStr] = Field(default=None, description="App domain name (usually app.corellium.com or app.staging.corellium.com)", alias="appDomain") + max_network_monitor_file_size: Optional[StrictStr] = Field(default=None, description="Maximum network monitor file size", alias="maxNetworkMonitorFileSize") + enable_firmware_image_upload: Optional[StrictBool] = Field(default=None, description="Denotes whether users can upload firmware images", alias="enableFirmwareImageUpload") + auth_providers: Optional[List[AuthProviderV1]] = Field(default=None, description="Auth providers", alias="authProviders") + snapshot_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum number of snapshots to allow", alias="snapshotLimit") + max_kernel_size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The maximum size, in bytes, (default: 100 MiB) that an uploaded kernel should be", alias="maxKernelSize") + max_ramdisk_size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The maximum size, in bytes, (default: 500 MiB) that an uploaded ramdisk should be", alias="maxRamdiskSize") + charm_sdk: Optional[StrictBool] = Field(default=None, description="Denotes whether charmSDK is enabled", alias="charmSDK") + trial: Optional[TrialV1] = None + sentry_url: Optional[StrictStr] = Field(default=None, description="Sentry URL", alias="sentryUrl") + domain_authentication_providers: Optional[StrictBool] = Field(default=None, description="If enabled, adds the default providers in their current configuration", alias="domainAuthenticationProviders") + default_ssid: Optional[StrictStr] = Field(default=None, description="The configured Default SSID from /etc/corellium/setup.json", alias="defaultSsid") + coordinator_config: Optional[CoordinatorConfigV1] = Field(default=None, alias="coordinatorConfig") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["onSite", "networkTypes", "networkType", "showDomainSettings", "version", "invalidBuild", "sepSim", "installerAvailable", "invoicedPublishableKey", "stripePublicKey", "intercomId", "gtmId", "billingBackend", "maintenance", "logging", "cloudAdmin", "filesAdmin", "cloudDomain", "billingDomain", "appDomain", "maxNetworkMonitorFileSize", "enableFirmwareImageUpload", "authProviders", "snapshotLimit", "maxKernelSize", "maxRamdiskSize", "charmSDK", "trial", "sentryUrl", "domainAuthenticationProviders", "defaultSsid", "coordinatorConfig"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ConfigResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of logging + if self.logging: + _dict['logging'] = self.logging.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in auth_providers (list) + _items = [] + if self.auth_providers: + for _item_auth_providers in self.auth_providers: + if _item_auth_providers: + _items.append(_item_auth_providers.to_dict()) + _dict['authProviders'] = _items + # override the default output from pydantic by calling `to_dict()` of trial + if self.trial: + _dict['trial'] = self.trial.to_dict() + # override the default output from pydantic by calling `to_dict()` of coordinator_config + if self.coordinator_config: + _dict['coordinatorConfig'] = self.coordinator_config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if on_site (nullable) is None + # and model_fields_set contains the field + if self.on_site is None and "on_site" in self.model_fields_set: + _dict['onSite'] = None + + # set to None if network_types (nullable) is None + # and model_fields_set contains the field + if self.network_types is None and "network_types" in self.model_fields_set: + _dict['networkTypes'] = None + + # set to None if network_type (nullable) is None + # and model_fields_set contains the field + if self.network_type is None and "network_type" in self.model_fields_set: + _dict['networkType'] = None + + # set to None if show_domain_settings (nullable) is None + # and model_fields_set contains the field + if self.show_domain_settings is None and "show_domain_settings" in self.model_fields_set: + _dict['showDomainSettings'] = None + + # set to None if version (nullable) is None + # and model_fields_set contains the field + if self.version is None and "version" in self.model_fields_set: + _dict['version'] = None + + # set to None if invalid_build (nullable) is None + # and model_fields_set contains the field + if self.invalid_build is None and "invalid_build" in self.model_fields_set: + _dict['invalidBuild'] = None + + # set to None if sep_sim (nullable) is None + # and model_fields_set contains the field + if self.sep_sim is None and "sep_sim" in self.model_fields_set: + _dict['sepSim'] = None + + # set to None if installer_available (nullable) is None + # and model_fields_set contains the field + if self.installer_available is None and "installer_available" in self.model_fields_set: + _dict['installerAvailable'] = None + + # set to None if invoiced_publishable_key (nullable) is None + # and model_fields_set contains the field + if self.invoiced_publishable_key is None and "invoiced_publishable_key" in self.model_fields_set: + _dict['invoicedPublishableKey'] = None + + # set to None if stripe_public_key (nullable) is None + # and model_fields_set contains the field + if self.stripe_public_key is None and "stripe_public_key" in self.model_fields_set: + _dict['stripePublicKey'] = None + + # set to None if intercom_id (nullable) is None + # and model_fields_set contains the field + if self.intercom_id is None and "intercom_id" in self.model_fields_set: + _dict['intercomId'] = None + + # set to None if gtm_id (nullable) is None + # and model_fields_set contains the field + if self.gtm_id is None and "gtm_id" in self.model_fields_set: + _dict['gtmId'] = None + + # set to None if billing_backend (nullable) is None + # and model_fields_set contains the field + if self.billing_backend is None and "billing_backend" in self.model_fields_set: + _dict['billingBackend'] = None + + # set to None if maintenance (nullable) is None + # and model_fields_set contains the field + if self.maintenance is None and "maintenance" in self.model_fields_set: + _dict['maintenance'] = None + + # set to None if cloud_admin (nullable) is None + # and model_fields_set contains the field + if self.cloud_admin is None and "cloud_admin" in self.model_fields_set: + _dict['cloudAdmin'] = None + + # set to None if files_admin (nullable) is None + # and model_fields_set contains the field + if self.files_admin is None and "files_admin" in self.model_fields_set: + _dict['filesAdmin'] = None + + # set to None if cloud_domain (nullable) is None + # and model_fields_set contains the field + if self.cloud_domain is None and "cloud_domain" in self.model_fields_set: + _dict['cloudDomain'] = None + + # set to None if billing_domain (nullable) is None + # and model_fields_set contains the field + if self.billing_domain is None and "billing_domain" in self.model_fields_set: + _dict['billingDomain'] = None + + # set to None if app_domain (nullable) is None + # and model_fields_set contains the field + if self.app_domain is None and "app_domain" in self.model_fields_set: + _dict['appDomain'] = None + + # set to None if max_network_monitor_file_size (nullable) is None + # and model_fields_set contains the field + if self.max_network_monitor_file_size is None and "max_network_monitor_file_size" in self.model_fields_set: + _dict['maxNetworkMonitorFileSize'] = None + + # set to None if enable_firmware_image_upload (nullable) is None + # and model_fields_set contains the field + if self.enable_firmware_image_upload is None and "enable_firmware_image_upload" in self.model_fields_set: + _dict['enableFirmwareImageUpload'] = None + + # set to None if auth_providers (nullable) is None + # and model_fields_set contains the field + if self.auth_providers is None and "auth_providers" in self.model_fields_set: + _dict['authProviders'] = None + + # set to None if snapshot_limit (nullable) is None + # and model_fields_set contains the field + if self.snapshot_limit is None and "snapshot_limit" in self.model_fields_set: + _dict['snapshotLimit'] = None + + # set to None if max_kernel_size (nullable) is None + # and model_fields_set contains the field + if self.max_kernel_size is None and "max_kernel_size" in self.model_fields_set: + _dict['maxKernelSize'] = None + + # set to None if max_ramdisk_size (nullable) is None + # and model_fields_set contains the field + if self.max_ramdisk_size is None and "max_ramdisk_size" in self.model_fields_set: + _dict['maxRamdiskSize'] = None + + # set to None if charm_sdk (nullable) is None + # and model_fields_set contains the field + if self.charm_sdk is None and "charm_sdk" in self.model_fields_set: + _dict['charmSDK'] = None + + # set to None if sentry_url (nullable) is None + # and model_fields_set contains the field + if self.sentry_url is None and "sentry_url" in self.model_fields_set: + _dict['sentryUrl'] = None + + # set to None if domain_authentication_providers (nullable) is None + # and model_fields_set contains the field + if self.domain_authentication_providers is None and "domain_authentication_providers" in self.model_fields_set: + _dict['domainAuthenticationProviders'] = None + + # set to None if default_ssid (nullable) is None + # and model_fields_set contains the field + if self.default_ssid is None and "default_ssid" in self.model_fields_set: + _dict['defaultSsid'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ConfigResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "onSite": obj.get("onSite"), + "networkTypes": obj.get("networkTypes"), + "networkType": obj.get("networkType"), + "showDomainSettings": obj.get("showDomainSettings"), + "version": obj.get("version"), + "invalidBuild": obj.get("invalidBuild"), + "sepSim": obj.get("sepSim"), + "installerAvailable": obj.get("installerAvailable"), + "invoicedPublishableKey": obj.get("invoicedPublishableKey"), + "stripePublicKey": obj.get("stripePublicKey"), + "intercomId": obj.get("intercomId"), + "gtmId": obj.get("gtmId"), + "billingBackend": obj.get("billingBackend"), + "maintenance": obj.get("maintenance"), + "logging": LoggingV1.from_dict(obj["logging"]) if obj.get("logging") is not None else None, + "cloudAdmin": obj.get("cloudAdmin"), + "filesAdmin": obj.get("filesAdmin"), + "cloudDomain": obj.get("cloudDomain"), + "billingDomain": obj.get("billingDomain"), + "appDomain": obj.get("appDomain"), + "maxNetworkMonitorFileSize": obj.get("maxNetworkMonitorFileSize"), + "enableFirmwareImageUpload": obj.get("enableFirmwareImageUpload"), + "authProviders": [AuthProviderV1.from_dict(_item) for _item in obj["authProviders"]] if obj.get("authProviders") is not None else None, + "snapshotLimit": obj.get("snapshotLimit"), + "maxKernelSize": obj.get("maxKernelSize"), + "maxRamdiskSize": obj.get("maxRamdiskSize"), + "charmSDK": obj.get("charmSDK"), + "trial": TrialV1.from_dict(obj["trial"]) if obj.get("trial") is not None else None, + "sentryUrl": obj.get("sentryUrl"), + "domainAuthenticationProviders": obj.get("domainAuthenticationProviders"), + "defaultSsid": obj.get("defaultSsid"), + "coordinatorConfig": CoordinatorConfigV1.from_dict(obj["coordinatorConfig"]) if obj.get("coordinatorConfig") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/coordinator_config.py b/corellium/models/coordinator_config.py new file mode 100644 index 0000000..e2ae56a --- /dev/null +++ b/corellium/models/coordinator_config.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CoordinatorConfig(BaseModel): + """ + Partial coordinator configuration to update. + """ # noqa: E501 + usb_media_access_enabled: Optional[StrictBool] = Field(default=None, description="Whether read-only access to removable USB media is enabled.", alias="usbMediaAccessEnabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["usbMediaAccessEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CoordinatorConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CoordinatorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "usbMediaAccessEnabled": obj.get("usbMediaAccessEnabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/coordinator_config_v1.py b/corellium/models/coordinator_config_v1.py new file mode 100644 index 0000000..338e1ce --- /dev/null +++ b/corellium/models/coordinator_config_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CoordinatorConfigV1(BaseModel): + """ + + """ # noqa: E501 + usb_media_access_enabled: Optional[StrictBool] = Field(default=None, description="Designates whether read-only access to removable USB media is enabled", alias="usbMediaAccessEnabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["usbMediaAccessEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CoordinatorConfigV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if usb_media_access_enabled (nullable) is None + # and model_fields_set contains the field + if self.usb_media_access_enabled is None and "usb_media_access_enabled" in self.model_fields_set: + _dict['usbMediaAccessEnabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CoordinatorConfigV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "usbMediaAccessEnabled": obj.get("usbMediaAccessEnabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/coupon_options.py b/corellium/models/coupon_options.py new file mode 100644 index 0000000..7d2af9f --- /dev/null +++ b/corellium/models/coupon_options.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class CouponOptions(BaseModel): + """ + Coupon options + """ # noqa: E501 + type: StrictStr + amount: Union[StrictFloat, StrictInt] = Field(description="Amount") + used: StrictBool = Field(description="Is Used. If true, this coupon has been used and cannot be used again") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "amount", "used"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['percent', 'discount', 'absolute']): + raise ValueError("must be one of enum values ('percent', 'discount', 'absolute')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CouponOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CouponOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "amount": obj.get("amount"), + "used": obj.get("used") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_activity_export_body.py b/corellium/models/create_activity_export_body.py new file mode 100644 index 0000000..1c092e1 --- /dev/null +++ b/corellium/models/create_activity_export_body.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateActivityExportBody(BaseModel): + """ + CreateActivityExportBody + """ # noqa: E501 + resource: Optional[Any] = Field(default=None, description="Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`.") + offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=0, description="Number of results to skip.") + order_by: Optional[Annotated[str, Field(strict=True)]] = Field(default='-createdAt', description="Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first).", alias="orderBy") + instance_id: Optional[StrictStr] = Field(default=None, description="Only activity about this device.", alias="instanceId") + project_id: Optional[StrictStr] = Field(default=None, description="Only activity in this project.", alias="projectId") + actor: Optional[StrictStr] = Field(default=None, description="Only activity performed by this user (user ID).") + search: Optional[StrictStr] = Field(default=None, description="Free-text search. Applied last, as a loose match on the results that pass the other filters.") + to: Optional[datetime] = Field(default=None, description="Only activity at or before this time (ISO 8601).") + var_from: Optional[datetime] = Field(default=None, description="Only activity at or after this time (ISO 8601).", alias="from") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource", "offset", "orderBy", "instanceId", "projectId", "actor", "search", "to", "from"] + + @field_validator('order_by') + def order_by_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^-?[a-zA-Z_]+$", value): + raise ValueError(r"must validate the regular expression /^-?[a-zA-Z_]+$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateActivityExportBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if resource (nullable) is None + # and model_fields_set contains the field + if self.resource is None and "resource" in self.model_fields_set: + _dict['resource'] = None + + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + # set to None if to (nullable) is None + # and model_fields_set contains the field + if self.to is None and "to" in self.model_fields_set: + _dict['to'] = None + + # set to None if var_from (nullable) is None + # and model_fields_set contains the field + if self.var_from is None and "var_from" in self.model_fields_set: + _dict['from'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateActivityExportBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource": obj.get("resource"), + "offset": obj.get("offset") if obj.get("offset") is not None else 0, + "orderBy": obj.get("orderBy") if obj.get("orderBy") is not None else '-createdAt', + "instanceId": obj.get("instanceId"), + "projectId": obj.get("projectId"), + "actor": obj.get("actor"), + "search": obj.get("search"), + "to": obj.get("to"), + "from": obj.get("from") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_activity_export_response.py b/corellium/models/create_activity_export_response.py new file mode 100644 index 0000000..c40567e --- /dev/null +++ b/corellium/models/create_activity_export_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateActivityExportResponse(BaseModel): + """ + CreateActivityExportResponse + """ # noqa: E501 + id: StrictStr = Field(description="Export task ID, in the form `activity-export/`. Pass only the `` part to `v3GetActivityExportStatus` and `v3DownloadActivity`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateActivityExportResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateActivityExportResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_assessment_input.py b/corellium/models/create_assessment_input.py new file mode 100644 index 0000000..e00a773 --- /dev/null +++ b/corellium/models/create_assessment_input.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateAssessmentInput(BaseModel): + """ + CreateAssessmentInput + """ # noqa: E501 + instance_id: StrictStr = Field(description="Identifier of the instance to assess.", alias="instanceId") + bundle_id: StrictStr = Field(description="Bundle identifier of the application to assess.", alias="bundleId") + wordlist_id: Optional[StrictStr] = Field(default=None, description="ID of a wordlist: a plain-text file listing sensitive values (one per line), such as test passwords or account numbers, that MATRIX then looks for while testing the app. Upload the file first with `POST /v3/images` with `instanceId` set to this instance (use `type: \"mast-wordlist\"`), then pass the returned image ID here. The server only checks that an image with this ID exists on the instance, not its type, so make sure you pass the right file. The request fails if the image cannot be found. Deleting the assessment also deletes this file.", alias="wordlistId") + frida_script_id: Optional[StrictStr] = Field(default=None, description="ID of your own Frida script (JavaScript) to load into the app while it is being monitored, for example to bypass certificate pinning or reach code paths that are hard to trigger. Upload it first with `POST /v3/images` with `instanceId` set to this instance (use `type: \"mast-frida\"`). The server only checks that an image with this ID exists on the instance, not its type. The request fails if the image cannot be found. The script is not deleted when the assessment is.", alias="fridaScriptId") + created_by: Optional[StrictStr] = Field(default=None, description="Identifier of the user creating the assessment. Assigned server-side from the auth context; client-supplied values are ignored.", alias="createdBy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["instanceId", "bundleId", "wordlistId", "fridaScriptId", "createdBy"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateAssessmentInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateAssessmentInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instanceId": obj.get("instanceId"), + "bundleId": obj.get("bundleId"), + "wordlistId": obj.get("wordlistId"), + "fridaScriptId": obj.get("fridaScriptId"), + "createdBy": obj.get("createdBy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_cloud_admin_trial_request_body.py b/corellium/models/create_cloud_admin_trial_request_body.py new file mode 100644 index 0000000..efe20f0 --- /dev/null +++ b/corellium/models/create_cloud_admin_trial_request_body.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class CreateCloudAdminTrialRequestBody(BaseModel): + """ + CreateCloudAdminTrialRequestBody + """ # noqa: E501 + email: StrictStr = Field(description="Contact email address.") + name: StrictStr = Field(description="Contact name.") + phone: StrictStr = Field(description="Contact phone number.") + country: StrictStr = Field(description="Country code.") + company: StrictStr = Field(description="Company name.") + industry: StrictStr = Field(description="Industry.") + role: StrictStr = Field(description="Job role.") + solution: Optional[StrictStr] = Field(default=None, description="Solution of interest.") + product_id: StrictStr = Field(description="Stripe product identifier for the trial.", alias="productId") + granted: Optional[StrictBool] = Field(default=None, description="Whether the trial is pre-granted.") + number_of_apps: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of apps.", alias="numberOfApps") + team_size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Team size.", alias="teamSize") + send_email: Optional[StrictBool] = Field(default=None, description="Whether to send the trial-granted email.", alias="sendEmail") + duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Override trial duration in days.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "name", "phone", "country", "company", "industry", "role", "solution", "productId", "granted", "numberOfApps", "teamSize", "sendEmail", "duration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateCloudAdminTrialRequestBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateCloudAdminTrialRequestBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "name": obj.get("name"), + "phone": obj.get("phone"), + "country": obj.get("country"), + "company": obj.get("company"), + "industry": obj.get("industry"), + "role": obj.get("role"), + "solution": obj.get("solution"), + "productId": obj.get("productId"), + "granted": obj.get("granted"), + "numberOfApps": obj.get("numberOfApps"), + "teamSize": obj.get("teamSize"), + "sendEmail": obj.get("sendEmail"), + "duration": obj.get("duration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_domain_auth_provider_body.py b/corellium/models/create_domain_auth_provider_body.py new file mode 100644 index 0000000..359f48d --- /dev/null +++ b/corellium/models/create_domain_auth_provider_body.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.domain_auth_provider_config import DomainAuthProviderConfig +from typing import Optional, Set +from typing_extensions import Self + +class CreateDomainAuthProviderBody(BaseModel): + """ + CreateDomainAuthProviderBody + """ # noqa: E501 + provider_type: StrictStr = Field(description="Provider type.", alias="providerType") + enabled: StrictBool = Field(description="Whether the provider is enabled.") + label: Optional[StrictStr] = Field(default=None, description="Login button text.") + config: Optional[DomainAuthProviderConfig] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["providerType", "enabled", "label", "config"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateDomainAuthProviderBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateDomainAuthProviderBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "enabled": obj.get("enabled"), + "label": obj.get("label"), + "config": DomainAuthProviderConfig.from_dict(obj["config"]) if obj.get("config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_domain_auth_provider_response.py b/corellium/models/create_domain_auth_provider_response.py new file mode 100644 index 0000000..1ccc636 --- /dev/null +++ b/corellium/models/create_domain_auth_provider_response.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.create_domain_auth_provider_response_config import CreateDomainAuthProviderResponseConfig +from typing import Optional, Set +from typing_extensions import Self + +class CreateDomainAuthProviderResponse(BaseModel): + """ + CreateDomainAuthProviderResponse + """ # noqa: E501 + identifier: StrictStr = Field(description="Provider identifier.") + config: Optional[CreateDomainAuthProviderResponseConfig] = None + provider_type: StrictStr = Field(description="Provider type.", alias="providerType") + label: StrictStr = Field(description="Login button text.") + enabled: StrictBool = Field(description="Enabled/Disabled.") + created_by: Optional[StrictStr] = Field(default=None, description="Optional User ID of creator.", alias="createdBy") + default: StrictBool = Field(description="True: configured in coordinator.json, False: custom domain provider.") + created_at: Optional[datetime] = Field(default=None, description="Created date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Updated date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "config", "providerType", "label", "enabled", "createdBy", "default", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateDomainAuthProviderResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['createdBy'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateDomainAuthProviderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "config": CreateDomainAuthProviderResponseConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "providerType": obj.get("providerType"), + "label": obj.get("label"), + "enabled": obj.get("enabled"), + "createdBy": obj.get("createdBy"), + "default": obj.get("default"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_domain_auth_provider_response_config.py b/corellium/models/create_domain_auth_provider_response_config.py new file mode 100644 index 0000000..03426b2 --- /dev/null +++ b/corellium/models/create_domain_auth_provider_response_config.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from corellium.models.ldap_config import LDAPConfig +from corellium.models.open_id_config import OpenIDConfig +from corellium.models.saml_config import SAMLConfig +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +CREATEDOMAINAUTHPROVIDERRESPONSECONFIG_ANY_OF_SCHEMAS = ["LDAPConfig", "OpenIDConfig", "SAMLConfig"] + +class CreateDomainAuthProviderResponseConfig(BaseModel): + """ + Optional configuration. + """ + + # data type: SAMLConfig + anyof_schema_1_validator: Optional[SAMLConfig] = None + # data type: OpenIDConfig + anyof_schema_2_validator: Optional[OpenIDConfig] = None + # data type: LDAPConfig + anyof_schema_3_validator: Optional[LDAPConfig] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[LDAPConfig, OpenIDConfig, SAMLConfig]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "LDAPConfig", "OpenIDConfig", "SAMLConfig" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + if v is None: + return v + + instance = CreateDomainAuthProviderResponseConfig.model_construct() + error_messages = [] + # validate data type: SAMLConfig + if not isinstance(v, SAMLConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `SAMLConfig`") + else: + return v + + # validate data type: OpenIDConfig + if not isinstance(v, OpenIDConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenIDConfig`") + else: + return v + + # validate data type: LDAPConfig + if not isinstance(v, LDAPConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `LDAPConfig`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in CreateDomainAuthProviderResponseConfig with anyOf schemas: LDAPConfig, OpenIDConfig, SAMLConfig. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + # anyof_schema_1_validator: Optional[SAMLConfig] = None + try: + instance.actual_instance = SAMLConfig.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[OpenIDConfig] = None + try: + instance.actual_instance = OpenIDConfig.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[LDAPConfig] = None + try: + instance.actual_instance = LDAPConfig.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateDomainAuthProviderResponseConfig with anyOf schemas: LDAPConfig, OpenIDConfig, SAMLConfig. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LDAPConfig, OpenIDConfig, SAMLConfig]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/create_domain_welcome_message_body.py b/corellium/models/create_domain_welcome_message_body.py new file mode 100644 index 0000000..eb3f526 --- /dev/null +++ b/corellium/models/create_domain_welcome_message_body.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateDomainWelcomeMessageBody(BaseModel): + """ + + """ # noqa: E501 + message: StrictStr = Field(description="The welcome message text (HTML allowed, will be sanitized)") + enabled: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateDomainWelcomeMessageBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateDomainWelcomeMessageBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_hook_body.py b/corellium/models/create_hook_body.py new file mode 100644 index 0000000..551892e --- /dev/null +++ b/corellium/models/create_hook_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.hook_patch_type import HookPatchType +from typing import Optional, Set +from typing_extensions import Self + +class CreateHookBody(BaseModel): + """ + CreateHookBody + """ # noqa: E501 + label: StrictStr = Field(description="Hook label.") + address: StrictStr = Field(description="Memory address to hook.") + patch: StrictStr = Field(description="Patch code to execute.") + patch_type: HookPatchType = Field(alias="patchType") + enabled: Optional[StrictBool] = Field(default=True, description="Whether the hook is active.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["label", "address", "patch", "patchType", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateHookBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateHookBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "address": obj.get("address"), + "patch": obj.get("patch"), + "patchType": obj.get("patchType"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_image_body.py b/corellium/models/create_image_body.py new file mode 100644 index 0000000..0c5bea1 --- /dev/null +++ b/corellium/models/create_image_body.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from corellium.models.image_encoding import ImageEncoding +from corellium.models.image_type import ImageType +from typing import Optional, Set +from typing_extensions import Self + +class CreateImageBody(BaseModel): + """ + CreateImageBody + """ # noqa: E501 + type: ImageType + encoding: ImageEncoding + encapsulated: Optional[StrictBool] = Field(default=None, description="Whether the uploaded file is a ZIP wrapper the server should unzip. Leave this unset or false when you upload a file directly (a one-shot multipart create defaults it to false); only browser-style wrapped uploads set it to true.") + name: Optional[StrictStr] = Field(default=None, description="Name for the image. In a multipart upload it defaults to the filename of the uploaded file; in a JSON request you must supply it. Names do not have to be unique. For `partition` images this must be the name of the partition to replace.") + full_path: Optional[StrictStr] = Field(default=None, description="Not for normal API use. Registers a file that already exists on the server instead of uploading one; it is used by cluster installation tools. Leave it unset.", alias="fullPath") + project_id: Optional[StrictStr] = Field(default=None, description="Optional. Puts the image in this project. You must have access to the project (otherwise 403). Project images count against the project's storage quota. **Lifetime.** The image is deleted automatically when the project is deleted, which makes a scratch project a simple way to clean up test uploads. **Booting from it.** Project firmware images do not appear in `GET /v3/models/{model}/software`. To create a device from one, pass the image `id` as `fwPackage` to `POST /v3/instances`; no install step is needed. Also pass `osVersion` or `osBuild`; if you do not know them, read them from the file first with `POST /v3/images/{imageId}/fwinfo`. Models whose `supportsCustomFirmwareImage` is false reject an image ID in `fwPackage`. Side effect: if the project already holds 5 or more images that are not attached to an instance, the oldest of them is deleted to make room. Ignored when `instanceId` is set: the image then belongs to that instance's project. Leave both unset to create a domain-level image.", alias="projectId") + instance_id: Optional[StrictStr] = Field(default=None, description="Optional. Attaches the image to this instance (device). The instance must exist (otherwise 404), and the image is placed in the instance's project. The instance can be running, paused or off. **Lifetime.** The image is deleted automatically when the instance is deleted. Side effect: any image of the same `type` already attached to the instance is deleted first, so each instance keeps at most one image per type. For `partition` images only the one with the same `name` is replaced. MATRIX types (`mast-*`) are never deleted this way, so a device can keep a history of MATRIX files.", alias="instanceId") + file: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = Field(default=None, description="Multipart requests only: the file contents. Send the `type` and other fields before this part. Omit it (or use a JSON request) to create the record now and upload the contents later.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "encoding", "encapsulated", "name", "fullPath", "projectId", "instanceId", "file"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateImageBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if encapsulated (nullable) is None + # and model_fields_set contains the field + if self.encapsulated is None and "encapsulated" in self.model_fields_set: + _dict['encapsulated'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if full_path (nullable) is None + # and model_fields_set contains the field + if self.full_path is None and "full_path" in self.model_fields_set: + _dict['fullPath'] = None + + # set to None if project_id (nullable) is None + # and model_fields_set contains the field + if self.project_id is None and "project_id" in self.model_fields_set: + _dict['projectId'] = None + + # set to None if instance_id (nullable) is None + # and model_fields_set contains the field + if self.instance_id is None and "instance_id" in self.model_fields_set: + _dict['instanceId'] = None + + # set to None if file (nullable) is None + # and model_fields_set contains the field + if self.file is None and "file" in self.model_fields_set: + _dict['file'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateImageBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "encoding": obj.get("encoding"), + "encapsulated": obj.get("encapsulated"), + "name": obj.get("name"), + "fullPath": obj.get("fullPath"), + "projectId": obj.get("projectId"), + "instanceId": obj.get("instanceId"), + "file": obj.get("file") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_instance_body.py b/corellium/models/create_instance_body.py new file mode 100644 index 0000000..2a07b78 --- /dev/null +++ b/corellium/models/create_instance_body.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.instance_boot_options import InstanceBootOptions +from corellium.models.volume_options import VolumeOptions +from typing import Optional, Set +from typing_extensions import Self + +class CreateInstanceBody(BaseModel): + """ + CreateInstanceBody + """ # noqa: E501 + shared_snapshot: Optional[StrictStr] = Field(default=None, description="Identifier of the snapshot that was shared.", alias="sharedSnapshot") + shared_snapshot_password: Optional[StrictStr] = Field(default=None, description="Password of the shared snapshot named by sharedSnapshot, as set when it was shared. Required when that snapshot was shared with sharing type passwordPublicLink. This is the same value passed as password to POST /v3/snapshots/accept.", alias="sharedSnapshotPassword") + name: Optional[StrictStr] = Field(default=None, description="The name of the device.") + key: Optional[StrictStr] = Field(default=None, description="Key used to encrypt the instance (hex).") + flavor: Optional[StrictStr] = Field(default=None, description="Which device model to create. Use a `flavor` value from `GET /v3/models`.") + project_id: StrictStr = Field(description="Project the device is created in. The device uses that project's quota (cores, memory, device count). Get IDs from `GET /v3/projects`.", alias="projectId") + os_version: Optional[StrictStr] = Field(default=None, description="Operating-system version to install, as listed in `osVersion` by `GET /v3/models/{model}/software`. If you give only `osVersion`, the newest build of that version is used.", alias="osVersion") + os_build: Optional[StrictStr] = Field(default=None, description="Exact build to install, as listed in `osBuild` by `GET /v3/models/{model}/software`. Give it together with `osVersion` to pin one build. You must give at least one of `osVersion` and `osBuild`.", alias="osBuild") + patches: Optional[List[StrictStr]] = Field(default=None, description="List of patches to apply.") + fw_package: Optional[StrictStr] = Field(default=None, description="Optional. Boots a specific firmware file instead of choosing one from the model's software list. Either the `id` of an uploaded `fw` image (for example one in your project, see `POST /v3/images`) or an http(s) URL. When set, it wins over the software list; still pass `osVersion` or `osBuild`. A domain-level image is copied into your project first. Models whose `supportsCustomFirmwareImage` is false reject an image ID here.", alias="fwPackage") + original_firmware_package_url: Optional[StrictStr] = Field(default=None, description="URL that the firmware package is available at.", alias="originalFirmwarePackageUrl") + encrypt: Optional[StrictBool] = Field(default=None, description="Whether to encrypt the instance.") + wifi_mac: Optional[StrictStr] = Field(default=None, description="WiFi MAC address to assign to the instance.", alias="wifiMac") + wan_access: Optional[StrictBool] = Field(default=None, description="Manages internet access.", alias="wanAccess") + volume: Optional[VolumeOptions] = None + snapshot: Optional[StrictStr] = Field(default=None, description="Snapshot ID for this instance to be cloned from if defined.") + boot_options: Optional[InstanceBootOptions] = Field(default=None, alias="bootOptions") + sbs: Optional[StrictBool] = Field(default=None, description="Should attempt to create springboard snapshot.") + charm_boot_args: Optional[List[Dict[str, Any]]] = Field(default=None, description="Optional charm boot args.", alias="charmBootArgs") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharedSnapshot", "sharedSnapshotPassword", "name", "key", "flavor", "projectId", "osVersion", "osBuild", "patches", "fwPackage", "originalFirmwarePackageUrl", "encrypt", "wifiMac", "wanAccess", "volume", "snapshot", "bootOptions", "sbs", "charmBootArgs"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInstanceBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of volume + if self.volume: + _dict['volume'] = self.volume.to_dict() + # override the default output from pydantic by calling `to_dict()` of boot_options + if self.boot_options: + _dict['bootOptions'] = self.boot_options.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInstanceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharedSnapshot": obj.get("sharedSnapshot"), + "sharedSnapshotPassword": obj.get("sharedSnapshotPassword"), + "name": obj.get("name"), + "key": obj.get("key"), + "flavor": obj.get("flavor"), + "projectId": obj.get("projectId"), + "osVersion": obj.get("osVersion"), + "osBuild": obj.get("osBuild"), + "patches": obj.get("patches"), + "fwPackage": obj.get("fwPackage"), + "originalFirmwarePackageUrl": obj.get("originalFirmwarePackageUrl"), + "encrypt": obj.get("encrypt"), + "wifiMac": obj.get("wifiMac"), + "wanAccess": obj.get("wanAccess"), + "volume": VolumeOptions.from_dict(obj["volume"]) if obj.get("volume") is not None else None, + "snapshot": obj.get("snapshot"), + "bootOptions": InstanceBootOptions.from_dict(obj["bootOptions"]) if obj.get("bootOptions") is not None else None, + "sbs": obj.get("sbs"), + "charmBootArgs": obj.get("charmBootArgs") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_instance_response.py b/corellium/models/create_instance_response.py new file mode 100644 index 0000000..6f1ae50 --- /dev/null +++ b/corellium/models/create_instance_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateInstanceResponse(BaseModel): + """ + CreateInstanceResponse + """ # noqa: E501 + id: StrictStr = Field(description="Instance ID.") + state: StrictStr = Field(description="Instance state. Always \"creating\" for a freshly created instance.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['creating']): + raise ValueError("must be one of enum values ('creating')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInstanceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInstanceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_interconnect_body.py b/corellium/models/create_interconnect_body.py new file mode 100644 index 0000000..3e35191 --- /dev/null +++ b/corellium/models/create_interconnect_body.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateInterconnectBody(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="The name of the interconnect") + protocol: StrictStr = Field(description="The protocol used by the interconnect") + type: StrictStr = Field(description="The type of interconnect") + project: StrictStr = Field(description="The UUID of the project") + interfaces: List[StrictStr] = Field(description="Array of instance identifiers") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "protocol", "type", "project", "interfaces"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['hub', 'switch']): + raise ValueError("must be one of enum values ('hub', 'switch')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInterconnectBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInterconnectBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "protocol": obj.get("protocol"), + "type": obj.get("type"), + "project": obj.get("project"), + "interfaces": obj.get("interfaces") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_interconnect_v3_body.py b/corellium/models/create_interconnect_v3_body.py new file mode 100644 index 0000000..50e233b --- /dev/null +++ b/corellium/models/create_interconnect_v3_body.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.interconnect_protocol import InterconnectProtocol +from corellium.models.interfaces_schema_inner import InterfacesSchemaInner +from typing import Optional, Set +from typing_extensions import Self + +class CreateInterconnectV3Body(BaseModel): + """ + CreateInterconnectV3Body + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A name to recognise the interconnect by.") + type: StrictStr = Field(description="How the interconnect behaves: `hub` passes every signal to every connected interface; `switch` routes traffic between endpoints.") + interfaces: List[InterfacesSchemaInner] + project_id: StrictStr = Field(description="Project the interconnect belongs to. Every device listed in `interfaces` must be in this project, otherwise the request fails with 400. Cannot be changed later.", alias="projectId") + protocol: InterconnectProtocol + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "type", "interfaces", "projectId", "protocol"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['hub', 'switch']): + raise ValueError("must be one of enum values ('hub', 'switch')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInterconnectV3Body from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in interfaces (list) + _items = [] + if self.interfaces: + for _item_interfaces in self.interfaces: + if _item_interfaces: + _items.append(_item_interfaces.to_dict()) + _dict['interfaces'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInterconnectV3Body from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type"), + "interfaces": [InterfacesSchemaInner.from_dict(_item) for _item in obj["interfaces"]] if obj.get("interfaces") is not None else None, + "projectId": obj.get("projectId"), + "protocol": obj.get("protocol") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_invites_body.py b/corellium/models/create_invites_body.py new file mode 100644 index 0000000..628cef8 --- /dev/null +++ b/corellium/models/create_invites_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.invite_settings import InviteSettings +from typing import Optional, Set +from typing_extensions import Self + +class CreateInvitesBody(BaseModel): + """ + CreateInvitesBody + """ # noqa: E501 + email: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Emails to invite.") + resend: Optional[StrictBool] = Field(default=None, description="Resend the invite if it already exists.") + settings: Optional[InviteSettings] = Field(default=None, description="Settings applied to the created invites.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "resend", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateInvitesBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateInvitesBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "resend": obj.get("resend"), + "settings": InviteSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_network_connection_body.py b/corellium/models/create_network_connection_body.py new file mode 100644 index 0000000..a1c291a --- /dev/null +++ b/corellium/models/create_network_connection_body.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corellium.models.create_open_vpn_network_connection_body import CreateOpenVPNNetworkConnectionBody +from corellium.models.create_vlan_network_connection_body import CreateVLANNetworkConnectionBody +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATENETWORKCONNECTIONBODY_ONE_OF_SCHEMAS = ["CreateOpenVPNNetworkConnectionBody", "CreateVLANNetworkConnectionBody"] + +class CreateNetworkConnectionBody(BaseModel): + """ + CreateNetworkConnectionBody + """ + # data type: CreateOpenVPNNetworkConnectionBody + oneof_schema_1_validator: Optional[CreateOpenVPNNetworkConnectionBody] = None + # data type: CreateVLANNetworkConnectionBody + oneof_schema_2_validator: Optional[CreateVLANNetworkConnectionBody] = None + actual_instance: Optional[Union[CreateOpenVPNNetworkConnectionBody, CreateVLANNetworkConnectionBody]] = None + one_of_schemas: Set[str] = { "CreateOpenVPNNetworkConnectionBody", "CreateVLANNetworkConnectionBody" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = CreateNetworkConnectionBody.model_construct() + error_messages = [] + match = 0 + # validate data type: CreateOpenVPNNetworkConnectionBody + if not isinstance(v, CreateOpenVPNNetworkConnectionBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateOpenVPNNetworkConnectionBody`") + else: + match += 1 + # validate data type: CreateVLANNetworkConnectionBody + if not isinstance(v, CreateVLANNetworkConnectionBody): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateVLANNetworkConnectionBody`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in CreateNetworkConnectionBody with oneOf schemas: CreateOpenVPNNetworkConnectionBody, CreateVLANNetworkConnectionBody. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CreateNetworkConnectionBody with oneOf schemas: CreateOpenVPNNetworkConnectionBody, CreateVLANNetworkConnectionBody. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("provider") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `provider` in the input.") + + # check if data type is `CreateOpenVPNNetworkConnectionBody` + if _data_type == "openvpn": + instance.actual_instance = CreateOpenVPNNetworkConnectionBody.from_json(json_str) + return instance + + # check if data type is `CreateVLANNetworkConnectionBody` + if _data_type == "vlan": + instance.actual_instance = CreateVLANNetworkConnectionBody.from_json(json_str) + return instance + + # deserialize data into CreateOpenVPNNetworkConnectionBody + try: + instance.actual_instance = CreateOpenVPNNetworkConnectionBody.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CreateVLANNetworkConnectionBody + try: + instance.actual_instance = CreateVLANNetworkConnectionBody.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into CreateNetworkConnectionBody with oneOf schemas: CreateOpenVPNNetworkConnectionBody, CreateVLANNetworkConnectionBody. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateNetworkConnectionBody with oneOf schemas: CreateOpenVPNNetworkConnectionBody, CreateVLANNetworkConnectionBody. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreateOpenVPNNetworkConnectionBody, CreateVLANNetworkConnectionBody]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/create_network_connection_options.py b/corellium/models/create_network_connection_options.py new file mode 100644 index 0000000..268ff0e --- /dev/null +++ b/corellium/models/create_network_connection_options.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corellium.models.create_open_vpn_network_connection_body_v1 import CreateOpenVPNNetworkConnectionBodyV1 +from corellium.models.create_vlan_network_connection_body_v1 import CreateVLANNetworkConnectionBodyV1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +CREATENETWORKCONNECTIONOPTIONS_ONE_OF_SCHEMAS = ["CreateOpenVPNNetworkConnectionBodyV1", "CreateVLANNetworkConnectionBodyV1"] + +class CreateNetworkConnectionOptions(BaseModel): + """ + Provider-discriminated create body for a network connection. + """ + # data type: CreateOpenVPNNetworkConnectionBodyV1 + oneof_schema_1_validator: Optional[CreateOpenVPNNetworkConnectionBodyV1] = None + # data type: CreateVLANNetworkConnectionBodyV1 + oneof_schema_2_validator: Optional[CreateVLANNetworkConnectionBodyV1] = None + actual_instance: Optional[Union[CreateOpenVPNNetworkConnectionBodyV1, CreateVLANNetworkConnectionBodyV1]] = None + one_of_schemas: Set[str] = { "CreateOpenVPNNetworkConnectionBodyV1", "CreateVLANNetworkConnectionBodyV1" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = CreateNetworkConnectionOptions.model_construct() + error_messages = [] + match = 0 + # validate data type: CreateOpenVPNNetworkConnectionBodyV1 + if not isinstance(v, CreateOpenVPNNetworkConnectionBodyV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateOpenVPNNetworkConnectionBodyV1`") + else: + match += 1 + # validate data type: CreateVLANNetworkConnectionBodyV1 + if not isinstance(v, CreateVLANNetworkConnectionBodyV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateVLANNetworkConnectionBodyV1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in CreateNetworkConnectionOptions with oneOf schemas: CreateOpenVPNNetworkConnectionBodyV1, CreateVLANNetworkConnectionBodyV1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in CreateNetworkConnectionOptions with oneOf schemas: CreateOpenVPNNetworkConnectionBodyV1, CreateVLANNetworkConnectionBodyV1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("provider") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `provider` in the input.") + + # check if data type is `CreateOpenVPNNetworkConnectionBodyV1` + if _data_type == "openvpn": + instance.actual_instance = CreateOpenVPNNetworkConnectionBodyV1.from_json(json_str) + return instance + + # check if data type is `CreateVLANNetworkConnectionBodyV1` + if _data_type == "vlan": + instance.actual_instance = CreateVLANNetworkConnectionBodyV1.from_json(json_str) + return instance + + # deserialize data into CreateOpenVPNNetworkConnectionBodyV1 + try: + instance.actual_instance = CreateOpenVPNNetworkConnectionBodyV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CreateVLANNetworkConnectionBodyV1 + try: + instance.actual_instance = CreateVLANNetworkConnectionBodyV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into CreateNetworkConnectionOptions with oneOf schemas: CreateOpenVPNNetworkConnectionBodyV1, CreateVLANNetworkConnectionBodyV1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into CreateNetworkConnectionOptions with oneOf schemas: CreateOpenVPNNetworkConnectionBodyV1, CreateVLANNetworkConnectionBodyV1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreateOpenVPNNetworkConnectionBodyV1, CreateVLANNetworkConnectionBodyV1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/create_open_vpn_network_connection_body.py b/corellium/models/create_open_vpn_network_connection_body.py new file mode 100644 index 0000000..46e5a74 --- /dev/null +++ b/corellium/models/create_open_vpn_network_connection_body.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from corellium.models.open_vpn_config import OpenVPNConfig +from typing import Optional, Set +from typing_extensions import Self + +class CreateOpenVPNNetworkConnectionBody(BaseModel): + """ + CreateOpenVPNNetworkConnectionBody + """ # noqa: E501 + name: StrictStr = Field(description="User friendly name for network connection.") + provider: StrictStr = Field(description="Type of network connection.") + config: OpenVPNConfig + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "provider", "config"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['openvpn']): + raise ValueError("must be one of enum values ('openvpn')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateOpenVPNNetworkConnectionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateOpenVPNNetworkConnectionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "provider": obj.get("provider"), + "config": OpenVPNConfig.from_dict(obj["config"]) if obj.get("config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_open_vpn_network_connection_body_v1.py b/corellium/models/create_open_vpn_network_connection_body_v1.py new file mode 100644 index 0000000..dd72a13 --- /dev/null +++ b/corellium/models/create_open_vpn_network_connection_body_v1.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from corellium.models.open_vpn_config_v1 import OpenVPNConfigV1 +from typing import Optional, Set +from typing_extensions import Self + +class CreateOpenVPNNetworkConnectionBodyV1(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="User friendly name for network connection.") + provider: StrictStr = Field(description="Type of network connection.") + config: OpenVPNConfigV1 + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "provider", "config"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['openvpn']): + raise ValueError("must be one of enum values ('openvpn')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateOpenVPNNetworkConnectionBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateOpenVPNNetworkConnectionBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "provider": obj.get("provider"), + "config": OpenVPNConfigV1.from_dict(obj["config"]) if obj.get("config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_project_body.py b/corellium/models/create_project_body.py new file mode 100644 index 0000000..0726287 --- /dev/null +++ b/corellium/models/create_project_body.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.project_quota_input import ProjectQuotaInput +from corellium.models.project_settings import ProjectSettings +from typing import Optional, Set +from typing_extensions import Self + +class CreateProjectBody(BaseModel): + """ + CreateProjectBody + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Project name.") + color: Optional[StrictInt] = Field(default=None, description="Project display color.") + settings: Optional[ProjectSettings] = Field(default=None, description="Initial project settings.") + quotas: Optional[ProjectQuotaInput] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "color", "settings", "quotas"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateProjectBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateProjectBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "color": obj.get("color"), + "settings": ProjectSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "quotas": ProjectQuotaInput.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_project_key_body.py b/corellium/models/create_project_key_body.py new file mode 100644 index 0000000..6b88af4 --- /dev/null +++ b/corellium/models/create_project_key_body.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateProjectKeyBody(BaseModel): + """ + CreateProjectKeyBody + """ # noqa: E501 + kind: StrictStr = Field(description="Kind of authorized key: an SSH key for SSH-based devices or an ADB key for Android.") + label: Optional[StrictStr] = Field(default=None, description="Descriptive label for the key.") + key: StrictStr = Field(description="The public key authorized to access devices in the project, in OpenSSH authorized_keys format.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kind", "label", "key"] + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ssh', 'adb']): + raise ValueError("must be one of enum values ('ssh', 'adb')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateProjectKeyBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateProjectKeyBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kind": obj.get("kind"), + "label": obj.get("label"), + "key": obj.get("key") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_snapshot_body.py b/corellium/models/create_snapshot_body.py new file mode 100644 index 0000000..826996d --- /dev/null +++ b/corellium/models/create_snapshot_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateSnapshotBody(BaseModel): + """ + CreateSnapshotBody + """ # noqa: E501 + name: StrictStr = Field(description="A name to recognise the snapshot by later, for example what state the device was in.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateSnapshotBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateSnapshotBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_team.py b/corellium/models/create_team.py new file mode 100644 index 0000000..7c36d31 --- /dev/null +++ b/corellium/models/create_team.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateTeam(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="Team name") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTeam from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTeam from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_team_body.py b/corellium/models/create_team_body.py new file mode 100644 index 0000000..d76d14d --- /dev/null +++ b/corellium/models/create_team_body.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateTeamBody(BaseModel): + """ + CreateTeamBody + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Team name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTeamBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTeamBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_trial_request_body.py b/corellium/models/create_trial_request_body.py new file mode 100644 index 0000000..35e66a6 --- /dev/null +++ b/corellium/models/create_trial_request_body.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateTrialRequestBody(BaseModel): + """ + CreateTrialRequestBody + """ # noqa: E501 + email: StrictStr = Field(description="Requester email.") + name: StrictStr = Field(description="Requester full name.") + phone: StrictStr = Field(description="Requester phone number.") + country: StrictStr = Field(description="Requester country.") + type: StrictStr = Field(description="Trial request type.") + company: StrictStr = Field(description="Company name.") + industry: StrictStr = Field(description="Industry.") + role: StrictStr = Field(description="Requester role.") + solution: StrictStr = Field(description="Solution of interest.") + product_id: StrictStr = Field(description="Trial product identifier.", alias="productId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "name", "phone", "country", "type", "company", "industry", "role", "solution", "productId"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['individual', 'enterprise']): + raise ValueError("must be one of enum values ('individual', 'enterprise')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTrialRequestBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTrialRequestBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "name": obj.get("name"), + "phone": obj.get("phone"), + "country": obj.get("country"), + "type": obj.get("type"), + "company": obj.get("company"), + "industry": obj.get("industry"), + "role": obj.get("role"), + "solution": obj.get("solution"), + "productId": obj.get("productId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_trial_request_response.py b/corellium/models/create_trial_request_response.py new file mode 100644 index 0000000..b91c245 --- /dev/null +++ b/corellium/models/create_trial_request_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from corellium.models.create_trial_request_response_trial_request import CreateTrialRequestResponseTrialRequest +from typing import Optional, Set +from typing_extensions import Self + +class CreateTrialRequestResponse(BaseModel): + """ + CreateTrialRequestResponse + """ # noqa: E501 + trial_request: CreateTrialRequestResponseTrialRequest = Field(alias="trialRequest") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["trialRequest"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTrialRequestResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trial_request + if self.trial_request: + _dict['trialRequest'] = self.trial_request.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTrialRequestResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "trialRequest": CreateTrialRequestResponseTrialRequest.from_dict(obj["trialRequest"]) if obj.get("trialRequest") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_trial_request_response_trial_request.py b/corellium/models/create_trial_request_response_trial_request.py new file mode 100644 index 0000000..464cfd0 --- /dev/null +++ b/corellium/models/create_trial_request_response_trial_request.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CreateTrialRequestResponseTrialRequest(BaseModel): + """ + Created trial request info. + """ # noqa: E501 + identifier: StrictStr = Field(description="Trial request identifier.") + email: StrictStr = Field(description="Contact email.") + name: StrictStr = Field(description="Contact name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "email", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateTrialRequestResponseTrialRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateTrialRequestResponseTrialRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "email": obj.get("email"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_user_body.py b/corellium/models/create_user_body.py new file mode 100644 index 0000000..e1d9c7e --- /dev/null +++ b/corellium/models/create_user_body.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateUserBody(BaseModel): + """ + CreateUserBody + """ # noqa: E501 + password: Optional[StrictStr] = Field(default=None, description="Password (optional when using SSO).") + administrator: Optional[StrictBool] = Field(default=None, description="Whether the user is a domain administrator (domain admins only).") + name: StrictStr = Field(description="Username.") + label: StrictStr = Field(description="User label (e.g. \"Domain Administrator\").") + email: Optional[StrictStr] = Field(default=None, description="User email.") + cluster_administrator: Optional[StrictBool] = Field(default=None, description="Whether the user is a cluster administrator (cluster admins only).", alias="clusterAdministrator") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password", "administrator", "name", "label", "email", "clusterAdministrator"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateUserBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateUserBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "administrator": obj.get("administrator"), + "name": obj.get("name"), + "label": obj.get("label"), + "email": obj.get("email"), + "clusterAdministrator": obj.get("clusterAdministrator") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_vlan_network_connection_body.py b/corellium/models/create_vlan_network_connection_body.py new file mode 100644 index 0000000..c55d6e9 --- /dev/null +++ b/corellium/models/create_vlan_network_connection_body.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from corellium.models.vlan_config import VLANConfig +from typing import Optional, Set +from typing_extensions import Self + +class CreateVLANNetworkConnectionBody(BaseModel): + """ + CreateVLANNetworkConnectionBody + """ # noqa: E501 + name: StrictStr = Field(description="User friendly name for network connection.") + provider: StrictStr = Field(description="Type of network connection.") + config: VLANConfig + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "provider", "config"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vlan']): + raise ValueError("must be one of enum values ('vlan')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateVLANNetworkConnectionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateVLANNetworkConnectionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "provider": obj.get("provider"), + "config": VLANConfig.from_dict(obj["config"]) if obj.get("config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_vlan_network_connection_body_v1.py b/corellium/models/create_vlan_network_connection_body_v1.py new file mode 100644 index 0000000..d1ff84a --- /dev/null +++ b/corellium/models/create_vlan_network_connection_body_v1.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from corellium.models.vlan_config_v1 import VLANConfigV1 +from typing import Optional, Set +from typing_extensions import Self + +class CreateVLANNetworkConnectionBodyV1(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="User friendly name for network connection.") + provider: StrictStr = Field(description="Type of network connection.") + config: VLANConfigV1 + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "provider", "config"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vlan']): + raise ValueError("must be one of enum values ('vlan')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateVLANNetworkConnectionBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateVLANNetworkConnectionBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "provider": obj.get("provider"), + "config": VLANConfigV1.from_dict(obj["config"]) if obj.get("config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/create_web_player_session_body.py b/corellium/models/create_web_player_session_body.py new file mode 100644 index 0000000..f0ed544 --- /dev/null +++ b/corellium/models/create_web_player_session_body.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.web_player_features import WebPlayerFeatures +from typing import Optional, Set +from typing_extensions import Self + +class CreateWebPlayerSessionBody(BaseModel): + """ + CreateWebPlayerSessionBody + """ # noqa: E501 + project_id: StrictStr = Field(description="Project the device is in.", alias="projectId") + instance_id: StrictStr = Field(description="The device (instance) the viewer will see and control.", alias="instanceId") + expires_in: Annotated[int, Field(strict=True, ge=1800)] = Field(description="How long the session token stays valid, in seconds. At least 1800 (30 minutes). Renewing the token keeps the same length.", alias="expiresIn") + features: WebPlayerFeatures + client_id: Optional[StrictStr] = Field(default=None, description="Optional client-supplied tracking string.", alias="clientId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["projectId", "instanceId", "expiresIn", "features", "clientId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateWebPlayerSessionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of features + if self.features: + _dict['features'] = self.features.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateWebPlayerSessionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "instanceId": obj.get("instanceId"), + "expiresIn": obj.get("expiresIn"), + "features": WebPlayerFeatures.from_dict(obj["features"]) if obj.get("features") is not None else None, + "clientId": obj.get("clientId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/created_by.py b/corellium/models/created_by.py new file mode 100644 index 0000000..5c172ae --- /dev/null +++ b/corellium/models/created_by.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreatedBy(BaseModel): + """ + + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="User Identifier") + username: Optional[StrictStr] = Field(default=None, description="Username") + label: Optional[StrictStr] = Field(default=None, description="User Label") + deleted: Optional[StrictBool] = Field(default=None, description="Indicates if user was deleted") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "username", "label", "deleted"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatedBy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if deleted (nullable) is None + # and model_fields_set contains the field + if self.deleted is None and "deleted" in self.model_fields_set: + _dict['deleted'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatedBy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "username": obj.get("username"), + "label": obj.get("label"), + "deleted": obj.get("deleted") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/credentials.py b/corellium/models/credentials.py new file mode 100644 index 0000000..2a73e77 --- /dev/null +++ b/corellium/models/credentials.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, SecretStr, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Credentials(BaseModel): + """ + + """ # noqa: E501 + username: StrictStr = Field(description="Account username. Send together with password.") + password: SecretStr = Field(description="Account password. Send together with username.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Credentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Credentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/delete_modification_input.py b/corellium/models/delete_modification_input.py new file mode 100644 index 0000000..541bf63 --- /dev/null +++ b/corellium/models/delete_modification_input.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DeleteModificationInput(BaseModel): + """ + DeleteModificationInput + """ # noqa: E501 + check_id: StrictStr = Field(description="Identifier of the check whose modification is removed.", alias="checkId") + var_property: StrictStr = Field(description="Property of the check whose modification is removed: \"outcome\", \"severity\", or \"evidence_\".", alias="property") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["checkId", "property"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteModificationInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteModificationInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checkId": obj.get("checkId"), + "property": obj.get("property") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/delete_network_connection_options.py b/corellium/models/delete_network_connection_options.py new file mode 100644 index 0000000..5a092e4 --- /dev/null +++ b/corellium/models/delete_network_connection_options.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DeleteNetworkConnectionOptions(BaseModel): + """ + + """ # noqa: E501 + force: Optional[StrictBool] = Field(default=None, description="Force the deletion through constraint checks (e.g. stopping active instances). Defaults to false.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["force"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteNetworkConnectionOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if force (nullable) is None + # and model_fields_set contains the field + if self.force is None and "force" in self.model_fields_set: + _dict['force'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteNetworkConnectionOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "force": obj.get("force") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/deployment_version.py b/corellium/models/deployment_version.py new file mode 100644 index 0000000..5376deb --- /dev/null +++ b/corellium/models/deployment_version.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeploymentVersion(BaseModel): + """ + Version and build identity of the running deployment. + """ # noqa: E501 + product_version: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Deployed Corellium product version.", alias="productVersion") + coordinator_version: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(description="Coordinator artifact version.", alias="coordinatorVersion") + build_commit: Optional[Annotated[str, Field(strict=True)]] = Field(description="Full coordinator source commit SHA.", alias="buildCommit") + build_date: Optional[datetime] = Field(description="Coordinator artifact build time in RFC 3339 UTC format.", alias="buildDate") + __properties: ClassVar[List[str]] = ["productVersion", "coordinatorVersion", "buildCommit", "buildDate"] + + @field_validator('build_commit') + def build_commit_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{40}$", value): + raise ValueError(r"must validate the regular expression /^[0-9a-f]{40}$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeploymentVersion from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if coordinator_version (nullable) is None + # and model_fields_set contains the field + if self.coordinator_version is None and "coordinator_version" in self.model_fields_set: + _dict['coordinatorVersion'] = None + + # set to None if build_commit (nullable) is None + # and model_fields_set contains the field + if self.build_commit is None and "build_commit" in self.model_fields_set: + _dict['buildCommit'] = None + + # set to None if build_date (nullable) is None + # and model_fields_set contains the field + if self.build_date is None and "build_date" in self.model_fields_set: + _dict['buildDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeploymentVersion from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "productVersion": obj.get("productVersion"), + "coordinatorVersion": obj.get("coordinatorVersion"), + "buildCommit": obj.get("buildCommit"), + "buildDate": obj.get("buildDate") + }) + return _obj + + diff --git a/corellium/models/detach_interface_body.py b/corellium/models/detach_interface_body.py new file mode 100644 index 0000000..0458ef2 --- /dev/null +++ b/corellium/models/detach_interface_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DetachInterfaceBody(BaseModel): + """ + DetachInterfaceBody + """ # noqa: E501 + interconnect_id: StrictStr = Field(description="Interconnect identifier.", alias="interconnectId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interconnectId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DetachInterfaceBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DetachInterfaceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interconnectId": obj.get("interconnectId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/detach_interface_request.py b/corellium/models/detach_interface_request.py new file mode 100644 index 0000000..4b86640 --- /dev/null +++ b/corellium/models/detach_interface_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DetachInterfaceRequest(BaseModel): + """ + + """ # noqa: E501 + interconnect_id: StrictStr = Field(description="Interconnect identifier", alias="interconnectId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interconnectId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DetachInterfaceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DetachInterfaceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interconnectId": obj.get("interconnectId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/device.py b/corellium/models/device.py new file mode 100644 index 0000000..600c75c --- /dev/null +++ b/corellium/models/device.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Device(BaseModel): + """ + + """ # noqa: E501 + type: StrictStr + model: StrictStr + name: StrictStr + platform: Optional[StrictStr] = None + hwmodel: Optional[StrictStr] = None + bdid: Optional[StrictStr] = None + cpid: Optional[StrictStr] = None + created_at: Optional[StrictStr] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictStr] = Field(default=None, alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "model", "name", "platform", "hwmodel", "bdid", "cpid", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Device from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if platform (nullable) is None + # and model_fields_set contains the field + if self.platform is None and "platform" in self.model_fields_set: + _dict['platform'] = None + + # set to None if hwmodel (nullable) is None + # and model_fields_set contains the field + if self.hwmodel is None and "hwmodel" in self.model_fields_set: + _dict['hwmodel'] = None + + # set to None if bdid (nullable) is None + # and model_fields_set contains the field + if self.bdid is None and "bdid" in self.model_fields_set: + _dict['bdid'] = None + + # set to None if cpid (nullable) is None + # and model_fields_set contains the field + if self.cpid is None and "cpid" in self.model_fields_set: + _dict['cpid'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Device from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "model": obj.get("model"), + "name": obj.get("name"), + "platform": obj.get("platform"), + "hwmodel": obj.get("hwmodel"), + "bdid": obj.get("bdid"), + "cpid": obj.get("cpid"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/device_auto_shutdown_schema.py b/corellium/models/device_auto_shutdown_schema.py new file mode 100644 index 0000000..6d4dd96 --- /dev/null +++ b/corellium/models/device_auto_shutdown_schema.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeviceAutoShutdownSchema(BaseModel): + """ + DeviceAutoShutdownSchema + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether devices in this domain are turned off automatically after running for `threshold` hours. Turning a device back on restarts its timer.") + threshold: Optional[Annotated[int, Field(strict=True, gt=0)]] = Field(default=None, description="Hours a device may run, counted from when it was last started, before it is turned off automatically. This is running time, not idle time: a device in active use is still stopped when the time is up. Whole number greater than 0. Defaults to 10 when not set.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "threshold"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeviceAutoShutdownSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceAutoShutdownSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "threshold": obj.get("threshold") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/device_usage.py b/corellium/models/device_usage.py new file mode 100644 index 0000000..53c6d1f --- /dev/null +++ b/corellium/models/device_usage.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class DeviceUsage(BaseModel): + """ + DeviceUsage + """ # noqa: E501 + hours_used: Optional[Union[StrictFloat, StrictInt]] = Field(description="Device hours used.", alias="hoursUsed") + hours_max: Optional[Union[StrictFloat, StrictInt]] = Field(description="Device hours allowed.", alias="hoursMax") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hoursUsed", "hoursMax"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeviceUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if hours_used (nullable) is None + # and model_fields_set contains the field + if self.hours_used is None and "hours_used" in self.model_fields_set: + _dict['hoursUsed'] = None + + # set to None if hours_max (nullable) is None + # and model_fields_set contains the field + if self.hours_max is None and "hours_max" in self.model_fields_set: + _dict['hoursMax'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hoursUsed": obj.get("hoursUsed"), + "hoursMax": obj.get("hoursMax") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_auth_provider_config.py b/corellium/models/domain_auth_provider_config.py new file mode 100644 index 0000000..4505187 --- /dev/null +++ b/corellium/models/domain_auth_provider_config.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from corellium.models.ldap_config import LDAPConfig +from corellium.models.open_id_config import OpenIDConfig +from corellium.models.saml_config import SAMLConfig +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +DOMAINAUTHPROVIDERCONFIG_ANY_OF_SCHEMAS = ["LDAPConfig", "OpenIDConfig", "SAMLConfig"] + +class DomainAuthProviderConfig(BaseModel): + """ + Optional configuration. + """ + + # data type: SAMLConfig + anyof_schema_1_validator: Optional[SAMLConfig] = None + # data type: OpenIDConfig + anyof_schema_2_validator: Optional[OpenIDConfig] = None + # data type: LDAPConfig + anyof_schema_3_validator: Optional[LDAPConfig] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[LDAPConfig, OpenIDConfig, SAMLConfig]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "LDAPConfig", "OpenIDConfig", "SAMLConfig" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = DomainAuthProviderConfig.model_construct() + error_messages = [] + # validate data type: SAMLConfig + if not isinstance(v, SAMLConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `SAMLConfig`") + else: + return v + + # validate data type: OpenIDConfig + if not isinstance(v, OpenIDConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenIDConfig`") + else: + return v + + # validate data type: LDAPConfig + if not isinstance(v, LDAPConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `LDAPConfig`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in DomainAuthProviderConfig with anyOf schemas: LDAPConfig, OpenIDConfig, SAMLConfig. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[SAMLConfig] = None + try: + instance.actual_instance = SAMLConfig.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[OpenIDConfig] = None + try: + instance.actual_instance = OpenIDConfig.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[LDAPConfig] = None + try: + instance.actual_instance = LDAPConfig.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into DomainAuthProviderConfig with anyOf schemas: LDAPConfig, OpenIDConfig, SAMLConfig. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], LDAPConfig, OpenIDConfig, SAMLConfig]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/domain_auth_provider_request.py b/corellium/models/domain_auth_provider_request.py new file mode 100644 index 0000000..a3fa2c2 --- /dev/null +++ b/corellium/models/domain_auth_provider_request.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.open_id_config_v1 import OpenIDConfigV1 +from typing import Optional, Set +from typing_extensions import Self + +class DomainAuthProviderRequest(BaseModel): + """ + + """ # noqa: E501 + provider_type: StrictStr = Field(description="Provider Type", alias="providerType") + enabled: StrictBool = Field(description="Enabled/Disabled") + label: Optional[StrictStr] = Field(default=None, description="Login Button Text") + config: Optional[OpenIDConfigV1] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["providerType", "enabled", "label", "config"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAuthProviderRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAuthProviderRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "enabled": obj.get("enabled"), + "label": obj.get("label"), + "config": OpenIDConfigV1.from_dict(obj["config"]) if obj.get("config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_auth_provider_response.py b/corellium/models/domain_auth_provider_response.py new file mode 100644 index 0000000..a27391e --- /dev/null +++ b/corellium/models/domain_auth_provider_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.create_domain_auth_provider_response_config import CreateDomainAuthProviderResponseConfig +from typing import Optional, Set +from typing_extensions import Self + +class DomainAuthProviderResponse(BaseModel): + """ + DomainAuthProviderResponse + """ # noqa: E501 + identifier: StrictStr = Field(description="Provider identifier.") + config: Optional[CreateDomainAuthProviderResponseConfig] = None + provider_type: StrictStr = Field(description="Provider type.", alias="providerType") + label: StrictStr = Field(description="Login button text.") + enabled: StrictBool = Field(description="Enabled/Disabled.") + created_by: Optional[StrictStr] = Field(default=None, description="Optional User ID of creator.", alias="createdBy") + default: StrictBool = Field(description="True: configured in coordinator.json, False: custom domain provider.") + authorization_url: Optional[StrictStr] = Field(default=None, description="Coordinator endpoint for Authorizing with this provider.", alias="authorizationUrl") + name: Optional[StrictStr] = Field(default=None, description="Provider name for a given provider type.") + created_at: Optional[datetime] = Field(default=None, description="Created date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Updated date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "config", "providerType", "label", "enabled", "createdBy", "default", "authorizationUrl", "name", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAuthProviderResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['createdBy'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAuthProviderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "config": CreateDomainAuthProviderResponseConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "providerType": obj.get("providerType"), + "label": obj.get("label"), + "enabled": obj.get("enabled"), + "createdBy": obj.get("createdBy"), + "default": obj.get("default"), + "authorizationUrl": obj.get("authorizationUrl"), + "name": obj.get("name"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_auth_provider_response_v1.py b/corellium/models/domain_auth_provider_response_v1.py new file mode 100644 index 0000000..0cec904 --- /dev/null +++ b/corellium/models/domain_auth_provider_response_v1.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.open_id_config_v1 import OpenIDConfigV1 +from typing import Optional, Set +from typing_extensions import Self + +class DomainAuthProviderResponseV1(BaseModel): + """ + + """ # noqa: E501 + identifier: StrictStr = Field(description="Provider ID") + id: Optional[StrictStr] = Field(default=None, description="Provider ID for backward compatibility with frontend") + provider_type: StrictStr = Field(description="Provider Type", alias="providerType") + provider: Optional[StrictStr] = Field(default=None, description="Provider Type for backward compatibility with frontend") + label: StrictStr = Field(description="Login Button Text") + name: Optional[StrictStr] = Field(default=None, description="Title Text for the Frontend's Provider Configuration Form") + authorization_url: Optional[StrictStr] = Field(default=None, description="Coordinator endpoint for Authorizing with this provider", alias="authorizationUrl") + default: StrictBool = Field(description="True: Configured in coordinator.json, False: Custom Domain Provider") + enabled: StrictBool = Field(description="Enabled/Disabled") + config: Optional[OpenIDConfigV1] = None + created_by: Optional[StrictStr] = Field(default=None, description="Optional User ID of creator", alias="createdBy") + created_at: StrictStr = Field(description="Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z", alias="createdAt") + updated_at: StrictStr = Field(description="Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "id", "providerType", "provider", "label", "name", "authorizationUrl", "default", "enabled", "config", "createdBy", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAuthProviderResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if provider (nullable) is None + # and model_fields_set contains the field + if self.provider is None and "provider" in self.model_fields_set: + _dict['provider'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if authorization_url (nullable) is None + # and model_fields_set contains the field + if self.authorization_url is None and "authorization_url" in self.model_fields_set: + _dict['authorizationUrl'] = None + + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['createdBy'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAuthProviderResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "id": obj.get("id"), + "providerType": obj.get("providerType"), + "provider": obj.get("provider"), + "label": obj.get("label"), + "name": obj.get("name"), + "authorizationUrl": obj.get("authorizationUrl"), + "default": obj.get("default"), + "enabled": obj.get("enabled"), + "config": OpenIDConfigV1.from_dict(obj["config"]) if obj.get("config") is not None else None, + "createdBy": obj.get("createdBy"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_auth_providers_list.py b/corellium/models/domain_auth_providers_list.py new file mode 100644 index 0000000..0774f50 --- /dev/null +++ b/corellium/models/domain_auth_providers_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.domain_auth_provider_response import DomainAuthProviderResponse +from typing import Optional, Set +from typing_extensions import Self + +class DomainAuthProvidersList(BaseModel): + """ + DomainAuthProvidersList + """ # noqa: E501 + results: List[DomainAuthProviderResponse] = Field(description="List of auth providers for domain.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAuthProvidersList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAuthProvidersList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [DomainAuthProviderResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config.py b/corellium/models/domain_config.py new file mode 100644 index 0000000..8c1a0dd --- /dev/null +++ b/corellium/models/domain_config.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.domain_config_snapshot_sharing_permissions import DomainConfigSnapshotSharingPermissions +from corellium.models.domain_config_trial import DomainConfigTrial +from corellium.models.domain_config_webplayer import DomainConfigWebplayer +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfig(BaseModel): + """ + Domain configuration. + """ # noqa: E501 + android: Optional[StrictBool] = Field(default=None, description="Whether Android devices are enabled.") + billing: Optional[StrictBool] = Field(default=None, description="Whether billing is enabled.") + license_type: Optional[StrictStr] = Field(default=None, description="License type identifier.", alias="licenseType") + signup_email: Optional[StrictStr] = Field(default=None, description="Email used for domain signup.", alias="signupEmail") + trial: Optional[DomainConfigTrial] = None + usage_based: Optional[StrictBool] = Field(default=None, description="Whether usage-based billing is enabled.", alias="usageBased") + enable_netgear_devices: Optional[StrictBool] = Field(default=None, description="Whether Netgear devices are enabled.", alias="enableNetgearDevices") + no_ios: Optional[StrictBool] = Field(default=None, description="Whether iOS devices are disabled.", alias="noIos") + enable_amazon_devices: Optional[StrictBool] = Field(default=None, description="Whether Amazon devices are enabled.", alias="enableAmazonDevices") + device_dhcp_server: Optional[StrictBool] = Field(default=None, description="Whether device DHCP server is enabled.", alias="deviceDhcpServer") + enable_arm_devices: Optional[StrictBool] = Field(default=None, description="Whether ARM devices are enabled.", alias="enableArmDevices") + enable_devices: Optional[StrictBool] = Field(default=None, description="Whether devices are enabled.", alias="enableDevices") + webplayer: Optional[DomainConfigWebplayer] = None + snapshot_sharing_permissions: Optional[DomainConfigSnapshotSharingPermissions] = Field(default=None, alias="snapshotSharingPermissions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["android", "billing", "licenseType", "signupEmail", "trial", "usageBased", "enableNetgearDevices", "noIos", "enableAmazonDevices", "deviceDhcpServer", "enableArmDevices", "enableDevices", "webplayer", "snapshotSharingPermissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trial + if self.trial: + _dict['trial'] = self.trial.to_dict() + # override the default output from pydantic by calling `to_dict()` of webplayer + if self.webplayer: + _dict['webplayer'] = self.webplayer.to_dict() + # override the default output from pydantic by calling `to_dict()` of snapshot_sharing_permissions + if self.snapshot_sharing_permissions: + _dict['snapshotSharingPermissions'] = self.snapshot_sharing_permissions.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if trial (nullable) is None + # and model_fields_set contains the field + if self.trial is None and "trial" in self.model_fields_set: + _dict['trial'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "android": obj.get("android"), + "billing": obj.get("billing"), + "licenseType": obj.get("licenseType"), + "signupEmail": obj.get("signupEmail"), + "trial": DomainConfigTrial.from_dict(obj["trial"]) if obj.get("trial") is not None else None, + "usageBased": obj.get("usageBased"), + "enableNetgearDevices": obj.get("enableNetgearDevices"), + "noIos": obj.get("noIos"), + "enableAmazonDevices": obj.get("enableAmazonDevices"), + "deviceDhcpServer": obj.get("deviceDhcpServer"), + "enableArmDevices": obj.get("enableArmDevices"), + "enableDevices": obj.get("enableDevices"), + "webplayer": DomainConfigWebplayer.from_dict(obj["webplayer"]) if obj.get("webplayer") is not None else None, + "snapshotSharingPermissions": DomainConfigSnapshotSharingPermissions.from_dict(obj["snapshotSharingPermissions"]) if obj.get("snapshotSharingPermissions") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_input.py b/corellium/models/domain_config_input.py new file mode 100644 index 0000000..4a39e2f --- /dev/null +++ b/corellium/models/domain_config_input.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.domain_config_input_snapshot_sharing_permissions import DomainConfigInputSnapshotSharingPermissions +from corellium.models.domain_config_input_trial import DomainConfigInputTrial +from corellium.models.domain_config_input_webplayer import DomainConfigInputWebplayer +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigInput(BaseModel): + """ + Domain configuration input (allows additional vendor device flags). + """ # noqa: E501 + android: Optional[StrictBool] = Field(default=None, description="Whether Android devices are enabled.") + billing: Optional[StrictBool] = Field(default=None, description="Whether billing is enabled.") + organization_name: Optional[StrictStr] = Field(default=None, description="Organization name.", alias="organizationName") + license_type: Optional[StrictStr] = Field(default=None, description="License type identifier.", alias="licenseType") + signup_email: Optional[StrictStr] = Field(default=None, description="Email used for domain signup.", alias="signupEmail") + coupon_code: Optional[StrictStr] = Field(default=None, description="Coupon code.", alias="couponCode") + trial: Optional[DomainConfigInputTrial] = None + no_ios: Optional[StrictBool] = Field(default=None, description="Whether iOS devices are disabled.", alias="noIos") + device_dhcp_server: Optional[StrictBool] = Field(default=None, description="Whether the device DHCP server is enabled.", alias="deviceDhcpServer") + files: Optional[StrictBool] = Field(default=None, description="Whether the files feature is enabled.") + files_only: Optional[StrictBool] = Field(default=None, description="Whether the domain is in files-only mode.", alias="filesOnly") + remote_gpu: Optional[StrictBool] = Field(default=None, description="Whether remote GPU nodes are used.", alias="remoteGpu") + prioritized_nodes: Optional[List[StrictStr]] = Field(default=None, description="Node addresses (host:port) to prefer when placing devices.", alias="prioritizedNodes") + enable_netgear_devices: Optional[StrictBool] = Field(default=None, description="Whether Netgear devices are enabled.", alias="enableNetgearDevices") + enable_amazon_devices: Optional[StrictBool] = Field(default=None, description="Whether Amazon devices are enabled.", alias="enableAmazonDevices") + enable_arm_devices: Optional[StrictBool] = Field(default=None, description="Whether ARM devices are enabled.", alias="enableArmDevices") + enable_devices: Optional[StrictBool] = Field(default=None, description="Whether devices are enabled.", alias="enableDevices") + webplayer: Optional[DomainConfigInputWebplayer] = None + snapshot_sharing_permissions: Optional[DomainConfigInputSnapshotSharingPermissions] = Field(default=None, alias="snapshotSharingPermissions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["android", "billing", "organizationName", "licenseType", "signupEmail", "couponCode", "trial", "noIos", "deviceDhcpServer", "files", "filesOnly", "remoteGpu", "prioritizedNodes", "enableNetgearDevices", "enableAmazonDevices", "enableArmDevices", "enableDevices", "webplayer", "snapshotSharingPermissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trial + if self.trial: + _dict['trial'] = self.trial.to_dict() + # override the default output from pydantic by calling `to_dict()` of webplayer + if self.webplayer: + _dict['webplayer'] = self.webplayer.to_dict() + # override the default output from pydantic by calling `to_dict()` of snapshot_sharing_permissions + if self.snapshot_sharing_permissions: + _dict['snapshotSharingPermissions'] = self.snapshot_sharing_permissions.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if trial (nullable) is None + # and model_fields_set contains the field + if self.trial is None and "trial" in self.model_fields_set: + _dict['trial'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "android": obj.get("android"), + "billing": obj.get("billing"), + "organizationName": obj.get("organizationName"), + "licenseType": obj.get("licenseType"), + "signupEmail": obj.get("signupEmail"), + "couponCode": obj.get("couponCode"), + "trial": DomainConfigInputTrial.from_dict(obj["trial"]) if obj.get("trial") is not None else None, + "noIos": obj.get("noIos"), + "deviceDhcpServer": obj.get("deviceDhcpServer"), + "files": obj.get("files"), + "filesOnly": obj.get("filesOnly"), + "remoteGpu": obj.get("remoteGpu"), + "prioritizedNodes": obj.get("prioritizedNodes"), + "enableNetgearDevices": obj.get("enableNetgearDevices"), + "enableAmazonDevices": obj.get("enableAmazonDevices"), + "enableArmDevices": obj.get("enableArmDevices"), + "enableDevices": obj.get("enableDevices"), + "webplayer": DomainConfigInputWebplayer.from_dict(obj["webplayer"]) if obj.get("webplayer") is not None else None, + "snapshotSharingPermissions": DomainConfigInputSnapshotSharingPermissions.from_dict(obj["snapshotSharingPermissions"]) if obj.get("snapshotSharingPermissions") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_input_snapshot_sharing_permissions.py b/corellium/models/domain_config_input_snapshot_sharing_permissions.py new file mode 100644 index 0000000..3c3c6c6 --- /dev/null +++ b/corellium/models/domain_config_input_snapshot_sharing_permissions.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigInputSnapshotSharingPermissions(BaseModel): + """ + Snapshot sharing permissions. + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether cloud sharing is enabled (mapped to cloudEnabled).") + public_link: Optional[StrictBool] = Field(default=None, description="Whether public link sharing is enabled.", alias="publicLink") + domain_restricted_link: Optional[StrictBool] = Field(default=None, description="Whether domain-restricted links are enabled.", alias="domainRestrictedLink") + password_public_link: Optional[StrictBool] = Field(default=None, description="Whether password-protected public links are enabled.", alias="passwordPublicLink") + email_invite: Optional[StrictBool] = Field(default=None, description="Whether email invites are enabled.", alias="emailInvite") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "publicLink", "domainRestrictedLink", "passwordPublicLink", "emailInvite"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigInputSnapshotSharingPermissions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigInputSnapshotSharingPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "publicLink": obj.get("publicLink"), + "domainRestrictedLink": obj.get("domainRestrictedLink"), + "passwordPublicLink": obj.get("passwordPublicLink"), + "emailInvite": obj.get("emailInvite") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_input_trial.py b/corellium/models/domain_config_input_trial.py new file mode 100644 index 0000000..e90f45c --- /dev/null +++ b/corellium/models/domain_config_input_trial.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigInputTrial(BaseModel): + """ + Trial configuration. + """ # noqa: E501 + start: Union[StrictFloat, StrictInt] = Field(description="Trial start unix timestamp (ms).") + end: Union[StrictFloat, StrictInt] = Field(description="Trial end unix timestamp (ms).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["start", "end"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigInputTrial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigInputTrial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start": obj.get("start"), + "end": obj.get("end") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_input_webplayer.py b/corellium/models/domain_config_input_webplayer.py new file mode 100644 index 0000000..7b476a3 --- /dev/null +++ b/corellium/models/domain_config_input_webplayer.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigInputWebplayer(BaseModel): + """ + Webplayer configuration. + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether webplayer is enabled.") + allowed_domains: Optional[List[StrictStr]] = Field(default=None, description="Allowed domains for webplayer.", alias="allowedDomains") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "allowedDomains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigInputWebplayer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigInputWebplayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "allowedDomains": obj.get("allowedDomains") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_snapshot_sharing_permissions.py b/corellium/models/domain_config_snapshot_sharing_permissions.py new file mode 100644 index 0000000..429dcfe --- /dev/null +++ b/corellium/models/domain_config_snapshot_sharing_permissions.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigSnapshotSharingPermissions(BaseModel): + """ + Snapshot sharing permissions. + """ # noqa: E501 + cloud_enabled: Optional[StrictBool] = Field(default=None, description="Whether cloud sharing is enabled.", alias="cloudEnabled") + domain_enabled: Optional[StrictBool] = Field(default=None, description="Whether domain sharing is enabled.", alias="domainEnabled") + public_link: Optional[StrictBool] = Field(default=None, description="Whether public link sharing is enabled.", alias="publicLink") + domain_restricted_link: Optional[StrictBool] = Field(default=None, description="Whether domain-restricted links are enabled.", alias="domainRestrictedLink") + password_public_link: Optional[StrictBool] = Field(default=None, description="Whether password-protected public links are enabled.", alias="passwordPublicLink") + email_invite: Optional[StrictBool] = Field(default=None, description="Whether email invites are enabled.", alias="emailInvite") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cloudEnabled", "domainEnabled", "publicLink", "domainRestrictedLink", "passwordPublicLink", "emailInvite"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigSnapshotSharingPermissions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigSnapshotSharingPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cloudEnabled": obj.get("cloudEnabled"), + "domainEnabled": obj.get("domainEnabled"), + "publicLink": obj.get("publicLink"), + "domainRestrictedLink": obj.get("domainRestrictedLink"), + "passwordPublicLink": obj.get("passwordPublicLink"), + "emailInvite": obj.get("emailInvite") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_trial.py b/corellium/models/domain_config_trial.py new file mode 100644 index 0000000..568d154 --- /dev/null +++ b/corellium/models/domain_config_trial.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.domain_config_trial_end_action import DomainConfigTrialEndAction +from corellium.models.domain_config_trial_subscribe_action import DomainConfigTrialSubscribeAction +from corellium.models.trial_extension import TrialExtension +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigTrial(BaseModel): + """ + Trial configuration. + """ # noqa: E501 + start: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Trial start unix timestamp (ms).") + end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Trial end unix timestamp (ms).") + end_action: Optional[DomainConfigTrialEndAction] = None + subscribe_action: Optional[DomainConfigTrialSubscribeAction] = None + extension: Optional[TrialExtension] = Field(default=None, description="Requested trial extension.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["start", "end", "end_action", "subscribe_action", "extension"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigTrial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of end_action + if self.end_action: + _dict['end_action'] = self.end_action.to_dict() + # override the default output from pydantic by calling `to_dict()` of subscribe_action + if self.subscribe_action: + _dict['subscribe_action'] = self.subscribe_action.to_dict() + # override the default output from pydantic by calling `to_dict()` of extension + if self.extension: + _dict['extension'] = self.extension.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigTrial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start": obj.get("start"), + "end": obj.get("end"), + "end_action": DomainConfigTrialEndAction.from_dict(obj["end_action"]) if obj.get("end_action") is not None else None, + "subscribe_action": DomainConfigTrialSubscribeAction.from_dict(obj["subscribe_action"]) if obj.get("subscribe_action") is not None else None, + "extension": TrialExtension.from_dict(obj["extension"]) if obj.get("extension") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_trial_end_action.py b/corellium/models/domain_config_trial_end_action.py new file mode 100644 index 0000000..8e0f7db --- /dev/null +++ b/corellium/models/domain_config_trial_end_action.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigTrialEndAction(BaseModel): + """ + What happens when the trial ends. + """ # noqa: E501 + action: StrictStr = Field(description="Action taken when the trial ends.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["action"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigTrialEndAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigTrialEndAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_trial_subscribe_action.py b/corellium/models/domain_config_trial_subscribe_action.py new file mode 100644 index 0000000..29cd79c --- /dev/null +++ b/corellium/models/domain_config_trial_subscribe_action.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigTrialSubscribeAction(BaseModel): + """ + How the trial converts to a subscription. + """ # noqa: E501 + action: StrictStr = Field(description="Action taken when the trial converts.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["action"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigTrialSubscribeAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigTrialSubscribeAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_config_webplayer.py b/corellium/models/domain_config_webplayer.py new file mode 100644 index 0000000..fd85ef3 --- /dev/null +++ b/corellium/models/domain_config_webplayer.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DomainConfigWebplayer(BaseModel): + """ + Webplayer configuration. + """ # noqa: E501 + enabled: StrictBool = Field(description="Whether webplayer is enabled.") + allowed_domains: Optional[List[StrictStr]] = Field(default=None, description="Allowed domains for webplayer.", alias="allowedDomains") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "allowedDomains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainConfigWebplayer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainConfigWebplayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "allowedDomains": obj.get("allowedDomains") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_info.py b/corellium/models/domain_info.py new file mode 100644 index 0000000..b22989b --- /dev/null +++ b/corellium/models/domain_info.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from corellium.models.domain_list_item import DomainListItem +from typing import Optional, Set +from typing_extensions import Self + +class DomainInfo(BaseModel): + """ + DomainInfo + """ # noqa: E501 + domain_info: DomainListItem = Field(description="Domain information.", alias="domainInfo") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domainInfo"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain_info + if self.domain_info: + _dict['domainInfo'] = self.domain_info.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainInfo": DomainListItem.from_dict(obj["domainInfo"]) if obj.get("domainInfo") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list.py b/corellium/models/domain_list.py new file mode 100644 index 0000000..30e232a --- /dev/null +++ b/corellium/models/domain_list.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from corellium.models.domain_list_item import DomainListItem +from corellium.models.domain_list_usage import DomainListUsage +from typing import Optional, Set +from typing_extensions import Self + +class DomainList(BaseModel): + """ + DomainList + """ # noqa: E501 + count: StrictInt = Field(description="Total number of domains.") + page: StrictInt = Field(description="Current page number.") + per_page: StrictInt = Field(description="Items per page.", alias="perPage") + items: List[DomainListItem] = Field(description="Domain items.") + usage: DomainListUsage + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["count", "page", "perPage", "items", "usage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of usage + if self.usage: + _dict['usage'] = self.usage.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "page": obj.get("page"), + "perPage": obj.get("perPage"), + "items": [DomainListItem.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "usage": DomainListUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item.py b/corellium/models/domain_list_item.py new file mode 100644 index 0000000..c3fa10a --- /dev/null +++ b/corellium/models/domain_list_item.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.domain_config import DomainConfig +from corellium.models.domain_list_item_disabled import DomainListItemDisabled +from corellium.models.domain_list_item_domain_usage_inner import DomainListItemDomainUsageInner +from corellium.models.domain_list_item_projects_inner import DomainListItemProjectsInner +from corellium.models.domain_list_item_quotas import DomainListItemQuotas +from corellium.models.domain_list_item_subscription import DomainListItemSubscription +from corellium.models.domain_list_item_subscription_history_inner import DomainListItemSubscriptionHistoryInner +from corellium.models.domain_list_item_usage import DomainListItemUsage +from corellium.models.domain_list_item_users_info_inner import DomainListItemUsersInfoInner +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItem(BaseModel): + """ + DomainListItem + """ # noqa: E501 + identifier: StrictStr = Field(description="Domain identifier.") + user_id: StrictStr = Field(description="Owner user identifier.", alias="userId") + domain_usage: List[DomainListItemDomainUsageInner] = Field(description="Monthly usage entries.", alias="domainUsage") + user_count: StrictInt = Field(description="Number of users in the domain.", alias="userCount") + users_info: List[DomainListItemUsersInfoInner] = Field(description="Users in the domain.", alias="usersInfo") + domain: StrictStr = Field(description="Fully qualified domain name.") + domain_name: StrictStr = Field(description="Domain name.", alias="domainName") + disabled: Optional[DomainListItemDisabled] + config: DomainConfig + quotas: DomainListItemQuotas + usage: DomainListItemUsage + created_at: Union[StrictFloat, StrictInt] = Field(description="Domain creation timestamp (epoch ms).", alias="createdAt") + subscription: Optional[DomainListItemSubscription] + subscription_history: Optional[List[DomainListItemSubscriptionHistoryInner]] = Field(default=None, description="Subscription history.", alias="subscriptionHistory") + plan_name: Optional[StrictStr] = Field(default=None, description="Current plan name.", alias="planName") + projects: List[DomainListItemProjectsInner] = Field(description="Projects in the domain.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "userId", "domainUsage", "userCount", "usersInfo", "domain", "domainName", "disabled", "config", "quotas", "usage", "createdAt", "subscription", "subscriptionHistory", "planName", "projects"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in domain_usage (list) + _items = [] + if self.domain_usage: + for _item_domain_usage in self.domain_usage: + if _item_domain_usage: + _items.append(_item_domain_usage.to_dict()) + _dict['domainUsage'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in users_info (list) + _items = [] + if self.users_info: + for _item_users_info in self.users_info: + if _item_users_info: + _items.append(_item_users_info.to_dict()) + _dict['usersInfo'] = _items + # override the default output from pydantic by calling `to_dict()` of disabled + if self.disabled: + _dict['disabled'] = self.disabled.to_dict() + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # override the default output from pydantic by calling `to_dict()` of usage + if self.usage: + _dict['usage'] = self.usage.to_dict() + # override the default output from pydantic by calling `to_dict()` of subscription + if self.subscription: + _dict['subscription'] = self.subscription.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in subscription_history (list) + _items = [] + if self.subscription_history: + for _item_subscription_history in self.subscription_history: + if _item_subscription_history: + _items.append(_item_subscription_history.to_dict()) + _dict['subscriptionHistory'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in projects (list) + _items = [] + if self.projects: + for _item_projects in self.projects: + if _item_projects: + _items.append(_item_projects.to_dict()) + _dict['projects'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if disabled (nullable) is None + # and model_fields_set contains the field + if self.disabled is None and "disabled" in self.model_fields_set: + _dict['disabled'] = None + + # set to None if subscription (nullable) is None + # and model_fields_set contains the field + if self.subscription is None and "subscription" in self.model_fields_set: + _dict['subscription'] = None + + # set to None if plan_name (nullable) is None + # and model_fields_set contains the field + if self.plan_name is None and "plan_name" in self.model_fields_set: + _dict['planName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "userId": obj.get("userId"), + "domainUsage": [DomainListItemDomainUsageInner.from_dict(_item) for _item in obj["domainUsage"]] if obj.get("domainUsage") is not None else None, + "userCount": obj.get("userCount"), + "usersInfo": [DomainListItemUsersInfoInner.from_dict(_item) for _item in obj["usersInfo"]] if obj.get("usersInfo") is not None else None, + "domain": obj.get("domain"), + "domainName": obj.get("domainName"), + "disabled": DomainListItemDisabled.from_dict(obj["disabled"]) if obj.get("disabled") is not None else None, + "config": DomainConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "quotas": DomainListItemQuotas.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None, + "usage": DomainListItemUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None, + "createdAt": obj.get("createdAt"), + "subscription": DomainListItemSubscription.from_dict(obj["subscription"]) if obj.get("subscription") is not None else None, + "subscriptionHistory": [DomainListItemSubscriptionHistoryInner.from_dict(_item) for _item in obj["subscriptionHistory"]] if obj.get("subscriptionHistory") is not None else None, + "planName": obj.get("planName"), + "projects": [DomainListItemProjectsInner.from_dict(_item) for _item in obj["projects"]] if obj.get("projects") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_disabled.py b/corellium/models/domain_list_item_disabled.py new file mode 100644 index 0000000..c450df1 --- /dev/null +++ b/corellium/models/domain_list_item_disabled.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemDisabled(BaseModel): + """ + Disabled state (null if domain is active). + """ # noqa: E501 + type: StrictStr = Field(description="Reason the domain is disabled.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SubscriptionCanceled', 'SubscriptionPaused', 'TrialEnded', 'PastDue', 'SubscriptionPending', 'AllocatedHoursExpended']): + raise ValueError("must be one of enum values ('SubscriptionCanceled', 'SubscriptionPaused', 'TrialEnded', 'PastDue', 'SubscriptionPending', 'AllocatedHoursExpended')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemDisabled from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemDisabled from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_domain_usage_inner.py b/corellium/models/domain_list_item_domain_usage_inner.py new file mode 100644 index 0000000..f08cdde --- /dev/null +++ b/corellium/models/domain_list_item_domain_usage_inner.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemDomainUsageInner(BaseModel): + """ + DomainListItemDomainUsageInner + """ # noqa: E501 + domain: StrictStr = Field(description="Domain identifier.") + month: date = Field(description="Month (YYYY-MM-DD format).") + hours: Union[StrictFloat, StrictInt] = Field(description="Usage hours for the month.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain", "month", "hours"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemDomainUsageInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemDomainUsageInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "month": obj.get("month"), + "hours": obj.get("hours") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_projects_inner.py b/corellium/models/domain_list_item_projects_inner.py new file mode 100644 index 0000000..417ed2b --- /dev/null +++ b/corellium/models/domain_list_item_projects_inner.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.domain_list_item_projects_inner_instances_inner import DomainListItemProjectsInnerInstancesInner +from corellium.models.domain_list_item_projects_inner_instances_inner_images_inner import DomainListItemProjectsInnerInstancesInnerImagesInner +from corellium.models.domain_list_item_projects_inner_quotas import DomainListItemProjectsInnerQuotas +from corellium.models.domain_list_item_projects_inner_usage import DomainListItemProjectsInnerUsage +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemProjectsInner(BaseModel): + """ + DomainListItemProjectsInner + """ # noqa: E501 + identifier: StrictStr = Field(description="Project identifier.") + name: StrictStr = Field(description="Project name.") + quotas: DomainListItemProjectsInnerQuotas + usage: DomainListItemProjectsInnerUsage + instances: List[DomainListItemProjectsInnerInstancesInner] = Field(description="Instances in the project.") + images: Optional[List[DomainListItemProjectsInnerInstancesInnerImagesInner]] = Field(default=None, description="Images in the project.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "name", "quotas", "usage", "instances", "images"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # override the default output from pydantic by calling `to_dict()` of usage + if self.usage: + _dict['usage'] = self.usage.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item_instances in self.instances: + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in images (list) + _items = [] + if self.images: + for _item_images in self.images: + if _item_images: + _items.append(_item_images.to_dict()) + _dict['images'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "name": obj.get("name"), + "quotas": DomainListItemProjectsInnerQuotas.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None, + "usage": DomainListItemProjectsInnerUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None, + "instances": [DomainListItemProjectsInnerInstancesInner.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "images": [DomainListItemProjectsInnerInstancesInnerImagesInner.from_dict(_item) for _item in obj["images"]] if obj.get("images") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_projects_inner_instances_inner.py b/corellium/models/domain_list_item_projects_inner_instances_inner.py new file mode 100644 index 0000000..f74ea8a --- /dev/null +++ b/corellium/models/domain_list_item_projects_inner_instances_inner.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.domain_list_item_projects_inner_instances_inner_images_inner import DomainListItemProjectsInnerInstancesInnerImagesInner +from corellium.models.domain_list_item_projects_inner_instances_inner_usage import DomainListItemProjectsInnerInstancesInnerUsage +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemProjectsInnerInstancesInner(BaseModel): + """ + DomainListItemProjectsInnerInstancesInner + """ # noqa: E501 + identifier: StrictStr = Field(description="Instance identifier.") + name: Optional[StrictStr] = Field(default=None, description="Instance name.") + status: StrictStr = Field(description="Instance status (ACTIVE, SHUTOFF, etc.).") + error: Optional[StrictStr] = Field(description="Error message if any.") + task_state: StrictStr = Field(description="Current task state.", alias="taskState") + user_task: Optional[StrictStr] = Field(description="User-initiated task.", alias="userTask") + os_version: StrictStr = Field(description="OS version.", alias="osVersion") + os_build: StrictStr = Field(description="OS build identifier.", alias="osBuild") + flavor_id: StrictStr = Field(description="Device flavor identifier.", alias="flavorId") + flavor: Optional[StrictStr] = Field(default=None, description="Friendly device flavor name.") + compute_node: Optional[StrictStr] = Field(description="Compute node address.", alias="computeNode") + service_ip: Optional[StrictStr] = Field(description="Service IP address.", alias="serviceIp") + wifi_ip: Optional[StrictStr] = Field(description="WiFi IP address.", alias="wifiIp") + images: List[DomainListItemProjectsInnerInstancesInnerImagesInner] = Field(description="List of images.") + usage: DomainListItemProjectsInnerInstancesInnerUsage + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "name", "status", "error", "taskState", "userTask", "osVersion", "osBuild", "flavorId", "flavor", "computeNode", "serviceIp", "wifiIp", "images", "usage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerInstancesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in images (list) + _items = [] + if self.images: + for _item_images in self.images: + if _item_images: + _items.append(_item_images.to_dict()) + _dict['images'] = _items + # override the default output from pydantic by calling `to_dict()` of usage + if self.usage: + _dict['usage'] = self.usage.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + # set to None if user_task (nullable) is None + # and model_fields_set contains the field + if self.user_task is None and "user_task" in self.model_fields_set: + _dict['userTask'] = None + + # set to None if compute_node (nullable) is None + # and model_fields_set contains the field + if self.compute_node is None and "compute_node" in self.model_fields_set: + _dict['computeNode'] = None + + # set to None if service_ip (nullable) is None + # and model_fields_set contains the field + if self.service_ip is None and "service_ip" in self.model_fields_set: + _dict['serviceIp'] = None + + # set to None if wifi_ip (nullable) is None + # and model_fields_set contains the field + if self.wifi_ip is None and "wifi_ip" in self.model_fields_set: + _dict['wifiIp'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerInstancesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "name": obj.get("name"), + "status": obj.get("status"), + "error": obj.get("error"), + "taskState": obj.get("taskState"), + "userTask": obj.get("userTask"), + "osVersion": obj.get("osVersion"), + "osBuild": obj.get("osBuild"), + "flavorId": obj.get("flavorId"), + "flavor": obj.get("flavor"), + "computeNode": obj.get("computeNode"), + "serviceIp": obj.get("serviceIp"), + "wifiIp": obj.get("wifiIp"), + "images": [DomainListItemProjectsInnerInstancesInnerImagesInner.from_dict(_item) for _item in obj["images"]] if obj.get("images") is not None else None, + "usage": DomainListItemProjectsInnerInstancesInnerUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_projects_inner_instances_inner_images_inner.py b/corellium/models/domain_list_item_projects_inner_instances_inner_images_inner.py new file mode 100644 index 0000000..14ea69d --- /dev/null +++ b/corellium/models/domain_list_item_projects_inner_instances_inner_images_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemProjectsInnerInstancesInnerImagesInner(BaseModel): + """ + DomainListItemProjectsInnerInstancesInnerImagesInner + """ # noqa: E501 + identifier: StrictStr = Field(description="Image identifier.") + type: StrictStr = Field(description="Image type (fw, kernel, etc.).") + name: StrictStr = Field(description="Image filename.") + size: Union[StrictFloat, StrictInt] = Field(description="Image size in bytes.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "type", "name", "size"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerInstancesInnerImagesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerInstancesInnerImagesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "type": obj.get("type"), + "name": obj.get("name"), + "size": obj.get("size") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_projects_inner_instances_inner_usage.py b/corellium/models/domain_list_item_projects_inner_instances_inner_usage.py new file mode 100644 index 0000000..e002d1a --- /dev/null +++ b/corellium/models/domain_list_item_projects_inner_instances_inner_usage.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemProjectsInnerInstancesInnerUsage(BaseModel): + """ + Instance usage. + """ # noqa: E501 + image_bytes: Union[StrictFloat, StrictInt] = Field(description="Image bytes used.", alias="imageBytes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageBytes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerInstancesInnerUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerInstancesInnerUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageBytes": obj.get("imageBytes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_projects_inner_quotas.py b/corellium/models/domain_list_item_projects_inner_quotas.py new file mode 100644 index 0000000..417312b --- /dev/null +++ b/corellium/models/domain_list_item_projects_inner_quotas.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemProjectsInnerQuotas(BaseModel): + """ + Project quotas. + """ # noqa: E501 + cores: StrictInt = Field(description="Core quota.") + instances: StrictInt = Field(description="Instance quota.") + ram: StrictInt = Field(description="RAM quota in MiB.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "instances", "ram"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerQuotas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerQuotas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_projects_inner_usage.py b/corellium/models/domain_list_item_projects_inner_usage.py new file mode 100644 index 0000000..5e3f962 --- /dev/null +++ b/corellium/models/domain_list_item_projects_inner_usage.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemProjectsInnerUsage(BaseModel): + """ + Project usage. + """ # noqa: E501 + active_instances: StrictInt = Field(description="Number of active instances.", alias="activeInstances") + image_bytes: Union[StrictFloat, StrictInt] = Field(description="Image storage used in bytes.", alias="imageBytes") + cores: StrictInt = Field(description="Cores in use.") + instances: StrictInt = Field(description="Total instances.") + ram: StrictInt = Field(description="RAM in use in MiB.") + gpu: StrictInt = Field(description="GPUs in use.") + reserved_cores: Optional[StrictInt] = Field(default=None, description="Reserved cores.", alias="reservedCores") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["activeInstances", "imageBytes", "cores", "instances", "ram", "gpu", "reservedCores"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemProjectsInnerUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "activeInstances": obj.get("activeInstances"), + "imageBytes": obj.get("imageBytes"), + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram"), + "gpu": obj.get("gpu"), + "reservedCores": obj.get("reservedCores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_quotas.py b/corellium/models/domain_list_item_quotas.py new file mode 100644 index 0000000..1d790ea --- /dev/null +++ b/corellium/models/domain_list_item_quotas.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemQuotas(BaseModel): + """ + Domain quotas. + """ # noqa: E501 + cores: StrictInt = Field(description="Core quota.") + instances: StrictInt = Field(description="Instance quota.") + ram: StrictInt = Field(description="RAM quota in MiB.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "instances", "ram"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemQuotas from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemQuotas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_subscription.py b/corellium/models/domain_list_item_subscription.py new file mode 100644 index 0000000..cc35316 --- /dev/null +++ b/corellium/models/domain_list_item_subscription.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemSubscription(BaseModel): + """ + Subscription info. + """ # noqa: E501 + renew_action: Optional[Dict[str, Any]] = Field(description="Renewal action configuration (varies by billing backend).", alias="renewAction") + domain: StrictStr = Field(description="Domain identifier.") + billing_type: StrictStr = Field(description="Billing type.", alias="billingType") + billing_backend: StrictStr = Field(description="Billing backend (stripe, etc.).", alias="billingBackend") + billing_id: Optional[StrictStr] = Field(description="External billing identifier.", alias="billingId") + next_bill: Optional[datetime] = Field(description="ISO timestamp of next billing date.", alias="nextBill") + usage_based: StrictBool = Field(description="Whether billing is usage-based.", alias="usageBased") + last_usage_bill: Optional[datetime] = Field(description="ISO timestamp of last usage bill.", alias="lastUsageBill") + last_payment_amount: Optional[Union[StrictFloat, StrictInt]] = Field(description="Last payment amount, in cents.", alias="lastPaymentAmount") + usage_bill_interval_days: Optional[Union[StrictFloat, StrictInt]] = Field(description="Interval in days between usage bills.", alias="usageBillIntervalDays") + usage_billing_threshold_dollars: Optional[Union[StrictFloat, StrictInt]] = Field(description="Dollar threshold that triggers a usage bill.", alias="usageBillingThresholdDollars") + past_due: Optional[StrictBool] = Field(description="Whether the subscription is past due.", alias="pastDue") + payment_attempts: Optional[Union[StrictFloat, StrictInt]] = Field(description="Number of payment attempts.", alias="paymentAttempts") + last_payment_attempt: Optional[datetime] = Field(description="ISO timestamp of last payment attempt.", alias="lastPaymentAttempt") + created_at: datetime = Field(description="ISO timestamp of subscription creation.", alias="createdAt") + updated_at: datetime = Field(description="ISO timestamp of last subscription update.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["renewAction", "domain", "billingType", "billingBackend", "billingId", "nextBill", "usageBased", "lastUsageBill", "lastPaymentAmount", "usageBillIntervalDays", "usageBillingThresholdDollars", "pastDue", "paymentAttempts", "lastPaymentAttempt", "createdAt", "updatedAt"] + + @field_validator('billing_type') + def billing_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['prepaid', 'usage', 'metered', 'credit', 'cores_metered']): + raise ValueError("must be one of enum values ('prepaid', 'usage', 'metered', 'credit', 'cores_metered')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemSubscription from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if renew_action (nullable) is None + # and model_fields_set contains the field + if self.renew_action is None and "renew_action" in self.model_fields_set: + _dict['renewAction'] = None + + # set to None if billing_id (nullable) is None + # and model_fields_set contains the field + if self.billing_id is None and "billing_id" in self.model_fields_set: + _dict['billingId'] = None + + # set to None if next_bill (nullable) is None + # and model_fields_set contains the field + if self.next_bill is None and "next_bill" in self.model_fields_set: + _dict['nextBill'] = None + + # set to None if last_usage_bill (nullable) is None + # and model_fields_set contains the field + if self.last_usage_bill is None and "last_usage_bill" in self.model_fields_set: + _dict['lastUsageBill'] = None + + # set to None if last_payment_amount (nullable) is None + # and model_fields_set contains the field + if self.last_payment_amount is None and "last_payment_amount" in self.model_fields_set: + _dict['lastPaymentAmount'] = None + + # set to None if usage_bill_interval_days (nullable) is None + # and model_fields_set contains the field + if self.usage_bill_interval_days is None and "usage_bill_interval_days" in self.model_fields_set: + _dict['usageBillIntervalDays'] = None + + # set to None if usage_billing_threshold_dollars (nullable) is None + # and model_fields_set contains the field + if self.usage_billing_threshold_dollars is None and "usage_billing_threshold_dollars" in self.model_fields_set: + _dict['usageBillingThresholdDollars'] = None + + # set to None if past_due (nullable) is None + # and model_fields_set contains the field + if self.past_due is None and "past_due" in self.model_fields_set: + _dict['pastDue'] = None + + # set to None if payment_attempts (nullable) is None + # and model_fields_set contains the field + if self.payment_attempts is None and "payment_attempts" in self.model_fields_set: + _dict['paymentAttempts'] = None + + # set to None if last_payment_attempt (nullable) is None + # and model_fields_set contains the field + if self.last_payment_attempt is None and "last_payment_attempt" in self.model_fields_set: + _dict['lastPaymentAttempt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemSubscription from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "renewAction": obj.get("renewAction"), + "domain": obj.get("domain"), + "billingType": obj.get("billingType"), + "billingBackend": obj.get("billingBackend"), + "billingId": obj.get("billingId"), + "nextBill": obj.get("nextBill"), + "usageBased": obj.get("usageBased"), + "lastUsageBill": obj.get("lastUsageBill"), + "lastPaymentAmount": obj.get("lastPaymentAmount"), + "usageBillIntervalDays": obj.get("usageBillIntervalDays"), + "usageBillingThresholdDollars": obj.get("usageBillingThresholdDollars"), + "pastDue": obj.get("pastDue"), + "paymentAttempts": obj.get("paymentAttempts"), + "lastPaymentAttempt": obj.get("lastPaymentAttempt"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_subscription_history_inner.py b/corellium/models/domain_list_item_subscription_history_inner.py new file mode 100644 index 0000000..52ff267 --- /dev/null +++ b/corellium/models/domain_list_item_subscription_history_inner.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.domain_list_item_subscription_history_inner_administrator import DomainListItemSubscriptionHistoryInnerAdministrator +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemSubscriptionHistoryInner(BaseModel): + """ + DomainListItemSubscriptionHistoryInner + """ # noqa: E501 + plan_name: StrictStr = Field(description="Name of the subscription plan.", alias="planName") + plan_start: datetime = Field(description="Plan start date.", alias="planStart") + plan_end: Optional[datetime] = Field(description="Plan end date (null if still active).", alias="planEnd") + status: StrictStr = Field(description="Display status (e.g. Active, Ended, Past Due).") + administrator: DomainListItemSubscriptionHistoryInnerAdministrator + stripe_link: Optional[StrictStr] = Field(description="Link to Stripe subscription.", alias="stripeLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["planName", "planStart", "planEnd", "status", "administrator", "stripeLink"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemSubscriptionHistoryInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of administrator + if self.administrator: + _dict['administrator'] = self.administrator.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if plan_end (nullable) is None + # and model_fields_set contains the field + if self.plan_end is None and "plan_end" in self.model_fields_set: + _dict['planEnd'] = None + + # set to None if stripe_link (nullable) is None + # and model_fields_set contains the field + if self.stripe_link is None and "stripe_link" in self.model_fields_set: + _dict['stripeLink'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemSubscriptionHistoryInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "planName": obj.get("planName"), + "planStart": obj.get("planStart"), + "planEnd": obj.get("planEnd"), + "status": obj.get("status"), + "administrator": DomainListItemSubscriptionHistoryInnerAdministrator.from_dict(obj["administrator"]) if obj.get("administrator") is not None else None, + "stripeLink": obj.get("stripeLink") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_subscription_history_inner_administrator.py b/corellium/models/domain_list_item_subscription_history_inner_administrator.py new file mode 100644 index 0000000..1683046 --- /dev/null +++ b/corellium/models/domain_list_item_subscription_history_inner_administrator.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemSubscriptionHistoryInnerAdministrator(BaseModel): + """ + Administrator who manages this subscription. + """ # noqa: E501 + name: StrictStr = Field(description="Administrator name.") + email: StrictStr = Field(description="Administrator email.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "email"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemSubscriptionHistoryInnerAdministrator from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemSubscriptionHistoryInnerAdministrator from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "email": obj.get("email") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_usage.py b/corellium/models/domain_list_item_usage.py new file mode 100644 index 0000000..def7d49 --- /dev/null +++ b/corellium/models/domain_list_item_usage.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemUsage(BaseModel): + """ + Domain usage totals. + """ # noqa: E501 + active_instances: StrictInt = Field(description="Number of active instances.", alias="activeInstances") + image_bytes: Union[StrictFloat, StrictInt] = Field(description="Image storage used in bytes.", alias="imageBytes") + cores: StrictInt = Field(description="Cores in use.") + instances: StrictInt = Field(description="Total instances.") + ram: StrictInt = Field(description="RAM in use in MiB.") + gpu: StrictInt = Field(description="GPUs in use.") + reserved_cores: Optional[StrictInt] = Field(default=None, description="Reserved cores.", alias="reservedCores") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["activeInstances", "imageBytes", "cores", "instances", "ram", "gpu", "reservedCores"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "activeInstances": obj.get("activeInstances"), + "imageBytes": obj.get("imageBytes"), + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram"), + "gpu": obj.get("gpu"), + "reservedCores": obj.get("reservedCores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_item_users_info_inner.py b/corellium/models/domain_list_item_users_info_inner.py new file mode 100644 index 0000000..0861764 --- /dev/null +++ b/corellium/models/domain_list_item_users_info_inner.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DomainListItemUsersInfoInner(BaseModel): + """ + DomainListItemUsersInfoInner + """ # noqa: E501 + id: StrictStr = Field(description="User identifier.") + label: StrictStr = Field(description="User label.") + name: StrictStr = Field(description="Username.") + email: StrictStr = Field(description="User email.") + administrator: StrictBool = Field(description="Whether the user is a domain administrator.") + cluster_administrator: StrictBool = Field(description="Whether the user is a cluster administrator.", alias="clusterAdministrator") + last_login: Optional[datetime] = Field(description="ISO timestamp of last login.", alias="lastLogin") + teams: StrictInt = Field(description="Number of teams the user belongs to.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "label", "name", "email", "administrator", "clusterAdministrator", "lastLogin", "teams"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListItemUsersInfoInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if last_login (nullable) is None + # and model_fields_set contains the field + if self.last_login is None and "last_login" in self.model_fields_set: + _dict['lastLogin'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListItemUsersInfoInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "label": obj.get("label"), + "name": obj.get("name"), + "email": obj.get("email"), + "administrator": obj.get("administrator"), + "clusterAdministrator": obj.get("clusterAdministrator"), + "lastLogin": obj.get("lastLogin"), + "teams": obj.get("teams") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_list_usage.py b/corellium/models/domain_list_usage.py new file mode 100644 index 0000000..10201fa --- /dev/null +++ b/corellium/models/domain_list_usage.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainListUsage(BaseModel): + """ + Aggregate usage across all domains. + """ # noqa: E501 + active_instances: StrictInt = Field(description="Number of active instances.", alias="activeInstances") + image_bytes: Union[StrictFloat, StrictInt] = Field(description="Image storage used in bytes.", alias="imageBytes") + cores: StrictInt = Field(description="Cores in use.") + instances: StrictInt = Field(description="Total instances.") + ram: StrictInt = Field(description="RAM in use in MiB.") + gpu: StrictInt = Field(description="GPUs in use.") + reserved_cores: Optional[StrictInt] = Field(default=None, description="Reserved cores.", alias="reservedCores") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["activeInstances", "imageBytes", "cores", "instances", "ram", "gpu", "reservedCores"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainListUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainListUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "activeInstances": obj.get("activeInstances"), + "imageBytes": obj.get("imageBytes"), + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram"), + "gpu": obj.get("gpu"), + "reservedCores": obj.get("reservedCores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_options.py b/corellium/models/domain_options.py new file mode 100644 index 0000000..587e8ec --- /dev/null +++ b/corellium/models/domain_options.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.snapshot_sharing_permissions import SnapshotSharingPermissions +from corellium.models.trial_extension_v1 import TrialExtensionV1 +from typing import Optional, Set +from typing_extensions import Self + +class DomainOptions(BaseModel): + """ + + """ # noqa: E501 + totp_required: Optional[StrictBool] = Field(default=None, description="if true, totp is required", alias="totpRequired") + trial_extension: Optional[TrialExtensionV1] = Field(default=None, alias="trialExtension") + snapshot_sharing_permissions: Optional[SnapshotSharingPermissions] = Field(default=None, alias="snapshotSharingPermissions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totpRequired", "trialExtension", "snapshotSharingPermissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trial_extension + if self.trial_extension: + _dict['trialExtension'] = self.trial_extension.to_dict() + # override the default output from pydantic by calling `to_dict()` of snapshot_sharing_permissions + if self.snapshot_sharing_permissions: + _dict['snapshotSharingPermissions'] = self.snapshot_sharing_permissions.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if totp_required (nullable) is None + # and model_fields_set contains the field + if self.totp_required is None and "totp_required" in self.model_fields_set: + _dict['totpRequired'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totpRequired": obj.get("totpRequired"), + "trialExtension": TrialExtensionV1.from_dict(obj["trialExtension"]) if obj.get("trialExtension") is not None else None, + "snapshotSharingPermissions": SnapshotSharingPermissions.from_dict(obj["snapshotSharingPermissions"]) if obj.get("snapshotSharingPermissions") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_software.py b/corellium/models/domain_software.py new file mode 100644 index 0000000..f6e9a4a --- /dev/null +++ b/corellium/models/domain_software.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class DomainSoftware(BaseModel): + """ + DomainSoftware + """ # noqa: E501 + image_id: StrictStr = Field(description="Identifier of the uploaded image. Pass to `deleteImage` to remove the upload.", alias="imageId") + flavor: StrictStr = Field(description="Flavor the firmware applies to.") + description: StrictStr = Field(description="Human-readable device name.") + model: StrictStr = Field(description="Device product identifier.") + platform: Optional[StrictStr] = Field(description="Device platform, when known.") + has_product_image: StrictBool = Field(description="Whether a product image is available for this flavor.", alias="hasProductImage") + os_version: Optional[StrictStr] = Field(description="OS version.", alias="osVersion") + os_build: Optional[StrictStr] = Field(description="OS build.", alias="osBuild") + filename: StrictStr = Field(description="Uploaded filename.") + size: Optional[Union[StrictFloat, StrictInt]] = Field(description="Firmware size in bytes.") + release_date: Optional[datetime] = Field(description="Release date.", alias="releaseDate") + upload_date: datetime = Field(description="Date the firmware was uploaded.", alias="uploadDate") + download_url: Optional[StrictStr] = Field(description="Signed link the firmware can be downloaded from.", alias="downloadUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId", "flavor", "description", "model", "platform", "hasProductImage", "osVersion", "osBuild", "filename", "size", "releaseDate", "uploadDate", "downloadUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainSoftware from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if platform (nullable) is None + # and model_fields_set contains the field + if self.platform is None and "platform" in self.model_fields_set: + _dict['platform'] = None + + # set to None if os_version (nullable) is None + # and model_fields_set contains the field + if self.os_version is None and "os_version" in self.model_fields_set: + _dict['osVersion'] = None + + # set to None if os_build (nullable) is None + # and model_fields_set contains the field + if self.os_build is None and "os_build" in self.model_fields_set: + _dict['osBuild'] = None + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + # set to None if release_date (nullable) is None + # and model_fields_set contains the field + if self.release_date is None and "release_date" in self.model_fields_set: + _dict['releaseDate'] = None + + # set to None if download_url (nullable) is None + # and model_fields_set contains the field + if self.download_url is None and "download_url" in self.model_fields_set: + _dict['downloadUrl'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainSoftware from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId"), + "flavor": obj.get("flavor"), + "description": obj.get("description"), + "model": obj.get("model"), + "platform": obj.get("platform"), + "hasProductImage": obj.get("hasProductImage"), + "osVersion": obj.get("osVersion"), + "osBuild": obj.get("osBuild"), + "filename": obj.get("filename"), + "size": obj.get("size"), + "releaseDate": obj.get("releaseDate"), + "uploadDate": obj.get("uploadDate"), + "downloadUrl": obj.get("downloadUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_software_list.py b/corellium/models/domain_software_list.py new file mode 100644 index 0000000..6a17bae --- /dev/null +++ b/corellium/models/domain_software_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.domain_software import DomainSoftware +from typing import Optional, Set +from typing_extensions import Self + +class DomainSoftwareList(BaseModel): + """ + DomainSoftwareList + """ # noqa: E501 + results: List[DomainSoftware] = Field(description="Domain-level firmware images: uploads not scoped to a project or instance.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainSoftwareList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainSoftwareList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [DomainSoftware.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_welcome_message_response.py b/corellium/models/domain_welcome_message_response.py new file mode 100644 index 0000000..02627d9 --- /dev/null +++ b/corellium/models/domain_welcome_message_response.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainWelcomeMessageResponse(BaseModel): + """ + DomainWelcomeMessageResponse + """ # noqa: E501 + identifier: StrictStr = Field(description="Unique identifier for the welcome message.") + domain: StrictStr = Field(description="Domain identifier.") + message: StrictStr = Field(description="Sanitized welcome message text.") + enabled: StrictBool = Field(description="Whether the welcome message is shown to users.") + created_at: datetime = Field(description="Creation timestamp (ISO 8601).", alias="createdAt") + updated_at: datetime = Field(description="Last update timestamp (ISO 8601).", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "domain", "message", "enabled", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainWelcomeMessageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainWelcomeMessageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "domain": obj.get("domain"), + "message": obj.get("message"), + "enabled": obj.get("enabled"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/domain_welcome_message_response_v1.py b/corellium/models/domain_welcome_message_response_v1.py new file mode 100644 index 0000000..2ec3959 --- /dev/null +++ b/corellium/models/domain_welcome_message_response_v1.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DomainWelcomeMessageResponseV1(BaseModel): + """ + + """ # noqa: E501 + identifier: StrictStr = Field(description="Unique identifier for the welcome message (UUID)") + domain: StrictStr = Field(description="Domain identifier (UUID)") + message: StrictStr = Field(description="Sanitized welcome message text") + created_at: StrictStr = Field(description="Creation timestamp (ISO 8601)", alias="createdAt") + updated_at: StrictStr = Field(description="Last update timestamp (ISO 8601)", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "domain", "message", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainWelcomeMessageResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainWelcomeMessageResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "domain": obj.get("domain"), + "message": obj.get("message"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/edit_invites_body.py b/corellium/models/edit_invites_body.py new file mode 100644 index 0000000..f2ad4d0 --- /dev/null +++ b/corellium/models/edit_invites_body.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.edit_invites_body_changes import EditInvitesBodyChanges +from typing import Optional, Set +from typing_extensions import Self + +class EditInvitesBody(BaseModel): + """ + EditInvitesBody + """ # noqa: E501 + ids: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Invite IDs to operate on.") + changes: EditInvitesBodyChanges + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ids", "changes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EditInvitesBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of changes + if self.changes: + _dict['changes'] = self.changes.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EditInvitesBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ids": obj.get("ids"), + "changes": EditInvitesBodyChanges.from_dict(obj["changes"]) if obj.get("changes") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/edit_invites_body_changes.py b/corellium/models/edit_invites_body_changes.py new file mode 100644 index 0000000..bc2c4ac --- /dev/null +++ b/corellium/models/edit_invites_body_changes.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.invite_settings import InviteSettings +from typing import Optional, Set +from typing_extensions import Self + +class EditInvitesBodyChanges(BaseModel): + """ + Changes to apply to the invites. + """ # noqa: E501 + settings: Optional[InviteSettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EditInvitesBodyChanges from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EditInvitesBodyChanges from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "settings": InviteSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/enable_btrace_body.py b/corellium/models/enable_btrace_body.py new file mode 100644 index 0000000..e635ec5 --- /dev/null +++ b/corellium/models/enable_btrace_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EnableBtraceBody(BaseModel): + """ + EnableBtraceBody + """ # noqa: E501 + ranges: Optional[List[List[StrictStr]]] = Field(default=None, description="Kernel address ranges to trace, each a `[start, end]` pair of hexadecimal addresses. To trace one kernel extension, use its `range` from `v3GetInstanceKcrange`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ranges"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnableBtraceBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnableBtraceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ranges": obj.get("ranges") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/enable_netdump_body.py b/corellium/models/enable_netdump_body.py new file mode 100644 index 0000000..ea34482 --- /dev/null +++ b/corellium/models/enable_netdump_body.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EnableNetdumpBody(BaseModel): + """ + EnableNetdumpBody + """ # noqa: E501 + port_ranges: Optional[List[StrictStr]] = Field(default=None, description="Optional. Capture only traffic on ports in these ranges, each written `low-high`.", alias="portRanges") + src_ports: Optional[List[StrictStr]] = Field(default=None, description="Source ports to capture.", alias="srcPorts") + dst_ports: Optional[List[StrictStr]] = Field(default=None, description="Destination ports to capture.", alias="dstPorts") + ports: Optional[List[StrictStr]] = Field(default=None, description="Ports to capture.") + protocols: Optional[List[StrictStr]] = Field(default=None, description="Protocols to capture.") + processes: Optional[List[StrictStr]] = Field(default=None, description="Optional. Capture only traffic sent or received by processes with these names.") + hosts: Optional[List[StrictStr]] = Field(default=None, description="Host IP addresses to capture.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["portRanges", "srcPorts", "dstPorts", "ports", "protocols", "processes", "hosts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnableNetdumpBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnableNetdumpBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "portRanges": obj.get("portRanges"), + "srcPorts": obj.get("srcPorts"), + "dstPorts": obj.get("dstPorts"), + "ports": obj.get("ports"), + "protocols": obj.get("protocols"), + "processes": obj.get("processes"), + "hosts": obj.get("hosts") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/enable_sslsplit_body.py b/corellium/models/enable_sslsplit_body.py new file mode 100644 index 0000000..5191856 --- /dev/null +++ b/corellium/models/enable_sslsplit_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EnableSslsplitBody(BaseModel): + """ + EnableSslsplitBody + """ # noqa: E501 + truncate_pcap: Optional[StrictBool] = Field(default=None, description="Whether to truncate the Network Monitor capture file.", alias="truncatePcap") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["truncatePcap"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnableSslsplitBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnableSslsplitBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "truncatePcap": obj.get("truncatePcap") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ensure_domain_settings_body.py b/corellium/models/ensure_domain_settings_body.py new file mode 100644 index 0000000..4c1b355 --- /dev/null +++ b/corellium/models/ensure_domain_settings_body.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.domain_config_input import DomainConfigInput +from corellium.models.ensure_domain_settings_body_admin_user import EnsureDomainSettingsBodyAdminUser +from typing import Optional, Set +from typing_extensions import Self + +class EnsureDomainSettingsBody(BaseModel): + """ + EnsureDomainSettingsBody + """ # noqa: E501 + fqdn: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name.") + name: Optional[StrictStr] = Field(default=None, description="Domain name.") + cores: Optional[StrictInt] = Field(default=None, description="Core quota.") + password: Optional[StrictStr] = Field(default=None, description="Admin user password.") + password_if_empty: Optional[StrictStr] = Field(default=None, description="Admin password (only applied if no password is currently set).", alias="passwordIfEmpty") + config: Optional[DomainConfigInput] = None + admin_user: Optional[EnsureDomainSettingsBodyAdminUser] = Field(default=None, alias="adminUser") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fqdn", "name", "cores", "password", "passwordIfEmpty", "config", "adminUser"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnsureDomainSettingsBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # override the default output from pydantic by calling `to_dict()` of admin_user + if self.admin_user: + _dict['adminUser'] = self.admin_user.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnsureDomainSettingsBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fqdn": obj.get("fqdn"), + "name": obj.get("name"), + "cores": obj.get("cores"), + "password": obj.get("password"), + "passwordIfEmpty": obj.get("passwordIfEmpty"), + "config": DomainConfigInput.from_dict(obj["config"]) if obj.get("config") is not None else None, + "adminUser": EnsureDomainSettingsBodyAdminUser.from_dict(obj["adminUser"]) if obj.get("adminUser") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ensure_domain_settings_body_admin_user.py b/corellium/models/ensure_domain_settings_body_admin_user.py new file mode 100644 index 0000000..e936b9e --- /dev/null +++ b/corellium/models/ensure_domain_settings_body_admin_user.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EnsureDomainSettingsBodyAdminUser(BaseModel): + """ + Admin user info. + """ # noqa: E501 + username: Optional[StrictStr] = Field(default=None, description="Admin username.") + email: Optional[StrictStr] = Field(default=None, description="Admin email.") + label: Optional[StrictStr] = Field(default=None, description="Admin display label.") + billing_url: Optional[StrictStr] = Field(default=None, description="Billing portal URL.", alias="billingUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "email", "label", "billingUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnsureDomainSettingsBodyAdminUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if billing_url (nullable) is None + # and model_fields_set contains the field + if self.billing_url is None and "billing_url" in self.model_fields_set: + _dict['billingUrl'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnsureDomainSettingsBodyAdminUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "email": obj.get("email"), + "label": obj.get("label"), + "billingUrl": obj.get("billingUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ensure_domain_settings_response.py b/corellium/models/ensure_domain_settings_response.py new file mode 100644 index 0000000..0afb87c --- /dev/null +++ b/corellium/models/ensure_domain_settings_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.ensure_domain_settings_response_user import EnsureDomainSettingsResponseUser +from typing import Optional, Set +from typing_extensions import Self + +class EnsureDomainSettingsResponse(BaseModel): + """ + EnsureDomainSettingsResponse + """ # noqa: E501 + created: StrictBool = Field(description="Whether the domain was newly created.") + identifier: StrictStr = Field(description="Domain identifier.") + user: EnsureDomainSettingsResponseUser + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["created", "identifier", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnsureDomainSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnsureDomainSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created": obj.get("created"), + "identifier": obj.get("identifier"), + "user": EnsureDomainSettingsResponseUser.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ensure_domain_settings_response_user.py b/corellium/models/ensure_domain_settings_response_user.py new file mode 100644 index 0000000..e53e781 --- /dev/null +++ b/corellium/models/ensure_domain_settings_response_user.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class EnsureDomainSettingsResponseUser(BaseModel): + """ + Admin user info. + """ # noqa: E501 + identifier: StrictStr = Field(description="Admin user identifier.") + created: StrictBool = Field(description="Whether the user was newly created.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "created"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnsureDomainSettingsResponseUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnsureDomainSettingsResponseUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "created": obj.get("created") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/extended_firmware_asset_info.py b/corellium/models/extended_firmware_asset_info.py new file mode 100644 index 0000000..1b180e0 --- /dev/null +++ b/corellium/models/extended_firmware_asset_info.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ExtendedFirmwareAssetInfo(BaseModel): + """ + ExtendedFirmwareAssetInfo + """ # noqa: E501 + firmwares: List[StrictStr] = Field(description="Firmware filenames using this asset.") + instances: List[StrictStr] = Field(description="Instance identifiers using one of the firmwares.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["firmwares", "instances"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtendedFirmwareAssetInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtendedFirmwareAssetInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firmwares": obj.get("firmwares"), + "instances": obj.get("instances") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/extended_firmware_asset_info_v1.py b/corellium/models/extended_firmware_asset_info_v1.py new file mode 100644 index 0000000..0c56064 --- /dev/null +++ b/corellium/models/extended_firmware_asset_info_v1.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ExtendedFirmwareAssetInfoV1(BaseModel): + """ + + """ # noqa: E501 + firmwares: List[StrictStr] = Field(description="Firmware Records from FW Service") + instances: List[StrictStr] = Field(description="Instances using one of the firmwares, and thus the asset") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["firmwares", "instances"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtendedFirmwareAssetInfoV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtendedFirmwareAssetInfoV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firmwares": obj.get("firmwares"), + "instances": obj.get("instances") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/extension.py b/corellium/models/extension.py new file mode 100644 index 0000000..d4294cd --- /dev/null +++ b/corellium/models/extension.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.extension_flavor import ExtensionFlavor +from typing import Optional, Set +from typing_extensions import Self + +class Extension(BaseModel): + """ + Extension + """ # noqa: E501 + id: StrictStr = Field(description="Extension identifier.") + enabled: StrictBool = Field(description="If true, instances requiring this extension can be created or started.") + created_at: datetime = Field(description="Created date (ISO-8601).", alias="createdAt") + updated_at: datetime = Field(description="Updated date (ISO-8601).", alias="updatedAt") + image_id: StrictStr = Field(description="Image ID.", alias="imageId") + state: Optional[StrictStr] = Field(description="State.") + flavors: List[ExtensionFlavor] = Field(description="Array of flavor definitions.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "enabled", "createdAt", "updatedAt", "imageId", "state", "flavors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Extension from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in flavors (list) + _items = [] + if self.flavors: + for _item_flavors in self.flavors: + if _item_flavors: + _items.append(_item_flavors.to_dict()) + _dict['flavors'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Extension from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "enabled": obj.get("enabled"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "imageId": obj.get("imageId"), + "state": obj.get("state"), + "flavors": [ExtensionFlavor.from_dict(_item) for _item in obj["flavors"]] if obj.get("flavors") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/extension_flavor.py b/corellium/models/extension_flavor.py new file mode 100644 index 0000000..8cfed18 --- /dev/null +++ b/corellium/models/extension_flavor.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ExtensionFlavor(BaseModel): + """ + ExtensionFlavor + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Device type.") + flavor: Optional[StrictStr] = Field(default=None, description="Human-readable flavor name.") + flavor_id: Optional[StrictStr] = Field(default=None, description="Flavor identifier.", alias="flavorId") + product: Optional[StrictStr] = Field(default=None, description="Product identifier.") + cores: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of cores.") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="RAM in MiB.") + supports_gdb: Optional[StrictBool] = Field(default=None, description="Whether GDB is supported.", alias="supportsGdb") + supports_serial_console: Optional[StrictBool] = Field(default=None, description="Whether a serial console is supported.", alias="supportsSerialConsole") + supports_preset_boot_options: Optional[StrictBool] = Field(default=None, description="Whether preset boot options are supported.", alias="supportsPresetBootOptions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "flavor", "flavorId", "product", "cores", "ram", "supportsGdb", "supportsSerialConsole", "supportsPresetBootOptions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtensionFlavor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtensionFlavor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "flavor": obj.get("flavor"), + "flavorId": obj.get("flavorId"), + "product": obj.get("product"), + "cores": obj.get("cores"), + "ram": obj.get("ram"), + "supportsGdb": obj.get("supportsGdb"), + "supportsSerialConsole": obj.get("supportsSerialConsole"), + "supportsPresetBootOptions": obj.get("supportsPresetBootOptions") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/extension_list.py b/corellium/models/extension_list.py new file mode 100644 index 0000000..3d239ad --- /dev/null +++ b/corellium/models/extension_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.extension import Extension +from typing import Optional, Set +from typing_extensions import Self + +class ExtensionList(BaseModel): + """ + ExtensionList + """ # noqa: E501 + results: List[Extension] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtensionList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtensionList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Extension.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/extension_v1.py b/corellium/models/extension_v1.py new file mode 100644 index 0000000..6bc3752 --- /dev/null +++ b/corellium/models/extension_v1.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ExtensionV1(BaseModel): + """ + + """ # noqa: E501 + identifier: Optional[StrictStr] = Field(default=None, description="Identifier") + enabled: Optional[StrictBool] = Field(default=None, description="If true, instances requiring this extension can be created or started") + created_at: Optional[StrictStr] = Field(default=None, description="Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z", alias="createdAt") + updated_at: Optional[StrictStr] = Field(default=None, description="Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z", alias="updatedAt") + image_id: Optional[StrictStr] = Field(default=None, description="Image Id", alias="imageId") + state: Optional[StrictStr] = Field(default=None, description="State") + flavors: Optional[List[Dict[str, Any]]] = Field(default=None, description="Array of Flavor definitions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "enabled", "createdAt", "updatedAt", "imageId", "state", "flavors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExtensionV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + # set to None if image_id (nullable) is None + # and model_fields_set contains the field + if self.image_id is None and "image_id" in self.model_fields_set: + _dict['imageId'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if flavors (nullable) is None + # and model_fields_set contains the field + if self.flavors is None and "flavors" in self.model_fields_set: + _dict['flavors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtensionV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "enabled": obj.get("enabled"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "imageId": obj.get("imageId"), + "state": obj.get("state"), + "flavors": obj.get("flavors") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/features.py b/corellium/models/features.py new file mode 100644 index 0000000..304503e --- /dev/null +++ b/corellium/models/features.py @@ -0,0 +1,239 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Features(BaseModel): + """ + + """ # noqa: E501 + apps: Optional[StrictBool] = None + connect: Optional[StrictBool] = None + console: Optional[StrictBool] = None + core_trace: Optional[StrictBool] = Field(default=None, alias="coreTrace") + device_control: Optional[StrictBool] = Field(default=None, alias="deviceControl") + device_delete: Optional[StrictBool] = Field(default=None, alias="deviceDelete") + files: Optional[StrictBool] = None + frida: Optional[StrictBool] = None + images: Optional[StrictBool] = None + messaging: Optional[StrictBool] = None + netmon: Optional[StrictBool] = None + network: Optional[StrictBool] = None + port_forwarding: Optional[StrictBool] = Field(default=None, alias="portForwarding") + power_management: Optional[StrictBool] = Field(default=None, alias="powerManagement") + profile: Optional[StrictBool] = None + sensors: Optional[StrictBool] = None + settings: Optional[StrictBool] = None + snapshots: Optional[StrictBool] = None + strace: Optional[StrictBool] = None + system: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["apps", "connect", "console", "coreTrace", "deviceControl", "deviceDelete", "files", "frida", "images", "messaging", "netmon", "network", "portForwarding", "powerManagement", "profile", "sensors", "settings", "snapshots", "strace", "system"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Features from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if apps (nullable) is None + # and model_fields_set contains the field + if self.apps is None and "apps" in self.model_fields_set: + _dict['apps'] = None + + # set to None if connect (nullable) is None + # and model_fields_set contains the field + if self.connect is None and "connect" in self.model_fields_set: + _dict['connect'] = None + + # set to None if console (nullable) is None + # and model_fields_set contains the field + if self.console is None and "console" in self.model_fields_set: + _dict['console'] = None + + # set to None if core_trace (nullable) is None + # and model_fields_set contains the field + if self.core_trace is None and "core_trace" in self.model_fields_set: + _dict['coreTrace'] = None + + # set to None if device_control (nullable) is None + # and model_fields_set contains the field + if self.device_control is None and "device_control" in self.model_fields_set: + _dict['deviceControl'] = None + + # set to None if device_delete (nullable) is None + # and model_fields_set contains the field + if self.device_delete is None and "device_delete" in self.model_fields_set: + _dict['deviceDelete'] = None + + # set to None if files (nullable) is None + # and model_fields_set contains the field + if self.files is None and "files" in self.model_fields_set: + _dict['files'] = None + + # set to None if frida (nullable) is None + # and model_fields_set contains the field + if self.frida is None and "frida" in self.model_fields_set: + _dict['frida'] = None + + # set to None if images (nullable) is None + # and model_fields_set contains the field + if self.images is None and "images" in self.model_fields_set: + _dict['images'] = None + + # set to None if messaging (nullable) is None + # and model_fields_set contains the field + if self.messaging is None and "messaging" in self.model_fields_set: + _dict['messaging'] = None + + # set to None if netmon (nullable) is None + # and model_fields_set contains the field + if self.netmon is None and "netmon" in self.model_fields_set: + _dict['netmon'] = None + + # set to None if network (nullable) is None + # and model_fields_set contains the field + if self.network is None and "network" in self.model_fields_set: + _dict['network'] = None + + # set to None if port_forwarding (nullable) is None + # and model_fields_set contains the field + if self.port_forwarding is None and "port_forwarding" in self.model_fields_set: + _dict['portForwarding'] = None + + # set to None if power_management (nullable) is None + # and model_fields_set contains the field + if self.power_management is None and "power_management" in self.model_fields_set: + _dict['powerManagement'] = None + + # set to None if profile (nullable) is None + # and model_fields_set contains the field + if self.profile is None and "profile" in self.model_fields_set: + _dict['profile'] = None + + # set to None if sensors (nullable) is None + # and model_fields_set contains the field + if self.sensors is None and "sensors" in self.model_fields_set: + _dict['sensors'] = None + + # set to None if settings (nullable) is None + # and model_fields_set contains the field + if self.settings is None and "settings" in self.model_fields_set: + _dict['settings'] = None + + # set to None if snapshots (nullable) is None + # and model_fields_set contains the field + if self.snapshots is None and "snapshots" in self.model_fields_set: + _dict['snapshots'] = None + + # set to None if strace (nullable) is None + # and model_fields_set contains the field + if self.strace is None and "strace" in self.model_fields_set: + _dict['strace'] = None + + # set to None if system (nullable) is None + # and model_fields_set contains the field + if self.system is None and "system" in self.model_fields_set: + _dict['system'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Features from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apps": obj.get("apps"), + "connect": obj.get("connect"), + "console": obj.get("console"), + "coreTrace": obj.get("coreTrace"), + "deviceControl": obj.get("deviceControl"), + "deviceDelete": obj.get("deviceDelete"), + "files": obj.get("files"), + "frida": obj.get("frida"), + "images": obj.get("images"), + "messaging": obj.get("messaging"), + "netmon": obj.get("netmon"), + "network": obj.get("network"), + "portForwarding": obj.get("portForwarding"), + "powerManagement": obj.get("powerManagement"), + "profile": obj.get("profile"), + "sensors": obj.get("sensors"), + "settings": obj.get("settings"), + "snapshots": obj.get("snapshots"), + "strace": obj.get("strace"), + "system": obj.get("system") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/fetch_firmware_assets_body.py b/corellium/models/fetch_firmware_assets_body.py new file mode 100644 index 0000000..a1578c1 --- /dev/null +++ b/corellium/models/fetch_firmware_assets_body.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class FetchFirmwareAssetsBody(BaseModel): + """ + FetchFirmwareAssetsBody + """ # noqa: E501 + asset_urls: Annotated[List[StrictStr], Field(min_length=1, max_length=100)] = Field(description="Firmware asset URLs to fetch server-side (1–100 per request).", alias="assetUrls") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["assetUrls"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FetchFirmwareAssetsBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FetchFirmwareAssetsBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assetUrls": obj.get("assetUrls") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/fetch_firmware_assets_response.py b/corellium/models/fetch_firmware_assets_response.py new file mode 100644 index 0000000..66dddbc --- /dev/null +++ b/corellium/models/fetch_firmware_assets_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.fetch_firmware_assets_response_failed_inner import FetchFirmwareAssetsResponseFailedInner +from typing import Optional, Set +from typing_extensions import Self + +class FetchFirmwareAssetsResponse(BaseModel): + """ + FetchFirmwareAssetsResponse + """ # noqa: E501 + added: List[StrictStr] = Field(description="Asset URLs newly fetched and stored.") + existing: List[StrictStr] = Field(description="Asset URLs already present.") + failed: List[FetchFirmwareAssetsResponseFailedInner] = Field(description="Assets that could not be fetched.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["added", "existing", "failed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FetchFirmwareAssetsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in failed (list) + _items = [] + if self.failed: + for _item_failed in self.failed: + if _item_failed: + _items.append(_item_failed.to_dict()) + _dict['failed'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FetchFirmwareAssetsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "added": obj.get("added"), + "existing": obj.get("existing"), + "failed": [FetchFirmwareAssetsResponseFailedInner.from_dict(_item) for _item in obj["failed"]] if obj.get("failed") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/fetch_firmware_assets_response_failed_inner.py b/corellium/models/fetch_firmware_assets_response_failed_inner.py new file mode 100644 index 0000000..1d3903e --- /dev/null +++ b/corellium/models/fetch_firmware_assets_response_failed_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class FetchFirmwareAssetsResponseFailedInner(BaseModel): + """ + FetchFirmwareAssetsResponseFailedInner + """ # noqa: E501 + url: StrictStr = Field(description="Asset URL that could not be fetched.") + error: StrictStr = Field(description="Reason the fetch failed.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FetchFirmwareAssetsResponseFailedInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FetchFirmwareAssetsResponseFailedInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "error": obj.get("error") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/file_changes.py b/corellium/models/file_changes.py new file mode 100644 index 0000000..18d3ba4 --- /dev/null +++ b/corellium/models/file_changes.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class FileChanges(BaseModel): + """ + + """ # noqa: E501 + path: Optional[StrictStr] = Field(default=None, description="Optional New path") + mode: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional New Mode") + uid: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional New Owner UID") + gid: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Optional New Group GID") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["path", "mode", "uid", "gid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FileChanges from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if path (nullable) is None + # and model_fields_set contains the field + if self.path is None and "path" in self.model_fields_set: + _dict['path'] = None + + # set to None if mode (nullable) is None + # and model_fields_set contains the field + if self.mode is None and "mode" in self.model_fields_set: + _dict['mode'] = None + + # set to None if uid (nullable) is None + # and model_fields_set contains the field + if self.uid is None and "uid" in self.model_fields_set: + _dict['uid'] = None + + # set to None if gid (nullable) is None + # and model_fields_set contains the field + if self.gid is None and "gid" in self.model_fields_set: + _dict['gid'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileChanges from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path"), + "mode": obj.get("mode"), + "uid": obj.get("uid"), + "gid": obj.get("gid") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware.py b/corellium/models/firmware.py new file mode 100644 index 0000000..9c7a50d --- /dev/null +++ b/corellium/models/firmware.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class Firmware(BaseModel): + """ + Firmware + """ # noqa: E501 + model: List[StrictStr] = Field(description="Device models the firmware supports.") + firmware_assets: Optional[List[StrictStr]] = Field(default=None, description="Associated firmware asset URLs; null when assets have not been checked for yet.", alias="firmwareAssets") + filename: StrictStr = Field(description="Firmware filename.") + type: Optional[StrictStr] = Field(default=None, description="Firmware type.") + size: Union[StrictFloat, StrictInt] = Field(description="Firmware size in bytes.") + url: Optional[StrictStr] = Field(default=None, description="Firmware download URL.") + version: StrictStr = Field(description="Firmware version.") + build_id: Optional[StrictStr] = Field(default=None, description="Firmware build ID.", alias="buildId") + md5sum: Optional[StrictStr] = Field(default=None, description="MD5 checksum.") + sha1sum: Optional[StrictStr] = Field(default=None, description="SHA-1 checksum.") + sha256sum: Optional[StrictStr] = Field(default=None, description="SHA-256 checksum.") + corellium_checksum: Optional[StrictStr] = Field(default=None, description="Corellium chunked checksum ($$); used for upload preflight.", alias="corelliumChecksum") + release_date: Optional[StrictStr] = Field(default=None, description="Release date; may be an empty string.", alias="releaseDate") + upload_date: Optional[StrictStr] = Field(default=None, description="Upload date; may be an empty string.", alias="uploadDate") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Firmware metadata.") + unique_id: Optional[StrictStr] = Field(default=None, description="Customer-provided identifier; an arbitrary string, not a UUID.", alias="uniqueId") + android_flavor: Optional[StrictStr] = Field(default=None, description="Android device flavor; only present for coreimg firmwares.", alias="androidFlavor") + api_version: Optional[StrictStr] = Field(default=None, description="Android API version; only present for coreimg firmwares.", alias="apiVersion") + rooted: Optional[StrictBool] = Field(default=None, description="Whether a device created from this firmware is rooted. Android publishes a ` user` (not rooted) and a ` userdebug` (rooted) build per version. Null on iOS, where rooting is not a property of the firmware.") + installed: Optional[StrictBool] = Field(default=None, description="Whether the firmware is installed.") + created_at: Optional[datetime] = Field(default=None, description="When the record was created.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="When the record was last updated.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["model", "firmwareAssets", "filename", "type", "size", "url", "version", "buildId", "md5sum", "sha1sum", "sha256sum", "corelliumChecksum", "releaseDate", "uploadDate", "metadata", "uniqueId", "androidFlavor", "apiVersion", "rooted", "installed", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Firmware from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if firmware_assets (nullable) is None + # and model_fields_set contains the field + if self.firmware_assets is None and "firmware_assets" in self.model_fields_set: + _dict['firmwareAssets'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if build_id (nullable) is None + # and model_fields_set contains the field + if self.build_id is None and "build_id" in self.model_fields_set: + _dict['buildId'] = None + + # set to None if md5sum (nullable) is None + # and model_fields_set contains the field + if self.md5sum is None and "md5sum" in self.model_fields_set: + _dict['md5sum'] = None + + # set to None if sha1sum (nullable) is None + # and model_fields_set contains the field + if self.sha1sum is None and "sha1sum" in self.model_fields_set: + _dict['sha1sum'] = None + + # set to None if sha256sum (nullable) is None + # and model_fields_set contains the field + if self.sha256sum is None and "sha256sum" in self.model_fields_set: + _dict['sha256sum'] = None + + # set to None if corellium_checksum (nullable) is None + # and model_fields_set contains the field + if self.corellium_checksum is None and "corellium_checksum" in self.model_fields_set: + _dict['corelliumChecksum'] = None + + # set to None if release_date (nullable) is None + # and model_fields_set contains the field + if self.release_date is None and "release_date" in self.model_fields_set: + _dict['releaseDate'] = None + + # set to None if upload_date (nullable) is None + # and model_fields_set contains the field + if self.upload_date is None and "upload_date" in self.model_fields_set: + _dict['uploadDate'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if unique_id (nullable) is None + # and model_fields_set contains the field + if self.unique_id is None and "unique_id" in self.model_fields_set: + _dict['uniqueId'] = None + + # set to None if android_flavor (nullable) is None + # and model_fields_set contains the field + if self.android_flavor is None and "android_flavor" in self.model_fields_set: + _dict['androidFlavor'] = None + + # set to None if api_version (nullable) is None + # and model_fields_set contains the field + if self.api_version is None and "api_version" in self.model_fields_set: + _dict['apiVersion'] = None + + # set to None if rooted (nullable) is None + # and model_fields_set contains the field + if self.rooted is None and "rooted" in self.model_fields_set: + _dict['rooted'] = None + + # set to None if installed (nullable) is None + # and model_fields_set contains the field + if self.installed is None and "installed" in self.model_fields_set: + _dict['installed'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Firmware from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "model": obj.get("model"), + "firmwareAssets": obj.get("firmwareAssets"), + "filename": obj.get("filename"), + "type": obj.get("type"), + "size": obj.get("size"), + "url": obj.get("url"), + "version": obj.get("version"), + "buildId": obj.get("buildId"), + "md5sum": obj.get("md5sum"), + "sha1sum": obj.get("sha1sum"), + "sha256sum": obj.get("sha256sum"), + "corelliumChecksum": obj.get("corelliumChecksum"), + "releaseDate": obj.get("releaseDate"), + "uploadDate": obj.get("uploadDate"), + "metadata": obj.get("metadata"), + "uniqueId": obj.get("uniqueId"), + "androidFlavor": obj.get("androidFlavor"), + "apiVersion": obj.get("apiVersion"), + "rooted": obj.get("rooted"), + "installed": obj.get("installed"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_asset.py b/corellium/models/firmware_asset.py new file mode 100644 index 0000000..8dad94a --- /dev/null +++ b/corellium/models/firmware_asset.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareAsset(BaseModel): + """ + FirmwareAsset + """ # noqa: E501 + domain: StrictStr = Field(description="Owning domain identifier.") + url: StrictStr = Field(description="Asset URL.") + payload: StrictStr = Field(description="Base64-encoded asset payload.") + size: Union[StrictFloat, StrictInt] = Field(description="Asset size in bytes.") + md5sum: Optional[StrictStr] = Field(default=None, description="MD5 checksum.") + sha1sum: Optional[StrictStr] = Field(default=None, description="SHA-1 checksum.") + sha256sum: Optional[StrictStr] = Field(default=None, description="SHA-256 checksum.") + upload_date: Optional[StrictStr] = Field(default=None, description="Upload date; may be an empty string.", alias="uploadDate") + created_at: Optional[datetime] = Field(default=None, description="When the record was created.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="When the record was last updated.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain", "url", "payload", "size", "md5sum", "sha1sum", "sha256sum", "uploadDate", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareAsset from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if upload_date (nullable) is None + # and model_fields_set contains the field + if self.upload_date is None and "upload_date" in self.model_fields_set: + _dict['uploadDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareAsset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "url": obj.get("url"), + "payload": obj.get("payload"), + "size": obj.get("size"), + "md5sum": obj.get("md5sum"), + "sha1sum": obj.get("sha1sum"), + "sha256sum": obj.get("sha256sum"), + "uploadDate": obj.get("uploadDate"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_asset_filter.py b/corellium/models/firmware_asset_filter.py new file mode 100644 index 0000000..b70b139 --- /dev/null +++ b/corellium/models/firmware_asset_filter.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareAssetFilter(BaseModel): + """ + Exact-match filters (filter[url], filter[domain]). + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="Filter by exact URL.") + domain: Optional[StrictStr] = Field(default=None, description="Filter by exact domain.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareAssetFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareAssetFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "domain": obj.get("domain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_asset_list.py b/corellium/models/firmware_asset_list.py new file mode 100644 index 0000000..2cf19a7 --- /dev/null +++ b/corellium/models/firmware_asset_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.firmware_asset import FirmwareAsset +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareAssetList(BaseModel): + """ + FirmwareAssetList + """ # noqa: E501 + results: List[FirmwareAsset] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareAssetList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareAssetList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [FirmwareAsset.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_asset_v1.py b/corellium/models/firmware_asset_v1.py new file mode 100644 index 0000000..4bb453d --- /dev/null +++ b/corellium/models/firmware_asset_v1.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareAssetV1(BaseModel): + """ + + """ # noqa: E501 + domain: StrictStr + url: StrictStr + payload: StrictStr + size: Union[StrictFloat, StrictInt] + md5sum: Optional[StrictStr] = None + sha1sum: Optional[StrictStr] = None + sha256sum: Optional[StrictStr] = None + uploaddate: Optional[StrictStr] = None + created_at: Optional[StrictStr] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictStr] = Field(default=None, alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain", "url", "payload", "size", "md5sum", "sha1sum", "sha256sum", "uploaddate", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareAssetV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if md5sum (nullable) is None + # and model_fields_set contains the field + if self.md5sum is None and "md5sum" in self.model_fields_set: + _dict['md5sum'] = None + + # set to None if sha1sum (nullable) is None + # and model_fields_set contains the field + if self.sha1sum is None and "sha1sum" in self.model_fields_set: + _dict['sha1sum'] = None + + # set to None if sha256sum (nullable) is None + # and model_fields_set contains the field + if self.sha256sum is None and "sha256sum" in self.model_fields_set: + _dict['sha256sum'] = None + + # set to None if uploaddate (nullable) is None + # and model_fields_set contains the field + if self.uploaddate is None and "uploaddate" in self.model_fields_set: + _dict['uploaddate'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareAssetV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "url": obj.get("url"), + "payload": obj.get("payload"), + "size": obj.get("size"), + "md5sum": obj.get("md5sum"), + "sha1sum": obj.get("sha1sum"), + "sha256sum": obj.get("sha256sum"), + "uploaddate": obj.get("uploaddate"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_device.py b/corellium/models/firmware_device.py new file mode 100644 index 0000000..cd1c6dc --- /dev/null +++ b/corellium/models/firmware_device.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareDevice(BaseModel): + """ + FirmwareDevice + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Device type.") + model: StrictStr = Field(description="Device model.") + name: StrictStr = Field(description="Device name.") + platform: Optional[StrictStr] = Field(default=None, description="Device platform.") + hw_model: Optional[StrictStr] = Field(default=None, description="Hardware model.", alias="hwModel") + bdid: Optional[StrictStr] = Field(default=None, description="Board ID.") + cpid: Optional[StrictStr] = Field(default=None, description="Chip ID.") + created_at: Optional[datetime] = Field(default=None, description="Creation timestamp.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="Last update timestamp.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "model", "name", "platform", "hwModel", "bdid", "cpid", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareDevice from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareDevice from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "model": obj.get("model"), + "name": obj.get("name"), + "platform": obj.get("platform"), + "hwModel": obj.get("hwModel"), + "bdid": obj.get("bdid"), + "cpid": obj.get("cpid"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_device_list.py b/corellium/models/firmware_device_list.py new file mode 100644 index 0000000..8f0f54f --- /dev/null +++ b/corellium/models/firmware_device_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.firmware_device import FirmwareDevice +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareDeviceList(BaseModel): + """ + FirmwareDeviceList + """ # noqa: E501 + results: List[FirmwareDevice] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareDeviceList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareDeviceList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [FirmwareDevice.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_info_device.py b/corellium/models/firmware_info_device.py new file mode 100644 index 0000000..1d3b659 --- /dev/null +++ b/corellium/models/firmware_info_device.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.firmware_info_device_firmwares_inner import FirmwareInfoDeviceFirmwaresInner +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareInfoDevice(BaseModel): + """ + Matched supported device; only present when extended info was requested. + """ # noqa: E501 + flavor: Optional[StrictStr] = Field(default=None, description="Matched device flavor.") + firmwares: Optional[List[FirmwareInfoDeviceFirmwaresInner]] = Field(default=None, description="Supported firmwares matching the version and build ID of this image.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["flavor", "firmwares"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareInfoDevice from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in firmwares (list) + _items = [] + if self.firmwares: + for _item_firmwares in self.firmwares: + if _item_firmwares: + _items.append(_item_firmwares.to_dict()) + _dict['firmwares'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareInfoDevice from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "flavor": obj.get("flavor"), + "firmwares": [FirmwareInfoDeviceFirmwaresInner.from_dict(_item) for _item in obj["firmwares"]] if obj.get("firmwares") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_info_device_firmwares_inner.py b/corellium/models/firmware_info_device_firmwares_inner.py new file mode 100644 index 0000000..ce06a0c --- /dev/null +++ b/corellium/models/firmware_info_device_firmwares_inner.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareInfoDeviceFirmwaresInner(BaseModel): + """ + FirmwareInfoDeviceFirmwaresInner + """ # noqa: E501 + filename: Optional[StrictStr] = Field(default=None, description="Firmware filename.") + version: Optional[StrictStr] = Field(default=None, description="Firmware version.") + build_id: Optional[StrictStr] = Field(default=None, description="Firmware build ID.", alias="buildId") + url: Optional[StrictStr] = Field(default=None, description="Firmware download URL.") + orig_url: Optional[StrictStr] = Field(default=None, description="Original vendor firmware URL.", alias="origUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["filename", "version", "buildId", "url", "origUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareInfoDeviceFirmwaresInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareInfoDeviceFirmwaresInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filename": obj.get("filename"), + "version": obj.get("version"), + "buildId": obj.get("buildId"), + "url": obj.get("url"), + "origUrl": obj.get("origUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_list.py b/corellium/models/firmware_list.py new file mode 100644 index 0000000..9ed658d --- /dev/null +++ b/corellium/models/firmware_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.firmware import Firmware +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareList(BaseModel): + """ + FirmwareList + """ # noqa: E501 + results: List[Firmware] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Firmware.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_service_config.py b/corellium/models/firmware_service_config.py new file mode 100644 index 0000000..efbce1a --- /dev/null +++ b/corellium/models/firmware_service_config.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from corellium.models.firmware_service_config_cache_firmware import FirmwareServiceConfigCacheFirmware +from corellium.models.firmware_service_config_download_ipsw_filters import FirmwareServiceConfigDownloadIpswFilters +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareServiceConfig(BaseModel): + """ + FirmwareServiceConfig + """ # noqa: E501 + cache_firmware: FirmwareServiceConfigCacheFirmware = Field(alias="cacheFirmware") + cluster_firmware_assets: FirmwareServiceConfigCacheFirmware = Field(alias="clusterFirmwareAssets") + fallback_original_url: FirmwareServiceConfigCacheFirmware = Field(alias="fallbackOriginalUrl") + fetch_firmware_assets: FirmwareServiceConfigCacheFirmware = Field(alias="fetchFirmwareAssets") + should_download: FirmwareServiceConfigCacheFirmware = Field(alias="shouldDownload") + download_ipsw_filters: FirmwareServiceConfigDownloadIpswFilters = Field(alias="downloadIpswFilters") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cacheFirmware", "clusterFirmwareAssets", "fallbackOriginalUrl", "fetchFirmwareAssets", "shouldDownload", "downloadIpswFilters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareServiceConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of cache_firmware + if self.cache_firmware: + _dict['cacheFirmware'] = self.cache_firmware.to_dict() + # override the default output from pydantic by calling `to_dict()` of cluster_firmware_assets + if self.cluster_firmware_assets: + _dict['clusterFirmwareAssets'] = self.cluster_firmware_assets.to_dict() + # override the default output from pydantic by calling `to_dict()` of fallback_original_url + if self.fallback_original_url: + _dict['fallbackOriginalUrl'] = self.fallback_original_url.to_dict() + # override the default output from pydantic by calling `to_dict()` of fetch_firmware_assets + if self.fetch_firmware_assets: + _dict['fetchFirmwareAssets'] = self.fetch_firmware_assets.to_dict() + # override the default output from pydantic by calling `to_dict()` of should_download + if self.should_download: + _dict['shouldDownload'] = self.should_download.to_dict() + # override the default output from pydantic by calling `to_dict()` of download_ipsw_filters + if self.download_ipsw_filters: + _dict['downloadIpswFilters'] = self.download_ipsw_filters.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareServiceConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cacheFirmware": FirmwareServiceConfigCacheFirmware.from_dict(obj["cacheFirmware"]) if obj.get("cacheFirmware") is not None else None, + "clusterFirmwareAssets": FirmwareServiceConfigCacheFirmware.from_dict(obj["clusterFirmwareAssets"]) if obj.get("clusterFirmwareAssets") is not None else None, + "fallbackOriginalUrl": FirmwareServiceConfigCacheFirmware.from_dict(obj["fallbackOriginalUrl"]) if obj.get("fallbackOriginalUrl") is not None else None, + "fetchFirmwareAssets": FirmwareServiceConfigCacheFirmware.from_dict(obj["fetchFirmwareAssets"]) if obj.get("fetchFirmwareAssets") is not None else None, + "shouldDownload": FirmwareServiceConfigCacheFirmware.from_dict(obj["shouldDownload"]) if obj.get("shouldDownload") is not None else None, + "downloadIpswFilters": FirmwareServiceConfigDownloadIpswFilters.from_dict(obj["downloadIpswFilters"]) if obj.get("downloadIpswFilters") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_service_config_cache_firmware.py b/corellium/models/firmware_service_config_cache_firmware.py new file mode 100644 index 0000000..ad79115 --- /dev/null +++ b/corellium/models/firmware_service_config_cache_firmware.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareServiceConfigCacheFirmware(BaseModel): + """ + FirmwareServiceConfigCacheFirmware + """ # noqa: E501 + value: StrictBool = Field(description="Current setting value.") + component: Optional[StrictStr] = Field(default=None, description="UI component hint.") + title: Optional[StrictStr] = Field(default=None, description="Human-readable title.") + description: Optional[StrictStr] = Field(default=None, description="Setting description.") + type: Optional[StrictStr] = Field(default=None, description="Value type.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["value", "component", "title", "description", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareServiceConfigCacheFirmware from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareServiceConfigCacheFirmware from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value"), + "component": obj.get("component"), + "title": obj.get("title"), + "description": obj.get("description"), + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_service_config_download_ipsw_filters.py b/corellium/models/firmware_service_config_download_ipsw_filters.py new file mode 100644 index 0000000..c36f21d --- /dev/null +++ b/corellium/models/firmware_service_config_download_ipsw_filters.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.ipsw_filter_v3 import IpswFilterV3 +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareServiceConfigDownloadIpswFilters(BaseModel): + """ + FirmwareServiceConfigDownloadIpswFilters + """ # noqa: E501 + value: List[IpswFilterV3] = Field(description="Current setting value.") + component: Optional[StrictStr] = Field(default=None, description="UI component hint.") + title: Optional[StrictStr] = Field(default=None, description="Human-readable title.") + description: Optional[StrictStr] = Field(default=None, description="Setting description.") + type: Optional[StrictStr] = Field(default=None, description="Value type.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["value", "component", "title", "description", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareServiceConfigDownloadIpswFilters from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in value (list) + _items = [] + if self.value: + for _item_value in self.value: + if _item_value: + _items.append(_item_value.to_dict()) + _dict['value'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareServiceConfigDownloadIpswFilters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": [IpswFilterV3.from_dict(_item) for _item in obj["value"]] if obj.get("value") is not None else None, + "component": obj.get("component"), + "title": obj.get("title"), + "description": obj.get("description"), + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_service_config_value.py b/corellium/models/firmware_service_config_value.py new file mode 100644 index 0000000..f44cd6f --- /dev/null +++ b/corellium/models/firmware_service_config_value.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareServiceConfigValue(BaseModel): + """ + FirmwareServiceConfigValue + """ # noqa: E501 + value: Optional[Any] = Field(default=None, description="Current setting value.") + component: Optional[StrictStr] = Field(default=None, description="UI component hint.") + title: Optional[StrictStr] = Field(default=None, description="Human-readable title.") + description: Optional[StrictStr] = Field(default=None, description="Setting description.") + type: Optional[StrictStr] = Field(default=None, description="Value type.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["value", "component", "title", "description", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareServiceConfigValue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareServiceConfigValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value"), + "component": obj.get("component"), + "title": obj.get("title"), + "description": obj.get("description"), + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_service_configuration.py b/corellium/models/firmware_service_configuration.py new file mode 100644 index 0000000..b9ddea0 --- /dev/null +++ b/corellium/models/firmware_service_configuration.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.ipsw_filter import IpswFilter +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareServiceConfiguration(BaseModel): + """ + + """ # noqa: E501 + cache_firmware: Optional[StrictBool] = Field(default=None, description="Cache Firmwares in /var/ipsw", alias="cacheFirmware") + cluster_firmware_assets: Optional[StrictBool] = Field(default=None, description="Assets are cluster-wide", alias="clusterFirmwareAssets") + fallback_original_url: Optional[StrictBool] = Field(default=None, description="Use original URL to fetch firmware", alias="fallbackOriginalUrl") + fetch_firmware_assets: Optional[StrictBool] = Field(default=None, description="Automatically fetch assets", alias="fetchFirmwareAssets") + should_download: Optional[StrictBool] = Field(default=None, description="Download firmwares", alias="shouldDownload") + download_ipsw_filters: Optional[List[IpswFilter]] = Field(default=None, description="Filters that control which IPSW builds are downloaded", alias="downloadIpswFilters") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cacheFirmware", "clusterFirmwareAssets", "fallbackOriginalUrl", "fetchFirmwareAssets", "shouldDownload", "downloadIpswFilters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareServiceConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in download_ipsw_filters (list) + _items = [] + if self.download_ipsw_filters: + for _item_download_ipsw_filters in self.download_ipsw_filters: + if _item_download_ipsw_filters: + _items.append(_item_download_ipsw_filters.to_dict()) + _dict['downloadIpswFilters'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cache_firmware (nullable) is None + # and model_fields_set contains the field + if self.cache_firmware is None and "cache_firmware" in self.model_fields_set: + _dict['cacheFirmware'] = None + + # set to None if cluster_firmware_assets (nullable) is None + # and model_fields_set contains the field + if self.cluster_firmware_assets is None and "cluster_firmware_assets" in self.model_fields_set: + _dict['clusterFirmwareAssets'] = None + + # set to None if fallback_original_url (nullable) is None + # and model_fields_set contains the field + if self.fallback_original_url is None and "fallback_original_url" in self.model_fields_set: + _dict['fallbackOriginalUrl'] = None + + # set to None if fetch_firmware_assets (nullable) is None + # and model_fields_set contains the field + if self.fetch_firmware_assets is None and "fetch_firmware_assets" in self.model_fields_set: + _dict['fetchFirmwareAssets'] = None + + # set to None if should_download (nullable) is None + # and model_fields_set contains the field + if self.should_download is None and "should_download" in self.model_fields_set: + _dict['shouldDownload'] = None + + # set to None if download_ipsw_filters (nullable) is None + # and model_fields_set contains the field + if self.download_ipsw_filters is None and "download_ipsw_filters" in self.model_fields_set: + _dict['downloadIpswFilters'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareServiceConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cacheFirmware": obj.get("cacheFirmware"), + "clusterFirmwareAssets": obj.get("clusterFirmwareAssets"), + "fallbackOriginalUrl": obj.get("fallbackOriginalUrl"), + "fetchFirmwareAssets": obj.get("fetchFirmwareAssets"), + "shouldDownload": obj.get("shouldDownload"), + "downloadIpswFilters": [IpswFilter.from_dict(_item) for _item in obj["downloadIpswFilters"]] if obj.get("downloadIpswFilters") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_service_settings.py b/corellium/models/firmware_service_settings.py new file mode 100644 index 0000000..78bc6af --- /dev/null +++ b/corellium/models/firmware_service_settings.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from corellium.models.ipsw_filter_v3 import IpswFilterV3 +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareServiceSettings(BaseModel): + """ + FirmwareServiceSettings + """ # noqa: E501 + cache_firmware: StrictBool = Field(description="Cache firmwares in /var/ipsw.", alias="cacheFirmware") + cluster_firmware_assets: StrictBool = Field(description="Assets are cluster-wide.", alias="clusterFirmwareAssets") + fallback_original_url: StrictBool = Field(description="Use original URL to fetch firmware.", alias="fallbackOriginalUrl") + fetch_firmware_assets: StrictBool = Field(description="Automatically fetch assets.", alias="fetchFirmwareAssets") + should_download: StrictBool = Field(description="Download firmwares.", alias="shouldDownload") + download_ipsw_filters: List[IpswFilterV3] = Field(description="Filters controlling which IPSW builds are downloaded.", alias="downloadIpswFilters") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cacheFirmware", "clusterFirmwareAssets", "fallbackOriginalUrl", "fetchFirmwareAssets", "shouldDownload", "downloadIpswFilters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareServiceSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in download_ipsw_filters (list) + _items = [] + if self.download_ipsw_filters: + for _item_download_ipsw_filters in self.download_ipsw_filters: + if _item_download_ipsw_filters: + _items.append(_item_download_ipsw_filters.to_dict()) + _dict['downloadIpswFilters'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareServiceSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cacheFirmware": obj.get("cacheFirmware"), + "clusterFirmwareAssets": obj.get("clusterFirmwareAssets"), + "fallbackOriginalUrl": obj.get("fallbackOriginalUrl"), + "fetchFirmwareAssets": obj.get("fetchFirmwareAssets"), + "shouldDownload": obj.get("shouldDownload"), + "downloadIpswFilters": [IpswFilterV3.from_dict(_item) for _item in obj["downloadIpswFilters"]] if obj.get("downloadIpswFilters") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/firmware_v1.py b/corellium/models/firmware_v1.py new file mode 100644 index 0000000..fd39afa --- /dev/null +++ b/corellium/models/firmware_v1.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FirmwareV1(BaseModel): + """ + + """ # noqa: E501 + version: Optional[StrictStr] = None + buildid: Optional[StrictStr] = None + android_flavor: Optional[StrictStr] = Field(default=None, description="Android only flavor", alias="AndroidFlavor") + api_version: Optional[StrictStr] = Field(default=None, description="Android only API version", alias="APIVersion") + sha256sum: Optional[StrictStr] = None + sha1sum: Optional[StrictStr] = None + md5sum: Optional[StrictStr] = None + size: Optional[StrictInt] = None + unique_id: Optional[StrictStr] = Field(default=None, alias="uniqueId") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Firmware metadata") + releasedate: Optional[datetime] = Field(default=None, description="Release Date") + uploaddate: Optional[datetime] = Field(default=None, description="Date uploaded") + url: Optional[StrictStr] = Field(default=None, description="URL firmware is available at") + orig_url: Optional[StrictStr] = Field(default=None, description="URL firmware is available at from vendor") + filename: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["version", "buildid", "AndroidFlavor", "APIVersion", "sha256sum", "sha1sum", "md5sum", "size", "uniqueId", "metadata", "releasedate", "uploaddate", "url", "orig_url", "filename"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirmwareV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if version (nullable) is None + # and model_fields_set contains the field + if self.version is None and "version" in self.model_fields_set: + _dict['version'] = None + + # set to None if buildid (nullable) is None + # and model_fields_set contains the field + if self.buildid is None and "buildid" in self.model_fields_set: + _dict['buildid'] = None + + # set to None if android_flavor (nullable) is None + # and model_fields_set contains the field + if self.android_flavor is None and "android_flavor" in self.model_fields_set: + _dict['AndroidFlavor'] = None + + # set to None if api_version (nullable) is None + # and model_fields_set contains the field + if self.api_version is None and "api_version" in self.model_fields_set: + _dict['APIVersion'] = None + + # set to None if sha256sum (nullable) is None + # and model_fields_set contains the field + if self.sha256sum is None and "sha256sum" in self.model_fields_set: + _dict['sha256sum'] = None + + # set to None if sha1sum (nullable) is None + # and model_fields_set contains the field + if self.sha1sum is None and "sha1sum" in self.model_fields_set: + _dict['sha1sum'] = None + + # set to None if md5sum (nullable) is None + # and model_fields_set contains the field + if self.md5sum is None and "md5sum" in self.model_fields_set: + _dict['md5sum'] = None + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + # set to None if unique_id (nullable) is None + # and model_fields_set contains the field + if self.unique_id is None and "unique_id" in self.model_fields_set: + _dict['uniqueId'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if releasedate (nullable) is None + # and model_fields_set contains the field + if self.releasedate is None and "releasedate" in self.model_fields_set: + _dict['releasedate'] = None + + # set to None if uploaddate (nullable) is None + # and model_fields_set contains the field + if self.uploaddate is None and "uploaddate" in self.model_fields_set: + _dict['uploaddate'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if orig_url (nullable) is None + # and model_fields_set contains the field + if self.orig_url is None and "orig_url" in self.model_fields_set: + _dict['orig_url'] = None + + # set to None if filename (nullable) is None + # and model_fields_set contains the field + if self.filename is None and "filename" in self.model_fields_set: + _dict['filename'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirmwareV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "buildid": obj.get("buildid"), + "AndroidFlavor": obj.get("AndroidFlavor"), + "APIVersion": obj.get("APIVersion"), + "sha256sum": obj.get("sha256sum"), + "sha1sum": obj.get("sha1sum"), + "md5sum": obj.get("md5sum"), + "size": obj.get("size"), + "uniqueId": obj.get("uniqueId"), + "metadata": obj.get("metadata"), + "releasedate": obj.get("releasedate"), + "uploaddate": obj.get("uploaddate"), + "url": obj.get("url"), + "orig_url": obj.get("orig_url"), + "filename": obj.get("filename") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/flavor_frame.py b/corellium/models/flavor_frame.py new file mode 100644 index 0000000..554401f --- /dev/null +++ b/corellium/models/flavor_frame.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from corellium.models.flavor_frame_dimensions import FlavorFrameDimensions +from corellium.models.flavor_frame_home import FlavorFrameHome +from corellium.models.flavor_frame_inner import FlavorFrameInner +from typing import Optional, Set +from typing_extensions import Self + +class FlavorFrame(BaseModel): + """ + Frame geometry and metadata for the flavor. + """ # noqa: E501 + url: StrictStr = Field(description="Relative URL to the frame image asset.") + width: Union[StrictFloat, StrictInt] = Field(description="Frame image width in points.") + height: Union[StrictFloat, StrictInt] = Field(description="Frame image height in points.") + inner: FlavorFrameInner + home: FlavorFrameHome + dimensions: FlavorFrameDimensions + scale: Union[StrictFloat, StrictInt] = Field(description="Display scale factor.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url", "width", "height", "inner", "home", "dimensions", "scale"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorFrame from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of inner + if self.inner: + _dict['inner'] = self.inner.to_dict() + # override the default output from pydantic by calling `to_dict()` of home + if self.home: + _dict['home'] = self.home.to_dict() + # override the default output from pydantic by calling `to_dict()` of dimensions + if self.dimensions: + _dict['dimensions'] = self.dimensions.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorFrame from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "width": obj.get("width"), + "height": obj.get("height"), + "inner": FlavorFrameInner.from_dict(obj["inner"]) if obj.get("inner") is not None else None, + "home": FlavorFrameHome.from_dict(obj["home"]) if obj.get("home") is not None else None, + "dimensions": FlavorFrameDimensions.from_dict(obj["dimensions"]) if obj.get("dimensions") is not None else None, + "scale": obj.get("scale") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/flavor_frame_dimensions.py b/corellium/models/flavor_frame_dimensions.py new file mode 100644 index 0000000..15914ba --- /dev/null +++ b/corellium/models/flavor_frame_dimensions.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class FlavorFrameDimensions(BaseModel): + """ + Native display resolution. + """ # noqa: E501 + width: Union[StrictFloat, StrictInt] = Field(description="Native display width in pixels.") + height: Union[StrictFloat, StrictInt] = Field(description="Native display height in pixels.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["width", "height"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorFrameDimensions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorFrameDimensions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "width": obj.get("width"), + "height": obj.get("height") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/flavor_frame_home.py b/corellium/models/flavor_frame_home.py new file mode 100644 index 0000000..44f54b9 --- /dev/null +++ b/corellium/models/flavor_frame_home.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class FlavorFrameHome(BaseModel): + """ + Home button hit area within the frame. + """ # noqa: E501 + top: Union[StrictFloat, StrictInt] = Field(description="Top offset in points.") + left: Union[StrictFloat, StrictInt] = Field(description="Left offset in points.") + width: Union[StrictFloat, StrictInt] = Field(description="Width in points.") + height: Union[StrictFloat, StrictInt] = Field(description="Height in points.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["top", "left", "width", "height"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorFrameHome from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorFrameHome from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "top": obj.get("top"), + "left": obj.get("left"), + "width": obj.get("width"), + "height": obj.get("height") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/flavor_frame_inner.py b/corellium/models/flavor_frame_inner.py new file mode 100644 index 0000000..7328dd1 --- /dev/null +++ b/corellium/models/flavor_frame_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class FlavorFrameInner(BaseModel): + """ + Inner screen area within the frame. + """ # noqa: E501 + top: Union[StrictFloat, StrictInt] = Field(description="Top offset in points.") + left: Union[StrictFloat, StrictInt] = Field(description="Left offset in points.") + width: Union[StrictFloat, StrictInt] = Field(description="Width in points.") + height: Union[StrictFloat, StrictInt] = Field(description="Height in points.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["top", "left", "width", "height"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorFrameInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorFrameInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "top": obj.get("top"), + "left": obj.get("left"), + "width": obj.get("width"), + "height": obj.get("height") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/get_firmware_info_body.py b/corellium/models/get_firmware_info_body.py new file mode 100644 index 0000000..340ac8e --- /dev/null +++ b/corellium/models/get_firmware_info_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GetFirmwareInfoBody(BaseModel): + """ + GetFirmwareInfoBody + """ # noqa: E501 + password: Optional[StrictStr] = Field(default=None, description="Password to decrypt an encrypted firmware file.") + extended: Optional[StrictBool] = Field(default=None, description="Include extended info such as board config, bdid, cpid, platform, and the matched device.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password", "extended"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetFirmwareInfoBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetFirmwareInfoBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "extended": obj.get("extended") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/get_interconnects_response.py b/corellium/models/get_interconnects_response.py new file mode 100644 index 0000000..5792010 --- /dev/null +++ b/corellium/models/get_interconnects_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.interconnect_response import InterconnectResponse +from typing import Optional, Set +from typing_extensions import Self + +class GetInterconnectsResponse(BaseModel): + """ + + """ # noqa: E501 + results: Optional[List[InterconnectResponse]] = Field(default=None, description="Array of interconnects") + count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of interconnects in this response") + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total number of interconnects") + limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Limit used for pagination") + offset: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Offset used for pagination") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetInterconnectsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if results (nullable) is None + # and model_fields_set contains the field + if self.results is None and "results" in self.model_fields_set: + _dict['results'] = None + + # set to None if count (nullable) is None + # and model_fields_set contains the field + if self.count is None and "count" in self.model_fields_set: + _dict['count'] = None + + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict['total'] = None + + # set to None if limit (nullable) is None + # and model_fields_set contains the field + if self.limit is None and "limit" in self.model_fields_set: + _dict['limit'] = None + + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetInterconnectsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [InterconnectResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/get_invite_by_token_body.py b/corellium/models/get_invite_by_token_body.py new file mode 100644 index 0000000..46dd61e --- /dev/null +++ b/corellium/models/get_invite_by_token_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GetInviteByTokenBody(BaseModel): + """ + GetInviteByTokenBody + """ # noqa: E501 + token: StrictStr = Field(description="Invite token.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetInviteByTokenBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetInviteByTokenBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/get_reset_link_info_body.py b/corellium/models/get_reset_link_info_body.py new file mode 100644 index 0000000..d9a4100 --- /dev/null +++ b/corellium/models/get_reset_link_info_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GetResetLinkInfoBody(BaseModel): + """ + GetResetLinkInfoBody + """ # noqa: E501 + token: StrictStr = Field(description="Password reset token.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetResetLinkInfoBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetResetLinkInfoBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/get_storage_response.py b/corellium/models/get_storage_response.py new file mode 100644 index 0000000..b8e347b --- /dev/null +++ b/corellium/models/get_storage_response.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.media_store_v1 import MediaStoreV1 +from typing import Optional, Set +from typing_extensions import Self + +class GetStorageResponse(BaseModel): + """ + + """ # noqa: E501 + results: Optional[List[MediaStoreV1]] = Field(default=None, description="Array of storage devices") + count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of storage devices in this response") + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total number of storage devices") + limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Limit used for pagination") + offset: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Offset used for pagination") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetStorageResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if results (nullable) is None + # and model_fields_set contains the field + if self.results is None and "results" in self.model_fields_set: + _dict['results'] = None + + # set to None if count (nullable) is None + # and model_fields_set contains the field + if self.count is None and "count" in self.model_fields_set: + _dict['count'] = None + + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict['total'] = None + + # set to None if limit (nullable) is None + # and model_fields_set contains the field + if self.limit is None and "limit" in self.model_fields_set: + _dict['limit'] = None + + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetStorageResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [MediaStoreV1.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/gpio_state_definition.py b/corellium/models/gpio_state_definition.py new file mode 100644 index 0000000..1355839 --- /dev/null +++ b/corellium/models/gpio_state_definition.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from corellium.models.gpio_state_definition_banks_inner_inner import GpioStateDefinitionBanksInnerInner +from typing import Optional, Set +from typing_extensions import Self + +class GpioStateDefinition(BaseModel): + """ + GpioStateDefinition + """ # noqa: E501 + bit_count: Union[StrictFloat, StrictInt] = Field(description="Count of bits in members of this bank.", alias="bitCount") + banks: List[List[GpioStateDefinitionBanksInnerInner]] = Field(description="Bits for each bank of this name as an array of arrays.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bitCount", "banks"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GpioStateDefinition from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in banks (list of list) + _items = [] + if self.banks: + for _item_banks in self.banks: + if _item_banks: + _items.append( + [_inner_item.to_dict() for _inner_item in _item_banks if _inner_item is not None] + ) + _dict['banks'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GpioStateDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bitCount": obj.get("bitCount"), + "banks": [ + [GpioStateDefinitionBanksInnerInner.from_dict(_inner_item) for _inner_item in _item] + for _item in obj["banks"] + ] if obj.get("banks") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/gpio_state_definition_banks_inner_inner.py b/corellium/models/gpio_state_definition_banks_inner_inner.py new file mode 100644 index 0000000..ce96b98 --- /dev/null +++ b/corellium/models/gpio_state_definition_banks_inner_inner.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator +from typing import Optional, Union +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +GPIOSTATEDEFINITIONBANKSINNERINNER_ANY_OF_SCHEMAS = ["float"] + +class GpioStateDefinitionBanksInnerInner(BaseModel): + """ + GpioStateDefinitionBanksInnerInner + """ + + # data type: float + anyof_schema_1_validator: Optional[Union[StrictFloat, StrictInt]] = None + # data type: float + anyof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[float]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "float" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = GpioStateDefinitionBanksInnerInner.model_construct() + error_messages = [] + # validate data type: float + try: + instance.anyof_schema_1_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: float + try: + instance.anyof_schema_2_validator = v + return v + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in GpioStateDefinitionBanksInnerInner with anyOf schemas: float. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # deserialize data into float + try: + # validation + instance.anyof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_1_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into float + try: + # validation + instance.anyof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.anyof_schema_2_validator + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into GpioStateDefinitionBanksInnerInner with anyOf schemas: float. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], float]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/gpio_state_definition_v1.py b/corellium/models/gpio_state_definition_v1.py new file mode 100644 index 0000000..dc9d0c6 --- /dev/null +++ b/corellium/models/gpio_state_definition_v1.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from corellium.models.bit import Bit +from typing import Optional, Set +from typing_extensions import Self + +class GpioStateDefinitionV1(BaseModel): + """ + + """ # noqa: E501 + bit_count: Union[StrictFloat, StrictInt] = Field(description="count of bits in members of this bank", alias="bitCount") + banks: List[List[Bit]] = Field(description="bits for each bank of this name as an array of arrays") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bitCount", "banks"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GpioStateDefinitionV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in banks (list of list) + _items = [] + if self.banks: + for _item_banks in self.banks: + if _item_banks: + _items.append( + [_inner_item.to_dict() for _inner_item in _item_banks if _inner_item is not None] + ) + _dict['banks'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GpioStateDefinitionV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bitCount": obj.get("bitCount"), + "banks": [ + [Bit.from_dict(_inner_item) for _inner_item in _item] + for _item in obj["banks"] + ] if obj.get("banks") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/gpios_state.py b/corellium/models/gpios_state.py new file mode 100644 index 0000000..aad926b --- /dev/null +++ b/corellium/models/gpios_state.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.gpio_state_definition import GpioStateDefinition +from typing import Optional, Set +from typing_extensions import Self + +class GpiosState(BaseModel): + """ + State of the simulated LEDs, buttons and switches on an IoT or embedded board model. Each group (`led`, `button`, `switch`) has one or more banks, and each bank is a list of bits: 1 is on (pressed, lit), 0 is off. Only board models that wire these up report them; phones (iOS and Android) do not. + """ # noqa: E501 + led: Optional[GpioStateDefinition] = None + button: Optional[GpioStateDefinition] = None + switch: Optional[GpioStateDefinition] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["led", "button", "switch"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GpiosState from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of led + if self.led: + _dict['led'] = self.led.to_dict() + # override the default output from pydantic by calling `to_dict()` of button + if self.button: + _dict['button'] = self.button.to_dict() + # override the default output from pydantic by calling `to_dict()` of switch + if self.switch: + _dict['switch'] = self.switch.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GpiosState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "led": GpioStateDefinition.from_dict(obj["led"]) if obj.get("led") is not None else None, + "button": GpioStateDefinition.from_dict(obj["button"]) if obj.get("button") is not None else None, + "switch": GpioStateDefinition.from_dict(obj["switch"]) if obj.get("switch") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/gpios_state_v1.py b/corellium/models/gpios_state_v1.py new file mode 100644 index 0000000..7cd77ff --- /dev/null +++ b/corellium/models/gpios_state_v1.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.gpio_state_definition_v1 import GpioStateDefinitionV1 +from typing import Optional, Set +from typing_extensions import Self + +class GpiosStateV1(BaseModel): + """ + Current state of GPIOs + """ # noqa: E501 + led: Optional[GpioStateDefinitionV1] = None + button: Optional[GpioStateDefinitionV1] = None + switch: Optional[GpioStateDefinitionV1] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["led", "button", "switch"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GpiosStateV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of led + if self.led: + _dict['led'] = self.led.to_dict() + # override the default output from pydantic by calling `to_dict()` of button + if self.button: + _dict['button'] = self.button.to_dict() + # override the default output from pydantic by calling `to_dict()` of switch + if self.switch: + _dict['switch'] = self.switch.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GpiosStateV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "led": GpioStateDefinitionV1.from_dict(obj["led"]) if obj.get("led") is not None else None, + "button": GpioStateDefinitionV1.from_dict(obj["button"]) if obj.get("button") is not None else None, + "switch": GpioStateDefinitionV1.from_dict(obj["switch"]) if obj.get("switch") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/hook.py b/corellium/models/hook.py new file mode 100644 index 0000000..ae944fd --- /dev/null +++ b/corellium/models/hook.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.hook_patch_type import HookPatchType +from typing import Optional, Set +from typing_extensions import Self + +class Hook(BaseModel): + """ + Hook + """ # noqa: E501 + identifier: StrictStr = Field(description="Hook identifier.") + label: StrictStr = Field(description="Hook label.") + address: StrictStr = Field(description="EL1/kernel virtual address, in hexadecimal, where the hook fires: the patch runs each time the device executes the instruction at this address. If a slide is applied at runtime, do not include it.") + patch: StrictStr = Field(description="The code to run when the hook fires, in the language given by `patchType`.") + patch_type: HookPatchType = Field(alias="patchType") + enabled: StrictBool = Field(description="Whether the hook runs. Disabled hooks are kept but skipped.") + instance_id: StrictStr = Field(description="Owning instance identifier.", alias="instanceId") + created_at: datetime = Field(description="Creation timestamp.", alias="createdAt") + updated_at: datetime = Field(description="Last update timestamp.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "label", "address", "patch", "patchType", "enabled", "instanceId", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Hook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Hook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "label": obj.get("label"), + "address": obj.get("address"), + "patch": obj.get("patch"), + "patchType": obj.get("patchType"), + "enabled": obj.get("enabled"), + "instanceId": obj.get("instanceId"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/hook_list.py b/corellium/models/hook_list.py new file mode 100644 index 0000000..af8369c --- /dev/null +++ b/corellium/models/hook_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.hook import Hook +from typing import Optional, Set +from typing_extensions import Self + +class HookList(BaseModel): + """ + HookList + """ # noqa: E501 + results: List[Hook] = Field(description="List of hypervisor hooks.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HookList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HookList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Hook.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/hook_patch_type.py b/corellium/models/hook_patch_type.py new file mode 100644 index 0000000..fda6ddb --- /dev/null +++ b/corellium/models/hook_patch_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class HookPatchType(str, Enum): + """ + Language the `patch` is written in: `csmfcc` for a C-like language, or `csmfvm` for an assembly-like language. + """ + + """ + allowed enum values + """ + CSMFCC = 'csmfcc' + CSMFVM = 'csmfvm' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of HookPatchType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/hook_v1.py b/corellium/models/hook_v1.py new file mode 100644 index 0000000..a2f6b7c --- /dev/null +++ b/corellium/models/hook_v1.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class HookV1(BaseModel): + """ + + """ # noqa: E501 + identifier: Optional[StrictStr] = Field(default=None, description="Identifier") + label: Optional[StrictStr] = Field(default=None, description="Label") + address: Optional[StrictStr] = Field(default=None, description="Address") + patch: Optional[StrictStr] = Field(default=None, description="Patch") + patch_type: Optional[StrictStr] = Field(default=None, description="Patch Type", alias="patchType") + enabled: Optional[StrictBool] = Field(default=None, description="If true, instances can call required hooks") + created_at: Optional[StrictStr] = Field(default=None, description="Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z", alias="createdAt") + updated_at: Optional[StrictStr] = Field(default=None, description="Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z", alias="updatedAt") + instance_id: Optional[StrictStr] = Field(default=None, description="Instance Id", alias="instanceId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "label", "address", "patch", "patchType", "enabled", "createdAt", "updatedAt", "instanceId"] + + @field_validator('patch_type') + def patch_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['csmfcc', 'csmfvm']): + raise ValueError("must be one of enum values ('csmfcc', 'csmfvm')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HookV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if patch (nullable) is None + # and model_fields_set contains the field + if self.patch is None and "patch" in self.model_fields_set: + _dict['patch'] = None + + # set to None if patch_type (nullable) is None + # and model_fields_set contains the field + if self.patch_type is None and "patch_type" in self.model_fields_set: + _dict['patchType'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + # set to None if instance_id (nullable) is None + # and model_fields_set contains the field + if self.instance_id is None and "instance_id" in self.model_fields_set: + _dict['instanceId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HookV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "label": obj.get("label"), + "address": obj.get("address"), + "patch": obj.get("patch"), + "patchType": obj.get("patchType"), + "enabled": obj.get("enabled"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "instanceId": obj.get("instanceId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/hypertune_hash_response.py b/corellium/models/hypertune_hash_response.py new file mode 100644 index 0000000..70bcbf6 --- /dev/null +++ b/corellium/models/hypertune_hash_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class HypertuneHashResponse(BaseModel): + """ + HypertuneHashResponse + """ # noqa: E501 + hash: StrictStr = Field(description="Current Hypertune state hash.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HypertuneHashResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HypertuneHashResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/hypertune_init_response.py b/corellium/models/hypertune_init_response.py new file mode 100644 index 0000000..7a27aab --- /dev/null +++ b/corellium/models/hypertune_init_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class HypertuneInitResponse(BaseModel): + """ + HypertuneInitResponse + """ # noqa: E501 + commit_id: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Hypertune configuration commit ID.", alias="commitId") + hash: Optional[StrictStr] = Field(default=None, description="Hypertune configuration state hash.") + reduced_expression: Optional[Dict[str, Any]] = Field(default=None, description="Reduced Hypertune evaluation expression.", alias="reducedExpression") + splits: Optional[Dict[str, Any]] = Field(default=None, description="Hypertune split configuration.") + commit_config: Optional[Dict[str, Any]] = Field(default=None, description="Hypertune commit configuration.", alias="commitConfig") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["commitId", "hash", "reducedExpression", "splits", "commitConfig"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HypertuneInitResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HypertuneInitResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "commitId": obj.get("commitId"), + "hash": obj.get("hash"), + "reducedExpression": obj.get("reducedExpression"), + "splits": obj.get("splits"), + "commitConfig": obj.get("commitConfig") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image.py b/corellium/models/image.py new file mode 100644 index 0000000..fae96ca --- /dev/null +++ b/corellium/models/image.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.image_encoding import ImageEncoding +from corellium.models.image_type import ImageType +from typing import Optional, Set +from typing_extensions import Self + +class Image(BaseModel): + """ + Image + """ # noqa: E501 + status: StrictStr = Field(description="Image status.") + id: StrictStr = Field(description="Image ID.") + name: StrictStr = Field(description="Name of the image, usually the original filename. Names are not unique: several images can share a name.") + type: ImageType + size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Size in bytes; null until upload completes.") + checksum: Optional[StrictStr] = Field(default=None, description="MD5 checksum; null until upload completes.") + corellium_checksum: Optional[StrictStr] = Field(default=None, description="Corellium checksum of the image; null until upload completes.", alias="corelliumChecksum") + encoding: Optional[ImageEncoding] = None + project: Optional[StrictStr] = Field(default=None, description="ID of the project the image belongs to. Null for a domain-level image, which is available across your domain rather than to one project.") + instance: Optional[StrictStr] = Field(default=None, description="ID of the instance (device) the image is attached to, or null if it is not attached to one.") + created_at: Optional[datetime] = Field(default=None, description="When Image was created.", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="When Image was last updated.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status", "id", "name", "type", "size", "checksum", "corelliumChecksum", "encoding", "project", "instance", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Image from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + # set to None if checksum (nullable) is None + # and model_fields_set contains the field + if self.checksum is None and "checksum" in self.model_fields_set: + _dict['checksum'] = None + + # set to None if corellium_checksum (nullable) is None + # and model_fields_set contains the field + if self.corellium_checksum is None and "corellium_checksum" in self.model_fields_set: + _dict['corelliumChecksum'] = None + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if instance (nullable) is None + # and model_fields_set contains the field + if self.instance is None and "instance" in self.model_fields_set: + _dict['instance'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Image from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "size": obj.get("size"), + "checksum": obj.get("checksum"), + "corelliumChecksum": obj.get("corelliumChecksum"), + "encoding": obj.get("encoding"), + "project": obj.get("project"), + "instance": obj.get("instance"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image_creation_options.py b/corellium/models/image_creation_options.py new file mode 100644 index 0000000..5149879 --- /dev/null +++ b/corellium/models/image_creation_options.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class ImageCreationOptions(BaseModel): + """ + + """ # noqa: E501 + type: StrictStr = Field(description="Image type") + encoding: StrictStr = Field(description="How the file is stored") + encapsulated: Optional[StrictBool] = Field(default=None, description="set to false if the uploaded file is not encapsulated inside an outer zipfile") + name: Optional[StrictStr] = Field(default=None, description="Image name") + full_path: Optional[StrictStr] = Field(default=None, description="Full local path to image file. When specified, this file MUST exist!", alias="fullPath") + project: Optional[StrictStr] = Field(default=None, description="Project ID") + instance: Optional[StrictStr] = Field(default=None, description="Instance ID") + file: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = Field(default=None, description="Optionally the actual file") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "encoding", "encapsulated", "name", "fullPath", "project", "instance", "file"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set([' iotfirmware', 'kernel', 'devicetree', 'ramdisk', 'loaderfile', 'media', 'sepfw', 'seprom', 'bootrom', 'llb', 'iboot', 'ibootdata', 'fw', 'fwasset', 'partition', 'extension', 'vmfile', 'backup', 'activity-export', 'ufd', 'clbi', 'pongo']): + raise ValueError("must be one of enum values (' iotfirmware', 'kernel', 'devicetree', 'ramdisk', 'loaderfile', 'media', 'sepfw', 'seprom', 'bootrom', 'llb', 'iboot', 'ibootdata', 'fw', 'fwasset', 'partition', 'extension', 'vmfile', 'backup', 'activity-export', 'ufd', 'clbi', 'pongo')") + return value + + @field_validator('encoding') + def encoding_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['plain', 'encrypted']): + raise ValueError("must be one of enum values ('plain', 'encrypted')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageCreationOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if encapsulated (nullable) is None + # and model_fields_set contains the field + if self.encapsulated is None and "encapsulated" in self.model_fields_set: + _dict['encapsulated'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if full_path (nullable) is None + # and model_fields_set contains the field + if self.full_path is None and "full_path" in self.model_fields_set: + _dict['fullPath'] = None + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if instance (nullable) is None + # and model_fields_set contains the field + if self.instance is None and "instance" in self.model_fields_set: + _dict['instance'] = None + + # set to None if file (nullable) is None + # and model_fields_set contains the field + if self.file is None and "file" in self.model_fields_set: + _dict['file'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageCreationOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "encoding": obj.get("encoding"), + "encapsulated": obj.get("encapsulated"), + "name": obj.get("name"), + "fullPath": obj.get("fullPath"), + "project": obj.get("project"), + "instance": obj.get("instance"), + "file": obj.get("file") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image_encoding.py b/corellium/models/image_encoding.py new file mode 100644 index 0000000..4234156 --- /dev/null +++ b/corellium/models/image_encoding.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ImageEncoding(str, Enum): + """ + How the file is stored. + """ + + """ + allowed enum values + """ + PLAIN = 'plain' + ENCRYPTED = 'encrypted' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ImageEncoding from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/image_extended.py b/corellium/models/image_extended.py new file mode 100644 index 0000000..c83bd99 --- /dev/null +++ b/corellium/models/image_extended.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.image_extended_device import ImageExtendedDevice +from typing import Optional, Set +from typing_extensions import Self + +class ImageExtended(BaseModel): + """ + + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="OS type") + version: Optional[StrictStr] = Field(default=None, description="OS version") + buildid: Optional[StrictStr] = Field(default=None, description="Build ID") + device_ids: Optional[List[StrictStr]] = Field(default=None, description="List of device identifiers", alias="deviceIds") + board_config: Optional[StrictStr] = Field(default=None, description="Board configuration identifier", alias="boardConfig") + device: Optional[ImageExtendedDevice] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "version", "buildid", "deviceIds", "boardConfig", "device"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageExtended from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of device + if self.device: + _dict['device'] = self.device.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if version (nullable) is None + # and model_fields_set contains the field + if self.version is None and "version" in self.model_fields_set: + _dict['version'] = None + + # set to None if buildid (nullable) is None + # and model_fields_set contains the field + if self.buildid is None and "buildid" in self.model_fields_set: + _dict['buildid'] = None + + # set to None if device_ids (nullable) is None + # and model_fields_set contains the field + if self.device_ids is None and "device_ids" in self.model_fields_set: + _dict['deviceIds'] = None + + # set to None if board_config (nullable) is None + # and model_fields_set contains the field + if self.board_config is None and "board_config" in self.model_fields_set: + _dict['boardConfig'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageExtended from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "version": obj.get("version"), + "buildid": obj.get("buildid"), + "deviceIds": obj.get("deviceIds"), + "boardConfig": obj.get("boardConfig"), + "device": ImageExtendedDevice.from_dict(obj["device"]) if obj.get("device") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image_extended_device.py b/corellium/models/image_extended_device.py new file mode 100644 index 0000000..f836534 --- /dev/null +++ b/corellium/models/image_extended_device.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.image_firmware import ImageFirmware +from typing import Optional, Set +from typing_extensions import Self + +class ImageExtendedDevice(BaseModel): + """ + + """ # noqa: E501 + flavor: Optional[StrictStr] = Field(default=None, description="Device flavor/model name") + firmwares: Optional[List[ImageFirmware]] = Field(default=None, description="List of associated firmware entries") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["flavor", "firmwares"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageExtendedDevice from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in firmwares (list) + _items = [] + if self.firmwares: + for _item_firmwares in self.firmwares: + if _item_firmwares: + _items.append(_item_firmwares.to_dict()) + _dict['firmwares'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if flavor (nullable) is None + # and model_fields_set contains the field + if self.flavor is None and "flavor" in self.model_fields_set: + _dict['flavor'] = None + + # set to None if firmwares (nullable) is None + # and model_fields_set contains the field + if self.firmwares is None and "firmwares" in self.model_fields_set: + _dict['firmwares'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageExtendedDevice from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "flavor": obj.get("flavor"), + "firmwares": [ImageFirmware.from_dict(_item) for _item in obj["firmwares"]] if obj.get("firmwares") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image_firmware.py b/corellium/models/image_firmware.py new file mode 100644 index 0000000..ca43096 --- /dev/null +++ b/corellium/models/image_firmware.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ImageFirmware(BaseModel): + """ + + """ # noqa: E501 + filename: Optional[StrictStr] = Field(default=None, description="Firmware filename") + version: Optional[StrictStr] = Field(default=None, description="Firmware version") + buildid: Optional[StrictStr] = Field(default=None, description="Build ID") + url: Optional[StrictStr] = Field(default=None, description="Download URL or image UUID") + orig_url: Optional[StrictStr] = Field(default=None, description="Original source URL") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["filename", "version", "buildid", "url", "orig_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageFirmware from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if filename (nullable) is None + # and model_fields_set contains the field + if self.filename is None and "filename" in self.model_fields_set: + _dict['filename'] = None + + # set to None if version (nullable) is None + # and model_fields_set contains the field + if self.version is None and "version" in self.model_fields_set: + _dict['version'] = None + + # set to None if buildid (nullable) is None + # and model_fields_set contains the field + if self.buildid is None and "buildid" in self.model_fields_set: + _dict['buildid'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if orig_url (nullable) is None + # and model_fields_set contains the field + if self.orig_url is None and "orig_url" in self.model_fields_set: + _dict['orig_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageFirmware from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filename": obj.get("filename"), + "version": obj.get("version"), + "buildid": obj.get("buildid"), + "url": obj.get("url"), + "orig_url": obj.get("orig_url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image_firmware_info.py b/corellium/models/image_firmware_info.py new file mode 100644 index 0000000..108b0ae --- /dev/null +++ b/corellium/models/image_firmware_info.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.firmware_info_device import FirmwareInfoDevice +from corellium.models.image_firmware_info_boot_args import ImageFirmwareInfoBootArgs +from typing import Optional, Set +from typing_extensions import Self + +class ImageFirmwareInfo(BaseModel): + """ + ImageFirmwareInfo + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Firmware type, e.g. 'ios'.") + version: Optional[StrictStr] = Field(default=None, description="OS version.") + build_id: Optional[StrictStr] = Field(default=None, description="OS build ID.", alias="buildId") + device_ids: Optional[List[StrictStr]] = Field(default=None, description="Device identifiers this firmware supports.", alias="deviceIds") + board_config: Optional[StrictStr] = Field(default=None, description="Board configuration.", alias="boardConfig") + bdid: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Board ID.") + cpid: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Chip ID.") + platform: Optional[StrictStr] = Field(default=None, description="Chip platform.") + boot_args: Optional[ImageFirmwareInfoBootArgs] = Field(default=None, alias="bootArgs") + variants: Optional[List[StrictStr]] = Field(default=None, description="Firmware variants.") + device: Optional[FirmwareInfoDevice] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "version", "buildId", "deviceIds", "boardConfig", "bdid", "cpid", "platform", "bootArgs", "variants", "device"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageFirmwareInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of boot_args + if self.boot_args: + _dict['bootArgs'] = self.boot_args.to_dict() + # override the default output from pydantic by calling `to_dict()` of device + if self.device: + _dict['device'] = self.device.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageFirmwareInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "version": obj.get("version"), + "buildId": obj.get("buildId"), + "deviceIds": obj.get("deviceIds"), + "boardConfig": obj.get("boardConfig"), + "bdid": obj.get("bdid"), + "cpid": obj.get("cpid"), + "platform": obj.get("platform"), + "bootArgs": ImageFirmwareInfoBootArgs.from_dict(obj["bootArgs"]) if obj.get("bootArgs") is not None else None, + "variants": obj.get("variants"), + "device": FirmwareInfoDevice.from_dict(obj["device"]) if obj.get("device") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image_firmware_info_boot_args.py b/corellium/models/image_firmware_info_boot_args.py new file mode 100644 index 0000000..0a45878 --- /dev/null +++ b/corellium/models/image_firmware_info_boot_args.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ImageFirmwareInfoBootArgs(BaseModel): + """ + Embedded boot arguments. + """ # noqa: E501 + normal: Optional[StrictStr] = Field(default=None, description="Boot arguments for normal boot.") + restore: Optional[StrictStr] = Field(default=None, description="Boot arguments for restore boot.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["normal", "restore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageFirmwareInfoBootArgs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageFirmwareInfoBootArgs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "normal": obj.get("normal"), + "restore": obj.get("restore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image_list.py b/corellium/models/image_list.py new file mode 100644 index 0000000..3fc53b8 --- /dev/null +++ b/corellium/models/image_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.image import Image +from typing import Optional, Set +from typing_extensions import Self + +class ImageList(BaseModel): + """ + ImageList + """ # noqa: E501 + results: List[Image] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Image.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/image_type.py b/corellium/models/image_type.py new file mode 100644 index 0000000..701035e --- /dev/null +++ b/corellium/models/image_type.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ImageType(str, Enum): + """ + What kind of file the image holds. The type decides what the platform does with the file, so choose it carefully. **Firmware (whole operating-system images):** - `fw`: a complete firmware bundle for creating devices, such as an iOS IPSW or a Corellium `.coreimg` package. Install it cluster-wide with `installFirmware`, or upload it at domain level (no `projectId` or `instanceId`) so device creation can find it. - `fwpackage`: another name for `fw`. It is stored as `fw`, and v3 responses report `fw` images as `fwpackage`. - `iotfirmware`: firmware for IoT and embedded device models, such as an ELF executable, a raw binary, or a ZIP with a `LOAD.TXT` load map. - `fwbinary`: another name for `iotfirmware`. v3 responses report `iotfirmware` images as `fwbinary`. - `fwasset`: a JSON file of firmware assets (for example decryption keys), not firmware itself. Install it with `installFirmwareAssets`. - `clbi`: a Cellebrite firmware image. Like `fw`, a Cellebrite firmware image uploaded at domain level (no `projectId` or `instanceId`) is offered as a choice when you create a device. **Files for a specific device:** - `partition`: replacement contents for one storage partition of a device. The platform needs a device model to check it against: attach it to a device with `instanceId`, or pass `flavor` on the image-upload routes. `name` must be a partition that model lets users upload. - Other types such as `kernel`, `devicetree`, `ramdisk`, `media` and `extension` name the kind of file; the endpoint that uses each one describes it. **MATRIX files** (always attached to an instance, and never replaced by later uploads): - `mast-wordlist`: a text file of sensitive values for a MATRIX assessment to search for. - `mast-frida`: a Frida script to load during a MATRIX assessment. - `mast-report`: a report generated by MATRIX. Created by the platform, not uploaded. Some types require a license feature. Using one your license does not include fails with 403. + """ + + """ + allowed enum values + """ + FWBINARY = 'fwbinary' + FWPACKAGE = 'fwpackage' + IOTFIRMWARE = 'iotfirmware' + KERNEL = 'kernel' + DEVICETREE = 'devicetree' + RAMDISK = 'ramdisk' + LOADERFILE = 'loaderfile' + MEDIA = 'media' + SEPFW = 'sepfw' + SEPROM = 'seprom' + BOOTROM = 'bootrom' + LLB = 'llb' + IBOOT = 'iboot' + IBOOTDATA = 'ibootdata' + FW = 'fw' + FWASSET = 'fwasset' + PARTITION = 'partition' + EXTENSION = 'extension' + VMFILE = 'vmfile' + BACKUP = 'backup' + ACTIVITY_MINUS_EXPORT = 'activity-export' + UFD = 'ufd' + CLBI = 'clbi' + PONGO = 'pongo' + MAST_MINUS_REPORT = 'mast-report' + MAST_MINUS_FRIDA = 'mast-frida' + MAST_MINUS_WORDLIST = 'mast-wordlist' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ImageType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/image_v1.py b/corellium/models/image_v1.py new file mode 100644 index 0000000..307ea3d --- /dev/null +++ b/corellium/models/image_v1.py @@ -0,0 +1,221 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.image_extended import ImageExtended +from typing import Optional, Set +from typing_extensions import Self + +class ImageV1(BaseModel): + """ + + """ # noqa: E501 + status: Optional[StrictStr] = Field(default=None, description="Image status") + id: Optional[StrictStr] = Field(default=None, description="Image ID") + identifier: Optional[StrictStr] = Field(default=None, description="Image ID") + name: Optional[StrictStr] = None + type: Optional[StrictStr] = Field(default=None, description="Type of image") + size: Optional[Union[StrictFloat, StrictInt]] = None + checksum: Optional[StrictStr] = Field(default=None, description="MD5 checksum of the image") + corellium_checksum: Optional[StrictStr] = Field(default=None, description="Corellium checksum of the image (format: algorithm$blocksize$hash)", alias="corelliumChecksum") + encoding: Optional[StrictStr] = Field(default=None, description="Encoding type of the image") + filename: Optional[StrictStr] = None + uniqueid: Optional[StrictStr] = None + project: Optional[StrictStr] = Field(default=None, description="Project ID") + instance: Optional[StrictStr] = Field(default=None, description="Instance ID") + created_at: Optional[datetime] = Field(default=None, description="When Image was created") + updated_at: Optional[datetime] = Field(default=None, description="When Image was last updated") + extended: Optional[ImageExtended] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status", "id", "identifier", "name", "type", "size", "checksum", "corelliumChecksum", "encoding", "filename", "uniqueid", "project", "instance", "created_at", "updated_at", "extended"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['fwbinary', 'kernel', 'devicetree', 'ramdisk', 'loaderfile', 'sepfw', 'seprom', 'bootrom', 'llb', 'iboot', 'ibootdata', 'fwpackage', 'partition', 'backup', 'ufd']): + raise ValueError("must be one of enum values ('fwbinary', 'kernel', 'devicetree', 'ramdisk', 'loaderfile', 'sepfw', 'seprom', 'bootrom', 'llb', 'iboot', 'ibootdata', 'fwpackage', 'partition', 'backup', 'ufd')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of extended + if self.extended: + _dict['extended'] = self.extended.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + # set to None if checksum (nullable) is None + # and model_fields_set contains the field + if self.checksum is None and "checksum" in self.model_fields_set: + _dict['checksum'] = None + + # set to None if corellium_checksum (nullable) is None + # and model_fields_set contains the field + if self.corellium_checksum is None and "corellium_checksum" in self.model_fields_set: + _dict['corelliumChecksum'] = None + + # set to None if encoding (nullable) is None + # and model_fields_set contains the field + if self.encoding is None and "encoding" in self.model_fields_set: + _dict['encoding'] = None + + # set to None if filename (nullable) is None + # and model_fields_set contains the field + if self.filename is None and "filename" in self.model_fields_set: + _dict['filename'] = None + + # set to None if uniqueid (nullable) is None + # and model_fields_set contains the field + if self.uniqueid is None and "uniqueid" in self.model_fields_set: + _dict['uniqueid'] = None + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if instance (nullable) is None + # and model_fields_set contains the field + if self.instance is None and "instance" in self.model_fields_set: + _dict['instance'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['created_at'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updated_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "id": obj.get("id"), + "identifier": obj.get("identifier"), + "name": obj.get("name"), + "type": obj.get("type"), + "size": obj.get("size"), + "checksum": obj.get("checksum"), + "corelliumChecksum": obj.get("corelliumChecksum"), + "encoding": obj.get("encoding"), + "filename": obj.get("filename"), + "uniqueid": obj.get("uniqueid"), + "project": obj.get("project"), + "instance": obj.get("instance"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "extended": ImageExtended.from_dict(obj["extended"]) if obj.get("extended") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/input_response.py b/corellium/models/input_response.py new file mode 100644 index 0000000..5fc7aae --- /dev/null +++ b/corellium/models/input_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class InputResponse(BaseModel): + """ + InputResponse + """ # noqa: E501 + eta: Union[StrictFloat, StrictInt] = Field(description="Expected time to complete (ms).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["eta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InputResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InputResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "eta": obj.get("eta") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/input_response_v1.py b/corellium/models/input_response_v1.py new file mode 100644 index 0000000..8e5a9c0 --- /dev/null +++ b/corellium/models/input_response_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class InputResponseV1(BaseModel): + """ + + """ # noqa: E501 + eta: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Expected time to complete") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["eta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InputResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if eta (nullable) is None + # and model_fields_set contains the field + if self.eta is None and "eta" in self.model_fields_set: + _dict['eta'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InputResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "eta": obj.get("eta") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_assets_body.py b/corellium/models/install_firmware_assets_body.py new file mode 100644 index 0000000..2e67339 --- /dev/null +++ b/corellium/models/install_firmware_assets_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareAssetsBody(BaseModel): + """ + InstallFirmwareAssetsBody + """ # noqa: E501 + image_id: StrictStr = Field(description="Identifier of a previously uploaded 'fwasset' type Image.", alias="imageId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareAssetsBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareAssetsBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_assets_body_v1.py b/corellium/models/install_firmware_assets_body_v1.py new file mode 100644 index 0000000..d6465d3 --- /dev/null +++ b/corellium/models/install_firmware_assets_body_v1.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareAssetsBodyV1(BaseModel): + """ + + """ # noqa: E501 + image_id: StrictStr = Field(description="Image ID", alias="imageId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareAssetsBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareAssetsBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_assets_response.py b/corellium/models/install_firmware_assets_response.py new file mode 100644 index 0000000..25a8e56 --- /dev/null +++ b/corellium/models/install_firmware_assets_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareAssetsResponse(BaseModel): + """ + InstallFirmwareAssetsResponse + """ # noqa: E501 + message: StrictStr = Field(description="Message returned by the firmware service describing the outcome of the asset upload.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareAssetsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareAssetsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_assets_response_v1.py b/corellium/models/install_firmware_assets_response_v1.py new file mode 100644 index 0000000..971dad7 --- /dev/null +++ b/corellium/models/install_firmware_assets_response_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareAssetsResponseV1(BaseModel): + """ + + """ # noqa: E501 + message: Optional[StrictStr] = Field(default=None, description="Message returned by the firmware service describing the outcome of the asset upload.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareAssetsResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareAssetsResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_body.py b/corellium/models/install_firmware_body.py new file mode 100644 index 0000000..0d7310b --- /dev/null +++ b/corellium/models/install_firmware_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareBody(BaseModel): + """ + InstallFirmwareBody + """ # noqa: E501 + image_id: StrictStr = Field(description="Identifier of a previously uploaded 'fw' type Image.", alias="imageId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_body_v1.py b/corellium/models/install_firmware_body_v1.py new file mode 100644 index 0000000..0798f5e --- /dev/null +++ b/corellium/models/install_firmware_body_v1.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareBodyV1(BaseModel): + """ + + """ # noqa: E501 + image_id: StrictStr = Field(description="Image ID", alias="imageId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_response.py b/corellium/models/install_firmware_response.py new file mode 100644 index 0000000..5fc229c --- /dev/null +++ b/corellium/models/install_firmware_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareResponse(BaseModel): + """ + InstallFirmwareResponse + """ # noqa: E501 + task_id: StrictStr = Field(description="Identifier of the asynchronous install task.", alias="taskId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["taskId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "taskId": obj.get("taskId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_response_v1.py b/corellium/models/install_firmware_response_v1.py new file mode 100644 index 0000000..59e26b0 --- /dev/null +++ b/corellium/models/install_firmware_response_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareResponseV1(BaseModel): + """ + + """ # noqa: E501 + task_id: Optional[StrictStr] = Field(default=None, description="Task ID", alias="taskId") + installed_firmware_url: Optional[StrictStr] = Field(default=None, description="Installed Firmware URL", alias="installedFirmwareUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["taskId", "installedFirmwareUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if task_id (nullable) is None + # and model_fields_set contains the field + if self.task_id is None and "task_id" in self.model_fields_set: + _dict['taskId'] = None + + # set to None if installed_firmware_url (nullable) is None + # and model_fields_set contains the field + if self.installed_firmware_url is None and "installed_firmware_url" in self.model_fields_set: + _dict['installedFirmwareUrl'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "taskId": obj.get("taskId"), + "installedFirmwareUrl": obj.get("installedFirmwareUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/install_firmware_status_response.py b/corellium/models/install_firmware_status_response.py new file mode 100644 index 0000000..1f10f47 --- /dev/null +++ b/corellium/models/install_firmware_status_response.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.task_status import TaskStatus +from typing import Optional, Set +from typing_extensions import Self + +class InstallFirmwareStatusResponse(BaseModel): + """ + InstallFirmwareStatusResponse + """ # noqa: E501 + status: Optional[TaskStatus] + installed_firmware_url: Optional[StrictStr] = Field(default=None, description="URL of the installed firmware once status is \"complete\"; null otherwise.", alias="installedFirmwareUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status", "installedFirmwareUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstallFirmwareStatusResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if installed_firmware_url (nullable) is None + # and model_fields_set contains the field + if self.installed_firmware_url is None and "installed_firmware_url" in self.model_fields_set: + _dict['installedFirmwareUrl'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstallFirmwareStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "installedFirmwareUrl": obj.get("installedFirmwareUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance.py b/corellium/models/instance.py new file mode 100644 index 0000000..691ba91 --- /dev/null +++ b/corellium/models/instance.py @@ -0,0 +1,314 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.created_by import CreatedBy +from corellium.models.instance_agent_state import InstanceAgentState +from corellium.models.instance_boot_options import InstanceBootOptions +from corellium.models.instance_console import InstanceConsole +from corellium.models.instance_hyper_trace_state import InstanceHyperTraceState +from corellium.models.instance_interface_status import InstanceInterfaceStatus +from corellium.models.instance_netdump_state import InstanceNetdumpState +from corellium.models.instance_netmon_state import InstanceNetmonState +from corellium.models.instance_read_only_status import InstanceReadOnlyStatus +from corellium.models.instance_restore_status import InstanceRestoreStatus +from corellium.models.instance_services import InstanceServices +from corellium.models.instance_state import InstanceState +from corellium.models.instance_trace_state import InstanceTraceState +from corellium.models.instance_uefi_bootloader import InstanceUefiBootloader +from typing import Optional, Set +from typing_extensions import Self + +class Instance(BaseModel): + """ + Instance + """ # noqa: E501 + id: StrictStr = Field(description="Instance identifier.") + name: StrictStr = Field(description="Instance name.") + key: StrictStr = Field(description="Key used to encrypt the instance (hex).") + flavor: StrictStr = Field(description="The flavor identifier of this instance.") + flavor_name: Optional[StrictStr] = Field(default=None, description="Human-readable flavor name.", alias="flavorName") + type: StrictStr = Field(description="Device type.") + project: StrictStr = Field(description="The project ID of the project this instance belongs to.") + domain_name: Optional[StrictStr] = Field(default=None, description="Domain name associated with this instance's project.", alias="domainName") + state: InstanceState + state_changed: Optional[datetime] = Field(description="Time the state of the instance last changed; null before the first transition.", alias="stateChanged") + started_at: Optional[datetime] = Field(description="Time the instance was started, NULL if currently SHUTOFF.", alias="startedAt") + user_task: Optional[StrictStr] = Field(default=None, description="Currently executing user task.", alias="userTask") + task_state: Optional[StrictStr] = Field(default=None, description="Current task state if any (e.g. 'none', 'starting', 'stopping', 'pausing', 'unpausing', 'rebooting', 'building').", alias="taskState") + error: Optional[StrictStr] = Field(default=None, description="Current error state if any.") + restore_status: Optional[InstanceRestoreStatus] = Field(default=None, alias="restoreStatus") + read_only: Optional[InstanceReadOnlyStatus] = Field(default=None, alias="readOnly") + boot_options: Optional[InstanceBootOptions] = Field(default=None, alias="bootOptions") + service_ip: Optional[StrictStr] = Field(default=None, description="Services IP address.", alias="serviceIp") + wifi_ip: Optional[StrictStr] = Field(default=None, description="LAN IP address.", alias="wifiIp") + wifi_mac: Optional[StrictStr] = Field(default=None, description="WiFi MAC address.", alias="wifiMac") + secondary_ip: Optional[StrictStr] = Field(default=None, description="Secondary interface LAN IP address (if supported).", alias="secondaryIp") + port_adb: Optional[StrictStr] = Field(default=None, description="ADB port number.", alias="portAdb") + port_usb: Optional[StrictStr] = Field(default=None, description="USB port number.", alias="portUsb") + port_gdb: Optional[StrictStr] = Field(default=None, description="GDB port number.", alias="portGdb") + port_sep_gdb: Optional[StrictStr] = Field(default=None, description="SEP GDB port number.", alias="portSepGdb") + port_cons: Optional[StrictStr] = Field(default=None, description="Default console port number.", alias="portCons") + port_sep_cons: Optional[StrictStr] = Field(default=None, description="SEP console port number.", alias="portSepCons") + port_sys_cons: Optional[StrictStr] = Field(default=None, description="System console port number.", alias="portSysCons") + port_usbmuxd: Optional[StrictStr] = Field(default=None, description="USBMuxD port number.", alias="portUsbmuxd") + port_frida: Optional[StrictStr] = Field(default=None, description="Frida instrumentation port number.", alias="portFrida") + port_sockcap: Optional[StrictStr] = Field(default=None, description="Socket capture port number.", alias="portSockcap") + port_model_gw: Optional[StrictStr] = Field(default=None, description="Model gateway port number.", alias="portModelGw") + consoles: Optional[List[InstanceConsole]] = Field(default=None, description="Available console connections.") + interfaces: Optional[List[InstanceInterfaceStatus]] = Field(default=None, description="Available configurable interfaces and their attachment status.") + services: Optional[InstanceServices] = None + panicked: Optional[StrictBool] = Field(default=None, description="Whether the instance has panicked.") + created: datetime = Field(description="Time instance was created.") + model: Optional[StrictStr] = Field(default=None, description="Model of virtual machine device.") + fw_package: Optional[StrictStr] = Field(default=None, description="URL that the package used to create this instance is available at.", alias="fwPackage") + os_version: Optional[StrictStr] = Field(default=None, description="OS version.", alias="osVersion") + os_build: Optional[StrictStr] = Field(default=None, description="OS build.", alias="osBuild") + agent: Optional[InstanceAgentState] = None + net_mon: Optional[InstanceNetmonState] = Field(default=None, alias="netMon") + net_dump: Optional[InstanceNetdumpState] = Field(default=None, alias="netDump") + core_trace: Optional[InstanceTraceState] = Field(default=None, alias="coreTrace") + hyper_trace: Optional[InstanceHyperTraceState] = Field(default=None, alias="hyperTrace") + expose_port: Optional[StrictStr] = Field(default=None, description="Currently exposed port, if any.", alias="exposePort") + fault: Optional[StrictBool] = Field(default=None, description="Whether the instance is in a fault state.") + patches: Optional[List[StrictStr]] = Field(default=None, description="Patches applied to the instance.") + created_by: Optional[CreatedBy] = Field(default=None, alias="createdBy") + uefi_bootloader: Optional[InstanceUefiBootloader] = Field(default=None, alias="uefiBootloader") + orientation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Device orientation.") + mast: Optional[StrictBool] = Field(default=None, description="Whether MATRIX is enabled.") + wan_access: Optional[StrictBool] = Field(default=None, description="Whether WAN access is enabled.", alias="wanAccess") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "key", "flavor", "flavorName", "type", "project", "domainName", "state", "stateChanged", "startedAt", "userTask", "taskState", "error", "restoreStatus", "readOnly", "bootOptions", "serviceIp", "wifiIp", "wifiMac", "secondaryIp", "portAdb", "portUsb", "portGdb", "portSepGdb", "portCons", "portSepCons", "portSysCons", "portUsbmuxd", "portFrida", "portSockcap", "portModelGw", "consoles", "interfaces", "services", "panicked", "created", "model", "fwPackage", "osVersion", "osBuild", "agent", "netMon", "netDump", "coreTrace", "hyperTrace", "exposePort", "fault", "patches", "createdBy", "uefiBootloader", "orientation", "mast", "wanAccess"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Instance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of restore_status + if self.restore_status: + _dict['restoreStatus'] = self.restore_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of read_only + if self.read_only: + _dict['readOnly'] = self.read_only.to_dict() + # override the default output from pydantic by calling `to_dict()` of boot_options + if self.boot_options: + _dict['bootOptions'] = self.boot_options.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in consoles (list) + _items = [] + if self.consoles: + for _item_consoles in self.consoles: + if _item_consoles: + _items.append(_item_consoles.to_dict()) + _dict['consoles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in interfaces (list) + _items = [] + if self.interfaces: + for _item_interfaces in self.interfaces: + if _item_interfaces: + _items.append(_item_interfaces.to_dict()) + _dict['interfaces'] = _items + # override the default output from pydantic by calling `to_dict()` of services + if self.services: + _dict['services'] = self.services.to_dict() + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + # override the default output from pydantic by calling `to_dict()` of net_mon + if self.net_mon: + _dict['netMon'] = self.net_mon.to_dict() + # override the default output from pydantic by calling `to_dict()` of net_dump + if self.net_dump: + _dict['netDump'] = self.net_dump.to_dict() + # override the default output from pydantic by calling `to_dict()` of core_trace + if self.core_trace: + _dict['coreTrace'] = self.core_trace.to_dict() + # override the default output from pydantic by calling `to_dict()` of hyper_trace + if self.hyper_trace: + _dict['hyperTrace'] = self.hyper_trace.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of uefi_bootloader + if self.uefi_bootloader: + _dict['uefiBootloader'] = self.uefi_bootloader.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if state_changed (nullable) is None + # and model_fields_set contains the field + if self.state_changed is None and "state_changed" in self.model_fields_set: + _dict['stateChanged'] = None + + # set to None if started_at (nullable) is None + # and model_fields_set contains the field + if self.started_at is None and "started_at" in self.model_fields_set: + _dict['startedAt'] = None + + # set to None if user_task (nullable) is None + # and model_fields_set contains the field + if self.user_task is None and "user_task" in self.model_fields_set: + _dict['userTask'] = None + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + # set to None if read_only (nullable) is None + # and model_fields_set contains the field + if self.read_only is None and "read_only" in self.model_fields_set: + _dict['readOnly'] = None + + # set to None if agent (nullable) is None + # and model_fields_set contains the field + if self.agent is None and "agent" in self.model_fields_set: + _dict['agent'] = None + + # set to None if expose_port (nullable) is None + # and model_fields_set contains the field + if self.expose_port is None and "expose_port" in self.model_fields_set: + _dict['exposePort'] = None + + # set to None if fault (nullable) is None + # and model_fields_set contains the field + if self.fault is None and "fault" in self.model_fields_set: + _dict['fault'] = None + + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['createdBy'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Instance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "key": obj.get("key"), + "flavor": obj.get("flavor"), + "flavorName": obj.get("flavorName"), + "type": obj.get("type"), + "project": obj.get("project"), + "domainName": obj.get("domainName"), + "state": obj.get("state"), + "stateChanged": obj.get("stateChanged"), + "startedAt": obj.get("startedAt"), + "userTask": obj.get("userTask"), + "taskState": obj.get("taskState"), + "error": obj.get("error"), + "restoreStatus": InstanceRestoreStatus.from_dict(obj["restoreStatus"]) if obj.get("restoreStatus") is not None else None, + "readOnly": InstanceReadOnlyStatus.from_dict(obj["readOnly"]) if obj.get("readOnly") is not None else None, + "bootOptions": InstanceBootOptions.from_dict(obj["bootOptions"]) if obj.get("bootOptions") is not None else None, + "serviceIp": obj.get("serviceIp"), + "wifiIp": obj.get("wifiIp"), + "wifiMac": obj.get("wifiMac"), + "secondaryIp": obj.get("secondaryIp"), + "portAdb": obj.get("portAdb"), + "portUsb": obj.get("portUsb"), + "portGdb": obj.get("portGdb"), + "portSepGdb": obj.get("portSepGdb"), + "portCons": obj.get("portCons"), + "portSepCons": obj.get("portSepCons"), + "portSysCons": obj.get("portSysCons"), + "portUsbmuxd": obj.get("portUsbmuxd"), + "portFrida": obj.get("portFrida"), + "portSockcap": obj.get("portSockcap"), + "portModelGw": obj.get("portModelGw"), + "consoles": [InstanceConsole.from_dict(_item) for _item in obj["consoles"]] if obj.get("consoles") is not None else None, + "interfaces": [InstanceInterfaceStatus.from_dict(_item) for _item in obj["interfaces"]] if obj.get("interfaces") is not None else None, + "services": InstanceServices.from_dict(obj["services"]) if obj.get("services") is not None else None, + "panicked": obj.get("panicked"), + "created": obj.get("created"), + "model": obj.get("model"), + "fwPackage": obj.get("fwPackage"), + "osVersion": obj.get("osVersion"), + "osBuild": obj.get("osBuild"), + "agent": InstanceAgentState.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "netMon": InstanceNetmonState.from_dict(obj["netMon"]) if obj.get("netMon") is not None else None, + "netDump": InstanceNetdumpState.from_dict(obj["netDump"]) if obj.get("netDump") is not None else None, + "coreTrace": InstanceTraceState.from_dict(obj["coreTrace"]) if obj.get("coreTrace") is not None else None, + "hyperTrace": InstanceHyperTraceState.from_dict(obj["hyperTrace"]) if obj.get("hyperTrace") is not None else None, + "exposePort": obj.get("exposePort"), + "fault": obj.get("fault"), + "patches": obj.get("patches"), + "createdBy": CreatedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "uefiBootloader": InstanceUefiBootloader.from_dict(obj["uefiBootloader"]) if obj.get("uefiBootloader") is not None else None, + "orientation": obj.get("orientation"), + "mast": obj.get("mast"), + "wanAccess": obj.get("wanAccess") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_agent_state.py b/corellium/models/instance_agent_state.py new file mode 100644 index 0000000..5a26492 --- /dev/null +++ b/corellium/models/instance_agent_state.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceAgentState(BaseModel): + """ + InstanceAgentState + """ # noqa: E501 + hash: Optional[StrictStr] = Field(default=None, description="Hash for agent authentication.") + info: Optional[StrictStr] = Field(default=None, description="Encrypted info for agent authentication.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash", "info"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceAgentState from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceAgentState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "info": obj.get("info") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_agent_state_v1.py b/corellium/models/instance_agent_state_v1.py new file mode 100644 index 0000000..272aa02 --- /dev/null +++ b/corellium/models/instance_agent_state_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceAgentStateV1(BaseModel): + """ + + """ # noqa: E501 + hash: Optional[StrictStr] = None + info: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash", "info"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceAgentStateV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if hash (nullable) is None + # and model_fields_set contains the field + if self.hash is None and "hash" in self.model_fields_set: + _dict['hash'] = None + + # set to None if info (nullable) is None + # and model_fields_set contains the field + if self.info is None and "info" in self.model_fields_set: + _dict['info'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceAgentStateV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "info": obj.get("info") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_boot_options.py b/corellium/models/instance_boot_options.py new file mode 100644 index 0000000..705bb8b --- /dev/null +++ b/corellium/models/instance_boot_options.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.charm_tag import CharmTag +from corellium.models.instance_boot_options_fvp import InstanceBootOptionsFvp +from corellium.models.instance_boot_options_kernel import InstanceBootOptionsKernel +from corellium.models.instance_boot_options_pongo import InstanceBootOptionsPongo +from corellium.models.instance_boot_options_vmmio_inner import InstanceBootOptionsVMMIOInner +from typing import Optional, Set +from typing_extensions import Self + +class InstanceBootOptions(BaseModel): + """ + InstanceBootOptions + """ # noqa: E501 + boot_args: Optional[StrictStr] = Field(default=None, description="Boot arguments passed to the kernel at normal boot.", alias="bootArgs") + restore_boot_args: Optional[StrictStr] = Field(default=None, description="Boot arguments passed to the kernel during restore.", alias="restoreBootArgs") + udid: Optional[StrictStr] = Field(default=None, description="Boot UDID.") + ecid: Optional[StrictStr] = Field(default=None, description="Assigned ECID (hex).") + random_seed: Optional[StrictStr] = Field(default=None, description="Random seed provided to boot, if any.", alias="randomSeed") + pac: Optional[StrictBool] = Field(default=None, description="Enable Pointer Authentication Codes (PAC), the Apple processor feature that signs pointers to block memory-corruption attacks.") + aprr: Optional[StrictBool] = Field(default=None, description="Enable APRR, the Apple processor feature that controls memory page permissions (used by kernel protections).") + cores: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of CPU cores for the device. Only models whose `dynamicHardwareChanges` is true in `GET /v3/models` honor this; others always use the model default. The value must be between the model's `coresMin` and `coresMax`; a value outside that range is silently replaced by the model default rather than rejected, so check the device afterwards.") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Memory for the device, in MiB (1024 MiB = 1 GiB). Only models whose `dynamicHardwareChanges` is true honor this; others always use the model default. The value must be between the model's `ramMin` and `ramMax`, and at most 1 GiB per CPU core; otherwise the request fails with 400.") + additional_tags: Optional[List[CharmTag]] = Field(default=None, description="Additional boot tags to apply to the instance. Each value must be one of the supported charm boot tags.", alias="additionalTags") + kernel: Optional[InstanceBootOptionsKernel] = None + pongo: Optional[InstanceBootOptionsPongo] = None + serial: Optional[StrictStr] = Field(default=None, description="Device serial number.") + no_snapshot_mount: Optional[StrictBool] = Field(default=None, description="Do not mount iOS snapshot (iOS only).", alias="noSnapshotMount") + kernel_slide: Optional[StrictStr] = Field(default=None, description="Kernel slide value (iOS only).", alias="kernelSlide") + cd_hashes: Optional[List[StrictStr]] = Field(default=None, description="Hashes of trusted binaries (iOS only).", alias="cdHashes") + imei: Optional[StrictStr] = Field(default=None, description="IMEI.") + imsi: Optional[StrictStr] = Field(default=None, description="IMSI.") + ssid0: Optional[StrictStr] = Field(default=None, description="WiFi SSID.") + ssid1: Optional[StrictStr] = Field(default=None, description="Secondary WiFi SSID.") + wifi_mac: Optional[StrictStr] = Field(default=None, description="WiFi MAC address.", alias="wifiMac") + model_id: Optional[StrictStr] = Field(default=None, description="Device model identifier.", alias="modelId") + manufacturer_id: Optional[StrictStr] = Field(default=None, description="Device manufacturer identifier.", alias="manufacturerId") + kernel_patches: Optional[StrictStr] = Field(default=None, description="Kernel patches to apply.", alias="kernelPatches") + stop_on_fault: Optional[StrictBool] = Field(default=True, description="Leaves the VM in the paused state on hypervisor vault if false.", alias="stopOnFault") + boot_addr: Optional[StrictStr] = Field(default=None, description="Boot address.", alias="bootAddr") + tzen: Optional[StrictBool] = Field(default=None, description="Enable TrustZone security.") + authorized_keys: Optional[StrictStr] = Field(default=None, description="SSH authorized keys to install on the instance.", alias="authorizedKeys") + v_mmio: Optional[List[InstanceBootOptionsVMMIOInner]] = Field(default=None, description="Parameters to export a VM address space range (and IRQ & DMA functionality) over TCP to different models running on different machines or inside a different VM.", alias="vMMIO") + fvp: Optional[InstanceBootOptionsFvp] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bootArgs", "restoreBootArgs", "udid", "ecid", "randomSeed", "pac", "aprr", "cores", "ram", "additionalTags", "kernel", "pongo", "serial", "noSnapshotMount", "kernelSlide", "cdHashes", "imei", "imsi", "ssid0", "ssid1", "wifiMac", "modelId", "manufacturerId", "kernelPatches", "stopOnFault", "bootAddr", "tzen", "authorizedKeys", "vMMIO", "fvp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceBootOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of kernel + if self.kernel: + _dict['kernel'] = self.kernel.to_dict() + # override the default output from pydantic by calling `to_dict()` of pongo + if self.pongo: + _dict['pongo'] = self.pongo.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in v_mmio (list) + _items = [] + if self.v_mmio: + for _item_v_mmio in self.v_mmio: + if _item_v_mmio: + _items.append(_item_v_mmio.to_dict()) + _dict['vMMIO'] = _items + # override the default output from pydantic by calling `to_dict()` of fvp + if self.fvp: + _dict['fvp'] = self.fvp.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if tzen (nullable) is None + # and model_fields_set contains the field + if self.tzen is None and "tzen" in self.model_fields_set: + _dict['tzen'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceBootOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bootArgs": obj.get("bootArgs"), + "restoreBootArgs": obj.get("restoreBootArgs"), + "udid": obj.get("udid"), + "ecid": obj.get("ecid"), + "randomSeed": obj.get("randomSeed"), + "pac": obj.get("pac"), + "aprr": obj.get("aprr"), + "cores": obj.get("cores"), + "ram": obj.get("ram"), + "additionalTags": obj.get("additionalTags"), + "kernel": InstanceBootOptionsKernel.from_dict(obj["kernel"]) if obj.get("kernel") is not None else None, + "pongo": InstanceBootOptionsPongo.from_dict(obj["pongo"]) if obj.get("pongo") is not None else None, + "serial": obj.get("serial"), + "noSnapshotMount": obj.get("noSnapshotMount"), + "kernelSlide": obj.get("kernelSlide"), + "cdHashes": obj.get("cdHashes"), + "imei": obj.get("imei"), + "imsi": obj.get("imsi"), + "ssid0": obj.get("ssid0"), + "ssid1": obj.get("ssid1"), + "wifiMac": obj.get("wifiMac"), + "modelId": obj.get("modelId"), + "manufacturerId": obj.get("manufacturerId"), + "kernelPatches": obj.get("kernelPatches"), + "stopOnFault": obj.get("stopOnFault") if obj.get("stopOnFault") is not None else True, + "bootAddr": obj.get("bootAddr"), + "tzen": obj.get("tzen"), + "authorizedKeys": obj.get("authorizedKeys"), + "vMMIO": [InstanceBootOptionsVMMIOInner.from_dict(_item) for _item in obj["vMMIO"]] if obj.get("vMMIO") is not None else None, + "fvp": InstanceBootOptionsFvp.from_dict(obj["fvp"]) if obj.get("fvp") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_boot_options_additional_tag.py b/corellium/models/instance_boot_options_additional_tag.py new file mode 100644 index 0000000..583839e --- /dev/null +++ b/corellium/models/instance_boot_options_additional_tag.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class InstanceBootOptionsAdditionalTag(str, Enum): + """ + ### Instance Boot Option * kalloc: Enable kalloc/kfree trace access via GDB (Enterprise only) * gpu: Enable cloud GPU acceleration (Extra costs incurred, cloud only) * no-keyboard: Enable keyboard passthrough from web interface * nodevmode: Disable developer mode on iOS16 and greater * sep-cons-ext: Patch SEPOS to print debug messages to console * iboot-jailbreak: Patch iBoot to disable signature checks * llb-jailbreak: Patch LLB to disable signature checks * rom-jailbreak: Patch BootROM to disable signature checks + """ + + """ + allowed enum values + """ + KALLOC = 'kalloc' + GPU = 'gpu' + NO_MINUS_KEYBOARD = 'no-keyboard' + NODEVMODE = 'nodevmode' + SEP_MINUS_CONS_MINUS_EXT = 'sep-cons-ext' + IBOOT_MINUS_JAILBREAK = 'iboot-jailbreak' + LLB_MINUS_JAILBREAK = 'llb-jailbreak' + ROM_MINUS_JAILBREAK = 'rom-jailbreak' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceBootOptionsAdditionalTag from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/instance_boot_options_fvp.py b/corellium/models/instance_boot_options_fvp.py new file mode 100644 index 0000000..f70a00f --- /dev/null +++ b/corellium/models/instance_boot_options_fvp.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceBootOptionsFvp(BaseModel): + """ + InstanceBootOptionsFvp + """ # noqa: E501 + model_binary: Optional[StrictStr] = Field(default=None, description="FVP model binary path. Populated by the server from the flavor; clients should not set this.", alias="modelBinary") + parameters: Optional[Dict[str, StrictStr]] = Field(default=None, description="Key/value map of FVP model parameters.") + data: Optional[List[StrictStr]] = Field(default=None, description="Raw data to load at specified addresses (format: \"file@address\").") + breaks: Optional[List[StrictStr]] = Field(default=None, description="Breakpoint addresses to set.") + dumps: Optional[List[StrictStr]] = Field(default=None, description="Memory regions to dump (format: \"file@address,size\").") + cadi_log: Optional[StrictStr] = Field(default=None, description="Log all CADI calls into an XML log file.", alias="cadiLog") + cadi_server: Optional[StrictStr] = Field(default=None, description="Start CADI server.", alias="cadiServer") + iris_server: Optional[StrictStr] = Field(default=None, description="Start Iris server.", alias="irisServer") + iris_log: Optional[StrictStr] = Field(default=None, description="Iris log level.", alias="irisLog") + iris_allow_remote: Optional[StrictStr] = Field(default=None, description="Allow remote connections to the Iris server.", alias="irisAllowRemote") + iris_port_range: Optional[StrictStr] = Field(default=None, description="Port range to scan when starting the Iris server (format: \"min:max\").", alias="irisPortRange") + iris_port: Optional[StrictStr] = Field(default=None, description="Specific port for the Iris server.", alias="irisPort") + run: Optional[StrictStr] = Field(default=None, description="Run the simulation immediately when a debug server is started.") + stat: Optional[StrictStr] = Field(default=None, description="Print run statistics on simulation exit.") + quiet: Optional[StrictStr] = Field(default=None, description="Suppress informational output.") + start: Optional[StrictStr] = Field(default=None, description="Set initial PC to application start address.") + plugin: Optional[StrictStr] = Field(default=None, description="Load plugin.") + fast_ram: Optional[StrictStr] = Field(default=None, description="Enable FastRAM and load its configuration from file.", alias="fastRam") + save: Optional[StrictStr] = Field(default=None, description="Save checkpoint to directory on simulation exit.") + restore: Optional[StrictStr] = Field(default=None, description="Restore checkpoint from directory on simulation startup.") + cpi_file: Optional[StrictStr] = Field(default=None, description="File to set Cycle Per Instruction class.", alias="cpiFile") + cycle_limit: Optional[StrictStr] = Field(default=None, description="Number of cycles to run.", alias="cycleLimit") + cpu_limit: Optional[StrictStr] = Field(default=None, description="Number of host active CPU seconds to run.", alias="cpuLimit") + time_limit: Optional[StrictStr] = Field(default=None, description="Number of wall-clock seconds to run.", alias="timeLimit") + sim_limit: Optional[StrictStr] = Field(default=None, description="Number of seconds to simulate.", alias="simLimit") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["modelBinary", "parameters", "data", "breaks", "dumps", "cadiLog", "cadiServer", "irisServer", "irisLog", "irisAllowRemote", "irisPortRange", "irisPort", "run", "stat", "quiet", "start", "plugin", "fastRam", "save", "restore", "cpiFile", "cycleLimit", "cpuLimit", "timeLimit", "simLimit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceBootOptionsFvp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceBootOptionsFvp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "modelBinary": obj.get("modelBinary"), + "parameters": obj.get("parameters"), + "data": obj.get("data"), + "breaks": obj.get("breaks"), + "dumps": obj.get("dumps"), + "cadiLog": obj.get("cadiLog"), + "cadiServer": obj.get("cadiServer"), + "irisServer": obj.get("irisServer"), + "irisLog": obj.get("irisLog"), + "irisAllowRemote": obj.get("irisAllowRemote"), + "irisPortRange": obj.get("irisPortRange"), + "irisPort": obj.get("irisPort"), + "run": obj.get("run"), + "stat": obj.get("stat"), + "quiet": obj.get("quiet"), + "start": obj.get("start"), + "plugin": obj.get("plugin"), + "fastRam": obj.get("fastRam"), + "save": obj.get("save"), + "restore": obj.get("restore"), + "cpiFile": obj.get("cpiFile"), + "cycleLimit": obj.get("cycleLimit"), + "cpuLimit": obj.get("cpuLimit"), + "timeLimit": obj.get("timeLimit"), + "simLimit": obj.get("simLimit") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_boot_options_kernel.py b/corellium/models/instance_boot_options_kernel.py new file mode 100644 index 0000000..fee57b7 --- /dev/null +++ b/corellium/models/instance_boot_options_kernel.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceBootOptionsKernel(BaseModel): + """ + InstanceBootOptionsKernel + """ # noqa: E501 + firmware_path: StrictStr = Field(description="Relative path within the firmware to the bundled kernel file.", alias="firmwarePath") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["firmwarePath"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceBootOptionsKernel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceBootOptionsKernel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firmwarePath": obj.get("firmwarePath") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_boot_options_kernel_v1.py b/corellium/models/instance_boot_options_kernel_v1.py new file mode 100644 index 0000000..8e5a3fe --- /dev/null +++ b/corellium/models/instance_boot_options_kernel_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceBootOptionsKernelV1(BaseModel): + """ + + """ # noqa: E501 + firmware_path: Optional[StrictStr] = Field(default=None, description="The relative path within the firmware to the kernel file that has been bundled up with the selected firmware", alias="firmwarePath") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["firmwarePath"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceBootOptionsKernelV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if firmware_path (nullable) is None + # and model_fields_set contains the field + if self.firmware_path is None and "firmware_path" in self.model_fields_set: + _dict['firmwarePath'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceBootOptionsKernelV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firmwarePath": obj.get("firmwarePath") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_boot_options_pongo.py b/corellium/models/instance_boot_options_pongo.py new file mode 100644 index 0000000..4a23b5a --- /dev/null +++ b/corellium/models/instance_boot_options_pongo.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class InstanceBootOptionsPongo(BaseModel): + """ + InstanceBootOptionsPongo + """ # noqa: E501 + id: StrictStr = Field(description="Pongo image ID. Uploaded pongo images are keyed by UUID, like other instance images.") + name: StrictStr = Field(description="File name.") + size: Union[StrictFloat, StrictInt] = Field(description="File size.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "size"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceBootOptionsPongo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceBootOptionsPongo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "size": obj.get("size") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_boot_options_pongo_v1.py b/corellium/models/instance_boot_options_pongo_v1.py new file mode 100644 index 0000000..49c71b8 --- /dev/null +++ b/corellium/models/instance_boot_options_pongo_v1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class InstanceBootOptionsPongoV1(BaseModel): + """ + + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Image Id") + name: Optional[StrictStr] = Field(default=None, description="File name") + size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="File size") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "size"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceBootOptionsPongoV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceBootOptionsPongoV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "size": obj.get("size") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_boot_options_v1.py b/corellium/models/instance_boot_options_v1.py new file mode 100644 index 0000000..af2066a --- /dev/null +++ b/corellium/models/instance_boot_options_v1.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.instance_boot_options_additional_tag import InstanceBootOptionsAdditionalTag +from corellium.models.instance_boot_options_kernel_v1 import InstanceBootOptionsKernelV1 +from corellium.models.instance_boot_options_pongo_v1 import InstanceBootOptionsPongoV1 +from typing import Optional, Set +from typing_extensions import Self + +class InstanceBootOptionsV1(BaseModel): + """ + + """ # noqa: E501 + boot_args: Optional[StrictStr] = Field(default=None, alias="bootArgs") + restore_boot_args: Optional[StrictStr] = Field(default=None, alias="restoreBootArgs") + udid: Optional[StrictStr] = Field(default=None, description="Boot udid") + ecid: Optional[StrictStr] = Field(default=None, description="Assigned ECID") + random_seed: Optional[StrictStr] = Field(default=None, description="Random seed to provide to boot if any", alias="randomSeed") + pac: Optional[StrictBool] = Field(default=None, description="Enable PAC") + aprr: Optional[StrictBool] = Field(default=None, description="Enable APRR") + additional_tags: Optional[List[InstanceBootOptionsAdditionalTag]] = Field(default=None, alias="additionalTags") + kernel: Optional[InstanceBootOptionsKernelV1] = None + pongo: Optional[InstanceBootOptionsPongoV1] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bootArgs", "restoreBootArgs", "udid", "ecid", "randomSeed", "pac", "aprr", "additionalTags", "kernel", "pongo"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceBootOptionsV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of kernel + if self.kernel: + _dict['kernel'] = self.kernel.to_dict() + # override the default output from pydantic by calling `to_dict()` of pongo + if self.pongo: + _dict['pongo'] = self.pongo.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if boot_args (nullable) is None + # and model_fields_set contains the field + if self.boot_args is None and "boot_args" in self.model_fields_set: + _dict['bootArgs'] = None + + # set to None if restore_boot_args (nullable) is None + # and model_fields_set contains the field + if self.restore_boot_args is None and "restore_boot_args" in self.model_fields_set: + _dict['restoreBootArgs'] = None + + # set to None if udid (nullable) is None + # and model_fields_set contains the field + if self.udid is None and "udid" in self.model_fields_set: + _dict['udid'] = None + + # set to None if ecid (nullable) is None + # and model_fields_set contains the field + if self.ecid is None and "ecid" in self.model_fields_set: + _dict['ecid'] = None + + # set to None if random_seed (nullable) is None + # and model_fields_set contains the field + if self.random_seed is None and "random_seed" in self.model_fields_set: + _dict['randomSeed'] = None + + # set to None if pac (nullable) is None + # and model_fields_set contains the field + if self.pac is None and "pac" in self.model_fields_set: + _dict['pac'] = None + + # set to None if aprr (nullable) is None + # and model_fields_set contains the field + if self.aprr is None and "aprr" in self.model_fields_set: + _dict['aprr'] = None + + # set to None if additional_tags (nullable) is None + # and model_fields_set contains the field + if self.additional_tags is None and "additional_tags" in self.model_fields_set: + _dict['additionalTags'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceBootOptionsV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bootArgs": obj.get("bootArgs"), + "restoreBootArgs": obj.get("restoreBootArgs"), + "udid": obj.get("udid"), + "ecid": obj.get("ecid"), + "randomSeed": obj.get("randomSeed"), + "pac": obj.get("pac"), + "aprr": obj.get("aprr"), + "additionalTags": obj.get("additionalTags"), + "kernel": InstanceBootOptionsKernelV1.from_dict(obj["kernel"]) if obj.get("kernel") is not None else None, + "pongo": InstanceBootOptionsPongoV1.from_dict(obj["pongo"]) if obj.get("pongo") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_boot_options_vmmio_inner.py b/corellium/models/instance_boot_options_vmmio_inner.py new file mode 100644 index 0000000..dd97784 --- /dev/null +++ b/corellium/models/instance_boot_options_vmmio_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceBootOptionsVMMIOInner(BaseModel): + """ + InstanceBootOptionsVMMIOInner + """ # noqa: E501 + start: StrictStr = Field(description="Start address for beginning of vMMIO range.") + size: StrictStr = Field(description="The size of the range to use for vMMIO.") + irq: StrictStr = Field(description="System IRQs, 1-16 ranges must be specified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["start", "size", "irq"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceBootOptionsVMMIOInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceBootOptionsVMMIOInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start": obj.get("start"), + "size": obj.get("size"), + "irq": obj.get("irq") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_console.py b/corellium/models/instance_console.py new file mode 100644 index 0000000..75597d2 --- /dev/null +++ b/corellium/models/instance_console.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceConsole(BaseModel): + """ + InstanceConsole + """ # noqa: E501 + name: StrictStr = Field(description="Console display name.") + id: StrictStr = Field(description="Console port identifier (e.g. port-cons). Used to select this console when getting the console websocket URL.") + port: StrictStr = Field(description="TCP port number.") + hash: StrictStr = Field(description="Hash for console authentication.") + info: StrictStr = Field(description="Encrypted info for console authentication.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "id", "port", "hash", "info"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceConsole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceConsole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "id": obj.get("id"), + "port": obj.get("port"), + "hash": obj.get("hash"), + "info": obj.get("info") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_console_endpoint.py b/corellium/models/instance_console_endpoint.py new file mode 100644 index 0000000..a560c1a --- /dev/null +++ b/corellium/models/instance_console_endpoint.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceConsoleEndpoint(BaseModel): + """ + InstanceConsoleEndpoint + """ # noqa: E501 + url: StrictStr = Field(description="Console WebSocket URL.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceConsoleEndpoint from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceConsoleEndpoint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_console_endpoint_v1.py b/corellium/models/instance_console_endpoint_v1.py new file mode 100644 index 0000000..11e005e --- /dev/null +++ b/corellium/models/instance_console_endpoint_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceConsoleEndpointV1(BaseModel): + """ + + """ # noqa: E501 + url: Optional[StrictStr] = Field(default=None, description="Console Websocket URL") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceConsoleEndpointV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceConsoleEndpointV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_console_v1.py b/corellium/models/instance_console_v1.py new file mode 100644 index 0000000..e66fd32 --- /dev/null +++ b/corellium/models/instance_console_v1.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class InstanceConsoleV1(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Console display name") + id: Optional[StrictStr] = Field(default=None, description="Console port identifier (e.g. port-cons)") + port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="TCP port number") + hash: Optional[StrictStr] = Field(default=None, description="Hash for console authentication") + info: Optional[StrictStr] = Field(default=None, description="Encrypted info for console authentication") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "id", "port", "hash", "info"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceConsoleV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if port (nullable) is None + # and model_fields_set contains the field + if self.port is None and "port" in self.model_fields_set: + _dict['port'] = None + + # set to None if hash (nullable) is None + # and model_fields_set contains the field + if self.hash is None and "hash" in self.model_fields_set: + _dict['hash'] = None + + # set to None if info (nullable) is None + # and model_fields_set contains the field + if self.info is None and "info" in self.model_fields_set: + _dict['info'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceConsoleV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "id": obj.get("id"), + "port": obj.get("port"), + "hash": obj.get("hash"), + "info": obj.get("info") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_create_options.py b/corellium/models/instance_create_options.py new file mode 100644 index 0000000..2173c7f --- /dev/null +++ b/corellium/models/instance_create_options.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceCreateOptions(BaseModel): + """ + + """ # noqa: E501 + shared_snapshot: Optional[StrictStr] = Field(default=None, description="identifier of the snapshot that was shared.", alias="sharedSnapshot") + shared_snapshot_password: Optional[StrictStr] = Field(default=None, description="optional password if the shared snapshot requires a password.", alias="sharedSnapshotPassword") + name: Optional[StrictStr] = Field(default=None, description="the name of the device") + key: Optional[StrictStr] = Field(default=None, description="Key used to encrypt the Instance") + flavor: StrictStr = Field(description="the flavor id") + project: StrictStr = Field(description="project UUID") + os: StrictStr = Field(description="OS Version") + osbuild: Optional[StrictStr] = Field(default=None, description="OS Build") + patches: Optional[List[StrictStr]] = Field(default=None, description="list of patches to apply") + fwpackage: Optional[StrictStr] = Field(default=None, description="URL or image id") + orig_fw_package_url: Optional[StrictStr] = Field(default=None, description="URL that firmware package used to create this instance is available at", alias="origFwPackageUrl") + encrypt: Optional[StrictBool] = None + wifi_mac: Optional[StrictStr] = Field(default=None, alias="wifiMac") + wan_access: Optional[StrictBool] = Field(default=None, description="manages internet access", alias="wanAccess") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharedSnapshot", "sharedSnapshotPassword", "name", "key", "flavor", "project", "os", "osbuild", "patches", "fwpackage", "origFwPackageUrl", "encrypt", "wifiMac", "wanAccess"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceCreateOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if shared_snapshot (nullable) is None + # and model_fields_set contains the field + if self.shared_snapshot is None and "shared_snapshot" in self.model_fields_set: + _dict['sharedSnapshot'] = None + + # set to None if shared_snapshot_password (nullable) is None + # and model_fields_set contains the field + if self.shared_snapshot_password is None and "shared_snapshot_password" in self.model_fields_set: + _dict['sharedSnapshotPassword'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if key (nullable) is None + # and model_fields_set contains the field + if self.key is None and "key" in self.model_fields_set: + _dict['key'] = None + + # set to None if osbuild (nullable) is None + # and model_fields_set contains the field + if self.osbuild is None and "osbuild" in self.model_fields_set: + _dict['osbuild'] = None + + # set to None if patches (nullable) is None + # and model_fields_set contains the field + if self.patches is None and "patches" in self.model_fields_set: + _dict['patches'] = None + + # set to None if fwpackage (nullable) is None + # and model_fields_set contains the field + if self.fwpackage is None and "fwpackage" in self.model_fields_set: + _dict['fwpackage'] = None + + # set to None if orig_fw_package_url (nullable) is None + # and model_fields_set contains the field + if self.orig_fw_package_url is None and "orig_fw_package_url" in self.model_fields_set: + _dict['origFwPackageUrl'] = None + + # set to None if encrypt (nullable) is None + # and model_fields_set contains the field + if self.encrypt is None and "encrypt" in self.model_fields_set: + _dict['encrypt'] = None + + # set to None if wifi_mac (nullable) is None + # and model_fields_set contains the field + if self.wifi_mac is None and "wifi_mac" in self.model_fields_set: + _dict['wifiMac'] = None + + # set to None if wan_access (nullable) is None + # and model_fields_set contains the field + if self.wan_access is None and "wan_access" in self.model_fields_set: + _dict['wanAccess'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceCreateOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharedSnapshot": obj.get("sharedSnapshot"), + "sharedSnapshotPassword": obj.get("sharedSnapshotPassword"), + "name": obj.get("name"), + "key": obj.get("key"), + "flavor": obj.get("flavor"), + "project": obj.get("project"), + "os": obj.get("os"), + "osbuild": obj.get("osbuild"), + "patches": obj.get("patches"), + "fwpackage": obj.get("fwpackage"), + "origFwPackageUrl": obj.get("origFwPackageUrl"), + "encrypt": obj.get("encrypt"), + "wifiMac": obj.get("wifiMac"), + "wanAccess": obj.get("wanAccess") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_hyper_trace_state.py b/corellium/models/instance_hyper_trace_state.py new file mode 100644 index 0000000..d93e414 --- /dev/null +++ b/corellium/models/instance_hyper_trace_state.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.instance_trace_filter import InstanceTraceFilter +from typing import Optional, Set +from typing_extensions import Self + +class InstanceHyperTraceState(BaseModel): + """ + Hypervisor (btrace) tracing state. + """ # noqa: E501 + enabled: Optional[StrictStr] = Field(default=None, description="HyperTrace (btrace) status.") + length: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Length of trace data.") + filter: Optional[List[InstanceTraceFilter]] = Field(default=None, description="Active trace filters matching traits to values.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "length", "filter"] + + @field_validator('enabled') + def enabled_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['enabling', 'enabled', 'disabling', 'disabled']): + raise ValueError("must be one of enum values ('enabling', 'enabled', 'disabling', 'disabled')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceHyperTraceState from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in filter (list) + _items = [] + if self.filter: + for _item_filter in self.filter: + if _item_filter: + _items.append(_item_filter.to_dict()) + _dict['filter'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceHyperTraceState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "length": obj.get("length"), + "filter": [InstanceTraceFilter.from_dict(_item) for _item in obj["filter"]] if obj.get("filter") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_hyper_trace_state_v1.py b/corellium/models/instance_hyper_trace_state_v1.py new file mode 100644 index 0000000..022eaa2 --- /dev/null +++ b/corellium/models/instance_hyper_trace_state_v1.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class InstanceHyperTraceStateV1(BaseModel): + """ + + """ # noqa: E501 + enabled: Optional[StrictStr] = Field(default=None, description="HyperTrace (btrace) status") + length: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Length of trace data") + filter: Optional[StrictStr] = Field(default=None, description="Trace filter expression") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "length", "filter"] + + @field_validator('enabled') + def enabled_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['enabling', 'enabled', 'disabling', 'disabled']): + raise ValueError("must be one of enum values ('enabling', 'enabled', 'disabling', 'disabled')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceHyperTraceStateV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if length (nullable) is None + # and model_fields_set contains the field + if self.length is None and "length" in self.model_fields_set: + _dict['length'] = None + + # set to None if filter (nullable) is None + # and model_fields_set contains the field + if self.filter is None and "filter" in self.model_fields_set: + _dict['filter'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceHyperTraceStateV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "length": obj.get("length"), + "filter": obj.get("filter") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_input_body.py b/corellium/models/instance_input_body.py new file mode 100644 index 0000000..9a46aaf --- /dev/null +++ b/corellium/models/instance_input_body.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from corellium.models.text_input_request import TextInputRequest +from corellium.models.touch_curve_input_request import TouchCurveInputRequest +from corellium.models.touch_input_request import TouchInputRequest +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +INSTANCEINPUTBODY_ANY_OF_SCHEMAS = ["TextInputRequest", "TouchCurveInputRequest", "TouchInputRequest"] + +class InstanceInputBody(BaseModel): + """ + InstanceInputBody + """ + + # data type: TouchInputRequest + anyof_schema_1_validator: Optional[TouchInputRequest] = None + # data type: TouchCurveInputRequest + anyof_schema_2_validator: Optional[TouchCurveInputRequest] = None + # data type: TextInputRequest + anyof_schema_3_validator: Optional[TextInputRequest] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[TextInputRequest, TouchCurveInputRequest, TouchInputRequest]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "TextInputRequest", "TouchCurveInputRequest", "TouchInputRequest" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = InstanceInputBody.model_construct() + error_messages = [] + # validate data type: TouchInputRequest + if not isinstance(v, TouchInputRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TouchInputRequest`") + else: + return v + + # validate data type: TouchCurveInputRequest + if not isinstance(v, TouchCurveInputRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TouchCurveInputRequest`") + else: + return v + + # validate data type: TextInputRequest + if not isinstance(v, TextInputRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TextInputRequest`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in InstanceInputBody with anyOf schemas: TextInputRequest, TouchCurveInputRequest, TouchInputRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[TouchInputRequest] = None + try: + instance.actual_instance = TouchInputRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[TouchCurveInputRequest] = None + try: + instance.actual_instance = TouchCurveInputRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_3_validator: Optional[TextInputRequest] = None + try: + instance.actual_instance = TextInputRequest.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into InstanceInputBody with anyOf schemas: TextInputRequest, TouchCurveInputRequest, TouchInputRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], TextInputRequest, TouchCurveInputRequest, TouchInputRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/instance_input_request.py b/corellium/models/instance_input_request.py new file mode 100644 index 0000000..d99e25a --- /dev/null +++ b/corellium/models/instance_input_request.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corellium.models.text_input_request_v1 import TextInputRequestV1 +from corellium.models.touch_curve_input_request_v1 import TouchCurveInputRequestV1 +from corellium.models.touch_input_request_v1 import TouchInputRequestV1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +INSTANCEINPUTREQUEST_ONE_OF_SCHEMAS = ["TextInputRequestV1", "TouchCurveInputRequestV1", "TouchInputRequestV1"] + +class InstanceInputRequest(BaseModel): + """ + + """ + # data type: TouchInputRequestV1 + oneof_schema_1_validator: Optional[TouchInputRequestV1] = None + # data type: TouchCurveInputRequestV1 + oneof_schema_2_validator: Optional[TouchCurveInputRequestV1] = None + # data type: TextInputRequestV1 + oneof_schema_3_validator: Optional[TextInputRequestV1] = None + actual_instance: Optional[Union[TextInputRequestV1, TouchCurveInputRequestV1, TouchInputRequestV1]] = None + one_of_schemas: Set[str] = { "TextInputRequestV1", "TouchCurveInputRequestV1", "TouchInputRequestV1" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = InstanceInputRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: TouchInputRequestV1 + if not isinstance(v, TouchInputRequestV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `TouchInputRequestV1`") + else: + match += 1 + # validate data type: TouchCurveInputRequestV1 + if not isinstance(v, TouchCurveInputRequestV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `TouchCurveInputRequestV1`") + else: + match += 1 + # validate data type: TextInputRequestV1 + if not isinstance(v, TextInputRequestV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `TextInputRequestV1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in InstanceInputRequest with oneOf schemas: TextInputRequestV1, TouchCurveInputRequestV1, TouchInputRequestV1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in InstanceInputRequest with oneOf schemas: TextInputRequestV1, TouchCurveInputRequestV1, TouchInputRequestV1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into TouchInputRequestV1 + try: + instance.actual_instance = TouchInputRequestV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TouchCurveInputRequestV1 + try: + instance.actual_instance = TouchCurveInputRequestV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TextInputRequestV1 + try: + instance.actual_instance = TextInputRequestV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into InstanceInputRequest with oneOf schemas: TextInputRequestV1, TouchCurveInputRequestV1, TouchInputRequestV1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into InstanceInputRequest with oneOf schemas: TextInputRequestV1, TouchCurveInputRequestV1, TouchInputRequestV1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], TextInputRequestV1, TouchCurveInputRequestV1, TouchInputRequestV1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/instance_interface.py b/corellium/models/instance_interface.py new file mode 100644 index 0000000..c2914f6 --- /dev/null +++ b/corellium/models/instance_interface.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceInterface(BaseModel): + """ + + """ # noqa: E501 + device_id: Optional[StrictStr] = Field(default=None, description="The instance id", alias="deviceId") + interface_id: Optional[StrictStr] = Field(default=None, description="The interface id", alias="interfaceId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deviceId", "interfaceId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceInterface from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if device_id (nullable) is None + # and model_fields_set contains the field + if self.device_id is None and "device_id" in self.model_fields_set: + _dict['deviceId'] = None + + # set to None if interface_id (nullable) is None + # and model_fields_set contains the field + if self.interface_id is None and "interface_id" in self.model_fields_set: + _dict['interfaceId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceInterface from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deviceId": obj.get("deviceId"), + "interfaceId": obj.get("interfaceId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_interface_status.py b/corellium/models/instance_interface_status.py new file mode 100644 index 0000000..97d3ef9 --- /dev/null +++ b/corellium/models/instance_interface_status.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceInterfaceStatus(BaseModel): + """ + InstanceInterfaceStatus + """ # noqa: E501 + interface_id: StrictStr = Field(description="Interface identifier.", alias="interfaceId") + interconnect_id: Optional[StrictStr] = Field(default=None, description="Interconnect identifier when the interface is attached.", alias="interconnectId") + status: StrictStr = Field(description="Current interface attachment status.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interfaceId", "interconnectId", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attached', 'detached', 'connected']): + raise ValueError("must be one of enum values ('attached', 'detached', 'connected')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceInterfaceStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceInterfaceStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interfaceId": obj.get("interfaceId"), + "interconnectId": obj.get("interconnectId"), + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_list.py b/corellium/models/instance_list.py new file mode 100644 index 0000000..75dcfb4 --- /dev/null +++ b/corellium/models/instance_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.instance import Instance +from typing import Optional, Set +from typing_extensions import Self + +class InstanceList(BaseModel): + """ + InstanceList + """ # noqa: E501 + results: List[Instance] = Field(description="Results for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Instance.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_netdump_state.py b/corellium/models/instance_netdump_state.py new file mode 100644 index 0000000..2d94b32 --- /dev/null +++ b/corellium/models/instance_netdump_state.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceNetdumpState(BaseModel): + """ + InstanceNetdumpState + """ # noqa: E501 + hash: Optional[StrictStr] = Field(default=None, description="Hash for netdump authentication.") + info: Optional[StrictStr] = Field(default=None, description="Encrypted info for netdump authentication.") + enabled: Optional[StrictBool] = Field(default=None, description="Whether netdump is enabled.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash", "info", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceNetdumpState from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceNetdumpState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "info": obj.get("info"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_netdump_state_v1.py b/corellium/models/instance_netdump_state_v1.py new file mode 100644 index 0000000..5795fed --- /dev/null +++ b/corellium/models/instance_netdump_state_v1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceNetdumpStateV1(BaseModel): + """ + + """ # noqa: E501 + hash: Optional[StrictStr] = None + info: Optional[StrictStr] = None + enabled: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash", "info", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceNetdumpStateV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if hash (nullable) is None + # and model_fields_set contains the field + if self.hash is None and "hash" in self.model_fields_set: + _dict['hash'] = None + + # set to None if info (nullable) is None + # and model_fields_set contains the field + if self.info is None and "info" in self.model_fields_set: + _dict['info'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceNetdumpStateV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "info": obj.get("info"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_netmon_state.py b/corellium/models/instance_netmon_state.py new file mode 100644 index 0000000..681d817 --- /dev/null +++ b/corellium/models/instance_netmon_state.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceNetmonState(BaseModel): + """ + InstanceNetmonState + """ # noqa: E501 + hash: Optional[StrictStr] = Field(default=None, description="Hash for network monitor authentication.") + info: Optional[StrictStr] = Field(default=None, description="Encrypted info for network monitor authentication.") + enabled: Optional[StrictBool] = Field(default=None, description="Whether network monitoring is enabled.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash", "info", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceNetmonState from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceNetmonState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "info": obj.get("info"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_netmon_state_v1.py b/corellium/models/instance_netmon_state_v1.py new file mode 100644 index 0000000..5d303eb --- /dev/null +++ b/corellium/models/instance_netmon_state_v1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceNetmonStateV1(BaseModel): + """ + + """ # noqa: E501 + hash: Optional[StrictStr] = None + info: Optional[StrictStr] = None + enabled: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash", "info", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceNetmonStateV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if hash (nullable) is None + # and model_fields_set contains the field + if self.hash is None and "hash" in self.model_fields_set: + _dict['hash'] = None + + # set to None if info (nullable) is None + # and model_fields_set contains the field + if self.info is None and "info" in self.model_fields_set: + _dict['info'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceNetmonStateV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash"), + "info": obj.get("info"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_read_only_status.py b/corellium/models/instance_read_only_status.py new file mode 100644 index 0000000..4a1b498 --- /dev/null +++ b/corellium/models/instance_read_only_status.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceReadOnlyStatus(BaseModel): + """ + InstanceReadOnlyStatus + """ # noqa: E501 + read_only_status: StrictStr = Field(description="Overall progress of flipping read-only state.", alias="readOnlyStatus") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["readOnlyStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceReadOnlyStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceReadOnlyStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "readOnlyStatus": obj.get("readOnlyStatus") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_read_only_status_v1.py b/corellium/models/instance_read_only_status_v1.py new file mode 100644 index 0000000..2cf2a71 --- /dev/null +++ b/corellium/models/instance_read_only_status_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceReadOnlyStatusV1(BaseModel): + """ + + """ # noqa: E501 + read_only_status: Optional[StrictStr] = Field(default=None, description="Overall progress of flipping read-only state", alias="readOnlyStatus") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["readOnlyStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceReadOnlyStatusV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if read_only_status (nullable) is None + # and model_fields_set contains the field + if self.read_only_status is None and "read_only_status" in self.model_fields_set: + _dict['readOnlyStatus'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceReadOnlyStatusV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "readOnlyStatus": obj.get("readOnlyStatus") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_restore_status.py b/corellium/models/instance_restore_status.py new file mode 100644 index 0000000..56016e6 --- /dev/null +++ b/corellium/models/instance_restore_status.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceRestoreStatus(BaseModel): + """ + InstanceRestoreStatus + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Restore type: 0=Not Restore, 1=Restore, 2=CloneFromSnapshot.") + stage: Optional[StrictStr] = Field(default=None, description="Restore stage.") + progress: Optional[Any] = Field(default=None, description="Stage progress (0-100). Serialized as a string when non-zero; emitted as the number 0 at the start of a restore, and absent when no restore is in progress.") + total_progress: Optional[Any] = Field(default=None, description="Total restore progress (0-100). Serialized as a string when non-zero; emitted as the number 0 at the start of a restore, and absent when no restore is in progress.", alias="totalProgress") + heading: Optional[StrictStr] = Field(default=None, description="Current heading for progress modal.") + description: Optional[StrictStr] = Field(default=None, description="Current description for progress modal.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "stage", "progress", "totalProgress", "heading", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceRestoreStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if progress (nullable) is None + # and model_fields_set contains the field + if self.progress is None and "progress" in self.model_fields_set: + _dict['progress'] = None + + # set to None if total_progress (nullable) is None + # and model_fields_set contains the field + if self.total_progress is None and "total_progress" in self.model_fields_set: + _dict['totalProgress'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceRestoreStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "stage": obj.get("stage"), + "progress": obj.get("progress"), + "totalProgress": obj.get("totalProgress"), + "heading": obj.get("heading"), + "description": obj.get("description") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_restore_status_v1.py b/corellium/models/instance_restore_status_v1.py new file mode 100644 index 0000000..6053b97 --- /dev/null +++ b/corellium/models/instance_restore_status_v1.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class InstanceRestoreStatusV1(BaseModel): + """ + + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Restore type: 0=Not Restore, 1=Restore, 2=CloneFromSnapshot") + stage: Optional[StrictStr] = Field(default=None, description="Restore stage: download-images, prepare, boot, start, extracting, asr, flashing, done") + progress: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Stage progress (0-100)") + total_progress: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total restore progress (0-100)", alias="totalProgress") + heading: Optional[StrictStr] = Field(default=None, description="Current heading for progress modal") + description: Optional[StrictStr] = Field(default=None, description="Current description for progress modal") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "stage", "progress", "totalProgress", "heading", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceRestoreStatusV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if stage (nullable) is None + # and model_fields_set contains the field + if self.stage is None and "stage" in self.model_fields_set: + _dict['stage'] = None + + # set to None if progress (nullable) is None + # and model_fields_set contains the field + if self.progress is None and "progress" in self.model_fields_set: + _dict['progress'] = None + + # set to None if total_progress (nullable) is None + # and model_fields_set contains the field + if self.total_progress is None and "total_progress" in self.model_fields_set: + _dict['totalProgress'] = None + + # set to None if heading (nullable) is None + # and model_fields_set contains the field + if self.heading is None and "heading" in self.model_fields_set: + _dict['heading'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceRestoreStatusV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "stage": obj.get("stage"), + "progress": obj.get("progress"), + "totalProgress": obj.get("totalProgress"), + "heading": obj.get("heading"), + "description": obj.get("description") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_return.py b/corellium/models/instance_return.py new file mode 100644 index 0000000..245e818 --- /dev/null +++ b/corellium/models/instance_return.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.instance_state_v1 import InstanceStateV1 +from typing import Optional, Set +from typing_extensions import Self + +class InstanceReturn(BaseModel): + """ + + """ # noqa: E501 + id: StrictStr = Field(description="Instance ID") + state: InstanceStateV1 + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceReturn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceReturn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_services.py b/corellium/models/instance_services.py new file mode 100644 index 0000000..3d52086 --- /dev/null +++ b/corellium/models/instance_services.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.vpn_definition import VpnDefinition +from typing import Optional, Set +from typing_extensions import Self + +class InstanceServices(BaseModel): + """ + InstanceServices + """ # noqa: E501 + vpn: Optional[VpnDefinition] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vpn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceServices from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vpn + if self.vpn: + _dict['vpn'] = self.vpn.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceServices from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vpn": VpnDefinition.from_dict(obj["vpn"]) if obj.get("vpn") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_services_v1.py b/corellium/models/instance_services_v1.py new file mode 100644 index 0000000..da23eda --- /dev/null +++ b/corellium/models/instance_services_v1.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.vpn_definition_v1 import VpnDefinitionV1 +from typing import Optional, Set +from typing_extensions import Self + +class InstanceServicesV1(BaseModel): + """ + + """ # noqa: E501 + vpn: Optional[VpnDefinitionV1] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["vpn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceServicesV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of vpn + if self.vpn: + _dict['vpn'] = self.vpn.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceServicesV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vpn": VpnDefinitionV1.from_dict(obj["vpn"]) if obj.get("vpn") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_snapshots_list.py b/corellium/models/instance_snapshots_list.py new file mode 100644 index 0000000..20e0251 --- /dev/null +++ b/corellium/models/instance_snapshots_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.snapshot import Snapshot +from typing import Optional, Set +from typing_extensions import Self + +class InstanceSnapshotsList(BaseModel): + """ + InstanceSnapshotsList + """ # noqa: E501 + results: List[Snapshot] = Field(description="Instance snapshots.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceSnapshotsList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceSnapshotsList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Snapshot.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_start_options.py b/corellium/models/instance_start_options.py new file mode 100644 index 0000000..2842f73 --- /dev/null +++ b/corellium/models/instance_start_options.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceStartOptions(BaseModel): + """ + + """ # noqa: E501 + paused: Optional[StrictBool] = Field(default=None, description="Start device paused") + sockcap: Optional[StrictBool] = Field(default=None, description="Start device with Process Network Monitoring enabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["paused", "sockcap"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceStartOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if paused (nullable) is None + # and model_fields_set contains the field + if self.paused is None and "paused" in self.model_fields_set: + _dict['paused'] = None + + # set to None if sockcap (nullable) is None + # and model_fields_set contains the field + if self.sockcap is None and "sockcap" in self.model_fields_set: + _dict['sockcap'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceStartOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "paused": obj.get("paused"), + "sockcap": obj.get("sockcap") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_state.py b/corellium/models/instance_state.py new file mode 100644 index 0000000..04138b1 --- /dev/null +++ b/corellium/models/instance_state.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class InstanceState(str, Enum): + """ + What the device is doing right now. - `creating`: being built after `v3CreateInstance`. Not usable yet; poll until it changes. - `booting`: starting up. Wait for `on`. - `on`: running and usable. - `paused`: stopped mid-run and held in place; `v3UnpauseInstance` resumes it. - `rebooting`: restarting after `v3RebootInstance`. - `restoring`: being restored from a snapshot or backup. - `off`: shut down. `v3StartInstance` turns it on. - `deleting`: being removed after `v3DeleteInstance`. - `error`: something went wrong. See the instance's `error` field. + """ + + """ + allowed enum values + """ + ON = 'on' + OFF = 'off' + BOOTING = 'booting' + DELETING = 'deleting' + CREATING = 'creating' + RESTORING = 'restoring' + PAUSED = 'paused' + REBOOTING = 'rebooting' + ERROR = 'error' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/instance_state_v1.py b/corellium/models/instance_state_v1.py new file mode 100644 index 0000000..bc507c4 --- /dev/null +++ b/corellium/models/instance_state_v1.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class InstanceStateV1(str, Enum): + """ + Current Instance State + """ + + """ + allowed enum values + """ + ON = 'on' + OFF = 'off' + BOOTING = 'booting' + DELETING = 'deleting' + CREATING = 'creating' + RESTORING = 'restoring' + PAUSED = 'paused' + REBOOTING = 'rebooting' + ERROR = 'error' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InstanceStateV1 from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/instance_stop_options.py b/corellium/models/instance_stop_options.py new file mode 100644 index 0000000..6d466d3 --- /dev/null +++ b/corellium/models/instance_stop_options.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceStopOptions(BaseModel): + """ + + """ # noqa: E501 + soft: Optional[StrictBool] = Field(default=None, description="Request VM OS power down") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["soft"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceStopOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if soft (nullable) is None + # and model_fields_set contains the field + if self.soft is None and "soft" in self.model_fields_set: + _dict['soft'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceStopOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "soft": obj.get("soft") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_trace_filter.py b/corellium/models/instance_trace_filter.py new file mode 100644 index 0000000..c9edfe9 --- /dev/null +++ b/corellium/models/instance_trace_filter.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceTraceFilter(BaseModel): + """ + InstanceTraceFilter + """ # noqa: E501 + trait: StrictStr = Field(description="Trait to match, e.g. \"pid\".") + value: StrictStr = Field(description="Value the trait must equal.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["trait", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceTraceFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceTraceFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "trait": obj.get("trait"), + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_trace_state.py b/corellium/models/instance_trace_state.py new file mode 100644 index 0000000..551f878 --- /dev/null +++ b/corellium/models/instance_trace_state.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.instance_trace_filter import InstanceTraceFilter +from typing import Optional, Set +from typing_extensions import Self + +class InstanceTraceState(BaseModel): + """ + System call (strace) tracing state. + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether tracing is enabled.") + length: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Length of trace data.") + filter: Optional[List[InstanceTraceFilter]] = Field(default=None, description="Active trace filters matching traits to values.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "length", "filter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceTraceState from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in filter (list) + _items = [] + if self.filter: + for _item_filter in self.filter: + if _item_filter: + _items.append(_item_filter.to_dict()) + _dict['filter'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceTraceState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "length": obj.get("length"), + "filter": [InstanceTraceFilter.from_dict(_item) for _item in obj["filter"]] if obj.get("filter") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_trace_state_v1.py b/corellium/models/instance_trace_state_v1.py new file mode 100644 index 0000000..c98dc15 --- /dev/null +++ b/corellium/models/instance_trace_state_v1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class InstanceTraceStateV1(BaseModel): + """ + + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether tracing is enabled") + length: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Length of trace data") + filter: Optional[StrictStr] = Field(default=None, description="Trace filter expression") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "length", "filter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceTraceStateV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + # set to None if length (nullable) is None + # and model_fields_set contains the field + if self.length is None and "length" in self.model_fields_set: + _dict['length'] = None + + # set to None if filter (nullable) is None + # and model_fields_set contains the field + if self.filter is None and "filter" in self.model_fields_set: + _dict['filter'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceTraceStateV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "length": obj.get("length"), + "filter": obj.get("filter") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_uefi_bootloader.py b/corellium/models/instance_uefi_bootloader.py new file mode 100644 index 0000000..6003a01 --- /dev/null +++ b/corellium/models/instance_uefi_bootloader.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceUefiBootloader(BaseModel): + """ + UEFI bootloader descriptor, when the device uses one. + """ # noqa: E501 + label: StrictStr = Field(description="Human-readable label for the UEFI boot option.") + name: StrictStr = Field(description="UEFI bootloader file name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["label", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceUefiBootloader from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceUefiBootloader from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_upgrade_body.py b/corellium/models/instance_upgrade_body.py new file mode 100644 index 0000000..4c27eff --- /dev/null +++ b/corellium/models/instance_upgrade_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceUpgradeBody(BaseModel): + """ + InstanceUpgradeBody + """ # noqa: E501 + os_version: StrictStr = Field(description="iOS version to upgrade to, as listed by `GET /v3/models/{model}/software` for this device's model.", alias="osVersion") + os_build: Optional[StrictStr] = Field(default=None, description="Optional exact build of that version. Without it, the newest build of `osVersion` is used.", alias="osBuild") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["osVersion", "osBuild"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceUpgradeBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceUpgradeBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "osVersion": obj.get("osVersion"), + "osBuild": obj.get("osBuild") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_upgrade_body_v1.py b/corellium/models/instance_upgrade_body_v1.py new file mode 100644 index 0000000..b2763de --- /dev/null +++ b/corellium/models/instance_upgrade_body_v1.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstanceUpgradeBodyV1(BaseModel): + """ + + """ # noqa: E501 + os: StrictStr = Field(description="iOS version") + osbuild: Optional[StrictStr] = Field(default=None, description="(optional) iOS build ID") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["os", "osbuild"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceUpgradeBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if osbuild (nullable) is None + # and model_fields_set contains the field + if self.osbuild is None and "osbuild" in self.model_fields_set: + _dict['osbuild'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceUpgradeBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "os": obj.get("os"), + "osbuild": obj.get("osbuild") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_upgrade_response.py b/corellium/models/instance_upgrade_response.py new file mode 100644 index 0000000..f97227b --- /dev/null +++ b/corellium/models/instance_upgrade_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InstanceUpgradeResponse(BaseModel): + """ + InstanceUpgradeResponse + """ # noqa: E501 + id: StrictStr = Field(description="Instance ID.") + state: StrictStr = Field(description="Instance state. Always \"updating\" once an upgrade has been accepted.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['updating']): + raise ValueError("must be one of enum values ('updating')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceUpgradeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceUpgradeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "state": obj.get("state") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/instance_v1.py b/corellium/models/instance_v1.py new file mode 100644 index 0000000..6362a69 --- /dev/null +++ b/corellium/models/instance_v1.py @@ -0,0 +1,470 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.created_by import CreatedBy +from corellium.models.instance_agent_state_v1 import InstanceAgentStateV1 +from corellium.models.instance_boot_options_v1 import InstanceBootOptionsV1 +from corellium.models.instance_console_v1 import InstanceConsoleV1 +from corellium.models.instance_hyper_trace_state_v1 import InstanceHyperTraceStateV1 +from corellium.models.instance_netdump_state_v1 import InstanceNetdumpStateV1 +from corellium.models.instance_netmon_state_v1 import InstanceNetmonStateV1 +from corellium.models.instance_read_only_status_v1 import InstanceReadOnlyStatusV1 +from corellium.models.instance_restore_status_v1 import InstanceRestoreStatusV1 +from corellium.models.instance_services_v1 import InstanceServicesV1 +from corellium.models.instance_state_v1 import InstanceStateV1 +from corellium.models.instance_trace_state_v1 import InstanceTraceStateV1 +from typing import Optional, Set +from typing_extensions import Self + +class InstanceV1(BaseModel): + """ + + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Instance Identifier") + name: Optional[StrictStr] = Field(default=None, description="Instance Name") + key: Optional[StrictStr] = Field(default=None, description="Key used to encrypt the Instance") + flavor: Optional[StrictStr] = Field(default=None, description="The flavor identifier of this instance") + flavor_name: Optional[StrictStr] = Field(default=None, description="Human-readable flavor name", alias="flavorName") + type: Optional[StrictStr] = Field(default=None, description="Device type") + project: Optional[StrictStr] = Field(default=None, description="The projectId of the project this instance belongs to") + domain_name: Optional[StrictStr] = Field(default=None, description="Domain name associated with this instance's project", alias="domainName") + state: Optional[InstanceStateV1] = None + state_changed: Optional[datetime] = Field(default=None, description="Time the state of the instance last changed", alias="stateChanged") + started_at: Optional[datetime] = Field(default=None, description="Time the instance was started, NULL if currently SHUTOFF", alias="startedAt") + user_task: Optional[StrictStr] = Field(default=None, description="Currently executing User Task", alias="userTask") + task_state: Optional[StrictStr] = Field(default=None, description="Current task state if any", alias="taskState") + error: Optional[StrictStr] = Field(default=None, description="Current error state if any") + restore_status: Optional[InstanceRestoreStatusV1] = Field(default=None, alias="restoreStatus") + read_only: Optional[InstanceReadOnlyStatusV1] = Field(default=None, alias="readOnly") + boot_options: Optional[InstanceBootOptionsV1] = Field(default=None, alias="bootOptions") + service_ip: Optional[StrictStr] = Field(default=None, description="Services IP Address", alias="serviceIp") + wifi_ip: Optional[StrictStr] = Field(default=None, description="LAN IP Address", alias="wifiIp") + wifi_mac: Optional[StrictStr] = Field(default=None, description="WiFi MAC address", alias="wifiMac") + secondary_ip: Optional[StrictStr] = Field(default=None, description="Secondary Interface LAN IP Address (if supported)", alias="secondaryIp") + port_adb: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="ADB (Android Debug Bridge) port number", alias="port-adb") + port_usb: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="USB port number", alias="port-usb") + port_gdb: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="GDB (GNU Debugger) port number", alias="port-gdb") + port_sep_gdb: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="SEP GDB port number", alias="port-sep-gdb") + port_cons: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Default console port number", alias="port-cons") + port_sep_cons: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="SEP console port number", alias="port-sep-cons") + port_sys_cons: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="System console port number", alias="port-sys-cons") + port_usbmuxd: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="USBMuxD port number", alias="port-usbmuxd") + port_frida: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Frida instrumentation port number", alias="port-frida") + port_sockcap: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Socket capture port number", alias="port-sockcap") + port_model_gw: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Model gateway port number", alias="port-model-gw") + consoles: Optional[List[InstanceConsoleV1]] = Field(default=None, description="Available console connections") + services: Optional[InstanceServicesV1] = None + panicked: Optional[StrictBool] = None + created: Optional[datetime] = Field(default=None, description="Time instance was created") + model: Optional[StrictStr] = Field(default=None, description="Model of virtual machine device") + fwpackage: Optional[StrictStr] = Field(default=None, description="URL that package used to create this instance is available at") + os: Optional[StrictStr] = None + osbuild: Optional[StrictStr] = None + agent: Optional[InstanceAgentStateV1] = None + netmon: Optional[InstanceNetmonStateV1] = None + netdump: Optional[InstanceNetdumpStateV1] = None + core_trace: Optional[InstanceTraceStateV1] = Field(default=None, alias="coreTrace") + hyper_trace: Optional[InstanceHyperTraceStateV1] = Field(default=None, alias="hyperTrace") + expose_port: Optional[StrictStr] = Field(default=None, alias="exposePort") + fault: Optional[StrictBool] = None + patches: Optional[List[StrictStr]] = None + created_by: Optional[CreatedBy] = Field(default=None, alias="createdBy") + uefi_bootloader: Optional[StrictBool] = Field(default=None, description="Whether UEFI bootloader is in use", alias="uefiBootloader") + orientation: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Device orientation") + mast: Optional[StrictBool] = Field(default=None, description="Whether the device has a mast") + wan_access: Optional[StrictBool] = Field(default=None, description="Whether WAN access is enabled", alias="wanAccess") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "key", "flavor", "flavorName", "type", "project", "domainName", "state", "stateChanged", "startedAt", "userTask", "taskState", "error", "restoreStatus", "readOnly", "bootOptions", "serviceIp", "wifiIp", "wifiMac", "secondaryIp", "port-adb", "port-usb", "port-gdb", "port-sep-gdb", "port-cons", "port-sep-cons", "port-sys-cons", "port-usbmuxd", "port-frida", "port-sockcap", "port-model-gw", "consoles", "services", "panicked", "created", "model", "fwpackage", "os", "osbuild", "agent", "netmon", "netdump", "coreTrace", "hyperTrace", "exposePort", "fault", "patches", "createdBy", "uefiBootloader", "orientation", "mast", "wanAccess"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of restore_status + if self.restore_status: + _dict['restoreStatus'] = self.restore_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of read_only + if self.read_only: + _dict['readOnly'] = self.read_only.to_dict() + # override the default output from pydantic by calling `to_dict()` of boot_options + if self.boot_options: + _dict['bootOptions'] = self.boot_options.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in consoles (list) + _items = [] + if self.consoles: + for _item_consoles in self.consoles: + if _item_consoles: + _items.append(_item_consoles.to_dict()) + _dict['consoles'] = _items + # override the default output from pydantic by calling `to_dict()` of services + if self.services: + _dict['services'] = self.services.to_dict() + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + # override the default output from pydantic by calling `to_dict()` of netmon + if self.netmon: + _dict['netmon'] = self.netmon.to_dict() + # override the default output from pydantic by calling `to_dict()` of netdump + if self.netdump: + _dict['netdump'] = self.netdump.to_dict() + # override the default output from pydantic by calling `to_dict()` of core_trace + if self.core_trace: + _dict['coreTrace'] = self.core_trace.to_dict() + # override the default output from pydantic by calling `to_dict()` of hyper_trace + if self.hyper_trace: + _dict['hyperTrace'] = self.hyper_trace.to_dict() + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if key (nullable) is None + # and model_fields_set contains the field + if self.key is None and "key" in self.model_fields_set: + _dict['key'] = None + + # set to None if flavor (nullable) is None + # and model_fields_set contains the field + if self.flavor is None and "flavor" in self.model_fields_set: + _dict['flavor'] = None + + # set to None if flavor_name (nullable) is None + # and model_fields_set contains the field + if self.flavor_name is None and "flavor_name" in self.model_fields_set: + _dict['flavorName'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if domain_name (nullable) is None + # and model_fields_set contains the field + if self.domain_name is None and "domain_name" in self.model_fields_set: + _dict['domainName'] = None + + # set to None if state_changed (nullable) is None + # and model_fields_set contains the field + if self.state_changed is None and "state_changed" in self.model_fields_set: + _dict['stateChanged'] = None + + # set to None if started_at (nullable) is None + # and model_fields_set contains the field + if self.started_at is None and "started_at" in self.model_fields_set: + _dict['startedAt'] = None + + # set to None if user_task (nullable) is None + # and model_fields_set contains the field + if self.user_task is None and "user_task" in self.model_fields_set: + _dict['userTask'] = None + + # set to None if task_state (nullable) is None + # and model_fields_set contains the field + if self.task_state is None and "task_state" in self.model_fields_set: + _dict['taskState'] = None + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + # set to None if service_ip (nullable) is None + # and model_fields_set contains the field + if self.service_ip is None and "service_ip" in self.model_fields_set: + _dict['serviceIp'] = None + + # set to None if wifi_ip (nullable) is None + # and model_fields_set contains the field + if self.wifi_ip is None and "wifi_ip" in self.model_fields_set: + _dict['wifiIp'] = None + + # set to None if wifi_mac (nullable) is None + # and model_fields_set contains the field + if self.wifi_mac is None and "wifi_mac" in self.model_fields_set: + _dict['wifiMac'] = None + + # set to None if secondary_ip (nullable) is None + # and model_fields_set contains the field + if self.secondary_ip is None and "secondary_ip" in self.model_fields_set: + _dict['secondaryIp'] = None + + # set to None if port_adb (nullable) is None + # and model_fields_set contains the field + if self.port_adb is None and "port_adb" in self.model_fields_set: + _dict['port-adb'] = None + + # set to None if port_usb (nullable) is None + # and model_fields_set contains the field + if self.port_usb is None and "port_usb" in self.model_fields_set: + _dict['port-usb'] = None + + # set to None if port_gdb (nullable) is None + # and model_fields_set contains the field + if self.port_gdb is None and "port_gdb" in self.model_fields_set: + _dict['port-gdb'] = None + + # set to None if port_sep_gdb (nullable) is None + # and model_fields_set contains the field + if self.port_sep_gdb is None and "port_sep_gdb" in self.model_fields_set: + _dict['port-sep-gdb'] = None + + # set to None if port_cons (nullable) is None + # and model_fields_set contains the field + if self.port_cons is None and "port_cons" in self.model_fields_set: + _dict['port-cons'] = None + + # set to None if port_sep_cons (nullable) is None + # and model_fields_set contains the field + if self.port_sep_cons is None and "port_sep_cons" in self.model_fields_set: + _dict['port-sep-cons'] = None + + # set to None if port_sys_cons (nullable) is None + # and model_fields_set contains the field + if self.port_sys_cons is None and "port_sys_cons" in self.model_fields_set: + _dict['port-sys-cons'] = None + + # set to None if port_usbmuxd (nullable) is None + # and model_fields_set contains the field + if self.port_usbmuxd is None and "port_usbmuxd" in self.model_fields_set: + _dict['port-usbmuxd'] = None + + # set to None if port_frida (nullable) is None + # and model_fields_set contains the field + if self.port_frida is None and "port_frida" in self.model_fields_set: + _dict['port-frida'] = None + + # set to None if port_sockcap (nullable) is None + # and model_fields_set contains the field + if self.port_sockcap is None and "port_sockcap" in self.model_fields_set: + _dict['port-sockcap'] = None + + # set to None if port_model_gw (nullable) is None + # and model_fields_set contains the field + if self.port_model_gw is None and "port_model_gw" in self.model_fields_set: + _dict['port-model-gw'] = None + + # set to None if consoles (nullable) is None + # and model_fields_set contains the field + if self.consoles is None and "consoles" in self.model_fields_set: + _dict['consoles'] = None + + # set to None if panicked (nullable) is None + # and model_fields_set contains the field + if self.panicked is None and "panicked" in self.model_fields_set: + _dict['panicked'] = None + + # set to None if created (nullable) is None + # and model_fields_set contains the field + if self.created is None and "created" in self.model_fields_set: + _dict['created'] = None + + # set to None if model (nullable) is None + # and model_fields_set contains the field + if self.model is None and "model" in self.model_fields_set: + _dict['model'] = None + + # set to None if fwpackage (nullable) is None + # and model_fields_set contains the field + if self.fwpackage is None and "fwpackage" in self.model_fields_set: + _dict['fwpackage'] = None + + # set to None if os (nullable) is None + # and model_fields_set contains the field + if self.os is None and "os" in self.model_fields_set: + _dict['os'] = None + + # set to None if osbuild (nullable) is None + # and model_fields_set contains the field + if self.osbuild is None and "osbuild" in self.model_fields_set: + _dict['osbuild'] = None + + # set to None if agent (nullable) is None + # and model_fields_set contains the field + if self.agent is None and "agent" in self.model_fields_set: + _dict['agent'] = None + + # set to None if expose_port (nullable) is None + # and model_fields_set contains the field + if self.expose_port is None and "expose_port" in self.model_fields_set: + _dict['exposePort'] = None + + # set to None if fault (nullable) is None + # and model_fields_set contains the field + if self.fault is None and "fault" in self.model_fields_set: + _dict['fault'] = None + + # set to None if patches (nullable) is None + # and model_fields_set contains the field + if self.patches is None and "patches" in self.model_fields_set: + _dict['patches'] = None + + # set to None if uefi_bootloader (nullable) is None + # and model_fields_set contains the field + if self.uefi_bootloader is None and "uefi_bootloader" in self.model_fields_set: + _dict['uefiBootloader'] = None + + # set to None if orientation (nullable) is None + # and model_fields_set contains the field + if self.orientation is None and "orientation" in self.model_fields_set: + _dict['orientation'] = None + + # set to None if mast (nullable) is None + # and model_fields_set contains the field + if self.mast is None and "mast" in self.model_fields_set: + _dict['mast'] = None + + # set to None if wan_access (nullable) is None + # and model_fields_set contains the field + if self.wan_access is None and "wan_access" in self.model_fields_set: + _dict['wanAccess'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "key": obj.get("key"), + "flavor": obj.get("flavor"), + "flavorName": obj.get("flavorName"), + "type": obj.get("type"), + "project": obj.get("project"), + "domainName": obj.get("domainName"), + "state": obj.get("state"), + "stateChanged": obj.get("stateChanged"), + "startedAt": obj.get("startedAt"), + "userTask": obj.get("userTask"), + "taskState": obj.get("taskState"), + "error": obj.get("error"), + "restoreStatus": InstanceRestoreStatusV1.from_dict(obj["restoreStatus"]) if obj.get("restoreStatus") is not None else None, + "readOnly": InstanceReadOnlyStatusV1.from_dict(obj["readOnly"]) if obj.get("readOnly") is not None else None, + "bootOptions": InstanceBootOptionsV1.from_dict(obj["bootOptions"]) if obj.get("bootOptions") is not None else None, + "serviceIp": obj.get("serviceIp"), + "wifiIp": obj.get("wifiIp"), + "wifiMac": obj.get("wifiMac"), + "secondaryIp": obj.get("secondaryIp"), + "port-adb": obj.get("port-adb"), + "port-usb": obj.get("port-usb"), + "port-gdb": obj.get("port-gdb"), + "port-sep-gdb": obj.get("port-sep-gdb"), + "port-cons": obj.get("port-cons"), + "port-sep-cons": obj.get("port-sep-cons"), + "port-sys-cons": obj.get("port-sys-cons"), + "port-usbmuxd": obj.get("port-usbmuxd"), + "port-frida": obj.get("port-frida"), + "port-sockcap": obj.get("port-sockcap"), + "port-model-gw": obj.get("port-model-gw"), + "consoles": [InstanceConsoleV1.from_dict(_item) for _item in obj["consoles"]] if obj.get("consoles") is not None else None, + "services": InstanceServicesV1.from_dict(obj["services"]) if obj.get("services") is not None else None, + "panicked": obj.get("panicked"), + "created": obj.get("created"), + "model": obj.get("model"), + "fwpackage": obj.get("fwpackage"), + "os": obj.get("os"), + "osbuild": obj.get("osbuild"), + "agent": InstanceAgentStateV1.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "netmon": InstanceNetmonStateV1.from_dict(obj["netmon"]) if obj.get("netmon") is not None else None, + "netdump": InstanceNetdumpStateV1.from_dict(obj["netdump"]) if obj.get("netdump") is not None else None, + "coreTrace": InstanceTraceStateV1.from_dict(obj["coreTrace"]) if obj.get("coreTrace") is not None else None, + "hyperTrace": InstanceHyperTraceStateV1.from_dict(obj["hyperTrace"]) if obj.get("hyperTrace") is not None else None, + "exposePort": obj.get("exposePort"), + "fault": obj.get("fault"), + "patches": obj.get("patches"), + "createdBy": CreatedBy.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "uefiBootloader": obj.get("uefiBootloader"), + "orientation": obj.get("orientation"), + "mast": obj.get("mast"), + "wanAccess": obj.get("wanAccess") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/insufficient_storage_error.py b/corellium/models/insufficient_storage_error.py new file mode 100644 index 0000000..fa546e4 --- /dev/null +++ b/corellium/models/insufficient_storage_error.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class InsufficientStorageError(BaseModel): + """ + InsufficientStorageError + """ # noqa: E501 + error: StrictStr = Field(description="Error text.") + error_id: StrictStr = Field(description="Error ID.", alias="errorID") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Total storage capacity in bytes.") + available: Annotated[int, Field(strict=True, ge=0)] = Field(description="Available storage in bytes.") + required: Annotated[int, Field(strict=True, ge=0)] = Field(description="Storage required for the upload in bytes.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "total", "available", "required"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['InsufficientStorage']): + raise ValueError("must be one of enum values ('InsufficientStorage')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InsufficientStorageError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InsufficientStorageError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "total": obj.get("total"), + "available": obj.get("available"), + "required": obj.get("required") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/insufficient_storage_error_v1.py b/corellium/models/insufficient_storage_error_v1.py new file mode 100644 index 0000000..01c7a94 --- /dev/null +++ b/corellium/models/insufficient_storage_error_v1.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class InsufficientStorageErrorV1(BaseModel): + """ + + """ # noqa: E501 + error_id: Optional[StrictStr] = Field(default=None, description="Error identifier", alias="errorID") + error: Optional[StrictStr] = Field(default=None, description="Error message") + total: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total image pool capacity in bytes") + available: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Currently available image pool space in bytes") + required: Union[StrictFloat, StrictInt] = Field(description="Required space for the upload in bytes (from Content-Length)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["errorID", "error", "total", "available", "required"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InsufficientStorageErrorV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if error_id (nullable) is None + # and model_fields_set contains the field + if self.error_id is None and "error_id" in self.model_fields_set: + _dict['errorID'] = None + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict['total'] = None + + # set to None if available (nullable) is None + # and model_fields_set contains the field + if self.available is None and "available" in self.model_fields_set: + _dict['available'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InsufficientStorageErrorV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "errorID": obj.get("errorID"), + "error": obj.get("error"), + "total": obj.get("total"), + "available": obj.get("available"), + "required": obj.get("required") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/interconnect.py b/corellium/models/interconnect.py new file mode 100644 index 0000000..d2a4e40 --- /dev/null +++ b/corellium/models/interconnect.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.interfaces_schema_inner import InterfacesSchemaInner +from typing import Optional, Set +from typing_extensions import Self + +class Interconnect(BaseModel): + """ + Interconnect + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A name to recognise the interconnect by.") + type: StrictStr = Field(description="How the interconnect behaves: `hub` passes every signal to every connected interface; `switch` routes traffic between endpoints.") + project_id: StrictStr = Field(description="Project the interconnect belongs to. Every device listed in `interfaces` must be in this project, otherwise the request fails with 400. Cannot be changed later.", alias="projectId") + interfaces: List[InterfacesSchemaInner] + id: StrictStr = Field(description="The interconnect identifier.") + protocol: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The protocol used by the interconnect.") + status: StrictStr = Field(description="The current status of the interconnect.") + instance_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of unique instances connected to this interconnect.", alias="instanceCount") + created_at: datetime = Field(description="Creation timestamp.", alias="createdAt") + updated_at: datetime = Field(description="Last update timestamp.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "type", "projectId", "interfaces", "id", "protocol", "status", "instanceCount", "createdAt", "updatedAt"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['hub', 'switch']): + raise ValueError("must be one of enum values ('hub', 'switch')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['attached', 'detached', 'connected']): + raise ValueError("must be one of enum values ('attached', 'detached', 'connected')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Interconnect from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in interfaces (list) + _items = [] + if self.interfaces: + for _item_interfaces in self.interfaces: + if _item_interfaces: + _items.append(_item_interfaces.to_dict()) + _dict['interfaces'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Interconnect from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type"), + "projectId": obj.get("projectId"), + "interfaces": [InterfacesSchemaInner.from_dict(_item) for _item in obj["interfaces"]] if obj.get("interfaces") is not None else None, + "id": obj.get("id"), + "protocol": obj.get("protocol"), + "status": obj.get("status"), + "instanceCount": obj.get("instanceCount"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/interconnect_list.py b/corellium/models/interconnect_list.py new file mode 100644 index 0000000..2e6557d --- /dev/null +++ b/corellium/models/interconnect_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.interconnect import Interconnect +from typing import Optional, Set +from typing_extensions import Self + +class InterconnectList(BaseModel): + """ + InterconnectList + """ # noqa: E501 + results: List[Interconnect] = Field(description="Array of interconnects.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InterconnectList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InterconnectList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Interconnect.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/interconnect_protocol.py b/corellium/models/interconnect_protocol.py new file mode 100644 index 0000000..bbbda33 --- /dev/null +++ b/corellium/models/interconnect_protocol.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class InterconnectProtocol(str, Enum): + """ + Kind of signal the interconnect carries, for example `eth` for Ethernet. Choose the protocol that matches the interfaces you connect. Cannot be changed later. + """ + + """ + allowed enum values + """ + CAN = 'can' + UART = 'uart' + I2C = 'i2c' + SPI = 'spi' + GPIO = 'gpio' + USBH = 'usbh' + ETH = 'eth' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InterconnectProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/interconnect_response.py b/corellium/models/interconnect_response.py new file mode 100644 index 0000000..ede2559 --- /dev/null +++ b/corellium/models/interconnect_response.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.instance_interface import InstanceInterface +from typing import Optional, Set +from typing_extensions import Self + +class InterconnectResponse(BaseModel): + """ + + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The interconnect identifier") + name: Optional[StrictStr] = Field(default=None, description="The name of the interconnect") + protocol: Optional[StrictStr] = Field(default=None, description="The protocol used by the interconnect") + type: Optional[StrictStr] = Field(default=None, description="The type of interconnect") + project: Optional[StrictStr] = Field(default=None, description="The UUID of the project") + status: Optional[StrictStr] = Field(default=None, description="The current status of the interconnect") + interfaces: Optional[List[InstanceInterface]] = Field(default=None, description="Array of instance interfaces") + created_at: Optional[StrictStr] = Field(default=None, description="Creation timestamp", alias="createdAt") + updated_at: Optional[StrictStr] = Field(default=None, description="Last update timestamp", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "protocol", "type", "project", "status", "interfaces", "createdAt", "updatedAt"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['hub', 'switch']): + raise ValueError("must be one of enum values ('hub', 'switch')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InterconnectResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in interfaces (list) + _items = [] + if self.interfaces: + for _item_interfaces in self.interfaces: + if _item_interfaces: + _items.append(_item_interfaces.to_dict()) + _dict['interfaces'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if protocol (nullable) is None + # and model_fields_set contains the field + if self.protocol is None and "protocol" in self.model_fields_set: + _dict['protocol'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if interfaces (nullable) is None + # and model_fields_set contains the field + if self.interfaces is None and "interfaces" in self.model_fields_set: + _dict['interfaces'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InterconnectResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "protocol": obj.get("protocol"), + "type": obj.get("type"), + "project": obj.get("project"), + "status": obj.get("status"), + "interfaces": [InstanceInterface.from_dict(_item) for _item in obj["interfaces"]] if obj.get("interfaces") is not None else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/interfaces_schema_inner.py b/corellium/models/interfaces_schema_inner.py new file mode 100644 index 0000000..76deab5 --- /dev/null +++ b/corellium/models/interfaces_schema_inner.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class InterfacesSchemaInner(BaseModel): + """ + InterfacesSchemaInner + """ # noqa: E501 + device_id: StrictStr = Field(description="ID of the device (instance) whose interface to connect.", alias="deviceId") + interface_id: Annotated[str, Field(strict=True)] = Field(description="Which interface on that device, written `/` (for example `eth0:1/2` or `gpio/0`). The device model decides which interfaces exist.", alias="interfaceId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deviceId", "interfaceId"] + + @field_validator('interface_id') + def interface_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z0-9:]+\/[0-9]+$", value): + raise ValueError(r"must validate the regular expression /^[a-z0-9:]+\/[0-9]+$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InterfacesSchemaInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InterfacesSchemaInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deviceId": obj.get("deviceId"), + "interfaceId": obj.get("interfaceId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invalid_credentials_error.py b/corellium/models/invalid_credentials_error.py new file mode 100644 index 0000000..e42e766 --- /dev/null +++ b/corellium/models/invalid_credentials_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InvalidCredentialsError(BaseModel): + """ + InvalidCredentialsError + """ # noqa: E501 + error: StrictStr = Field(description="Error text.") + error_id: StrictStr = Field(description="Error ID.", alias="errorID") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['InvalidUsernameorPassword']): + raise ValueError("must be one of enum values ('InvalidUsernameorPassword')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InvalidCredentialsError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InvalidCredentialsError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invalid_totp_error.py b/corellium/models/invalid_totp_error.py new file mode 100644 index 0000000..4cc2e14 --- /dev/null +++ b/corellium/models/invalid_totp_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InvalidTOTPError(BaseModel): + """ + InvalidTOTPError + """ # noqa: E501 + error: StrictStr = Field(description="Error text.") + error_id: StrictStr = Field(description="Error ID.", alias="errorID") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['InvalidTOTP']): + raise ValueError("must be one of enum values ('InvalidTOTP')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InvalidTOTPError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InvalidTOTPError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invitation.py b/corellium/models/invitation.py new file mode 100644 index 0000000..d274a3b --- /dev/null +++ b/corellium/models/invitation.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.invite_settings import InviteSettings +from typing import Optional, Set +from typing_extensions import Self + +class Invitation(BaseModel): + """ + Invitation + """ # noqa: E501 + id: StrictStr = Field(description="Invite ID.") + email: StrictStr = Field(description="Invited email address.") + settings: InviteSettings + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "email", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Invitation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Invitation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "settings": InviteSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invitation_by_token.py b/corellium/models/invitation_by_token.py new file mode 100644 index 0000000..f9c520c --- /dev/null +++ b/corellium/models/invitation_by_token.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.invite_settings import InviteSettings +from typing import Optional, Set +from typing_extensions import Self + +class InvitationByToken(BaseModel): + """ + InvitationByToken + """ # noqa: E501 + id: StrictStr = Field(description="Invite ID.") + email: StrictStr = Field(description="Invited email address.") + domain: StrictStr = Field(description="Domain name.") + display_name: StrictStr = Field(description="Domain display name.", alias="displayName") + terms_agreement_required: StrictBool = Field(description="Whether the invitee must agree to terms.", alias="termsAgreementRequired") + settings: InviteSettings + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "email", "domain", "displayName", "termsAgreementRequired", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InvitationByToken from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InvitationByToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "domain": obj.get("domain"), + "displayName": obj.get("displayName"), + "termsAgreementRequired": obj.get("termsAgreementRequired"), + "settings": InviteSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invitation_v1.py b/corellium/models/invitation_v1.py new file mode 100644 index 0000000..6bccd1e --- /dev/null +++ b/corellium/models/invitation_v1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InvitationV1(BaseModel): + """ + + """ # noqa: E501 + identifier: Optional[StrictStr] = Field(default=None, description="Invite ID") + email: Optional[StrictStr] = Field(default=None, description="Invited email") + settings: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "email", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InvitationV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if settings (nullable) is None + # and model_fields_set contains the field + if self.settings is None and "settings" in self.model_fields_set: + _dict['settings'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InvitationV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "email": obj.get("email"), + "settings": obj.get("settings") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_created.py b/corellium/models/invite_created.py new file mode 100644 index 0000000..63a3f71 --- /dev/null +++ b/corellium/models/invite_created.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteCreated(BaseModel): + """ + + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Invite ID") + email: Optional[StrictStr] = Field(default=None, description="Invited email address") + settings: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "email", "settings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteCreated from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if settings (nullable) is None + # and model_fields_set contains the field + if self.settings is None and "settings" in self.model_fields_set: + _dict['settings'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteCreated from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "settings": obj.get("settings") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_created_entry.py b/corellium/models/invite_created_entry.py new file mode 100644 index 0000000..ce63a22 --- /dev/null +++ b/corellium/models/invite_created_entry.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.invite_created import InviteCreated +from typing import Optional, Set +from typing_extensions import Self + +class InviteCreatedEntry(BaseModel): + """ + + """ # noqa: E501 + invite: Optional[InviteCreated] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["invite"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteCreatedEntry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of invite + if self.invite: + _dict['invite'] = self.invite.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteCreatedEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "invite": InviteCreated.from_dict(obj["invite"]) if obj.get("invite") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_result.py b/corellium/models/invite_result.py new file mode 100644 index 0000000..3422747 --- /dev/null +++ b/corellium/models/invite_result.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.invitation import Invitation +from corellium.models.invite_result_error import InviteResultError +from typing import Optional, Set +from typing_extensions import Self + +class InviteResult(BaseModel): + """ + InviteResult + """ # noqa: E501 + invite: Optional[Invitation] = Field(default=None, description="The created invite, when successful.") + error: Optional[InviteResultError] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["invite", "error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of invite + if self.invite: + _dict['invite'] = self.invite.to_dict() + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "invite": Invitation.from_dict(obj["invite"]) if obj.get("invite") is not None else None, + "error": InviteResultError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_result_error.py b/corellium/models/invite_result_error.py new file mode 100644 index 0000000..c1815a4 --- /dev/null +++ b/corellium/models/invite_result_error.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InviteResultError(BaseModel): + """ + Error detail, when the invite failed. + """ # noqa: E501 + error: StrictStr = Field(description="Error text.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteResultError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteResultError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_revoke_params.py b/corellium/models/invite_revoke_params.py new file mode 100644 index 0000000..25bf5f5 --- /dev/null +++ b/corellium/models/invite_revoke_params.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteRevokeParams(BaseModel): + """ + + """ # noqa: E501 + ids: Optional[List[StrictStr]] = Field(default=None, description="Array of invite ids to revoke (a bare string id is also accepted by the server)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteRevokeParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if ids (nullable) is None + # and model_fields_set contains the field + if self.ids is None and "ids" in self.model_fields_set: + _dict['ids'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteRevokeParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ids": obj.get("ids") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_settings.py b/corellium/models/invite_settings.py new file mode 100644 index 0000000..78f8315 --- /dev/null +++ b/corellium/models/invite_settings.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class InviteSettings(BaseModel): + """ + Invite settings. + """ # noqa: E501 + teams: Optional[List[StrictStr]] = Field(default=None, description="Teams the new user is added to when they sign up, by team ID (from `GET /v3/teams`). IDs of teams not in your domain are dropped.") + projects: Optional[List[Annotated[List[StrictStr], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Projects the new user gets access to when they sign up, as `[projectId, role]` pairs. IDs of projects not in your domain are dropped.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["teams", "projects"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "teams": obj.get("teams"), + "projects": obj.get("projects") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_signup_body.py b/corellium/models/invite_signup_body.py new file mode 100644 index 0000000..af28b4d --- /dev/null +++ b/corellium/models/invite_signup_body.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.invite_signup_body_params import InviteSignupBodyParams +from typing import Optional, Set +from typing_extensions import Self + +class InviteSignupBody(BaseModel): + """ + InviteSignupBody + """ # noqa: E501 + invite_token: StrictStr = Field(description="Invite token from the invitation email.", alias="inviteToken") + params: InviteSignupBodyParams + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["inviteToken", "params"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteSignupBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of params + if self.params: + _dict['params'] = self.params.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteSignupBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inviteToken": obj.get("inviteToken"), + "params": InviteSignupBodyParams.from_dict(obj["params"]) if obj.get("params") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_signup_body_params.py b/corellium/models/invite_signup_body_params.py new file mode 100644 index 0000000..93d129b --- /dev/null +++ b/corellium/models/invite_signup_body_params.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteSignupBodyParams(BaseModel): + """ + New account parameters. + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="Account email.") + password: StrictStr = Field(description="Account password.") + label: StrictStr = Field(description="Account label.") + agreed: StrictBool = Field(description="Whether the invitee agreed to the terms of service.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "password", "label", "agreed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteSignupBodyParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteSignupBodyParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password"), + "label": obj.get("label"), + "agreed": obj.get("agreed") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invite_signup_response.py b/corellium/models/invite_signup_response.py new file mode 100644 index 0000000..0b4e336 --- /dev/null +++ b/corellium/models/invite_signup_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class InviteSignupResponse(BaseModel): + """ + InviteSignupResponse + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the newly created user.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InviteSignupResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InviteSignupResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/invites_list_response.py b/corellium/models/invites_list_response.py new file mode 100644 index 0000000..4d97ea0 --- /dev/null +++ b/corellium/models/invites_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.invitation import Invitation +from typing import Optional, Set +from typing_extensions import Self + +class InvitesListResponse(BaseModel): + """ + InvitesListResponse + """ # noqa: E501 + results: List[Invitation] = Field(description="Invitations.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InvitesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InvitesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Invitation.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ipsw_device_constraint.py b/corellium/models/ipsw_device_constraint.py new file mode 100644 index 0000000..d8ad78c --- /dev/null +++ b/corellium/models/ipsw_device_constraint.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IpswDeviceConstraint(BaseModel): + """ + + """ # noqa: E501 + product: Optional[StrictStr] = Field(default=None, description="Device product regex pattern (e.g. \"iPhone16,.*\")") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["product"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpswDeviceConstraint from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if product (nullable) is None + # and model_fields_set contains the field + if self.product is None and "product" in self.model_fields_set: + _dict['product'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpswDeviceConstraint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "product": obj.get("product") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ipsw_filter.py b/corellium/models/ipsw_filter.py new file mode 100644 index 0000000..0528f07 --- /dev/null +++ b/corellium/models/ipsw_filter.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.ipsw_device_constraint import IpswDeviceConstraint +from corellium.models.ipsw_version_constraint import IpswVersionConstraint +from typing import Optional, Set +from typing_extensions import Self + +class IpswFilter(BaseModel): + """ + + """ # noqa: E501 + version: Optional[IpswVersionConstraint] = None + device: Optional[IpswDeviceConstraint] = None + exclude: Optional[StrictBool] = Field(default=None, description="Exclude firmware matching this filter") + include: Optional[StrictBool] = Field(default=None, description="Include firmware matching this filter") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["version", "device", "exclude", "include"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpswFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of version + if self.version: + _dict['version'] = self.version.to_dict() + # override the default output from pydantic by calling `to_dict()` of device + if self.device: + _dict['device'] = self.device.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if exclude (nullable) is None + # and model_fields_set contains the field + if self.exclude is None and "exclude" in self.model_fields_set: + _dict['exclude'] = None + + # set to None if include (nullable) is None + # and model_fields_set contains the field + if self.include is None and "include" in self.model_fields_set: + _dict['include'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpswFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": IpswVersionConstraint.from_dict(obj["version"]) if obj.get("version") is not None else None, + "device": IpswDeviceConstraint.from_dict(obj["device"]) if obj.get("device") is not None else None, + "exclude": obj.get("exclude"), + "include": obj.get("include") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ipsw_filter_v3.py b/corellium/models/ipsw_filter_v3.py new file mode 100644 index 0000000..f4413b7 --- /dev/null +++ b/corellium/models/ipsw_filter_v3.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.ipsw_filter_v3_device import IpswFilterV3Device +from corellium.models.ipsw_filter_v3_version import IpswFilterV3Version +from typing import Optional, Set +from typing_extensions import Self + +class IpswFilterV3(BaseModel): + """ + IpswFilterV3 + """ # noqa: E501 + version: Optional[IpswFilterV3Version] = None + device: Optional[IpswFilterV3Device] = None + exclude: Optional[StrictBool] = Field(default=None, description="Exclude firmware matching this filter.") + include: Optional[StrictBool] = Field(default=None, description="Include firmware matching this filter.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["version", "device", "exclude", "include"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpswFilterV3 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of version + if self.version: + _dict['version'] = self.version.to_dict() + # override the default output from pydantic by calling `to_dict()` of device + if self.device: + _dict['device'] = self.device.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if version (nullable) is None + # and model_fields_set contains the field + if self.version is None and "version" in self.model_fields_set: + _dict['version'] = None + + # set to None if device (nullable) is None + # and model_fields_set contains the field + if self.device is None and "device" in self.model_fields_set: + _dict['device'] = None + + # set to None if exclude (nullable) is None + # and model_fields_set contains the field + if self.exclude is None and "exclude" in self.model_fields_set: + _dict['exclude'] = None + + # set to None if include (nullable) is None + # and model_fields_set contains the field + if self.include is None and "include" in self.model_fields_set: + _dict['include'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpswFilterV3 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": IpswFilterV3Version.from_dict(obj["version"]) if obj.get("version") is not None else None, + "device": IpswFilterV3Device.from_dict(obj["device"]) if obj.get("device") is not None else None, + "exclude": obj.get("exclude"), + "include": obj.get("include") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ipsw_filter_v3_device.py b/corellium/models/ipsw_filter_v3_device.py new file mode 100644 index 0000000..3dfde34 --- /dev/null +++ b/corellium/models/ipsw_filter_v3_device.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IpswFilterV3Device(BaseModel): + """ + Device constraint. + """ # noqa: E501 + product: Optional[StrictStr] = Field(default=None, description="Device product regex pattern (e.g. \"iPhone16,.*\").") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["product"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpswFilterV3Device from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if product (nullable) is None + # and model_fields_set contains the field + if self.product is None and "product" in self.model_fields_set: + _dict['product'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpswFilterV3Device from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "product": obj.get("product") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ipsw_filter_v3_version.py b/corellium/models/ipsw_filter_v3_version.py new file mode 100644 index 0000000..3d23093 --- /dev/null +++ b/corellium/models/ipsw_filter_v3_version.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IpswFilterV3Version(BaseModel): + """ + Version constraint. + """ # noqa: E501 + lt: Optional[StrictStr] = Field(default=None, description="Version less-than bound (exclusive).") + le: Optional[StrictStr] = Field(default=None, description="Version less-than-or-equal bound (inclusive).") + gt: Optional[StrictStr] = Field(default=None, description="Version greater-than bound (exclusive).") + ge: Optional[StrictStr] = Field(default=None, description="Version greater-than-or-equal bound (inclusive).") + eq: Optional[StrictStr] = Field(default=None, description="Exact version match.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["lt", "le", "gt", "ge", "eq"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpswFilterV3Version from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if lt (nullable) is None + # and model_fields_set contains the field + if self.lt is None and "lt" in self.model_fields_set: + _dict['lt'] = None + + # set to None if le (nullable) is None + # and model_fields_set contains the field + if self.le is None and "le" in self.model_fields_set: + _dict['le'] = None + + # set to None if gt (nullable) is None + # and model_fields_set contains the field + if self.gt is None and "gt" in self.model_fields_set: + _dict['gt'] = None + + # set to None if ge (nullable) is None + # and model_fields_set contains the field + if self.ge is None and "ge" in self.model_fields_set: + _dict['ge'] = None + + # set to None if eq (nullable) is None + # and model_fields_set contains the field + if self.eq is None and "eq" in self.model_fields_set: + _dict['eq'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpswFilterV3Version from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lt": obj.get("lt"), + "le": obj.get("le"), + "gt": obj.get("gt"), + "ge": obj.get("ge"), + "eq": obj.get("eq") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ipsw_version_constraint.py b/corellium/models/ipsw_version_constraint.py new file mode 100644 index 0000000..9099919 --- /dev/null +++ b/corellium/models/ipsw_version_constraint.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IpswVersionConstraint(BaseModel): + """ + + """ # noqa: E501 + lt: Optional[StrictStr] = Field(default=None, description="Version less-than bound (exclusive)") + le: Optional[StrictStr] = Field(default=None, description="Version less-than-or-equal bound (inclusive)") + gt: Optional[StrictStr] = Field(default=None, description="Version greater-than bound (exclusive)") + ge: Optional[StrictStr] = Field(default=None, description="Version greater-than-or-equal bound (inclusive)") + eq: Optional[StrictStr] = Field(default=None, description="Exact version match") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["lt", "le", "gt", "ge", "eq"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IpswVersionConstraint from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if lt (nullable) is None + # and model_fields_set contains the field + if self.lt is None and "lt" in self.model_fields_set: + _dict['lt'] = None + + # set to None if le (nullable) is None + # and model_fields_set contains the field + if self.le is None and "le" in self.model_fields_set: + _dict['le'] = None + + # set to None if gt (nullable) is None + # and model_fields_set contains the field + if self.gt is None and "gt" in self.model_fields_set: + _dict['gt'] = None + + # set to None if ge (nullable) is None + # and model_fields_set contains the field + if self.ge is None and "ge" in self.model_fields_set: + _dict['ge'] = None + + # set to None if eq (nullable) is None + # and model_fields_set contains the field + if self.eq is None and "eq" in self.model_fields_set: + _dict['eq'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IpswVersionConstraint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "lt": obj.get("lt"), + "le": obj.get("le"), + "gt": obj.get("gt"), + "ge": obj.get("ge"), + "eq": obj.get("eq") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/kcrange.py b/corellium/models/kcrange.py new file mode 100644 index 0000000..014f28a --- /dev/null +++ b/corellium/models/kcrange.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class Kcrange(BaseModel): + """ + Kcrange + """ # noqa: E501 + kernel_extension: StrictStr = Field(description="Kernel extension.", alias="kernelExtension") + range: Annotated[List[StrictStr], Field(min_length=2, max_length=2)] = Field(description="Start and end address of the kernel extension range.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kernelExtension", "range"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Kcrange from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Kcrange from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kernelExtension": obj.get("kernelExtension"), + "range": obj.get("range") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/kcrange_v1.py b/corellium/models/kcrange_v1.py new file mode 100644 index 0000000..ace9a9a --- /dev/null +++ b/corellium/models/kcrange_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KcrangeV1(BaseModel): + """ + + """ # noqa: E501 + kext: Optional[StrictStr] = Field(default=None, description="Kernel Extension") + range: Optional[List[StrictStr]] = Field(default=None, description="Range") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kext", "range"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KcrangeV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if kext (nullable) is None + # and model_fields_set contains the field + if self.kext is None and "kext" in self.model_fields_set: + _dict['kext'] = None + + # set to None if range (nullable) is None + # and model_fields_set contains the field + if self.range is None and "range" in self.model_fields_set: + _dict['range'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KcrangeV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kext": obj.get("kext"), + "range": obj.get("range") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/kernel_task.py b/corellium/models/kernel_task.py new file mode 100644 index 0000000..de167bb --- /dev/null +++ b/corellium/models/kernel_task.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from corellium.models.kernel_thread import KernelThread +from typing import Optional, Set +from typing_extensions import Self + +class KernelTask(BaseModel): + """ + KernelTask + """ # noqa: E501 + kernel_id: StrictStr = Field(description="Kernel task ID (uint64_t).", alias="kernelId") + name: StrictStr = Field(description="Thread name.") + process_id: StrictInt = Field(description="Process ID of task.", alias="processId") + threads: List[KernelThread] = Field(description="Threads belonging to this task.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kernelId", "name", "processId", "threads"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KernelTask from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in threads (list) + _items = [] + if self.threads: + for _item_threads in self.threads: + if _item_threads: + _items.append(_item_threads.to_dict()) + _dict['threads'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KernelTask from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kernelId": obj.get("kernelId"), + "name": obj.get("name"), + "processId": obj.get("processId"), + "threads": [KernelThread.from_dict(_item) for _item in obj["threads"]] if obj.get("threads") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/kernel_task_v1.py b/corellium/models/kernel_task_v1.py new file mode 100644 index 0000000..049583d --- /dev/null +++ b/corellium/models/kernel_task_v1.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.kernel_thread_v1 import KernelThreadV1 +from typing import Optional, Set +from typing_extensions import Self + +class KernelTaskV1(BaseModel): + """ + + """ # noqa: E501 + kernel_id: Optional[StrictStr] = Field(default=None, description="Kernel Task ID", alias="kernelId") + name: Optional[StrictStr] = Field(default=None, description="Thread name") + pid: Optional[StrictInt] = Field(default=None, description="Process ID of task") + threads: Optional[List[KernelThreadV1]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kernelId", "name", "pid", "threads"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KernelTaskV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in threads (list) + _items = [] + if self.threads: + for _item_threads in self.threads: + if _item_threads: + _items.append(_item_threads.to_dict()) + _dict['threads'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if kernel_id (nullable) is None + # and model_fields_set contains the field + if self.kernel_id is None and "kernel_id" in self.model_fields_set: + _dict['kernelId'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if pid (nullable) is None + # and model_fields_set contains the field + if self.pid is None and "pid" in self.model_fields_set: + _dict['pid'] = None + + # set to None if threads (nullable) is None + # and model_fields_set contains the field + if self.threads is None and "threads" in self.model_fields_set: + _dict['threads'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KernelTaskV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kernelId": obj.get("kernelId"), + "name": obj.get("name"), + "pid": obj.get("pid"), + "threads": [KernelThreadV1.from_dict(_item) for _item in obj["threads"]] if obj.get("threads") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/kernel_thread.py b/corellium/models/kernel_thread.py new file mode 100644 index 0000000..c89b16f --- /dev/null +++ b/corellium/models/kernel_thread.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class KernelThread(BaseModel): + """ + KernelThread + """ # noqa: E501 + kernel_id: StrictStr = Field(description="Kernel thread ID (uint64_t).", alias="kernelId") + task_id: StrictInt = Field(description="Task ID.", alias="taskId") + stack: List[StrictStr] = Field(description="Array of stack addresses.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kernelId", "taskId", "stack"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KernelThread from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KernelThread from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kernelId": obj.get("kernelId"), + "taskId": obj.get("taskId"), + "stack": obj.get("stack") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/kernel_thread_v1.py b/corellium/models/kernel_thread_v1.py new file mode 100644 index 0000000..dec4837 --- /dev/null +++ b/corellium/models/kernel_thread_v1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class KernelThreadV1(BaseModel): + """ + + """ # noqa: E501 + kernel_id: Optional[StrictStr] = Field(default=None, description="Kernel Thread ID", alias="kernelId") + tid: Optional[StrictInt] = Field(default=None, description="Task ID") + stack: Optional[List[StrictStr]] = Field(default=None, description="Array of stack addresses") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kernelId", "tid", "stack"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KernelThreadV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if kernel_id (nullable) is None + # and model_fields_set contains the field + if self.kernel_id is None and "kernel_id" in self.model_fields_set: + _dict['kernelId'] = None + + # set to None if tid (nullable) is None + # and model_fields_set contains the field + if self.tid is None and "tid" in self.model_fields_set: + _dict['tid'] = None + + # set to None if stack (nullable) is None + # and model_fields_set contains the field + if self.stack is None and "stack" in self.model_fields_set: + _dict['stack'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KernelThreadV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kernelId": obj.get("kernelId"), + "tid": obj.get("tid"), + "stack": obj.get("stack") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/layout_schema.py b/corellium/models/layout_schema.py new file mode 100644 index 0000000..d351bd2 --- /dev/null +++ b/corellium/models/layout_schema.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class LayoutSchema(BaseModel): + """ + Resource layout for this node. + """ # noqa: E501 + free_cpus: Optional[Any] = Field(default=None, description="Free CPU list.", alias="freeCpus") + free_ram: Optional[Any] = Field(default=None, description="Free RAM.", alias="freeRam") + free_ranges: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Free address ranges.", alias="freeRanges") + numa_nodes: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Number of NUMA nodes.", alias="numaNodes") + ram_cpu: Optional[StrictStr] = Field(default='0', description="RAM per CPU.", alias="ramCpu") + node_map: Optional[Any] = Field(default=None, description="Node map.", alias="nodeMap") + free_cores: Optional[Any] = Field(default=None, description="Free cores list.", alias="freeCores") + ram_core: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="RAM per core in MiB.", alias="ramCore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["freeCpus", "freeRam", "freeRanges", "numaNodes", "ramCpu", "nodeMap", "freeCores", "ramCore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LayoutSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if free_cpus (nullable) is None + # and model_fields_set contains the field + if self.free_cpus is None and "free_cpus" in self.model_fields_set: + _dict['freeCpus'] = None + + # set to None if free_ram (nullable) is None + # and model_fields_set contains the field + if self.free_ram is None and "free_ram" in self.model_fields_set: + _dict['freeRam'] = None + + # set to None if node_map (nullable) is None + # and model_fields_set contains the field + if self.node_map is None and "node_map" in self.model_fields_set: + _dict['nodeMap'] = None + + # set to None if free_cores (nullable) is None + # and model_fields_set contains the field + if self.free_cores is None and "free_cores" in self.model_fields_set: + _dict['freeCores'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LayoutSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "freeCpus": obj.get("freeCpus"), + "freeRam": obj.get("freeRam"), + "freeRanges": obj.get("freeRanges") if obj.get("freeRanges") is not None else 0, + "numaNodes": obj.get("numaNodes") if obj.get("numaNodes") is not None else 0, + "ramCpu": obj.get("ramCpu") if obj.get("ramCpu") is not None else '0', + "nodeMap": obj.get("nodeMap"), + "freeCores": obj.get("freeCores"), + "ramCore": obj.get("ramCore") if obj.get("ramCore") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ldap_authentication_credentials.py b/corellium/models/ldap_authentication_credentials.py new file mode 100644 index 0000000..010d401 --- /dev/null +++ b/corellium/models/ldap_authentication_credentials.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class LdapAuthenticationCredentials(BaseModel): + """ + LdapAuthenticationCredentials + """ # noqa: E501 + bind_dn: StrictStr = Field(description="Bind DN used to authenticate to the LDAP server.", alias="bindDn") + bind_password: StrictStr = Field(description="Bind password.", alias="bindPassword") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bindDn", "bindPassword"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LdapAuthenticationCredentials from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LdapAuthenticationCredentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bindDn": obj.get("bindDn"), + "bindPassword": obj.get("bindPassword") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ldap_config.py b/corellium/models/ldap_config.py new file mode 100644 index 0000000..e3d1c45 --- /dev/null +++ b/corellium/models/ldap_config.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.ldap_authentication_credentials import LdapAuthenticationCredentials +from corellium.models.ldap_group_search_configuration import LdapGroupSearchConfiguration +from corellium.models.ldap_server_connection_details import LdapServerConnectionDetails +from corellium.models.ldap_user_attribute_mapping import LdapUserAttributeMapping +from corellium.models.ldap_user_search_configuration import LdapUserSearchConfiguration +from typing import Optional, Set +from typing_extensions import Self + +class LDAPConfig(BaseModel): + """ + LDAP provider configuration. + """ # noqa: E501 + server_connection_details: LdapServerConnectionDetails = Field(alias="serverConnectionDetails") + authentication_credentials: LdapAuthenticationCredentials = Field(alias="authenticationCredentials") + user_search_configuration: LdapUserSearchConfiguration = Field(alias="userSearchConfiguration") + user_attribute_mapping: Optional[LdapUserAttributeMapping] = Field(default=None, alias="userAttributeMapping") + group_search_configuration: Optional[List[LdapGroupSearchConfiguration]] = Field(default=None, alias="groupSearchConfiguration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["serverConnectionDetails", "authenticationCredentials", "userSearchConfiguration", "userAttributeMapping", "groupSearchConfiguration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LDAPConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of server_connection_details + if self.server_connection_details: + _dict['serverConnectionDetails'] = self.server_connection_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of authentication_credentials + if self.authentication_credentials: + _dict['authenticationCredentials'] = self.authentication_credentials.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_search_configuration + if self.user_search_configuration: + _dict['userSearchConfiguration'] = self.user_search_configuration.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_attribute_mapping + if self.user_attribute_mapping: + _dict['userAttributeMapping'] = self.user_attribute_mapping.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in group_search_configuration (list) + _items = [] + if self.group_search_configuration: + for _item_group_search_configuration in self.group_search_configuration: + if _item_group_search_configuration: + _items.append(_item_group_search_configuration.to_dict()) + _dict['groupSearchConfiguration'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LDAPConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "serverConnectionDetails": LdapServerConnectionDetails.from_dict(obj["serverConnectionDetails"]) if obj.get("serverConnectionDetails") is not None else None, + "authenticationCredentials": LdapAuthenticationCredentials.from_dict(obj["authenticationCredentials"]) if obj.get("authenticationCredentials") is not None else None, + "userSearchConfiguration": LdapUserSearchConfiguration.from_dict(obj["userSearchConfiguration"]) if obj.get("userSearchConfiguration") is not None else None, + "userAttributeMapping": LdapUserAttributeMapping.from_dict(obj["userAttributeMapping"]) if obj.get("userAttributeMapping") is not None else None, + "groupSearchConfiguration": [LdapGroupSearchConfiguration.from_dict(_item) for _item in obj["groupSearchConfiguration"]] if obj.get("groupSearchConfiguration") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ldap_group_search_configuration.py b/corellium/models/ldap_group_search_configuration.py new file mode 100644 index 0000000..1ac3b03 --- /dev/null +++ b/corellium/models/ldap_group_search_configuration.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LdapGroupSearchConfiguration(BaseModel): + """ + LdapGroupSearchConfiguration + """ # noqa: E501 + group_base_dn: StrictStr = Field(description="Base DN for group search.", alias="groupBaseDn") + group_search_filter: Optional[StrictStr] = Field(default=None, description="Filter used to locate groups.", alias="groupSearchFilter") + team_id: StrictStr = Field(description="Corellium team the group maps to.", alias="teamId") + role: Optional[StrictStr] = Field(default=None, description="Role granted to members of the group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["groupBaseDn", "groupSearchFilter", "teamId", "role"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LdapGroupSearchConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LdapGroupSearchConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "groupBaseDn": obj.get("groupBaseDn"), + "groupSearchFilter": obj.get("groupSearchFilter"), + "teamId": obj.get("teamId"), + "role": obj.get("role") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ldap_server_connection_details.py b/corellium/models/ldap_server_connection_details.py new file mode 100644 index 0000000..c9674d8 --- /dev/null +++ b/corellium/models/ldap_server_connection_details.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LdapServerConnectionDetails(BaseModel): + """ + LdapServerConnectionDetails + """ # noqa: E501 + server_url: StrictStr = Field(description="LDAP server URL.", alias="serverUrl") + port: Optional[StrictStr] = Field(default=None, description="LDAP server port.") + connection_timeout: Optional[StrictStr] = Field(default=None, description="Connection timeout.", alias="connectionTimeout") + enable_ldaps: Optional[StrictBool] = Field(default=None, description="Whether to connect over LDAPS.", alias="enableLdaps") + ca_cert: Optional[StrictStr] = Field(default=None, description="CA certificate for LDAPS.", alias="caCert") + ca_verify: Optional[StrictBool] = Field(default=None, description="Whether to verify the server certificate.", alias="caVerify") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["serverUrl", "port", "connectionTimeout", "enableLdaps", "caCert", "caVerify"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LdapServerConnectionDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LdapServerConnectionDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "serverUrl": obj.get("serverUrl"), + "port": obj.get("port"), + "connectionTimeout": obj.get("connectionTimeout"), + "enableLdaps": obj.get("enableLdaps"), + "caCert": obj.get("caCert"), + "caVerify": obj.get("caVerify") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ldap_user_attribute_mapping.py b/corellium/models/ldap_user_attribute_mapping.py new file mode 100644 index 0000000..90c10fc --- /dev/null +++ b/corellium/models/ldap_user_attribute_mapping.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LdapUserAttributeMapping(BaseModel): + """ + LdapUserAttributeMapping + """ # noqa: E501 + username_attribute: Optional[StrictStr] = Field(default=None, description="LDAP attribute mapped to username.", alias="usernameAttribute") + email_attribute: Optional[StrictStr] = Field(default=None, description="LDAP attribute mapped to email.", alias="emailAttribute") + first_name_attribute: Optional[StrictStr] = Field(default=None, description="LDAP attribute mapped to first name.", alias="firstNameAttribute") + last_name_attribute: Optional[StrictStr] = Field(default=None, description="LDAP attribute mapped to last name.", alias="lastNameAttribute") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["usernameAttribute", "emailAttribute", "firstNameAttribute", "lastNameAttribute"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LdapUserAttributeMapping from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LdapUserAttributeMapping from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "usernameAttribute": obj.get("usernameAttribute"), + "emailAttribute": obj.get("emailAttribute"), + "firstNameAttribute": obj.get("firstNameAttribute"), + "lastNameAttribute": obj.get("lastNameAttribute") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/ldap_user_search_configuration.py b/corellium/models/ldap_user_search_configuration.py new file mode 100644 index 0000000..639d1cb --- /dev/null +++ b/corellium/models/ldap_user_search_configuration.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LdapUserSearchConfiguration(BaseModel): + """ + LdapUserSearchConfiguration + """ # noqa: E501 + base_dn: StrictStr = Field(description="Base DN for user search.", alias="baseDn") + user_search_base: Optional[StrictStr] = Field(default=None, description="Sub-tree to search for users.", alias="userSearchBase") + user_search_filter: Optional[StrictStr] = Field(default=None, description="Filter used to locate users.", alias="userSearchFilter") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["baseDn", "userSearchBase", "userSearchFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LdapUserSearchConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LdapUserSearchConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "baseDn": obj.get("baseDn"), + "userSearchBase": obj.get("userSearchBase"), + "userSearchFilter": obj.get("userSearchFilter") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/load_extension_body.py b/corellium/models/load_extension_body.py new file mode 100644 index 0000000..09637ad --- /dev/null +++ b/corellium/models/load_extension_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class LoadExtensionBody(BaseModel): + """ + LoadExtensionBody + """ # noqa: E501 + image_id: StrictStr = Field(description="ID of the extension file you uploaded with `POST /v3/images` using `type: \"extension\"`.", alias="imageId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoadExtensionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoadExtensionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/logging.py b/corellium/models/logging.py new file mode 100644 index 0000000..af7a370 --- /dev/null +++ b/corellium/models/logging.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Logging(BaseModel): + """ + Info for logging. + """ # noqa: E501 + development: StrictBool = Field(description="Denotes whether it's in development.") + throw_warnings: StrictBool = Field(description="Denotes whether to throw warnings.", alias="throwWarnings") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["development", "throwWarnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Logging from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Logging from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "development": obj.get("development"), + "throwWarnings": obj.get("throwWarnings") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/logging_v1.py b/corellium/models/logging_v1.py new file mode 100644 index 0000000..dedb0c7 --- /dev/null +++ b/corellium/models/logging_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LoggingV1(BaseModel): + """ + + """ # noqa: E501 + development: Optional[StrictBool] = Field(default=None, description="Denotes whether it's in development") + throw_warnings: Optional[StrictBool] = Field(default=None, description="Denotes whether to throw warnings", alias="throwWarnings") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["development", "throwWarnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoggingV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if development (nullable) is None + # and model_fields_set contains the field + if self.development is None and "development" in self.model_fields_set: + _dict['development'] = None + + # set to None if throw_warnings (nullable) is None + # and model_fields_set contains the field + if self.throw_warnings is None and "throw_warnings" in self.model_fields_set: + _dict['throwWarnings'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoggingV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "development": obj.get("development"), + "throwWarnings": obj.get("throwWarnings") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_body.py b/corellium/models/login_body.py new file mode 100644 index 0000000..ac11288 --- /dev/null +++ b/corellium/models/login_body.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LoginBody(BaseModel): + """ + LoginBody + """ # noqa: E501 + username: Optional[StrictStr] = Field(default=None, description="Account username. Send together with `password`.") + password: Optional[StrictStr] = Field(default=None, description="Account password. Send together with `username`.") + totp_token: Optional[StrictStr] = Field(default=None, description="One-time TOTP code. Required only when the account has two-factor authentication enabled, sent alongside `username`/`password`.", alias="totpToken") + api_token: Optional[StrictStr] = Field(default=None, description="Persistent API key, used as an alternative to username/password for programmatic access. Created by the user (in the web UI or via `POST /v3/auth/apitoken`) rather than issued by login, and sent back verbatim as an opaque string. Also accepted directly in the `Authorization: Bearer` header, and is the value the CLI stores as `--token`. Never returned by this endpoint, and distinct from the session `token`.", alias="apiToken") + token: Optional[StrictStr] = Field(default=None, description="An existing session token to renew. This is the signed JWT bearer token previously returned by login. Login always issues a newly-regenerated session token in the response; the supplied token is neither echoed back nor invalidated. Distinct from `apiToken`.") + revoke_old: Optional[StrictBool] = Field(default=None, description="Revoke previously issued tokens on success.", alias="revokeOld") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "password", "totpToken", "apiToken", "token", "revokeOld"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password"), + "totpToken": obj.get("totpToken"), + "apiToken": obj.get("apiToken"), + "token": obj.get("token"), + "revokeOld": obj.get("revokeOld") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result.py b/corellium/models/login_result.py new file mode 100644 index 0000000..a0bf911 --- /dev/null +++ b/corellium/models/login_result.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.login_result_disabled import LoginResultDisabled +from corellium.models.login_result_domain import LoginResultDomain +from corellium.models.login_result_user import LoginResultUser +from typing import Optional, Set +from typing_extensions import Self + +class LoginResult(BaseModel): + """ + LoginResult + """ # noqa: E501 + token: StrictStr = Field(description="Signed JWT bearer session token, newly regenerated on every successful login.") + expiration: datetime = Field(description="Token expiration timestamp.") + user: Optional[LoginResultUser] = None + domain: Optional[LoginResultDomain] = None + time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Server time when the session was issued, in milliseconds.") + identifier: Optional[StrictStr] = Field(default=None, description="Webplayer session identifier. Present only on a Webplayer token renewal.") + disabled: Optional[LoginResultDisabled] = None + missing_totp: Optional[StrictBool] = Field(default=None, description="Present when the domain requires TOTP but the user has not enrolled.", alias="missingTOTP") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token", "expiration", "user", "domain", "time", "identifier", "disabled", "missingTOTP"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + # override the default output from pydantic by calling `to_dict()` of domain + if self.domain: + _dict['domain'] = self.domain.to_dict() + # override the default output from pydantic by calling `to_dict()` of disabled + if self.disabled: + _dict['disabled'] = self.disabled.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "expiration": obj.get("expiration"), + "user": LoginResultUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "domain": LoginResultDomain.from_dict(obj["domain"]) if obj.get("domain") is not None else None, + "time": obj.get("time"), + "identifier": obj.get("identifier"), + "disabled": LoginResultDisabled.from_dict(obj["disabled"]) if obj.get("disabled") is not None else None, + "missingTOTP": obj.get("missingTOTP") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result_disabled.py b/corellium/models/login_result_disabled.py new file mode 100644 index 0000000..de9812b --- /dev/null +++ b/corellium/models/login_result_disabled.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LoginResultDisabled(BaseModel): + """ + Public disable details. Present only when the domain is disabled. + """ # noqa: E501 + type: StrictStr = Field(description="Reason the domain is disabled.") + disabled_at: Optional[datetime] = Field(default=None, description="When the domain was disabled. Present for AllocatedHoursExpended.", alias="disabledAt") + delete_instances_at: Optional[datetime] = Field(default=None, description="When the domain's instances will be deleted.", alias="deleteInstancesAt") + cancel_date: Optional[datetime] = Field(default=None, description="When the subscription was canceled. Present for SubscriptionCanceled.", alias="cancelDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "disabledAt", "deleteInstancesAt", "cancelDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResultDisabled from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResultDisabled from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "disabledAt": obj.get("disabledAt"), + "deleteInstancesAt": obj.get("deleteInstancesAt"), + "cancelDate": obj.get("cancelDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result_domain.py b/corellium/models/login_result_domain.py new file mode 100644 index 0000000..10a15e8 --- /dev/null +++ b/corellium/models/login_result_domain.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.login_result_domain_device_auto_shutdown import LoginResultDomainDeviceAutoShutdown +from corellium.models.login_result_domain_disabled import LoginResultDomainDisabled +from corellium.models.login_result_domain_snapshot_sharing_permissions import LoginResultDomainSnapshotSharingPermissions +from corellium.models.login_result_domain_trial import LoginResultDomainTrial +from corellium.models.login_result_domain_webplayer import LoginResultDomainWebplayer +from typing import Optional, Set +from typing_extensions import Self + +class LoginResultDomain(BaseModel): + """ + The session's domain, including its feature configuration. + """ # noqa: E501 + name: Optional[StrictStr] = Field(description="Domain name.") + label: Optional[StrictStr] = Field(description="Domain description.") + terms_policy: Optional[StrictStr] = Field(default=None, description="Terms-of-service policy for the domain.", alias="termsPolicy") + cores: Union[StrictFloat, StrictInt] = Field(description="Licensed core quota.") + individual: StrictBool = Field(description="Whether this is an individual (aggregate member) domain.") + totp_required: Optional[StrictBool] = Field(default=None, description="Present when the domain mandates TOTP.", alias="totpRequired") + subscription: Optional[Dict[str, Any]] = Field(default=None, description="Billing summary for the domain, present when it has a billing record. Carries the billing wire fields renew_action, next_bill, billing_type and billing_backend.") + license_type: Optional[StrictStr] = Field(default=None, description="License type identifier.", alias="licenseType") + android: Optional[StrictBool] = Field(default=None, description="Whether Android devices are enabled.") + no_ios: Optional[StrictBool] = Field(default=None, description="Whether iOS devices are disabled.", alias="noIOS") + files_only: Optional[StrictBool] = Field(default=None, description="Whether the domain is in files-only mode.", alias="filesOnly") + device_dhcp_server: Optional[StrictBool] = Field(default=None, description="Whether the device DHCP server is enabled.", alias="deviceDHCPServer") + enable_arm_devices: Optional[StrictBool] = Field(default=None, description="Whether ARM devices are enabled.", alias="enableArmDevices") + use_device_accounting: Optional[StrictBool] = Field(default=None, description="Whether the domain is billed by device hours instead of core hours.", alias="useDeviceAccounting") + single_project: Optional[StrictBool] = Field(default=None, description="Whether the domain is limited to a single project.", alias="singleProject") + terms_updated: Optional[StrictStr] = Field(default=None, description="When the domain terms were last updated; compared against the user agreement.", alias="termsUpdated") + trial: Optional[LoginResultDomainTrial] = None + webplayer: Optional[LoginResultDomainWebplayer] = None + snapshot_sharing_permissions: Optional[LoginResultDomainSnapshotSharingPermissions] = Field(default=None, alias="snapshotSharingPermissions") + device_auto_shutdown: Optional[LoginResultDomainDeviceAutoShutdown] = Field(default=None, alias="deviceAutoShutdown") + disabled: Optional[LoginResultDomainDisabled] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "label", "termsPolicy", "cores", "individual", "totpRequired", "subscription", "licenseType", "android", "noIOS", "filesOnly", "deviceDHCPServer", "enableArmDevices", "useDeviceAccounting", "singleProject", "termsUpdated", "trial", "webplayer", "snapshotSharingPermissions", "deviceAutoShutdown", "disabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResultDomain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trial + if self.trial: + _dict['trial'] = self.trial.to_dict() + # override the default output from pydantic by calling `to_dict()` of webplayer + if self.webplayer: + _dict['webplayer'] = self.webplayer.to_dict() + # override the default output from pydantic by calling `to_dict()` of snapshot_sharing_permissions + if self.snapshot_sharing_permissions: + _dict['snapshotSharingPermissions'] = self.snapshot_sharing_permissions.to_dict() + # override the default output from pydantic by calling `to_dict()` of device_auto_shutdown + if self.device_auto_shutdown: + _dict['deviceAutoShutdown'] = self.device_auto_shutdown.to_dict() + # override the default output from pydantic by calling `to_dict()` of disabled + if self.disabled: + _dict['disabled'] = self.disabled.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if terms_policy (nullable) is None + # and model_fields_set contains the field + if self.terms_policy is None and "terms_policy" in self.model_fields_set: + _dict['termsPolicy'] = None + + # set to None if trial (nullable) is None + # and model_fields_set contains the field + if self.trial is None and "trial" in self.model_fields_set: + _dict['trial'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResultDomain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "label": obj.get("label"), + "termsPolicy": obj.get("termsPolicy"), + "cores": obj.get("cores"), + "individual": obj.get("individual"), + "totpRequired": obj.get("totpRequired"), + "subscription": obj.get("subscription"), + "licenseType": obj.get("licenseType"), + "android": obj.get("android"), + "noIOS": obj.get("noIOS"), + "filesOnly": obj.get("filesOnly"), + "deviceDHCPServer": obj.get("deviceDHCPServer"), + "enableArmDevices": obj.get("enableArmDevices"), + "useDeviceAccounting": obj.get("useDeviceAccounting"), + "singleProject": obj.get("singleProject"), + "termsUpdated": obj.get("termsUpdated"), + "trial": LoginResultDomainTrial.from_dict(obj["trial"]) if obj.get("trial") is not None else None, + "webplayer": LoginResultDomainWebplayer.from_dict(obj["webplayer"]) if obj.get("webplayer") is not None else None, + "snapshotSharingPermissions": LoginResultDomainSnapshotSharingPermissions.from_dict(obj["snapshotSharingPermissions"]) if obj.get("snapshotSharingPermissions") is not None else None, + "deviceAutoShutdown": LoginResultDomainDeviceAutoShutdown.from_dict(obj["deviceAutoShutdown"]) if obj.get("deviceAutoShutdown") is not None else None, + "disabled": LoginResultDomainDisabled.from_dict(obj["disabled"]) if obj.get("disabled") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result_domain_device_auto_shutdown.py b/corellium/models/login_result_domain_device_auto_shutdown.py new file mode 100644 index 0000000..10ac07d --- /dev/null +++ b/corellium/models/login_result_domain_device_auto_shutdown.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LoginResultDomainDeviceAutoShutdown(BaseModel): + """ + Automatic device shutdown configuration. + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether idle devices are shut down.") + threshold: Optional[StrictInt] = Field(default=None, description="Hours an instance may run before it is shut down (defaults to 10).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "threshold"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResultDomainDeviceAutoShutdown from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResultDomainDeviceAutoShutdown from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "threshold": obj.get("threshold") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result_domain_disabled.py b/corellium/models/login_result_domain_disabled.py new file mode 100644 index 0000000..e832da7 --- /dev/null +++ b/corellium/models/login_result_domain_disabled.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LoginResultDomainDisabled(BaseModel): + """ + Disable details carried in the domain configuration. See the top-level `disabled` field. + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Reason the domain is disabled.") + cancel_date: Optional[datetime] = Field(default=None, description="When the subscription was canceled.", alias="cancelDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "cancelDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResultDomainDisabled from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResultDomainDisabled from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "cancelDate": obj.get("cancelDate") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result_domain_snapshot_sharing_permissions.py b/corellium/models/login_result_domain_snapshot_sharing_permissions.py new file mode 100644 index 0000000..3ee4129 --- /dev/null +++ b/corellium/models/login_result_domain_snapshot_sharing_permissions.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LoginResultDomainSnapshotSharingPermissions(BaseModel): + """ + Snapshot sharing permissions. + """ # noqa: E501 + cloud_enabled: Optional[StrictBool] = Field(default=None, description="Whether cloud sharing is enabled.", alias="cloudEnabled") + domain_enabled: Optional[StrictBool] = Field(default=None, description="Whether domain sharing is enabled.", alias="domainEnabled") + public_link: Optional[StrictBool] = Field(default=None, description="Whether public link sharing is enabled.", alias="publicLink") + domain_restricted_link: Optional[StrictBool] = Field(default=None, description="Whether domain-restricted links are enabled.", alias="domainRestrictedLink") + password_public_link: Optional[StrictBool] = Field(default=None, description="Whether password-protected public links are enabled.", alias="passwordPublicLink") + email_invite: Optional[StrictBool] = Field(default=None, description="Whether email invites are enabled.", alias="emailInvite") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cloudEnabled", "domainEnabled", "publicLink", "domainRestrictedLink", "passwordPublicLink", "emailInvite"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResultDomainSnapshotSharingPermissions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResultDomainSnapshotSharingPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cloudEnabled": obj.get("cloudEnabled"), + "domainEnabled": obj.get("domainEnabled"), + "publicLink": obj.get("publicLink"), + "domainRestrictedLink": obj.get("domainRestrictedLink"), + "passwordPublicLink": obj.get("passwordPublicLink"), + "emailInvite": obj.get("emailInvite") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result_domain_trial.py b/corellium/models/login_result_domain_trial.py new file mode 100644 index 0000000..8023a2c --- /dev/null +++ b/corellium/models/login_result_domain_trial.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class LoginResultDomainTrial(BaseModel): + """ + Trial configuration, null once the domain is no longer on a trial. + """ # noqa: E501 + start: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Trial start unix timestamp (ms).") + end: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Trial end unix timestamp (ms).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["start", "end"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResultDomainTrial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResultDomainTrial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start": obj.get("start"), + "end": obj.get("end") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result_domain_webplayer.py b/corellium/models/login_result_domain_webplayer.py new file mode 100644 index 0000000..1780865 --- /dev/null +++ b/corellium/models/login_result_domain_webplayer.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LoginResultDomainWebplayer(BaseModel): + """ + Webplayer configuration. + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether Webplayer is enabled.") + allowed_domains: Optional[List[StrictStr]] = Field(default=None, description="Domains allowed to embed Webplayer sessions.", alias="allowedDomains") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "allowedDomains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResultDomainWebplayer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResultDomainWebplayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "allowedDomains": obj.get("allowedDomains") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/login_result_user.py b/corellium/models/login_result_user.py new file mode 100644 index 0000000..a05f9e7 --- /dev/null +++ b/corellium/models/login_result_user.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LoginResultUser(BaseModel): + """ + The authenticated user. Absent on a Webplayer token renewal. + """ # noqa: E501 + id: StrictStr = Field(description="User identifier.") + name: Optional[StrictStr] = Field(description="Username.") + label: Optional[StrictStr] = Field(description="Display name.") + email: Optional[StrictStr] = Field(description="Email address.") + cluster_administrator: StrictBool = Field(description="Whether the user is a cluster administrator.", alias="clusterAdministrator") + agreed_to_terms: Optional[StrictStr] = Field(default=None, description="When the user last agreed to the terms of service.", alias="agreedToTerms") + federated_user_id: Optional[StrictStr] = Field(default=None, description="Subject of the linked SSO credential, if any.", alias="federatedUserId") + intercom_hmac: StrictStr = Field(description="HMAC used for Intercom identity verification.", alias="intercomHMAC") + misc: Dict[str, Any] = Field(description="User metadata. API token bookkeeping only — the token itself is never returned.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "label", "email", "clusterAdministrator", "agreedToTerms", "federatedUserId", "intercomHMAC", "misc"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginResultUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if agreed_to_terms (nullable) is None + # and model_fields_set contains the field + if self.agreed_to_terms is None and "agreed_to_terms" in self.model_fields_set: + _dict['agreedToTerms'] = None + + # set to None if federated_user_id (nullable) is None + # and model_fields_set contains the field + if self.federated_user_id is None and "federated_user_id" in self.model_fields_set: + _dict['federatedUserId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LoginResultUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "label": obj.get("label"), + "email": obj.get("email"), + "clusterAdministrator": obj.get("clusterAdministrator"), + "agreedToTerms": obj.get("agreedToTerms"), + "federatedUserId": obj.get("federatedUserId"), + "intercomHMAC": obj.get("intercomHMAC"), + "misc": obj.get("misc") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/maintenance.py b/corellium/models/maintenance.py new file mode 100644 index 0000000..d9a8055 --- /dev/null +++ b/corellium/models/maintenance.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Maintenance(BaseModel): + """ + + """ # noqa: E501 + message: Optional[StrictStr] = Field(default=None, description="Maintenance message") + header: Optional[StrictStr] = Field(default=None, description="Maintenance header") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "header"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Maintenance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if header (nullable) is None + # and model_fields_set contains the field + if self.header is None and "header" in self.model_fields_set: + _dict['header'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Maintenance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "header": obj.get("header") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/matrix_error.py b/corellium/models/matrix_error.py new file mode 100644 index 0000000..8903a14 --- /dev/null +++ b/corellium/models/matrix_error.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MatrixError(BaseModel): + """ + MatrixError + """ # noqa: E501 + error: StrictStr = Field(description="Human-readable description of what went wrong.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MatrixError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MatrixError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/media_play_body.py b/corellium/models/media_play_body.py new file mode 100644 index 0000000..c181c0f --- /dev/null +++ b/corellium/models/media_play_body.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corellium.models.media_play_by_image import MediaPlayByImage +from corellium.models.media_play_by_url import MediaPlayByUrl +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +MEDIAPLAYBODY_ONE_OF_SCHEMAS = ["MediaPlayByImage", "MediaPlayByUrl"] + +class MediaPlayBody(BaseModel): + """ + Media source. Provide exactly one of imageId or url. + """ + # data type: MediaPlayByImage + oneof_schema_1_validator: Optional[MediaPlayByImage] = None + # data type: MediaPlayByUrl + oneof_schema_2_validator: Optional[MediaPlayByUrl] = None + actual_instance: Optional[Union[MediaPlayByImage, MediaPlayByUrl]] = None + one_of_schemas: Set[str] = { "MediaPlayByImage", "MediaPlayByUrl" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = MediaPlayBody.model_construct() + error_messages = [] + match = 0 + # validate data type: MediaPlayByImage + if not isinstance(v, MediaPlayByImage): + error_messages.append(f"Error! Input type `{type(v)}` is not `MediaPlayByImage`") + else: + match += 1 + # validate data type: MediaPlayByUrl + if not isinstance(v, MediaPlayByUrl): + error_messages.append(f"Error! Input type `{type(v)}` is not `MediaPlayByUrl`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in MediaPlayBody with oneOf schemas: MediaPlayByImage, MediaPlayByUrl. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in MediaPlayBody with oneOf schemas: MediaPlayByImage, MediaPlayByUrl. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into MediaPlayByImage + try: + instance.actual_instance = MediaPlayByImage.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into MediaPlayByUrl + try: + instance.actual_instance = MediaPlayByUrl.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into MediaPlayBody with oneOf schemas: MediaPlayByImage, MediaPlayByUrl. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into MediaPlayBody with oneOf schemas: MediaPlayByImage, MediaPlayByUrl. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], MediaPlayByImage, MediaPlayByUrl]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/media_play_body_v1.py b/corellium/models/media_play_body_v1.py new file mode 100644 index 0000000..2871d85 --- /dev/null +++ b/corellium/models/media_play_body_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MediaPlayBodyV1(BaseModel): + """ + + """ # noqa: E501 + image_id: Optional[StrictStr] = Field(default=None, description="Image ID", alias="imageId") + url: Optional[StrictStr] = Field(default=None, description="URL to a media file") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaPlayBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if image_id (nullable) is None + # and model_fields_set contains the field + if self.image_id is None and "image_id" in self.model_fields_set: + _dict['imageId'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaPlayBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId"), + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/media_play_by_image.py b/corellium/models/media_play_by_image.py new file mode 100644 index 0000000..b67b916 --- /dev/null +++ b/corellium/models/media_play_by_image.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MediaPlayByImage(BaseModel): + """ + MediaPlayByImage + """ # noqa: E501 + image_id: StrictStr = Field(description="Image ID.", alias="imageId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaPlayByImage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaPlayByImage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/media_play_by_url.py b/corellium/models/media_play_by_url.py new file mode 100644 index 0000000..ac45a1a --- /dev/null +++ b/corellium/models/media_play_by_url.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MediaPlayByUrl(BaseModel): + """ + MediaPlayByUrl + """ # noqa: E501 + url: StrictStr = Field(description="URL to a media file.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaPlayByUrl from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaPlayByUrl from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/media_store.py b/corellium/models/media_store.py new file mode 100644 index 0000000..d805bac --- /dev/null +++ b/corellium/models/media_store.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MediaStore(BaseModel): + """ + MediaStore + """ # noqa: E501 + identifier: StrictStr = Field(description="Storage device identifier.") + device: StrictStr = Field(description="Device name.") + fs_type: StrictStr = Field(description="Filesystem type.", alias="fsType") + fs_uuid: Optional[StrictStr] = Field(description="Filesystem UUID.", alias="fsUuid") + label: StrictStr = Field(description="Volume label.") + serial: StrictStr = Field(description="Device serial number.") + vendor: StrictStr = Field(description="Device vendor.") + model: StrictStr = Field(description="Device model.") + mount_policy: StrictStr = Field(description="Mount policy (read-only or read-write).", alias="mountPolicy") + status: StrictStr = Field(description="Mount status.") + created_at: datetime = Field(description="Creation timestamp.", alias="createdAt") + updated_at: datetime = Field(description="Last update timestamp.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "device", "fsType", "fsUuid", "label", "serial", "vendor", "model", "mountPolicy", "status", "createdAt", "updatedAt"] + + @field_validator('mount_policy') + def mount_policy_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RO', 'RW']): + raise ValueError("must be one of enum values ('RO', 'RW')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['mounted', 'unmounted']): + raise ValueError("must be one of enum values ('mounted', 'unmounted')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaStore from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if fs_uuid (nullable) is None + # and model_fields_set contains the field + if self.fs_uuid is None and "fs_uuid" in self.model_fields_set: + _dict['fsUuid'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaStore from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "device": obj.get("device"), + "fsType": obj.get("fsType"), + "fsUuid": obj.get("fsUuid"), + "label": obj.get("label"), + "serial": obj.get("serial"), + "vendor": obj.get("vendor"), + "model": obj.get("model"), + "mountPolicy": obj.get("mountPolicy"), + "status": obj.get("status"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/media_store_v1.py b/corellium/models/media_store_v1.py new file mode 100644 index 0000000..8327ed0 --- /dev/null +++ b/corellium/models/media_store_v1.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MediaStoreV1(BaseModel): + """ + + """ # noqa: E501 + identifier: Optional[StrictStr] = None + device: Optional[StrictStr] = None + fs_type: Optional[StrictStr] = Field(default=None, alias="fsType") + fs_uuid: Optional[StrictStr] = Field(default=None, alias="fsUuid") + label: Optional[StrictStr] = None + serial: Optional[StrictStr] = None + vendor: Optional[StrictStr] = None + model: Optional[StrictStr] = None + mount_policy: Optional[StrictStr] = Field(default=None, alias="mountPolicy") + created_at: Optional[StrictStr] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictStr] = Field(default=None, alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "device", "fsType", "fsUuid", "label", "serial", "vendor", "model", "mountPolicy", "createdAt", "updatedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MediaStoreV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + # set to None if device (nullable) is None + # and model_fields_set contains the field + if self.device is None and "device" in self.model_fields_set: + _dict['device'] = None + + # set to None if fs_type (nullable) is None + # and model_fields_set contains the field + if self.fs_type is None and "fs_type" in self.model_fields_set: + _dict['fsType'] = None + + # set to None if fs_uuid (nullable) is None + # and model_fields_set contains the field + if self.fs_uuid is None and "fs_uuid" in self.model_fields_set: + _dict['fsUuid'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if serial (nullable) is None + # and model_fields_set contains the field + if self.serial is None and "serial" in self.model_fields_set: + _dict['serial'] = None + + # set to None if vendor (nullable) is None + # and model_fields_set contains the field + if self.vendor is None and "vendor" in self.model_fields_set: + _dict['vendor'] = None + + # set to None if model (nullable) is None + # and model_fields_set contains the field + if self.model is None and "model" in self.model_fields_set: + _dict['model'] = None + + # set to None if mount_policy (nullable) is None + # and model_fields_set contains the field + if self.mount_policy is None and "mount_policy" in self.model_fields_set: + _dict['mountPolicy'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MediaStoreV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "device": obj.get("device"), + "fsType": obj.get("fsType"), + "fsUuid": obj.get("fsUuid"), + "label": obj.get("label"), + "serial": obj.get("serial"), + "vendor": obj.get("vendor"), + "model": obj.get("model"), + "mountPolicy": obj.get("mountPolicy"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/message_body.py b/corellium/models/message_body.py new file mode 100644 index 0000000..412b14b --- /dev/null +++ b/corellium/models/message_body.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from corellium.models.message_body_any_of import MessageBodyAnyOf +from corellium.models.message_body_any_of1 import MessageBodyAnyOf1 +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +MESSAGEBODY_ANY_OF_SCHEMAS = ["MessageBodyAnyOf", "MessageBodyAnyOf1"] + +class MessageBody(BaseModel): + """ + MessageBody + """ + + # data type: MessageBodyAnyOf + anyof_schema_1_validator: Optional[MessageBodyAnyOf] = None + # data type: MessageBodyAnyOf1 + anyof_schema_2_validator: Optional[MessageBodyAnyOf1] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[MessageBodyAnyOf, MessageBodyAnyOf1]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "MessageBodyAnyOf", "MessageBodyAnyOf1" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = MessageBody.model_construct() + error_messages = [] + # validate data type: MessageBodyAnyOf + if not isinstance(v, MessageBodyAnyOf): + error_messages.append(f"Error! Input type `{type(v)}` is not `MessageBodyAnyOf`") + else: + return v + + # validate data type: MessageBodyAnyOf1 + if not isinstance(v, MessageBodyAnyOf1): + error_messages.append(f"Error! Input type `{type(v)}` is not `MessageBodyAnyOf1`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in MessageBody with anyOf schemas: MessageBodyAnyOf, MessageBodyAnyOf1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[MessageBodyAnyOf] = None + try: + instance.actual_instance = MessageBodyAnyOf.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[MessageBodyAnyOf1] = None + try: + instance.actual_instance = MessageBodyAnyOf1.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into MessageBody with anyOf schemas: MessageBodyAnyOf, MessageBodyAnyOf1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], MessageBodyAnyOf, MessageBodyAnyOf1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/message_body_any_of.py b/corellium/models/message_body_any_of.py new file mode 100644 index 0000000..2883265 --- /dev/null +++ b/corellium/models/message_body_any_of.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MessageBodyAnyOf(BaseModel): + """ + MessageBodyAnyOf + """ # noqa: E501 + number: StrictStr = Field(description="Source phone number.") + message: StrictStr = Field(description="SMS message body.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["number", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageBodyAnyOf from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageBodyAnyOf from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "number": obj.get("number"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/message_body_any_of1.py b/corellium/models/message_body_any_of1.py new file mode 100644 index 0000000..64331de --- /dev/null +++ b/corellium/models/message_body_any_of1.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MessageBodyAnyOf1(BaseModel): + """ + MessageBodyAnyOf1 + """ # noqa: E501 + raw: StrictStr = Field(description="Hex-encoded raw message bytes.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["raw"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MessageBodyAnyOf1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MessageBodyAnyOf1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "raw": obj.get("raw") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/metered_subscription_usage.py b/corellium/models/metered_subscription_usage.py new file mode 100644 index 0000000..d1709e5 --- /dev/null +++ b/corellium/models/metered_subscription_usage.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class MeteredSubscriptionUsage(BaseModel): + """ + MeteredSubscriptionUsage + """ # noqa: E501 + burst_rate: Union[StrictFloat, StrictInt] = Field(description="Unit price for burst usage.", alias="burstRate") + allocated_hours: Union[StrictFloat, StrictInt] = Field(description="Allocated hours.", alias="allocatedHours") + plan_billed_amount: Union[StrictFloat, StrictInt] = Field(description="Plan cost.", alias="planBilledAmount") + burst_billed_amount: Union[StrictFloat, StrictInt] = Field(description="Burst amount billed.", alias="burstBilledAmount") + burst_billed_units: Union[StrictFloat, StrictInt] = Field(description="Burst units billed.", alias="burstBilledUnits") + burst_outstanding_amount: Union[StrictFloat, StrictInt] = Field(description="Outstanding burst amount.", alias="burstOutstandingAmount") + burst_outstanding_units: Union[StrictFloat, StrictInt] = Field(description="Outstanding burst units.", alias="burstOutstandingUnits") + total_usage_amount: Union[StrictFloat, StrictInt] = Field(description="Total cost in cents for the period.", alias="totalUsageAmount") + total_used_units: Union[StrictFloat, StrictInt] = Field(description="Total used units for the period.", alias="totalUsedUnits") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["burstRate", "allocatedHours", "planBilledAmount", "burstBilledAmount", "burstBilledUnits", "burstOutstandingAmount", "burstOutstandingUnits", "totalUsageAmount", "totalUsedUnits"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MeteredSubscriptionUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MeteredSubscriptionUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "burstRate": obj.get("burstRate"), + "allocatedHours": obj.get("allocatedHours"), + "planBilledAmount": obj.get("planBilledAmount"), + "burstBilledAmount": obj.get("burstBilledAmount"), + "burstBilledUnits": obj.get("burstBilledUnits"), + "burstOutstandingAmount": obj.get("burstOutstandingAmount"), + "burstOutstandingUnits": obj.get("burstOutstandingUnits"), + "totalUsageAmount": obj.get("totalUsageAmount"), + "totalUsedUnits": obj.get("totalUsedUnits") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/metered_subscription_usage_v1.py b/corellium/models/metered_subscription_usage_v1.py new file mode 100644 index 0000000..a3c1c06 --- /dev/null +++ b/corellium/models/metered_subscription_usage_v1.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class MeteredSubscriptionUsageV1(BaseModel): + """ + + """ # noqa: E501 + burst_rate: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Unit price") + allocated_hours: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Allocated hours") + plan_billed_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Plan cost") + plan_billed_units: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Units included in plan") + burst_billed_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Amount billed") + burst_billed_units: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Units billed") + burst_outstanding_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Outstanding amount") + burst_outstanding_units: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Outstanding units") + total_usage_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total cost in cents for current period") + total_used_units: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total used units for current period") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["burst_rate", "allocated_hours", "plan_billed_amount", "plan_billed_units", "burst_billed_amount", "burst_billed_units", "burst_outstanding_amount", "burst_outstanding_units", "total_usage_amount", "total_used_units"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MeteredSubscriptionUsageV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if burst_rate (nullable) is None + # and model_fields_set contains the field + if self.burst_rate is None and "burst_rate" in self.model_fields_set: + _dict['burst_rate'] = None + + # set to None if allocated_hours (nullable) is None + # and model_fields_set contains the field + if self.allocated_hours is None and "allocated_hours" in self.model_fields_set: + _dict['allocated_hours'] = None + + # set to None if plan_billed_amount (nullable) is None + # and model_fields_set contains the field + if self.plan_billed_amount is None and "plan_billed_amount" in self.model_fields_set: + _dict['plan_billed_amount'] = None + + # set to None if plan_billed_units (nullable) is None + # and model_fields_set contains the field + if self.plan_billed_units is None and "plan_billed_units" in self.model_fields_set: + _dict['plan_billed_units'] = None + + # set to None if burst_billed_amount (nullable) is None + # and model_fields_set contains the field + if self.burst_billed_amount is None and "burst_billed_amount" in self.model_fields_set: + _dict['burst_billed_amount'] = None + + # set to None if burst_billed_units (nullable) is None + # and model_fields_set contains the field + if self.burst_billed_units is None and "burst_billed_units" in self.model_fields_set: + _dict['burst_billed_units'] = None + + # set to None if burst_outstanding_amount (nullable) is None + # and model_fields_set contains the field + if self.burst_outstanding_amount is None and "burst_outstanding_amount" in self.model_fields_set: + _dict['burst_outstanding_amount'] = None + + # set to None if burst_outstanding_units (nullable) is None + # and model_fields_set contains the field + if self.burst_outstanding_units is None and "burst_outstanding_units" in self.model_fields_set: + _dict['burst_outstanding_units'] = None + + # set to None if total_usage_amount (nullable) is None + # and model_fields_set contains the field + if self.total_usage_amount is None and "total_usage_amount" in self.model_fields_set: + _dict['total_usage_amount'] = None + + # set to None if total_used_units (nullable) is None + # and model_fields_set contains the field + if self.total_used_units is None and "total_used_units" in self.model_fields_set: + _dict['total_used_units'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MeteredSubscriptionUsageV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "burst_rate": obj.get("burst_rate"), + "allocated_hours": obj.get("allocated_hours"), + "plan_billed_amount": obj.get("plan_billed_amount"), + "plan_billed_units": obj.get("plan_billed_units"), + "burst_billed_amount": obj.get("burst_billed_amount"), + "burst_billed_units": obj.get("burst_billed_units"), + "burst_outstanding_amount": obj.get("burst_outstanding_amount"), + "burst_outstanding_units": obj.get("burst_outstanding_units"), + "total_usage_amount": obj.get("total_usage_amount"), + "total_used_units": obj.get("total_used_units") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model.py b/corellium/models/model.py new file mode 100644 index 0000000..7e409ef --- /dev/null +++ b/corellium/models/model.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.model_frame import ModelFrame +from corellium.models.model_partition import ModelPartition +from corellium.models.model_product_image import ModelProductImage +from typing import Optional, Set +from typing_extensions import Self + +class Model(BaseModel): + """ + Model + """ # noqa: E501 + type: StrictStr = Field(description="Device type, e.g. iOS, Android or IoT.") + flavor: StrictStr = Field(description="The model's identifier, for example \"iphone17a\". Pass this value as `flavor` when you create an instance, and as `{model}` when you list its software.") + description: Optional[StrictStr] = Field(description="Human-readable model name, e.g. \"iPhone Air\".") + model: StrictStr = Field(description="Marketing model identifier, e.g. \"iPhone18,4\".") + hardware_model: Optional[StrictStr] = Field(description="Hardware board model, e.g. \"d23ap\".", alias="hardwareModel") + board_config: Optional[StrictStr] = Field(description="Board configuration identifier.", alias="boardConfig") + platform: Optional[StrictStr] = Field(description="Device platform.") + cpid: Optional[Union[StrictFloat, StrictInt]] = Field(description="Chip ID.") + bdid: Optional[Union[StrictFloat, StrictInt]] = Field(description="Board ID.") + vendor: Optional[StrictStr] = Field(description="Vendor gating this model, when it is vendor-restricted.") + hidden: StrictBool = Field(description="Whether this model is hidden from device pickers.") + is_beta: StrictBool = Field(description="Whether this model is a beta device.", alias="isBeta") + peripherals: StrictBool = Field(description="Whether the device supports peripherals.") + has_software: StrictBool = Field(description="Whether any software build is available for this model.", alias="hasSoftware") + supports_rapid_start: StrictBool = Field(description="Whether at least one software build for this model can start from a snapshot.", alias="supportsRapidStart") + default_firmware: Optional[StrictStr] = Field(description="Filename pattern that selects the default build. It ignores case. Null if the model has no default.", alias="defaultFirmware") + cores: Union[StrictFloat, StrictInt] = Field(description="Number of CPU cores a new instance of this model gets if you do not choose one.") + cores_min: Union[StrictFloat, StrictInt] = Field(description="Fewest CPU cores you can give an instance of this model.", alias="coresMin") + cores_max: Union[StrictFloat, StrictInt] = Field(description="Most CPU cores you can give an instance of this model.", alias="coresMax") + cores_step: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="If present, core counts must go up in steps of this size between `coresMin` and `coresMax`.", alias="coresStep") + cores_allowed: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="If present, the exact core counts you may choose, smallest first. When set, use one of these values.", alias="coresAllowed") + ram: Union[StrictFloat, StrictInt] = Field(description="Memory, in MiB (1024 = 1 GiB), that a new instance gets if you do not choose an amount.") + ram_min: Union[StrictFloat, StrictInt] = Field(description="Smallest memory amount, in MiB, you can give an instance of this model.", alias="ramMin") + ram_max: Union[StrictFloat, StrictInt] = Field(description="Largest memory amount, in MiB, you can give an instance of this model.", alias="ramMax") + dynamic_hardware_changes: StrictBool = Field(description="Whether cores and memory can be changed while the instance is running.", alias="dynamicHardwareChanges") + partitions: List[ModelPartition] = Field(description="Storage partitions of this model.") + frame: Optional[ModelFrame] + product_image: Optional[ModelProductImage] = Field(alias="productImage") + has_frame_variant: StrictBool = Field(description="Whether this model is the bezel-framed variant of its device type.", alias="hasFrameVariant") + show_options: List[StrictStr] = Field(description="Preset boot options this model offers.", alias="showOptions") + string_udid: StrictBool = Field(description="Whether this model takes its UDID as a free-form string.", alias="stringUdid") + charm_boot_args: Optional[List[Dict[str, Any]]] = Field(default=None, description="Model-specific boot argument field definitions.", alias="charmBootArgs") + requires_preset_boot_options: StrictBool = Field(description="Whether a preset boot option must be chosen when creating an instance.", alias="requiresPresetBootOptions") + supports_preset_boot_options: StrictBool = Field(description="Whether preset boot options are supported.", alias="supportsPresetBootOptions") + supports_custom_firmware: StrictBool = Field(description="Whether custom firmware is supported.", alias="supportsCustomFirmware") + supports_custom_firmware_image: StrictBool = Field(description="Whether a user-supplied firmware image can be uploaded for this model.", alias="supportsCustomFirmwareImage") + supports_custom_kernel: StrictBool = Field(description="Whether a custom kernel is supported.", alias="supportsCustomKernel") + supports_custom_devicetree: StrictBool = Field(description="Whether a custom device tree is supported.", alias="supportsCustomDevicetree") + supports_custom_mmio: StrictBool = Field(description="Whether custom MMIO configuration is supported.", alias="supportsCustomMmio") + supports_fvp: StrictBool = Field(description="Whether this model is an Arm Fixed Virtual Platform.", alias="supportsFvp") + mast: StrictBool = Field(description="Whether MATRIX security assessments can run on instances of this model.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "flavor", "description", "model", "hardwareModel", "boardConfig", "platform", "cpid", "bdid", "vendor", "hidden", "isBeta", "peripherals", "hasSoftware", "supportsRapidStart", "defaultFirmware", "cores", "coresMin", "coresMax", "coresStep", "coresAllowed", "ram", "ramMin", "ramMax", "dynamicHardwareChanges", "partitions", "frame", "productImage", "hasFrameVariant", "showOptions", "stringUdid", "charmBootArgs", "requiresPresetBootOptions", "supportsPresetBootOptions", "supportsCustomFirmware", "supportsCustomFirmwareImage", "supportsCustomKernel", "supportsCustomDevicetree", "supportsCustomMmio", "supportsFvp", "mast"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Model from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in partitions (list) + _items = [] + if self.partitions: + for _item_partitions in self.partitions: + if _item_partitions: + _items.append(_item_partitions.to_dict()) + _dict['partitions'] = _items + # override the default output from pydantic by calling `to_dict()` of frame + if self.frame: + _dict['frame'] = self.frame.to_dict() + # override the default output from pydantic by calling `to_dict()` of product_image + if self.product_image: + _dict['productImage'] = self.product_image.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if hardware_model (nullable) is None + # and model_fields_set contains the field + if self.hardware_model is None and "hardware_model" in self.model_fields_set: + _dict['hardwareModel'] = None + + # set to None if board_config (nullable) is None + # and model_fields_set contains the field + if self.board_config is None and "board_config" in self.model_fields_set: + _dict['boardConfig'] = None + + # set to None if platform (nullable) is None + # and model_fields_set contains the field + if self.platform is None and "platform" in self.model_fields_set: + _dict['platform'] = None + + # set to None if cpid (nullable) is None + # and model_fields_set contains the field + if self.cpid is None and "cpid" in self.model_fields_set: + _dict['cpid'] = None + + # set to None if bdid (nullable) is None + # and model_fields_set contains the field + if self.bdid is None and "bdid" in self.model_fields_set: + _dict['bdid'] = None + + # set to None if vendor (nullable) is None + # and model_fields_set contains the field + if self.vendor is None and "vendor" in self.model_fields_set: + _dict['vendor'] = None + + # set to None if default_firmware (nullable) is None + # and model_fields_set contains the field + if self.default_firmware is None and "default_firmware" in self.model_fields_set: + _dict['defaultFirmware'] = None + + # set to None if frame (nullable) is None + # and model_fields_set contains the field + if self.frame is None and "frame" in self.model_fields_set: + _dict['frame'] = None + + # set to None if product_image (nullable) is None + # and model_fields_set contains the field + if self.product_image is None and "product_image" in self.model_fields_set: + _dict['productImage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Model from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "flavor": obj.get("flavor"), + "description": obj.get("description"), + "model": obj.get("model"), + "hardwareModel": obj.get("hardwareModel"), + "boardConfig": obj.get("boardConfig"), + "platform": obj.get("platform"), + "cpid": obj.get("cpid"), + "bdid": obj.get("bdid"), + "vendor": obj.get("vendor"), + "hidden": obj.get("hidden"), + "isBeta": obj.get("isBeta"), + "peripherals": obj.get("peripherals"), + "hasSoftware": obj.get("hasSoftware"), + "supportsRapidStart": obj.get("supportsRapidStart"), + "defaultFirmware": obj.get("defaultFirmware"), + "cores": obj.get("cores"), + "coresMin": obj.get("coresMin"), + "coresMax": obj.get("coresMax"), + "coresStep": obj.get("coresStep"), + "coresAllowed": obj.get("coresAllowed"), + "ram": obj.get("ram"), + "ramMin": obj.get("ramMin"), + "ramMax": obj.get("ramMax"), + "dynamicHardwareChanges": obj.get("dynamicHardwareChanges"), + "partitions": [ModelPartition.from_dict(_item) for _item in obj["partitions"]] if obj.get("partitions") is not None else None, + "frame": ModelFrame.from_dict(obj["frame"]) if obj.get("frame") is not None else None, + "productImage": ModelProductImage.from_dict(obj["productImage"]) if obj.get("productImage") is not None else None, + "hasFrameVariant": obj.get("hasFrameVariant"), + "showOptions": obj.get("showOptions"), + "stringUdid": obj.get("stringUdid"), + "charmBootArgs": obj.get("charmBootArgs"), + "requiresPresetBootOptions": obj.get("requiresPresetBootOptions"), + "supportsPresetBootOptions": obj.get("supportsPresetBootOptions"), + "supportsCustomFirmware": obj.get("supportsCustomFirmware"), + "supportsCustomFirmwareImage": obj.get("supportsCustomFirmwareImage"), + "supportsCustomKernel": obj.get("supportsCustomKernel"), + "supportsCustomDevicetree": obj.get("supportsCustomDevicetree"), + "supportsCustomMmio": obj.get("supportsCustomMmio"), + "supportsFvp": obj.get("supportsFvp"), + "mast": obj.get("mast") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_firmware.py b/corellium/models/model_firmware.py new file mode 100644 index 0000000..14268da --- /dev/null +++ b/corellium/models/model_firmware.py @@ -0,0 +1,239 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.model_firmware_springboard_snapshot import ModelFirmwareSpringboardSnapshot +from typing import Optional, Set +from typing_extensions import Self + +class ModelFirmware(BaseModel): + """ + ModelFirmware + """ # noqa: E501 + os_version: StrictStr = Field(description="Operating-system version of this build. Pass it as `osVersion` when you create an instance.", alias="osVersion") + os_build: Optional[StrictStr] = Field(description="Build identifier of this version. Pass it as `osBuild` (together with `osVersion`) when you create an instance to get exactly this build. If you pass only `osVersion`, the newest build of that version is used.", alias="osBuild") + android_flavor: Optional[StrictStr] = Field(default=None, description="Android-only flavor.", alias="androidFlavor") + api_version: Optional[StrictStr] = Field(default=None, description="Android-only API version.", alias="apiVersion") + sha256sum: Optional[StrictStr] = Field(default=None, description="SHA-256 checksum.") + sha1sum: Optional[StrictStr] = Field(default=None, description="SHA-1 checksum.") + md5sum: Optional[StrictStr] = Field(default=None, description="MD5 checksum.") + corellium_checksum: Optional[StrictStr] = Field(default=None, description="Corellium checksum, in the form algorithm$chunkSize$checksum. Absent for a domain upload.", alias="corelliumChecksum") + installed: Optional[StrictBool] = Field(default=None, description="Whether this build is already stored on your Corellium deployment. A build that is not installed can only be used if your deployment is allowed to fetch it from the vendor; an air-gapped deployment can use only installed builds.") + size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Software size in bytes.") + unique_id: Optional[StrictStr] = Field(default=None, description="A label chosen by whoever packaged this firmware. It is not guaranteed to be unique and cannot be used to look up an image or firmware; select a build with `osVersion` and `osBuild` instead.", alias="uniqueId") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Software metadata.") + release_date: Optional[datetime] = Field(default=None, description="Release date.", alias="releaseDate") + upload_date: Optional[StrictStr] = Field(default=None, description="Date uploaded; may be an empty string when unknown.", alias="uploadDate") + url: Optional[StrictStr] = Field(default=None, description="URL the software is available at.") + orig_url: Optional[StrictStr] = Field(default=None, description="URL the software is available at from the vendor.", alias="origUrl") + filename: Optional[StrictStr] = Field(default=None, description="Software filename.") + rooted: Optional[StrictBool] = Field(default=None, description="Whether a device from this firmware is rooted. Android has a rooted and a not-rooted build for each version. Null for iOS.") + signed: Optional[StrictBool] = Field(default=None, description="Whether the vendor still signs this build, from the upstream ipsw data.") + springboard_snapshot: Optional[ModelFirmwareSpringboardSnapshot] = Field(default=None, alias="springboardSnapshot") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["osVersion", "osBuild", "androidFlavor", "apiVersion", "sha256sum", "sha1sum", "md5sum", "corelliumChecksum", "installed", "size", "uniqueId", "metadata", "releaseDate", "uploadDate", "url", "origUrl", "filename", "rooted", "signed", "springboardSnapshot"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelFirmware from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of springboard_snapshot + if self.springboard_snapshot: + _dict['springboardSnapshot'] = self.springboard_snapshot.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if os_build (nullable) is None + # and model_fields_set contains the field + if self.os_build is None and "os_build" in self.model_fields_set: + _dict['osBuild'] = None + + # set to None if android_flavor (nullable) is None + # and model_fields_set contains the field + if self.android_flavor is None and "android_flavor" in self.model_fields_set: + _dict['androidFlavor'] = None + + # set to None if api_version (nullable) is None + # and model_fields_set contains the field + if self.api_version is None and "api_version" in self.model_fields_set: + _dict['apiVersion'] = None + + # set to None if sha256sum (nullable) is None + # and model_fields_set contains the field + if self.sha256sum is None and "sha256sum" in self.model_fields_set: + _dict['sha256sum'] = None + + # set to None if sha1sum (nullable) is None + # and model_fields_set contains the field + if self.sha1sum is None and "sha1sum" in self.model_fields_set: + _dict['sha1sum'] = None + + # set to None if md5sum (nullable) is None + # and model_fields_set contains the field + if self.md5sum is None and "md5sum" in self.model_fields_set: + _dict['md5sum'] = None + + # set to None if corellium_checksum (nullable) is None + # and model_fields_set contains the field + if self.corellium_checksum is None and "corellium_checksum" in self.model_fields_set: + _dict['corelliumChecksum'] = None + + # set to None if installed (nullable) is None + # and model_fields_set contains the field + if self.installed is None and "installed" in self.model_fields_set: + _dict['installed'] = None + + # set to None if size (nullable) is None + # and model_fields_set contains the field + if self.size is None and "size" in self.model_fields_set: + _dict['size'] = None + + # set to None if unique_id (nullable) is None + # and model_fields_set contains the field + if self.unique_id is None and "unique_id" in self.model_fields_set: + _dict['uniqueId'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if release_date (nullable) is None + # and model_fields_set contains the field + if self.release_date is None and "release_date" in self.model_fields_set: + _dict['releaseDate'] = None + + # set to None if upload_date (nullable) is None + # and model_fields_set contains the field + if self.upload_date is None and "upload_date" in self.model_fields_set: + _dict['uploadDate'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + # set to None if orig_url (nullable) is None + # and model_fields_set contains the field + if self.orig_url is None and "orig_url" in self.model_fields_set: + _dict['origUrl'] = None + + # set to None if filename (nullable) is None + # and model_fields_set contains the field + if self.filename is None and "filename" in self.model_fields_set: + _dict['filename'] = None + + # set to None if rooted (nullable) is None + # and model_fields_set contains the field + if self.rooted is None and "rooted" in self.model_fields_set: + _dict['rooted'] = None + + # set to None if signed (nullable) is None + # and model_fields_set contains the field + if self.signed is None and "signed" in self.model_fields_set: + _dict['signed'] = None + + # set to None if springboard_snapshot (nullable) is None + # and model_fields_set contains the field + if self.springboard_snapshot is None and "springboard_snapshot" in self.model_fields_set: + _dict['springboardSnapshot'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelFirmware from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "osVersion": obj.get("osVersion"), + "osBuild": obj.get("osBuild"), + "androidFlavor": obj.get("androidFlavor"), + "apiVersion": obj.get("apiVersion"), + "sha256sum": obj.get("sha256sum"), + "sha1sum": obj.get("sha1sum"), + "md5sum": obj.get("md5sum"), + "corelliumChecksum": obj.get("corelliumChecksum"), + "installed": obj.get("installed"), + "size": obj.get("size"), + "uniqueId": obj.get("uniqueId"), + "metadata": obj.get("metadata"), + "releaseDate": obj.get("releaseDate"), + "uploadDate": obj.get("uploadDate"), + "url": obj.get("url"), + "origUrl": obj.get("origUrl"), + "filename": obj.get("filename"), + "rooted": obj.get("rooted"), + "signed": obj.get("signed"), + "springboardSnapshot": ModelFirmwareSpringboardSnapshot.from_dict(obj["springboardSnapshot"]) if obj.get("springboardSnapshot") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_firmware_springboard_snapshot.py b/corellium/models/model_firmware_springboard_snapshot.py new file mode 100644 index 0000000..103b697 --- /dev/null +++ b/corellium/models/model_firmware_springboard_snapshot.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from corellium.models.model_firmware_springboard_snapshot_volumes_inner import ModelFirmwareSpringboardSnapshotVolumesInner +from typing import Optional, Set +from typing_extensions import Self + +class ModelFirmwareSpringboardSnapshot(BaseModel): + """ + Rapid-start snapshot for this build, if one exists. Divide a listed size by the partition block size to get the block count. + """ # noqa: E501 + volumes: List[ModelFirmwareSpringboardSnapshotVolumesInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["volumes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelFirmwareSpringboardSnapshot from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in volumes (list) + _items = [] + if self.volumes: + for _item_volumes in self.volumes: + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelFirmwareSpringboardSnapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "volumes": [ModelFirmwareSpringboardSnapshotVolumesInner.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_firmware_springboard_snapshot_volumes_inner.py b/corellium/models/model_firmware_springboard_snapshot_volumes_inner.py new file mode 100644 index 0000000..3762720 --- /dev/null +++ b/corellium/models/model_firmware_springboard_snapshot_volumes_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ModelFirmwareSpringboardSnapshotVolumesInner(BaseModel): + """ + ModelFirmwareSpringboardSnapshotVolumesInner + """ # noqa: E501 + nand: Union[StrictFloat, StrictInt] = Field(description="Snapshotted NAND size in bytes.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["nand"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelFirmwareSpringboardSnapshotVolumesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelFirmwareSpringboardSnapshotVolumesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nand": obj.get("nand") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_frame.py b/corellium/models/model_frame.py new file mode 100644 index 0000000..1e41760 --- /dev/null +++ b/corellium/models/model_frame.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.model_frame_dimensions import ModelFrameDimensions +from corellium.models.model_rect import ModelRect +from typing import Optional, Set +from typing_extensions import Self + +class ModelFrame(BaseModel): + """ + Bezel geometry, or null when this model has no bezel. + """ # noqa: E501 + width: Union[StrictFloat, StrictInt] = Field(description="Bezel image width.") + height: Union[StrictFloat, StrictInt] = Field(description="Bezel image height.") + inner: Optional[ModelRect] = None + home: Optional[ModelRect] = Field(default=None, description="Home button area within the bezel.") + dimensions: Optional[ModelFrameDimensions] = None + scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Display scale factor.") + has_image: StrictBool = Field(description="Whether a bezel image is available for this model.", alias="hasImage") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["width", "height", "inner", "home", "dimensions", "scale", "hasImage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelFrame from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of inner + if self.inner: + _dict['inner'] = self.inner.to_dict() + # override the default output from pydantic by calling `to_dict()` of home + if self.home: + _dict['home'] = self.home.to_dict() + # override the default output from pydantic by calling `to_dict()` of dimensions + if self.dimensions: + _dict['dimensions'] = self.dimensions.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelFrame from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "width": obj.get("width"), + "height": obj.get("height"), + "inner": ModelRect.from_dict(obj["inner"]) if obj.get("inner") is not None else None, + "home": ModelRect.from_dict(obj["home"]) if obj.get("home") is not None else None, + "dimensions": ModelFrameDimensions.from_dict(obj["dimensions"]) if obj.get("dimensions") is not None else None, + "scale": obj.get("scale"), + "hasImage": obj.get("hasImage") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_frame_dimensions.py b/corellium/models/model_frame_dimensions.py new file mode 100644 index 0000000..6e9be75 --- /dev/null +++ b/corellium/models/model_frame_dimensions.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class ModelFrameDimensions(BaseModel): + """ + Native display resolution. + """ # noqa: E501 + width: Union[StrictFloat, StrictInt] = Field(description="Native display width in pixels.") + height: Union[StrictFloat, StrictInt] = Field(description="Native display height in pixels.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["width", "height"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelFrameDimensions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelFrameDimensions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "width": obj.get("width"), + "height": obj.get("height") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_partition.py b/corellium/models/model_partition.py new file mode 100644 index 0000000..4bb5a21 --- /dev/null +++ b/corellium/models/model_partition.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ModelPartition(BaseModel): + """ + ModelPartition + """ # noqa: E501 + name: StrictStr = Field(description="Partition name.") + block_size: Union[StrictFloat, StrictInt] = Field(description="Block size in bytes.", alias="blockSize") + blocks: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Default size in blocks.") + blocks_min: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum size in blocks.", alias="blocksMin") + blocks_max: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum size in blocks.", alias="blocksMax") + blocks_step: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Block increment between selectable sizes.", alias="blocksStep") + block_values: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Discrete selectable sizes in blocks.", alias="blockValues") + user_uploaded: Optional[StrictBool] = Field(default=None, description="Whether this partition can be replaced by a user-supplied image.", alias="userUploaded") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "blockSize", "blocks", "blocksMin", "blocksMax", "blocksStep", "blockValues", "userUploaded"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelPartition from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelPartition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "blockSize": obj.get("blockSize"), + "blocks": obj.get("blocks"), + "blocksMin": obj.get("blocksMin"), + "blocksMax": obj.get("blocksMax"), + "blocksStep": obj.get("blocksStep"), + "blockValues": obj.get("blockValues"), + "userUploaded": obj.get("userUploaded") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_product_image.py b/corellium/models/model_product_image.py new file mode 100644 index 0000000..393b22d --- /dev/null +++ b/corellium/models/model_product_image.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.model_rect import ModelRect +from typing import Optional, Set +from typing_extensions import Self + +class ModelProductImage(BaseModel): + """ + Product image geometry, or null when this model has none. + """ # noqa: E501 + width: Union[StrictFloat, StrictInt] = Field(description="Product image width.") + inner: Optional[ModelRect] = Field(default=None, description="Screen area within the product image.") + has_image: StrictBool = Field(description="Whether a product image is available for this model.", alias="hasImage") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["width", "inner", "hasImage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelProductImage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of inner + if self.inner: + _dict['inner'] = self.inner.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelProductImage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "width": obj.get("width"), + "inner": ModelRect.from_dict(obj["inner"]) if obj.get("inner") is not None else None, + "hasImage": obj.get("hasImage") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_rect.py b/corellium/models/model_rect.py new file mode 100644 index 0000000..34fc669 --- /dev/null +++ b/corellium/models/model_rect.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ModelRect(BaseModel): + """ + Screen area within the bezel. + """ # noqa: E501 + top: Union[StrictFloat, StrictInt] = Field(description="Offset from the top edge.") + left: Union[StrictFloat, StrictInt] = Field(description="Offset from the left edge.") + width: Union[StrictFloat, StrictInt] = Field(description="Width.") + height: Union[StrictFloat, StrictInt] = Field(description="Height.") + radius: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Corner radius, as a fraction of the width.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["top", "left", "width", "height", "radius"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelRect from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelRect from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "top": obj.get("top"), + "left": obj.get("left"), + "width": obj.get("width"), + "height": obj.get("height"), + "radius": obj.get("radius") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_software_v1.py b/corellium/models/model_software_v1.py new file mode 100644 index 0000000..711e2a2 --- /dev/null +++ b/corellium/models/model_software_v1.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.firmware_v1 import FirmwareV1 +from typing import Optional, Set +from typing_extensions import Self + +class ModelSoftwareV1(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = None + board_config: Optional[StrictStr] = Field(default=None, alias="boardConfig") + platform: Optional[StrictStr] = None + cpid: Optional[Union[StrictFloat, StrictInt]] = None + bdid: Optional[Union[StrictFloat, StrictInt]] = None + firmwares: Optional[List[FirmwareV1]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "boardConfig", "platform", "cpid", "bdid", "firmwares"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelSoftwareV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in firmwares (list) + _items = [] + if self.firmwares: + for _item_firmwares in self.firmwares: + if _item_firmwares: + _items.append(_item_firmwares.to_dict()) + _dict['firmwares'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if board_config (nullable) is None + # and model_fields_set contains the field + if self.board_config is None and "board_config" in self.model_fields_set: + _dict['boardConfig'] = None + + # set to None if platform (nullable) is None + # and model_fields_set contains the field + if self.platform is None and "platform" in self.model_fields_set: + _dict['platform'] = None + + # set to None if cpid (nullable) is None + # and model_fields_set contains the field + if self.cpid is None and "cpid" in self.model_fields_set: + _dict['cpid'] = None + + # set to None if bdid (nullable) is None + # and model_fields_set contains the field + if self.bdid is None and "bdid" in self.model_fields_set: + _dict['bdid'] = None + + # set to None if firmwares (nullable) is None + # and model_fields_set contains the field + if self.firmwares is None and "firmwares" in self.model_fields_set: + _dict['firmwares'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelSoftwareV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "boardConfig": obj.get("boardConfig"), + "platform": obj.get("platform"), + "cpid": obj.get("cpid"), + "bdid": obj.get("bdid"), + "firmwares": [FirmwareV1.from_dict(_item) for _item in obj["firmwares"]] if obj.get("firmwares") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/model_v1.py b/corellium/models/model_v1.py new file mode 100644 index 0000000..889eaa5 --- /dev/null +++ b/corellium/models/model_v1.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ModelV1(BaseModel): + """ + + """ # noqa: E501 + type: StrictStr + name: StrictStr + flavor: StrictStr + description: Optional[StrictStr] = None + model: StrictStr + board_config: Optional[StrictStr] = Field(default=None, alias="boardConfig") + platform: Optional[StrictStr] = None + cpid: Optional[Union[StrictFloat, StrictInt]] = None + bdid: Optional[Union[StrictFloat, StrictInt]] = None + peripherals: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "name", "flavor", "description", "model", "boardConfig", "platform", "cpid", "bdid", "peripherals"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ModelV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if board_config (nullable) is None + # and model_fields_set contains the field + if self.board_config is None and "board_config" in self.model_fields_set: + _dict['boardConfig'] = None + + # set to None if platform (nullable) is None + # and model_fields_set contains the field + if self.platform is None and "platform" in self.model_fields_set: + _dict['platform'] = None + + # set to None if cpid (nullable) is None + # and model_fields_set contains the field + if self.cpid is None and "cpid" in self.model_fields_set: + _dict['cpid'] = None + + # set to None if bdid (nullable) is None + # and model_fields_set contains the field + if self.bdid is None and "bdid" in self.model_fields_set: + _dict['bdid'] = None + + # set to None if peripherals (nullable) is None + # and model_fields_set contains the field + if self.peripherals is None and "peripherals" in self.model_fields_set: + _dict['peripherals'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModelV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "flavor": obj.get("flavor"), + "description": obj.get("description"), + "model": obj.get("model"), + "boardConfig": obj.get("boardConfig"), + "platform": obj.get("platform"), + "cpid": obj.get("cpid"), + "bdid": obj.get("bdid"), + "peripherals": obj.get("peripherals") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/netdump_filter.py b/corellium/models/netdump_filter.py new file mode 100644 index 0000000..5634d5b --- /dev/null +++ b/corellium/models/netdump_filter.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class NetdumpFilter(BaseModel): + """ + + """ # noqa: E501 + port_ranges: Optional[List[StrictStr]] = Field(default=None, alias="portRanges") + src_ports: Optional[List[StrictStr]] = Field(default=None, alias="srcPorts") + dst_ports: Optional[List[StrictStr]] = Field(default=None, alias="dstPorts") + ports: Optional[List[StrictStr]] = None + protocols: Optional[List[StrictStr]] = None + processes: Optional[List[StrictStr]] = None + hosts: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["portRanges", "srcPorts", "dstPorts", "ports", "protocols", "processes", "hosts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetdumpFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if port_ranges (nullable) is None + # and model_fields_set contains the field + if self.port_ranges is None and "port_ranges" in self.model_fields_set: + _dict['portRanges'] = None + + # set to None if src_ports (nullable) is None + # and model_fields_set contains the field + if self.src_ports is None and "src_ports" in self.model_fields_set: + _dict['srcPorts'] = None + + # set to None if dst_ports (nullable) is None + # and model_fields_set contains the field + if self.dst_ports is None and "dst_ports" in self.model_fields_set: + _dict['dstPorts'] = None + + # set to None if ports (nullable) is None + # and model_fields_set contains the field + if self.ports is None and "ports" in self.model_fields_set: + _dict['ports'] = None + + # set to None if protocols (nullable) is None + # and model_fields_set contains the field + if self.protocols is None and "protocols" in self.model_fields_set: + _dict['protocols'] = None + + # set to None if processes (nullable) is None + # and model_fields_set contains the field + if self.processes is None and "processes" in self.model_fields_set: + _dict['processes'] = None + + # set to None if hosts (nullable) is None + # and model_fields_set contains the field + if self.hosts is None and "hosts" in self.model_fields_set: + _dict['hosts'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetdumpFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "portRanges": obj.get("portRanges"), + "srcPorts": obj.get("srcPorts"), + "dstPorts": obj.get("dstPorts"), + "ports": obj.get("ports"), + "protocols": obj.get("protocols"), + "processes": obj.get("processes"), + "hosts": obj.get("hosts") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_connection.py b/corellium/models/network_connection.py new file mode 100644 index 0000000..a9f6fac --- /dev/null +++ b/corellium/models/network_connection.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corellium.models.open_vpn_network_connection_v1 import OpenVPNNetworkConnectionV1 +from corellium.models.vlan_network_connection_v1 import VLANNetworkConnectionV1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +NETWORKCONNECTION_ONE_OF_SCHEMAS = ["OpenVPNNetworkConnectionV1", "VLANNetworkConnectionV1"] + +class NetworkConnection(BaseModel): + """ + Provider-discriminated network connection response. + """ + # data type: OpenVPNNetworkConnectionV1 + oneof_schema_1_validator: Optional[OpenVPNNetworkConnectionV1] = None + # data type: VLANNetworkConnectionV1 + oneof_schema_2_validator: Optional[VLANNetworkConnectionV1] = None + actual_instance: Optional[Union[OpenVPNNetworkConnectionV1, VLANNetworkConnectionV1]] = None + one_of_schemas: Set[str] = { "OpenVPNNetworkConnectionV1", "VLANNetworkConnectionV1" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = NetworkConnection.model_construct() + error_messages = [] + match = 0 + # validate data type: OpenVPNNetworkConnectionV1 + if not isinstance(v, OpenVPNNetworkConnectionV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenVPNNetworkConnectionV1`") + else: + match += 1 + # validate data type: VLANNetworkConnectionV1 + if not isinstance(v, VLANNetworkConnectionV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `VLANNetworkConnectionV1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in NetworkConnection with oneOf schemas: OpenVPNNetworkConnectionV1, VLANNetworkConnectionV1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in NetworkConnection with oneOf schemas: OpenVPNNetworkConnectionV1, VLANNetworkConnectionV1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("provider") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `provider` in the input.") + + # check if data type is `OpenVPNNetworkConnectionV1` + if _data_type == "openvpn": + instance.actual_instance = OpenVPNNetworkConnectionV1.from_json(json_str) + return instance + + # check if data type is `VLANNetworkConnectionV1` + if _data_type == "vlan": + instance.actual_instance = VLANNetworkConnectionV1.from_json(json_str) + return instance + + # deserialize data into OpenVPNNetworkConnectionV1 + try: + instance.actual_instance = OpenVPNNetworkConnectionV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into VLANNetworkConnectionV1 + try: + instance.actual_instance = VLANNetworkConnectionV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into NetworkConnection with oneOf schemas: OpenVPNNetworkConnectionV1, VLANNetworkConnectionV1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into NetworkConnection with oneOf schemas: OpenVPNNetworkConnectionV1, VLANNetworkConnectionV1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OpenVPNNetworkConnectionV1, VLANNetworkConnectionV1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/network_connection_config.py b/corellium/models/network_connection_config.py new file mode 100644 index 0000000..32a2160 --- /dev/null +++ b/corellium/models/network_connection_config.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corellium.models.open_vpn_config import OpenVPNConfig +from corellium.models.vlan_config import VLANConfig +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +NETWORKCONNECTIONCONFIG_ONE_OF_SCHEMAS = ["OpenVPNConfig", "VLANConfig"] + +class NetworkConnectionConfig(BaseModel): + """ + Additional network configuration based on selected provider. + """ + # data type: OpenVPNConfig + oneof_schema_1_validator: Optional[OpenVPNConfig] = None + # data type: VLANConfig + oneof_schema_2_validator: Optional[VLANConfig] = None + actual_instance: Optional[Union[OpenVPNConfig, VLANConfig]] = None + one_of_schemas: Set[str] = { "OpenVPNConfig", "VLANConfig" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = NetworkConnectionConfig.model_construct() + error_messages = [] + match = 0 + # validate data type: OpenVPNConfig + if not isinstance(v, OpenVPNConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenVPNConfig`") + else: + match += 1 + # validate data type: VLANConfig + if not isinstance(v, VLANConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `VLANConfig`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in NetworkConnectionConfig with oneOf schemas: OpenVPNConfig, VLANConfig. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in NetworkConnectionConfig with oneOf schemas: OpenVPNConfig, VLANConfig. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into OpenVPNConfig + try: + instance.actual_instance = OpenVPNConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into VLANConfig + try: + instance.actual_instance = VLANConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into NetworkConnectionConfig with oneOf schemas: OpenVPNConfig, VLANConfig. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into NetworkConnectionConfig with oneOf schemas: OpenVPNConfig, VLANConfig. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OpenVPNConfig, VLANConfig]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/network_connection_pagination_result.py b/corellium/models/network_connection_pagination_result.py new file mode 100644 index 0000000..e6d520b --- /dev/null +++ b/corellium/models/network_connection_pagination_result.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from corellium.models.network_connection import NetworkConnection +from typing import Optional, Set +from typing_extensions import Self + +class NetworkConnectionPaginationResult(BaseModel): + """ + Network Connection Pagination Result + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Total number of items.") + count: Union[StrictFloat, StrictInt] = Field(description="The number of items returned in this result.") + limit: Union[StrictFloat, StrictInt] = Field(description="The maximum number of items that could be returned for this result.") + offset: Union[StrictFloat, StrictInt] = Field(description="That starting item 0-indexed.") + has_more: StrictBool = Field(description="Whether or not there are more results to fetch.", alias="hasMore") + results: List[NetworkConnection] = Field(description="Array of network connections associated with this domain.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "count", "limit", "offset", "hasMore", "results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkConnectionPaginationResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkConnectionPaginationResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "count": obj.get("count"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore"), + "results": [NetworkConnection.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_connection_provider.py b/corellium/models/network_connection_provider.py new file mode 100644 index 0000000..2fc3e03 --- /dev/null +++ b/corellium/models/network_connection_provider.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NetworkConnectionProvider(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="Human friendly name for Network Connection Provider.") + type: StrictStr = Field(description="Internal identifier for Network Connection Provider.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkConnectionProvider from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkConnectionProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_connection_provider_pagination_result.py b/corellium/models/network_connection_provider_pagination_result.py new file mode 100644 index 0000000..a837e48 --- /dev/null +++ b/corellium/models/network_connection_provider_pagination_result.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from corellium.models.network_connection_provider import NetworkConnectionProvider +from typing import Optional, Set +from typing_extensions import Self + +class NetworkConnectionProviderPaginationResult(BaseModel): + """ + Network Connection Provider Pagination Result + """ # noqa: E501 + total: Union[StrictFloat, StrictInt] = Field(description="Total number of items.") + count: Union[StrictFloat, StrictInt] = Field(description="The number of items returned in this result.") + limit: Union[StrictFloat, StrictInt] = Field(description="The maximum number of items that could be returned for this result.") + offset: Union[StrictFloat, StrictInt] = Field(description="That starting item 0-indexed.") + results: List[NetworkConnectionProvider] = Field(description="Array of network connection providers.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["total", "count", "limit", "offset", "results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkConnectionProviderPaginationResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkConnectionProviderPaginationResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total": obj.get("total"), + "count": obj.get("count"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "results": [NetworkConnectionProvider.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_connection_providers.py b/corellium/models/network_connection_providers.py new file mode 100644 index 0000000..fd0ced0 --- /dev/null +++ b/corellium/models/network_connection_providers.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.network_connection_providers_results_inner import NetworkConnectionProvidersResultsInner +from typing import Optional, Set +from typing_extensions import Self + +class NetworkConnectionProviders(BaseModel): + """ + NetworkConnectionProviders + """ # noqa: E501 + results: List[NetworkConnectionProvidersResultsInner] = Field(description="Network providers") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkConnectionProviders from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkConnectionProviders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [NetworkConnectionProvidersResultsInner.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_connection_providers_results_inner.py b/corellium/models/network_connection_providers_results_inner.py new file mode 100644 index 0000000..0df9b19 --- /dev/null +++ b/corellium/models/network_connection_providers_results_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NetworkConnectionProvidersResultsInner(BaseModel): + """ + NetworkConnectionProvidersResultsInner + """ # noqa: E501 + name: StrictStr + type: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkConnectionProvidersResultsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkConnectionProvidersResultsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_connections.py b/corellium/models/network_connections.py new file mode 100644 index 0000000..7397c1c --- /dev/null +++ b/corellium/models/network_connections.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.provider_network_connection import ProviderNetworkConnection +from typing import Optional, Set +from typing_extensions import Self + +class NetworkConnections(BaseModel): + """ + NetworkConnections + """ # noqa: E501 + results: List[ProviderNetworkConnection] = Field(description="Network connections") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkConnections from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkConnections from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ProviderNetworkConnection.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_interfaces.py b/corellium/models/network_interfaces.py new file mode 100644 index 0000000..0c6e87e --- /dev/null +++ b/corellium/models/network_interfaces.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class NetworkInterfaces(BaseModel): + """ + NetworkInterfaces + """ # noqa: E501 + results: List[StrictStr] = Field(description="Network Interfaces") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkInterfaces from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkInterfaces from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": obj.get("results"), + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_schema.py b/corellium/models/network_schema.py new file mode 100644 index 0000000..e285e64 --- /dev/null +++ b/corellium/models/network_schema.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.vpn_schema import VpnSchema +from typing import Optional, Set +from typing_extensions import Self + +class NetworkSchema(BaseModel): + """ + Network configuration for this node. + """ # noqa: E501 + physical_interfaces: List[Annotated[str, Field(min_length=1, strict=True)]] = Field(description="Physical interfaces.", alias="physicalInterfaces") + vpns: Optional[List[VpnSchema]] = Field(default=None, description="Active VPN connections.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["physicalInterfaces", "vpns"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in vpns (list) + _items = [] + if self.vpns: + for _item_vpns in self.vpns: + if _item_vpns: + _items.append(_item_vpns.to_dict()) + _dict['vpns'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "physicalInterfaces": obj.get("physicalInterfaces"), + "vpns": [VpnSchema.from_dict(_item) for _item in obj["vpns"]] if obj.get("vpns") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_status.py b/corellium/models/network_status.py new file mode 100644 index 0000000..35eaf81 --- /dev/null +++ b/corellium/models/network_status.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class NetworkStatus(BaseModel): + """ + Egress network connection status for the project. Omitted when the project has none. + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Network provider type (e.g. \"openvpn\").") + name: Optional[StrictStr] = Field(default=None, description="User-defined network connection name.") + state: StrictStr = Field(description="Current egress network connection state.") + details: Optional[Dict[str, Any]] = Field(default=None, description="Additional state information, such as the last error.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "name", "state", "details"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['disconnected', 'disconnecting', 'connecting', 'connected', 'error']): + raise ValueError("must be one of enum values ('disconnected', 'disconnecting', 'connecting', 'connected', 'error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "state": obj.get("state"), + "details": obj.get("details") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_status_response.py b/corellium/models/network_status_response.py new file mode 100644 index 0000000..08908af --- /dev/null +++ b/corellium/models/network_status_response.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class NetworkStatusResponse(BaseModel): + """ + + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Network Provider. Omitted when no egress network is configured") + name: Optional[StrictStr] = Field(default=None, description="User defined name. Omitted when no egress network is configured") + state: StrictStr = Field(description="Current state of the network connection") + params: Optional[Dict[str, Any]] = Field(default=None, description="Additional state information. Omitted when no egress network is configured") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "name", "state", "params"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['inactive', 'disconnected', 'disconnecting', 'connecting', 'connected', 'error']): + raise ValueError("must be one of enum values ('inactive', 'disconnected', 'disconnecting', 'connecting', 'connected', 'error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkStatusResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if params (nullable) is None + # and model_fields_set contains the field + if self.params is None and "params" in self.model_fields_set: + _dict['params'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "state": obj.get("state"), + "params": obj.get("params") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/network_status_v1.py b/corellium/models/network_status_v1.py new file mode 100644 index 0000000..3989dec --- /dev/null +++ b/corellium/models/network_status_v1.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class NetworkStatusV1(BaseModel): + """ + + """ # noqa: E501 + type: Optional[StrictStr] = None + name: Optional[StrictStr] = None + state: Optional[StrictStr] = Field(default=None, description="Network State") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "name", "state"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['disconnected', 'disconnecting', 'connecting', 'connected', 'error']): + raise ValueError("must be one of enum values ('disconnected', 'disconnecting', 'connecting', 'connected', 'error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkStatusV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkStatusV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name"), + "state": obj.get("state") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/node_console_endpoint.py b/corellium/models/node_console_endpoint.py new file mode 100644 index 0000000..932d450 --- /dev/null +++ b/corellium/models/node_console_endpoint.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class NodeConsoleEndpoint(BaseModel): + """ + NodeConsoleEndpoint + """ # noqa: E501 + url: StrictStr = Field(description="Console WebSocket URL.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NodeConsoleEndpoint from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NodeConsoleEndpoint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/node_information.py b/corellium/models/node_information.py new file mode 100644 index 0000000..5e04b36 --- /dev/null +++ b/corellium/models/node_information.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class NodeInformation(BaseModel): + """ + NodeInformation + """ # noqa: E501 + node_id: StrictStr = Field(description="Unique identifier for the node.", alias="nodeId") + address: StrictStr = Field(description="IP address of the node.") + hostname: StrictStr = Field(description="Hostname of the node.") + ssh_port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(description="SSH port for the node (1-65535), or null if unavailable.", alias="sshPort") + node_types: List[StrictStr] = Field(description="Types of services running on this node.", alias="nodeTypes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["nodeId", "address", "hostname", "sshPort", "nodeTypes"] + + @field_validator('node_types') + def node_types_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['compute', 'controller', 'gpu']): + raise ValueError("each list item must be one of ('compute', 'controller', 'gpu')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NodeInformation from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if ssh_port (nullable) is None + # and model_fields_set contains the field + if self.ssh_port is None and "ssh_port" in self.model_fields_set: + _dict['sshPort'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NodeInformation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nodeId": obj.get("nodeId"), + "address": obj.get("address"), + "hostname": obj.get("hostname"), + "sshPort": obj.get("sshPort"), + "nodeTypes": obj.get("nodeTypes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/node_information_v1.py b/corellium/models/node_information_v1.py new file mode 100644 index 0000000..8b1d83c --- /dev/null +++ b/corellium/models/node_information_v1.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class NodeInformationV1(BaseModel): + """ + + """ # noqa: E501 + node_id: StrictStr = Field(description="Unique identifier for the node", alias="nodeId") + address: StrictStr = Field(description="IP address of the node") + hostname: StrictStr = Field(description="Hostname of the node") + ssh_port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="SSH port for the node", alias="sshPort") + node_types: List[StrictStr] = Field(description="Types of services running on this node [compute,controller,gpu]", alias="nodeTypes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["nodeId", "address", "hostname", "sshPort", "nodeTypes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NodeInformationV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if ssh_port (nullable) is None + # and model_fields_set contains the field + if self.ssh_port is None and "ssh_port" in self.model_fields_set: + _dict['sshPort'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NodeInformationV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nodeId": obj.get("nodeId"), + "address": obj.get("address"), + "hostname": obj.get("hostname"), + "sshPort": obj.get("sshPort"), + "nodeTypes": obj.get("nodeTypes") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/node_list.py b/corellium/models/node_list.py new file mode 100644 index 0000000..9c2f953 --- /dev/null +++ b/corellium/models/node_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.node_information import NodeInformation +from typing import Optional, Set +from typing_extensions import Self + +class NodeList(BaseModel): + """ + NodeList + """ # noqa: E501 + results: List[NodeInformation] = Field(description="List of cluster nodes.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NodeList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NodeList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [NodeInformation.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/node_updates_failed.py b/corellium/models/node_updates_failed.py new file mode 100644 index 0000000..b307331 --- /dev/null +++ b/corellium/models/node_updates_failed.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.node_information_v1 import NodeInformationV1 +from typing import Optional, Set +from typing_extensions import Self + +class NodeUpdatesFailed(BaseModel): + """ + + """ # noqa: E501 + message: Optional[StrictStr] = Field(default=None, description="Instructions to try again or resolve manually") + nodes: Optional[List[NodeInformationV1]] = Field(default=None, description="List of nodes that failed to receive updates.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "nodes"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NodeUpdatesFailed from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in nodes (list) + _items = [] + if self.nodes: + for _item_nodes in self.nodes: + if _item_nodes: + _items.append(_item_nodes.to_dict()) + _dict['nodes'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if nodes (nullable) is None + # and model_fields_set contains the field + if self.nodes is None and "nodes" in self.model_fields_set: + _dict['nodes'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NodeUpdatesFailed from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "nodes": [NodeInformationV1.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/open_id_config.py b/corellium/models/open_id_config.py new file mode 100644 index 0000000..9db85f2 --- /dev/null +++ b/corellium/models/open_id_config.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OpenIDConfig(BaseModel): + """ + OpenIDConfig + """ # noqa: E501 + discovery_url: StrictStr = Field(description="Service Discovery URL.", alias="discoveryUrl") + client_id: StrictStr = Field(description="Service Client ID.", alias="clientId") + client_secret: StrictStr = Field(description="Service Client Secret.", alias="clientSecret") + invited_only: Optional[StrictBool] = Field(default=None, description="Only accept individuals with invitations.", alias="invitedOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["discoveryUrl", "clientId", "clientSecret", "invitedOnly"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenIDConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenIDConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "discoveryUrl": obj.get("discoveryUrl"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "invitedOnly": obj.get("invitedOnly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/open_id_config_v1.py b/corellium/models/open_id_config_v1.py new file mode 100644 index 0000000..e27a526 --- /dev/null +++ b/corellium/models/open_id_config_v1.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OpenIDConfigV1(BaseModel): + """ + + """ # noqa: E501 + discovery_url: Optional[StrictStr] = Field(default=None, description="Service Discovery URL", alias="discoveryUrl") + client_id: Optional[StrictStr] = Field(default=None, description="Service Client ID", alias="clientId") + client_secret: Optional[StrictStr] = Field(default=None, description="Service Client Secret", alias="clientSecret") + invited_only: Optional[StrictBool] = Field(default=None, description="Only accept individuals with invitations", alias="invitedOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["discoveryUrl", "clientId", "clientSecret", "invitedOnly"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenIDConfigV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if discovery_url (nullable) is None + # and model_fields_set contains the field + if self.discovery_url is None and "discovery_url" in self.model_fields_set: + _dict['discoveryUrl'] = None + + # set to None if client_id (nullable) is None + # and model_fields_set contains the field + if self.client_id is None and "client_id" in self.model_fields_set: + _dict['clientId'] = None + + # set to None if client_secret (nullable) is None + # and model_fields_set contains the field + if self.client_secret is None and "client_secret" in self.model_fields_set: + _dict['clientSecret'] = None + + # set to None if invited_only (nullable) is None + # and model_fields_set contains the field + if self.invited_only is None and "invited_only" in self.model_fields_set: + _dict['invitedOnly'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenIDConfigV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "discoveryUrl": obj.get("discoveryUrl"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "invitedOnly": obj.get("invitedOnly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/open_vpn_config.py b/corellium/models/open_vpn_config.py new file mode 100644 index 0000000..c499e26 --- /dev/null +++ b/corellium/models/open_vpn_config.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OpenVPNConfig(BaseModel): + """ + OpenVPNConfig + """ # noqa: E501 + username: Optional[StrictStr] = Field(default=None, description="Username for OpenVPN connection.") + password: Optional[StrictStr] = Field(default=None, description="Password for OpenVPN connection.") + config: StrictStr = Field(description="OpenVPN connection configuration.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "password", "config"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenVPNConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenVPNConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password"), + "config": obj.get("config") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/open_vpn_config_v1.py b/corellium/models/open_vpn_config_v1.py new file mode 100644 index 0000000..236c197 --- /dev/null +++ b/corellium/models/open_vpn_config_v1.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OpenVPNConfigV1(BaseModel): + """ + + """ # noqa: E501 + username: Optional[StrictStr] = Field(default=None, description="Username for OpenVPN connection.") + password: Optional[StrictStr] = Field(default=None, description="Password for OpenVPN connection.") + config: StrictStr = Field(description="OpenVPN connection configuration.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "password", "config"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenVPNConfigV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenVPNConfigV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password"), + "config": obj.get("config") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/open_vpn_network_connection.py b/corellium/models/open_vpn_network_connection.py new file mode 100644 index 0000000..bb4a1c8 --- /dev/null +++ b/corellium/models/open_vpn_network_connection.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.open_vpn_config import OpenVPNConfig +from corellium.models.open_vpn_network_connection_projects_value import OpenVPNNetworkConnectionProjectsValue +from typing import Optional, Set +from typing_extensions import Self + +class OpenVPNNetworkConnection(BaseModel): + """ + OpenVPNNetworkConnection + """ # noqa: E501 + name: StrictStr = Field(description="User friendly name for network connection.") + provider: StrictStr = Field(description="Type of network connection.") + config: Optional[OpenVPNConfig] = None + identifier: StrictStr = Field(description="Unique identifier for the network connection.") + projects: Optional[Dict[str, OpenVPNNetworkConnectionProjectsValue]] = Field(default=None, description="Network states mapped by project IDs.") + created_at: datetime = Field(description="Timestamp when the network connection was created.", alias="createdAt") + updated_at: datetime = Field(description="Timestamp when the network connection was last updated.", alias="updatedAt") + created_by: StrictStr = Field(description="User ID of the creator.", alias="createdBy") + updated_by: StrictStr = Field(description="User ID of the last updater.", alias="updatedBy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "provider", "config", "identifier", "projects", "createdAt", "updatedAt", "createdBy", "updatedBy"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['openvpn']): + raise ValueError("must be one of enum values ('openvpn')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenVPNNetworkConnection from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in projects (dict) + _field_dict = {} + if self.projects: + for _key_projects in self.projects: + if self.projects[_key_projects]: + _field_dict[_key_projects] = self.projects[_key_projects].to_dict() + _dict['projects'] = _field_dict + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenVPNNetworkConnection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "provider": obj.get("provider"), + "config": OpenVPNConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "identifier": obj.get("identifier"), + "projects": dict( + (_k, OpenVPNNetworkConnectionProjectsValue.from_dict(_v)) + for _k, _v in obj["projects"].items() + ) + if obj.get("projects") is not None + else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "createdBy": obj.get("createdBy"), + "updatedBy": obj.get("updatedBy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/open_vpn_network_connection_projects_value.py b/corellium/models/open_vpn_network_connection_projects_value.py new file mode 100644 index 0000000..8769e27 --- /dev/null +++ b/corellium/models/open_vpn_network_connection_projects_value.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OpenVPNNetworkConnectionProjectsValue(BaseModel): + """ + OpenVPNNetworkConnectionProjectsValue + """ # noqa: E501 + state: StrictStr = Field(description="State of the project network connection.") + details: Optional[Dict[str, Any]] = Field(default=None, description="Additional parameters for the network state.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "details"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['disconnected', 'disconnecting', 'connecting', 'connected', 'error']): + raise ValueError("must be one of enum values ('disconnected', 'disconnecting', 'connecting', 'connected', 'error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenVPNNetworkConnectionProjectsValue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenVPNNetworkConnectionProjectsValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "details": obj.get("details") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/open_vpn_network_connection_v1.py b/corellium/models/open_vpn_network_connection_v1.py new file mode 100644 index 0000000..37f2501 --- /dev/null +++ b/corellium/models/open_vpn_network_connection_v1.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.open_vpn_config_v1 import OpenVPNConfigV1 +from corellium.models.project_network_state import ProjectNetworkState +from typing import Optional, Set +from typing_extensions import Self + +class OpenVPNNetworkConnectionV1(BaseModel): + """ + + """ # noqa: E501 + identifier: StrictStr = Field(description="UUIDv4") + provider: StrictStr = Field(description="Type of network connection.") + name: StrictStr = Field(description="User specified name for this network connection. e.g., \"My Network Connection\"") + config: Optional[OpenVPNConfigV1] = None + projects: Optional[Dict[str, ProjectNetworkState]] = Field(default=None, description="An object where the keys are project IDs and the values are {@link ProjectNetworkState} objects representing the state of each project.") + created_at: StrictStr = Field(description="Created Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\"", alias="createdAt") + updated_at: StrictStr = Field(description="Updated Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\"", alias="updatedAt") + created_by: StrictStr = Field(description="UUIDv4 of the user who created this record.", alias="createdBy") + updated_by: StrictStr = Field(description="UUIDv4 of the user who last updated this record.", alias="updatedBy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "provider", "name", "config", "projects", "createdAt", "updatedAt", "createdBy", "updatedBy"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['openvpn']): + raise ValueError("must be one of enum values ('openvpn')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenVPNNetworkConnectionV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in projects (dict) + _field_dict = {} + if self.projects: + for _key_projects in self.projects: + if self.projects[_key_projects]: + _field_dict[_key_projects] = self.projects[_key_projects].to_dict() + _dict['projects'] = _field_dict + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + # set to None if projects (nullable) is None + # and model_fields_set contains the field + if self.projects is None and "projects" in self.model_fields_set: + _dict['projects'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenVPNNetworkConnectionV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "provider": obj.get("provider"), + "name": obj.get("name"), + "config": OpenVPNConfigV1.from_dict(obj["config"]) if obj.get("config") is not None else None, + "projects": dict( + (_k, ProjectNetworkState.from_dict(_v)) + for _k, _v in obj["projects"].items() + ) + if obj.get("projects") is not None + else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "createdBy": obj.get("createdBy"), + "updatedBy": obj.get("updatedBy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/paginated_assessments.py b/corellium/models/paginated_assessments.py new file mode 100644 index 0000000..c626f98 --- /dev/null +++ b/corellium/models/paginated_assessments.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from corellium.models.assessment import Assessment +from typing import Optional, Set +from typing_extensions import Self + +class PaginatedAssessments(BaseModel): + """ + PaginatedAssessments + """ # noqa: E501 + limit: StrictInt = Field(description="Maximum number of assessments requested.") + offset: StrictInt = Field(description="Number of assessments skipped before this page.") + count: StrictInt = Field(description="Number of assessments returned in this page.") + total: StrictInt = Field(description="Total number of assessments for the instance.") + results: List[Assessment] = Field(description="The page of assessments.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["limit", "offset", "count", "total", "results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginatedAssessments from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginatedAssessments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "total": obj.get("total"), + "results": [Assessment.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/pagination.py b/corellium/models/pagination.py new file mode 100644 index 0000000..98a499b --- /dev/null +++ b/corellium/models/pagination.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class Pagination(BaseModel): + """ + + """ # noqa: E501 + current_page: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The current page", alias="currentPage") + total_pages: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of pages", alias="totalPages") + total_items: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of activity entries", alias="totalItems") + items_per_page: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of activity entries per page", alias="itemsPerPage") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["currentPage", "totalPages", "totalItems", "itemsPerPage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Pagination from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if current_page (nullable) is None + # and model_fields_set contains the field + if self.current_page is None and "current_page" in self.model_fields_set: + _dict['currentPage'] = None + + # set to None if total_pages (nullable) is None + # and model_fields_set contains the field + if self.total_pages is None and "total_pages" in self.model_fields_set: + _dict['totalPages'] = None + + # set to None if total_items (nullable) is None + # and model_fields_set contains the field + if self.total_items is None and "total_items" in self.model_fields_set: + _dict['totalItems'] = None + + # set to None if items_per_page (nullable) is None + # and model_fields_set contains the field + if self.items_per_page is None and "items_per_page" in self.model_fields_set: + _dict['itemsPerPage'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Pagination from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "currentPage": obj.get("currentPage"), + "totalPages": obj.get("totalPages"), + "totalItems": obj.get("totalItems"), + "itemsPerPage": obj.get("itemsPerPage") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/partial_update_interconnect_request.py b/corellium/models/partial_update_interconnect_request.py new file mode 100644 index 0000000..008800d --- /dev/null +++ b/corellium/models/partial_update_interconnect_request.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PartialUpdateInterconnectRequest(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the interconnect (optional)") + interfaces: Optional[List[Dict[str, Any]]] = Field(default=None, description="Array of interfaces with deviceId and interfaceId (optional)") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "interfaces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PartialUpdateInterconnectRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if interfaces (nullable) is None + # and model_fields_set contains the field + if self.interfaces is None and "interfaces" in self.model_fields_set: + _dict['interfaces'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PartialUpdateInterconnectRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "interfaces": obj.get("interfaces") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/partial_update_network_connection_body.py b/corellium/models/partial_update_network_connection_body.py new file mode 100644 index 0000000..75071e0 --- /dev/null +++ b/corellium/models/partial_update_network_connection_body.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.network_connection_config import NetworkConnectionConfig +from typing import Optional, Set +from typing_extensions import Self + +class PartialUpdateNetworkConnectionBody(BaseModel): + """ + PartialUpdateNetworkConnectionBody + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="User friendly name for Network connection.") + config: Optional[NetworkConnectionConfig] = None + force: Optional[StrictBool] = Field(default=False, description="Force the operation through constraint checks (e.g. stopping active instances).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "config", "force"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PartialUpdateNetworkConnectionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PartialUpdateNetworkConnectionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "config": NetworkConnectionConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "force": obj.get("force") if obj.get("force") is not None else False + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/partial_update_network_connection_options.py b/corellium/models/partial_update_network_connection_options.py new file mode 100644 index 0000000..dd9e3b7 --- /dev/null +++ b/corellium/models/partial_update_network_connection_options.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.update_network_connection_options_config import UpdateNetworkConnectionOptionsConfig +from typing import Optional, Set +from typing_extensions import Self + +class PartialUpdateNetworkConnectionOptions(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="User specified name for this network connection. e.g. My Network Connection") + config: Optional[UpdateNetworkConnectionOptionsConfig] = None + force: Optional[StrictBool] = Field(default=None, description="Force the update through constraint checks (e.g. stopping active instances). Defaults to false.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "config", "force"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PartialUpdateNetworkConnectionOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + # set to None if force (nullable) is None + # and model_fields_set contains the field + if self.force is None and "force" in self.model_fields_set: + _dict['force'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PartialUpdateNetworkConnectionOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "config": UpdateNetworkConnectionOptionsConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "force": obj.get("force") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/password_change_body.py b/corellium/models/password_change_body.py new file mode 100644 index 0000000..ce7401e --- /dev/null +++ b/corellium/models/password_change_body.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PasswordChangeBody(BaseModel): + """ + + """ # noqa: E501 + user: StrictStr = Field(description="userId") + old_password: StrictStr = Field(description="old password", alias="old-password") + new_password: StrictStr = Field(description="new password", alias="new-password") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user", "old-password", "new-password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PasswordChangeBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PasswordChangeBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user": obj.get("user"), + "old-password": obj.get("old-password"), + "new-password": obj.get("new-password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/password_reset_body.py b/corellium/models/password_reset_body.py new file mode 100644 index 0000000..b28cd05 --- /dev/null +++ b/corellium/models/password_reset_body.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PasswordResetBody(BaseModel): + """ + + """ # noqa: E501 + token: StrictStr = Field(description="Password reset token") + totp_token: StrictStr = Field(description="Password reset totpToken", alias="totpToken") + new_password: StrictStr = Field(description="new password", alias="new-password") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token", "totpToken", "new-password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PasswordResetBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PasswordResetBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "totpToken": obj.get("totpToken"), + "new-password": obj.get("new-password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_cluster_config_body.py b/corellium/models/patch_cluster_config_body.py new file mode 100644 index 0000000..563d275 --- /dev/null +++ b/corellium/models/patch_cluster_config_body.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.ai_tools_config import AiToolsConfig +from corellium.models.coordinator_config import CoordinatorConfig +from typing import Optional, Set +from typing_extensions import Self + +class PatchClusterConfigBody(BaseModel): + """ + PatchClusterConfigBody + """ # noqa: E501 + snapshot_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Maximum number of snapshots that can be taken in the cluster.", alias="snapshotLimit") + coordinator_config: Optional[CoordinatorConfig] = Field(default=None, alias="coordinatorConfig") + ai_tools_config: Optional[AiToolsConfig] = Field(default=None, description="Partial AI tools configuration to update.", alias="aiToolsConfig") + originating_node: Optional[StrictStr] = Field(default=None, description="IP address of the node that originated this config change; prevents re-broadcast.", alias="originatingNode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["snapshotLimit", "coordinatorConfig", "aiToolsConfig", "originatingNode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchClusterConfigBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of coordinator_config + if self.coordinator_config: + _dict['coordinatorConfig'] = self.coordinator_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of ai_tools_config + if self.ai_tools_config: + _dict['aiToolsConfig'] = self.ai_tools_config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchClusterConfigBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "snapshotLimit": obj.get("snapshotLimit"), + "coordinatorConfig": CoordinatorConfig.from_dict(obj["coordinatorConfig"]) if obj.get("coordinatorConfig") is not None else None, + "aiToolsConfig": AiToolsConfig.from_dict(obj["aiToolsConfig"]) if obj.get("aiToolsConfig") is not None else None, + "originatingNode": obj.get("originatingNode") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_domain_auth_provider_body.py b/corellium/models/patch_domain_auth_provider_body.py new file mode 100644 index 0000000..58cf85d --- /dev/null +++ b/corellium/models/patch_domain_auth_provider_body.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.domain_auth_provider_config import DomainAuthProviderConfig +from typing import Optional, Set +from typing_extensions import Self + +class PatchDomainAuthProviderBody(BaseModel): + """ + PatchDomainAuthProviderBody + """ # noqa: E501 + provider_type: Optional[StrictStr] = Field(default=None, description="Provider type.", alias="providerType") + enabled: Optional[StrictBool] = Field(default=None, description="Whether the provider is enabled.") + label: Optional[StrictStr] = Field(default=None, description="Login button text.") + config: Optional[DomainAuthProviderConfig] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["providerType", "enabled", "label", "config"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchDomainAuthProviderBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchDomainAuthProviderBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "enabled": obj.get("enabled"), + "label": obj.get("label"), + "config": DomainAuthProviderConfig.from_dict(obj["config"]) if obj.get("config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_domain_body.py b/corellium/models/patch_domain_body.py new file mode 100644 index 0000000..a90d832 --- /dev/null +++ b/corellium/models/patch_domain_body.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.allowed_devices_filter_schema import AllowedDevicesFilterSchema +from corellium.models.device_auto_shutdown_schema import DeviceAutoShutdownSchema +from corellium.models.patch_domain_body_webplayer import PatchDomainBodyWebplayer +from corellium.models.snapshot_sharing_permissions_request_schema import SnapshotSharingPermissionsRequestSchema +from corellium.models.trial_extension import TrialExtension +from typing import Optional, Set +from typing_extensions import Self + +class PatchDomainBody(BaseModel): + """ + PatchDomainBody + """ # noqa: E501 + totp_required: Optional[StrictBool] = Field(default=None, description="If true, every user in the domain must set up two-factor sign-in with a time-based one-time password (TOTP) authenticator app before they can use the platform.", alias="totpRequired") + trial_extension: Optional[TrialExtension] = Field(default=None, alias="trialExtension") + device_auto_shutdown: Optional[DeviceAutoShutdownSchema] = Field(default=None, alias="deviceAutoShutdown") + allowed_devices_filters: Optional[List[AllowedDevicesFilterSchema]] = Field(default=None, description="Device/firmware allowlist filters.", alias="allowedDevicesFilters") + webplayer: Optional[PatchDomainBodyWebplayer] = None + snapshot_sharing_permissions: Optional[SnapshotSharingPermissionsRequestSchema] = Field(default=None, alias="snapshotSharingPermissions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totpRequired", "trialExtension", "deviceAutoShutdown", "allowedDevicesFilters", "webplayer", "snapshotSharingPermissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchDomainBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trial_extension + if self.trial_extension: + _dict['trialExtension'] = self.trial_extension.to_dict() + # override the default output from pydantic by calling `to_dict()` of device_auto_shutdown + if self.device_auto_shutdown: + _dict['deviceAutoShutdown'] = self.device_auto_shutdown.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in allowed_devices_filters (list) + _items = [] + if self.allowed_devices_filters: + for _item_allowed_devices_filters in self.allowed_devices_filters: + if _item_allowed_devices_filters: + _items.append(_item_allowed_devices_filters.to_dict()) + _dict['allowedDevicesFilters'] = _items + # override the default output from pydantic by calling `to_dict()` of webplayer + if self.webplayer: + _dict['webplayer'] = self.webplayer.to_dict() + # override the default output from pydantic by calling `to_dict()` of snapshot_sharing_permissions + if self.snapshot_sharing_permissions: + _dict['snapshotSharingPermissions'] = self.snapshot_sharing_permissions.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchDomainBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totpRequired": obj.get("totpRequired"), + "trialExtension": TrialExtension.from_dict(obj["trialExtension"]) if obj.get("trialExtension") is not None else None, + "deviceAutoShutdown": DeviceAutoShutdownSchema.from_dict(obj["deviceAutoShutdown"]) if obj.get("deviceAutoShutdown") is not None else None, + "allowedDevicesFilters": [AllowedDevicesFilterSchema.from_dict(_item) for _item in obj["allowedDevicesFilters"]] if obj.get("allowedDevicesFilters") is not None else None, + "webplayer": PatchDomainBodyWebplayer.from_dict(obj["webplayer"]) if obj.get("webplayer") is not None else None, + "snapshotSharingPermissions": SnapshotSharingPermissionsRequestSchema.from_dict(obj["snapshotSharingPermissions"]) if obj.get("snapshotSharingPermissions") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_domain_body_webplayer.py b/corellium/models/patch_domain_body_webplayer.py new file mode 100644 index 0000000..e3de285 --- /dev/null +++ b/corellium/models/patch_domain_body_webplayer.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PatchDomainBodyWebplayer(BaseModel): + """ + Web player settings. + """ # noqa: E501 + allowed_domains: Optional[List[StrictStr]] = Field(default=None, description="Domains permitted to embed the web player.", alias="allowedDomains") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["allowedDomains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchDomainBodyWebplayer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchDomainBodyWebplayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedDomains": obj.get("allowedDomains") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_domain_welcome_message_body.py b/corellium/models/patch_domain_welcome_message_body.py new file mode 100644 index 0000000..15cf705 --- /dev/null +++ b/corellium/models/patch_domain_welcome_message_body.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PatchDomainWelcomeMessageBody(BaseModel): + """ + PatchDomainWelcomeMessageBody + """ # noqa: E501 + message: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The welcome message text (HTML allowed, will be sanitized).") + enabled: Optional[StrictBool] = Field(default=None, description="Whether the welcome message is shown to users.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchDomainWelcomeMessageBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchDomainWelcomeMessageBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_firmware_service_config_body.py b/corellium/models/patch_firmware_service_config_body.py new file mode 100644 index 0000000..0bf04fb --- /dev/null +++ b/corellium/models/patch_firmware_service_config_body.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.ipsw_filter_v3 import IpswFilterV3 +from typing import Optional, Set +from typing_extensions import Self + +class PatchFirmwareServiceConfigBody(BaseModel): + """ + PatchFirmwareServiceConfigBody + """ # noqa: E501 + cache_firmware: Optional[StrictBool] = Field(default=None, description="Cache firmwares in /var/ipsw.", alias="cacheFirmware") + cluster_firmware_assets: Optional[StrictBool] = Field(default=None, description="Assets are cluster-wide.", alias="clusterFirmwareAssets") + fallback_original_url: Optional[StrictBool] = Field(default=None, description="Use original URL to fetch firmware.", alias="fallbackOriginalUrl") + fetch_firmware_assets: Optional[StrictBool] = Field(default=None, description="Automatically fetch assets.", alias="fetchFirmwareAssets") + should_download: Optional[StrictBool] = Field(default=None, description="Download firmwares.", alias="shouldDownload") + download_ipsw_filters: Optional[List[IpswFilterV3]] = Field(default=None, description="Filters controlling which IPSW builds are downloaded.", alias="downloadIpswFilters") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cacheFirmware", "clusterFirmwareAssets", "fallbackOriginalUrl", "fetchFirmwareAssets", "shouldDownload", "downloadIpswFilters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchFirmwareServiceConfigBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in download_ipsw_filters (list) + _items = [] + if self.download_ipsw_filters: + for _item_download_ipsw_filters in self.download_ipsw_filters: + if _item_download_ipsw_filters: + _items.append(_item_download_ipsw_filters.to_dict()) + _dict['downloadIpswFilters'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchFirmwareServiceConfigBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cacheFirmware": obj.get("cacheFirmware"), + "clusterFirmwareAssets": obj.get("clusterFirmwareAssets"), + "fallbackOriginalUrl": obj.get("fallbackOriginalUrl"), + "fetchFirmwareAssets": obj.get("fetchFirmwareAssets"), + "shouldDownload": obj.get("shouldDownload"), + "downloadIpswFilters": [IpswFilterV3.from_dict(_item) for _item in obj["downloadIpswFilters"]] if obj.get("downloadIpswFilters") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_instance_body.py b/corellium/models/patch_instance_body.py new file mode 100644 index 0000000..be1ddc3 --- /dev/null +++ b/corellium/models/patch_instance_body.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.instance_boot_options import InstanceBootOptions +from corellium.models.patch_instance_body_proxy_inner import PatchInstanceBodyProxyInner +from corellium.models.patch_instance_body_strace_filter_inner import PatchInstanceBodyStraceFilterInner +from typing import Optional, Set +from typing_extensions import Self + +class PatchInstanceBody(BaseModel): + """ + PatchInstanceBody + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the device.") + boot_options: Optional[InstanceBootOptions] = Field(default=None, description="The desired boot options.", alias="bootOptions") + proxy: Optional[List[PatchInstanceBodyProxyInner]] = Field(default=None, description="Port proxy configurations for the instance.") + strace_filter: Optional[List[PatchInstanceBodyStraceFilterInner]] = Field(default=None, description="CoreTrace process filter.", alias="straceFilter") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "bootOptions", "proxy", "straceFilter"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchInstanceBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of boot_options + if self.boot_options: + _dict['bootOptions'] = self.boot_options.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in proxy (list) + _items = [] + if self.proxy: + for _item_proxy in self.proxy: + if _item_proxy: + _items.append(_item_proxy.to_dict()) + _dict['proxy'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in strace_filter (list) + _items = [] + if self.strace_filter: + for _item_strace_filter in self.strace_filter: + if _item_strace_filter: + _items.append(_item_strace_filter.to_dict()) + _dict['straceFilter'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchInstanceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "bootOptions": InstanceBootOptions.from_dict(obj["bootOptions"]) if obj.get("bootOptions") is not None else None, + "proxy": [PatchInstanceBodyProxyInner.from_dict(_item) for _item in obj["proxy"]] if obj.get("proxy") is not None else None, + "straceFilter": [PatchInstanceBodyStraceFilterInner.from_dict(_item) for _item in obj["straceFilter"]] if obj.get("straceFilter") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_instance_body_proxy_inner.py b/corellium/models/patch_instance_body_proxy_inner.py new file mode 100644 index 0000000..89dccb3 --- /dev/null +++ b/corellium/models/patch_instance_body_proxy_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class PatchInstanceBodyProxyInner(BaseModel): + """ + PatchInstanceBodyProxyInner + """ # noqa: E501 + device_port: Union[StrictFloat, StrictInt] = Field(description="The device port to use for proxying.", alias="devicePort") + first_available: StrictBool = Field(description="Use the first available port if devicePort is unavailable.", alias="firstAvailable") + expose: StrictBool = Field(description="Expose the proxy to the external interface.") + router_port: Union[StrictFloat, StrictInt] = Field(description="The router port to use for proxying.", alias="routerPort") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["devicePort", "firstAvailable", "expose", "routerPort"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchInstanceBodyProxyInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchInstanceBodyProxyInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "devicePort": obj.get("devicePort"), + "firstAvailable": obj.get("firstAvailable"), + "expose": obj.get("expose"), + "routerPort": obj.get("routerPort") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_instance_body_strace_filter_inner.py b/corellium/models/patch_instance_body_strace_filter_inner.py new file mode 100644 index 0000000..475f021 --- /dev/null +++ b/corellium/models/patch_instance_body_strace_filter_inner.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PatchInstanceBodyStraceFilterInner(BaseModel): + """ + PatchInstanceBodyStraceFilterInner + """ # noqa: E501 + trait: StrictStr = Field(description="Filter trait.") + value: StrictStr = Field(description="Value to match.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["trait", "value"] + + @field_validator('trait') + def trait_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['name', 'pid', 'tid']): + raise ValueError("must be one of enum values ('name', 'pid', 'tid')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchInstanceBodyStraceFilterInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchInstanceBodyStraceFilterInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "trait": obj.get("trait"), + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_instance_options.py b/corellium/models/patch_instance_options.py new file mode 100644 index 0000000..8310803 --- /dev/null +++ b/corellium/models/patch_instance_options.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.instance_boot_options_v1 import InstanceBootOptionsV1 +from corellium.models.proxy_config import ProxyConfig +from typing import Optional, Set +from typing_extensions import Self + +class PatchInstanceOptions(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="the name of the device") + state: Optional[StrictStr] = Field(default=None, description="the desired state of the device") + boot_options: Optional[InstanceBootOptionsV1] = Field(default=None, alias="bootOptions") + proxy: Optional[List[ProxyConfig]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "state", "bootOptions", "proxy"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['on', 'off', 'paused', 'deleting']): + raise ValueError("must be one of enum values ('on', 'off', 'paused', 'deleting')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchInstanceOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of boot_options + if self.boot_options: + _dict['bootOptions'] = self.boot_options.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in proxy (list) + _items = [] + if self.proxy: + for _item_proxy in self.proxy: + if _item_proxy: + _items.append(_item_proxy.to_dict()) + _dict['proxy'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict['state'] = None + + # set to None if proxy (nullable) is None + # and model_fields_set contains the field + if self.proxy is None and "proxy" in self.model_fields_set: + _dict['proxy'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchInstanceOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "state": obj.get("state"), + "bootOptions": InstanceBootOptionsV1.from_dict(obj["bootOptions"]) if obj.get("bootOptions") is not None else None, + "proxy": [ProxyConfig.from_dict(_item) for _item in obj["proxy"]] if obj.get("proxy") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_instance_read_only.py b/corellium/models/patch_instance_read_only.py new file mode 100644 index 0000000..37a8c6c --- /dev/null +++ b/corellium/models/patch_instance_read_only.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PatchInstanceReadOnly(BaseModel): + """ + + """ # noqa: E501 + read_only: Optional[StrictStr] = Field(default=None, description="The desired state of readOnly. Possible values: 'enabled', 'disabled'.", alias="readOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["readOnly"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchInstanceReadOnly from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if read_only (nullable) is None + # and model_fields_set contains the field + if self.read_only is None and "read_only" in self.model_fields_set: + _dict['readOnly'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchInstanceReadOnly from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "readOnly": obj.get("readOnly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_instance_read_only_body.py b/corellium/models/patch_instance_read_only_body.py new file mode 100644 index 0000000..cfb5043 --- /dev/null +++ b/corellium/models/patch_instance_read_only_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PatchInstanceReadOnlyBody(BaseModel): + """ + PatchInstanceReadOnlyBody + """ # noqa: E501 + read_only: StrictBool = Field(description="Desired read-only state, true enables read-only.", alias="readOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["readOnly"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchInstanceReadOnlyBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchInstanceReadOnlyBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "readOnly": obj.get("readOnly") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_interconnect_body.py b/corellium/models/patch_interconnect_body.py new file mode 100644 index 0000000..60726c7 --- /dev/null +++ b/corellium/models/patch_interconnect_body.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.interfaces_schema_inner import InterfacesSchemaInner +from typing import Optional, Set +from typing_extensions import Self + +class PatchInterconnectBody(BaseModel): + """ + PatchInterconnectBody + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A name to recognise the interconnect by.") + interfaces: Optional[List[InterfacesSchemaInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "interfaces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchInterconnectBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in interfaces (list) + _items = [] + if self.interfaces: + for _item_interfaces in self.interfaces: + if _item_interfaces: + _items.append(_item_interfaces.to_dict()) + _dict['interfaces'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchInterconnectBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "interfaces": [InterfacesSchemaInner.from_dict(_item) for _item in obj["interfaces"]] if obj.get("interfaces") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_project_body.py b/corellium/models/patch_project_body.py new file mode 100644 index 0000000..561a472 --- /dev/null +++ b/corellium/models/patch_project_body.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.project_quota_input import ProjectQuotaInput +from corellium.models.project_settings import ProjectSettings +from typing import Optional, Set +from typing_extensions import Self + +class PatchProjectBody(BaseModel): + """ + PatchProjectBody + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="New project name.") + settings: Optional[ProjectSettings] = Field(default=None, description="Project settings to update. Provided fields are merged into the existing settings; omitted fields are preserved.") + quotas: Optional[ProjectQuotaInput] = Field(default=None, description="Updated resource quotas.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "settings", "quotas"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchProjectBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchProjectBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "settings": ProjectSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "quotas": ProjectQuotaInput.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/patch_user_body.py b/corellium/models/patch_user_body.py new file mode 100644 index 0000000..d642dd7 --- /dev/null +++ b/corellium/models/patch_user_body.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PatchUserBody(BaseModel): + """ + PatchUserBody + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Username.") + label: Optional[StrictStr] = Field(default=None, description="User label (e.g. \"Domain Administrator\").") + email: Optional[StrictStr] = Field(default=None, description="User email.") + cluster_administrator: Optional[StrictBool] = Field(default=None, description="Whether the user is a cluster administrator (cluster admins only).", alias="clusterAdministrator") + password: Optional[StrictStr] = Field(default=None, description="Password (optional when using SSO).") + misc: Optional[Dict[str, Any]] = Field(default=None, description="Opaque metadata.") + administrator: Optional[StrictBool] = Field(default=None, description="Whether the user is a domain administrator (domain admins only).") + agreed_to_terms: Optional[StrictStr] = Field(default=None, description="Timestamp the terms were agreed to.", alias="agreedToTerms") + totp_enabled: Optional[StrictBool] = Field(default=None, description="Whether two-factor authentication is enabled.", alias="totpEnabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "label", "email", "clusterAdministrator", "password", "misc", "administrator", "agreedToTerms", "totpEnabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PatchUserBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PatchUserBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "label": obj.get("label"), + "email": obj.get("email"), + "clusterAdministrator": obj.get("clusterAdministrator"), + "password": obj.get("password"), + "misc": obj.get("misc"), + "administrator": obj.get("administrator"), + "agreedToTerms": obj.get("agreedToTerms"), + "totpEnabled": obj.get("totpEnabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/peripherals_data.py b/corellium/models/peripherals_data.py new file mode 100644 index 0000000..2679f9b --- /dev/null +++ b/corellium/models/peripherals_data.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PeripheralsData(BaseModel): + """ + Peripheral readings and settings. Responses include only fields reported by the compute node; no field is guaranteed to be present. An absent field does not imply a zero or false value. All fields are optional to support partial updates. Writes require the corresponding feature to be enabled; settings for disabled features are ignored: - deviceMotion: acceleration, gyroscope, magnetic, orientation. - deviceEnvironmentControl: temperature, proximity, light, pressure, humidity. - deviceLocation: gpsLat, gpsLon, gpsAlt, gpsToffs. - deviceBattery: acOnline, batteryPresent, batteryStatus, batteryHealth, batteryCapacity. - biometricBypass: biometricPass. These write restrictions do not determine which fields are returned by GET. + """ # noqa: E501 + acceleration: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Accelerometer reading as [x, y, z].") + gyroscope: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Gyroscope reading as [x, y, z].") + magnetic: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Magnetometer reading as [x, y, z].") + orientation: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Device orientation vector.") + temperature: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Ambient temperature reading.") + proximity: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Proximity sensor reading.") + light: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Ambient light sensor reading.") + pressure: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Barometric pressure reading.") + humidity: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Relative humidity reading.") + gps_lat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="GPS latitude in decimal degrees.", alias="gpsLat") + gps_lon: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="GPS longitude in decimal degrees.", alias="gpsLon") + gps_alt: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="GPS altitude in meters.", alias="gpsAlt") + gps_toffs: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="GPS time offset in seconds.", alias="gpsToffs") + ac_online: Optional[StrictInt] = Field(default=None, description="AC power connection: 0 = disconnected, 1 = connected.", alias="acOnline") + battery_present: Optional[StrictInt] = Field(default=None, description="Battery presence: 0 = absent, 1 = present.", alias="batteryPresent") + battery_status: Optional[StrictStr] = Field(default=None, description="Battery charging status.", alias="batteryStatus") + battery_health: Optional[StrictStr] = Field(default=None, description="Battery health.", alias="batteryHealth") + battery_capacity: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Battery charge level as a percentage.", alias="batteryCapacity") + biometric_pass: Optional[StrictInt] = Field(default=None, description="Biometric bypass: 0 = disabled, 1 = enabled.", alias="biometricPass") + __properties: ClassVar[List[str]] = ["acceleration", "gyroscope", "magnetic", "orientation", "temperature", "proximity", "light", "pressure", "humidity", "gpsLat", "gpsLon", "gpsAlt", "gpsToffs", "acOnline", "batteryPresent", "batteryStatus", "batteryHealth", "batteryCapacity", "biometricPass"] + + @field_validator('ac_online') + def ac_online_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([0, 1]): + raise ValueError("must be one of enum values (0, 1)") + return value + + @field_validator('battery_present') + def battery_present_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([0, 1]): + raise ValueError("must be one of enum values (0, 1)") + return value + + @field_validator('battery_status') + def battery_status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['charging', 'discharging', 'not-charging']): + raise ValueError("must be one of enum values ('charging', 'discharging', 'not-charging')") + return value + + @field_validator('battery_health') + def battery_health_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['good', 'overheat', 'dead', 'overvolt', 'failure']): + raise ValueError("must be one of enum values ('good', 'overheat', 'dead', 'overvolt', 'failure')") + return value + + @field_validator('biometric_pass') + def biometric_pass_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([0, 1]): + raise ValueError("must be one of enum values (0, 1)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PeripheralsData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PeripheralsData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "acceleration": obj.get("acceleration"), + "gyroscope": obj.get("gyroscope"), + "magnetic": obj.get("magnetic"), + "orientation": obj.get("orientation"), + "temperature": obj.get("temperature"), + "proximity": obj.get("proximity"), + "light": obj.get("light"), + "pressure": obj.get("pressure"), + "humidity": obj.get("humidity"), + "gpsLat": obj.get("gpsLat"), + "gpsLon": obj.get("gpsLon"), + "gpsAlt": obj.get("gpsAlt"), + "gpsToffs": obj.get("gpsToffs"), + "acOnline": obj.get("acOnline"), + "batteryPresent": obj.get("batteryPresent"), + "batteryStatus": obj.get("batteryStatus"), + "batteryHealth": obj.get("batteryHealth"), + "batteryCapacity": obj.get("batteryCapacity"), + "biometricPass": obj.get("biometricPass") + }) + return _obj + + diff --git a/corellium/models/peripherals_data_v1.py b/corellium/models/peripherals_data_v1.py new file mode 100644 index 0000000..ec63241 --- /dev/null +++ b/corellium/models/peripherals_data_v1.py @@ -0,0 +1,252 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PeripheralsDataV1(BaseModel): + """ + + """ # noqa: E501 + acceleration: Optional[List[Union[StrictFloat, StrictInt]]] = None + gyroscope: Optional[List[Union[StrictFloat, StrictInt]]] = None + magnetic: Optional[List[Union[StrictFloat, StrictInt]]] = None + orientation: Optional[List[Union[StrictFloat, StrictInt]]] = None + temperature: Optional[Union[StrictFloat, StrictInt]] = None + proximity: Optional[Union[StrictFloat, StrictInt]] = None + light: Optional[Union[StrictFloat, StrictInt]] = None + pressure: Optional[Union[StrictFloat, StrictInt]] = None + humidity: Optional[Union[StrictFloat, StrictInt]] = None + gps_lat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="gpsLat") + gps_lon: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="gpsLon") + gps_alt: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="gpsAlt") + gps_toffs: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="GPS time offset in seconds.", alias="gpsToffs") + ac_online: Optional[StrictInt] = Field(default=None, description="Whether the device is on AC power (0 or 1).", alias="acOnline") + battery_present: Optional[StrictInt] = Field(default=None, description="Whether a battery is present (0 or 1).", alias="batteryPresent") + battery_status: Optional[StrictStr] = Field(default=None, description="Battery charging status", alias="batteryStatus") + battery_health: Optional[StrictStr] = Field(default=None, description="Battery health", alias="batteryHealth") + battery_capacity: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="batteryCapacity") + biometric_pass: Optional[StrictInt] = Field(default=None, description="Whether biometric authentication passes (0 or 1).", alias="biometricPass") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["acceleration", "gyroscope", "magnetic", "orientation", "temperature", "proximity", "light", "pressure", "humidity", "gpsLat", "gpsLon", "gpsAlt", "gpsToffs", "acOnline", "batteryPresent", "batteryStatus", "batteryHealth", "batteryCapacity", "biometricPass"] + + @field_validator('battery_status') + def battery_status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['charging', 'discharging', 'not-charging']): + raise ValueError("must be one of enum values ('charging', 'discharging', 'not-charging')") + return value + + @field_validator('battery_health') + def battery_health_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['good', 'overheat', 'dead', 'overvolt', 'failure']): + raise ValueError("must be one of enum values ('good', 'overheat', 'dead', 'overvolt', 'failure')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PeripheralsDataV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if acceleration (nullable) is None + # and model_fields_set contains the field + if self.acceleration is None and "acceleration" in self.model_fields_set: + _dict['acceleration'] = None + + # set to None if gyroscope (nullable) is None + # and model_fields_set contains the field + if self.gyroscope is None and "gyroscope" in self.model_fields_set: + _dict['gyroscope'] = None + + # set to None if magnetic (nullable) is None + # and model_fields_set contains the field + if self.magnetic is None and "magnetic" in self.model_fields_set: + _dict['magnetic'] = None + + # set to None if orientation (nullable) is None + # and model_fields_set contains the field + if self.orientation is None and "orientation" in self.model_fields_set: + _dict['orientation'] = None + + # set to None if temperature (nullable) is None + # and model_fields_set contains the field + if self.temperature is None and "temperature" in self.model_fields_set: + _dict['temperature'] = None + + # set to None if proximity (nullable) is None + # and model_fields_set contains the field + if self.proximity is None and "proximity" in self.model_fields_set: + _dict['proximity'] = None + + # set to None if light (nullable) is None + # and model_fields_set contains the field + if self.light is None and "light" in self.model_fields_set: + _dict['light'] = None + + # set to None if pressure (nullable) is None + # and model_fields_set contains the field + if self.pressure is None and "pressure" in self.model_fields_set: + _dict['pressure'] = None + + # set to None if humidity (nullable) is None + # and model_fields_set contains the field + if self.humidity is None and "humidity" in self.model_fields_set: + _dict['humidity'] = None + + # set to None if gps_lat (nullable) is None + # and model_fields_set contains the field + if self.gps_lat is None and "gps_lat" in self.model_fields_set: + _dict['gpsLat'] = None + + # set to None if gps_lon (nullable) is None + # and model_fields_set contains the field + if self.gps_lon is None and "gps_lon" in self.model_fields_set: + _dict['gpsLon'] = None + + # set to None if gps_alt (nullable) is None + # and model_fields_set contains the field + if self.gps_alt is None and "gps_alt" in self.model_fields_set: + _dict['gpsAlt'] = None + + # set to None if gps_toffs (nullable) is None + # and model_fields_set contains the field + if self.gps_toffs is None and "gps_toffs" in self.model_fields_set: + _dict['gpsToffs'] = None + + # set to None if ac_online (nullable) is None + # and model_fields_set contains the field + if self.ac_online is None and "ac_online" in self.model_fields_set: + _dict['acOnline'] = None + + # set to None if battery_present (nullable) is None + # and model_fields_set contains the field + if self.battery_present is None and "battery_present" in self.model_fields_set: + _dict['batteryPresent'] = None + + # set to None if battery_status (nullable) is None + # and model_fields_set contains the field + if self.battery_status is None and "battery_status" in self.model_fields_set: + _dict['batteryStatus'] = None + + # set to None if battery_health (nullable) is None + # and model_fields_set contains the field + if self.battery_health is None and "battery_health" in self.model_fields_set: + _dict['batteryHealth'] = None + + # set to None if battery_capacity (nullable) is None + # and model_fields_set contains the field + if self.battery_capacity is None and "battery_capacity" in self.model_fields_set: + _dict['batteryCapacity'] = None + + # set to None if biometric_pass (nullable) is None + # and model_fields_set contains the field + if self.biometric_pass is None and "biometric_pass" in self.model_fields_set: + _dict['biometricPass'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PeripheralsDataV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "acceleration": obj.get("acceleration"), + "gyroscope": obj.get("gyroscope"), + "magnetic": obj.get("magnetic"), + "orientation": obj.get("orientation"), + "temperature": obj.get("temperature"), + "proximity": obj.get("proximity"), + "light": obj.get("light"), + "pressure": obj.get("pressure"), + "humidity": obj.get("humidity"), + "gpsLat": obj.get("gpsLat"), + "gpsLon": obj.get("gpsLon"), + "gpsAlt": obj.get("gpsAlt"), + "gpsToffs": obj.get("gpsToffs"), + "acOnline": obj.get("acOnline"), + "batteryPresent": obj.get("batteryPresent"), + "batteryStatus": obj.get("batteryStatus"), + "batteryHealth": obj.get("batteryHealth"), + "batteryCapacity": obj.get("batteryCapacity"), + "biometricPass": obj.get("biometricPass") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/plan.py b/corellium/models/plan.py new file mode 100644 index 0000000..fc36fcf --- /dev/null +++ b/corellium/models/plan.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Plan(BaseModel): + """ + Plan options + """ # noqa: E501 + license_type: StrictStr = Field(alias="licenseType") + cores: StrictInt = Field(description="Number of CPU cores") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["licenseType", "cores"] + + @field_validator('license_type') + def license_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['premium', 'individual', 'standard', 'enterprise', 'individual-usage', 'enterprise-usage', 'unrestricted']): + raise ValueError("must be one of enum values ('premium', 'individual', 'standard', 'enterprise', 'individual-usage', 'enterprise-usage', 'unrestricted')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Plan from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Plan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "licenseType": obj.get("licenseType"), + "cores": obj.get("cores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/plan_v1.py b/corellium/models/plan_v1.py new file mode 100644 index 0000000..af26588 --- /dev/null +++ b/corellium/models/plan_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PlanV1(BaseModel): + """ + + """ # noqa: E501 + plan_id: Optional[StrictStr] = Field(default=None, description="Plan ID", alias="planId") + name: Optional[StrictStr] = Field(default=None, description="Plan Name") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["planId", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PlanV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if plan_id (nullable) is None + # and model_fields_set contains the field + if self.plan_id is None and "plan_id" in self.model_fields_set: + _dict['planId'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PlanV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "planId": obj.get("planId"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/pool_usage_schema.py b/corellium/models/pool_usage_schema.py new file mode 100644 index 0000000..ece0a31 --- /dev/null +++ b/corellium/models/pool_usage_schema.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class PoolUsageSchema(BaseModel): + """ + Storage pool usage. + """ # noqa: E501 + used: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Used pool space.") + size: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Total pool size.") + free: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Free pool space.") + lv_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Logical volume count.", alias="lvCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["used", "size", "free", "lvCount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PoolUsageSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PoolUsageSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "used": obj.get("used") if obj.get("used") is not None else 0, + "size": obj.get("size") if obj.get("size") is not None else 0, + "free": obj.get("free") if obj.get("free") is not None else 0, + "lvCount": obj.get("lvCount") if obj.get("lvCount") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/portal_session.py b/corellium/models/portal_session.py new file mode 100644 index 0000000..e6d7f38 --- /dev/null +++ b/corellium/models/portal_session.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PortalSession(BaseModel): + """ + PortalSession + """ # noqa: E501 + url: StrictStr = Field(description="Stripe customer portal URL.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PortalSession from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PortalSession from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/post_share_snapshot_request_payload.py b/corellium/models/post_share_snapshot_request_payload.py new file mode 100644 index 0000000..b524b72 --- /dev/null +++ b/corellium/models/post_share_snapshot_request_payload.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PostShareSnapshotRequestPayload(BaseModel): + """ + + """ # noqa: E501 + sharing_type: StrictStr = Field(alias="sharingType") + password: Optional[StrictStr] = Field(default=None, description="Password to require from anyone accepting the snapshot. Required when sharingType is passwordPublicLink.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharingType", "password"] + + @field_validator('sharing_type') + def sharing_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['publicLink', 'domainRestrictedLink', 'passwordPublicLink', 'emailInvite.']): + raise ValueError("must be one of enum values ('publicLink', 'domainRestrictedLink', 'passwordPublicLink', 'emailInvite.')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostShareSnapshotRequestPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PostShareSnapshotRequestPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharingType": obj.get("sharingType"), + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project.py b/corellium/models/project.py new file mode 100644 index 0000000..c10b95a --- /dev/null +++ b/corellium/models/project.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.network_status import NetworkStatus +from corellium.models.project_config import ProjectConfig +from corellium.models.project_quota import ProjectQuota +from corellium.models.project_settings import ProjectSettings +from corellium.models.project_usage import ProjectUsage +from typing import Optional, Set +from typing_extensions import Self + +class Project(BaseModel): + """ + Project + """ # noqa: E501 + id: StrictStr = Field(description="Project identifier.") + name: StrictStr = Field(description="Project name.") + settings: ProjectSettings + quotas: ProjectQuota + quotas_used: ProjectUsage = Field(alias="quotasUsed") + network_status: Optional[NetworkStatus] = Field(default=None, alias="networkStatus") + config: Optional[ProjectConfig] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "settings", "quotas", "quotasUsed", "networkStatus", "config"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Project from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas_used + if self.quotas_used: + _dict['quotasUsed'] = self.quotas_used.to_dict() + # override the default output from pydantic by calling `to_dict()` of network_status + if self.network_status: + _dict['networkStatus'] = self.network_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Project from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "settings": ProjectSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "quotas": ProjectQuota.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None, + "quotasUsed": ProjectUsage.from_dict(obj["quotasUsed"]) if obj.get("quotasUsed") is not None else None, + "networkStatus": NetworkStatus.from_dict(obj["networkStatus"]) if obj.get("networkStatus") is not None else None, + "config": ProjectConfig.from_dict(obj["config"]) if obj.get("config") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_config.py b/corellium/models/project_config.py new file mode 100644 index 0000000..6f9dbea --- /dev/null +++ b/corellium/models/project_config.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ProjectConfig(BaseModel): + """ + Project configuration. + """ # noqa: E501 + color: Optional[StrictInt] = Field(default=None, description="Project display color.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["color"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "color": obj.get("color") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_instance_list.py b/corellium/models/project_instance_list.py new file mode 100644 index 0000000..b8602ef --- /dev/null +++ b/corellium/models/project_instance_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.project_instance_summary import ProjectInstanceSummary +from typing import Optional, Set +from typing_extensions import Self + +class ProjectInstanceList(BaseModel): + """ + ProjectInstanceList + """ # noqa: E501 + results: List[ProjectInstanceSummary] = Field(description="Instances for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectInstanceList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectInstanceList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ProjectInstanceSummary.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_instance_summary.py b/corellium/models/project_instance_summary.py new file mode 100644 index 0000000..4827ac2 --- /dev/null +++ b/corellium/models/project_instance_summary.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ProjectInstanceSummary(BaseModel): + """ + ProjectInstanceSummary + """ # noqa: E501 + id: StrictStr = Field(description="Instance identifier.") + name: StrictStr = Field(description="Instance name.") + project: StrictStr = Field(description="Identifier of the project the instance belongs to.") + state: StrictStr = Field(description="Current instance state.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "project", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectInstanceSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectInstanceSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "project": obj.get("project"), + "state": obj.get("state") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_key.py b/corellium/models/project_key.py new file mode 100644 index 0000000..5db62e0 --- /dev/null +++ b/corellium/models/project_key.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ProjectKey(BaseModel): + """ + ProjectKey + """ # noqa: E501 + kind: StrictStr = Field(description="Kind of authorized key: an SSH key for SSH-based devices or an ADB key for Android.") + label: Optional[StrictStr] = Field(default=None, description="Descriptive label for the key.") + key: StrictStr = Field(description="The public key authorized to access devices in the project, in OpenSSH authorized_keys format.") + id: StrictStr = Field(description="Project key identifier.") + project: StrictStr = Field(description="Identifier of the project the key belongs to.") + fingerprint: Optional[StrictStr] = Field(description="Public key fingerprint.") + created_at: datetime = Field(description="Time the key was created.", alias="createdAt") + updated_at: datetime = Field(description="Time the key was last updated.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["kind", "label", "key", "id", "project", "fingerprint", "createdAt", "updatedAt"] + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ssh', 'adb']): + raise ValueError("must be one of enum values ('ssh', 'adb')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if fingerprint (nullable) is None + # and model_fields_set contains the field + if self.fingerprint is None and "fingerprint" in self.model_fields_set: + _dict['fingerprint'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kind": obj.get("kind"), + "label": obj.get("label"), + "key": obj.get("key"), + "id": obj.get("id"), + "project": obj.get("project"), + "fingerprint": obj.get("fingerprint"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_key_list.py b/corellium/models/project_key_list.py new file mode 100644 index 0000000..dc753f0 --- /dev/null +++ b/corellium/models/project_key_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.project_key import ProjectKey +from typing import Optional, Set +from typing_extensions import Self + +class ProjectKeyList(BaseModel): + """ + ProjectKeyList + """ # noqa: E501 + results: List[ProjectKey] = Field(description="Authorized keys for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectKeyList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectKeyList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ProjectKey.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_key_v1.py b/corellium/models/project_key_v1.py new file mode 100644 index 0000000..46fa4c7 --- /dev/null +++ b/corellium/models/project_key_v1.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ProjectKeyV1(BaseModel): + """ + + """ # noqa: E501 + identifier: Optional[StrictStr] = Field(default=None, description="keyId") + kind: StrictStr = Field(description="kind of key") + project: Optional[StrictStr] = Field(default=None, description="projectId") + key: StrictStr = Field(description="The public key") + fingerprint: Optional[StrictStr] = Field(default=None, description="Key fingerprint") + updated_at: Optional[datetime] = Field(default=None, description="Time of last update", alias="updatedAt") + created_at: Optional[datetime] = Field(default=None, description="Time of creation", alias="createdAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "kind", "project", "key", "fingerprint", "updatedAt", "createdAt"] + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ssh', 'adb']): + raise ValueError("must be one of enum values ('ssh', 'adb')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectKeyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if identifier (nullable) is None + # and model_fields_set contains the field + if self.identifier is None and "identifier" in self.model_fields_set: + _dict['identifier'] = None + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if fingerprint (nullable) is None + # and model_fields_set contains the field + if self.fingerprint is None and "fingerprint" in self.model_fields_set: + _dict['fingerprint'] = None + + # set to None if updated_at (nullable) is None + # and model_fields_set contains the field + if self.updated_at is None and "updated_at" in self.model_fields_set: + _dict['updatedAt'] = None + + # set to None if created_at (nullable) is None + # and model_fields_set contains the field + if self.created_at is None and "created_at" in self.model_fields_set: + _dict['createdAt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectKeyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "kind": obj.get("kind"), + "project": obj.get("project"), + "key": obj.get("key"), + "fingerprint": obj.get("fingerprint"), + "updatedAt": obj.get("updatedAt"), + "createdAt": obj.get("createdAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_list.py b/corellium/models/project_list.py new file mode 100644 index 0000000..eda7890 --- /dev/null +++ b/corellium/models/project_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.project_list_item import ProjectListItem +from typing import Optional, Set +from typing_extensions import Self + +class ProjectList(BaseModel): + """ + ProjectList + """ # noqa: E501 + results: List[ProjectListItem] = Field(description="Projects for this page.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ProjectListItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_list_item.py b/corellium/models/project_list_item.py new file mode 100644 index 0000000..08656a6 --- /dev/null +++ b/corellium/models/project_list_item.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.network_status import NetworkStatus +from corellium.models.project_config import ProjectConfig +from corellium.models.project_quota import ProjectQuota +from corellium.models.project_settings import ProjectSettings +from corellium.models.project_usage import ProjectUsage +from typing import Optional, Set +from typing_extensions import Self + +class ProjectListItem(BaseModel): + """ + ProjectListItem + """ # noqa: E501 + id: StrictStr = Field(description="Project identifier.") + name: StrictStr = Field(description="Project name.") + settings: ProjectSettings + quotas: ProjectQuota + quotas_used: ProjectUsage = Field(alias="quotasUsed") + network_status: Optional[NetworkStatus] = Field(default=None, alias="networkStatus") + config: Optional[ProjectConfig] = None + key_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of authorized keys on the project.", alias="keyCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "settings", "quotas", "quotasUsed", "networkStatus", "config", "keyCount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectListItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas_used + if self.quotas_used: + _dict['quotasUsed'] = self.quotas_used.to_dict() + # override the default output from pydantic by calling `to_dict()` of network_status + if self.network_status: + _dict['networkStatus'] = self.network_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectListItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "settings": ProjectSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "quotas": ProjectQuota.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None, + "quotasUsed": ProjectUsage.from_dict(obj["quotasUsed"]) if obj.get("quotasUsed") is not None else None, + "networkStatus": NetworkStatus.from_dict(obj["networkStatus"]) if obj.get("networkStatus") is not None else None, + "config": ProjectConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "keyCount": obj.get("keyCount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_network_state.py b/corellium/models/project_network_state.py new file mode 100644 index 0000000..0efabdf --- /dev/null +++ b/corellium/models/project_network_state.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ProjectNetworkState(BaseModel): + """ + ProjectNetworkState + """ # noqa: E501 + state: StrictStr = Field(description="State of the project network connection. One of: disconnected, disconnecting, connecting, connected, error") + details: Optional[Dict[str, Any]] = Field(default=None, description="Additional parameters for the network state.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state", "details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectNetworkState from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if details (nullable) is None + # and model_fields_set contains the field + if self.details is None and "details" in self.model_fields_set: + _dict['details'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectNetworkState from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state"), + "details": obj.get("details") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_quota.py b/corellium/models/project_quota.py new file mode 100644 index 0000000..f31f0be --- /dev/null +++ b/corellium/models/project_quota.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ProjectQuota(BaseModel): + """ + Resource quotas allocated to the project. + """ # noqa: E501 + cores: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Allocated CPU cores.") + instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Allocated instance count.") + ram: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Allocated RAM in mebibytes.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "instances", "ram"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectQuota from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectQuota from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_quota_input.py b/corellium/models/project_quota_input.py new file mode 100644 index 0000000..f125f2c --- /dev/null +++ b/corellium/models/project_quota_input.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ProjectQuotaInput(BaseModel): + """ + Initial resource quotas. When omitted the project is created with ZERO quota and cannot run instances until an administrator allocates quota to it (quotas are reservations against the domain allowance; rebalance from another project if the allowance is fully reserved). + """ # noqa: E501 + cores: Annotated[int, Field(strict=True, ge=0)] = Field(description="Allocated CPU cores.") + instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Allocated instance count. Derived from cores when omitted.") + ram: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Ignored on write: RAM in mebibytes is always recomputed as cores * 6144.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "instances", "ram"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectQuotaInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectQuotaInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_quota_v1.py b/corellium/models/project_quota_v1.py new file mode 100644 index 0000000..72fa8cb --- /dev/null +++ b/corellium/models/project_quota_v1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ProjectQuotaV1(BaseModel): + """ + + """ # noqa: E501 + cores: Optional[Union[StrictFloat, StrictInt]] = None + instances: Optional[Union[StrictFloat, StrictInt]] = None + ram: Optional[Union[StrictFloat, StrictInt]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "instances", "ram"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectQuotaV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cores (nullable) is None + # and model_fields_set contains the field + if self.cores is None and "cores" in self.model_fields_set: + _dict['cores'] = None + + # set to None if instances (nullable) is None + # and model_fields_set contains the field + if self.instances is None and "instances" in self.model_fields_set: + _dict['instances'] = None + + # set to None if ram (nullable) is None + # and model_fields_set contains the field + if self.ram is None and "ram" in self.model_fields_set: + _dict['ram'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectQuotaV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_settings.py b/corellium/models/project_settings.py new file mode 100644 index 0000000..f3d103a --- /dev/null +++ b/corellium/models/project_settings.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ProjectSettings(BaseModel): + """ + Project settings. + """ # noqa: E501 + version: Optional[StrictInt] = Field(default=None, description="Settings schema version.") + internet_access: Optional[StrictBool] = Field(default=None, description="Whether devices in the project can reach the internet. When false, devices can talk only to each other and to the project VPN.", alias="internetAccess") + dhcp: Optional[StrictBool] = Field(default=None, description="Whether DHCP is enabled for the project network.") + connection: Optional[StrictStr] = Field(default=None, description="ID of a network connection that routes the project's outbound traffic through a VPN, or null to use the normal network. Cannot be changed while any device in the project is running.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["version", "internetAccess", "dhcp", "connection"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if connection (nullable) is None + # and model_fields_set contains the field + if self.connection is None and "connection" in self.model_fields_set: + _dict['connection'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "internetAccess": obj.get("internetAccess"), + "dhcp": obj.get("dhcp"), + "connection": obj.get("connection") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_settings_v1.py b/corellium/models/project_settings_v1.py new file mode 100644 index 0000000..ea0d489 --- /dev/null +++ b/corellium/models/project_settings_v1.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ProjectSettingsV1(BaseModel): + """ + + """ # noqa: E501 + version: Optional[Union[StrictFloat, StrictInt]] = None + internet_access: Optional[StrictBool] = Field(default=None, description="Omitted when not configured for the project", alias="internet-access") + connection: Optional[StrictStr] = Field(default=None, description="UUIDv4 network connection identifier or null for no vpn connection") + dhcp: Optional[StrictBool] = Field(default=None, description="Omitted when not configured for the project") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["version", "internet-access", "connection", "dhcp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectSettingsV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if version (nullable) is None + # and model_fields_set contains the field + if self.version is None and "version" in self.model_fields_set: + _dict['version'] = None + + # set to None if internet_access (nullable) is None + # and model_fields_set contains the field + if self.internet_access is None and "internet_access" in self.model_fields_set: + _dict['internet-access'] = None + + # set to None if connection (nullable) is None + # and model_fields_set contains the field + if self.connection is None and "connection" in self.model_fields_set: + _dict['connection'] = None + + # set to None if dhcp (nullable) is None + # and model_fields_set contains the field + if self.dhcp is None and "dhcp" in self.model_fields_set: + _dict['dhcp'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectSettingsV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "internet-access": obj.get("internet-access"), + "connection": obj.get("connection"), + "dhcp": obj.get("dhcp") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_usage.py b/corellium/models/project_usage.py new file mode 100644 index 0000000..0291775 --- /dev/null +++ b/corellium/models/project_usage.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ProjectUsage(BaseModel): + """ + Resource usage within the project. + """ # noqa: E501 + cores: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="CPU cores in use.") + instances: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Instances in use.") + ram: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="RAM in use, in mebibytes.") + gpu: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="GPU units in use.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "instances", "ram", "gpu"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectUsage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectUsage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram"), + "gpu": obj.get("gpu") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_usage_v1.py b/corellium/models/project_usage_v1.py new file mode 100644 index 0000000..443c00c --- /dev/null +++ b/corellium/models/project_usage_v1.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ProjectUsageV1(BaseModel): + """ + + """ # noqa: E501 + cores: Optional[Union[StrictFloat, StrictInt]] = None + instances: Optional[Union[StrictFloat, StrictInt]] = None + ram: Optional[Union[StrictFloat, StrictInt]] = None + gpu: Optional[Union[StrictFloat, StrictInt]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cores", "instances", "ram", "gpu"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectUsageV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cores (nullable) is None + # and model_fields_set contains the field + if self.cores is None and "cores" in self.model_fields_set: + _dict['cores'] = None + + # set to None if instances (nullable) is None + # and model_fields_set contains the field + if self.instances is None and "instances" in self.model_fields_set: + _dict['instances'] = None + + # set to None if ram (nullable) is None + # and model_fields_set contains the field + if self.ram is None and "ram" in self.model_fields_set: + _dict['ram'] = None + + # set to None if gpu (nullable) is None + # and model_fields_set contains the field + if self.gpu is None and "gpu" in self.model_fields_set: + _dict['gpu'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectUsageV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cores": obj.get("cores"), + "instances": obj.get("instances"), + "ram": obj.get("ram"), + "gpu": obj.get("gpu") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_v1.py b/corellium/models/project_v1.py new file mode 100644 index 0000000..1dd19c4 --- /dev/null +++ b/corellium/models/project_v1.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.network_status_v1 import NetworkStatusV1 +from corellium.models.project_quota_v1 import ProjectQuotaV1 +from corellium.models.project_settings_v1 import ProjectSettingsV1 +from corellium.models.project_usage_v1 import ProjectUsageV1 +from typing import Optional, Set +from typing_extensions import Self + +class ProjectV1(BaseModel): + """ + + """ # noqa: E501 + id: StrictStr = Field(description="Project Identifier") + name: Optional[StrictStr] = Field(default=None, description="Project Name") + settings: Optional[ProjectSettingsV1] = None + quotas: Optional[ProjectQuotaV1] = None + quotas_used: Optional[ProjectUsageV1] = Field(default=None, alias="quotasUsed") + network_status: Optional[NetworkStatusV1] = Field(default=None, alias="networkStatus") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "settings", "quotas", "quotasUsed", "networkStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas_used + if self.quotas_used: + _dict['quotasUsed'] = self.quotas_used.to_dict() + # override the default output from pydantic by calling `to_dict()` of network_status + if self.network_status: + _dict['networkStatus'] = self.network_status.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "settings": ProjectSettingsV1.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "quotas": ProjectQuotaV1.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None, + "quotasUsed": ProjectUsageV1.from_dict(obj["quotasUsed"]) if obj.get("quotasUsed") is not None else None, + "networkStatus": NetworkStatusV1.from_dict(obj["networkStatus"]) if obj.get("networkStatus") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/project_with_keys_v1.py b/corellium/models/project_with_keys_v1.py new file mode 100644 index 0000000..34a7ef5 --- /dev/null +++ b/corellium/models/project_with_keys_v1.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.network_status_v1 import NetworkStatusV1 +from corellium.models.project_key_v1 import ProjectKeyV1 +from corellium.models.project_quota_v1 import ProjectQuotaV1 +from corellium.models.project_settings_v1 import ProjectSettingsV1 +from corellium.models.project_usage_v1 import ProjectUsageV1 +from typing import Optional, Set +from typing_extensions import Self + +class ProjectWithKeysV1(BaseModel): + """ + + """ # noqa: E501 + id: StrictStr = Field(description="Project Identifier") + name: Optional[StrictStr] = Field(default=None, description="Project Name") + settings: Optional[ProjectSettingsV1] = None + quotas: Optional[ProjectQuotaV1] = None + quotas_used: Optional[ProjectUsageV1] = Field(default=None, alias="quotasUsed") + network_status: Optional[NetworkStatusV1] = Field(default=None, alias="networkStatus") + keys: Optional[List[ProjectKeyV1]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "settings", "quotas", "quotasUsed", "networkStatus", "keys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectWithKeysV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas + if self.quotas: + _dict['quotas'] = self.quotas.to_dict() + # override the default output from pydantic by calling `to_dict()` of quotas_used + if self.quotas_used: + _dict['quotasUsed'] = self.quotas_used.to_dict() + # override the default output from pydantic by calling `to_dict()` of network_status + if self.network_status: + _dict['networkStatus'] = self.network_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in keys (list) + _items = [] + if self.keys: + for _item_keys in self.keys: + if _item_keys: + _items.append(_item_keys.to_dict()) + _dict['keys'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if keys (nullable) is None + # and model_fields_set contains the field + if self.keys is None and "keys" in self.model_fields_set: + _dict['keys'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectWithKeysV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "settings": ProjectSettingsV1.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "quotas": ProjectQuotaV1.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None, + "quotasUsed": ProjectUsageV1.from_dict(obj["quotasUsed"]) if obj.get("quotasUsed") is not None else None, + "networkStatus": NetworkStatusV1.from_dict(obj["networkStatus"]) if obj.get("networkStatus") is not None else None, + "keys": [ProjectKeyV1.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/provider_network_connection.py b/corellium/models/provider_network_connection.py new file mode 100644 index 0000000..99ce778 --- /dev/null +++ b/corellium/models/provider_network_connection.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corellium.models.open_vpn_network_connection import OpenVPNNetworkConnection +from corellium.models.vlan_network_connection import VLANNetworkConnection +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +PROVIDERNETWORKCONNECTION_ONE_OF_SCHEMAS = ["OpenVPNNetworkConnection", "VLANNetworkConnection"] + +class ProviderNetworkConnection(BaseModel): + """ + ProviderNetworkConnection + """ + # data type: OpenVPNNetworkConnection + oneof_schema_1_validator: Optional[OpenVPNNetworkConnection] = None + # data type: VLANNetworkConnection + oneof_schema_2_validator: Optional[VLANNetworkConnection] = None + actual_instance: Optional[Union[OpenVPNNetworkConnection, VLANNetworkConnection]] = None + one_of_schemas: Set[str] = { "OpenVPNNetworkConnection", "VLANNetworkConnection" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = ProviderNetworkConnection.model_construct() + error_messages = [] + match = 0 + # validate data type: OpenVPNNetworkConnection + if not isinstance(v, OpenVPNNetworkConnection): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenVPNNetworkConnection`") + else: + match += 1 + # validate data type: VLANNetworkConnection + if not isinstance(v, VLANNetworkConnection): + error_messages.append(f"Error! Input type `{type(v)}` is not `VLANNetworkConnection`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in ProviderNetworkConnection with oneOf schemas: OpenVPNNetworkConnection, VLANNetworkConnection. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in ProviderNetworkConnection with oneOf schemas: OpenVPNNetworkConnection, VLANNetworkConnection. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("provider") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `provider` in the input.") + + # check if data type is `OpenVPNNetworkConnection` + if _data_type == "openvpn": + instance.actual_instance = OpenVPNNetworkConnection.from_json(json_str) + return instance + + # check if data type is `VLANNetworkConnection` + if _data_type == "vlan": + instance.actual_instance = VLANNetworkConnection.from_json(json_str) + return instance + + # deserialize data into OpenVPNNetworkConnection + try: + instance.actual_instance = OpenVPNNetworkConnection.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into VLANNetworkConnection + try: + instance.actual_instance = VLANNetworkConnection.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into ProviderNetworkConnection with oneOf schemas: OpenVPNNetworkConnection, VLANNetworkConnection. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into ProviderNetworkConnection with oneOf schemas: OpenVPNNetworkConnection, VLANNetworkConnection. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OpenVPNNetworkConnection, VLANNetworkConnection]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/proxy_config.py b/corellium/models/proxy_config.py new file mode 100644 index 0000000..654c09c --- /dev/null +++ b/corellium/models/proxy_config.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ProxyConfig(BaseModel): + """ + Represents a Proxy configuration object. + """ # noqa: E501 + device_port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The device port to use for proxying.", alias="devicePort") + first_available: Optional[StrictBool] = Field(default=None, description="If `true`, the first available port will be used if `devicePort` is not available.", alias="firstAvailable") + expose: Optional[StrictBool] = Field(default=None, description="If `true`, the proxy will be exposed to the external interface.") + router_port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The router port to use for proxying.", alias="routerPort") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["devicePort", "firstAvailable", "expose", "routerPort"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProxyConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if device_port (nullable) is None + # and model_fields_set contains the field + if self.device_port is None and "device_port" in self.model_fields_set: + _dict['devicePort'] = None + + # set to None if first_available (nullable) is None + # and model_fields_set contains the field + if self.first_available is None and "first_available" in self.model_fields_set: + _dict['firstAvailable'] = None + + # set to None if expose (nullable) is None + # and model_fields_set contains the field + if self.expose is None and "expose" in self.model_fields_set: + _dict['expose'] = None + + # set to None if router_port (nullable) is None + # and model_fields_set contains the field + if self.router_port is None and "router_port" in self.model_fields_set: + _dict['routerPort'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProxyConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "devicePort": obj.get("devicePort"), + "firstAvailable": obj.get("firstAvailable"), + "expose": obj.get("expose"), + "routerPort": obj.get("routerPort") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/register_service_body.py b/corellium/models/register_service_body.py new file mode 100644 index 0000000..aac250e --- /dev/null +++ b/corellium/models/register_service_body.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.service_endpoint_schema import ServiceEndpointSchema +from typing import Optional, Set +from typing_extensions import Self + +class RegisterServiceBody(BaseModel): + """ + RegisterServiceBody + """ # noqa: E501 + password: StrictStr = Field(description="Service password, must match the configured service password.") + node_id: StrictStr = Field(description="Node identifier.", alias="nodeId") + address: StrictStr = Field(description="Service address (IP:Port).") + service_name: StrictStr = Field(description="Service name (e.g. mast, c3po, iptables-nat).", alias="serviceName") + endpoints: Optional[List[ServiceEndpointSchema]] = Field(default=None, description="Endpoints this service exposes. Replaces any previously registered endpoints for this address.") + identity_key: StrictStr = Field(description="Identity key for mutual authentication.", alias="identityKey") + ca_cert: StrictStr = Field(description="CA certificate.", alias="caCert") + cert_fingerprint: StrictStr = Field(description="Certificate fingerprint.", alias="certFingerprint") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password", "nodeId", "address", "serviceName", "endpoints", "identityKey", "caCert", "certFingerprint"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RegisterServiceBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in endpoints (list) + _items = [] + if self.endpoints: + for _item_endpoints in self.endpoints: + if _item_endpoints: + _items.append(_item_endpoints.to_dict()) + _dict['endpoints'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RegisterServiceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password"), + "nodeId": obj.get("nodeId"), + "address": obj.get("address"), + "serviceName": obj.get("serviceName"), + "endpoints": [ServiceEndpointSchema.from_dict(_item) for _item in obj["endpoints"]] if obj.get("endpoints") is not None else None, + "identityKey": obj.get("identityKey"), + "caCert": obj.get("caCert"), + "certFingerprint": obj.get("certFingerprint") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/report_modification_input.py b/corellium/models/report_modification_input.py new file mode 100644 index 0000000..3fabab4 --- /dev/null +++ b/corellium/models/report_modification_input.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ReportModificationInput(BaseModel): + """ + ReportModificationInput + """ # noqa: E501 + check_id: StrictStr = Field(description="Identifier of the check to modify.", alias="checkId") + var_property: StrictStr = Field(description="Property of the check to modify: \"outcome\", \"severity\", or \"evidence_\".", alias="property") + suppressed: Optional[StrictBool] = Field(default=None, description="For an \"evidence_\" property, whether the evidence entry is suppressed. Required for evidence modifications.") + value: Optional[StrictStr] = Field(default=None, description="New value for the property. Required for \"outcome\" and \"severity\"; must be omitted for \"evidence_\".") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["checkId", "property", "suppressed", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReportModificationInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportModificationInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checkId": obj.get("checkId"), + "property": obj.get("property"), + "suppressed": obj.get("suppressed"), + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/report_modification_result.py b/corellium/models/report_modification_result.py new file mode 100644 index 0000000..877eb32 --- /dev/null +++ b/corellium/models/report_modification_result.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ReportModificationResult(BaseModel): + """ + ReportModificationResult + """ # noqa: E501 + check_id: StrictStr = Field(description="Identifier of the check the modification applied to.", alias="checkId") + var_property: StrictStr = Field(description="Property of the check that was modified.", alias="property") + status: StrictStr = Field(description="Outcome of applying the modification.") + error: Optional[StrictStr] = Field(default=None, description="Explanation when the modification was ignored or errored.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["checkId", "property", "status", "error"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['inserted', 'deleted', 'updated', 'ignored', 'errored']): + raise ValueError("must be one of enum values ('inserted', 'deleted', 'updated', 'ignored', 'errored')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ReportModificationResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportModificationResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "checkId": obj.get("checkId"), + "property": obj.get("property"), + "status": obj.get("status"), + "error": obj.get("error") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/reset_link_body.py b/corellium/models/reset_link_body.py new file mode 100644 index 0000000..072698b --- /dev/null +++ b/corellium/models/reset_link_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResetLinkBody(BaseModel): + """ + + """ # noqa: E501 + email: StrictStr = Field(description="Email address to request password reset link for") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResetLinkBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResetLinkBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/reset_link_info.py b/corellium/models/reset_link_info.py new file mode 100644 index 0000000..c031ec9 --- /dev/null +++ b/corellium/models/reset_link_info.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResetLinkInfo(BaseModel): + """ + ResetLinkInfo + """ # noqa: E501 + user_id: StrictStr = Field(description="User identifier.", alias="userId") + username: StrictStr = Field(description="Username.") + domain: StrictStr = Field(description="Domain name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["userId", "username", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResetLinkInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResetLinkInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "username": obj.get("username"), + "domain": obj.get("domain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/reset_link_info_return.py b/corellium/models/reset_link_info_return.py new file mode 100644 index 0000000..00e791a --- /dev/null +++ b/corellium/models/reset_link_info_return.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ResetLinkInfoReturn(BaseModel): + """ + + """ # noqa: E501 + user_id: Optional[StrictStr] = Field(default=None, description="The user identifier", alias="userId") + username: Optional[StrictStr] = Field(default=None, description="The user name") + domain: Optional[StrictStr] = Field(default=None, description="The domain name") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["userId", "username", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResetLinkInfoReturn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if domain (nullable) is None + # and model_fields_set contains the field + if self.domain is None and "domain" in self.model_fields_set: + _dict['domain'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResetLinkInfoReturn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userId": obj.get("userId"), + "username": obj.get("username"), + "domain": obj.get("domain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/reset_password_body.py b/corellium/models/reset_password_body.py new file mode 100644 index 0000000..bfb0ac5 --- /dev/null +++ b/corellium/models/reset_password_body.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ResetPasswordBody(BaseModel): + """ + ResetPasswordBody + """ # noqa: E501 + token: StrictStr = Field(description="Password reset token.") + new_password: StrictStr = Field(description="New password.", alias="newPassword") + totp_token: Optional[StrictStr] = Field(default=None, description="TOTP token when two-factor is required.", alias="totpToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token", "newPassword", "totpToken"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResetPasswordBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResetPasswordBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token"), + "newPassword": obj.get("newPassword"), + "totpToken": obj.get("totpToken") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/reset_unauthorized_response.py b/corellium/models/reset_unauthorized_response.py new file mode 100644 index 0000000..daa6c4e --- /dev/null +++ b/corellium/models/reset_unauthorized_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from corellium.models.invalid_totp_error import InvalidTOTPError +from corellium.models.unauthorized_error import UnauthorizedError +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +RESETUNAUTHORIZEDRESPONSE_ANY_OF_SCHEMAS = ["InvalidTOTPError", "UnauthorizedError"] + +class ResetUnauthorizedResponse(BaseModel): + """ + ResetUnauthorizedResponse + """ + + # data type: InvalidTOTPError + anyof_schema_1_validator: Optional[InvalidTOTPError] = None + # data type: UnauthorizedError + anyof_schema_2_validator: Optional[UnauthorizedError] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[InvalidTOTPError, UnauthorizedError]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "InvalidTOTPError", "UnauthorizedError" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = ResetUnauthorizedResponse.model_construct() + error_messages = [] + # validate data type: InvalidTOTPError + if not isinstance(v, InvalidTOTPError): + error_messages.append(f"Error! Input type `{type(v)}` is not `InvalidTOTPError`") + else: + return v + + # validate data type: UnauthorizedError + if not isinstance(v, UnauthorizedError): + error_messages.append(f"Error! Input type `{type(v)}` is not `UnauthorizedError`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in ResetUnauthorizedResponse with anyOf schemas: InvalidTOTPError, UnauthorizedError. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[InvalidTOTPError] = None + try: + instance.actual_instance = InvalidTOTPError.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[UnauthorizedError] = None + try: + instance.actual_instance = UnauthorizedError.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into ResetUnauthorizedResponse with anyOf schemas: InvalidTOTPError, UnauthorizedError. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], InvalidTOTPError, UnauthorizedError]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/restore_backup_body.py b/corellium/models/restore_backup_body.py new file mode 100644 index 0000000..df1aefc --- /dev/null +++ b/corellium/models/restore_backup_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RestoreBackupBody(BaseModel): + """ + RestoreBackupBody + """ # noqa: E501 + password: Optional[StrictStr] = Field(default=None, description="Password of the backup file. Needed only if the backup is encrypted; leave it out for an unencrypted backup.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RestoreBackupBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RestoreBackupBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/restore_backup_data.py b/corellium/models/restore_backup_data.py new file mode 100644 index 0000000..c96e9cd --- /dev/null +++ b/corellium/models/restore_backup_data.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RestoreBackupData(BaseModel): + """ + + """ # noqa: E501 + password: Optional[StrictStr] = Field(default=None, description="Required for encrypted backup") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RestoreBackupData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RestoreBackupData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/revoke_invites_body.py b/corellium/models/revoke_invites_body.py new file mode 100644 index 0000000..6e49538 --- /dev/null +++ b/corellium/models/revoke_invites_body.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RevokeInvitesBody(BaseModel): + """ + RevokeInvitesBody + """ # noqa: E501 + ids: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Invite IDs to operate on.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ids"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RevokeInvitesBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RevokeInvitesBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ids": obj.get("ids") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/revoke_invites_response.py b/corellium/models/revoke_invites_response.py new file mode 100644 index 0000000..ed089b1 --- /dev/null +++ b/corellium/models/revoke_invites_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class RevokeInvitesResponse(BaseModel): + """ + RevokeInvitesResponse + """ # noqa: E501 + deleted_count: StrictInt = Field(description="Number of invites revoked.", alias="deletedCount") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deletedCount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RevokeInvitesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RevokeInvitesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletedCount": obj.get("deletedCount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/role.py b/corellium/models/role.py new file mode 100644 index 0000000..c15197e --- /dev/null +++ b/corellium/models/role.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.role_name import RoleName +from typing import Optional, Set +from typing_extensions import Self + +class Role(BaseModel): + """ + Role + """ # noqa: E501 + role: RoleName + project: Optional[StrictStr] = Field(default=None, description="Project identifier (when scoped to a project).") + deployment: Optional[StrictStr] = Field(default=None, description="Deployment identifier (when scoped to a deployment).") + user: Optional[StrictStr] = Field(default=None, description="User identifier (when granted to a user).") + team: Optional[StrictStr] = Field(default=None, description="Team identifier (when granted to a team).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role", "project", "deployment", "user", "team"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Role from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Role from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role": obj.get("role"), + "project": obj.get("project"), + "deployment": obj.get("deployment"), + "user": obj.get("user"), + "team": obj.get("team") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/role_name.py b/corellium/models/role_name.py new file mode 100644 index 0000000..2e8581a --- /dev/null +++ b/corellium/models/role_name.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class RoleName(str, Enum): + """ + Role identifier. + """ + + """ + allowed enum values + """ + ADMIN = 'admin' + MEMBER = 'member' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of RoleName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/role_v1.py b/corellium/models/role_v1.py new file mode 100644 index 0000000..8730810 --- /dev/null +++ b/corellium/models/role_v1.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RoleV1(BaseModel): + """ + + """ # noqa: E501 + role: StrictStr + project: Optional[StrictStr] = Field(default=None, description="Project ID. Omitted for domain/global roles") + user: Optional[StrictStr] = Field(default=None, description="User ID. Omitted for team roles") + team: Optional[StrictStr] = Field(default=None, description="Team ID. Present on team roles instead of user") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["role", "project", "user", "team"] + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['admin', '_member_']): + raise ValueError("must be one of enum values ('admin', '_member_')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RoleV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if project (nullable) is None + # and model_fields_set contains the field + if self.project is None and "project" in self.model_fields_set: + _dict['project'] = None + + # set to None if user (nullable) is None + # and model_fields_set contains the field + if self.user is None and "user" in self.model_fields_set: + _dict['user'] = None + + # set to None if team (nullable) is None + # and model_fields_set contains the field + if self.team is None and "team" in self.model_fields_set: + _dict['team'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoleV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "role": obj.get("role"), + "project": obj.get("project"), + "user": obj.get("user"), + "team": obj.get("team") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/roles_list_response.py b/corellium/models/roles_list_response.py new file mode 100644 index 0000000..08d66c2 --- /dev/null +++ b/corellium/models/roles_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.role import Role +from typing import Optional, Set +from typing_extensions import Self + +class RolesListResponse(BaseModel): + """ + RolesListResponse + """ # noqa: E501 + results: List[Role] = Field(description="Array of role assignments.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RolesListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RolesListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Role.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/rotate_body.py b/corellium/models/rotate_body.py new file mode 100644 index 0000000..98a899c --- /dev/null +++ b/corellium/models/rotate_body.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class RotateBody(BaseModel): + """ + RotateBody + """ # noqa: E501 + orientation: Union[StrictFloat, StrictInt] = Field(description="Desired orientation. 1=Portrait, 2=Portrait inverted, 3=Landscape (top left), 4=Landscape (top right).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["orientation"] + + @field_validator('orientation') + def orientation_validate_enum(cls, value): + """Validates the enum""" + if value not in set([1, 2, 3, 4]): + raise ValueError("must be one of enum values (1, 2, 3, 4)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RotateBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RotateBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orientation": obj.get("orientation") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/rotate_body_v1.py b/corellium/models/rotate_body_v1.py new file mode 100644 index 0000000..c9285ef --- /dev/null +++ b/corellium/models/rotate_body_v1.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class RotateBodyV1(BaseModel): + """ + + """ # noqa: E501 + orientation: Union[StrictFloat, StrictInt] = Field(description="Desired orientation") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["orientation"] + + @field_validator('orientation') + def orientation_validate_enum(cls, value): + """Validates the enum""" + if value not in set([1, 2, 3, 4]): + raise ValueError("must be one of enum values (1, 2, 3, 4)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RotateBodyV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RotateBodyV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orientation": obj.get("orientation") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/saml_config.py b/corellium/models/saml_config.py new file mode 100644 index 0000000..2f4000d --- /dev/null +++ b/corellium/models/saml_config.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.saml_group_mapping import SamlGroupMapping +from corellium.models.saml_identity_provider_config import SamlIdentityProviderConfig +from corellium.models.saml_service_provider_config import SamlServiceProviderConfig +from corellium.models.saml_user_attribute_mapping import SamlUserAttributeMapping +from typing import Optional, Set +from typing_extensions import Self + +class SAMLConfig(BaseModel): + """ + SAML provider configuration. + """ # noqa: E501 + identity_provider_config: SamlIdentityProviderConfig = Field(alias="identityProviderConfig") + service_provider_config: Optional[SamlServiceProviderConfig] = Field(default=None, alias="serviceProviderConfig") + user_attribute_mapping: Optional[SamlUserAttributeMapping] = Field(default=None, alias="userAttributeMapping") + group_mapping: Optional[List[SamlGroupMapping]] = Field(default=None, alias="groupMapping") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identityProviderConfig", "serviceProviderConfig", "userAttributeMapping", "groupMapping"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SAMLConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of identity_provider_config + if self.identity_provider_config: + _dict['identityProviderConfig'] = self.identity_provider_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of service_provider_config + if self.service_provider_config: + _dict['serviceProviderConfig'] = self.service_provider_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of user_attribute_mapping + if self.user_attribute_mapping: + _dict['userAttributeMapping'] = self.user_attribute_mapping.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in group_mapping (list) + _items = [] + if self.group_mapping: + for _item_group_mapping in self.group_mapping: + if _item_group_mapping: + _items.append(_item_group_mapping.to_dict()) + _dict['groupMapping'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SAMLConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identityProviderConfig": SamlIdentityProviderConfig.from_dict(obj["identityProviderConfig"]) if obj.get("identityProviderConfig") is not None else None, + "serviceProviderConfig": SamlServiceProviderConfig.from_dict(obj["serviceProviderConfig"]) if obj.get("serviceProviderConfig") is not None else None, + "userAttributeMapping": SamlUserAttributeMapping.from_dict(obj["userAttributeMapping"]) if obj.get("userAttributeMapping") is not None else None, + "groupMapping": [SamlGroupMapping.from_dict(_item) for _item in obj["groupMapping"]] if obj.get("groupMapping") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/saml_group_mapping.py b/corellium/models/saml_group_mapping.py new file mode 100644 index 0000000..92b5985 --- /dev/null +++ b/corellium/models/saml_group_mapping.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SamlGroupMapping(BaseModel): + """ + SamlGroupMapping + """ # noqa: E501 + group_name: StrictStr = Field(description="Group name in the IdP.", alias="groupName") + role: StrictStr = Field(description="Role granted in Corellium (e.g. admin, member).") + team: StrictStr = Field(description="Associated Corellium team.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["groupName", "role", "team"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SamlGroupMapping from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SamlGroupMapping from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "groupName": obj.get("groupName"), + "role": obj.get("role"), + "team": obj.get("team") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/saml_identity_provider_config.py b/corellium/models/saml_identity_provider_config.py new file mode 100644 index 0000000..3ca37a1 --- /dev/null +++ b/corellium/models/saml_identity_provider_config.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SamlIdentityProviderConfig(BaseModel): + """ + SamlIdentityProviderConfig + """ # noqa: E501 + login_url: StrictStr = Field(description="IdP SSO login endpoint the AuthnRequest is sent to.", alias="loginUrl") + public_certificate: StrictStr = Field(description="IdP X.509 public certificate, used to verify the SAML response.", alias="publicCertificate") + issuer_url: StrictStr = Field(description="IdP unique identifier (issuer / entity ID).", alias="issuerUrl") + logout_url: Optional[StrictStr] = Field(default=None, description="Optional IdP Single Logout URL.", alias="logoutUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["loginUrl", "publicCertificate", "issuerUrl", "logoutUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SamlIdentityProviderConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SamlIdentityProviderConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginUrl": obj.get("loginUrl"), + "publicCertificate": obj.get("publicCertificate"), + "issuerUrl": obj.get("issuerUrl"), + "logoutUrl": obj.get("logoutUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/saml_service_provider_config.py b/corellium/models/saml_service_provider_config.py new file mode 100644 index 0000000..be34342 --- /dev/null +++ b/corellium/models/saml_service_provider_config.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SamlServiceProviderConfig(BaseModel): + """ + Service-provider configuration, generated by the server. Never includes the private key. + """ # noqa: E501 + sso_url: StrictStr = Field(description="SP assertion consumer service URL.", alias="ssoUrl") + public_certificate: StrictStr = Field(description="SP X.509 public certificate.", alias="publicCertificate") + audience_url: StrictStr = Field(description="SP audience / entity ID.", alias="audienceUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ssoUrl", "publicCertificate", "audienceUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SamlServiceProviderConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SamlServiceProviderConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ssoUrl": obj.get("ssoUrl"), + "publicCertificate": obj.get("publicCertificate"), + "audienceUrl": obj.get("audienceUrl") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/saml_user_attribute_mapping.py b/corellium/models/saml_user_attribute_mapping.py new file mode 100644 index 0000000..ff3e572 --- /dev/null +++ b/corellium/models/saml_user_attribute_mapping.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SamlUserAttributeMapping(BaseModel): + """ + SamlUserAttributeMapping + """ # noqa: E501 + username: Optional[StrictStr] = Field(default=None, description="SAML assertion attribute mapped to username.") + email: StrictStr = Field(description="SAML assertion attribute mapped to email.") + first_name: StrictStr = Field(description="SAML assertion attribute mapped to first name.", alias="firstName") + last_name: StrictStr = Field(description="SAML assertion attribute mapped to last name.", alias="lastName") + group: StrictStr = Field(description="SAML assertion attribute mapped to group.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "email", "firstName", "lastName", "group"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SamlUserAttributeMapping from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SamlUserAttributeMapping from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "email": obj.get("email"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "group": obj.get("group") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/send_reset_link_body.py b/corellium/models/send_reset_link_body.py new file mode 100644 index 0000000..7db0d9f --- /dev/null +++ b/corellium/models/send_reset_link_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SendResetLinkBody(BaseModel): + """ + SendResetLinkBody + """ # noqa: E501 + email: Optional[StrictStr] = Field(default=None, description="Email address to send the reset link to.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SendResetLinkBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SendResetLinkBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/service_endpoint_schema.py b/corellium/models/service_endpoint_schema.py new file mode 100644 index 0000000..fbe5e97 --- /dev/null +++ b/corellium/models/service_endpoint_schema.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ServiceEndpointSchema(BaseModel): + """ + ServiceEndpointSchema + """ # noqa: E501 + service_name: Optional[StrictStr] = Field(default=None, description="Service name (e.g. mast, c3po, iptables-nat).", alias="serviceName") + path: StrictStr = Field(description="Endpoint path, following /:apiVersion/.") + method: StrictStr = Field(description="HTTP method (e.g. GET, POST).") + permissions: List[StrictStr] = Field(description="Required permissions (e.g. projectMember, cloud-administrator, domain-administrator, administrator).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["serviceName", "path", "method", "permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ServiceEndpointSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ServiceEndpointSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "serviceName": obj.get("serviceName"), + "path": obj.get("path"), + "method": obj.get("method"), + "permissions": obj.get("permissions") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/service_status_request_body.py b/corellium/models/service_status_request_body.py new file mode 100644 index 0000000..320b44e --- /dev/null +++ b/corellium/models/service_status_request_body.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.layout_schema import LayoutSchema +from corellium.models.network_schema import NetworkSchema +from corellium.models.pool_usage_schema import PoolUsageSchema +from corellium.models.service_status_request_body_vms_inner import ServiceStatusRequestBodyVmsInner +from corellium.models.sys_info_schema import SysInfoSchema +from typing import Optional, Set +from typing_extensions import Self + +class ServiceStatusRequestBody(BaseModel): + """ + ServiceStatusRequestBody + """ # noqa: E501 + healthy: StrictBool = Field(description="Whether the service is healthy.") + service_name: StrictStr = Field(description="Service name.", alias="serviceName") + address: StrictStr = Field(description="Service address (IP:Port).") + hostname: StrictStr = Field(description="Service hostname.") + node_id: StrictStr = Field(description="Node identifier.", alias="nodeId") + sys_info: Optional[SysInfoSchema] = Field(default=None, alias="sysInfo") + layout: Optional[LayoutSchema] = None + vms: Optional[List[ServiceStatusRequestBodyVmsInner]] = Field(default=None, description="VM list reported by this node.") + pool_usage: Optional[PoolUsageSchema] = Field(default=None, alias="poolUsage") + az: Optional[StrictStr] = Field(default=None, description="Availability zone.") + network: Optional[NetworkSchema] = None + ec2_instance_type: Optional[StrictStr] = Field(default='', description="EC2 instance type, if applicable.", alias="ec2InstanceType") + op: Optional[StrictStr] = Field(default=None, description="Current operation.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["healthy", "serviceName", "address", "hostname", "nodeId", "sysInfo", "layout", "vms", "poolUsage", "az", "network", "ec2InstanceType", "op"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ServiceStatusRequestBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of sys_info + if self.sys_info: + _dict['sysInfo'] = self.sys_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of layout + if self.layout: + _dict['layout'] = self.layout.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in vms (list) + _items = [] + if self.vms: + for _item_vms in self.vms: + if _item_vms: + _items.append(_item_vms.to_dict()) + _dict['vms'] = _items + # override the default output from pydantic by calling `to_dict()` of pool_usage + if self.pool_usage: + _dict['poolUsage'] = self.pool_usage.to_dict() + # override the default output from pydantic by calling `to_dict()` of network + if self.network: + _dict['network'] = self.network.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if az (nullable) is None + # and model_fields_set contains the field + if self.az is None and "az" in self.model_fields_set: + _dict['az'] = None + + # set to None if ec2_instance_type (nullable) is None + # and model_fields_set contains the field + if self.ec2_instance_type is None and "ec2_instance_type" in self.model_fields_set: + _dict['ec2InstanceType'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ServiceStatusRequestBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "healthy": obj.get("healthy"), + "serviceName": obj.get("serviceName"), + "address": obj.get("address"), + "hostname": obj.get("hostname"), + "nodeId": obj.get("nodeId"), + "sysInfo": SysInfoSchema.from_dict(obj["sysInfo"]) if obj.get("sysInfo") is not None else None, + "layout": LayoutSchema.from_dict(obj["layout"]) if obj.get("layout") is not None else None, + "vms": [ServiceStatusRequestBodyVmsInner.from_dict(_item) for _item in obj["vms"]] if obj.get("vms") is not None else None, + "poolUsage": PoolUsageSchema.from_dict(obj["poolUsage"]) if obj.get("poolUsage") is not None else None, + "az": obj.get("az"), + "network": NetworkSchema.from_dict(obj["network"]) if obj.get("network") is not None else None, + "ec2InstanceType": obj.get("ec2InstanceType") if obj.get("ec2InstanceType") is not None else '', + "op": obj.get("op") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/service_status_request_body_vms_inner.py b/corellium/models/service_status_request_body_vms_inner.py new file mode 100644 index 0000000..e960c38 --- /dev/null +++ b/corellium/models/service_status_request_body_vms_inner.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ServiceStatusRequestBodyVmsInner(BaseModel): + """ + ServiceStatusRequestBodyVmsInner + """ # noqa: E501 + identifier: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ServiceStatusRequestBodyVmsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ServiceStatusRequestBodyVmsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/set_domain_welcome_message_body.py b/corellium/models/set_domain_welcome_message_body.py new file mode 100644 index 0000000..4dc4de9 --- /dev/null +++ b/corellium/models/set_domain_welcome_message_body.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SetDomainWelcomeMessageBody(BaseModel): + """ + SetDomainWelcomeMessageBody + """ # noqa: E501 + message: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The welcome message text (HTML allowed, will be sanitized).") + enabled: StrictBool = Field(description="Whether the welcome message is shown to users.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetDomainWelcomeMessageBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetDomainWelcomeMessageBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/set_snapshot_permissions_body.py b/corellium/models/set_snapshot_permissions_body.py new file mode 100644 index 0000000..e321e2c --- /dev/null +++ b/corellium/models/set_snapshot_permissions_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SetSnapshotPermissionsBody(BaseModel): + """ + SetSnapshotPermissionsBody + """ # noqa: E501 + members: List[StrictStr] = Field(description="The people who may use the snapshot, by email address or user ID. Used with sharing type `emailInvite`.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["members"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetSnapshotPermissionsBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetSnapshotPermissionsBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "members": obj.get("members") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/share_snapshot_body.py b/corellium/models/share_snapshot_body.py new file mode 100644 index 0000000..a4cbf4e --- /dev/null +++ b/corellium/models/share_snapshot_body.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.snapshot_sharing_type import SnapshotSharingType +from typing import Optional, Set +from typing_extensions import Self + +class ShareSnapshotBody(BaseModel): + """ + ShareSnapshotBody + """ # noqa: E501 + sharing_type: SnapshotSharingType = Field(alias="sharingType") + password: Optional[StrictStr] = Field(default=None, description="Password to require from anyone accepting the snapshot. Required when sharingType is passwordPublicLink, and ignored for every other sharing type. Never returned by the API once set.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharingType", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareSnapshotBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareSnapshotBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharingType": obj.get("sharingType"), + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/shared_snapshot.py b/corellium/models/shared_snapshot.py new file mode 100644 index 0000000..463ffa5 --- /dev/null +++ b/corellium/models/shared_snapshot.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.snapshot_owner import SnapshotOwner +from corellium.models.snapshot_sharing import SnapshotSharing +from corellium.models.snapshot_sharing_type import SnapshotSharingType +from corellium.models.snapshot_status import SnapshotStatus +from typing import Optional, Set +from typing_extensions import Self + +class SharedSnapshot(BaseModel): + """ + SharedSnapshot + """ # noqa: E501 + shared_on: Optional[datetime] = Field(default=None, description="Date of when the snapshot was first shared with member.", alias="sharedOn") + shared_with_member: Optional[StrictStr] = Field(default=None, description="The member who the snapshot was shared with. Only present in sharedWithUser.", alias="sharedWithMember") + sharing_type: SnapshotSharingType = Field(alias="sharingType") + shared_by: Optional[SnapshotOwner] = Field(default=None, alias="sharedBy") + id: StrictStr = Field(description="The snapshot identifier.") + var_date: Union[StrictFloat, StrictInt] = Field(description="Date that the snapshot was created (UNIX epoch milliseconds).", alias="date") + hw_pac: Union[StrictFloat, StrictInt] = Field(description="Denotes whether this snapshot requires a compute node with hardware PAC enabled.", alias="hwPac") + instance: StrictStr = Field(description="The UUID of the instance that this snapshot is of.") + live: Optional[StrictBool] = Field(default=None, description="Live snapshot (included state and memory).") + local: StrictBool = Field(description="Denotes whether the snapshot has a local storage type.") + model: Optional[StrictStr] = Field(default='', description="The device model.") + type: Optional[StrictStr] = Field(default=None, description="Device type of the instance this snapshot belongs to.") + name: StrictStr = Field(description="The snapshot name.") + status: SnapshotStatus + fresh: Optional[StrictBool] = Field(default=None, description="Denotes whether snapshot was created immediately after the device was restored.") + sharing: Optional[SnapshotSharing] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharedOn", "sharedWithMember", "sharingType", "sharedBy", "id", "date", "hwPac", "instance", "live", "local", "model", "type", "name", "status", "fresh", "sharing"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SharedSnapshot from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of shared_by + if self.shared_by: + _dict['sharedBy'] = self.shared_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + # override the default output from pydantic by calling `to_dict()` of sharing + if self.sharing: + _dict['sharing'] = self.sharing.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SharedSnapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharedOn": obj.get("sharedOn"), + "sharedWithMember": obj.get("sharedWithMember"), + "sharingType": obj.get("sharingType"), + "sharedBy": SnapshotOwner.from_dict(obj["sharedBy"]) if obj.get("sharedBy") is not None else None, + "id": obj.get("id"), + "date": obj.get("date"), + "hwPac": obj.get("hwPac"), + "instance": obj.get("instance"), + "live": obj.get("live"), + "local": obj.get("local"), + "model": obj.get("model") if obj.get("model") is not None else '', + "type": obj.get("type"), + "name": obj.get("name"), + "status": SnapshotStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, + "fresh": obj.get("fresh"), + "sharing": SnapshotSharing.from_dict(obj["sharing"]) if obj.get("sharing") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/shared_snapshots_info.py b/corellium/models/shared_snapshots_info.py new file mode 100644 index 0000000..e12f10c --- /dev/null +++ b/corellium/models/shared_snapshots_info.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.snapshot_owner_v1 import SnapshotOwnerV1 +from typing import Optional, Set +from typing_extensions import Self + +class SharedSnapshotsInfo(BaseModel): + """ + + """ # noqa: E501 + id: StrictStr = Field(description="UUID of the snapshot") + name: StrictStr = Field(description="Snapshot name") + model: StrictStr = Field(description="Device model") + shared_on: Union[StrictFloat, StrictInt] = Field(description="UNIX Date of when the snapshot was first shared with member", alias="sharedOn") + shared_with_member: Optional[StrictStr] = Field(default=None, description="The member who the snapshot was shared with. Only present in sharedWithUser", alias="sharedWithMember") + shared_by: Optional[SnapshotOwnerV1] = Field(default=None, alias="sharedBy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "model", "sharedOn", "sharedWithMember", "sharedBy"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SharedSnapshotsInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of shared_by + if self.shared_by: + _dict['sharedBy'] = self.shared_by.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if shared_with_member (nullable) is None + # and model_fields_set contains the field + if self.shared_with_member is None and "shared_with_member" in self.model_fields_set: + _dict['sharedWithMember'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SharedSnapshotsInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "model": obj.get("model"), + "sharedOn": obj.get("sharedOn"), + "sharedWithMember": obj.get("sharedWithMember"), + "sharedBy": SnapshotOwnerV1.from_dict(obj["sharedBy"]) if obj.get("sharedBy") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/shared_snapshots_response.py b/corellium/models/shared_snapshots_response.py new file mode 100644 index 0000000..ed34ddc --- /dev/null +++ b/corellium/models/shared_snapshots_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from corellium.models.shared_snapshot import SharedSnapshot +from typing import Optional, Set +from typing_extensions import Self + +class SharedSnapshotsResponse(BaseModel): + """ + SharedSnapshotsResponse + """ # noqa: E501 + shared_with_user: List[SharedSnapshot] = Field(description="Snapshots shared with the logged-in user.", alias="sharedWithUser") + shared_by_user: List[SharedSnapshot] = Field(description="Snapshots shared by the logged-in user.", alias="sharedByUser") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharedWithUser", "sharedByUser"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SharedSnapshotsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_user (list) + _items = [] + if self.shared_with_user: + for _item_shared_with_user in self.shared_with_user: + if _item_shared_with_user: + _items.append(_item_shared_with_user.to_dict()) + _dict['sharedWithUser'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_by_user (list) + _items = [] + if self.shared_by_user: + for _item_shared_by_user in self.shared_by_user: + if _item_shared_by_user: + _items.append(_item_shared_by_user.to_dict()) + _dict['sharedByUser'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SharedSnapshotsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharedWithUser": [SharedSnapshot.from_dict(_item) for _item in obj["sharedWithUser"]] if obj.get("sharedWithUser") is not None else None, + "sharedByUser": [SharedSnapshot.from_dict(_item) for _item in obj["sharedByUser"]] if obj.get("sharedByUser") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot.py b/corellium/models/snapshot.py new file mode 100644 index 0000000..6789690 --- /dev/null +++ b/corellium/models/snapshot.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.snapshot_sharing import SnapshotSharing +from corellium.models.snapshot_status import SnapshotStatus +from typing import Optional, Set +from typing_extensions import Self + +class Snapshot(BaseModel): + """ + Snapshot + """ # noqa: E501 + id: StrictStr = Field(description="The snapshot identifier.") + name: StrictStr = Field(description="The snapshot name.") + instance: StrictStr = Field(description="The UUID of the instance that this snapshot is of.") + status: SnapshotStatus + var_date: Union[StrictFloat, StrictInt] = Field(description="Date that the snapshot was created (UNIX epoch milliseconds).", alias="date") + fresh: Optional[StrictBool] = Field(default=None, description="Denotes whether snapshot was created immediately after the device was restored.") + live: Optional[StrictBool] = Field(default=None, description="Live snapshot (included state and memory).") + local: StrictBool = Field(description="Denotes whether the snapshot has a local storage type.") + model: Optional[StrictStr] = Field(default=None, description="The device model.") + sharing: SnapshotSharing + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "instance", "status", "date", "fresh", "live", "local", "model", "sharing"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Snapshot from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + # override the default output from pydantic by calling `to_dict()` of sharing + if self.sharing: + _dict['sharing'] = self.sharing.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Snapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "instance": obj.get("instance"), + "status": SnapshotStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, + "date": obj.get("date"), + "fresh": obj.get("fresh"), + "live": obj.get("live"), + "local": obj.get("local"), + "model": obj.get("model"), + "sharing": SnapshotSharing.from_dict(obj["sharing"]) if obj.get("sharing") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_creation_options.py b/corellium/models/snapshot_creation_options.py new file mode 100644 index 0000000..5579aa7 --- /dev/null +++ b/corellium/models/snapshot_creation_options.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotCreationOptions(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="Snapshot name") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotCreationOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotCreationOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_list.py b/corellium/models/snapshot_list.py new file mode 100644 index 0000000..eaf6317 --- /dev/null +++ b/corellium/models/snapshot_list.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.cluster_snapshot_v1 import ClusterSnapshotV1 +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotList(BaseModel): + """ + + """ # noqa: E501 + results: Optional[List[ClusterSnapshotV1]] = Field(default=None, description="List of snapshots") + offset: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Offset for pagination, defaults to 0") + limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of items to return, defaults to 100, minimum of 1 and maximum of 1000") + count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of items in current response") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "offset", "limit", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if results (nullable) is None + # and model_fields_set contains the field + if self.results is None and "results" in self.model_fields_set: + _dict['results'] = None + + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + # set to None if limit (nullable) is None + # and model_fields_set contains the field + if self.limit is None and "limit" in self.model_fields_set: + _dict['limit'] = None + + # set to None if count (nullable) is None + # and model_fields_set contains the field + if self.count is None and "count" in self.model_fields_set: + _dict['count'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [ClusterSnapshotV1.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "count": obj.get("count") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_member.py b/corellium/models/snapshot_member.py new file mode 100644 index 0000000..e1bcd71 --- /dev/null +++ b/corellium/models/snapshot_member.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotMember(BaseModel): + """ + SnapshotMember + """ # noqa: E501 + email: StrictStr = Field(description="The email of the member.") + invite_sent_at: Optional[datetime] = Field(description="The date when the invite was sent.", alias="inviteSentAt") + shared_on: Optional[datetime] = Field(default=None, description="Date of when the snapshot was first shared with member.", alias="sharedOn") + user_id: Optional[StrictStr] = Field(default=None, description="The member's user ID.", alias="userId") + name: Optional[StrictStr] = Field(default=None, description="The user's label or name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "inviteSentAt", "sharedOn", "userId", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotMember from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if invite_sent_at (nullable) is None + # and model_fields_set contains the field + if self.invite_sent_at is None and "invite_sent_at" in self.model_fields_set: + _dict['inviteSentAt'] = None + + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "inviteSentAt": obj.get("inviteSentAt"), + "sharedOn": obj.get("sharedOn"), + "userId": obj.get("userId"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_member_v1.py b/corellium/models/snapshot_member_v1.py new file mode 100644 index 0000000..9d4742b --- /dev/null +++ b/corellium/models/snapshot_member_v1.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotMemberV1(BaseModel): + """ + + """ # noqa: E501 + email: StrictStr = Field(description="The email of the member") + invite_sent_at: Union[StrictFloat, StrictInt] = Field(description="The date when the invite was sent", alias="inviteSentAt") + shared_on: Union[StrictFloat, StrictInt] = Field(description="UNIX Date of when the snapshot was first shared with member", alias="sharedOn") + user_id: Optional[StrictStr] = Field(default=None, description="The member's user ID", alias="userId") + label: Optional[StrictStr] = Field(default=None, description="The user's label or name") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "inviteSentAt", "sharedOn", "userId", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotMemberV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if user_id (nullable) is None + # and model_fields_set contains the field + if self.user_id is None and "user_id" in self.model_fields_set: + _dict['userId'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotMemberV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "inviteSentAt": obj.get("inviteSentAt"), + "sharedOn": obj.get("sharedOn"), + "userId": obj.get("userId"), + "label": obj.get("label") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_owner.py b/corellium/models/snapshot_owner.py new file mode 100644 index 0000000..85e278a --- /dev/null +++ b/corellium/models/snapshot_owner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotOwner(BaseModel): + """ + The owner of the snapshot. + """ # noqa: E501 + name: StrictStr = Field(description="The name of the owner.") + email: StrictStr = Field(description="The email of the member.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "email"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotOwner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotOwner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "email": obj.get("email") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_owner_v1.py b/corellium/models/snapshot_owner_v1.py new file mode 100644 index 0000000..a996d58 --- /dev/null +++ b/corellium/models/snapshot_owner_v1.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotOwnerV1(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="The name of the owner.") + email: StrictStr = Field(description="The email of the member.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "email"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotOwnerV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotOwnerV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "email": obj.get("email") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_permissions_request_payload.py b/corellium/models/snapshot_permissions_request_payload.py new file mode 100644 index 0000000..e8082d6 --- /dev/null +++ b/corellium/models/snapshot_permissions_request_payload.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotPermissionsRequestPayload(BaseModel): + """ + + """ # noqa: E501 + members: List[StrictStr] = Field(description="The email addresses or user ids of the members.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["members"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotPermissionsRequestPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotPermissionsRequestPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "members": obj.get("members") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_request.py b/corellium/models/snapshot_request.py new file mode 100644 index 0000000..0b872b8 --- /dev/null +++ b/corellium/models/snapshot_request.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotRequest(BaseModel): + """ + + """ # noqa: E501 + limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of entries to return, defaults to 100") + offset: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of rows to skip, defaults to 0") + springboard: Optional[StrictBool] = Field(default=None, description="Denotes whether snapshot was a springboard snapshot") + live: Optional[StrictBool] = Field(default=None, description="Denotes whether snapshot was a live snapshot") + fresh: Optional[StrictBool] = Field(default=None, description="Denotes whether snapshot was created immediately after the device was restored") + device_name: Optional[StrictStr] = Field(default=None, description="Name of device", alias="deviceName") + task: Optional[StrictStr] = Field(default=None, description="Task being executed on snapshot") + to: Optional[StrictStr] = Field(default=None, description="Date to filter to, keyed off of createdAt") + var_from: Optional[StrictStr] = Field(default=None, description="Date to filter from, keyed off of createdAt", alias="from") + order_by: Optional[StrictStr] = Field(default=None, description="Sorting order ('-createdAt' or 'createdAt'), defaults to -createdAt", alias="orderBy") + search: Optional[StrictStr] = Field(default=None, description="Last filter applied and searches on snapshot / associated instance name and snapshot / instance id") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["limit", "offset", "springboard", "live", "fresh", "deviceName", "task", "to", "from", "orderBy", "search"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if limit (nullable) is None + # and model_fields_set contains the field + if self.limit is None and "limit" in self.model_fields_set: + _dict['limit'] = None + + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + # set to None if springboard (nullable) is None + # and model_fields_set contains the field + if self.springboard is None and "springboard" in self.model_fields_set: + _dict['springboard'] = None + + # set to None if live (nullable) is None + # and model_fields_set contains the field + if self.live is None and "live" in self.model_fields_set: + _dict['live'] = None + + # set to None if fresh (nullable) is None + # and model_fields_set contains the field + if self.fresh is None and "fresh" in self.model_fields_set: + _dict['fresh'] = None + + # set to None if device_name (nullable) is None + # and model_fields_set contains the field + if self.device_name is None and "device_name" in self.model_fields_set: + _dict['deviceName'] = None + + # set to None if task (nullable) is None + # and model_fields_set contains the field + if self.task is None and "task" in self.model_fields_set: + _dict['task'] = None + + # set to None if to (nullable) is None + # and model_fields_set contains the field + if self.to is None and "to" in self.model_fields_set: + _dict['to'] = None + + # set to None if var_from (nullable) is None + # and model_fields_set contains the field + if self.var_from is None and "var_from" in self.model_fields_set: + _dict['from'] = None + + # set to None if order_by (nullable) is None + # and model_fields_set contains the field + if self.order_by is None and "order_by" in self.model_fields_set: + _dict['orderBy'] = None + + # set to None if search (nullable) is None + # and model_fields_set contains the field + if self.search is None and "search" in self.model_fields_set: + _dict['search'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "springboard": obj.get("springboard"), + "live": obj.get("live"), + "fresh": obj.get("fresh"), + "deviceName": obj.get("deviceName"), + "task": obj.get("task"), + "to": obj.get("to"), + "from": obj.get("from"), + "orderBy": obj.get("orderBy"), + "search": obj.get("search") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_sharing.py b/corellium/models/snapshot_sharing.py new file mode 100644 index 0000000..e07eb30 --- /dev/null +++ b/corellium/models/snapshot_sharing.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.snapshot_member import SnapshotMember +from corellium.models.snapshot_owner import SnapshotOwner +from corellium.models.snapshot_sharing_type import SnapshotSharingType +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotSharing(BaseModel): + """ + The sharing information of the snapshot. + """ # noqa: E501 + sharing_type: SnapshotSharingType = Field(alias="sharingType") + access_code: Optional[StrictStr] = Field(default=None, description="Access code of shared snapshot.", alias="accessCode") + shared_on: Optional[datetime] = Field(default=None, description="Date of when the snapshot was first shared with member.", alias="sharedOn") + shared_by: Optional[SnapshotOwner] = Field(default=None, alias="sharedBy") + members: Optional[List[SnapshotMember]] = Field(default=None, description="The email addresses or user ids of the members.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharingType", "accessCode", "sharedOn", "sharedBy", "members"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotSharing from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of shared_by + if self.shared_by: + _dict['sharedBy'] = self.shared_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotSharing from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharingType": obj.get("sharingType"), + "accessCode": obj.get("accessCode"), + "sharedOn": obj.get("sharedOn"), + "sharedBy": SnapshotOwner.from_dict(obj["sharedBy"]) if obj.get("sharedBy") is not None else None, + "members": [SnapshotMember.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_sharing_permissions.py b/corellium/models/snapshot_sharing_permissions.py new file mode 100644 index 0000000..2ad7c9a --- /dev/null +++ b/corellium/models/snapshot_sharing_permissions.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotSharingPermissions(BaseModel): + """ + + """ # noqa: E501 + cloud_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if snapshot permissions are enabled by the cloud admin", alias="cloudEnabled") + domain_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if snapshot permissions are enabled by the domain admin", alias="domainEnabled") + public_link: Optional[StrictBool] = Field(default=None, description="Indicates if public link access is enabled", alias="publicLink") + domain_restricted_link: Optional[StrictBool] = Field(default=None, description="Indicates if domain-restricted link access is enabled", alias="domainRestrictedLink") + password_public_link: Optional[StrictBool] = Field(default=None, description="Indicates if password-protected public link access is enabled", alias="passwordPublicLink") + email_invite: Optional[StrictBool] = Field(default=None, description="Indicates if email invite access is enabled", alias="emailInvite") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cloudEnabled", "domainEnabled", "publicLink", "domainRestrictedLink", "passwordPublicLink", "emailInvite"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotSharingPermissions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cloud_enabled (nullable) is None + # and model_fields_set contains the field + if self.cloud_enabled is None and "cloud_enabled" in self.model_fields_set: + _dict['cloudEnabled'] = None + + # set to None if domain_enabled (nullable) is None + # and model_fields_set contains the field + if self.domain_enabled is None and "domain_enabled" in self.model_fields_set: + _dict['domainEnabled'] = None + + # set to None if public_link (nullable) is None + # and model_fields_set contains the field + if self.public_link is None and "public_link" in self.model_fields_set: + _dict['publicLink'] = None + + # set to None if domain_restricted_link (nullable) is None + # and model_fields_set contains the field + if self.domain_restricted_link is None and "domain_restricted_link" in self.model_fields_set: + _dict['domainRestrictedLink'] = None + + # set to None if password_public_link (nullable) is None + # and model_fields_set contains the field + if self.password_public_link is None and "password_public_link" in self.model_fields_set: + _dict['passwordPublicLink'] = None + + # set to None if email_invite (nullable) is None + # and model_fields_set contains the field + if self.email_invite is None and "email_invite" in self.model_fields_set: + _dict['emailInvite'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotSharingPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cloudEnabled": obj.get("cloudEnabled"), + "domainEnabled": obj.get("domainEnabled"), + "publicLink": obj.get("publicLink"), + "domainRestrictedLink": obj.get("domainRestrictedLink"), + "passwordPublicLink": obj.get("passwordPublicLink"), + "emailInvite": obj.get("emailInvite") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_sharing_permissions_request_schema.py b/corellium/models/snapshot_sharing_permissions_request_schema.py new file mode 100644 index 0000000..bf5fb83 --- /dev/null +++ b/corellium/models/snapshot_sharing_permissions_request_schema.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotSharingPermissionsRequestSchema(BaseModel): + """ + SnapshotSharingPermissionsRequestSchema + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether snapshot sharing is enabled.") + public_link: Optional[StrictBool] = Field(default=True, description="Whether public link access is enabled.", alias="publicLink") + domain_restricted_link: Optional[StrictBool] = Field(default=True, description="Whether domain-restricted link access is enabled.", alias="domainRestrictedLink") + password_public_link: Optional[StrictBool] = Field(default=True, description="Whether password-protected public link access is enabled.", alias="passwordPublicLink") + email_invite: Optional[StrictBool] = Field(default=True, description="Whether email invite access is enabled.", alias="emailInvite") + __properties: ClassVar[List[str]] = ["enabled", "publicLink", "domainRestrictedLink", "passwordPublicLink", "emailInvite"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotSharingPermissionsRequestSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotSharingPermissionsRequestSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled"), + "publicLink": obj.get("publicLink") if obj.get("publicLink") is not None else True, + "domainRestrictedLink": obj.get("domainRestrictedLink") if obj.get("domainRestrictedLink") is not None else True, + "passwordPublicLink": obj.get("passwordPublicLink") if obj.get("passwordPublicLink") is not None else True, + "emailInvite": obj.get("emailInvite") if obj.get("emailInvite") is not None else True + }) + return _obj + + diff --git a/corellium/models/snapshot_sharing_type.py b/corellium/models/snapshot_sharing_type.py new file mode 100644 index 0000000..2926efc --- /dev/null +++ b/corellium/models/snapshot_sharing_type.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SnapshotSharingType(str, Enum): + """ + Who can use a shared snapshot: - `publicLink`: anyone who has the access code. - `domainRestrictedLink`: only signed-in users in the owner's domain who have the access code. - `passwordPublicLink`: anyone who has the access code and the password. - `emailInvite`: only the people listed as members (see `v3SetSnapshotPermissions`). - `notShared`: sharing is turned off. Each type must also be allowed by your domain's snapshot sharing settings (`PATCH /v3/domain`); a type that is not allowed is refused with 403. + """ + + """ + allowed enum values + """ + PUBLICLINK = 'publicLink' + DOMAINRESTRICTEDLINK = 'domainRestrictedLink' + PASSWORDPUBLICLINK = 'passwordPublicLink' + EMAILINVITE = 'emailInvite' + NOTSHARED = 'notShared' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SnapshotSharingType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/snapshot_sharing_v1.py b/corellium/models/snapshot_sharing_v1.py new file mode 100644 index 0000000..c820adb --- /dev/null +++ b/corellium/models/snapshot_sharing_v1.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.snapshot_member_v1 import SnapshotMemberV1 +from corellium.models.snapshot_owner_v1 import SnapshotOwnerV1 +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotSharingV1(BaseModel): + """ + + """ # noqa: E501 + sharing_type: StrictStr = Field(alias="sharingType") + shared_by: Optional[SnapshotOwnerV1] = Field(default=None, alias="sharedBy") + members: Optional[List[SnapshotMemberV1]] = Field(default=None, description="The members who have access to the snapshot") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharingType", "sharedBy", "members"] + + @field_validator('sharing_type') + def sharing_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['publicLink', 'domainRestrictedLink', 'passwordPublicLink', 'emailInvite']): + raise ValueError("must be one of enum values ('publicLink', 'domainRestrictedLink', 'passwordPublicLink', 'emailInvite')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotSharingV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of shared_by + if self.shared_by: + _dict['sharedBy'] = self.shared_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if members (nullable) is None + # and model_fields_set contains the field + if self.members is None and "members" in self.model_fields_set: + _dict['members'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotSharingV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharingType": obj.get("sharingType"), + "sharedBy": SnapshotOwnerV1.from_dict(obj["sharedBy"]) if obj.get("sharedBy") is not None else None, + "members": [SnapshotMemberV1.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_status.py b/corellium/models/snapshot_status.py new file mode 100644 index 0000000..becb1b6 --- /dev/null +++ b/corellium/models/snapshot_status.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotStatus(BaseModel): + """ + The status of the snapshot. + """ # noqa: E501 + task: Optional[StrictStr] = Field(default=None, description="The current task being performed on the snapshot.") + created: Optional[StrictBool] = Field(default=None, description="Indicates if the snapshot has been successfully created.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["task", "created"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "task": obj.get("task"), + "created": obj.get("created") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_status_v1.py b/corellium/models/snapshot_status_v1.py new file mode 100644 index 0000000..b680437 --- /dev/null +++ b/corellium/models/snapshot_status_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotStatusV1(BaseModel): + """ + + """ # noqa: E501 + task: Optional[StrictStr] = Field(default=None, description="The current task being performed on the snapshot") + created: Optional[StrictBool] = Field(default=None, description="Indicates if the snapshot has been successfully created") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["task", "created"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotStatusV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if task (nullable) is None + # and model_fields_set contains the field + if self.task is None and "task" in self.model_fields_set: + _dict['task'] = None + + # set to None if created (nullable) is None + # and model_fields_set contains the field + if self.created is None and "created" in self.model_fields_set: + _dict['created'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotStatusV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "task": obj.get("task"), + "created": obj.get("created") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/snapshot_v1.py b/corellium/models/snapshot_v1.py new file mode 100644 index 0000000..689b608 --- /dev/null +++ b/corellium/models/snapshot_v1.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.snapshot_sharing_v1 import SnapshotSharingV1 +from corellium.models.snapshot_status_v1 import SnapshotStatusV1 +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotV1(BaseModel): + """ + + """ # noqa: E501 + id: StrictStr = Field(description="Snapshot ID") + name: StrictStr = Field(description="Snapshot name") + instance: StrictStr = Field(description="Instance that this snapshot is of") + status: SnapshotStatusV1 + var_date: Union[StrictFloat, StrictInt] = Field(description="UNIX Date that the snapshot was created", alias="date") + fresh: StrictBool + live: StrictBool = Field(description="Live snapshot (included state and memory)") + local: StrictBool + model: Optional[StrictStr] = Field(default=None, description="The device model") + sharing: Optional[SnapshotSharingV1] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "instance", "status", "date", "fresh", "live", "local", "model", "sharing"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + # override the default output from pydantic by calling `to_dict()` of sharing + if self.sharing: + _dict['sharing'] = self.sharing.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if model (nullable) is None + # and model_fields_set contains the field + if self.model is None and "model" in self.model_fields_set: + _dict['model'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SnapshotV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "instance": obj.get("instance"), + "status": SnapshotStatusV1.from_dict(obj["status"]) if obj.get("status") is not None else None, + "date": obj.get("date"), + "fresh": obj.get("fresh"), + "live": obj.get("live"), + "local": obj.get("local"), + "model": obj.get("model"), + "sharing": SnapshotSharingV1.from_dict(obj["sharing"]) if obj.get("sharing") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/sslsplit_filter.py b/corellium/models/sslsplit_filter.py new file mode 100644 index 0000000..05422cc --- /dev/null +++ b/corellium/models/sslsplit_filter.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SslsplitFilter(BaseModel): + """ + + """ # noqa: E501 + truncate_pcap: Optional[StrictBool] = Field(default=None, alias="truncatePcap") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["truncatePcap"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SslsplitFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if truncate_pcap (nullable) is None + # and model_fields_set contains the field + if self.truncate_pcap is None and "truncate_pcap" in self.model_fields_set: + _dict['truncatePcap'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SslsplitFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "truncatePcap": obj.get("truncatePcap") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/start_instance_body.py b/corellium/models/start_instance_body.py new file mode 100644 index 0000000..421d44b --- /dev/null +++ b/corellium/models/start_instance_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class StartInstanceBody(BaseModel): + """ + StartInstanceBody + """ # noqa: E501 + paused: Optional[StrictBool] = Field(default=None, description="Start device paused.") + sock_cap: Optional[StrictBool] = Field(default=None, description="Start device with Process Network Monitoring enabled.", alias="sockCap") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["paused", "sockCap"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StartInstanceBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StartInstanceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "paused": obj.get("paused"), + "sockCap": obj.get("sockCap") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/stop_instance_body.py b/corellium/models/stop_instance_body.py new file mode 100644 index 0000000..f957824 --- /dev/null +++ b/corellium/models/stop_instance_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class StopInstanceBody(BaseModel): + """ + StopInstanceBody + """ # noqa: E501 + soft: Optional[StrictBool] = Field(default=True, description="Controls how the VM is stopped. When true (the default), performs a graceful shutdown. When false, performs a forced, immediate stop.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["soft"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StopInstanceBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StopInstanceBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "soft": obj.get("soft") if obj.get("soft") is not None else True + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_already_mounted_response.py b/corellium/models/storage_already_mounted_response.py new file mode 100644 index 0000000..00b9e8d --- /dev/null +++ b/corellium/models/storage_already_mounted_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class StorageAlreadyMountedResponse(BaseModel): + """ + StorageAlreadyMountedResponse + """ # noqa: E501 + message: StrictStr = Field(description="Human-readable status message.") + mount_point: StrictStr = Field(description="Filesystem path where the device is mounted.", alias="mountPoint") + device: StrictStr = Field(description="Device node path.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "mountPoint", "device"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageAlreadyMountedResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageAlreadyMountedResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "mountPoint": obj.get("mountPoint"), + "device": obj.get("device") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_attach_response.py b/corellium/models/storage_attach_response.py new file mode 100644 index 0000000..76d1d71 --- /dev/null +++ b/corellium/models/storage_attach_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class StorageAttachResponse(BaseModel): + """ + StorageAttachResponse + """ # noqa: E501 + status: StrictStr = Field(description="Job status.") + message: StrictStr = Field(description="Human-readable status message.") + id: StrictStr = Field(description="Storage device identifier.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status", "message", "id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageAttachResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageAttachResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_device.py b/corellium/models/storage_device.py new file mode 100644 index 0000000..5e41b32 --- /dev/null +++ b/corellium/models/storage_device.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class StorageDevice(BaseModel): + """ + StorageDevice + """ # noqa: E501 + id: StrictStr = Field(description="Unique identifier for the storage device.") + device: StrictStr = Field(description="Device node path (e.g. /dev/sdb1).") + fs_type: StrictStr = Field(description="Filesystem type (e.g. ext4, vfat).", alias="fsType") + fs_uuid: Optional[StrictStr] = Field(description="Filesystem UUID.", alias="fsUuid") + label: StrictStr = Field(description="Filesystem label.") + serial: StrictStr = Field(description="Device serial number.") + vendor: StrictStr = Field(description="Device vendor.") + model: StrictStr = Field(description="Device model.") + mount_policy: StrictStr = Field(description="Mount policy for the device.", alias="mountPolicy") + status: StrictStr = Field(description="Current mount status.") + created_at: datetime = Field(description="Timestamp when the record was created.", alias="createdAt") + updated_at: datetime = Field(description="Timestamp when the record was last updated.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "device", "fsType", "fsUuid", "label", "serial", "vendor", "model", "mountPolicy", "status", "createdAt", "updatedAt"] + + @field_validator('mount_policy') + def mount_policy_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['RO', 'RW']): + raise ValueError("must be one of enum values ('RO', 'RW')") + return value + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['mounted', 'unmounted']): + raise ValueError("must be one of enum values ('mounted', 'unmounted')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageDevice from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if fs_uuid (nullable) is None + # and model_fields_set contains the field + if self.fs_uuid is None and "fs_uuid" in self.model_fields_set: + _dict['fsUuid'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageDevice from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "device": obj.get("device"), + "fsType": obj.get("fsType"), + "fsUuid": obj.get("fsUuid"), + "label": obj.get("label"), + "serial": obj.get("serial"), + "vendor": obj.get("vendor"), + "model": obj.get("model"), + "mountPolicy": obj.get("mountPolicy"), + "status": obj.get("status"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_device_list.py b/corellium/models/storage_device_list.py new file mode 100644 index 0000000..26b8663 --- /dev/null +++ b/corellium/models/storage_device_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.storage_device import StorageDevice +from typing import Optional, Set +from typing_extensions import Self + +class StorageDeviceList(BaseModel): + """ + StorageDeviceList + """ # noqa: E501 + results: List[StorageDevice] = Field(description="List of storage devices.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageDeviceList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageDeviceList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [StorageDevice.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_eject_already_unmounted_response.py b/corellium/models/storage_eject_already_unmounted_response.py new file mode 100644 index 0000000..d941b4c --- /dev/null +++ b/corellium/models/storage_eject_already_unmounted_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class StorageEjectAlreadyUnmountedResponse(BaseModel): + """ + StorageEjectAlreadyUnmountedResponse + """ # noqa: E501 + message: StrictStr = Field(description="Human-readable status message.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageEjectAlreadyUnmountedResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageEjectAlreadyUnmountedResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_file.py b/corellium/models/storage_file.py new file mode 100644 index 0000000..d2bdca9 --- /dev/null +++ b/corellium/models/storage_file.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class StorageFile(BaseModel): + """ + StorageFile + """ # noqa: E501 + name: StrictStr = Field(description="File or directory name.") + ext: Optional[StrictStr] = Field(description="File extension, or null for directories.") + type: StrictStr = Field(description="Entry type.") + size: StrictInt = Field(description="Size in bytes (0 for directories).") + last_modified_time: Optional[datetime] = Field(description="Last modified timestamp, or 1970-01-01T00:00:00.000Z when the entry could not be stat'd.", alias="lastModifiedTime") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "ext", "type", "size", "lastModifiedTime"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['file', 'directory']): + raise ValueError("must be one of enum values ('file', 'directory')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageFile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if ext (nullable) is None + # and model_fields_set contains the field + if self.ext is None and "ext" in self.model_fields_set: + _dict['ext'] = None + + # set to None if last_modified_time (nullable) is None + # and model_fields_set contains the field + if self.last_modified_time is None and "last_modified_time" in self.model_fields_set: + _dict['lastModifiedTime'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageFile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "ext": obj.get("ext"), + "type": obj.get("type"), + "size": obj.get("size"), + "lastModifiedTime": obj.get("lastModifiedTime") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_file_list.py b/corellium/models/storage_file_list.py new file mode 100644 index 0000000..e10e8d5 --- /dev/null +++ b/corellium/models/storage_file_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.storage_file import StorageFile +from typing import Optional, Set +from typing_extensions import Self + +class StorageFileList(BaseModel): + """ + StorageFileList + """ # noqa: E501 + results: List[StorageFile] = Field(description="Files and directories in this response.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageFileList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageFileList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [StorageFile.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_list.py b/corellium/models/storage_list.py new file mode 100644 index 0000000..7254642 --- /dev/null +++ b/corellium/models/storage_list.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.media_store import MediaStore +from typing import Optional, Set +from typing_extensions import Self + +class StorageList(BaseModel): + """ + StorageList + """ # noqa: E501 + results: List[MediaStore] = Field(description="Storage devices in this response.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [MediaStore.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/storage_queue_error.py b/corellium/models/storage_queue_error.py new file mode 100644 index 0000000..7f3fec7 --- /dev/null +++ b/corellium/models/storage_queue_error.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class StorageQueueError(BaseModel): + """ + StorageQueueError + """ # noqa: E501 + error: StrictStr = Field(description="Error summary.") + details: StrictStr = Field(description="Underlying error message.") + suggestion: StrictStr = Field(description="Suggested remediation.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "details", "suggestion"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StorageQueueError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StorageQueueError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "details": obj.get("details"), + "suggestion": obj.get("suggestion") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/stripe_checkout_body.py b/corellium/models/stripe_checkout_body.py new file mode 100644 index 0000000..b9d6c8f --- /dev/null +++ b/corellium/models/stripe_checkout_body.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class StripeCheckoutBody(BaseModel): + """ + StripeCheckoutBody + """ # noqa: E501 + terms_of_service: StrictBool = Field(description="Whether terms of service were accepted.", alias="termsOfService") + email: StrictStr = Field(description="Customer email.") + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Customer name.") + domain: StrictStr = Field(description="Domain name.") + cores: Union[StrictFloat, StrictInt] = Field(description="Number of cores.") + license_type: StrictStr = Field(description="License type.", alias="licenseType") + existing_domain: StrictBool = Field(description="Whether this targets an existing domain.", alias="existingDomain") + price_id: StrictStr = Field(description="Stripe price identifier.", alias="priceId") + coupon_code: Optional[StrictStr] = Field(default=None, description="Optional coupon code.", alias="couponCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["termsOfService", "email", "name", "domain", "cores", "licenseType", "existingDomain", "priceId", "couponCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StripeCheckoutBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StripeCheckoutBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "termsOfService": obj.get("termsOfService"), + "email": obj.get("email"), + "name": obj.get("name"), + "domain": obj.get("domain"), + "cores": obj.get("cores"), + "licenseType": obj.get("licenseType"), + "existingDomain": obj.get("existingDomain"), + "priceId": obj.get("priceId"), + "couponCode": obj.get("couponCode") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/stripe_checkout_complete_body.py b/corellium/models/stripe_checkout_complete_body.py new file mode 100644 index 0000000..39fbb8a --- /dev/null +++ b/corellium/models/stripe_checkout_complete_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class StripeCheckoutCompleteBody(BaseModel): + """ + StripeCheckoutCompleteBody + """ # noqa: E501 + session_id: StrictStr = Field(description="Stripe checkout session identifier.", alias="sessionId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sessionId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StripeCheckoutCompleteBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StripeCheckoutCompleteBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionId": obj.get("sessionId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/stripe_webhook_ack.py b/corellium/models/stripe_webhook_ack.py new file mode 100644 index 0000000..99b3aa8 --- /dev/null +++ b/corellium/models/stripe_webhook_ack.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class StripeWebhookAck(BaseModel): + """ + StripeWebhookAck + """ # noqa: E501 + received: StrictBool = Field(description="Whether the event was received.") + ignored: Optional[StrictStr] = Field(default=None, description="Reason the event was ignored, when applicable.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["received", "ignored"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StripeWebhookAck from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StripeWebhookAck from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "received": obj.get("received"), + "ignored": obj.get("ignored") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/subscribe_to_trial_body.py b/corellium/models/subscribe_to_trial_body.py new file mode 100644 index 0000000..9520681 --- /dev/null +++ b/corellium/models/subscribe_to_trial_body.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SubscribeToTrialBody(BaseModel): + """ + SubscribeToTrialBody + """ # noqa: E501 + trial_request_code: Optional[StrictStr] = Field(default=None, description="Trial request code.", alias="trialRequestCode") + password: Optional[StrictStr] = Field(default=None, description="Account password.") + terms_of_service: Optional[StrictBool] = Field(default=None, description="Whether terms of service were accepted.", alias="termsOfService") + enterprise_domain_name: Optional[StrictStr] = Field(default=None, description="Enterprise domain name.", alias="enterpriseDomainName") + sso: Optional[StrictBool] = Field(default=None, description="Whether this is an SSO-based subscription.") + email: Optional[StrictStr] = Field(default=None, description="Requester email.") + name: Optional[StrictStr] = Field(default=None, description="Requester name.") + federated_user_id: Optional[StrictStr] = Field(default=None, description="Federated user identifier.", alias="federatedUserId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["trialRequestCode", "password", "termsOfService", "enterpriseDomainName", "sso", "email", "name", "federatedUserId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscribeToTrialBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscribeToTrialBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "trialRequestCode": obj.get("trialRequestCode"), + "password": obj.get("password"), + "termsOfService": obj.get("termsOfService"), + "enterpriseDomainName": obj.get("enterpriseDomainName"), + "sso": obj.get("sso"), + "email": obj.get("email"), + "name": obj.get("name"), + "federatedUserId": obj.get("federatedUserId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/subscription.py b/corellium/models/subscription.py new file mode 100644 index 0000000..ddc092e --- /dev/null +++ b/corellium/models/subscription.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.subscription_trial import SubscriptionTrial +from typing import Optional, Set +from typing_extensions import Self + +class Subscription(BaseModel): + """ + Subscription + """ # noqa: E501 + trial: Optional[SubscriptionTrial] + status: Optional[StrictStr] = Field(description="Subscription status. Null on domains without billing.") + billing_type: StrictStr = Field(description="Billing type.", alias="billingType") + plan_name: Optional[StrictStr] = Field(description="Plan name.", alias="planName") + next_bill: Optional[StrictStr] = Field(default=None, description="Next billing date. Omitted on domains without billing.", alias="nextBill") + use_device_accounting: Optional[StrictBool] = Field(description="Whether device accounting is used.", alias="useDeviceAccounting") + is_enterprise: Optional[StrictBool] = Field(description="Whether the plan is enterprise.", alias="isEnterprise") + is_usage_based: Optional[StrictBool] = Field(description="Whether the plan is usage based.", alias="isUsageBased") + cancel_policy: Optional[StrictStr] = Field(description="Cancellation policy.", alias="cancelPolicy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["trial", "status", "billingType", "planName", "nextBill", "useDeviceAccounting", "isEnterprise", "isUsageBased", "cancelPolicy"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Subscription from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of trial + if self.trial: + _dict['trial'] = self.trial.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if trial (nullable) is None + # and model_fields_set contains the field + if self.trial is None and "trial" in self.model_fields_set: + _dict['trial'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if plan_name (nullable) is None + # and model_fields_set contains the field + if self.plan_name is None and "plan_name" in self.model_fields_set: + _dict['planName'] = None + + # set to None if next_bill (nullable) is None + # and model_fields_set contains the field + if self.next_bill is None and "next_bill" in self.model_fields_set: + _dict['nextBill'] = None + + # set to None if use_device_accounting (nullable) is None + # and model_fields_set contains the field + if self.use_device_accounting is None and "use_device_accounting" in self.model_fields_set: + _dict['useDeviceAccounting'] = None + + # set to None if is_enterprise (nullable) is None + # and model_fields_set contains the field + if self.is_enterprise is None and "is_enterprise" in self.model_fields_set: + _dict['isEnterprise'] = None + + # set to None if is_usage_based (nullable) is None + # and model_fields_set contains the field + if self.is_usage_based is None and "is_usage_based" in self.model_fields_set: + _dict['isUsageBased'] = None + + # set to None if cancel_policy (nullable) is None + # and model_fields_set contains the field + if self.cancel_policy is None and "cancel_policy" in self.model_fields_set: + _dict['cancelPolicy'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Subscription from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "trial": SubscriptionTrial.from_dict(obj["trial"]) if obj.get("trial") is not None else None, + "status": obj.get("status"), + "billingType": obj.get("billingType"), + "planName": obj.get("planName"), + "nextBill": obj.get("nextBill"), + "useDeviceAccounting": obj.get("useDeviceAccounting"), + "isEnterprise": obj.get("isEnterprise"), + "isUsageBased": obj.get("isUsageBased"), + "cancelPolicy": obj.get("cancelPolicy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/subscription_trial.py b/corellium/models/subscription_trial.py new file mode 100644 index 0000000..8ffa51a --- /dev/null +++ b/corellium/models/subscription_trial.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SubscriptionTrial(BaseModel): + """ + Trial usage details, or null when the domain has no trial. + """ # noqa: E501 + status: StrictStr = Field(description="Trial status.") + start: Optional[datetime] = Field(description="Trial start time, or null.") + end: Optional[datetime] = Field(description="Trial end time, or null.") + used_hours: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(description="Trial hours used, or null.", alias="usedHours") + max_hours: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(description="Trial hour allowance, or null.", alias="maxHours") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status", "start", "end", "usedHours", "maxHours"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['not_started', 'active', 'completed']): + raise ValueError("must be one of enum values ('not_started', 'active', 'completed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscriptionTrial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict['start'] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict['end'] = None + + # set to None if used_hours (nullable) is None + # and model_fields_set contains the field + if self.used_hours is None and "used_hours" in self.model_fields_set: + _dict['usedHours'] = None + + # set to None if max_hours (nullable) is None + # and model_fields_set contains the field + if self.max_hours is None and "max_hours" in self.model_fields_set: + _dict['maxHours'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionTrial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "start": obj.get("start"), + "end": obj.get("end"), + "usedHours": obj.get("usedHours"), + "maxHours": obj.get("maxHours") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/sys_info_schema.py b/corellium/models/sys_info_schema.py new file mode 100644 index 0000000..e5fca31 --- /dev/null +++ b/corellium/models/sys_info_schema.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SysInfoSchema(BaseModel): + """ + System information for this node. + """ # noqa: E501 + numa_nodes: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Number of NUMA nodes.", alias="numaNodes") + cpu: Optional[Any] = Field(default=None, description="CPU availability.") + cpu_avail: Optional[Any] = Field(default=None, description="Available CPU.", alias="cpuAvail") + slot: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Slot count.") + slot_avail: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Available slot count.", alias="slotAvail") + ram: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Total RAM in MiB.") + ram_avail: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Available RAM in MiB.", alias="ramAvail") + vpn: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="VPN count.") + vpn_avail: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Available VPN count.", alias="vpnAvail") + gpu: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="GPU count.") + gpu_avail: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Available GPU count.", alias="gpuAvail") + ram_cpu: Optional[StrictStr] = Field(default='0', description="RAM per CPU.", alias="ramCpu") + el032: Optional[StrictStr] = Field(default='0', description="EL0-32 capability.") + el132: Optional[StrictStr] = Field(default='0', description="EL1-32 capability.") + mmu_tg16k: Optional[StrictStr] = Field(default='0', description="MMU 16K translation granule support.", alias="mmuTg16k") + hw_pac: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Hardware pointer authentication support.", alias="hwPac") + arm_trace: Optional[StrictStr] = Field(default='0', description="ARM trace capability.", alias="armTrace") + cores: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Total core count.") + cores_avail: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Available core count.", alias="coresAvail") + ram_core: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="RAM per core in MiB.", alias="ramCore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["numaNodes", "cpu", "cpuAvail", "slot", "slotAvail", "ram", "ramAvail", "vpn", "vpnAvail", "gpu", "gpuAvail", "ramCpu", "el032", "el132", "mmuTg16k", "hwPac", "armTrace", "cores", "coresAvail", "ramCore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SysInfoSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if cpu (nullable) is None + # and model_fields_set contains the field + if self.cpu is None and "cpu" in self.model_fields_set: + _dict['cpu'] = None + + # set to None if cpu_avail (nullable) is None + # and model_fields_set contains the field + if self.cpu_avail is None and "cpu_avail" in self.model_fields_set: + _dict['cpuAvail'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SysInfoSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "numaNodes": obj.get("numaNodes") if obj.get("numaNodes") is not None else 0, + "cpu": obj.get("cpu"), + "cpuAvail": obj.get("cpuAvail"), + "slot": obj.get("slot") if obj.get("slot") is not None else 0, + "slotAvail": obj.get("slotAvail") if obj.get("slotAvail") is not None else 0, + "ram": obj.get("ram") if obj.get("ram") is not None else 0, + "ramAvail": obj.get("ramAvail") if obj.get("ramAvail") is not None else 0, + "vpn": obj.get("vpn") if obj.get("vpn") is not None else 0, + "vpnAvail": obj.get("vpnAvail") if obj.get("vpnAvail") is not None else 0, + "gpu": obj.get("gpu") if obj.get("gpu") is not None else 0, + "gpuAvail": obj.get("gpuAvail") if obj.get("gpuAvail") is not None else 0, + "ramCpu": obj.get("ramCpu") if obj.get("ramCpu") is not None else '0', + "el032": obj.get("el032") if obj.get("el032") is not None else '0', + "el132": obj.get("el132") if obj.get("el132") is not None else '0', + "mmuTg16k": obj.get("mmuTg16k") if obj.get("mmuTg16k") is not None else '0', + "hwPac": obj.get("hwPac") if obj.get("hwPac") is not None else 0, + "armTrace": obj.get("armTrace") if obj.get("armTrace") is not None else '0', + "cores": obj.get("cores") if obj.get("cores") is not None else 0, + "coresAvail": obj.get("coresAvail") if obj.get("coresAvail") is not None else 0, + "ramCore": obj.get("ramCore") if obj.get("ramCore") is not None else 0 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/task_status.py b/corellium/models/task_status.py new file mode 100644 index 0000000..abb085a --- /dev/null +++ b/corellium/models/task_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TaskStatus(str, Enum): + """ + Current task status. + """ + + """ + allowed enum values + """ + IN_MINUS_PROGRESS = 'in-progress' + COMPLETE = 'complete' + ERROR = 'error' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TaskStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/corellium/models/team.py b/corellium/models/team.py new file mode 100644 index 0000000..02de2aa --- /dev/null +++ b/corellium/models/team.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.team_user import TeamUser +from typing import Optional, Set +from typing_extensions import Self + +class Team(BaseModel): + """ + Team + """ # noqa: E501 + id: StrictStr = Field(description="Team identifier (or \"all-users\" for the implicit team).") + label: Optional[StrictStr] = Field(description="Team label; null when the team has no name set.") + users: List[TeamUser] = Field(description="Members of the team.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "label", "users"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Team from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Team from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "label": obj.get("label"), + "users": [TeamUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/team_create.py b/corellium/models/team_create.py new file mode 100644 index 0000000..009a35f --- /dev/null +++ b/corellium/models/team_create.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TeamCreate(BaseModel): + """ + + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="ID of newly created team") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/team_created.py b/corellium/models/team_created.py new file mode 100644 index 0000000..9ac17c9 --- /dev/null +++ b/corellium/models/team_created.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TeamCreated(BaseModel): + """ + TeamCreated + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the newly created team.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamCreated from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamCreated from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/team_user.py b/corellium/models/team_user.py new file mode 100644 index 0000000..db81b79 --- /dev/null +++ b/corellium/models/team_user.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TeamUser(BaseModel): + """ + TeamUser + """ # noqa: E501 + id: StrictStr = Field(description="User identifier.") + label: StrictStr = Field(description="User label.") + name: Optional[StrictStr] = Field(default=None, description="Username.") + email: Optional[StrictStr] = Field(default=None, description="User email.") + administrator: Optional[StrictBool] = Field(default=None, description="Whether the user is a domain administrator.") + can_edit_user_attributes: Optional[StrictBool] = Field(default=None, description="Whether the user can edit user attributes.", alias="canEditUserAttributes") + cluster_administrator: Optional[StrictBool] = Field(default=None, description="Whether the user is a cluster administrator.", alias="clusterAdministrator") + is_federated_user: Optional[StrictBool] = Field(default=None, description="Whether the user authenticates via a federated provider.", alias="isFederatedUser") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "label", "name", "email", "administrator", "canEditUserAttributes", "clusterAdministrator", "isFederatedUser"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if administrator (nullable) is None + # and model_fields_set contains the field + if self.administrator is None and "administrator" in self.model_fields_set: + _dict['administrator'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "label": obj.get("label"), + "name": obj.get("name"), + "email": obj.get("email"), + "administrator": obj.get("administrator"), + "canEditUserAttributes": obj.get("canEditUserAttributes"), + "clusterAdministrator": obj.get("clusterAdministrator"), + "isFederatedUser": obj.get("isFederatedUser") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/team_v1.py b/corellium/models/team_v1.py new file mode 100644 index 0000000..03eac9b --- /dev/null +++ b/corellium/models/team_v1.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.user import User +from typing import Optional, Set +from typing_extensions import Self + +class TeamV1(BaseModel): + """ + + """ # noqa: E501 + id: StrictStr = Field(description="Team ID") + label: StrictStr = Field(description="Team Label") + users: Optional[List[User]] = Field(default=None, description="Users") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "label", "users"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if users (nullable) is None + # and model_fields_set contains the field + if self.users is None and "users" in self.model_fields_set: + _dict['users'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "label": obj.get("label"), + "users": [User.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/teams_list_response.py b/corellium/models/teams_list_response.py new file mode 100644 index 0000000..0623bd2 --- /dev/null +++ b/corellium/models/teams_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.team import Team +from typing import Optional, Set +from typing_extensions import Self + +class TeamsListResponse(BaseModel): + """ + TeamsListResponse + """ # noqa: E501 + results: List[Team] = Field(description="Array of teams.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TeamsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TeamsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Team.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/test_assessment_input.py b/corellium/models/test_assessment_input.py new file mode 100644 index 0000000..734830e --- /dev/null +++ b/corellium/models/test_assessment_input.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TestAssessmentInput(BaseModel): + """ + TestAssessmentInput + """ # noqa: E501 + invert: Optional[StrictBool] = Field(default=None, description="Optional, default false. When true, run every check EXCEPT those matched by `grep`. Has no effect without `grep`.") + grep: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A JavaScript regular expression; only checks whose check ID, group ID, or category ID matches it are run. Without anchors (`^`, `$`) it can match anywhere in the ID, so `masvs-storage` selects every storage check. Characters such as `.` have their regular-expression meaning. To add flags, wrap the pattern in slashes, for example `/^masvs-network-1-ios-/i`. Omit to run every applicable check.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["invert", "grep"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestAssessmentInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if invert (nullable) is None + # and model_fields_set contains the field + if self.invert is None and "invert" in self.model_fields_set: + _dict['invert'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestAssessmentInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "invert": obj.get("invert"), + "grep": obj.get("grep") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/text_input.py b/corellium/models/text_input.py new file mode 100644 index 0000000..0f9bdd6 --- /dev/null +++ b/corellium/models/text_input.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TextInput(BaseModel): + """ + + """ # noqa: E501 + text: Optional[StrictStr] = Field(default=None, description="text to type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["text"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TextInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if text (nullable) is None + # and model_fields_set contains the field + if self.text is None and "text" in self.model_fields_set: + _dict['text'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TextInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "text": obj.get("text") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/text_input_request.py b/corellium/models/text_input_request.py new file mode 100644 index 0000000..4a62df7 --- /dev/null +++ b/corellium/models/text_input_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TextInputRequest(BaseModel): + """ + TextInputRequest + """ # noqa: E501 + text: StrictStr = Field(description="Text to type.") + key_duration: Optional[StrictInt] = Field(default=None, description="How long to take to type each key, in milliseconds. Defaults to ~150ms per key downstream when omitted.", alias="keyDuration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["text", "keyDuration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TextInputRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TextInputRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "keyDuration": obj.get("keyDuration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/text_input_request_v1.py b/corellium/models/text_input_request_v1.py new file mode 100644 index 0000000..8429cc2 --- /dev/null +++ b/corellium/models/text_input_request_v1.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TextInputRequestV1(BaseModel): + """ + + """ # noqa: E501 + required: StrictStr = Field(description="text to type") + key_duration: Optional[StrictInt] = Field(default=None, description="How long to take to type each key. 150ms if not defined.", alias="keyDuration") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["required", "keyDuration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TextInputRequestV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if key_duration (nullable) is None + # and model_fields_set contains the field + if self.key_duration is None and "key_duration" in self.model_fields_set: + _dict['keyDuration'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TextInputRequestV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "required": obj.get("required"), + "keyDuration": obj.get("keyDuration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/token.py b/corellium/models/token.py new file mode 100644 index 0000000..9e53a45 --- /dev/null +++ b/corellium/models/token.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Token(BaseModel): + """ + Token + """ # noqa: E501 + token: StrictStr = Field(description="Authorization token.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Token from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Token from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/token_v1.py b/corellium/models/token_v1.py new file mode 100644 index 0000000..933daa2 --- /dev/null +++ b/corellium/models/token_v1.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TokenV1(BaseModel): + """ + + """ # noqa: E501 + token: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if token (nullable) is None + # and model_fields_set contains the field + if self.token is None and "token" in self.model_fields_set: + _dict['token'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/token_validate_body.py b/corellium/models/token_validate_body.py new file mode 100644 index 0000000..dc35b7b --- /dev/null +++ b/corellium/models/token_validate_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TokenValidateBody(BaseModel): + """ + TokenValidateBody + """ # noqa: E501 + token: StrictStr = Field(description="Instance token to validate.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenValidateBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenValidateBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/totp_disable_body.py b/corellium/models/totp_disable_body.py new file mode 100644 index 0000000..675829a --- /dev/null +++ b/corellium/models/totp_disable_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TotpDisableBody(BaseModel): + """ + TotpDisableBody + """ # noqa: E501 + totp_token: StrictStr = Field(description="Current TOTP token.", alias="totpToken") + password: StrictStr = Field(description="User password.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totpToken", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TotpDisableBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TotpDisableBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totpToken": obj.get("totpToken"), + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/totp_enable_body.py b/corellium/models/totp_enable_body.py new file mode 100644 index 0000000..b0c37ac --- /dev/null +++ b/corellium/models/totp_enable_body.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TotpEnableBody(BaseModel): + """ + TotpEnableBody + """ # noqa: E501 + secret: StrictStr = Field(description="Base32-encoded TOTP secret returned by generate.") + totp_token: StrictStr = Field(description="Current TOTP token, used to confirm the secret.", alias="totpToken") + password: StrictStr = Field(description="User password.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["secret", "totpToken", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TotpEnableBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TotpEnableBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "secret": obj.get("secret"), + "totpToken": obj.get("totpToken"), + "password": obj.get("password") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/totp_generate_response.py b/corellium/models/totp_generate_response.py new file mode 100644 index 0000000..e756022 --- /dev/null +++ b/corellium/models/totp_generate_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class TotpGenerateResponse(BaseModel): + """ + TotpGenerateResponse + """ # noqa: E501 + qr_code: StrictStr = Field(description="TOTP otpauth URL encoded as a data-URL QR code.", alias="qrCode") + secret: StrictStr = Field(description="Base32-encoded TOTP secret.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["qrCode", "secret"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TotpGenerateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TotpGenerateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "qrCode": obj.get("qrCode"), + "secret": obj.get("secret") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/touch_curve_input.py b/corellium/models/touch_curve_input.py new file mode 100644 index 0000000..d5a45e8 --- /dev/null +++ b/corellium/models/touch_curve_input.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TouchCurveInput(BaseModel): + """ + + """ # noqa: E501 + start: Optional[Dict[str, Any]] = Field(default=None, description="Finger Positions") + end: Optional[Dict[str, Any]] = Field(default=None, description="Finger Positions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["start", "end"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TouchCurveInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TouchCurveInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start": obj.get("start"), + "end": obj.get("end") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/touch_curve_input_request.py b/corellium/models/touch_curve_input_request.py new file mode 100644 index 0000000..46660d1 --- /dev/null +++ b/corellium/models/touch_curve_input_request.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TouchCurveInputRequest(BaseModel): + """ + TouchCurveInputRequest + """ # noqa: E501 + start: List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)]] = Field(description="Array of per-finger [x,y] touch positions, up to 10 depending on model.") + end: List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)]] = Field(description="Array of per-finger [x,y] touch positions, up to 10 depending on model.") + bezier_points: Optional[List[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)]]]] = Field(default=None, description="Per-finger intermediate touch positions.", alias="bezierPoints") + start_buttons: List[StrictStr] = Field(description="Buttons held during this curve. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor.", alias="startButtons") + end_buttons: Optional[List[StrictStr]] = Field(default=None, description="Buttons left held after this curve. Omit to leave unchanged; use an empty array to release. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor.", alias="endButtons") + normalized: Optional[StrictBool] = Field(default=None, description="Use normalized 0-10000 coordinates.") + wait: Optional[StrictInt] = Field(default=None, description="Duration to wait before this input is executed, in milliseconds.") + duration: StrictInt = Field(description="Duration to execute this curve over, in milliseconds.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["start", "end", "bezierPoints", "startButtons", "endButtons", "normalized", "wait", "duration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TouchCurveInputRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TouchCurveInputRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start": obj.get("start"), + "end": obj.get("end"), + "bezierPoints": obj.get("bezierPoints"), + "startButtons": obj.get("startButtons"), + "endButtons": obj.get("endButtons"), + "normalized": obj.get("normalized"), + "wait": obj.get("wait"), + "duration": obj.get("duration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/touch_curve_input_request_v1.py b/corellium/models/touch_curve_input_request_v1.py new file mode 100644 index 0000000..f121a5b --- /dev/null +++ b/corellium/models/touch_curve_input_request_v1.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TouchCurveInputRequestV1(BaseModel): + """ + + """ # noqa: E501 + start: Dict[str, Any] = Field(description="Finger Positions") + end: Dict[str, Any] = Field(description="Finger Positions") + bezier_points: Optional[List[Dict[str, Any]]] = Field(default=None, description="array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined.", alias="bezierPoints") + start_buttons: List[Any] = Field(description="Buttons to be held during this curve.", alias="startButtons") + end_buttons: Optional[List[Any]] = Field(default=None, description="Buttons to be left held after this curve. Same as startButtons if not defined.", alias="endButtons") + normalized: Optional[StrictBool] = Field(default=None, description="true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen)") + wait: Optional[StrictInt] = Field(default=None, description="Duration to wait before this input is executed. Instant if not defined.") + duration: StrictInt = Field(description="Duration to execute this curve over.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["start", "end", "bezierPoints", "startButtons", "endButtons", "normalized", "wait", "duration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TouchCurveInputRequestV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if bezier_points (nullable) is None + # and model_fields_set contains the field + if self.bezier_points is None and "bezier_points" in self.model_fields_set: + _dict['bezierPoints'] = None + + # set to None if end_buttons (nullable) is None + # and model_fields_set contains the field + if self.end_buttons is None and "end_buttons" in self.model_fields_set: + _dict['endButtons'] = None + + # set to None if normalized (nullable) is None + # and model_fields_set contains the field + if self.normalized is None and "normalized" in self.model_fields_set: + _dict['normalized'] = None + + # set to None if wait (nullable) is None + # and model_fields_set contains the field + if self.wait is None and "wait" in self.model_fields_set: + _dict['wait'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TouchCurveInputRequestV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start": obj.get("start"), + "end": obj.get("end"), + "bezierPoints": obj.get("bezierPoints"), + "startButtons": obj.get("startButtons"), + "endButtons": obj.get("endButtons"), + "normalized": obj.get("normalized"), + "wait": obj.get("wait"), + "duration": obj.get("duration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/touch_input.py b/corellium/models/touch_input.py new file mode 100644 index 0000000..aa9c8b3 --- /dev/null +++ b/corellium/models/touch_input.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TouchInput(BaseModel): + """ + + """ # noqa: E501 + position: Optional[Dict[str, Any]] = Field(default=None, description="Finger Positions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["position"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TouchInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TouchInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "position": obj.get("position") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/touch_input_request.py b/corellium/models/touch_input_request.py new file mode 100644 index 0000000..482a847 --- /dev/null +++ b/corellium/models/touch_input_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TouchInputRequest(BaseModel): + """ + TouchInputRequest + """ # noqa: E501 + position: Optional[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)]]] = Field(default=None, description="Array of per-finger [x,y] touch positions, up to 10 depending on model.") + buttons: Optional[List[StrictStr]] = Field(default=None, description="Buttons held when this position is reached. Omit to leave unchanged; use an empty array to release. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor.") + normalized: Optional[StrictBool] = Field(default=None, description="Use normalized 0-10000 coordinates.") + wait: Optional[StrictInt] = Field(default=None, description="Duration to wait before this input is executed, in milliseconds.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["position", "buttons", "normalized", "wait"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TouchInputRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TouchInputRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "position": obj.get("position"), + "buttons": obj.get("buttons"), + "normalized": obj.get("normalized"), + "wait": obj.get("wait") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/touch_input_request_v1.py b/corellium/models/touch_input_request_v1.py new file mode 100644 index 0000000..59f3009 --- /dev/null +++ b/corellium/models/touch_input_request_v1.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TouchInputRequestV1(BaseModel): + """ + + """ # noqa: E501 + position: Optional[Dict[str, Any]] = Field(default=None, description="Finger Positions") + buttons: Optional[List[Any]] = Field(default=None, description="Buttons to be held when this position is reached. Accepts case-insensitive VM button names, keyboard key names, or single ASCII characters. No change if not defined; an empty array releases all buttons.") + normalized: Optional[StrictBool] = Field(default=None, description="true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen)") + wait: Optional[StrictInt] = Field(default=None, description="Duration to wait before this input is executed. Instant if not defined.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["position", "buttons", "normalized", "wait"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TouchInputRequestV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if buttons (nullable) is None + # and model_fields_set contains the field + if self.buttons is None and "buttons" in self.model_fields_set: + _dict['buttons'] = None + + # set to None if normalized (nullable) is None + # and model_fields_set contains the field + if self.normalized is None and "normalized" in self.model_fields_set: + _dict['normalized'] = None + + # set to None if wait (nullable) is None + # and model_fields_set contains the field + if self.wait is None and "wait" in self.model_fields_set: + _dict['wait'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TouchInputRequestV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "position": obj.get("position"), + "buttons": obj.get("buttons"), + "normalized": obj.get("normalized"), + "wait": obj.get("wait") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial.py b/corellium/models/trial.py new file mode 100644 index 0000000..1d9c9a0 --- /dev/null +++ b/corellium/models/trial.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class Trial(BaseModel): + """ + Info about trial. + """ # noqa: E501 + default_duration: Union[StrictFloat, StrictInt] = Field(description="Default trial duration.", alias="defaultDuration") + default_hours: Union[StrictFloat, StrictInt] = Field(description="Default trial hours.", alias="defaultHours") + default_devices: Union[StrictFloat, StrictInt] = Field(description="Default trial devices.", alias="defaultDevices") + default_cores: Union[StrictFloat, StrictInt] = Field(description="Default trial cores.", alias="defaultCores") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["defaultDuration", "defaultHours", "defaultDevices", "defaultCores"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Trial from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Trial from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultDuration": obj.get("defaultDuration"), + "defaultHours": obj.get("defaultHours"), + "defaultDevices": obj.get("defaultDevices"), + "defaultCores": obj.get("defaultCores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_extension.py b/corellium/models/trial_extension.py new file mode 100644 index 0000000..f602b0f --- /dev/null +++ b/corellium/models/trial_extension.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TrialExtension(BaseModel): + """ + TrialExtension + """ # noqa: E501 + duration: StrictInt = Field(description="Number of additional days requested.") + reason: Optional[StrictStr] = Field(default=None, description="Reason for the extension request.") + denied: Optional[StrictBool] = Field(default=None, description="Whether the request was denied.") + denied_reason: Optional[StrictStr] = Field(default=None, description="Explanation for why the request was denied.", alias="deniedReason") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["duration", "reason", "denied", "deniedReason"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialExtension from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialExtension from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "duration": obj.get("duration"), + "reason": obj.get("reason"), + "denied": obj.get("denied"), + "deniedReason": obj.get("deniedReason") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_extension_v1.py b/corellium/models/trial_extension_v1.py new file mode 100644 index 0000000..b3ec4a4 --- /dev/null +++ b/corellium/models/trial_extension_v1.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class TrialExtensionV1(BaseModel): + """ + + """ # noqa: E501 + duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="how many additional days?") + reason: Optional[StrictStr] = Field(default=None, description="why does the user want more time?") + denied: Optional[StrictBool] = None + denied_reason: Optional[StrictStr] = Field(default=None, description="explanation for why the request was denied", alias="deniedReason") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["duration", "reason", "denied", "deniedReason"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialExtensionV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if duration (nullable) is None + # and model_fields_set contains the field + if self.duration is None and "duration" in self.model_fields_set: + _dict['duration'] = None + + # set to None if reason (nullable) is None + # and model_fields_set contains the field + if self.reason is None and "reason" in self.model_fields_set: + _dict['reason'] = None + + # set to None if denied (nullable) is None + # and model_fields_set contains the field + if self.denied is None and "denied" in self.model_fields_set: + _dict['denied'] = None + + # set to None if denied_reason (nullable) is None + # and model_fields_set contains the field + if self.denied_reason is None and "denied_reason" in self.model_fields_set: + _dict['deniedReason'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialExtensionV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "duration": obj.get("duration"), + "reason": obj.get("reason"), + "denied": obj.get("denied"), + "deniedReason": obj.get("deniedReason") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_request.py b/corellium/models/trial_request.py new file mode 100644 index 0000000..5573980 --- /dev/null +++ b/corellium/models/trial_request.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class TrialRequest(BaseModel): + """ + TrialRequest + """ # noqa: E501 + email: StrictStr = Field(description="Requester email.") + name: Optional[StrictStr] = Field(description="Requester name.") + billing_type: Optional[StrictStr] = Field(description="Billing type.", alias="billingType") + billing_id: Optional[StrictStr] = Field(description="Billing backend identifier.", alias="billingId") + code: Optional[StrictStr] = Field(description="Sign-up code.") + enterprise: StrictBool = Field(description="Whether an enterprise domain is requested.") + granted: Optional[StrictBool] = Field(description="Whether the request was granted.") + phone: Optional[StrictStr] = Field(description="Phone number.") + country: Optional[StrictStr] = Field(description="Country.") + organization: Optional[StrictStr] = Field(description="Organization.") + organization_type: Optional[StrictStr] = Field(description="Organization type.", alias="organizationType") + metadata: Optional[Dict[str, Any]] = Field(description="Sign-up metadata.") + created_at: Union[StrictFloat, StrictInt] = Field(description="Creation timestamp (ms).", alias="createdAt") + updated_at: Union[StrictFloat, StrictInt] = Field(description="Update timestamp (ms).", alias="updatedAt") + display_status: StrictStr = Field(description="Computed display status of the trial request.", alias="displayStatus") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "name", "billingType", "billingId", "code", "enterprise", "granted", "phone", "country", "organization", "organizationType", "metadata", "createdAt", "updatedAt", "displayStatus"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if billing_type (nullable) is None + # and model_fields_set contains the field + if self.billing_type is None and "billing_type" in self.model_fields_set: + _dict['billingType'] = None + + # set to None if billing_id (nullable) is None + # and model_fields_set contains the field + if self.billing_id is None and "billing_id" in self.model_fields_set: + _dict['billingId'] = None + + # set to None if code (nullable) is None + # and model_fields_set contains the field + if self.code is None and "code" in self.model_fields_set: + _dict['code'] = None + + # set to None if granted (nullable) is None + # and model_fields_set contains the field + if self.granted is None and "granted" in self.model_fields_set: + _dict['granted'] = None + + # set to None if phone (nullable) is None + # and model_fields_set contains the field + if self.phone is None and "phone" in self.model_fields_set: + _dict['phone'] = None + + # set to None if country (nullable) is None + # and model_fields_set contains the field + if self.country is None and "country" in self.model_fields_set: + _dict['country'] = None + + # set to None if organization (nullable) is None + # and model_fields_set contains the field + if self.organization is None and "organization" in self.model_fields_set: + _dict['organization'] = None + + # set to None if organization_type (nullable) is None + # and model_fields_set contains the field + if self.organization_type is None and "organization_type" in self.model_fields_set: + _dict['organizationType'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "name": obj.get("name"), + "billingType": obj.get("billingType"), + "billingId": obj.get("billingId"), + "code": obj.get("code"), + "enterprise": obj.get("enterprise"), + "granted": obj.get("granted"), + "phone": obj.get("phone"), + "country": obj.get("country"), + "organization": obj.get("organization"), + "organizationType": obj.get("organizationType"), + "metadata": obj.get("metadata"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "displayStatus": obj.get("displayStatus") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_request_detail.py b/corellium/models/trial_request_detail.py new file mode 100644 index 0000000..4d989c8 --- /dev/null +++ b/corellium/models/trial_request_detail.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.trial_request_detail_organization import TrialRequestDetailOrganization +from typing import Optional, Set +from typing_extensions import Self + +class TrialRequestDetail(BaseModel): + """ + TrialRequestDetail + """ # noqa: E501 + identifier: StrictStr = Field(description="Trial request identifier.") + metadata: Optional[Dict[str, Any]] = Field(description="Additional metadata.") + organization: Optional[TrialRequestDetailOrganization] + devices: Optional[List[Dict[str, StrictStr]]] = Field(description="Devices requested (e.g. [{ ios: \"iOS\" }]).") + use_cases: Optional[List[Dict[str, StrictStr]]] = Field(description="Use cases (e.g. [{ malware: \"Malware Research\" }]).", alias="useCases") + email: StrictStr = Field(description="Contact email.") + name: StrictStr = Field(description="Contact name.") + billing_type: StrictStr = Field(description="Billing type.", alias="billingType") + billing_backend: Optional[StrictStr] = Field(description="Billing backend (e.g. stripe).", alias="billingBackend") + billing_id: Optional[StrictStr] = Field(description="External billing identifier.", alias="billingId") + product_id: Optional[StrictStr] = Field(description="Stripe product identifier.", alias="productId") + code: StrictStr = Field(description="Trial coupon code.") + enterprise: StrictBool = Field(description="Whether the request is for enterprise.") + granted: StrictBool = Field(description="Whether the trial has been granted.") + phone: Optional[StrictStr] = Field(description="Contact phone number.") + country: Optional[StrictStr] = Field(description="Country code.") + organization_type: Optional[StrictStr] = Field(description="Organization type.", alias="organizationType") + industry: Optional[StrictStr] = Field(description="Industry.") + role: Optional[StrictStr] = Field(description="Job role.") + solution: Optional[StrictStr] = Field(description="Solution of interest.") + domain: Optional[StrictStr] = Field(description="Associated domain identifier.") + started_at: Optional[datetime] = Field(description="ISO timestamp of trial start.", alias="startedAt") + granted_at: Optional[datetime] = Field(description="ISO timestamp of when trial was granted.", alias="grantedAt") + denied_at: Optional[datetime] = Field(description="ISO timestamp of when trial was denied.", alias="deniedAt") + plan_name: Optional[StrictStr] = Field(description="Trial plan name.", alias="planName") + ends_at: Optional[datetime] = Field(description="ISO timestamp of when trial ends.", alias="endsAt") + grant_method: Optional[StrictStr] = Field(description="Method used to grant the trial.", alias="grantMethod") + duration: Optional[StrictInt] = Field(description="Trial duration in days (override).") + trial_units: Optional[Union[StrictFloat, StrictInt]] = Field(description="Trial usage units remaining.", alias="trialUnits") + created_at: datetime = Field(description="ISO timestamp of creation.", alias="createdAt") + updated_at: datetime = Field(description="ISO timestamp of last update.", alias="updatedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "metadata", "organization", "devices", "useCases", "email", "name", "billingType", "billingBackend", "billingId", "productId", "code", "enterprise", "granted", "phone", "country", "organizationType", "industry", "role", "solution", "domain", "startedAt", "grantedAt", "deniedAt", "planName", "endsAt", "grantMethod", "duration", "trialUnits", "createdAt", "updatedAt"] + + @field_validator('billing_type') + def billing_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['prepaid', 'usage', 'metered', 'credit', 'cores_metered']): + raise ValueError("must be one of enum values ('prepaid', 'usage', 'metered', 'credit', 'cores_metered')") + return value + + @field_validator('organization_type') + def organization_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['individual', 'enterprise']): + raise ValueError("must be one of enum values ('individual', 'enterprise')") + return value + + @field_validator('grant_method') + def grant_method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['sales', 'auto']): + raise ValueError("must be one of enum values ('sales', 'auto')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialRequestDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of organization + if self.organization: + _dict['organization'] = self.organization.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if organization (nullable) is None + # and model_fields_set contains the field + if self.organization is None and "organization" in self.model_fields_set: + _dict['organization'] = None + + # set to None if devices (nullable) is None + # and model_fields_set contains the field + if self.devices is None and "devices" in self.model_fields_set: + _dict['devices'] = None + + # set to None if use_cases (nullable) is None + # and model_fields_set contains the field + if self.use_cases is None and "use_cases" in self.model_fields_set: + _dict['useCases'] = None + + # set to None if billing_backend (nullable) is None + # and model_fields_set contains the field + if self.billing_backend is None and "billing_backend" in self.model_fields_set: + _dict['billingBackend'] = None + + # set to None if billing_id (nullable) is None + # and model_fields_set contains the field + if self.billing_id is None and "billing_id" in self.model_fields_set: + _dict['billingId'] = None + + # set to None if product_id (nullable) is None + # and model_fields_set contains the field + if self.product_id is None and "product_id" in self.model_fields_set: + _dict['productId'] = None + + # set to None if phone (nullable) is None + # and model_fields_set contains the field + if self.phone is None and "phone" in self.model_fields_set: + _dict['phone'] = None + + # set to None if country (nullable) is None + # and model_fields_set contains the field + if self.country is None and "country" in self.model_fields_set: + _dict['country'] = None + + # set to None if organization_type (nullable) is None + # and model_fields_set contains the field + if self.organization_type is None and "organization_type" in self.model_fields_set: + _dict['organizationType'] = None + + # set to None if industry (nullable) is None + # and model_fields_set contains the field + if self.industry is None and "industry" in self.model_fields_set: + _dict['industry'] = None + + # set to None if role (nullable) is None + # and model_fields_set contains the field + if self.role is None and "role" in self.model_fields_set: + _dict['role'] = None + + # set to None if solution (nullable) is None + # and model_fields_set contains the field + if self.solution is None and "solution" in self.model_fields_set: + _dict['solution'] = None + + # set to None if domain (nullable) is None + # and model_fields_set contains the field + if self.domain is None and "domain" in self.model_fields_set: + _dict['domain'] = None + + # set to None if started_at (nullable) is None + # and model_fields_set contains the field + if self.started_at is None and "started_at" in self.model_fields_set: + _dict['startedAt'] = None + + # set to None if granted_at (nullable) is None + # and model_fields_set contains the field + if self.granted_at is None and "granted_at" in self.model_fields_set: + _dict['grantedAt'] = None + + # set to None if denied_at (nullable) is None + # and model_fields_set contains the field + if self.denied_at is None and "denied_at" in self.model_fields_set: + _dict['deniedAt'] = None + + # set to None if plan_name (nullable) is None + # and model_fields_set contains the field + if self.plan_name is None and "plan_name" in self.model_fields_set: + _dict['planName'] = None + + # set to None if ends_at (nullable) is None + # and model_fields_set contains the field + if self.ends_at is None and "ends_at" in self.model_fields_set: + _dict['endsAt'] = None + + # set to None if grant_method (nullable) is None + # and model_fields_set contains the field + if self.grant_method is None and "grant_method" in self.model_fields_set: + _dict['grantMethod'] = None + + # set to None if duration (nullable) is None + # and model_fields_set contains the field + if self.duration is None and "duration" in self.model_fields_set: + _dict['duration'] = None + + # set to None if trial_units (nullable) is None + # and model_fields_set contains the field + if self.trial_units is None and "trial_units" in self.model_fields_set: + _dict['trialUnits'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialRequestDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "metadata": obj.get("metadata"), + "organization": TrialRequestDetailOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, + "devices": obj.get("devices"), + "useCases": obj.get("useCases"), + "email": obj.get("email"), + "name": obj.get("name"), + "billingType": obj.get("billingType"), + "billingBackend": obj.get("billingBackend"), + "billingId": obj.get("billingId"), + "productId": obj.get("productId"), + "code": obj.get("code"), + "enterprise": obj.get("enterprise"), + "granted": obj.get("granted"), + "phone": obj.get("phone"), + "country": obj.get("country"), + "organizationType": obj.get("organizationType"), + "industry": obj.get("industry"), + "role": obj.get("role"), + "solution": obj.get("solution"), + "domain": obj.get("domain"), + "startedAt": obj.get("startedAt"), + "grantedAt": obj.get("grantedAt"), + "deniedAt": obj.get("deniedAt"), + "planName": obj.get("planName"), + "endsAt": obj.get("endsAt"), + "grantMethod": obj.get("grantMethod"), + "duration": obj.get("duration"), + "trialUnits": obj.get("trialUnits"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_request_detail_organization.py b/corellium/models/trial_request_detail_organization.py new file mode 100644 index 0000000..687c1e3 --- /dev/null +++ b/corellium/models/trial_request_detail_organization.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TrialRequestDetailOrganization(BaseModel): + """ + Organization info. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Organization name.") + country: Optional[StrictStr] = Field(default=None, description="Organization country.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "country"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialRequestDetailOrganization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialRequestDetailOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "country": obj.get("country") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_request_list_response.py b/corellium/models/trial_request_list_response.py new file mode 100644 index 0000000..da949d4 --- /dev/null +++ b/corellium/models/trial_request_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.trial_request import TrialRequest +from typing import Optional, Set +from typing_extensions import Self + +class TrialRequestListResponse(BaseModel): + """ + TrialRequestListResponse + """ # noqa: E501 + results: List[TrialRequest] = Field(description="Trial requests.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialRequestListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialRequestListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [TrialRequest.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_request_metadata.py b/corellium/models/trial_request_metadata.py new file mode 100644 index 0000000..d5a83ba --- /dev/null +++ b/corellium/models/trial_request_metadata.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TrialRequestMetadata(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = None + company: Optional[StrictStr] = Field(default=None, description="provided company name") + malware: Optional[StrictBool] = Field(default=None, description="option from sign up form, interesting using for malware") + research: Optional[StrictBool] = Field(default=None, description="option from sign up form, interesting using for research") + pentest: Optional[StrictBool] = Field(default=None, description="option from sign up form, interesting using for pentesting") + other: Optional[StrictStr] = Field(default=None, description="option from sign up form, interesting using for other area added here") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "company", "malware", "research", "pentest", "other"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialRequestMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if company (nullable) is None + # and model_fields_set contains the field + if self.company is None and "company" in self.model_fields_set: + _dict['company'] = None + + # set to None if malware (nullable) is None + # and model_fields_set contains the field + if self.malware is None and "malware" in self.model_fields_set: + _dict['malware'] = None + + # set to None if research (nullable) is None + # and model_fields_set contains the field + if self.research is None and "research" in self.model_fields_set: + _dict['research'] = None + + # set to None if pentest (nullable) is None + # and model_fields_set contains the field + if self.pentest is None and "pentest" in self.model_fields_set: + _dict['pentest'] = None + + # set to None if other (nullable) is None + # and model_fields_set contains the field + if self.other is None and "other" in self.model_fields_set: + _dict['other'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialRequestMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "company": obj.get("company"), + "malware": obj.get("malware"), + "research": obj.get("research"), + "pentest": obj.get("pentest"), + "other": obj.get("other") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_request_options.py b/corellium/models/trial_request_options.py new file mode 100644 index 0000000..3ae4504 --- /dev/null +++ b/corellium/models/trial_request_options.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.address import Address +from corellium.models.trial_request_metadata import TrialRequestMetadata +from typing import Optional, Set +from typing_extensions import Self + +class TrialRequestOptions(BaseModel): + """ + + """ # noqa: E501 + address: Optional[Address] = None + email: Optional[StrictStr] = Field(default=None, description="The user's email address.") + name: Optional[StrictStr] = Field(default=None, description="The user's full name.") + metadata: Optional[TrialRequestMetadata] = None + enterprise: Optional[StrictBool] = Field(default=None, description="If true, create an enterprise domain.") + token: Optional[StrictStr] = Field(default=None, description="Stripe payment token.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["address", "email", "name", "metadata", "enterprise", "token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialRequestOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict['address'] = self.address.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if enterprise (nullable) is None + # and model_fields_set contains the field + if self.enterprise is None and "enterprise" in self.model_fields_set: + _dict['enterprise'] = None + + # set to None if token (nullable) is None + # and model_fields_set contains the field + if self.token is None and "token" in self.model_fields_set: + _dict['token'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialRequestOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": Address.from_dict(obj["address"]) if obj.get("address") is not None else None, + "email": obj.get("email"), + "name": obj.get("name"), + "metadata": TrialRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "enterprise": obj.get("enterprise"), + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/trial_v1.py b/corellium/models/trial_v1.py new file mode 100644 index 0000000..51746b8 --- /dev/null +++ b/corellium/models/trial_v1.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class TrialV1(BaseModel): + """ + + """ # noqa: E501 + default_duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maintenance message", alias="defaultDuration") + default_hours: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maintenance header", alias="defaultHours") + default_devices: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maintenance header", alias="defaultDevices") + default_cores: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maintenance header", alias="defaultCores") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["defaultDuration", "defaultHours", "defaultDevices", "defaultCores"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TrialV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if default_duration (nullable) is None + # and model_fields_set contains the field + if self.default_duration is None and "default_duration" in self.model_fields_set: + _dict['defaultDuration'] = None + + # set to None if default_hours (nullable) is None + # and model_fields_set contains the field + if self.default_hours is None and "default_hours" in self.model_fields_set: + _dict['defaultHours'] = None + + # set to None if default_devices (nullable) is None + # and model_fields_set contains the field + if self.default_devices is None and "default_devices" in self.model_fields_set: + _dict['defaultDevices'] = None + + # set to None if default_cores (nullable) is None + # and model_fields_set contains the field + if self.default_cores is None and "default_cores" in self.model_fields_set: + _dict['defaultCores'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TrialV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultDuration": obj.get("defaultDuration"), + "defaultHours": obj.get("defaultHours"), + "defaultDevices": obj.get("defaultDevices"), + "defaultCores": obj.get("defaultCores") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/unauthorized_error.py b/corellium/models/unauthorized_error.py new file mode 100644 index 0000000..1929d31 --- /dev/null +++ b/corellium/models/unauthorized_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UnauthorizedError(BaseModel): + """ + UnauthorizedError + """ # noqa: E501 + error: StrictStr = Field(description="Error text.") + error_id: StrictStr = Field(description="Error ID.", alias="errorID") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Unauthorized']): + raise ValueError("must be one of enum values ('Unauthorized')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnauthorizedError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnauthorizedError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/uncancel_subscription_body.py b/corellium/models/uncancel_subscription_body.py new file mode 100644 index 0000000..8296509 --- /dev/null +++ b/corellium/models/uncancel_subscription_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UncancelSubscriptionBody(BaseModel): + """ + UncancelSubscriptionBody + """ # noqa: E501 + domain_id: Optional[StrictStr] = Field(default=None, description="Domain to uncancel (defaults to the caller domain).", alias="domainId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domainId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UncancelSubscriptionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UncancelSubscriptionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainId": obj.get("domainId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_assessment_input.py b/corellium/models/update_assessment_input.py new file mode 100644 index 0000000..e99b2de --- /dev/null +++ b/corellium/models/update_assessment_input.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UpdateAssessmentInput(BaseModel): + """ + UpdateAssessmentInput + """ # noqa: E501 + status: StrictStr = Field(description="New lifecycle status for the assessment.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['new', 'startingMonitoring', 'monitoring', 'stoppingMonitoring', 'readyForTesting', 'testing', 'complete', 'failed']): + raise ValueError("must be one of enum values ('new', 'startingMonitoring', 'monitoring', 'stoppingMonitoring', 'readyForTesting', 'testing', 'complete', 'failed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateAssessmentInput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateAssessmentInput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_domain_settings_response.py b/corellium/models/update_domain_settings_response.py new file mode 100644 index 0000000..d65f2c4 --- /dev/null +++ b/corellium/models/update_domain_settings_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.allowed_devices_filter_schema import AllowedDevicesFilterSchema +from corellium.models.device_auto_shutdown_schema import DeviceAutoShutdownSchema +from corellium.models.trial_extension import TrialExtension +from corellium.models.update_domain_settings_response_settings import UpdateDomainSettingsResponseSettings +from corellium.models.update_domain_settings_response_snapshot_sharing_permissions import UpdateDomainSettingsResponseSnapshotSharingPermissions +from corellium.models.update_domain_settings_response_webplayer import UpdateDomainSettingsResponseWebplayer +from typing import Optional, Set +from typing_extensions import Self + +class UpdateDomainSettingsResponse(BaseModel): + """ + UpdateDomainSettingsResponse + """ # noqa: E501 + domain_id: StrictStr = Field(description="Domain identifier.", alias="domainId") + settings: UpdateDomainSettingsResponseSettings + trial_extension: Optional[TrialExtension] = Field(default=None, alias="trialExtension") + device_auto_shutdown: Optional[DeviceAutoShutdownSchema] = Field(default=None, alias="deviceAutoShutdown") + allowed_devices_filters: Optional[List[AllowedDevicesFilterSchema]] = Field(default=None, description="Applied device/firmware allowlist filters.", alias="allowedDevicesFilters") + webplayer: Optional[UpdateDomainSettingsResponseWebplayer] = None + snapshot_sharing_permissions: Optional[UpdateDomainSettingsResponseSnapshotSharingPermissions] = Field(default=None, alias="snapshotSharingPermissions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domainId", "settings", "trialExtension", "deviceAutoShutdown", "allowedDevicesFilters", "webplayer", "snapshotSharingPermissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateDomainSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of trial_extension + if self.trial_extension: + _dict['trialExtension'] = self.trial_extension.to_dict() + # override the default output from pydantic by calling `to_dict()` of device_auto_shutdown + if self.device_auto_shutdown: + _dict['deviceAutoShutdown'] = self.device_auto_shutdown.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in allowed_devices_filters (list) + _items = [] + if self.allowed_devices_filters: + for _item_allowed_devices_filters in self.allowed_devices_filters: + if _item_allowed_devices_filters: + _items.append(_item_allowed_devices_filters.to_dict()) + _dict['allowedDevicesFilters'] = _items + # override the default output from pydantic by calling `to_dict()` of webplayer + if self.webplayer: + _dict['webplayer'] = self.webplayer.to_dict() + # override the default output from pydantic by calling `to_dict()` of snapshot_sharing_permissions + if self.snapshot_sharing_permissions: + _dict['snapshotSharingPermissions'] = self.snapshot_sharing_permissions.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateDomainSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domainId": obj.get("domainId"), + "settings": UpdateDomainSettingsResponseSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None, + "trialExtension": TrialExtension.from_dict(obj["trialExtension"]) if obj.get("trialExtension") is not None else None, + "deviceAutoShutdown": DeviceAutoShutdownSchema.from_dict(obj["deviceAutoShutdown"]) if obj.get("deviceAutoShutdown") is not None else None, + "allowedDevicesFilters": [AllowedDevicesFilterSchema.from_dict(_item) for _item in obj["allowedDevicesFilters"]] if obj.get("allowedDevicesFilters") is not None else None, + "webplayer": UpdateDomainSettingsResponseWebplayer.from_dict(obj["webplayer"]) if obj.get("webplayer") is not None else None, + "snapshotSharingPermissions": UpdateDomainSettingsResponseSnapshotSharingPermissions.from_dict(obj["snapshotSharingPermissions"]) if obj.get("snapshotSharingPermissions") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_domain_settings_response_settings.py b/corellium/models/update_domain_settings_response_settings.py new file mode 100644 index 0000000..91bc443 --- /dev/null +++ b/corellium/models/update_domain_settings_response_settings.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateDomainSettingsResponseSettings(BaseModel): + """ + Applied domain settings. + """ # noqa: E501 + totp_required: Optional[StrictBool] = Field(default=None, description="Whether TOTP is required.", alias="totpRequired") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totpRequired"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateDomainSettingsResponseSettings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateDomainSettingsResponseSettings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totpRequired": obj.get("totpRequired") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_domain_settings_response_snapshot_sharing_permissions.py b/corellium/models/update_domain_settings_response_snapshot_sharing_permissions.py new file mode 100644 index 0000000..cabe452 --- /dev/null +++ b/corellium/models/update_domain_settings_response_snapshot_sharing_permissions.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateDomainSettingsResponseSnapshotSharingPermissions(BaseModel): + """ + Applied snapshot sharing permissions. + """ # noqa: E501 + cloud_enabled: Optional[StrictBool] = Field(default=None, description="Whether snapshot sharing is enabled at the cloud level.", alias="cloudEnabled") + domain_enabled: Optional[StrictBool] = Field(default=None, description="Whether snapshot sharing is enabled at the domain level.", alias="domainEnabled") + public_link: Optional[StrictBool] = Field(default=None, description="Whether public link sharing is enabled.", alias="publicLink") + domain_restricted_link: Optional[StrictBool] = Field(default=None, description="Whether domain-restricted link sharing is enabled.", alias="domainRestrictedLink") + password_public_link: Optional[StrictBool] = Field(default=None, description="Whether password-protected public link sharing is enabled.", alias="passwordPublicLink") + email_invite: Optional[StrictBool] = Field(default=None, description="Whether email invite sharing is enabled.", alias="emailInvite") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cloudEnabled", "domainEnabled", "publicLink", "domainRestrictedLink", "passwordPublicLink", "emailInvite"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateDomainSettingsResponseSnapshotSharingPermissions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateDomainSettingsResponseSnapshotSharingPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cloudEnabled": obj.get("cloudEnabled"), + "domainEnabled": obj.get("domainEnabled"), + "publicLink": obj.get("publicLink"), + "domainRestrictedLink": obj.get("domainRestrictedLink"), + "passwordPublicLink": obj.get("passwordPublicLink"), + "emailInvite": obj.get("emailInvite") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_domain_settings_response_webplayer.py b/corellium/models/update_domain_settings_response_webplayer.py new file mode 100644 index 0000000..bbba5b6 --- /dev/null +++ b/corellium/models/update_domain_settings_response_webplayer.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateDomainSettingsResponseWebplayer(BaseModel): + """ + Applied web player settings. + """ # noqa: E501 + allowed_domains: Optional[List[StrictStr]] = Field(default=None, description="Permitted web player embed domains.", alias="allowedDomains") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["allowedDomains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateDomainSettingsResponseWebplayer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateDomainSettingsResponseWebplayer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedDomains": obj.get("allowedDomains") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_domain_welcome_message_request.py b/corellium/models/update_domain_welcome_message_request.py new file mode 100644 index 0000000..2ad3b93 --- /dev/null +++ b/corellium/models/update_domain_welcome_message_request.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateDomainWelcomeMessageRequest(BaseModel): + """ + + """ # noqa: E501 + message: Optional[StrictStr] = Field(default=None, description="The welcome message text (HTML allowed, will be sanitized)") + enabled: Optional[StrictBool] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["message", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateDomainWelcomeMessageRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateDomainWelcomeMessageRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_extension.py b/corellium/models/update_extension.py new file mode 100644 index 0000000..ae4dc2c --- /dev/null +++ b/corellium/models/update_extension.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateExtension(BaseModel): + """ + + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="If true, instances requiring this extension can be created or started") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateExtension from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateExtension from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_extension_body.py b/corellium/models/update_extension_body.py new file mode 100644 index 0000000..f3c14a7 --- /dev/null +++ b/corellium/models/update_extension_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UpdateExtensionBody(BaseModel): + """ + UpdateExtensionBody + """ # noqa: E501 + enabled: StrictBool = Field(description="If true, devices that use this extension's models can be created and started. Set false to block new use without deleting the extension.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateExtensionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateExtensionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_hook_body.py b/corellium/models/update_hook_body.py new file mode 100644 index 0000000..45aa009 --- /dev/null +++ b/corellium/models/update_hook_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.hook_patch_type import HookPatchType +from typing import Optional, Set +from typing_extensions import Self + +class UpdateHookBody(BaseModel): + """ + UpdateHookBody + """ # noqa: E501 + label: Optional[StrictStr] = Field(default=None, description="Hook label.") + address: Optional[StrictStr] = Field(default=None, description="Memory address to hook.") + patch: Optional[StrictStr] = Field(default=None, description="Patch code to execute.") + patch_type: Optional[HookPatchType] = Field(default=None, alias="patchType") + enabled: Optional[StrictBool] = Field(default=None, description="Whether the hook is active.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["label", "address", "patch", "patchType", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateHookBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateHookBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "address": obj.get("address"), + "patch": obj.get("patch"), + "patchType": obj.get("patchType"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_interconnect_body.py b/corellium/models/update_interconnect_body.py new file mode 100644 index 0000000..e14e435 --- /dev/null +++ b/corellium/models/update_interconnect_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UpdateInterconnectBody(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="The name of the interconnect") + interfaces: List[Dict[str, Any]] = Field(description="Array of interfaces with deviceId and interfaceId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "interfaces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateInterconnectBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateInterconnectBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "interfaces": obj.get("interfaces") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_interconnect_v3_body.py b/corellium/models/update_interconnect_v3_body.py new file mode 100644 index 0000000..f5932cb --- /dev/null +++ b/corellium/models/update_interconnect_v3_body.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from corellium.models.interconnect_protocol import InterconnectProtocol +from corellium.models.interfaces_schema_inner import InterfacesSchemaInner +from typing import Optional, Set +from typing_extensions import Self + +class UpdateInterconnectV3Body(BaseModel): + """ + UpdateInterconnectV3Body + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A name to recognise the interconnect by.") + interfaces: List[InterfacesSchemaInner] + type: Optional[StrictStr] = Field(default=None, description="How the interconnect behaves: `hub` passes every signal to every connected interface; `switch` routes traffic between endpoints.") + project_id: Optional[StrictStr] = Field(default=None, description="Project the interconnect belongs to. Every device listed in `interfaces` must be in this project, otherwise the request fails with 400. Cannot be changed later.", alias="projectId") + protocol: Optional[InterconnectProtocol] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "interfaces", "type", "projectId", "protocol"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['hub', 'switch']): + raise ValueError("must be one of enum values ('hub', 'switch')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateInterconnectV3Body from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in interfaces (list) + _items = [] + if self.interfaces: + for _item_interfaces in self.interfaces: + if _item_interfaces: + _items.append(_item_interfaces.to_dict()) + _dict['interfaces'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateInterconnectV3Body from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "interfaces": [InterfacesSchemaInner.from_dict(_item) for _item in obj["interfaces"]] if obj.get("interfaces") is not None else None, + "type": obj.get("type"), + "projectId": obj.get("projectId"), + "protocol": obj.get("protocol") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_network_connection_body.py b/corellium/models/update_network_connection_body.py new file mode 100644 index 0000000..b5eb4af --- /dev/null +++ b/corellium/models/update_network_connection_body.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.network_connection_config import NetworkConnectionConfig +from typing import Optional, Set +from typing_extensions import Self + +class UpdateNetworkConnectionBody(BaseModel): + """ + UpdateNetworkConnectionBody + """ # noqa: E501 + name: StrictStr = Field(description="User friendly name for Network connection.") + config: Optional[NetworkConnectionConfig] = None + force: Optional[StrictBool] = Field(default=False, description="Force the operation through constraint checks (e.g. stopping active instances).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "config", "force"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateNetworkConnectionBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateNetworkConnectionBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "config": NetworkConnectionConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "force": obj.get("force") if obj.get("force") is not None else False + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_network_connection_options.py b/corellium/models/update_network_connection_options.py new file mode 100644 index 0000000..4700dba --- /dev/null +++ b/corellium/models/update_network_connection_options.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.update_network_connection_options_config import UpdateNetworkConnectionOptionsConfig +from typing import Optional, Set +from typing_extensions import Self + +class UpdateNetworkConnectionOptions(BaseModel): + """ + + """ # noqa: E501 + name: StrictStr = Field(description="User specified name for this network connection. e.g. My Network Connection") + config: Optional[UpdateNetworkConnectionOptionsConfig] = None + force: Optional[StrictBool] = Field(default=None, description="Force the update through constraint checks (e.g. stopping active instances). Defaults to false.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "config", "force"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateNetworkConnectionOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + # set to None if force (nullable) is None + # and model_fields_set contains the field + if self.force is None and "force" in self.model_fields_set: + _dict['force'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateNetworkConnectionOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "config": UpdateNetworkConnectionOptionsConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "force": obj.get("force") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_network_connection_options_config.py b/corellium/models/update_network_connection_options_config.py new file mode 100644 index 0000000..4697c01 --- /dev/null +++ b/corellium/models/update_network_connection_options_config.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from corellium.models.open_vpn_config_v1 import OpenVPNConfigV1 +from corellium.models.vlan_config_v1 import VLANConfigV1 +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +UPDATENETWORKCONNECTIONOPTIONSCONFIG_ANY_OF_SCHEMAS = ["OpenVPNConfigV1", "VLANConfigV1"] + +class UpdateNetworkConnectionOptionsConfig(BaseModel): + """ + An object containing network connection configuration data. Will vary based on network provider type. See examples. + """ + + # data type: OpenVPNConfigV1 + anyof_schema_1_validator: Optional[OpenVPNConfigV1] = None + # data type: VLANConfigV1 + anyof_schema_2_validator: Optional[VLANConfigV1] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[OpenVPNConfigV1, VLANConfigV1]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "OpenVPNConfigV1", "VLANConfigV1" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + if v is None: + return v + + instance = UpdateNetworkConnectionOptionsConfig.model_construct() + error_messages = [] + # validate data type: OpenVPNConfigV1 + if not isinstance(v, OpenVPNConfigV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenVPNConfigV1`") + else: + return v + + # validate data type: VLANConfigV1 + if not isinstance(v, VLANConfigV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `VLANConfigV1`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in UpdateNetworkConnectionOptionsConfig with anyOf schemas: OpenVPNConfigV1, VLANConfigV1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + # anyof_schema_1_validator: Optional[OpenVPNConfigV1] = None + try: + instance.actual_instance = OpenVPNConfigV1.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[VLANConfigV1] = None + try: + instance.actual_instance = VLANConfigV1.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into UpdateNetworkConnectionOptionsConfig with anyOf schemas: OpenVPNConfigV1, VLANConfigV1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], OpenVPNConfigV1, VLANConfigV1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/update_own_profile_body.py b/corellium/models/update_own_profile_body.py new file mode 100644 index 0000000..9aaadd3 --- /dev/null +++ b/corellium/models/update_own_profile_body.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateOwnProfileBody(BaseModel): + """ + UpdateOwnProfileBody + """ # noqa: E501 + label: Annotated[str, Field(min_length=1, strict=True, max_length=100)] = Field(description="Display name.") + __properties: ClassVar[List[str]] = ["label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateOwnProfileBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateOwnProfileBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label") + }) + return _obj + + diff --git a/corellium/models/update_team_body.py b/corellium/models/update_team_body.py new file mode 100644 index 0000000..b4b75c0 --- /dev/null +++ b/corellium/models/update_team_body.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateTeamBody(BaseModel): + """ + UpdateTeamBody + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Team name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateTeamBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateTeamBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_trial_request_body.py b/corellium/models/update_trial_request_body.py new file mode 100644 index 0000000..1d52635 --- /dev/null +++ b/corellium/models/update_trial_request_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class UpdateTrialRequestBody(BaseModel): + """ + UpdateTrialRequestBody + """ # noqa: E501 + extension_days: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Days to add to the trial before it ends.", alias="extensionDays") + extension_hours: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Hours of usage to add to the trial (device-hours or core-hours).", alias="extensionHours") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["extensionDays", "extensionHours"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateTrialRequestBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateTrialRequestBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "extensionDays": obj.get("extensionDays"), + "extensionHours": obj.get("extensionHours") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/update_trial_request_params.py b/corellium/models/update_trial_request_params.py new file mode 100644 index 0000000..656d38f --- /dev/null +++ b/corellium/models/update_trial_request_params.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class UpdateTrialRequestParams(BaseModel): + """ + + """ # noqa: E501 + extension_days: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Days to add to the trial before it ends.", alias="extensionDays") + extension_hours: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Hours of usage to add to the trial. This will be either device-hours or core-hours depending on the trial.", alias="extensionHours") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["extensionDays", "extensionHours"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateTrialRequestParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if extension_days (nullable) is None + # and model_fields_set contains the field + if self.extension_days is None and "extension_days" in self.model_fields_set: + _dict['extensionDays'] = None + + # set to None if extension_hours (nullable) is None + # and model_fields_set contains the field + if self.extension_hours is None and "extension_hours" in self.model_fields_set: + _dict['extensionHours'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateTrialRequestParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "extensionDays": obj.get("extensionDays"), + "extensionHours": obj.get("extensionHours") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/upload_size_error.py b/corellium/models/upload_size_error.py new file mode 100644 index 0000000..6f6d348 --- /dev/null +++ b/corellium/models/upload_size_error.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UploadSizeError(BaseModel): + """ + UploadSizeError + """ # noqa: E501 + error: StrictStr = Field(description="Error text.") + error_id: StrictStr = Field(description="Error ID.", alias="errorID") + var_field: Optional[StrictStr] = Field(default=None, description="Limit that was exceeded, e.g. 'storageQuota' or the image type.", alias="field") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "field"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UploadSizeError']): + raise ValueError("must be one of enum values ('UploadSizeError')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UploadSizeError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UploadSizeError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "field": obj.get("field") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user.py b/corellium/models/user.py new file mode 100644 index 0000000..1e9828d --- /dev/null +++ b/corellium/models/user.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class User(BaseModel): + """ + /** + """ # noqa: E501 + id: StrictStr = Field(description="User ID") + label: StrictStr = Field(description="User Label") + name: StrictStr = Field(description="User Name") + email: StrictStr = Field(description="User Email") + administrator: Optional[StrictBool] = Field(default=None, description="the flag that specifies whether user is Administrator or not") + can_edit_user_attributes: Optional[StrictBool] = Field(default=None, description="Flag to determine if user attributes are editable.", alias="canEditUserAttributes") + cluster_administrator: Optional[StrictBool] = Field(default=None, description="the flag that specifies whether user is cluster administrator or not", alias="clusterAdministrator") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "label", "name", "email", "administrator", "canEditUserAttributes", "clusterAdministrator"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of User from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if administrator (nullable) is None + # and model_fields_set contains the field + if self.administrator is None and "administrator" in self.model_fields_set: + _dict['administrator'] = None + + # set to None if can_edit_user_attributes (nullable) is None + # and model_fields_set contains the field + if self.can_edit_user_attributes is None and "can_edit_user_attributes" in self.model_fields_set: + _dict['canEditUserAttributes'] = None + + # set to None if cluster_administrator (nullable) is None + # and model_fields_set contains the field + if self.cluster_administrator is None and "cluster_administrator" in self.model_fields_set: + _dict['clusterAdministrator'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of User from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "label": obj.get("label"), + "name": obj.get("name"), + "email": obj.get("email"), + "administrator": obj.get("administrator"), + "canEditUserAttributes": obj.get("canEditUserAttributes"), + "clusterAdministrator": obj.get("clusterAdministrator") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_create.py b/corellium/models/user_create.py new file mode 100644 index 0000000..fc1d22f --- /dev/null +++ b/corellium/models/user_create.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserCreate(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The user name.") + label: Optional[StrictStr] = Field(default=None, description="The user label (e.g., \"Domain Administrator\").") + password: Optional[StrictStr] = Field(default=None, description="The password (optional) if using SSO.") + email: Optional[StrictStr] = Field(default=None, description="The email (optional) if onsite.") + administrator: Optional[StrictBool] = Field(default=None, description="Whether the user is a domain administrator. Only users with the Domain Administrator role can set this.") + cluster_administrator: Optional[StrictBool] = Field(default=None, description="Whether the user is a cluster administrator. Only users with the Cluster Administrator role can set this.", alias="clusterAdministrator") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "label", "password", "email", "administrator", "clusterAdministrator"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCreate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + # set to None if email (nullable) is None + # and model_fields_set contains the field + if self.email is None and "email" in self.model_fields_set: + _dict['email'] = None + + # set to None if administrator (nullable) is None + # and model_fields_set contains the field + if self.administrator is None and "administrator" in self.model_fields_set: + _dict['administrator'] = None + + # set to None if cluster_administrator (nullable) is None + # and model_fields_set contains the field + if self.cluster_administrator is None and "cluster_administrator" in self.model_fields_set: + _dict['clusterAdministrator'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCreate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "label": obj.get("label"), + "password": obj.get("password"), + "email": obj.get("email"), + "administrator": obj.get("administrator"), + "clusterAdministrator": obj.get("clusterAdministrator") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_create_return.py b/corellium/models/user_create_return.py new file mode 100644 index 0000000..1bf1c1f --- /dev/null +++ b/corellium/models/user_create_return.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserCreateReturn(BaseModel): + """ + + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The user identifier") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCreateReturn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCreateReturn from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_created.py b/corellium/models/user_created.py new file mode 100644 index 0000000..4b9e0f7 --- /dev/null +++ b/corellium/models/user_created.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UserCreated(BaseModel): + """ + UserCreated + """ # noqa: E501 + id: StrictStr = Field(description="Identifier of the created user.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserCreated from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserCreated from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_error.py b/corellium/models/user_error.py new file mode 100644 index 0000000..c5bf1bc --- /dev/null +++ b/corellium/models/user_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserError(BaseModel): + """ + UserError + """ # noqa: E501 + error: StrictStr = Field(description="Human-readable explanation of what was wrong with the request. Show it to the user or log it; do not parse it, because the wording can change.") + error_id: StrictStr = Field(description="Always `UserError`: the request itself was invalid. Fix the request before retrying; sending it again unchanged fails the same way.", alias="errorID") + var_field: Optional[StrictStr] = Field(default=None, description="Name of the request field that was rejected, when the error is about one field.", alias="field") + validator: Optional[StrictStr] = Field(default=None, description="Validator that rejected the field.") + project_ids: Optional[List[StrictStr]] = Field(default=None, description="Projects still using this resource, when the error is a usage conflict.", alias="projectIds") + missing_fw_assets: Optional[List[StrictStr]] = Field(default=None, description="Firmware asset URLs required by the target firmware but absent from the domain, when field is 'firmware_asset'.", alias="missingFwAssets") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "field", "validator", "projectIds", "missingFwAssets"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UserError']): + raise ValueError("must be one of enum values ('UserError')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "field": obj.get("field"), + "validator": obj.get("validator"), + "projectIds": obj.get("projectIds"), + "missingFwAssets": obj.get("missingFwAssets") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_error_item.py b/corellium/models/user_error_item.py new file mode 100644 index 0000000..b89b1d3 --- /dev/null +++ b/corellium/models/user_error_item.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserErrorItem(BaseModel): + """ + + """ # noqa: E501 + error: StrictStr = Field(description="Error text") + error_id: StrictStr = Field(description="Error ID", alias="errorID") + var_field: Optional[StrictStr] = Field(default=None, description="Field associated with error", alias="field") + validator: Optional[StrictStr] = Field(default=None, description="Validator that rejected the field") + project_ids: Optional[List[StrictStr]] = Field(default=None, description="Projects still using this resource, when the error is a usage conflict.", alias="projectIds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "field", "validator", "projectIds"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UserError']): + raise ValueError("must be one of enum values ('UserError')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserErrorItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if var_field (nullable) is None + # and model_fields_set contains the field + if self.var_field is None and "var_field" in self.model_fields_set: + _dict['field'] = None + + # set to None if validator (nullable) is None + # and model_fields_set contains the field + if self.validator is None and "validator" in self.model_fields_set: + _dict['validator'] = None + + # set to None if project_ids (nullable) is None + # and model_fields_set contains the field + if self.project_ids is None and "project_ids" in self.model_fields_set: + _dict['projectIds'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserErrorItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "field": obj.get("field"), + "validator": obj.get("validator"), + "projectIds": obj.get("projectIds") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_error_response.py b/corellium/models/user_error_response.py new file mode 100644 index 0000000..1bc1e3c --- /dev/null +++ b/corellium/models/user_error_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +from inspect import getfullargspec +import json +import pprint +import re # noqa: F401 +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Optional +from corellium.models.user_error import UserError +from corellium.models.user_errors import UserErrors +from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict +from typing_extensions import Literal, Self +from pydantic import Field + +USERERRORRESPONSE_ANY_OF_SCHEMAS = ["UserError", "UserErrors"] + +class UserErrorResponse(BaseModel): + """ + UserErrorResponse + """ + + # data type: UserError + anyof_schema_1_validator: Optional[UserError] = None + # data type: UserErrors + anyof_schema_2_validator: Optional[UserErrors] = None + if TYPE_CHECKING: + actual_instance: Optional[Union[UserError, UserErrors]] = None + else: + actual_instance: Any = None + any_of_schemas: Set[str] = { "UserError", "UserErrors" } + + model_config = { + "validate_assignment": True, + "protected_namespaces": (), + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_anyof(cls, v): + instance = UserErrorResponse.model_construct() + error_messages = [] + # validate data type: UserError + if not isinstance(v, UserError): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserError`") + else: + return v + + # validate data type: UserErrors + if not isinstance(v, UserErrors): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserErrors`") + else: + return v + + if error_messages: + # no match + raise ValueError("No match found when setting the actual_instance in UserErrorResponse with anyOf schemas: UserError, UserErrors. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + # anyof_schema_1_validator: Optional[UserError] = None + try: + instance.actual_instance = UserError.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # anyof_schema_2_validator: Optional[UserErrors] = None + try: + instance.actual_instance = UserErrors.from_json(json_str) + return instance + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if error_messages: + # no match + raise ValueError("No match found when deserializing the JSON string into UserErrorResponse with anyOf schemas: UserError, UserErrors. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], UserError, UserErrors]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/user_error_v1.py b/corellium/models/user_error_v1.py new file mode 100644 index 0000000..289c7ad --- /dev/null +++ b/corellium/models/user_error_v1.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corellium.models.user_error_item import UserErrorItem +from corellium.models.user_errors_v1 import UserErrorsV1 +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +USERERRORV1_ONE_OF_SCHEMAS = ["UserErrorItem", "UserErrorsV1"] + +class UserErrorV1(BaseModel): + """ + + """ + # data type: UserErrorItem + oneof_schema_1_validator: Optional[UserErrorItem] = None + # data type: UserErrorsV1 + oneof_schema_2_validator: Optional[UserErrorsV1] = None + actual_instance: Optional[Union[UserErrorItem, UserErrorsV1]] = None + one_of_schemas: Set[str] = { "UserErrorItem", "UserErrorsV1" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UserErrorV1.model_construct() + error_messages = [] + match = 0 + # validate data type: UserErrorItem + if not isinstance(v, UserErrorItem): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserErrorItem`") + else: + match += 1 + # validate data type: UserErrorsV1 + if not isinstance(v, UserErrorsV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `UserErrorsV1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UserErrorV1 with oneOf schemas: UserErrorItem, UserErrorsV1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UserErrorV1 with oneOf schemas: UserErrorItem, UserErrorsV1. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into UserErrorItem + try: + instance.actual_instance = UserErrorItem.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into UserErrorsV1 + try: + instance.actual_instance = UserErrorsV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UserErrorV1 with oneOf schemas: UserErrorItem, UserErrorsV1. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UserErrorV1 with oneOf schemas: UserErrorItem, UserErrorsV1. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], UserErrorItem, UserErrorsV1]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/corellium/models/user_errors.py b/corellium/models/user_errors.py new file mode 100644 index 0000000..cc58227 --- /dev/null +++ b/corellium/models/user_errors.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from corellium.models.user_error import UserError +from typing import Optional, Set +from typing_extensions import Self + +class UserErrors(BaseModel): + """ + UserErrors + """ # noqa: E501 + error: StrictStr = Field(description="Summary of the problem. The individual problems are listed in `errors`.") + error_id: StrictStr = Field(description="Always `UserErrors`: more than one field in the request was invalid.", alias="errorID") + errors: List[UserError] = Field(description="One entry per rejected field. Fix every one before retrying.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "errors"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UserErrors']): + raise ValueError("must be one of enum values ('UserErrors')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserErrors from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserErrors from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "errors": [UserError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_errors_v1.py b/corellium/models/user_errors_v1.py new file mode 100644 index 0000000..af1981f --- /dev/null +++ b/corellium/models/user_errors_v1.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from corellium.models.user_error_item import UserErrorItem +from typing import Optional, Set +from typing_extensions import Self + +class UserErrorsV1(BaseModel): + """ + + """ # noqa: E501 + error: StrictStr = Field(description="Error text") + error_id: StrictStr = Field(description="Error ID", alias="errorID") + errors: List[UserErrorItem] = Field(description="Individual field errors") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "errors"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UserErrors']): + raise ValueError("must be one of enum values ('UserErrors')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserErrorsV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserErrorsV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "errors": [UserErrorItem.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_snapshots.py b/corellium/models/user_snapshots.py new file mode 100644 index 0000000..e565136 --- /dev/null +++ b/corellium/models/user_snapshots.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from corellium.models.shared_snapshots_info import SharedSnapshotsInfo +from typing import Optional, Set +from typing_extensions import Self + +class UserSnapshots(BaseModel): + """ + + """ # noqa: E501 + shared_with_user: SharedSnapshotsInfo = Field(alias="sharedWithUser") + shared_by_user: SharedSnapshotsInfo = Field(alias="sharedByUser") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sharedWithUser", "sharedByUser"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserSnapshots from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of shared_with_user + if self.shared_with_user: + _dict['sharedWithUser'] = self.shared_with_user.to_dict() + # override the default output from pydantic by calling `to_dict()` of shared_by_user + if self.shared_by_user: + _dict['sharedByUser'] = self.shared_by_user.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserSnapshots from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sharedWithUser": SharedSnapshotsInfo.from_dict(obj["sharedWithUser"]) if obj.get("sharedWithUser") is not None else None, + "sharedByUser": SharedSnapshotsInfo.from_dict(obj["sharedByUser"]) if obj.get("sharedByUser") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/user_update.py b/corellium/models/user_update.py new file mode 100644 index 0000000..c057042 --- /dev/null +++ b/corellium/models/user_update.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserUpdate(BaseModel): + """ + + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The user name.") + label: Optional[StrictStr] = Field(default=None, description="The user label (e.g., \"Domain Administrator\").") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserUpdate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "label": obj.get("label") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/v1_check_subdomain_existence_parameters.py b/corellium/models/v1_check_subdomain_existence_parameters.py new file mode 100644 index 0000000..d0f2d54 --- /dev/null +++ b/corellium/models/v1_check_subdomain_existence_parameters.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class V1CheckSubdomainExistenceParameters(BaseModel): + """ + + """ # noqa: E501 + domain: StrictStr = Field(description="Domain to check") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V1CheckSubdomainExistenceParameters from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V1CheckSubdomainExistenceParameters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/v1_create_hook_parameters.py b/corellium/models/v1_create_hook_parameters.py new file mode 100644 index 0000000..5a7d83c --- /dev/null +++ b/corellium/models/v1_create_hook_parameters.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class V1CreateHookParameters(BaseModel): + """ + + """ # noqa: E501 + label: StrictStr = Field(description="Label") + address: StrictStr = Field(description="Address") + patch: StrictStr = Field(description="Patch") + patch_type: StrictStr = Field(description="Patch Type", alias="patchType") + enabled: Optional[StrictBool] = Field(default=None, description="If true, instances can call required hooks") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["label", "address", "patch", "patchType", "enabled"] + + @field_validator('patch_type') + def patch_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['csmfcc', 'csmfvm']): + raise ValueError("must be one of enum values ('csmfcc', 'csmfvm')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V1CreateHookParameters from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V1CreateHookParameters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "address": obj.get("address"), + "patch": obj.get("patch"), + "patchType": obj.get("patchType"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/v1_load_extension_parameters.py b/corellium/models/v1_load_extension_parameters.py new file mode 100644 index 0000000..04b09a7 --- /dev/null +++ b/corellium/models/v1_load_extension_parameters.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class V1LoadExtensionParameters(BaseModel): + """ + + """ # noqa: E501 + image_id: StrictStr = Field(description="The uuid of the image to load", alias="imageId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["imageId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V1LoadExtensionParameters from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V1LoadExtensionParameters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "imageId": obj.get("imageId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/v1_set_state_body.py b/corellium/models/v1_set_state_body.py new file mode 100644 index 0000000..393d5fd --- /dev/null +++ b/corellium/models/v1_set_state_body.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from corellium.models.instance_state_v1 import InstanceStateV1 +from typing import Optional, Set +from typing_extensions import Self + +class V1SetStateBody(BaseModel): + """ + + """ # noqa: E501 + state: InstanceStateV1 + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V1SetStateBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V1SetStateBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "state": obj.get("state") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/v1_update_hook_parameters.py b/corellium/models/v1_update_hook_parameters.py new file mode 100644 index 0000000..89eb250 --- /dev/null +++ b/corellium/models/v1_update_hook_parameters.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class V1UpdateHookParameters(BaseModel): + """ + + """ # noqa: E501 + label: Optional[StrictStr] = Field(default=None, description="Label") + address: Optional[StrictStr] = Field(default=None, description="Address") + patch: Optional[StrictStr] = Field(default=None, description="Patch") + patch_type: Optional[StrictStr] = Field(default=None, description="Patch Type", alias="patchType") + enabled: Optional[StrictBool] = Field(default=None, description="Enabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["label", "address", "patch", "patchType", "enabled"] + + @field_validator('patch_type') + def patch_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['csmfcc', 'csmfvm']): + raise ValueError("must be one of enum values ('csmfcc', 'csmfvm')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V1UpdateHookParameters from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if patch (nullable) is None + # and model_fields_set contains the field + if self.patch is None and "patch" in self.model_fields_set: + _dict['patch'] = None + + # set to None if patch_type (nullable) is None + # and model_fields_set contains the field + if self.patch_type is None and "patch_type" in self.model_fields_set: + _dict['patchType'] = None + + # set to None if enabled (nullable) is None + # and model_fields_set contains the field + if self.enabled is None and "enabled" in self.model_fields_set: + _dict['enabled'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V1UpdateHookParameters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "address": obj.get("address"), + "patch": obj.get("patch"), + "patchType": obj.get("patchType"), + "enabled": obj.get("enabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/v3_delete_network_connection_request.py b/corellium/models/v3_delete_network_connection_request.py new file mode 100644 index 0000000..6bc2608 --- /dev/null +++ b/corellium/models/v3_delete_network_connection_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class V3DeleteNetworkConnectionRequest(BaseModel): + """ + V3DeleteNetworkConnectionRequest + """ # noqa: E501 + force: Optional[StrictBool] = Field(default=False, description="Force the operation through constraint checks (e.g. stopping active instances).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["force"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V3DeleteNetworkConnectionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V3DeleteNetworkConnectionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "force": obj.get("force") if obj.get("force") is not None else False + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/v3_update_snapshot_request.py b/corellium/models/v3_update_snapshot_request.py new file mode 100644 index 0000000..c69acea --- /dev/null +++ b/corellium/models/v3_update_snapshot_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class V3UpdateSnapshotRequest(BaseModel): + """ + V3UpdateSnapshotRequest + """ # noqa: E501 + name: StrictStr = Field(description="New name for the snapshot.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V3UpdateSnapshotRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V3UpdateSnapshotRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/validation_error.py b/corellium/models/validation_error.py new file mode 100644 index 0000000..34022e6 --- /dev/null +++ b/corellium/models/validation_error.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + + """ # noqa: E501 + error: StrictStr = Field(description="Error text") + error_id: StrictStr = Field(description="Error ID", alias="errorID") + var_field: Optional[StrictStr] = Field(default=None, description="Field associated with error", alias="field") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorID", "field"] + + @field_validator('error_id') + def error_id_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ValidationError']): + raise ValueError("must be one of enum values ('ValidationError')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if var_field (nullable) is None + # and model_fields_set contains the field + if self.var_field is None and "var_field" in self.model_fields_set: + _dict['field'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "errorID": obj.get("errorID"), + "field": obj.get("field") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/vlan_config.py b/corellium/models/vlan_config.py new file mode 100644 index 0000000..3bc675c --- /dev/null +++ b/corellium/models/vlan_config.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class VLANConfig(BaseModel): + """ + VLANConfig + """ # noqa: E501 + physical_interface: StrictStr = Field(description="Physical network interface to create VLAN on", alias="physicalInterface") + vlan_id: Union[Annotated[float, Field(le=4094, strict=True, ge=1)], Annotated[int, Field(le=4094, strict=True, ge=1)]] = Field(description="VLAN ID (1-4094)", alias="vlanId") + dhcp_mode: StrictStr = Field(description="DHCP server mode", alias="dhcpMode") + gateway: Optional[StrictStr] = Field(default=None, description="Gateway IP address") + network: Optional[StrictStr] = Field(default=None, description="Network address") + dns_servers: Optional[List[StrictStr]] = Field(default=None, description="List of DNS servers", alias="dnsServers") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["physicalInterface", "vlanId", "dhcpMode", "gateway", "network", "dnsServers"] + + @field_validator('dhcp_mode') + def dhcp_mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['internal', 'external']): + raise ValueError("must be one of enum values ('internal', 'external')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VLANConfig from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VLANConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "physicalInterface": obj.get("physicalInterface"), + "vlanId": obj.get("vlanId"), + "dhcpMode": obj.get("dhcpMode"), + "gateway": obj.get("gateway"), + "network": obj.get("network"), + "dnsServers": obj.get("dnsServers") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/vlan_config_v1.py b/corellium/models/vlan_config_v1.py new file mode 100644 index 0000000..9279f39 --- /dev/null +++ b/corellium/models/vlan_config_v1.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class VLANConfigV1(BaseModel): + """ + + """ # noqa: E501 + physical_interface: StrictStr = Field(description="Physical network interface to create VLAN on.", alias="physicalInterface") + vlan_id: Union[Annotated[float, Field(le=4094, strict=True, ge=1)], Annotated[int, Field(le=4094, strict=True, ge=1)]] = Field(description="VLAN ID (1-4094).", alias="vlanId") + dhcp_mode: StrictStr = Field(description="DHCP server mode.", alias="dhcpMode") + gateway: Optional[StrictStr] = Field(default=None, description="Gateway IP address.") + network: Optional[StrictStr] = Field(default=None, description="Network address.") + dns_servers: Optional[List[StrictStr]] = Field(default=None, description="List of DNS servers.", alias="dnsServers") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["physicalInterface", "vlanId", "dhcpMode", "gateway", "network", "dnsServers"] + + @field_validator('dhcp_mode') + def dhcp_mode_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['internal', 'external']): + raise ValueError("must be one of enum values ('internal', 'external')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VLANConfigV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VLANConfigV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "physicalInterface": obj.get("physicalInterface"), + "vlanId": obj.get("vlanId"), + "dhcpMode": obj.get("dhcpMode"), + "gateway": obj.get("gateway"), + "network": obj.get("network"), + "dnsServers": obj.get("dnsServers") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/vlan_network_connection.py b/corellium/models/vlan_network_connection.py new file mode 100644 index 0000000..8895f3c --- /dev/null +++ b/corellium/models/vlan_network_connection.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.open_vpn_network_connection_projects_value import OpenVPNNetworkConnectionProjectsValue +from corellium.models.vlan_config import VLANConfig +from typing import Optional, Set +from typing_extensions import Self + +class VLANNetworkConnection(BaseModel): + """ + VLANNetworkConnection + """ # noqa: E501 + name: StrictStr = Field(description="User friendly name for network connection.") + provider: StrictStr = Field(description="Type of network connection.") + config: Optional[VLANConfig] = None + identifier: StrictStr = Field(description="Unique identifier for the network connection.") + projects: Optional[Dict[str, OpenVPNNetworkConnectionProjectsValue]] = Field(default=None, description="Network states mapped by project IDs.") + created_at: datetime = Field(description="Timestamp when the network connection was created.", alias="createdAt") + updated_at: datetime = Field(description="Timestamp when the network connection was last updated.", alias="updatedAt") + created_by: StrictStr = Field(description="User ID of the creator.", alias="createdBy") + updated_by: StrictStr = Field(description="User ID of the last updater.", alias="updatedBy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "provider", "config", "identifier", "projects", "createdAt", "updatedAt", "createdBy", "updatedBy"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vlan']): + raise ValueError("must be one of enum values ('vlan')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VLANNetworkConnection from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in projects (dict) + _field_dict = {} + if self.projects: + for _key_projects in self.projects: + if self.projects[_key_projects]: + _field_dict[_key_projects] = self.projects[_key_projects].to_dict() + _dict['projects'] = _field_dict + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VLANNetworkConnection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "provider": obj.get("provider"), + "config": VLANConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "identifier": obj.get("identifier"), + "projects": dict( + (_k, OpenVPNNetworkConnectionProjectsValue.from_dict(_v)) + for _k, _v in obj["projects"].items() + ) + if obj.get("projects") is not None + else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "createdBy": obj.get("createdBy"), + "updatedBy": obj.get("updatedBy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/vlan_network_connection_v1.py b/corellium/models/vlan_network_connection_v1.py new file mode 100644 index 0000000..dc66f11 --- /dev/null +++ b/corellium/models/vlan_network_connection_v1.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.project_network_state import ProjectNetworkState +from corellium.models.vlan_config_v1 import VLANConfigV1 +from typing import Optional, Set +from typing_extensions import Self + +class VLANNetworkConnectionV1(BaseModel): + """ + + """ # noqa: E501 + identifier: StrictStr = Field(description="UUIDv4") + provider: StrictStr = Field(description="Type of network connection.") + name: StrictStr = Field(description="User specified name for this network connection. e.g., \"My Network Connection\"") + config: Optional[VLANConfigV1] = None + projects: Optional[Dict[str, ProjectNetworkState]] = Field(default=None, description="An object where the keys are project IDs and the values are {@link ProjectNetworkState} objects representing the state of each project.") + created_at: StrictStr = Field(description="Created Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\"", alias="createdAt") + updated_at: StrictStr = Field(description="Updated Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\"", alias="updatedAt") + created_by: StrictStr = Field(description="UUIDv4 of the user who created this record.", alias="createdBy") + updated_by: StrictStr = Field(description="UUIDv4 of the user who last updated this record.", alias="updatedBy") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "provider", "name", "config", "projects", "createdAt", "updatedAt", "createdBy", "updatedBy"] + + @field_validator('provider') + def provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['vlan']): + raise ValueError("must be one of enum values ('vlan')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VLANNetworkConnectionV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in projects (dict) + _field_dict = {} + if self.projects: + for _key_projects in self.projects: + if self.projects[_key_projects]: + _field_dict[_key_projects] = self.projects[_key_projects].to_dict() + _dict['projects'] = _field_dict + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if config (nullable) is None + # and model_fields_set contains the field + if self.config is None and "config" in self.model_fields_set: + _dict['config'] = None + + # set to None if projects (nullable) is None + # and model_fields_set contains the field + if self.projects is None and "projects" in self.model_fields_set: + _dict['projects'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VLANNetworkConnectionV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "provider": obj.get("provider"), + "name": obj.get("name"), + "config": VLANConfigV1.from_dict(obj["config"]) if obj.get("config") is not None else None, + "projects": dict( + (_k, ProjectNetworkState.from_dict(_v)) + for _k, _v in obj["projects"].items() + ) + if obj.get("projects") is not None + else None, + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "createdBy": obj.get("createdBy"), + "updatedBy": obj.get("updatedBy") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/volume_options.py b/corellium/models/volume_options.py new file mode 100644 index 0000000..f93e7b8 --- /dev/null +++ b/corellium/models/volume_options.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class VolumeOptions(BaseModel): + """ + VolumeOptions + """ # noqa: E501 + blocks: Union[StrictFloat, StrictInt] = Field(description="Blocks to resize partition to.") + name: StrictStr = Field(description="Name of partition.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["blocks", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VolumeOptions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VolumeOptions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "blocks": obj.get("blocks"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/volume_options_v1.py b/corellium/models/volume_options_v1.py new file mode 100644 index 0000000..6c34e70 --- /dev/null +++ b/corellium/models/volume_options_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class VolumeOptionsV1(BaseModel): + """ + + """ # noqa: E501 + blocks: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="blocks to resize partition to") + name: Optional[StrictStr] = Field(default=None, description="name of partition") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["blocks", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VolumeOptionsV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if blocks (nullable) is None + # and model_fields_set contains the field + if self.blocks is None and "blocks" in self.model_fields_set: + _dict['blocks'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VolumeOptionsV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "blocks": obj.get("blocks"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/vpn_config_preauthorization.py b/corellium/models/vpn_config_preauthorization.py new file mode 100644 index 0000000..e9303f1 --- /dev/null +++ b/corellium/models/vpn_config_preauthorization.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class VpnConfigPreauthorization(BaseModel): + """ + VpnConfigPreauthorization + """ # noqa: E501 + token: StrictStr = Field(description="Signed JWT granting access to the VPN configuration download.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VpnConfigPreauthorization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VpnConfigPreauthorization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token": obj.get("token") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/vpn_definition.py b/corellium/models/vpn_definition.py new file mode 100644 index 0000000..5282658 --- /dev/null +++ b/corellium/models/vpn_definition.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VpnDefinition(BaseModel): + """ + VpnDefinition + """ # noqa: E501 + proxy: Optional[List[Dict[str, Any]]] = Field(default=None, description="VPN proxy definitions.") + listeners: Optional[List[Dict[str, Any]]] = Field(default=None, description="VPN listener definitions.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["proxy", "listeners"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VpnDefinition from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VpnDefinition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "proxy": obj.get("proxy"), + "listeners": obj.get("listeners") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/vpn_definition_v1.py b/corellium/models/vpn_definition_v1.py new file mode 100644 index 0000000..cc63fe6 --- /dev/null +++ b/corellium/models/vpn_definition_v1.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VpnDefinitionV1(BaseModel): + """ + + """ # noqa: E501 + proxy: Optional[List[Dict[str, Any]]] = None + listeners: Optional[List[Dict[str, Any]]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["proxy", "listeners"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VpnDefinitionV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if proxy (nullable) is None + # and model_fields_set contains the field + if self.proxy is None and "proxy" in self.model_fields_set: + _dict['proxy'] = None + + # set to None if listeners (nullable) is None + # and model_fields_set contains the field + if self.listeners is None and "listeners" in self.model_fields_set: + _dict['listeners'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VpnDefinitionV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "proxy": obj.get("proxy"), + "listeners": obj.get("listeners") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/vpn_schema.py b/corellium/models/vpn_schema.py new file mode 100644 index 0000000..8427795 --- /dev/null +++ b/corellium/models/vpn_schema.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class VpnSchema(BaseModel): + """ + VpnSchema + """ # noqa: E501 + type: StrictStr = Field(description="VPN type.") + project_id: StrictStr = Field(description="Project identifier.", alias="projectId") + state: StrictStr = Field(description="VPN state.") + details: Dict[str, Any] = Field(description="VPN details.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "projectId", "state", "details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VpnSchema from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VpnSchema from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "projectId": obj.get("projectId"), + "state": obj.get("state"), + "details": obj.get("details") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/web_player_allowed_domains.py b/corellium/models/web_player_allowed_domains.py new file mode 100644 index 0000000..5ddc05a --- /dev/null +++ b/corellium/models/web_player_allowed_domains.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class WebPlayerAllowedDomains(BaseModel): + """ + WebPlayerAllowedDomains + """ # noqa: E501 + allowed_domains: List[StrictStr] = Field(description="Domains permitted for webplayer sessions.", alias="allowedDomains") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["allowedDomains"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebPlayerAllowedDomains from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebPlayerAllowedDomains from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowedDomains": obj.get("allowedDomains") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/web_player_create_session_request.py b/corellium/models/web_player_create_session_request.py new file mode 100644 index 0000000..5397960 --- /dev/null +++ b/corellium/models/web_player_create_session_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from corellium.models.features import Features +from typing import Optional, Set +from typing_extensions import Self + +class WebPlayerCreateSessionRequest(BaseModel): + """ + + """ # noqa: E501 + project_id: StrictStr = Field(description="Project Identifier", alias="projectId") + instance_id: StrictStr = Field(description="VM Instance Identifier", alias="instanceId") + expires_in: Union[StrictFloat, StrictInt] = Field(description="Number of seconds token remains valid", alias="expiresIn") + features: Features + client_id: Optional[StrictStr] = Field(default=None, description="Optional string value supplied by client for tracking purposes", alias="clientId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["projectId", "instanceId", "expiresIn", "features", "clientId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebPlayerCreateSessionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of features + if self.features: + _dict['features'] = self.features.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if client_id (nullable) is None + # and model_fields_set contains the field + if self.client_id is None and "client_id" in self.model_fields_set: + _dict['clientId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebPlayerCreateSessionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "projectId": obj.get("projectId"), + "instanceId": obj.get("instanceId"), + "expiresIn": obj.get("expiresIn"), + "features": Features.from_dict(obj["features"]) if obj.get("features") is not None else None, + "clientId": obj.get("clientId") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/web_player_created_session.py b/corellium/models/web_player_created_session.py new file mode 100644 index 0000000..2eb9574 --- /dev/null +++ b/corellium/models/web_player_created_session.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corellium.models.web_player_session_domain import WebPlayerSessionDomain +from typing import Optional, Set +from typing_extensions import Self + +class WebPlayerCreatedSession(BaseModel): + """ + WebPlayerCreatedSession + """ # noqa: E501 + identifier: StrictStr = Field(description="Session identifier.") + token: StrictStr = Field(description="Session token to hand to the Web Player in your page. It grants access only to this one device and only to the enabled features, until `expiration`.") + expiration: datetime = Field(description="Session expiration timestamp.") + domain: Optional[WebPlayerSessionDomain] = None + time: Optional[StrictInt] = Field(default=None, description="Server timestamp (ms) when the session was created.") + disabled: Optional[StrictBool] = Field(default=None, description="Present and set when the domain is disabled (public flag).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "token", "expiration", "domain", "time", "disabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebPlayerCreatedSession from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of domain + if self.domain: + _dict['domain'] = self.domain.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebPlayerCreatedSession from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "token": obj.get("token"), + "expiration": obj.get("expiration"), + "domain": WebPlayerSessionDomain.from_dict(obj["domain"]) if obj.get("domain") is not None else None, + "time": obj.get("time"), + "disabled": obj.get("disabled") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/web_player_features.py b/corellium/models/web_player_features.py new file mode 100644 index 0000000..85367f9 --- /dev/null +++ b/corellium/models/web_player_features.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebPlayerFeatures(BaseModel): + """ + Which parts of the device interface the viewer may use, for example `apps`, `files` or `console`. Only features set to true are available in the session. + """ # noqa: E501 + apps: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the apps part of the device interface. Features left out are off.") + connect: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the connect part of the device interface. Features left out are off.") + console: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the console part of the device interface. Features left out are off.") + coretrace: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the coretrace part of the device interface. Features left out are off.") + device_control: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the deviceControl part of the device interface. Features left out are off.", alias="deviceControl") + device_delete: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the deviceDelete part of the device interface. Features left out are off.", alias="deviceDelete") + files: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the files part of the device interface. Features left out are off.") + frida: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the frida part of the device interface. Features left out are off.") + images: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the images part of the device interface. Features left out are off.") + messaging: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the messaging part of the device interface. Features left out are off.") + netmon: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the netmon part of the device interface. Features left out are off.") + network: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the network part of the device interface. Features left out are off.") + port_forwarding: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the portForwarding part of the device interface. Features left out are off.", alias="portForwarding") + power_management: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the powerManagement part of the device interface. Features left out are off.", alias="powerManagement") + profile: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the profile part of the device interface. Features left out are off.") + sensors: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the sensors part of the device interface. Features left out are off.") + settings: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the settings part of the device interface. Features left out are off.") + snapshots: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the snapshots part of the device interface. Features left out are off.") + strace: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the strace part of the device interface. Features left out are off.") + system: Optional[StrictBool] = Field(default=None, description="Whether the viewer may use the system part of the device interface. Features left out are off.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["apps", "connect", "console", "coretrace", "deviceControl", "deviceDelete", "files", "frida", "images", "messaging", "netmon", "network", "portForwarding", "powerManagement", "profile", "sensors", "settings", "snapshots", "strace", "system"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebPlayerFeatures from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebPlayerFeatures from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apps": obj.get("apps"), + "connect": obj.get("connect"), + "console": obj.get("console"), + "coretrace": obj.get("coretrace"), + "deviceControl": obj.get("deviceControl"), + "deviceDelete": obj.get("deviceDelete"), + "files": obj.get("files"), + "frida": obj.get("frida"), + "images": obj.get("images"), + "messaging": obj.get("messaging"), + "netmon": obj.get("netmon"), + "network": obj.get("network"), + "portForwarding": obj.get("portForwarding"), + "powerManagement": obj.get("powerManagement"), + "profile": obj.get("profile"), + "sensors": obj.get("sensors"), + "settings": obj.get("settings"), + "snapshots": obj.get("snapshots"), + "strace": obj.get("strace"), + "system": obj.get("system") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/web_player_session.py b/corellium/models/web_player_session.py new file mode 100644 index 0000000..99a8a5d --- /dev/null +++ b/corellium/models/web_player_session.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class WebPlayerSession(BaseModel): + """ + WebPlayerSession + """ # noqa: E501 + identifier: StrictStr = Field(description="Session identifier.") + token: StrictStr = Field(description="Session token to hand to the Web Player in your page. It grants access only to this one device and only to the enabled features, until `expiration`.") + expiration: datetime = Field(description="Session expiration timestamp.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "token", "expiration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebPlayerSession from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebPlayerSession from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "token": obj.get("token"), + "expiration": obj.get("expiration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/web_player_session_domain.py b/corellium/models/web_player_session_domain.py new file mode 100644 index 0000000..cd2e9f4 --- /dev/null +++ b/corellium/models/web_player_session_domain.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class WebPlayerSessionDomain(BaseModel): + """ + Domain configuration for the session. + """ # noqa: E501 + name: StrictStr = Field(description="Domain name.") + label: Optional[StrictStr] = Field(default=None, description="Domain description/label.") + terms_policy: Optional[StrictStr] = Field(default=None, description="Domain terms policy.", alias="termsPolicy") + cores: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Core quota for the domain.") + individual: Optional[StrictBool] = Field(default=None, description="Whether the domain is an individual account nested under an aggregate parent domain.") + totp_required: Optional[StrictBool] = Field(default=None, description="Whether two-factor is required for the domain.", alias="totpRequired") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "label", "termsPolicy", "cores", "individual", "totpRequired"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebPlayerSessionDomain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + # set to None if terms_policy (nullable) is None + # and model_fields_set contains the field + if self.terms_policy is None and "terms_policy" in self.model_fields_set: + _dict['termsPolicy'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebPlayerSessionDomain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "label": obj.get("label"), + "termsPolicy": obj.get("termsPolicy"), + "cores": obj.get("cores"), + "individual": obj.get("individual"), + "totpRequired": obj.get("totpRequired") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/web_player_session_list_response.py b/corellium/models/web_player_session_list_response.py new file mode 100644 index 0000000..631a68b --- /dev/null +++ b/corellium/models/web_player_session_list_response.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from corellium.models.web_player_session import WebPlayerSession +from typing import Optional, Set +from typing_extensions import Self + +class WebPlayerSessionListResponse(BaseModel): + """ + WebPlayerSessionListResponse + """ # noqa: E501 + results: List[WebPlayerSession] = Field(description="Webplayer sessions.") + count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results in this page. Can be less than `limit` on the last page.") + total: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of results across all pages, after any filters.") + limit: Annotated[int, Field(strict=True, ge=0)] = Field(description="The page size that was used (your `limit`, or the default 100).") + offset: Annotated[int, Field(strict=True, ge=0)] = Field(description="The offset that was used (your `offset`, or the default 0).") + has_more: StrictBool = Field(description="True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false.", alias="hasMore") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results", "count", "total", "limit", "offset", "hasMore"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebPlayerSessionListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebPlayerSessionListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [WebPlayerSession.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "count": obj.get("count"), + "total": obj.get("total"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "hasMore": obj.get("hasMore") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/models/web_player_session_v1.py b/corellium/models/web_player_session_v1.py new file mode 100644 index 0000000..00d1301 --- /dev/null +++ b/corellium/models/web_player_session_v1.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class WebPlayerSessionV1(BaseModel): + """ + + """ # noqa: E501 + identifier: StrictStr = Field(description="New Session Identifier") + token: StrictStr = Field(description="Session Token") + expiration: Union[StrictFloat, StrictInt] = Field(description="Expiration in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["identifier", "token", "expiration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebPlayerSessionV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebPlayerSessionV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identifier": obj.get("identifier"), + "token": obj.get("token"), + "expiration": obj.get("expiration") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/corellium/py.typed b/corellium/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/corellium/rest.py b/corellium/rest.py new file mode 100644 index 0000000..71bb387 --- /dev/null +++ b/corellium/rest.py @@ -0,0 +1,275 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from corellium.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: HTTP timeout in seconds: a positive float + (urllib3 total), or positive (connect, read) floats. + Not a server-operation or all-retries deadline. + :type _request_timeout: float, tuple(float, float), optional + + Transport timeout outcome: + Cancellation or rollback is not guaranteed. The request may not have + reached the server, or accepted work may still be in progress or done. + After a start timeout the instance may still be starting or running; + it may remain off if the request never arrived. Its state is unknown + from the timeout alone. Fetch its state before retrying. If it has + since been destroyed, the lookup may return not found; a timeout + itself does not prove destruction. Do not blindly repeat mutations. + With _without_preload_content, reading the body may time out later. + :raises urllib3.exceptions.TimeoutError: Transport timeout, including + ReadTimeoutError or ConnectTimeoutError; not an SDK ApiException. + :raises urllib3.exceptions.MaxRetryError: Retries exhausted; inspect + reason for urllib3.exceptions.TimeoutError (other connection failures + also use MaxRetryError). Behavior depends on the HTTP method and + Configuration.retries. MaxRetryError is not a TimeoutError subclass. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/corellium_api/__init__.py b/corellium_api/__init__.py deleted file mode 100644 index 7fbd61b..0000000 --- a/corellium_api/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -__version__ = "0.4.2" - -# import apis into sdk package -from corellium_api.api.corellium_api import CorelliumApi - -# import ApiClient -from corellium_api.api_client import ApiClient -from corellium_api.configuration import Configuration -from corellium_api.exceptions import OpenApiException -from corellium_api.exceptions import ApiTypeError -from corellium_api.exceptions import ApiValueError -from corellium_api.exceptions import ApiKeyError -from corellium_api.exceptions import ApiAttributeError -from corellium_api.exceptions import ApiException -# import models into sdk package -from corellium_api.models.activity import Activity -from corellium_api.models.activity_export_dto import ActivityExportDto -from corellium_api.models.activity_export_response import ActivityExportResponse -from corellium_api.models.activity_list import ActivityList -from corellium_api.models.activity_request import ActivityRequest -from corellium_api.models.address import Address -from corellium_api.models.agent_app import AgentApp -from corellium_api.models.agent_app_ready_response import AgentAppReadyResponse -from corellium_api.models.agent_app_status import AgentAppStatus -from corellium_api.models.agent_apps_list import AgentAppsList -from corellium_api.models.agent_apps_status_list import AgentAppsStatusList -from corellium_api.models.agent_error import AgentError -from corellium_api.models.agent_icons import AgentIcons -from corellium_api.models.agent_install_body import AgentInstallBody -from corellium_api.models.agent_profiles_return import AgentProfilesReturn -from corellium_api.models.agent_system_adb_auth import AgentSystemAdbAuth -from corellium_api.models.agent_system_get_prop_body import AgentSystemGetPropBody -from corellium_api.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody -from corellium_api.models.agent_value_return import AgentValueReturn -from corellium_api.models.agreed_ack import AgreedAck -from corellium_api.models.allowed_domains_response import AllowedDomainsResponse -from corellium_api.models.api_conflict_error import ApiConflictError -from corellium_api.models.api_error import ApiError -from corellium_api.models.api_internal_consistency_error import ApiInternalConsistencyError -from corellium_api.models.api_not_found_error import ApiNotFoundError -from corellium_api.models.api_token import ApiToken -from corellium_api.models.assessment import Assessment -from corellium_api.models.assessment_history import AssessmentHistory -from corellium_api.models.assessment_history_line_item import AssessmentHistoryLineItem -from corellium_api.models.assessment_id_status import AssessmentIdStatus -from corellium_api.models.attach_interface_request import AttachInterfaceRequest -from corellium_api.models.auth_provider import AuthProvider -from corellium_api.models.bit import Bit -from corellium_api.models.btrace_enable_options import BtraceEnableOptions -from corellium_api.models.button import Button -from corellium_api.models.check_subdomain_response import CheckSubdomainResponse -from corellium_api.models.config_response import ConfigResponse -from corellium_api.models.config_response_maintenance import ConfigResponseMaintenance -from corellium_api.models.coupon_options import CouponOptions -from corellium_api.models.create_assessment_dto import CreateAssessmentDto -from corellium_api.models.create_interconnect_request import CreateInterconnectRequest -from corellium_api.models.create_network_connection_options import CreateNetworkConnectionOptions -from corellium_api.models.create_team import CreateTeam -from corellium_api.models.created_by import CreatedBy -from corellium_api.models.credentials import Credentials -from corellium_api.models.detach_interface_request import DetachInterfaceRequest -from corellium_api.models.device import Device -from corellium_api.models.domain_auth_provider_request import DomainAuthProviderRequest -from corellium_api.models.domain_auth_provider_response import DomainAuthProviderResponse -from corellium_api.models.domain_options import DomainOptions -from corellium_api.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo -from corellium_api.models.extension import Extension -from corellium_api.models.features import Features -from corellium_api.models.file_changes import FileChanges -from corellium_api.models.firmware import Firmware -from corellium_api.models.firmware_asset import FirmwareAsset -from corellium_api.models.get_assessments_by_instance_id500_response import GetAssessmentsByInstanceId500Response -from corellium_api.models.get_interconnects_response import GetInterconnectsResponse -from corellium_api.models.gpio_state_definition import GpioStateDefinition -from corellium_api.models.gpios_state import GpiosState -from corellium_api.models.grant_trial_request_response import GrantTrialRequestResponse -from corellium_api.models.hook import Hook -from corellium_api.models.image import Image -from corellium_api.models.input_response import InputResponse -from corellium_api.models.install_firmware_request import InstallFirmwareRequest -from corellium_api.models.install_firmware_response import InstallFirmwareResponse -from corellium_api.models.instance import Instance -from corellium_api.models.instance_agent_state import InstanceAgentState -from corellium_api.models.instance_boot_options import InstanceBootOptions -from corellium_api.models.instance_boot_options_additional_tag import InstanceBootOptionsAdditionalTag -from corellium_api.models.instance_console_endpoint import InstanceConsoleEndpoint -from corellium_api.models.instance_create_options import InstanceCreateOptions -from corellium_api.models.instance_input import InstanceInput -from corellium_api.models.instance_interface import InstanceInterface -from corellium_api.models.instance_netdump_state import InstanceNetdumpState -from corellium_api.models.instance_netmon_state import InstanceNetmonState -from corellium_api.models.instance_return import InstanceReturn -from corellium_api.models.instance_services import InstanceServices -from corellium_api.models.instance_start_options import InstanceStartOptions -from corellium_api.models.instance_state import InstanceState -from corellium_api.models.instance_stop_options import InstanceStopOptions -from corellium_api.models.instance_upgrade_body import InstanceUpgradeBody -from corellium_api.models.interconnect_response import InterconnectResponse -from corellium_api.models.invitation import Invitation -from corellium_api.models.invite_revoke_params import InviteRevokeParams -from corellium_api.models.invite_revoke_params_ids import InviteRevokeParamsIds -from corellium_api.models.kcrange import Kcrange -from corellium_api.models.kernel_task import KernelTask -from corellium_api.models.kernel_thread import KernelThread -from corellium_api.models.logging import Logging -from corellium_api.models.maintenance import Maintenance -from corellium_api.models.media_play_body import MediaPlayBody -from corellium_api.models.metered_subscription_usage import MeteredSubscriptionUsage -from corellium_api.models.model import Model -from corellium_api.models.model_software import ModelSoftware -from corellium_api.models.netdump_filter import NetdumpFilter -from corellium_api.models.network_connection import NetworkConnection -from corellium_api.models.network_connection_offset_pagination_result import NetworkConnectionOffsetPaginationResult -from corellium_api.models.network_connection_provider import NetworkConnectionProvider -from corellium_api.models.network_connection_provider_offset_pagination_result import NetworkConnectionProviderOffsetPaginationResult -from corellium_api.models.network_status_response import NetworkStatusResponse -from corellium_api.models.node_information import NodeInformation -from corellium_api.models.open_id_config import OpenIDConfig -from corellium_api.models.pagination import Pagination -from corellium_api.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest -from corellium_api.models.password_change_body import PasswordChangeBody -from corellium_api.models.password_reset_body import PasswordResetBody -from corellium_api.models.patch_instance_options import PatchInstanceOptions -from corellium_api.models.patch_instance_read_only import PatchInstanceReadOnly -from corellium_api.models.peripherals_data import PeripheralsData -from corellium_api.models.plan import Plan -from corellium_api.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload -from corellium_api.models.project import Project -from corellium_api.models.project_key import ProjectKey -from corellium_api.models.project_network_state import ProjectNetworkState -from corellium_api.models.project_quota import ProjectQuota -from corellium_api.models.project_settings import ProjectSettings -from corellium_api.models.project_usage import ProjectUsage -from corellium_api.models.proxy_config import ProxyConfig -from corellium_api.models.reset_link_body import ResetLinkBody -from corellium_api.models.reset_link_info_return import ResetLinkInfoReturn -from corellium_api.models.restore_backup_data import RestoreBackupData -from corellium_api.models.role import Role -from corellium_api.models.rotate_body import RotateBody -from corellium_api.models.shared_snapshots_info import SharedSnapshotsInfo -from corellium_api.models.snapshot import Snapshot -from corellium_api.models.snapshot_creation_options import SnapshotCreationOptions -from corellium_api.models.snapshot_member import SnapshotMember -from corellium_api.models.snapshot_owner import SnapshotOwner -from corellium_api.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload -from corellium_api.models.snapshot_sharing import SnapshotSharing -from corellium_api.models.snapshot_sharing_permissions import SnapshotSharingPermissions -from corellium_api.models.snapshot_status import SnapshotStatus -from corellium_api.models.sslsplit_filter import SslsplitFilter -from corellium_api.models.subscriber_invite import SubscriberInvite -from corellium_api.models.team import Team -from corellium_api.models.team_create import TeamCreate -from corellium_api.models.test_assessment_dto import TestAssessmentDto -from corellium_api.models.text_input import TextInput -from corellium_api.models.token import Token -from corellium_api.models.touch_curve_input import TouchCurveInput -from corellium_api.models.touch_input import TouchInput -from corellium_api.models.touch_input_buttons_inner import TouchInputButtonsInner -from corellium_api.models.trial import Trial -from corellium_api.models.trial_extension import TrialExtension -from corellium_api.models.trial_request_metadata import TrialRequestMetadata -from corellium_api.models.trial_request_options import TrialRequestOptions -from corellium_api.models.update_assessment_dto import UpdateAssessmentDto -from corellium_api.models.update_extension import UpdateExtension -from corellium_api.models.update_interconnect_request import UpdateInterconnectRequest -from corellium_api.models.update_network_connection_options import UpdateNetworkConnectionOptions -from corellium_api.models.update_trial_request_params import UpdateTrialRequestParams -from corellium_api.models.user import User -from corellium_api.models.user_create import UserCreate -from corellium_api.models.user_create_return import UserCreateReturn -from corellium_api.models.user_error import UserError -from corellium_api.models.user_snapshots import UserSnapshots -from corellium_api.models.user_update import UserUpdate -from corellium_api.models.v1_check_subdomain_existence_parameters import V1CheckSubdomainExistenceParameters -from corellium_api.models.v1_create_hook_parameters import V1CreateHookParameters -from corellium_api.models.v1_load_extension_parameters import V1LoadExtensionParameters -from corellium_api.models.v1_set_state_body import V1SetStateBody -from corellium_api.models.v1_update_hook_parameters import V1UpdateHookParameters -from corellium_api.models.validation_error import ValidationError -from corellium_api.models.volume_options import VolumeOptions -from corellium_api.models.vpn_definition import VpnDefinition -from corellium_api.models.web_player_create_session_request import WebPlayerCreateSessionRequest -from corellium_api.models.web_player_session import WebPlayerSession - diff --git a/corellium_api/api/__init__.py b/corellium_api/api/__init__.py deleted file mode 100644 index 25b198b..0000000 --- a/corellium_api/api/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from corellium_api.api.corellium_api import CorelliumApi diff --git a/corellium_api/api/corellium_api.py b/corellium_api/api/corellium_api.py deleted file mode 100644 index ce300b9..0000000 --- a/corellium_api/api/corellium_api.py +++ /dev/null @@ -1,28065 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from corellium_api.api_client import ApiClient -from corellium_api.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class CorelliumApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def api_v1_cluster_nodes_node_id_console_get(self, node_id, **kwargs): # noqa: E501 - """Access node console via SSH # noqa: E501 - - Access node console via SSH (WebSocket upgrade) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_cluster_nodes_node_id_console_get(node_id, async_req=True) - >>> result = thread.get() - - :param node_id: Node ID (required) - :type node_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.api_v1_cluster_nodes_node_id_console_get_with_http_info(node_id, **kwargs) # noqa: E501 - - def api_v1_cluster_nodes_node_id_console_get_with_http_info(self, node_id, **kwargs): # noqa: E501 - """Access node console via SSH # noqa: E501 - - Access node console via SSH (WebSocket upgrade) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_cluster_nodes_node_id_console_get_with_http_info(node_id, async_req=True) - >>> result = thread.get() - - :param node_id: Node ID (required) - :type node_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'node_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method api_v1_cluster_nodes_node_id_console_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'node_id' is set - if self.api_client.client_side_validation and ('node_id' not in local_var_params or # noqa: E501 - local_var_params['node_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `node_id` when calling `api_v1_cluster_nodes_node_id_console_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'node_id' in local_var_params: - path_params['nodeId'] = local_var_params['node_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/api/v1/cluster/nodes/:nodeId/console', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def api_v1_interconnects_get(self, **kwargs): # noqa: E501 - """Get all I/O Interconnects # noqa: E501 - - Get all I/O Interconnects # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_get(async_req=True) - >>> result = thread.get() - - :param limit: Maximum number of results to return (1-1000, default: 100) - :type limit: float - :param offset: Number of results to skip (default: 0) - :type offset: float - :param name: Filter by interconnect name (case insensitive) - :type name: str - :param protocol: Filter by protocol (comma separated) - :type protocol: str - :param type: Filter by type (comma separated) - :type type: str - :param status: Filter by status (comma separated) - :type status: str - :param project: Filter by project ID (comma separated) - :type project: str - :param sort: Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) - :type sort: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GetInterconnectsResponse - """ - kwargs['_return_http_data_only'] = True - return self.api_v1_interconnects_get_with_http_info(**kwargs) # noqa: E501 - - def api_v1_interconnects_get_with_http_info(self, **kwargs): # noqa: E501 - """Get all I/O Interconnects # noqa: E501 - - Get all I/O Interconnects # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param limit: Maximum number of results to return (1-1000, default: 100) - :type limit: float - :param offset: Number of results to skip (default: 0) - :type offset: float - :param name: Filter by interconnect name (case insensitive) - :type name: str - :param protocol: Filter by protocol (comma separated) - :type protocol: str - :param type: Filter by type (comma separated) - :type type: str - :param status: Filter by status (comma separated) - :type status: str - :param project: Filter by project ID (comma separated) - :type project: str - :param sort: Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) - :type sort: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GetInterconnectsResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset', - 'name', - 'protocol', - 'type', - 'status', - 'project', - 'sort' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method api_v1_interconnects_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 - query_params.append(('name', local_var_params['name'])) # noqa: E501 - if 'protocol' in local_var_params and local_var_params['protocol'] is not None: # noqa: E501 - query_params.append(('protocol', local_var_params['protocol'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501 - query_params.append(('status', local_var_params['status'])) # noqa: E501 - if 'project' in local_var_params and local_var_params['project'] is not None: # noqa: E501 - query_params.append(('project', local_var_params['project'])) # noqa: E501 - if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 - query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "GetInterconnectsResponse", - 401: "object", - 403: "object", - 500: "object", - } - - return self.api_client.call_api( - '/api/v1/interconnects', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def api_v1_interconnects_interconnect_id_delete(self, interconnect_id, **kwargs): # noqa: E501 - """Delete I/O Interconnect # noqa: E501 - - Delete I/O Interconnect # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_interconnect_id_delete(interconnect_id, async_req=True) - >>> result = thread.get() - - :param interconnect_id: The interconnect identifier (required) - :type interconnect_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.api_v1_interconnects_interconnect_id_delete_with_http_info(interconnect_id, **kwargs) # noqa: E501 - - def api_v1_interconnects_interconnect_id_delete_with_http_info(self, interconnect_id, **kwargs): # noqa: E501 - """Delete I/O Interconnect # noqa: E501 - - Delete I/O Interconnect # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_interconnect_id_delete_with_http_info(interconnect_id, async_req=True) - >>> result = thread.get() - - :param interconnect_id: The interconnect identifier (required) - :type interconnect_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'interconnect_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method api_v1_interconnects_interconnect_id_delete" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'interconnect_id' is set - if self.api_client.client_side_validation and ('interconnect_id' not in local_var_params or # noqa: E501 - local_var_params['interconnect_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `interconnect_id` when calling `api_v1_interconnects_interconnect_id_delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'interconnect_id' in local_var_params: - path_params['interconnectId'] = local_var_params['interconnect_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/api/v1/interconnects/:interconnectId', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def api_v1_interconnects_interconnect_id_get(self, interconnect_id, **kwargs): # noqa: E501 - """Get Interconnect # noqa: E501 - - Get Interconnect # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_interconnect_id_get(interconnect_id, async_req=True) - >>> result = thread.get() - - :param interconnect_id: The interconnect identifier (required) - :type interconnect_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InterconnectResponse - """ - kwargs['_return_http_data_only'] = True - return self.api_v1_interconnects_interconnect_id_get_with_http_info(interconnect_id, **kwargs) # noqa: E501 - - def api_v1_interconnects_interconnect_id_get_with_http_info(self, interconnect_id, **kwargs): # noqa: E501 - """Get Interconnect # noqa: E501 - - Get Interconnect # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_interconnect_id_get_with_http_info(interconnect_id, async_req=True) - >>> result = thread.get() - - :param interconnect_id: The interconnect identifier (required) - :type interconnect_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InterconnectResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'interconnect_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method api_v1_interconnects_interconnect_id_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'interconnect_id' is set - if self.api_client.client_side_validation and ('interconnect_id' not in local_var_params or # noqa: E501 - local_var_params['interconnect_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `interconnect_id` when calling `api_v1_interconnects_interconnect_id_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'interconnect_id' in local_var_params: - path_params['interconnectId'] = local_var_params['interconnect_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InterconnectResponse", - 401: "object", - 403: "object", - 404: "object", - 500: "object", - } - - return self.api_client.call_api( - '/api/v1/interconnects/:interconnectId', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def api_v1_interconnects_interconnect_id_patch(self, interconnect_id, partial_update_interconnect_request, **kwargs): # noqa: E501 - """Partial Update Interconnect # noqa: E501 - - Update some interconnect details for the specified interconnect identifier. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_interconnect_id_patch(interconnect_id, partial_update_interconnect_request, async_req=True) - >>> result = thread.get() - - :param interconnect_id: The interconnect identifier (required) - :type interconnect_id: str - :param partial_update_interconnect_request: The interconnect details to update (required) - :type partial_update_interconnect_request: PartialUpdateInterconnectRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InterconnectResponse - """ - kwargs['_return_http_data_only'] = True - return self.api_v1_interconnects_interconnect_id_patch_with_http_info(interconnect_id, partial_update_interconnect_request, **kwargs) # noqa: E501 - - def api_v1_interconnects_interconnect_id_patch_with_http_info(self, interconnect_id, partial_update_interconnect_request, **kwargs): # noqa: E501 - """Partial Update Interconnect # noqa: E501 - - Update some interconnect details for the specified interconnect identifier. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_interconnect_id_patch_with_http_info(interconnect_id, partial_update_interconnect_request, async_req=True) - >>> result = thread.get() - - :param interconnect_id: The interconnect identifier (required) - :type interconnect_id: str - :param partial_update_interconnect_request: The interconnect details to update (required) - :type partial_update_interconnect_request: PartialUpdateInterconnectRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InterconnectResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'interconnect_id', - 'partial_update_interconnect_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method api_v1_interconnects_interconnect_id_patch" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'interconnect_id' is set - if self.api_client.client_side_validation and ('interconnect_id' not in local_var_params or # noqa: E501 - local_var_params['interconnect_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `interconnect_id` when calling `api_v1_interconnects_interconnect_id_patch`") # noqa: E501 - # verify the required parameter 'partial_update_interconnect_request' is set - if self.api_client.client_side_validation and ('partial_update_interconnect_request' not in local_var_params or # noqa: E501 - local_var_params['partial_update_interconnect_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `partial_update_interconnect_request` when calling `api_v1_interconnects_interconnect_id_patch`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'interconnect_id' in local_var_params: - path_params['interconnectId'] = local_var_params['interconnect_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'partial_update_interconnect_request' in local_var_params: - body_params = local_var_params['partial_update_interconnect_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InterconnectResponse", - 400: "object", - 401: "object", - 403: "object", - 404: "object", - 500: "object", - } - - return self.api_client.call_api( - '/api/v1/interconnects/:interconnectId', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def api_v1_interconnects_interconnect_id_put(self, interconnect_id, update_interconnect_request, **kwargs): # noqa: E501 - """Update Interconnect # noqa: E501 - - Update interconnect details for the specified interconnect identifier. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_interconnect_id_put(interconnect_id, update_interconnect_request, async_req=True) - >>> result = thread.get() - - :param interconnect_id: The interconnect identifier (required) - :type interconnect_id: str - :param update_interconnect_request: The interconnect details to update (required) - :type update_interconnect_request: UpdateInterconnectRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InterconnectResponse - """ - kwargs['_return_http_data_only'] = True - return self.api_v1_interconnects_interconnect_id_put_with_http_info(interconnect_id, update_interconnect_request, **kwargs) # noqa: E501 - - def api_v1_interconnects_interconnect_id_put_with_http_info(self, interconnect_id, update_interconnect_request, **kwargs): # noqa: E501 - """Update Interconnect # noqa: E501 - - Update interconnect details for the specified interconnect identifier. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_interconnect_id_put_with_http_info(interconnect_id, update_interconnect_request, async_req=True) - >>> result = thread.get() - - :param interconnect_id: The interconnect identifier (required) - :type interconnect_id: str - :param update_interconnect_request: The interconnect details to update (required) - :type update_interconnect_request: UpdateInterconnectRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InterconnectResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'interconnect_id', - 'update_interconnect_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method api_v1_interconnects_interconnect_id_put" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'interconnect_id' is set - if self.api_client.client_side_validation and ('interconnect_id' not in local_var_params or # noqa: E501 - local_var_params['interconnect_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `interconnect_id` when calling `api_v1_interconnects_interconnect_id_put`") # noqa: E501 - # verify the required parameter 'update_interconnect_request' is set - if self.api_client.client_side_validation and ('update_interconnect_request' not in local_var_params or # noqa: E501 - local_var_params['update_interconnect_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `update_interconnect_request` when calling `api_v1_interconnects_interconnect_id_put`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'interconnect_id' in local_var_params: - path_params['interconnectId'] = local_var_params['interconnect_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'update_interconnect_request' in local_var_params: - body_params = local_var_params['update_interconnect_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InterconnectResponse", - 400: "object", - 401: "object", - 403: "object", - 404: "object", - 500: "object", - } - - return self.api_client.call_api( - '/api/v1/interconnects/:interconnectId', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def api_v1_interconnects_post(self, create_interconnect_request, **kwargs): # noqa: E501 - """Create I/O Interconnect # noqa: E501 - - Create an I/O Interconnect for the specified project and attach virtual device interfaces. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_post(create_interconnect_request, async_req=True) - >>> result = thread.get() - - :param create_interconnect_request: The interconnect details (required) - :type create_interconnect_request: CreateInterconnectRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InterconnectResponse - """ - kwargs['_return_http_data_only'] = True - return self.api_v1_interconnects_post_with_http_info(create_interconnect_request, **kwargs) # noqa: E501 - - def api_v1_interconnects_post_with_http_info(self, create_interconnect_request, **kwargs): # noqa: E501 - """Create I/O Interconnect # noqa: E501 - - Create an I/O Interconnect for the specified project and attach virtual device interfaces. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.api_v1_interconnects_post_with_http_info(create_interconnect_request, async_req=True) - >>> result = thread.get() - - :param create_interconnect_request: The interconnect details (required) - :type create_interconnect_request: CreateInterconnectRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InterconnectResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'create_interconnect_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method api_v1_interconnects_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'create_interconnect_request' is set - if self.api_client.client_side_validation and ('create_interconnect_request' not in local_var_params or # noqa: E501 - local_var_params['create_interconnect_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_interconnect_request` when calling `api_v1_interconnects_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_interconnect_request' in local_var_params: - body_params = local_var_params['create_interconnect_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InterconnectResponse", - 400: "object", - 401: "object", - 403: "object", - 500: "object", - } - - return self.api_client.call_api( - '/api/v1/interconnects', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def create_assessment(self, instance_id, create_assessment_dto, **kwargs): # noqa: E501 - """Create assessment # noqa: E501 - - Create assessment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_assessment(instance_id, create_assessment_dto, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param create_assessment_dto: Create a new assessment (required) - :type create_assessment_dto: CreateAssessmentDto - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AssessmentIdStatus - """ - kwargs['_return_http_data_only'] = True - return self.create_assessment_with_http_info(instance_id, create_assessment_dto, **kwargs) # noqa: E501 - - def create_assessment_with_http_info(self, instance_id, create_assessment_dto, **kwargs): # noqa: E501 - """Create assessment # noqa: E501 - - Create assessment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_assessment_with_http_info(instance_id, create_assessment_dto, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param create_assessment_dto: Create a new assessment (required) - :type create_assessment_dto: CreateAssessmentDto - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AssessmentIdStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'create_assessment_dto' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_assessment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `create_assessment`") # noqa: E501 - # verify the required parameter 'create_assessment_dto' is set - if self.api_client.client_side_validation and ('create_assessment_dto' not in local_var_params or # noqa: E501 - local_var_params['create_assessment_dto'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_assessment_dto` when calling `create_assessment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_assessment_dto' in local_var_params: - body_params = local_var_params['create_assessment_dto'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AssessmentIdStatus", - 400: None, - 500: "GetAssessmentsByInstanceId500Response", - } - - return self.api_client.call_api( - '/v1/services/matrix/{instanceId}/assessments', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def delete_assessment(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Delete assessment # noqa: E501 - - Delete assessment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_assessment(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.delete_assessment_with_http_info(instance_id, assessment_id, **kwargs) # noqa: E501 - - def delete_assessment_with_http_info(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Delete assessment # noqa: E501 - - Delete assessment # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_assessment_with_http_info(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'assessment_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_assessment" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `delete_assessment`") # noqa: E501 - # verify the required parameter 'assessment_id' is set - if self.api_client.client_side_validation and ('assessment_id' not in local_var_params or # noqa: E501 - local_var_params['assessment_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assessment_id` when calling `delete_assessment`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'assessment_id' in local_var_params: - path_params['assessmentId'] = local_var_params['assessment_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/services/matrix/{instanceId}/assessments/{assessmentId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def download_report(self, instance_id, assessment_id, format, **kwargs): # noqa: E501 - """Download report # noqa: E501 - - Download report # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.download_report(instance_id, assessment_id, format, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param format: Assessment report download format (required) - :type format: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: str - """ - kwargs['_return_http_data_only'] = True - return self.download_report_with_http_info(instance_id, assessment_id, format, **kwargs) # noqa: E501 - - def download_report_with_http_info(self, instance_id, assessment_id, format, **kwargs): # noqa: E501 - """Download report # noqa: E501 - - Download report # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.download_report_with_http_info(instance_id, assessment_id, format, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param format: Assessment report download format (required) - :type format: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'assessment_id', - 'format' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method download_report" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `download_report`") # noqa: E501 - # verify the required parameter 'assessment_id' is set - if self.api_client.client_side_validation and ('assessment_id' not in local_var_params or # noqa: E501 - local_var_params['assessment_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assessment_id` when calling `download_report`") # noqa: E501 - # verify the required parameter 'format' is set - if self.api_client.client_side_validation and ('format' not in local_var_params or # noqa: E501 - local_var_params['format'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `format` when calling `download_report`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'assessment_id' in local_var_params: - path_params['assessmentId'] = local_var_params['assessment_id'] # noqa: E501 - - query_params = [] - if 'format' in local_var_params and local_var_params['format'] is not None: # noqa: E501 - query_params.append(('format', local_var_params['format'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/html', 'application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "str", - 400: None, - 404: None, - 500: "GetAssessmentsByInstanceId500Response", - } - - return self.api_client.call_api( - '/v1/services/matrix/{instanceId}/assessments/{assessmentId}/download', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def get_assessment_by_id(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Get assessment by ID # noqa: E501 - - Get assessment by ID # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_assessment_by_id(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Assessment - """ - kwargs['_return_http_data_only'] = True - return self.get_assessment_by_id_with_http_info(instance_id, assessment_id, **kwargs) # noqa: E501 - - def get_assessment_by_id_with_http_info(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Get assessment by ID # noqa: E501 - - Get assessment by ID # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_assessment_by_id_with_http_info(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Assessment, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'assessment_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_assessment_by_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `get_assessment_by_id`") # noqa: E501 - # verify the required parameter 'assessment_id' is set - if self.api_client.client_side_validation and ('assessment_id' not in local_var_params or # noqa: E501 - local_var_params['assessment_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assessment_id` when calling `get_assessment_by_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'assessment_id' in local_var_params: - path_params['assessmentId'] = local_var_params['assessment_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Assessment", - 404: None, - 500: "GetAssessmentsByInstanceId500Response", - } - - return self.api_client.call_api( - '/v1/services/matrix/{instanceId}/assessments/{assessmentId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def get_assessments_by_instance_id(self, instance_id, **kwargs): # noqa: E501 - """Get assessments by instanceId # noqa: E501 - - Get assessments by instanceId # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_assessments_by_instance_id(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Assessment] - """ - kwargs['_return_http_data_only'] = True - return self.get_assessments_by_instance_id_with_http_info(instance_id, **kwargs) # noqa: E501 - - def get_assessments_by_instance_id_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get assessments by instanceId # noqa: E501 - - Get assessments by instanceId # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_assessments_by_instance_id_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Assessment], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_assessments_by_instance_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `get_assessments_by_instance_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Assessment]", - 500: "GetAssessmentsByInstanceId500Response", - } - - return self.api_client.call_api( - '/v1/services/matrix/{instanceId}/instances/{instanceId}/assessments', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def run_tests(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Update assessment state and execute MATRIX tests # noqa: E501 - - Update assessment state and execute MATRIX tests # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.run_tests(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param test_assessment_dto: Execute MATRIX tests - :type test_assessment_dto: TestAssessmentDto - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AssessmentIdStatus - """ - kwargs['_return_http_data_only'] = True - return self.run_tests_with_http_info(instance_id, assessment_id, **kwargs) # noqa: E501 - - def run_tests_with_http_info(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Update assessment state and execute MATRIX tests # noqa: E501 - - Update assessment state and execute MATRIX tests # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.run_tests_with_http_info(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param test_assessment_dto: Execute MATRIX tests - :type test_assessment_dto: TestAssessmentDto - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AssessmentIdStatus, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'assessment_id', - 'test_assessment_dto' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method run_tests" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `run_tests`") # noqa: E501 - # verify the required parameter 'assessment_id' is set - if self.api_client.client_side_validation and ('assessment_id' not in local_var_params or # noqa: E501 - local_var_params['assessment_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assessment_id` when calling `run_tests`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'assessment_id' in local_var_params: - path_params['assessmentId'] = local_var_params['assessment_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'test_assessment_dto' in local_var_params: - body_params = local_var_params['test_assessment_dto'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AssessmentIdStatus", - 400: None, - 404: None, - 500: "GetAssessmentsByInstanceId500Response", - } - - return self.api_client.call_api( - '/v1/services/matrix/{instanceId}/assessments/{assessmentId}/test', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def start_monitoring(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Update assessment state and begin device monitoring # noqa: E501 - - Update assessment state and begin device monitoring # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.start_monitoring(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.start_monitoring_with_http_info(instance_id, assessment_id, **kwargs) # noqa: E501 - - def start_monitoring_with_http_info(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Update assessment state and begin device monitoring # noqa: E501 - - Update assessment state and begin device monitoring # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.start_monitoring_with_http_info(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'assessment_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method start_monitoring" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `start_monitoring`") # noqa: E501 - # verify the required parameter 'assessment_id' is set - if self.api_client.client_side_validation and ('assessment_id' not in local_var_params or # noqa: E501 - local_var_params['assessment_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assessment_id` when calling `start_monitoring`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'assessment_id' in local_var_params: - path_params['assessmentId'] = local_var_params['assessment_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/services/matrix/{instanceId}/assessments/{assessmentId}/start', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def stop_monitoring(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Update assessment state and stop device monitoring # noqa: E501 - - Update assessment state and stop device monitoring # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.stop_monitoring(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.stop_monitoring_with_http_info(instance_id, assessment_id, **kwargs) # noqa: E501 - - def stop_monitoring_with_http_info(self, instance_id, assessment_id, **kwargs): # noqa: E501 - """Update assessment state and stop device monitoring # noqa: E501 - - Update assessment state and stop device monitoring # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.stop_monitoring_with_http_info(instance_id, assessment_id, async_req=True) - >>> result = thread.get() - - :param instance_id: ID of instance (required) - :type instance_id: str - :param assessment_id: ID of assessment (required) - :type assessment_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'assessment_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method stop_monitoring" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `stop_monitoring`") # noqa: E501 - # verify the required parameter 'assessment_id' is set - if self.api_client.client_side_validation and ('assessment_id' not in local_var_params or # noqa: E501 - local_var_params['assessment_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `assessment_id` when calling `stop_monitoring`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'assessment_id' in local_var_params: - path_params['assessmentId'] = local_var_params['assessment_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_accept_shared_snapshot(self, post_share_snapshot_request_payload, **kwargs): # noqa: E501 - """Accept a snapshot shared with you # noqa: E501 - - Accept a snapshot shared with you # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_accept_shared_snapshot(post_share_snapshot_request_payload, async_req=True) - >>> result = thread.get() - - :param post_share_snapshot_request_payload: (required) - :type post_share_snapshot_request_payload: PostShareSnapshotRequestPayload - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_accept_shared_snapshot_with_http_info(post_share_snapshot_request_payload, **kwargs) # noqa: E501 - - def v1_accept_shared_snapshot_with_http_info(self, post_share_snapshot_request_payload, **kwargs): # noqa: E501 - """Accept a snapshot shared with you # noqa: E501 - - Accept a snapshot shared with you # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_accept_shared_snapshot_with_http_info(post_share_snapshot_request_payload, async_req=True) - >>> result = thread.get() - - :param post_share_snapshot_request_payload: (required) - :type post_share_snapshot_request_payload: PostShareSnapshotRequestPayload - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'post_share_snapshot_request_payload' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_accept_shared_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'post_share_snapshot_request_payload' is set - if self.api_client.client_side_validation and ('post_share_snapshot_request_payload' not in local_var_params or # noqa: E501 - local_var_params['post_share_snapshot_request_payload'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `post_share_snapshot_request_payload` when calling `v1_accept_shared_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'post_share_snapshot_request_payload' in local_var_params: - body_params = local_var_params['post_share_snapshot_request_payload'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/snapshots/accept', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_activity_export(self, activity_export_dto, **kwargs): # noqa: E501 - """Start activity export # noqa: E501 - - Start activity export # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_activity_export(activity_export_dto, async_req=True) - >>> result = thread.get() - - :param activity_export_dto: (required) - :type activity_export_dto: ActivityExportDto - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ActivityExportResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_activity_export_with_http_info(activity_export_dto, **kwargs) # noqa: E501 - - def v1_activity_export_with_http_info(self, activity_export_dto, **kwargs): # noqa: E501 - """Start activity export # noqa: E501 - - Start activity export # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_activity_export_with_http_info(activity_export_dto, async_req=True) - >>> result = thread.get() - - :param activity_export_dto: (required) - :type activity_export_dto: ActivityExportDto - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ActivityExportResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'activity_export_dto' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_activity_export" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'activity_export_dto' is set - if self.api_client.client_side_validation and ('activity_export_dto' not in local_var_params or # noqa: E501 - local_var_params['activity_export_dto'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `activity_export_dto` when calling `v1_activity_export`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'activity_export_dto' in local_var_params: - body_params = local_var_params['activity_export_dto'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 201: "ActivityExportResponse", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/activity/export', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_activity_list(self, **kwargs): # noqa: E501 - """Get resource activities # noqa: E501 - - Get resource activities # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_activity_list(async_req=True) - >>> result = thread.get() - - :param request: - :type request: ActivityRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ActivityList - """ - kwargs['_return_http_data_only'] = True - return self.v1_activity_list_with_http_info(**kwargs) # noqa: E501 - - def v1_activity_list_with_http_info(self, **kwargs): # noqa: E501 - """Get resource activities # noqa: E501 - - Get resource activities # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_activity_list_with_http_info(async_req=True) - >>> result = thread.get() - - :param request: - :type request: ActivityRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ActivityList, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_activity_list" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'request' in local_var_params and local_var_params['request'] is not None: # noqa: E501 - query_params.append(('request', local_var_params['request'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "ActivityList", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/activity', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_add_project_key(self, project_id, project_key, **kwargs): # noqa: E501 - """Add Project Authorized Key # noqa: E501 - - Add Project Authorized Key # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_add_project_key(project_id, project_key, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param project_key: Key to add (required) - :type project_key: ProjectKey - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ProjectKey - """ - kwargs['_return_http_data_only'] = True - return self.v1_add_project_key_with_http_info(project_id, project_key, **kwargs) # noqa: E501 - - def v1_add_project_key_with_http_info(self, project_id, project_key, **kwargs): # noqa: E501 - """Add Project Authorized Key # noqa: E501 - - Add Project Authorized Key # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_add_project_key_with_http_info(project_id, project_key, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param project_key: Key to add (required) - :type project_key: ProjectKey - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ProjectKey, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'project_key' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_add_project_key" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_add_project_key`") # noqa: E501 - # verify the required parameter 'project_key' is set - if self.api_client.client_side_validation and ('project_key' not in local_var_params or # noqa: E501 - local_var_params['project_key'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_key` when calling `v1_add_project_key`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'project_key' in local_var_params: - body_params = local_var_params['project_key'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "ProjectKey", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects/{projectId}/keys', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_add_team_role_to_project(self, project_id, team_id, role_id, **kwargs): # noqa: E501 - """Add team role to project # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_add_team_role_to_project(project_id, team_id, role_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param team_id: Team ID - uuid (required) - :type team_id: str - :param role_id: Role ID (required) - :type role_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_add_team_role_to_project_with_http_info(project_id, team_id, role_id, **kwargs) # noqa: E501 - - def v1_add_team_role_to_project_with_http_info(self, project_id, team_id, role_id, **kwargs): # noqa: E501 - """Add team role to project # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_add_team_role_to_project_with_http_info(project_id, team_id, role_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param team_id: Team ID - uuid (required) - :type team_id: str - :param role_id: Role ID (required) - :type role_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'team_id', - 'role_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_add_team_role_to_project" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_add_team_role_to_project`") # noqa: E501 - # verify the required parameter 'team_id' is set - if self.api_client.client_side_validation and ('team_id' not in local_var_params or # noqa: E501 - local_var_params['team_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `team_id` when calling `v1_add_team_role_to_project`") # noqa: E501 - # verify the required parameter 'role_id' is set - if self.api_client.client_side_validation and ('role_id' not in local_var_params or # noqa: E501 - local_var_params['role_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `role_id` when calling `v1_add_team_role_to_project`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - if 'team_id' in local_var_params: - path_params['teamId'] = local_var_params['team_id'] # noqa: E501 - if 'role_id' in local_var_params: - path_params['roleId'] = local_var_params['role_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_add_user_role_to_project(self, project_id, user_id, role_id, **kwargs): # noqa: E501 - """Add user role to project # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_add_user_role_to_project(project_id, user_id, role_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param user_id: User ID - uuid (required) - :type user_id: str - :param role_id: Role ID (required) - :type role_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_add_user_role_to_project_with_http_info(project_id, user_id, role_id, **kwargs) # noqa: E501 - - def v1_add_user_role_to_project_with_http_info(self, project_id, user_id, role_id, **kwargs): # noqa: E501 - """Add user role to project # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_add_user_role_to_project_with_http_info(project_id, user_id, role_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param user_id: User ID - uuid (required) - :type user_id: str - :param role_id: Role ID (required) - :type role_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'user_id', - 'role_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_add_user_role_to_project" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_add_user_role_to_project`") # noqa: E501 - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `v1_add_user_role_to_project`") # noqa: E501 - # verify the required parameter 'role_id' is set - if self.api_client.client_side_validation and ('role_id' not in local_var_params or # noqa: E501 - local_var_params['role_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `role_id` when calling `v1_add_user_role_to_project`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - if 'user_id' in local_var_params: - path_params['userId'] = local_var_params['user_id'] # noqa: E501 - if 'role_id' in local_var_params: - path_params['roleId'] = local_var_params['role_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/roles/projects/{projectId}/users/{userId}/roles/{roleId}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_add_user_to_team(self, team_id, user_id, **kwargs): # noqa: E501 - """Add user to team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_add_user_to_team(team_id, user_id, async_req=True) - >>> result = thread.get() - - :param team_id: Team ID - uuid (required) - :type team_id: str - :param user_id: User ID - uuid (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_add_user_to_team_with_http_info(team_id, user_id, **kwargs) # noqa: E501 - - def v1_add_user_to_team_with_http_info(self, team_id, user_id, **kwargs): # noqa: E501 - """Add user to team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_add_user_to_team_with_http_info(team_id, user_id, async_req=True) - >>> result = thread.get() - - :param team_id: Team ID - uuid (required) - :type team_id: str - :param user_id: User ID - uuid (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'team_id', - 'user_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_add_user_to_team" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'team_id' is set - if self.api_client.client_side_validation and ('team_id' not in local_var_params or # noqa: E501 - local_var_params['team_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `team_id` when calling `v1_add_user_to_team`") # noqa: E501 - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `v1_add_user_to_team`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'team_id' in local_var_params: - path_params['teamId'] = local_var_params['team_id'] # noqa: E501 - if 'user_id' in local_var_params: - path_params['userId'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/teams/{teamId}/users/{userId}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_app_ready(self, instance_id, **kwargs): # noqa: E501 - """Check if App subsystem is ready # noqa: E501 - - Check if App subsystem is ready # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_app_ready(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AgentAppReadyResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_app_ready_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_app_ready_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Check if App subsystem is ready # noqa: E501 - - Check if App subsystem is ready # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_app_ready_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AgentAppReadyResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_app_ready" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_app_ready`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AgentAppReadyResponse", - 400: "AgentError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/app/ready', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_delete_file(self, instance_id, file_path, **kwargs): # noqa: E501 - """Delete a File on VM # noqa: E501 - - Delete a File on VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_delete_file(instance_id, file_path, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param file_path: File Path on VM (required) - :type file_path: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_delete_file_with_http_info(instance_id, file_path, **kwargs) # noqa: E501 - - def v1_agent_delete_file_with_http_info(self, instance_id, file_path, **kwargs): # noqa: E501 - """Delete a File on VM # noqa: E501 - - Delete a File on VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_delete_file_with_http_info(instance_id, file_path, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param file_path: File Path on VM (required) - :type file_path: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'file_path' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_delete_file" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_delete_file`") # noqa: E501 - # verify the required parameter 'file_path' is set - if self.api_client.client_side_validation and ('file_path' not in local_var_params or # noqa: E501 - local_var_params['file_path'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `file_path` when calling `v1_agent_delete_file`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'file_path' in local_var_params: - path_params['filePath'] = local_var_params['file_path'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/file/device/{filePath}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_get_file(self, instance_id, file_path, **kwargs): # noqa: E501 - """Download a File from VM # noqa: E501 - - Download a File from VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_get_file(instance_id, file_path, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param file_path: File Path on VM (required) - :type file_path: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: file - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_get_file_with_http_info(instance_id, file_path, **kwargs) # noqa: E501 - - def v1_agent_get_file_with_http_info(self, instance_id, file_path, **kwargs): # noqa: E501 - """Download a File from VM # noqa: E501 - - Download a File from VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_get_file_with_http_info(instance_id, file_path, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param file_path: File Path on VM (required) - :type file_path: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(file, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'file_path' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_get_file" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_get_file`") # noqa: E501 - # verify the required parameter 'file_path' is set - if self.api_client.client_side_validation and ('file_path' not in local_var_params or # noqa: E501 - local_var_params['file_path'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `file_path` when calling `v1_agent_get_file`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'file_path' in local_var_params: - path_params['filePath'] = local_var_params['file_path'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/octet-stream', 'application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "file", - 400: "AgentError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/file/device/{filePath}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_get_temp_filename(self, instance_id, **kwargs): # noqa: E501 - """Get the path for a new temp file # noqa: E501 - - Returns a temporary random filename that is guranteed to be unique on the VMs filesystem at the time of invocation of this method. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_get_temp_filename(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: str - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_get_temp_filename_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_get_temp_filename_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get the path for a new temp file # noqa: E501 - - Returns a temporary random filename that is guranteed to be unique on the VMs filesystem at the time of invocation of this method. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_get_temp_filename_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_get_temp_filename" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_get_temp_filename`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "str", - 400: "AgentError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/file/temp', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_install_app(self, instance_id, agent_install_body, **kwargs): # noqa: E501 - """Install App at path # noqa: E501 - - Installs the app located at path which must be present on the VM filesystem # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_install_app(instance_id, agent_install_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param agent_install_body: App parameters (required) - :type agent_install_body: AgentInstallBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_install_app_with_http_info(instance_id, agent_install_body, **kwargs) # noqa: E501 - - def v1_agent_install_app_with_http_info(self, instance_id, agent_install_body, **kwargs): # noqa: E501 - """Install App at path # noqa: E501 - - Installs the app located at path which must be present on the VM filesystem # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_install_app_with_http_info(instance_id, agent_install_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param agent_install_body: App parameters (required) - :type agent_install_body: AgentInstallBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'agent_install_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_install_app" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_install_app`") # noqa: E501 - # verify the required parameter 'agent_install_body' is set - if self.api_client.client_side_validation and ('agent_install_body' not in local_var_params or # noqa: E501 - local_var_params['agent_install_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `agent_install_body` when calling `v1_agent_install_app`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'agent_install_body' in local_var_params: - body_params = local_var_params['agent_install_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/app/install', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_install_profile(self, instance_id, body, **kwargs): # noqa: E501 - """Install a Profile to VM # noqa: E501 - - Install a Profile to VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_install_profile(instance_id, body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param body: Profile to Install (required) - :type body: file - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_install_profile_with_http_info(instance_id, body, **kwargs) # noqa: E501 - - def v1_agent_install_profile_with_http_info(self, instance_id, body, **kwargs): # noqa: E501 - """Install a Profile to VM # noqa: E501 - - Install a Profile to VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_install_profile_with_http_info(instance_id, body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param body: Profile to Install (required) - :type body: file - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_install_profile" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_install_profile`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `v1_agent_install_profile`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/octet-stream'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/profile/install', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_kill_app(self, instance_id, bundle_id, **kwargs): # noqa: E501 - """Kill an App # noqa: E501 - - Kill an App # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_kill_app(instance_id, bundle_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param bundle_id: App Bundle ID (required) - :type bundle_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: object - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_kill_app_with_http_info(instance_id, bundle_id, **kwargs) # noqa: E501 - - def v1_agent_kill_app_with_http_info(self, instance_id, bundle_id, **kwargs): # noqa: E501 - """Kill an App # noqa: E501 - - Kill an App # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_kill_app_with_http_info(instance_id, bundle_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param bundle_id: App Bundle ID (required) - :type bundle_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'bundle_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_kill_app" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_kill_app`") # noqa: E501 - # verify the required parameter 'bundle_id' is set - if self.api_client.client_side_validation and ('bundle_id' not in local_var_params or # noqa: E501 - local_var_params['bundle_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `bundle_id` when calling `v1_agent_kill_app`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'bundle_id' in local_var_params: - path_params['bundleId'] = local_var_params['bundle_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 204: "object", - 400: "AgentError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_list_app_icons(self, instance_id, bundle_id, **kwargs): # noqa: E501 - """List App Icons # noqa: E501 - - List App Icons as base64 data # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_list_app_icons(instance_id, bundle_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param bundle_id: App Bundle ID (required) - :type bundle_id: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[AgentIcons] - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_list_app_icons_with_http_info(instance_id, bundle_id, **kwargs) # noqa: E501 - - def v1_agent_list_app_icons_with_http_info(self, instance_id, bundle_id, **kwargs): # noqa: E501 - """List App Icons # noqa: E501 - - List App Icons as base64 data # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_list_app_icons_with_http_info(instance_id, bundle_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param bundle_id: App Bundle ID (required) - :type bundle_id: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[AgentIcons], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'bundle_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_list_app_icons" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_list_app_icons`") # noqa: E501 - # verify the required parameter 'bundle_id' is set - if self.api_client.client_side_validation and ('bundle_id' not in local_var_params or # noqa: E501 - local_var_params['bundle_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `bundle_id` when calling `v1_agent_list_app_icons`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - if 'bundle_id' in local_var_params and local_var_params['bundle_id'] is not None: # noqa: E501 - query_params.append(('bundleID', local_var_params['bundle_id'])) # noqa: E501 - collection_formats['bundleID'] = 'multi' # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[AgentIcons]", - 400: "AgentError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/app/icons', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_list_apps(self, instance_id, **kwargs): # noqa: E501 - """List Apps # noqa: E501 - - List Apps # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_list_apps(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AgentAppsList - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_list_apps_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_list_apps_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """List Apps # noqa: E501 - - List Apps # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_list_apps_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AgentAppsList, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_list_apps" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_list_apps`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AgentAppsList", - 400: "AgentError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/app/apps', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_list_apps_status(self, instance_id, **kwargs): # noqa: E501 - """List Apps Status # noqa: E501 - - List Apps Status # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_list_apps_status(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AgentAppsList - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_list_apps_status_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_list_apps_status_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """List Apps Status # noqa: E501 - - List Apps Status # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_list_apps_status_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AgentAppsList, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_list_apps_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_list_apps_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AgentAppsList", - 400: "AgentError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/app/apps/update', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_list_profiles(self, instance_id, **kwargs): # noqa: E501 - """List Profiles # noqa: E501 - - List Profiles # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_list_profiles(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AgentProfilesReturn - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_list_profiles_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_list_profiles_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """List Profiles # noqa: E501 - - List Profiles # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_list_profiles_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AgentProfilesReturn, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_list_profiles" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_list_profiles`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AgentProfilesReturn", - 400: "AgentError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/profile/profiles', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_run_app(self, instance_id, bundle_id, **kwargs): # noqa: E501 - """Run an App # noqa: E501 - - Run an App # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_run_app(instance_id, bundle_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param bundle_id: App Bundle ID (required) - :type bundle_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: object - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_run_app_with_http_info(instance_id, bundle_id, **kwargs) # noqa: E501 - - def v1_agent_run_app_with_http_info(self, instance_id, bundle_id, **kwargs): # noqa: E501 - """Run an App # noqa: E501 - - Run an App # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_run_app_with_http_info(instance_id, bundle_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param bundle_id: App Bundle ID (required) - :type bundle_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'bundle_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_run_app" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_run_app`") # noqa: E501 - # verify the required parameter 'bundle_id' is set - if self.api_client.client_side_validation and ('bundle_id' not in local_var_params or # noqa: E501 - local_var_params['bundle_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `bundle_id` when calling `v1_agent_run_app`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'bundle_id' in local_var_params: - path_params['bundleId'] = local_var_params['bundle_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 204: "object", - 400: "AgentError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_set_file_attributes(self, instance_id, file_path, file_changes, **kwargs): # noqa: E501 - """Change Attrs of a File on VM # noqa: E501 - - Change Attrs of a File on VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_set_file_attributes(instance_id, file_path, file_changes, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param file_path: File Path on VM (required) - :type file_path: str - :param file_changes: New attrs (required) - :type file_changes: FileChanges - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_set_file_attributes_with_http_info(instance_id, file_path, file_changes, **kwargs) # noqa: E501 - - def v1_agent_set_file_attributes_with_http_info(self, instance_id, file_path, file_changes, **kwargs): # noqa: E501 - """Change Attrs of a File on VM # noqa: E501 - - Change Attrs of a File on VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_set_file_attributes_with_http_info(instance_id, file_path, file_changes, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param file_path: File Path on VM (required) - :type file_path: str - :param file_changes: New attrs (required) - :type file_changes: FileChanges - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'file_path', - 'file_changes' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_set_file_attributes" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_set_file_attributes`") # noqa: E501 - # verify the required parameter 'file_path' is set - if self.api_client.client_side_validation and ('file_path' not in local_var_params or # noqa: E501 - local_var_params['file_path'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `file_path` when calling `v1_agent_set_file_attributes`") # noqa: E501 - # verify the required parameter 'file_changes' is set - if self.api_client.client_side_validation and ('file_changes' not in local_var_params or # noqa: E501 - local_var_params['file_changes'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `file_changes` when calling `v1_agent_set_file_attributes`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'file_path' in local_var_params: - path_params['filePath'] = local_var_params['file_path'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'file_changes' in local_var_params: - body_params = local_var_params['file_changes'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/file/device/{filePath}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_get_adb_auth(self, instance_id, **kwargs): # noqa: E501 - """Get ADB Auth Setting (AOSP only) # noqa: E501 - - Get ADB Auth Setting (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_get_adb_auth(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AgentSystemAdbAuth - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_get_adb_auth_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_system_get_adb_auth_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get ADB Auth Setting (AOSP only) # noqa: E501 - - Get ADB Auth Setting (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_get_adb_auth_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AgentSystemAdbAuth, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_get_adb_auth" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_get_adb_auth`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AgentSystemAdbAuth", - 400: "AgentError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/adbauth', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_get_network(self, instance_id, **kwargs): # noqa: E501 - """Get IP of eth0 (AOSP only) # noqa: E501 - - Get IP of eth0 (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_get_network(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AgentValueReturn - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_get_network_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_system_get_network_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get IP of eth0 (AOSP only) # noqa: E501 - - Get IP of eth0 (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_get_network_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AgentValueReturn, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_get_network" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_get_network`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AgentValueReturn", - 400: "AgentError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/network', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_get_prop(self, instance_id, agent_system_get_prop_body, **kwargs): # noqa: E501 - """Get System Property (AOSP only) # noqa: E501 - - Get System Property (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_get_prop(instance_id, agent_system_get_prop_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param agent_system_get_prop_body: Parameters (required) - :type agent_system_get_prop_body: AgentSystemGetPropBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AgentValueReturn - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_get_prop_with_http_info(instance_id, agent_system_get_prop_body, **kwargs) # noqa: E501 - - def v1_agent_system_get_prop_with_http_info(self, instance_id, agent_system_get_prop_body, **kwargs): # noqa: E501 - """Get System Property (AOSP only) # noqa: E501 - - Get System Property (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_get_prop_with_http_info(instance_id, agent_system_get_prop_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param agent_system_get_prop_body: Parameters (required) - :type agent_system_get_prop_body: AgentSystemGetPropBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AgentValueReturn, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'agent_system_get_prop_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_get_prop" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_get_prop`") # noqa: E501 - # verify the required parameter 'agent_system_get_prop_body' is set - if self.api_client.client_side_validation and ('agent_system_get_prop_body' not in local_var_params or # noqa: E501 - local_var_params['agent_system_get_prop_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `agent_system_get_prop_body` when calling `v1_agent_system_get_prop`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'agent_system_get_prop_body' in local_var_params: - body_params = local_var_params['agent_system_get_prop_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AgentValueReturn", - 400: "AgentError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/getprop', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_install_open_g_apps(self, instance_id, body, **kwargs): # noqa: E501 - """Install OpenGApps (AOSP only) # noqa: E501 - - Install OpenGApps (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_install_open_g_apps(instance_id, body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param body: Installation parameters (required) - :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_install_open_g_apps_with_http_info(instance_id, body, **kwargs) # noqa: E501 - - def v1_agent_system_install_open_g_apps_with_http_info(self, instance_id, body, **kwargs): # noqa: E501 - """Install OpenGApps (AOSP only) # noqa: E501 - - Install OpenGApps (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_install_open_g_apps_with_http_info(instance_id, body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param body: Installation parameters (required) - :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_install_open_g_apps" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_install_open_g_apps`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `v1_agent_system_install_open_g_apps`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/install-opengapps', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_lock(self, instance_id, **kwargs): # noqa: E501 - """Lock Device (iOS Only) # noqa: E501 - - Lock Device (iOS Only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_lock(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_lock_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_system_lock_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Lock Device (iOS Only) # noqa: E501 - - Lock Device (iOS Only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_lock_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_lock" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_lock`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/lock', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_set_adb_auth(self, instance_id, agent_system_adb_auth, **kwargs): # noqa: E501 - """Set ADB Auth Setting (AOSP only) # noqa: E501 - - Set ADB Auth Setting (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_set_adb_auth(instance_id, agent_system_adb_auth, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param agent_system_adb_auth: Desired ADB Auth Setting (required) - :type agent_system_adb_auth: AgentSystemAdbAuth - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_set_adb_auth_with_http_info(instance_id, agent_system_adb_auth, **kwargs) # noqa: E501 - - def v1_agent_system_set_adb_auth_with_http_info(self, instance_id, agent_system_adb_auth, **kwargs): # noqa: E501 - """Set ADB Auth Setting (AOSP only) # noqa: E501 - - Set ADB Auth Setting (AOSP only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_set_adb_auth_with_http_info(instance_id, agent_system_adb_auth, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param agent_system_adb_auth: Desired ADB Auth Setting (required) - :type agent_system_adb_auth: AgentSystemAdbAuth - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'agent_system_adb_auth' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_set_adb_auth" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_set_adb_auth`") # noqa: E501 - # verify the required parameter 'agent_system_adb_auth' is set - if self.api_client.client_side_validation and ('agent_system_adb_auth' not in local_var_params or # noqa: E501 - local_var_params['agent_system_adb_auth'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `agent_system_adb_auth` when calling `v1_agent_system_set_adb_auth`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'agent_system_adb_auth' in local_var_params: - body_params = local_var_params['agent_system_adb_auth'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/adbauth', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_set_hostname(self, instance_id, agent_system_set_hostname_body, **kwargs): # noqa: E501 - """Set Hostname of instance # noqa: E501 - - Set Hostname of instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_set_hostname(instance_id, agent_system_set_hostname_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param agent_system_set_hostname_body: New hostname (required) - :type agent_system_set_hostname_body: AgentSystemSetHostnameBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_set_hostname_with_http_info(instance_id, agent_system_set_hostname_body, **kwargs) # noqa: E501 - - def v1_agent_system_set_hostname_with_http_info(self, instance_id, agent_system_set_hostname_body, **kwargs): # noqa: E501 - """Set Hostname of instance # noqa: E501 - - Set Hostname of instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_set_hostname_with_http_info(instance_id, agent_system_set_hostname_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param agent_system_set_hostname_body: New hostname (required) - :type agent_system_set_hostname_body: AgentSystemSetHostnameBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'agent_system_set_hostname_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_set_hostname" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_set_hostname`") # noqa: E501 - # verify the required parameter 'agent_system_set_hostname_body' is set - if self.api_client.client_side_validation and ('agent_system_set_hostname_body' not in local_var_params or # noqa: E501 - local_var_params['agent_system_set_hostname_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `agent_system_set_hostname_body` when calling `v1_agent_system_set_hostname`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'agent_system_set_hostname_body' in local_var_params: - body_params = local_var_params['agent_system_set_hostname_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/setHostname', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_shutdown(self, instance_id, **kwargs): # noqa: E501 - """Instruct VM to halt # noqa: E501 - - Instruct VM to halt # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_shutdown(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_shutdown_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_system_shutdown_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Instruct VM to halt # noqa: E501 - - Instruct VM to halt # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_shutdown_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_shutdown" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_shutdown`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/shutdown', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_system_unlock(self, instance_id, **kwargs): # noqa: E501 - """Unlock Device (iOS Only) # noqa: E501 - - Unlock Device (iOS Only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_unlock(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_system_unlock_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_agent_system_unlock_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Unlock Device (iOS Only) # noqa: E501 - - Unlock Device (iOS Only) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_system_unlock_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_system_unlock" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_system_unlock`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/system/unlock', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_uninstall_app(self, instance_id, bundle_id, **kwargs): # noqa: E501 - """Uninstall an App # noqa: E501 - - Uninstall an App # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_uninstall_app(instance_id, bundle_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param bundle_id: App Bundle ID (required) - :type bundle_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: object - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_uninstall_app_with_http_info(instance_id, bundle_id, **kwargs) # noqa: E501 - - def v1_agent_uninstall_app_with_http_info(self, instance_id, bundle_id, **kwargs): # noqa: E501 - """Uninstall an App # noqa: E501 - - Uninstall an App # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_uninstall_app_with_http_info(instance_id, bundle_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param bundle_id: App Bundle ID (required) - :type bundle_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'bundle_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_uninstall_app" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_uninstall_app`") # noqa: E501 - # verify the required parameter 'bundle_id' is set - if self.api_client.client_side_validation and ('bundle_id' not in local_var_params or # noqa: E501 - local_var_params['bundle_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `bundle_id` when calling `v1_agent_uninstall_app`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'bundle_id' in local_var_params: - path_params['bundleId'] = local_var_params['bundle_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 204: "object", - 400: "AgentError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_uninstall_profile(self, instance_id, profile_id, **kwargs): # noqa: E501 - """Uninstall a Profile from VM # noqa: E501 - - Uninstall a Profile from VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_uninstall_profile(instance_id, profile_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param profile_id: Instance ID - uuid (required) - :type profile_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_uninstall_profile_with_http_info(instance_id, profile_id, **kwargs) # noqa: E501 - - def v1_agent_uninstall_profile_with_http_info(self, instance_id, profile_id, **kwargs): # noqa: E501 - """Uninstall a Profile from VM # noqa: E501 - - Uninstall a Profile from VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_uninstall_profile_with_http_info(instance_id, profile_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param profile_id: Instance ID - uuid (required) - :type profile_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'profile_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_uninstall_profile" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_uninstall_profile`") # noqa: E501 - # verify the required parameter 'profile_id' is set - if self.api_client.client_side_validation and ('profile_id' not in local_var_params or # noqa: E501 - local_var_params['profile_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `profile_id` when calling `v1_agent_uninstall_profile`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'profile_id' in local_var_params: - path_params['profileId'] = local_var_params['profile_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_agent_upload_file(self, instance_id, file_path, body, **kwargs): # noqa: E501 - """Upload a file to VM # noqa: E501 - - Upload a file to VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_upload_file(instance_id, file_path, body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param file_path: File Path on VM to write to (required) - :type file_path: str - :param body: Uploaded File Contents (required) - :type body: file - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_agent_upload_file_with_http_info(instance_id, file_path, body, **kwargs) # noqa: E501 - - def v1_agent_upload_file_with_http_info(self, instance_id, file_path, body, **kwargs): # noqa: E501 - """Upload a file to VM # noqa: E501 - - Upload a file to VM # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_agent_upload_file_with_http_info(instance_id, file_path, body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param file_path: File Path on VM to write to (required) - :type file_path: str - :param body: Uploaded File Contents (required) - :type body: file - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'file_path', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_agent_upload_file" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_agent_upload_file`") # noqa: E501 - # verify the required parameter 'file_path' is set - if self.api_client.client_side_validation and ('file_path' not in local_var_params or # noqa: E501 - local_var_params['file_path'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `file_path` when calling `v1_agent_upload_file`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `v1_agent_upload_file`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'file_path' in local_var_params: - path_params['filePath'] = local_var_params['file_path'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/octet-stream'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/agent/v1/file/device/{filePath}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_attach_instance_interface(self, instance_id, attach_interface_request, **kwargs): # noqa: E501 - """Attach I/O Interface # noqa: E501 - - Attach an I/O interface to an I/O interconnect for the specified instance identifier. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_attach_instance_interface(instance_id, attach_interface_request, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param attach_interface_request: Interface attachment request (required) - :type attach_interface_request: AttachInterfaceRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_attach_instance_interface_with_http_info(instance_id, attach_interface_request, **kwargs) # noqa: E501 - - def v1_attach_instance_interface_with_http_info(self, instance_id, attach_interface_request, **kwargs): # noqa: E501 - """Attach I/O Interface # noqa: E501 - - Attach an I/O interface to an I/O interconnect for the specified instance identifier. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_attach_instance_interface_with_http_info(instance_id, attach_interface_request, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param attach_interface_request: Interface attachment request (required) - :type attach_interface_request: AttachInterfaceRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'attach_interface_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_attach_instance_interface" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_attach_instance_interface`") # noqa: E501 - # verify the required parameter 'attach_interface_request' is set - if self.api_client.client_side_validation and ('attach_interface_request' not in local_var_params or # noqa: E501 - local_var_params['attach_interface_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `attach_interface_request` when calling `v1_attach_instance_interface`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'attach_interface_request' in local_var_params: - body_params = local_var_params['attach_interface_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/interfaces', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_auth_login(self, body, **kwargs): # noqa: E501 - """Log In # noqa: E501 - - Log In # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_auth_login(body, async_req=True) - >>> result = thread.get() - - :param body: Authorization data ( Credentials|ApiToken ) (required) - :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Token - """ - kwargs['_return_http_data_only'] = True - return self.v1_auth_login_with_http_info(body, **kwargs) # noqa: E501 - - def v1_auth_login_with_http_info(self, body, **kwargs): # noqa: E501 - """Log In # noqa: E501 - - Log In # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_auth_login_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: Authorization data ( Credentials|ApiToken ) (required) - :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Token, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_auth_login" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `v1_auth_login`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = { - 200: "Token", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/auth/login', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_btrace_preauthorize(self, instance_id, **kwargs): # noqa: E501 - """Pre-authorize an btrace download # noqa: E501 - - Pre-authorize an btrace download # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_btrace_preauthorize(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Token - """ - kwargs['_return_http_data_only'] = True - return self.v1_btrace_preauthorize_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_btrace_preauthorize_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Pre-authorize an btrace download # noqa: E501 - - Pre-authorize an btrace download # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_btrace_preauthorize_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Token, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_btrace_preauthorize" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_btrace_preauthorize`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Token", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/btrace-authorize', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_clear_core_trace(self, instance_id, **kwargs): # noqa: E501 - """Clear CoreTrace logs # noqa: E501 - - Clear CoreTrace logs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_clear_core_trace(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_clear_core_trace_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_clear_core_trace_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Clear CoreTrace logs # noqa: E501 - - Clear CoreTrace logs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_clear_core_trace_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_clear_core_trace" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_clear_core_trace`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/strace', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_clear_hyper_trace(self, instance_id, **kwargs): # noqa: E501 - """Clear HyperTrace logs # noqa: E501 - - Clear HyperTrace logs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_clear_hyper_trace(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_clear_hyper_trace_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_clear_hyper_trace_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Clear HyperTrace logs # noqa: E501 - - Clear HyperTrace logs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_clear_hyper_trace_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_clear_hyper_trace" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_clear_hyper_trace`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/btrace', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_clear_hyper_trace_hooks(self, instance_id, **kwargs): # noqa: E501 - """Clear Hooks on an instance # noqa: E501 - - Clear Hooks on an instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_clear_hyper_trace_hooks(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_clear_hyper_trace_hooks_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_clear_hyper_trace_hooks_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Clear Hooks on an instance # noqa: E501 - - Clear Hooks on an instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_clear_hyper_trace_hooks_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_clear_hyper_trace_hooks" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_clear_hyper_trace_hooks`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/hooks/clear', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_clear_instance_panics(self, instance_id, **kwargs): # noqa: E501 - """Clear Panics # noqa: E501 - - Clear Panics # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_clear_instance_panics(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_clear_instance_panics_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_clear_instance_panics_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Clear Panics # noqa: E501 - - Clear Panics # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_clear_instance_panics_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_clear_instance_panics" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_clear_instance_panics`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/panics', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_firmware_service_devices_get(self, **kwargs): # noqa: E501 - """Fetch devices from the firmware service # noqa: E501 - - Proxies a request to the firmware service to retrieve a list of devices. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_devices_get(async_req=True) - >>> result = thread.get() - - :param limit: Number of results to return (min: 1, max: 10000, default: 100) - :type limit: float - :param offset: Index of the first row to return (default: 0) - :type offset: float - :param search: Case-insensitive partial match across name, model, platform, and hwmodel fields - :type search: str - :param order: Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: - :type order: str - :param type: Filter by exact type. Example: coreimg - :type type: str - :param model: Filter by exact model. Example: Example: iPhone8,1 - :type model: str - :param name: Filter by exact name. Example: iPhone6s - :type name: str - :param platform: Filter by exact platform. Example: s5l8960x - :type platform: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Device] - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_firmware_service_devices_get_with_http_info(**kwargs) # noqa: E501 - - def v1_cluster_firmware_service_devices_get_with_http_info(self, **kwargs): # noqa: E501 - """Fetch devices from the firmware service # noqa: E501 - - Proxies a request to the firmware service to retrieve a list of devices. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_devices_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param limit: Number of results to return (min: 1, max: 10000, default: 100) - :type limit: float - :param offset: Index of the first row to return (default: 0) - :type offset: float - :param search: Case-insensitive partial match across name, model, platform, and hwmodel fields - :type search: str - :param order: Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: - :type order: str - :param type: Filter by exact type. Example: coreimg - :type type: str - :param model: Filter by exact model. Example: Example: iPhone8,1 - :type model: str - :param name: Filter by exact name. Example: iPhone6s - :type name: str - :param platform: Filter by exact platform. Example: s5l8960x - :type platform: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Device], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset', - 'search', - 'order', - 'type', - 'model', - 'name', - 'platform' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_firmware_service_devices_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 - query_params.append(('search', local_var_params['search'])) # noqa: E501 - if 'order' in local_var_params and local_var_params['order'] is not None: # noqa: E501 - query_params.append(('order', local_var_params['order'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'model' in local_var_params and local_var_params['model'] is not None: # noqa: E501 - query_params.append(('model', local_var_params['model'])) # noqa: E501 - if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 - query_params.append(('name', local_var_params['name'])) # noqa: E501 - if 'platform' in local_var_params and local_var_params['platform'] is not None: # noqa: E501 - query_params.append(('platform', local_var_params['platform'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Device]", - 400: "UserError", - 403: "ApiError", - 404: "ApiError", - 500: "ApiError", - } - - return self.api_client.call_api( - '/v1/cluster/firmware-service/devices', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_firmware_service_firmware_assets_asset_url_delete(self, asset_url, **kwargs): # noqa: E501 - """Delete a firmware asset by its URL # noqa: E501 - - Proxies a request to the firmware service to delete a firmware asset by URL. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmware_assets_asset_url_delete(asset_url, async_req=True) - >>> result = thread.get() - - :param asset_url: The URL-encoded firmware asset URL to delete - format:uri - pattern:^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]+$ (required) - :type asset_url: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_firmware_service_firmware_assets_asset_url_delete_with_http_info(asset_url, **kwargs) # noqa: E501 - - def v1_cluster_firmware_service_firmware_assets_asset_url_delete_with_http_info(self, asset_url, **kwargs): # noqa: E501 - """Delete a firmware asset by its URL # noqa: E501 - - Proxies a request to the firmware service to delete a firmware asset by URL. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmware_assets_asset_url_delete_with_http_info(asset_url, async_req=True) - >>> result = thread.get() - - :param asset_url: The URL-encoded firmware asset URL to delete - format:uri - pattern:^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]+$ (required) - :type asset_url: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'asset_url' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_firmware_service_firmware_assets_asset_url_delete" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'asset_url' is set - if self.api_client.client_side_validation and ('asset_url' not in local_var_params or # noqa: E501 - local_var_params['asset_url'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `asset_url` when calling `v1_cluster_firmware_service_firmware_assets_asset_url_delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'asset_url' in local_var_params: - path_params['assetURL'] = local_var_params['asset_url'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/cluster/firmware-service/firmware-assets/{assetURL}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_firmware_service_firmware_assets_asset_url_extended_get(self, asset_url, **kwargs): # noqa: E501 - """Fetch extended firmware-asset details including instances and associated IPSWs # noqa: E501 - - Retrieves extended information about a firmware including all instances using it and associated firmware assets. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmware_assets_asset_url_extended_get(asset_url, async_req=True) - >>> result = thread.get() - - :param asset_url: The URL-encoded firmware asset to delete. Example: H4RUO0MX-Fz0ka2Q2vCfvP-27ElNZw5bWJEfyF04AxA= (required) - :type asset_url: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ExtendedFirmwareAssetInfo - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_firmware_service_firmware_assets_asset_url_extended_get_with_http_info(asset_url, **kwargs) # noqa: E501 - - def v1_cluster_firmware_service_firmware_assets_asset_url_extended_get_with_http_info(self, asset_url, **kwargs): # noqa: E501 - """Fetch extended firmware-asset details including instances and associated IPSWs # noqa: E501 - - Retrieves extended information about a firmware including all instances using it and associated firmware assets. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmware_assets_asset_url_extended_get_with_http_info(asset_url, async_req=True) - >>> result = thread.get() - - :param asset_url: The URL-encoded firmware asset to delete. Example: H4RUO0MX-Fz0ka2Q2vCfvP-27ElNZw5bWJEfyF04AxA= (required) - :type asset_url: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ExtendedFirmwareAssetInfo, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'asset_url' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_firmware_service_firmware_assets_asset_url_extended_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'asset_url' is set - if self.api_client.client_side_validation and ('asset_url' not in local_var_params or # noqa: E501 - local_var_params['asset_url'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `asset_url` when calling `v1_cluster_firmware_service_firmware_assets_asset_url_extended_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'asset_url' in local_var_params: - path_params['assetURL'] = local_var_params['asset_url'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "ExtendedFirmwareAssetInfo", - 400: "UserError", - 403: "ApiError", - 404: "ApiError", - 500: "ApiError", - } - - return self.api_client.call_api( - '/v1/cluster/firmware-service/firmware-assets/{assetURL}/extended', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_firmware_service_firmware_assets_get(self, **kwargs): # noqa: E501 - """Fetch firmware assets from the firmware service # noqa: E501 - - Proxies a request to the firmware service to retrieve a list of firmware assets. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmware_assets_get(async_req=True) - >>> result = thread.get() - - :param limit: Number of results to return (min: 1, max: 10000, default: 100) - :type limit: float - :param offset: Index of the first row to return (default: 0) - :type offset: float - :param order: Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'url,-domain'). Allowed fields: url, domain - :type order: str - :param search: Case-insensitive partial match across url, domain - :type search: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[FirmwareAsset] - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_firmware_service_firmware_assets_get_with_http_info(**kwargs) # noqa: E501 - - def v1_cluster_firmware_service_firmware_assets_get_with_http_info(self, **kwargs): # noqa: E501 - """Fetch firmware assets from the firmware service # noqa: E501 - - Proxies a request to the firmware service to retrieve a list of firmware assets. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmware_assets_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param limit: Number of results to return (min: 1, max: 10000, default: 100) - :type limit: float - :param offset: Index of the first row to return (default: 0) - :type offset: float - :param order: Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'url,-domain'). Allowed fields: url, domain - :type order: str - :param search: Case-insensitive partial match across url, domain - :type search: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[FirmwareAsset], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset', - 'order', - 'search' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_firmware_service_firmware_assets_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'order' in local_var_params and local_var_params['order'] is not None: # noqa: E501 - query_params.append(('order', local_var_params['order'])) # noqa: E501 - if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 - query_params.append(('search', local_var_params['search'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[FirmwareAsset]", - 400: "UserError", - 403: "ApiError", - 404: "ApiError", - 500: "ApiError", - } - - return self.api_client.call_api( - '/v1/cluster/firmware-service/firmware-assets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_firmware_service_firmware_assets_post(self, body, **kwargs): # noqa: E501 - """Add firmware assets via the firmware service # noqa: E501 - - Proxies a request to the firmware service to add firmware assets. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmware_assets_post(body, async_req=True) - >>> result = thread.get() - - :param body: Firmware assets payload (required) - :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: str - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_firmware_service_firmware_assets_post_with_http_info(body, **kwargs) # noqa: E501 - - def v1_cluster_firmware_service_firmware_assets_post_with_http_info(self, body, **kwargs): # noqa: E501 - """Add firmware assets via the firmware service # noqa: E501 - - Proxies a request to the firmware service to add firmware assets. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmware_assets_post_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param body: Firmware assets payload (required) - :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_firmware_service_firmware_assets_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `v1_cluster_firmware_service_firmware_assets_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/html', 'application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 201: "str", - 400: "UserError", - 403: "ApiError", - 404: "ApiError", - 500: "ApiError", - } - - return self.api_client.call_api( - '/v1/cluster/firmware-service/firmware-assets', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_firmware_service_firmwares_filename_delete(self, filename, **kwargs): # noqa: E501 - """Delete a firmware by filename from the firmware service # noqa: E501 - - Proxies a request to the firmware service to delete a firmware by filename. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmwares_filename_delete(filename, async_req=True) - >>> result = thread.get() - - :param filename: The filename of the firmware to delete (required) - :type filename: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_firmware_service_firmwares_filename_delete_with_http_info(filename, **kwargs) # noqa: E501 - - def v1_cluster_firmware_service_firmwares_filename_delete_with_http_info(self, filename, **kwargs): # noqa: E501 - """Delete a firmware by filename from the firmware service # noqa: E501 - - Proxies a request to the firmware service to delete a firmware by filename. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmwares_filename_delete_with_http_info(filename, async_req=True) - >>> result = thread.get() - - :param filename: The filename of the firmware to delete (required) - :type filename: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'filename' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_firmware_service_firmwares_filename_delete" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'filename' is set - if self.api_client.client_side_validation and ('filename' not in local_var_params or # noqa: E501 - local_var_params['filename'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `filename` when calling `v1_cluster_firmware_service_firmwares_filename_delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'filename' in local_var_params: - path_params['filename'] = local_var_params['filename'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/cluster/firmware-service/firmwares/{filename}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_firmware_service_firmwares_get(self, **kwargs): # noqa: E501 - """Fetch firmwares from the firmware service # noqa: E501 - - Proxies a request to the firmware service to retrieve a list of firmwares. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmwares_get(async_req=True) - >>> result = thread.get() - - :param limit: Number of results to return (min: 1, max: 10000, default: 100) - :type limit: float - :param offset: Index of the first row to return (default: 0) - :type offset: float - :param search: Case-insensitive partial match across filename, model, type, version and buildid fields - :type search: str - :param order: Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: - :type order: str - :param filename: Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw - :type filename: str - :param model: Filter by exact model. Example: iPhone10,4 - :type model: str - :param type: Filter by exact type. Example: ipsw - :type type: str - :param version: Filter by exact version. Example: 12.1.4 - :type version: str - :param buildid: Filter by exact buildid. Example: 16D57 - :type buildid: str - :param firmware_assets: Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= - :type firmware_assets: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Firmware] - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_firmware_service_firmwares_get_with_http_info(**kwargs) # noqa: E501 - - def v1_cluster_firmware_service_firmwares_get_with_http_info(self, **kwargs): # noqa: E501 - """Fetch firmwares from the firmware service # noqa: E501 - - Proxies a request to the firmware service to retrieve a list of firmwares. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_firmware_service_firmwares_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param limit: Number of results to return (min: 1, max: 10000, default: 100) - :type limit: float - :param offset: Index of the first row to return (default: 0) - :type offset: float - :param search: Case-insensitive partial match across filename, model, type, version and buildid fields - :type search: str - :param order: Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: - :type order: str - :param filename: Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw - :type filename: str - :param model: Filter by exact model. Example: iPhone10,4 - :type model: str - :param type: Filter by exact type. Example: ipsw - :type type: str - :param version: Filter by exact version. Example: 12.1.4 - :type version: str - :param buildid: Filter by exact buildid. Example: 16D57 - :type buildid: str - :param firmware_assets: Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= - :type firmware_assets: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Firmware], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset', - 'search', - 'order', - 'filename', - 'model', - 'type', - 'version', - 'buildid', - 'firmware_assets' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_firmware_service_firmwares_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 - query_params.append(('search', local_var_params['search'])) # noqa: E501 - if 'order' in local_var_params and local_var_params['order'] is not None: # noqa: E501 - query_params.append(('order', local_var_params['order'])) # noqa: E501 - if 'filename' in local_var_params and local_var_params['filename'] is not None: # noqa: E501 - query_params.append(('filename', local_var_params['filename'])) # noqa: E501 - if 'model' in local_var_params and local_var_params['model'] is not None: # noqa: E501 - query_params.append(('model', local_var_params['model'])) # noqa: E501 - if 'type' in local_var_params and local_var_params['type'] is not None: # noqa: E501 - query_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'version' in local_var_params and local_var_params['version'] is not None: # noqa: E501 - query_params.append(('version', local_var_params['version'])) # noqa: E501 - if 'buildid' in local_var_params and local_var_params['buildid'] is not None: # noqa: E501 - query_params.append(('buildid', local_var_params['buildid'])) # noqa: E501 - if 'firmware_assets' in local_var_params and local_var_params['firmware_assets'] is not None: # noqa: E501 - query_params.append(('firmware_assets', local_var_params['firmware_assets'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Firmware]", - 400: "UserError", - 403: "ApiError", - 404: "ApiError", - 500: "ApiError", - } - - return self.api_client.call_api( - '/v1/cluster/firmware-service/firmwares', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_nodes_get(self, **kwargs): # noqa: E501 - """List servers in the cluster # noqa: E501 - - List servers in the cluster # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_nodes_get(async_req=True) - >>> result = thread.get() - - :param limit: limit for pagination results, defaults to 100 - :type limit: float - :param offset: offset for pagination results, defaults to 0 - :type offset: float - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[NodeInformation] - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_nodes_get_with_http_info(**kwargs) # noqa: E501 - - def v1_cluster_nodes_get_with_http_info(self, **kwargs): # noqa: E501 - """List servers in the cluster # noqa: E501 - - List servers in the cluster # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_nodes_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param limit: limit for pagination results, defaults to 100 - :type limit: float - :param offset: offset for pagination results, defaults to 0 - :type offset: float - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[NodeInformation], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_nodes_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[NodeInformation]", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/cluster/nodes', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_cluster_nodes_node_id_get(self, node_id, **kwargs): # noqa: E501 - """Get node details by ID # noqa: E501 - - Get node details by ID # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_nodes_node_id_get(node_id, async_req=True) - >>> result = thread.get() - - :param node_id: Node ID (required) - :type node_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NodeInformation - """ - kwargs['_return_http_data_only'] = True - return self.v1_cluster_nodes_node_id_get_with_http_info(node_id, **kwargs) # noqa: E501 - - def v1_cluster_nodes_node_id_get_with_http_info(self, node_id, **kwargs): # noqa: E501 - """Get node details by ID # noqa: E501 - - Get node details by ID # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_cluster_nodes_node_id_get_with_http_info(node_id, async_req=True) - >>> result = thread.get() - - :param node_id: Node ID (required) - :type node_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NodeInformation, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'node_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_cluster_nodes_node_id_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'node_id' is set - if self.api_client.client_side_validation and ('node_id' not in local_var_params or # noqa: E501 - local_var_params['node_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `node_id` when calling `v1_cluster_nodes_node_id_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'node_id' in local_var_params: - path_params['nodeId'] = local_var_params['node_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "NodeInformation", - 403: "ApiError", - 404: "ApiError", - } - - return self.api_client.call_api( - '/v1/cluster/nodes/:nodeId', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_create_domain_auth_provider(self, domain_id, domain_auth_provider_request, **kwargs): # noqa: E501 - """Create a new auth provider for a domain # noqa: E501 - - Create a new auth provider for a domain # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_domain_auth_provider(domain_id, domain_auth_provider_request, async_req=True) - >>> result = thread.get() - - :param domain_id: Domain ID - uuid (required) - :type domain_id: str - :param domain_auth_provider_request: Request Data (required) - :type domain_auth_provider_request: DomainAuthProviderRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: DomainAuthProviderResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_create_domain_auth_provider_with_http_info(domain_id, domain_auth_provider_request, **kwargs) # noqa: E501 - - def v1_create_domain_auth_provider_with_http_info(self, domain_id, domain_auth_provider_request, **kwargs): # noqa: E501 - """Create a new auth provider for a domain # noqa: E501 - - Create a new auth provider for a domain # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_domain_auth_provider_with_http_info(domain_id, domain_auth_provider_request, async_req=True) - >>> result = thread.get() - - :param domain_id: Domain ID - uuid (required) - :type domain_id: str - :param domain_auth_provider_request: Request Data (required) - :type domain_auth_provider_request: DomainAuthProviderRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(DomainAuthProviderResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'domain_id', - 'domain_auth_provider_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_create_domain_auth_provider" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'domain_id' is set - if self.api_client.client_side_validation and ('domain_id' not in local_var_params or # noqa: E501 - local_var_params['domain_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `domain_id` when calling `v1_create_domain_auth_provider`") # noqa: E501 - # verify the required parameter 'domain_auth_provider_request' is set - if self.api_client.client_side_validation and ('domain_auth_provider_request' not in local_var_params or # noqa: E501 - local_var_params['domain_auth_provider_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `domain_auth_provider_request` when calling `v1_create_domain_auth_provider`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'domain_id' in local_var_params: - path_params['domainId'] = local_var_params['domain_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'domain_auth_provider_request' in local_var_params: - body_params = local_var_params['domain_auth_provider_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "DomainAuthProviderResponse", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/domain/{domainId}/auth', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_create_hook(self, instance_id, v1_create_hook_parameters, **kwargs): # noqa: E501 - """Create hypervisor hook for Instance # noqa: E501 - - Create hypervisor hook for Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_hook(instance_id, v1_create_hook_parameters, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param v1_create_hook_parameters: application/json (required) - :type v1_create_hook_parameters: V1CreateHookParameters - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Hook - """ - kwargs['_return_http_data_only'] = True - return self.v1_create_hook_with_http_info(instance_id, v1_create_hook_parameters, **kwargs) # noqa: E501 - - def v1_create_hook_with_http_info(self, instance_id, v1_create_hook_parameters, **kwargs): # noqa: E501 - """Create hypervisor hook for Instance # noqa: E501 - - Create hypervisor hook for Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_hook_with_http_info(instance_id, v1_create_hook_parameters, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param v1_create_hook_parameters: application/json (required) - :type v1_create_hook_parameters: V1CreateHookParameters - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Hook, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'v1_create_hook_parameters' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_create_hook" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_create_hook`") # noqa: E501 - # verify the required parameter 'v1_create_hook_parameters' is set - if self.api_client.client_side_validation and ('v1_create_hook_parameters' not in local_var_params or # noqa: E501 - local_var_params['v1_create_hook_parameters'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `v1_create_hook_parameters` when calling `v1_create_hook`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'v1_create_hook_parameters' in local_var_params: - body_params = local_var_params['v1_create_hook_parameters'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 201: "Hook", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/hooks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_create_image(self, type, encoding, **kwargs): # noqa: E501 - """Create a new Image # noqa: E501 - - Create a new Image # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_image(type, encoding, async_req=True) - >>> result = thread.get() - - :param type: Image type (required) - :type type: str - :param encoding: How the file is stored (required) - :type encoding: str - :param encapsulated: set to false if the uploaded file is not encapsulated inside an outer zipfile - :type encapsulated: bool - :param name: Image name - :type name: str - :param project: Project ID - :type project: str - :param instance: Instance ID - :type instance: str - :param file: Optionally the actual file - :type file: file - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Image - """ - kwargs['_return_http_data_only'] = True - return self.v1_create_image_with_http_info(type, encoding, **kwargs) # noqa: E501 - - def v1_create_image_with_http_info(self, type, encoding, **kwargs): # noqa: E501 - """Create a new Image # noqa: E501 - - Create a new Image # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_image_with_http_info(type, encoding, async_req=True) - >>> result = thread.get() - - :param type: Image type (required) - :type type: str - :param encoding: How the file is stored (required) - :type encoding: str - :param encapsulated: set to false if the uploaded file is not encapsulated inside an outer zipfile - :type encapsulated: bool - :param name: Image name - :type name: str - :param project: Project ID - :type project: str - :param instance: Instance ID - :type instance: str - :param file: Optionally the actual file - :type file: file - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Image, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'type', - 'encoding', - 'encapsulated', - 'name', - 'project', - 'instance', - 'file' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_create_image" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ('type' not in local_var_params or # noqa: E501 - local_var_params['type'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `type` when calling `v1_create_image`") # noqa: E501 - # verify the required parameter 'encoding' is set - if self.api_client.client_side_validation and ('encoding' not in local_var_params or # noqa: E501 - local_var_params['encoding'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `encoding` when calling `v1_create_image`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - if 'type' in local_var_params: - form_params.append(('type', local_var_params['type'])) # noqa: E501 - if 'encoding' in local_var_params: - form_params.append(('encoding', local_var_params['encoding'])) # noqa: E501 - if 'encapsulated' in local_var_params: - form_params.append(('encapsulated', local_var_params['encapsulated'])) # noqa: E501 - if 'name' in local_var_params: - form_params.append(('name', local_var_params['name'])) # noqa: E501 - if 'project' in local_var_params: - form_params.append(('project', local_var_params['project'])) # noqa: E501 - if 'instance' in local_var_params: - form_params.append(('instance', local_var_params['instance'])) # noqa: E501 - if 'file' in local_var_params: - local_var_files['file'] = local_var_params['file'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['multipart/form-data'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Image", - 201: "Image", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/images', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_create_instance(self, instance_create_options, **kwargs): # noqa: E501 - """Create Instance # noqa: E501 - - Create Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_instance(instance_create_options, async_req=True) - >>> result = thread.get() - - :param instance_create_options: The vm definition to create (required) - :type instance_create_options: InstanceCreateOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InstanceReturn - """ - kwargs['_return_http_data_only'] = True - return self.v1_create_instance_with_http_info(instance_create_options, **kwargs) # noqa: E501 - - def v1_create_instance_with_http_info(self, instance_create_options, **kwargs): # noqa: E501 - """Create Instance # noqa: E501 - - Create Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_instance_with_http_info(instance_create_options, async_req=True) - >>> result = thread.get() - - :param instance_create_options: The vm definition to create (required) - :type instance_create_options: InstanceCreateOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InstanceReturn, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_create_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_create_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_create_options' is set - if self.api_client.client_side_validation and ('instance_create_options' not in local_var_params or # noqa: E501 - local_var_params['instance_create_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_create_options` when calling `v1_create_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'instance_create_options' in local_var_params: - body_params = local_var_params['instance_create_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InstanceReturn", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_create_network_connection(self, create_network_connection_options, **kwargs): # noqa: E501 - """Create a new Network Connection # noqa: E501 - - You must have the domain administrator role to create a network connection. VLAN networks are only supported in bridged networking mode. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_network_connection(create_network_connection_options, async_req=True) - >>> result = thread.get() - - :param create_network_connection_options: Network Connection Options (required) - :type create_network_connection_options: CreateNetworkConnectionOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NetworkConnection - """ - kwargs['_return_http_data_only'] = True - return self.v1_create_network_connection_with_http_info(create_network_connection_options, **kwargs) # noqa: E501 - - def v1_create_network_connection_with_http_info(self, create_network_connection_options, **kwargs): # noqa: E501 - """Create a new Network Connection # noqa: E501 - - You must have the domain administrator role to create a network connection. VLAN networks are only supported in bridged networking mode. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_network_connection_with_http_info(create_network_connection_options, async_req=True) - >>> result = thread.get() - - :param create_network_connection_options: Network Connection Options (required) - :type create_network_connection_options: CreateNetworkConnectionOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NetworkConnection, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'create_network_connection_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_create_network_connection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'create_network_connection_options' is set - if self.api_client.client_side_validation and ('create_network_connection_options' not in local_var_params or # noqa: E501 - local_var_params['create_network_connection_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_network_connection_options` when calling `v1_create_network_connection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_network_connection_options' in local_var_params: - body_params = local_var_params['create_network_connection_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "NetworkConnection", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/network/connections', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_create_project(self, project, **kwargs): # noqa: E501 - """Create a Project # noqa: E501 - - Create a Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_project(project, async_req=True) - >>> result = thread.get() - - :param project: Project (required) - :type project: Project - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Project - """ - kwargs['_return_http_data_only'] = True - return self.v1_create_project_with_http_info(project, **kwargs) # noqa: E501 - - def v1_create_project_with_http_info(self, project, **kwargs): # noqa: E501 - """Create a Project # noqa: E501 - - Create a Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_project_with_http_info(project, async_req=True) - >>> result = thread.get() - - :param project: Project (required) - :type project: Project - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Project, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_create_project" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project' is set - if self.api_client.client_side_validation and ('project' not in local_var_params or # noqa: E501 - local_var_params['project'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project` when calling `v1_create_project`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'project' in local_var_params: - body_params = local_var_params['project'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Project", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_create_snapshot(self, instance_id, snapshot_creation_options, **kwargs): # noqa: E501 - """Create Instance Snapshot # noqa: E501 - - Create Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_snapshot(instance_id, snapshot_creation_options, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_creation_options: (required) - :type snapshot_creation_options: SnapshotCreationOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_create_snapshot_with_http_info(instance_id, snapshot_creation_options, **kwargs) # noqa: E501 - - def v1_create_snapshot_with_http_info(self, instance_id, snapshot_creation_options, **kwargs): # noqa: E501 - """Create Instance Snapshot # noqa: E501 - - Create Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_snapshot_with_http_info(instance_id, snapshot_creation_options, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_creation_options: (required) - :type snapshot_creation_options: SnapshotCreationOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'snapshot_creation_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_create_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_create_snapshot`") # noqa: E501 - # verify the required parameter 'snapshot_creation_options' is set - if self.api_client.client_side_validation and ('snapshot_creation_options' not in local_var_params or # noqa: E501 - local_var_params['snapshot_creation_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_creation_options` when calling `v1_create_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'snapshot_creation_options' in local_var_params: - body_params = local_var_params['snapshot_creation_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/snapshots', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_create_user(self, user_create, **kwargs): # noqa: E501 - """Create User # noqa: E501 - - Create User # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_user(user_create, async_req=True) - >>> result = thread.get() - - :param user_create: User data (required) - :type user_create: UserCreate - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: UserCreateReturn - """ - kwargs['_return_http_data_only'] = True - return self.v1_create_user_with_http_info(user_create, **kwargs) # noqa: E501 - - def v1_create_user_with_http_info(self, user_create, **kwargs): # noqa: E501 - """Create User # noqa: E501 - - Create User # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_create_user_with_http_info(user_create, async_req=True) - >>> result = thread.get() - - :param user_create: User data (required) - :type user_create: UserCreate - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(UserCreateReturn, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'user_create' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_create_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_create' is set - if self.api_client.client_side_validation and ('user_create' not in local_var_params or # noqa: E501 - local_var_params['user_create'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_create` when calling `v1_create_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'user_create' in local_var_params: - body_params = local_var_params['user_create'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "UserCreateReturn", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/users', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_domain_auth_provider(self, domain_id, provider_id, **kwargs): # noqa: E501 - """Delete an auth provider from a domain # noqa: E501 - - Delete an auth provider from a domain # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_domain_auth_provider(domain_id, provider_id, async_req=True) - >>> result = thread.get() - - :param domain_id: Domain ID - uuid (required) - :type domain_id: str - :param provider_id: Provider ID - uuid (required) - :type provider_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_domain_auth_provider_with_http_info(domain_id, provider_id, **kwargs) # noqa: E501 - - def v1_delete_domain_auth_provider_with_http_info(self, domain_id, provider_id, **kwargs): # noqa: E501 - """Delete an auth provider from a domain # noqa: E501 - - Delete an auth provider from a domain # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_domain_auth_provider_with_http_info(domain_id, provider_id, async_req=True) - >>> result = thread.get() - - :param domain_id: Domain ID - uuid (required) - :type domain_id: str - :param provider_id: Provider ID - uuid (required) - :type provider_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'domain_id', - 'provider_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_domain_auth_provider" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'domain_id' is set - if self.api_client.client_side_validation and ('domain_id' not in local_var_params or # noqa: E501 - local_var_params['domain_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `domain_id` when calling `v1_delete_domain_auth_provider`") # noqa: E501 - # verify the required parameter 'provider_id' is set - if self.api_client.client_side_validation and ('provider_id' not in local_var_params or # noqa: E501 - local_var_params['provider_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `provider_id` when calling `v1_delete_domain_auth_provider`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'domain_id' in local_var_params: - path_params['domainId'] = local_var_params['domain_id'] # noqa: E501 - if 'provider_id' in local_var_params: - path_params['providerId'] = local_var_params['provider_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/domain/{domainId}/auth/{providerId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_extension(self, extension_id, **kwargs): # noqa: E501 - """Delete an existing extension # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_extension(extension_id, async_req=True) - >>> result = thread.get() - - :param extension_id: Extension ID (required) - :type extension_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_extension_with_http_info(extension_id, **kwargs) # noqa: E501 - - def v1_delete_extension_with_http_info(self, extension_id, **kwargs): # noqa: E501 - """Delete an existing extension # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_extension_with_http_info(extension_id, async_req=True) - >>> result = thread.get() - - :param extension_id: Extension ID (required) - :type extension_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'extension_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_extension" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'extension_id' is set - if self.api_client.client_side_validation and ('extension_id' not in local_var_params or # noqa: E501 - local_var_params['extension_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `extension_id` when calling `v1_delete_extension`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'extension_id' in local_var_params: - path_params['extensionId'] = local_var_params['extension_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/extensions/{extensionId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_hook(self, hook_id, **kwargs): # noqa: E501 - """Delete an existing hypervisor hook # noqa: E501 - - Delete an existing hypervisor hook # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_hook(hook_id, async_req=True) - >>> result = thread.get() - - :param hook_id: Hook ID (required) - :type hook_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_hook_with_http_info(hook_id, **kwargs) # noqa: E501 - - def v1_delete_hook_with_http_info(self, hook_id, **kwargs): # noqa: E501 - """Delete an existing hypervisor hook # noqa: E501 - - Delete an existing hypervisor hook # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_hook_with_http_info(hook_id, async_req=True) - >>> result = thread.get() - - :param hook_id: Hook ID (required) - :type hook_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'hook_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_hook" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'hook_id' is set - if self.api_client.client_side_validation and ('hook_id' not in local_var_params or # noqa: E501 - local_var_params['hook_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `hook_id` when calling `v1_delete_hook`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'hook_id' in local_var_params: - path_params['hookId'] = local_var_params['hook_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/hooks/{hookId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_image(self, image_id, **kwargs): # noqa: E501 - """Delete Image # noqa: E501 - - Delete Image # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_image(image_id, async_req=True) - >>> result = thread.get() - - :param image_id: Image ID - uuid (required) - :type image_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_image_with_http_info(image_id, **kwargs) # noqa: E501 - - def v1_delete_image_with_http_info(self, image_id, **kwargs): # noqa: E501 - """Delete Image # noqa: E501 - - Delete Image # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_image_with_http_info(image_id, async_req=True) - >>> result = thread.get() - - :param image_id: Image ID - uuid (required) - :type image_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'image_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_image" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'image_id' is set - if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 - local_var_params['image_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `image_id` when calling `v1_delete_image`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'image_id' in local_var_params: - path_params['imageId'] = local_var_params['image_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v2/images/{imageId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_instance(self, instance_id, **kwargs): # noqa: E501 - """Remove Instance # noqa: E501 - - Remove Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_instance(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_instance_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_delete_instance_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Remove Instance # noqa: E501 - - Remove Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_instance_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_delete_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_instance_snapshot(self, instance_id, snapshot_id, **kwargs): # noqa: E501 - """Delete an Instance Snapshot # noqa: E501 - - Delete an Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_instance_snapshot(instance_id, snapshot_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_instance_snapshot_with_http_info(instance_id, snapshot_id, **kwargs) # noqa: E501 - - def v1_delete_instance_snapshot_with_http_info(self, instance_id, snapshot_id, **kwargs): # noqa: E501 - """Delete an Instance Snapshot # noqa: E501 - - Delete an Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_instance_snapshot_with_http_info(instance_id, snapshot_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'snapshot_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_instance_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_delete_instance_snapshot`") # noqa: E501 - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_delete_instance_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/snapshots/{snapshotId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_network_connection(self, id, **kwargs): # noqa: E501 - """Delete an existing Network Connection # noqa: E501 - - You must have the domain administrator role to delete a network connection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_network_connection(id, async_req=True) - >>> result = thread.get() - - :param id: Network Connection Identifier - uuid (required) - :type id: str - :param force: Force deletion (true only or not present) - :type force: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_network_connection_with_http_info(id, **kwargs) # noqa: E501 - - def v1_delete_network_connection_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete an existing Network Connection # noqa: E501 - - You must have the domain administrator role to delete a network connection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_network_connection_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param id: Network Connection Identifier - uuid (required) - :type id: str - :param force: Force deletion (true only or not present) - :type force: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'id', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_network_connection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `v1_delete_network_connection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/network/connections/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_project(self, project_id, **kwargs): # noqa: E501 - """Delete a Project # noqa: E501 - - Delete a Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_project(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_project_with_http_info(project_id, **kwargs) # noqa: E501 - - def v1_delete_project_with_http_info(self, project_id, **kwargs): # noqa: E501 - """Delete a Project # noqa: E501 - - Delete a Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_project_with_http_info(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'project_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_project" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_delete_project`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/projects/{projectId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_snapshot(self, snapshot_id, **kwargs): # noqa: E501 - """Delete a Snapshot # noqa: E501 - - Delete a Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_snapshot(snapshot_id, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_snapshot_with_http_info(snapshot_id, **kwargs) # noqa: E501 - - def v1_delete_snapshot_with_http_info(self, snapshot_id, **kwargs): # noqa: E501 - """Delete a Snapshot # noqa: E501 - - Delete a Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_snapshot_with_http_info(snapshot_id, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'snapshot_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_delete_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/snapshots/{snapshotId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_snapshot_permissions(self, snapshot_id, snapshot_permissions_request_payload, **kwargs): # noqa: E501 - """Delete member(s) # noqa: E501 - - Deletes one or more members from the list of members who have access to the snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param snapshot_permissions_request_payload: (required) - :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_snapshot_permissions_with_http_info(snapshot_id, snapshot_permissions_request_payload, **kwargs) # noqa: E501 - - def v1_delete_snapshot_permissions_with_http_info(self, snapshot_id, snapshot_permissions_request_payload, **kwargs): # noqa: E501 - """Delete member(s) # noqa: E501 - - Deletes one or more members from the list of members who have access to the snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_snapshot_permissions_with_http_info(snapshot_id, snapshot_permissions_request_payload, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param snapshot_permissions_request_payload: (required) - :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'snapshot_id', - 'snapshot_permissions_request_payload' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_snapshot_permissions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_delete_snapshot_permissions`") # noqa: E501 - # verify the required parameter 'snapshot_permissions_request_payload' is set - if self.api_client.client_side_validation and ('snapshot_permissions_request_payload' not in local_var_params or # noqa: E501 - local_var_params['snapshot_permissions_request_payload'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_permissions_request_payload` when calling `v1_delete_snapshot_permissions`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'snapshot_permissions_request_payload' in local_var_params: - body_params = local_var_params['snapshot_permissions_request_payload'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'DELETE', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/snapshots/{snapshotId}/permissions', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_delete_user(self, user_id, **kwargs): # noqa: E501 - """Delete User # noqa: E501 - - Delete User # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_user(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: userId - uuid (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_delete_user_with_http_info(user_id, **kwargs) # noqa: E501 - - def v1_delete_user_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Delete User # noqa: E501 - - Delete User # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_delete_user_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: userId - uuid (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'user_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_delete_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `v1_delete_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userId'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/users/{userId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_detach_instance_interface(self, instance_id, interface_id, detach_interface_request, **kwargs): # noqa: E501 - """Detach I/O Interface # noqa: E501 - - Detach an I/O interface from an I/O interconnect for the specified instance identifier. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_detach_instance_interface(instance_id, interface_id, detach_interface_request, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param interface_id: Interface ID (required) - :type interface_id: str - :param detach_interface_request: Interface detachment request (required) - :type detach_interface_request: DetachInterfaceRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_detach_instance_interface_with_http_info(instance_id, interface_id, detach_interface_request, **kwargs) # noqa: E501 - - def v1_detach_instance_interface_with_http_info(self, instance_id, interface_id, detach_interface_request, **kwargs): # noqa: E501 - """Detach I/O Interface # noqa: E501 - - Detach an I/O interface from an I/O interconnect for the specified instance identifier. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_detach_instance_interface_with_http_info(instance_id, interface_id, detach_interface_request, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param interface_id: Interface ID (required) - :type interface_id: str - :param detach_interface_request: Interface detachment request (required) - :type detach_interface_request: DetachInterfaceRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'interface_id', - 'detach_interface_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_detach_instance_interface" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_detach_instance_interface`") # noqa: E501 - # verify the required parameter 'interface_id' is set - if self.api_client.client_side_validation and ('interface_id' not in local_var_params or # noqa: E501 - local_var_params['interface_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `interface_id` when calling `v1_detach_instance_interface`") # noqa: E501 - # verify the required parameter 'detach_interface_request' is set - if self.api_client.client_side_validation and ('detach_interface_request' not in local_var_params or # noqa: E501 - local_var_params['detach_interface_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `detach_interface_request` when calling `v1_detach_instance_interface`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'interface_id' in local_var_params: - path_params['interfaceId'] = local_var_params['interface_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'detach_interface_request' in local_var_params: - body_params = local_var_params['detach_interface_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'DELETE', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/interfaces/{interfaceId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_disable_expose_port(self, instance_id, **kwargs): # noqa: E501 - """Disable an exposed port on an instance for device access. # noqa: E501 - - Disable an exposed port on an instance for device access. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_disable_expose_port(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_disable_expose_port_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_disable_expose_port_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Disable an exposed port on an instance for device access. # noqa: E501 - - Disable an exposed port on an instance for device access. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_disable_expose_port_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_disable_expose_port" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_disable_expose_port`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/exposeport/disable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_download_activity(self, task_id, **kwargs): # noqa: E501 - """Download activity # noqa: E501 - - Download activity for a given task # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_download_activity(task_id, async_req=True) - >>> result = thread.get() - - :param task_id: Export ID (required) - :type task_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ActivityList - """ - kwargs['_return_http_data_only'] = True - return self.v1_download_activity_with_http_info(task_id, **kwargs) # noqa: E501 - - def v1_download_activity_with_http_info(self, task_id, **kwargs): # noqa: E501 - """Download activity # noqa: E501 - - Download activity for a given task # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_download_activity_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param task_id: Export ID (required) - :type task_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ActivityList, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'task_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_download_activity" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'task_id' is set - if self.api_client.client_side_validation and ('task_id' not in local_var_params or # noqa: E501 - local_var_params['task_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `task_id` when calling `v1_download_activity`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskId'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "ActivityList", - 400: "UserError", - 403: "ApiError", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/activity/export/{taskId}/download', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_enable_expose_port(self, instance_id, **kwargs): # noqa: E501 - """Enable an exposed port on an instance for device access. # noqa: E501 - - Enable an exposed port on an instance for device access. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_enable_expose_port(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_enable_expose_port_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_enable_expose_port_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Enable an exposed port on an instance for device access. # noqa: E501 - - Enable an exposed port on an instance for device access. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_enable_expose_port_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_enable_expose_port" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_enable_expose_port`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/exposeport/enable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_execute_hyper_trace_hooks(self, instance_id, **kwargs): # noqa: E501 - """Execute Hooks on an instance # noqa: E501 - - Execute Hooks on an instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_execute_hyper_trace_hooks(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_execute_hyper_trace_hooks_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_execute_hyper_trace_hooks_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Execute Hooks on an instance # noqa: E501 - - Execute Hooks on an instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_execute_hyper_trace_hooks_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_execute_hyper_trace_hooks" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_execute_hyper_trace_hooks`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/hooks/execute', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_activity_export_status(self, task_id, **kwargs): # noqa: E501 - """Get export task status # noqa: E501 - - Get export task status # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_activity_export_status(task_id, async_req=True) - >>> result = thread.get() - - :param task_id: Export ID (required) - :type task_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ActivityList - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_activity_export_status_with_http_info(task_id, **kwargs) # noqa: E501 - - def v1_get_activity_export_status_with_http_info(self, task_id, **kwargs): # noqa: E501 - """Get export task status # noqa: E501 - - Get export task status # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_activity_export_status_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param task_id: Export ID (required) - :type task_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ActivityList, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'task_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_activity_export_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'task_id' is set - if self.api_client.client_side_validation and ('task_id' not in local_var_params or # noqa: E501 - local_var_params['task_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `task_id` when calling `v1_get_activity_export_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskId'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "ActivityList", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/activity/export/{taskId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_activity_export_tasks(self, **kwargs): # noqa: E501 - """Get all export tasks for user # noqa: E501 - - Get all export tasks for user # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_activity_export_tasks(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ActivityList - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_activity_export_tasks_with_http_info(**kwargs) # noqa: E501 - - def v1_get_activity_export_tasks_with_http_info(self, **kwargs): # noqa: E501 - """Get all export tasks for user # noqa: E501 - - Get all export tasks for user # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_activity_export_tasks_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ActivityList, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_activity_export_tasks" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "ActivityList", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/activity/export', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_config(self, **kwargs): # noqa: E501 - """Get all configs # noqa: E501 - - Get all configs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_config(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ConfigResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_config_with_http_info(**kwargs) # noqa: E501 - - def v1_get_config_with_http_info(self, **kwargs): # noqa: E501 - """Get all configs # noqa: E501 - - Get all configs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_config_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ConfigResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_config" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = { - 200: "ConfigResponse", - } - - return self.api_client.call_api( - '/v1/config', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_domain_auth_providers(self, domain_id, **kwargs): # noqa: E501 - """Return all configured auth providers for a domain (including globally configured providers) # noqa: E501 - - Return all configured auth providers for a domain (including globally configured providers) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_domain_auth_providers(domain_id, async_req=True) - >>> result = thread.get() - - :param domain_id: Domain ID - uuid (required) - :type domain_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[DomainAuthProviderResponse] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_domain_auth_providers_with_http_info(domain_id, **kwargs) # noqa: E501 - - def v1_get_domain_auth_providers_with_http_info(self, domain_id, **kwargs): # noqa: E501 - """Return all configured auth providers for a domain (including globally configured providers) # noqa: E501 - - Return all configured auth providers for a domain (including globally configured providers) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_domain_auth_providers_with_http_info(domain_id, async_req=True) - >>> result = thread.get() - - :param domain_id: Domain ID - uuid (required) - :type domain_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[DomainAuthProviderResponse], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'domain_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_domain_auth_providers" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'domain_id' is set - if self.api_client.client_side_validation and ('domain_id' not in local_var_params or # noqa: E501 - local_var_params['domain_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `domain_id` when calling `v1_get_domain_auth_providers`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'domain_id' in local_var_params: - path_params['domainId'] = local_var_params['domain_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[DomainAuthProviderResponse]", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/domain/{domainId}/auth', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_extension_by_id(self, extension_id, **kwargs): # noqa: E501 - """Get extension by id # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_extension_by_id(extension_id, async_req=True) - >>> result = thread.get() - - :param extension_id: Extension Id (required) - :type extension_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Extension - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_extension_by_id_with_http_info(extension_id, **kwargs) # noqa: E501 - - def v1_get_extension_by_id_with_http_info(self, extension_id, **kwargs): # noqa: E501 - """Get extension by id # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_extension_by_id_with_http_info(extension_id, async_req=True) - >>> result = thread.get() - - :param extension_id: Extension Id (required) - :type extension_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Extension, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'extension_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_extension_by_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'extension_id' is set - if self.api_client.client_side_validation and ('extension_id' not in local_var_params or # noqa: E501 - local_var_params['extension_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `extension_id` when calling `v1_get_extension_by_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'extension_id' in local_var_params: - path_params['extensionId'] = local_var_params['extension_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Extension", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/extensions/{extensionId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_extensions(self, **kwargs): # noqa: E501 - """Get all extensions # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_extensions(async_req=True) - >>> result = thread.get() - - :param limit: limit for pagination results, defaults to 20 - :type limit: float - :param offset: offset for pagination results, defaults to 0 - :type offset: float - :param if_none_match: sha256sum of the last response with the same parameters (optional) - :type if_none_match: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Extension] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_extensions_with_http_info(**kwargs) # noqa: E501 - - def v1_get_extensions_with_http_info(self, **kwargs): # noqa: E501 - """Get all extensions # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_extensions_with_http_info(async_req=True) - >>> result = thread.get() - - :param limit: limit for pagination results, defaults to 20 - :type limit: float - :param offset: offset for pagination results, defaults to 0 - :type offset: float - :param if_none_match: sha256sum of the last response with the same parameters (optional) - :type if_none_match: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Extension], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset', - 'if_none_match' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_extensions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - if 'if_none_match' in local_var_params: - header_params['if-none-match'] = local_var_params['if_none_match'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Extension]", - 304: None, - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/extensions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_hook_by_id(self, hook_id, **kwargs): # noqa: E501 - """Get hypervisor hook by id # noqa: E501 - - Get hypervisor hook by id # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_hook_by_id(hook_id, async_req=True) - >>> result = thread.get() - - :param hook_id: Hook Id (required) - :type hook_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Hook - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_hook_by_id_with_http_info(hook_id, **kwargs) # noqa: E501 - - def v1_get_hook_by_id_with_http_info(self, hook_id, **kwargs): # noqa: E501 - """Get hypervisor hook by id # noqa: E501 - - Get hypervisor hook by id # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_hook_by_id_with_http_info(hook_id, async_req=True) - >>> result = thread.get() - - :param hook_id: Hook Id (required) - :type hook_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Hook, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'hook_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_hook_by_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'hook_id' is set - if self.api_client.client_side_validation and ('hook_id' not in local_var_params or # noqa: E501 - local_var_params['hook_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `hook_id` when calling `v1_get_hook_by_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'hook_id' in local_var_params: - path_params['hookId'] = local_var_params['hook_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Hook", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/hooks/{hookId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_hooks(self, instance_id, **kwargs): # noqa: E501 - """Get all hypervisor hooks for Instance # noqa: E501 - - Get all hypervisor hooks for Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_hooks(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param limit: limit for pagination results, defaults to 20 - :type limit: float - :param offset: offset for pagination results, defaults to 0 - :type offset: float - :param sort: sort ASC or DESC, defaults to DESC - :type sort: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Hook] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_hooks_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_get_hooks_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get all hypervisor hooks for Instance # noqa: E501 - - Get all hypervisor hooks for Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_hooks_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param limit: limit for pagination results, defaults to 20 - :type limit: float - :param offset: offset for pagination results, defaults to 0 - :type offset: float - :param sort: sort ASC or DESC, defaults to DESC - :type sort: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Hook], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'limit', - 'offset', - 'sort' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_hooks" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_hooks`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 - query_params.append(('sort', local_var_params['sort'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Hook]", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/hooks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_image(self, image_id, **kwargs): # noqa: E501 - """Get Image Metadata # noqa: E501 - - Get Image Metadata # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_image(image_id, async_req=True) - >>> result = thread.get() - - :param image_id: Image ID - uuid (required) - :type image_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Image - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_image_with_http_info(image_id, **kwargs) # noqa: E501 - - def v1_get_image_with_http_info(self, image_id, **kwargs): # noqa: E501 - """Get Image Metadata # noqa: E501 - - Get Image Metadata # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_image_with_http_info(image_id, async_req=True) - >>> result = thread.get() - - :param image_id: Image ID - uuid (required) - :type image_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Image, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'image_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_image" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'image_id' is set - if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 - local_var_params['image_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `image_id` when calling `v1_get_image`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'image_id' in local_var_params: - path_params['imageId'] = local_var_params['image_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Image", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/images/{imageId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_images(self, **kwargs): # noqa: E501 - """Get all Images Metadata # noqa: E501 - - Get all Images Metadata # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_images(async_req=True) - >>> result = thread.get() - - :param project: Optionally filter by project - uuid - :type project: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Image] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_images_with_http_info(**kwargs) # noqa: E501 - - def v1_get_images_with_http_info(self, **kwargs): # noqa: E501 - """Get all Images Metadata # noqa: E501 - - Get all Images Metadata # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_images_with_http_info(async_req=True) - >>> result = thread.get() - - :param project: Optionally filter by project - uuid - :type project: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Image], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_images" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'project' in local_var_params and local_var_params['project'] is not None: # noqa: E501 - query_params.append(('project', local_var_params['project'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Image]", - } - - return self.api_client.call_api( - '/v1/images', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_install_firmware_status(self, task_id, **kwargs): # noqa: E501 - """Query install firmware request status. # noqa: E501 - - Returns the status of an install firmware request. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_install_firmware_status(task_id, async_req=True) - >>> result = thread.get() - - :param task_id: Task ID - uuid (required) - :type task_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InstallFirmwareResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_install_firmware_status_with_http_info(task_id, **kwargs) # noqa: E501 - - def v1_get_install_firmware_status_with_http_info(self, task_id, **kwargs): # noqa: E501 - """Query install firmware request status. # noqa: E501 - - Returns the status of an install firmware request. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_install_firmware_status_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param task_id: Task ID - uuid (required) - :type task_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InstallFirmwareResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'task_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_install_firmware_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'task_id' is set - if self.api_client.client_side_validation and ('task_id' not in local_var_params or # noqa: E501 - local_var_params['task_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `task_id` when calling `v1_get_install_firmware_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskId'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InstallFirmwareResponse", - 400: "UserError", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/images/install-firmware/:taskId', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance(self, instance_id, **kwargs): # noqa: E501 - """Get Instance # noqa: E501 - - Get Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID (required) - :type instance_id: str - :param return_attr: Attributes to include in instance return - :type return_attr: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Instance - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_get_instance_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get Instance # noqa: E501 - - Get Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID (required) - :type instance_id: str - :param return_attr: Attributes to include in instance return - :type return_attr: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Instance, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'return_attr' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - if 'return_attr' in local_var_params and local_var_params['return_attr'] is not None: # noqa: E501 - query_params.append(('returnAttr', local_var_params['return_attr'])) # noqa: E501 - collection_formats['returnAttr'] = 'csv' # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Instance", - 403: "ApiError", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance_console(self, instance_id, **kwargs): # noqa: E501 - """Get console websocket URL # noqa: E501 - - Get console websocket URL # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_console(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InstanceConsoleEndpoint - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_console_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_get_instance_console_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get console websocket URL # noqa: E501 - - Get console websocket URL # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_console_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InstanceConsoleEndpoint, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance_console" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance_console`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InstanceConsoleEndpoint", - 403: "ApiError", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/console', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance_console_log(self, instance_id, **kwargs): # noqa: E501 - """Get Console Log # noqa: E501 - - Get Console Log # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_console_log(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: str - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_console_log_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_get_instance_console_log_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get Console Log # noqa: E501 - - Get Console Log # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_console_log_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance_console_log" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance_console_log`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/plain', 'application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "str", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/consoleLog', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance_gpios(self, instance_id, **kwargs): # noqa: E501 - """Get Instance GPIOs # noqa: E501 - - Get Instance GPIOs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_gpios(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GpiosState - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_gpios_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_get_instance_gpios_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get Instance GPIOs # noqa: E501 - - Get Instance GPIOs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_gpios_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GpiosState, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance_gpios" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance_gpios`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "GpiosState", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/gpios', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance_panics(self, instance_id, **kwargs): # noqa: E501 - """Get Panics # noqa: E501 - - Get Panics # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_panics(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[object] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_panics_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_get_instance_panics_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get Panics # noqa: E501 - - Get Panics # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_panics_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[object], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance_panics" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance_panics`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[object]", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/panics', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance_peripherals(self, instance_id, **kwargs): # noqa: E501 - """Get Instance Peripherals # noqa: E501 - - Get Instance Peripherals # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_peripherals(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: PeripheralsData - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_peripherals_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_get_instance_peripherals_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get Instance Peripherals # noqa: E501 - - Get Instance Peripherals # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_peripherals_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(PeripheralsData, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance_peripherals" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance_peripherals`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "PeripheralsData", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/peripherals', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance_screenshot(self, instance_id, format, **kwargs): # noqa: E501 - """Get Instance Screenshot # noqa: E501 - - Get Instance Screenshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_screenshot(instance_id, format, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param format: New peripherals state (required) - :type format: str - :param scale: Screenshot scale 1:N - :type scale: float - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: file - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_screenshot_with_http_info(instance_id, format, **kwargs) # noqa: E501 - - def v1_get_instance_screenshot_with_http_info(self, instance_id, format, **kwargs): # noqa: E501 - """Get Instance Screenshot # noqa: E501 - - Get Instance Screenshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_screenshot_with_http_info(instance_id, format, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param format: New peripherals state (required) - :type format: str - :param scale: Screenshot scale 1:N - :type scale: float - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(file, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'format', - 'scale' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance_screenshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance_screenshot`") # noqa: E501 - # verify the required parameter 'format' is set - if self.api_client.client_side_validation and ('format' not in local_var_params or # noqa: E501 - local_var_params['format'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `format` when calling `v1_get_instance_screenshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'format' in local_var_params: - path_params['format'] = local_var_params['format'] # noqa: E501 - - query_params = [] - if 'scale' in local_var_params and local_var_params['scale'] is not None: # noqa: E501 - query_params.append(('scale', local_var_params['scale'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['image/png', 'image/jpeg', 'application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "file", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/screenshot.{format}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance_snapshot(self, instance_id, snapshot_id, **kwargs): # noqa: E501 - """Get Instance Snapshot # noqa: E501 - - Get Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_snapshot(instance_id, snapshot_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_snapshot_with_http_info(instance_id, snapshot_id, **kwargs) # noqa: E501 - - def v1_get_instance_snapshot_with_http_info(self, instance_id, snapshot_id, **kwargs): # noqa: E501 - """Get Instance Snapshot # noqa: E501 - - Get Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_snapshot_with_http_info(instance_id, snapshot_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'snapshot_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance_snapshot`") # noqa: E501 - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_get_instance_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/snapshots/{snapshotId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instance_snapshots(self, instance_id, **kwargs): # noqa: E501 - """Get Instance Snapshots # noqa: E501 - - Get Instance Snapshots # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_snapshots(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Snapshot] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instance_snapshots_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_get_instance_snapshots_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get Instance Snapshots # noqa: E501 - - Get Instance Snapshots # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instance_snapshots_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Snapshot], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instance_snapshots" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_get_instance_snapshots`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Snapshot]", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/snapshots', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_instances(self, **kwargs): # noqa: E501 - """Get Instances # noqa: E501 - - Get Instances # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instances(async_req=True) - >>> result = thread.get() - - :param name: Optionally filter by instance name - :type name: str - :param return_attr: Attributes to include in instance return - :type return_attr: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Instance] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_instances_with_http_info(**kwargs) # noqa: E501 - - def v1_get_instances_with_http_info(self, **kwargs): # noqa: E501 - """Get Instances # noqa: E501 - - Get Instances # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_instances_with_http_info(async_req=True) - >>> result = thread.get() - - :param name: Optionally filter by instance name - :type name: str - :param return_attr: Attributes to include in instance return - :type return_attr: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Instance], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'return_attr' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_instances" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 - query_params.append(('name', local_var_params['name'])) # noqa: E501 - if 'return_attr' in local_var_params and local_var_params['return_attr'] is not None: # noqa: E501 - query_params.append(('returnAttr', local_var_params['return_attr'])) # noqa: E501 - collection_formats['returnAttr'] = 'csv' # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Instance]", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_model_software(self, model, **kwargs): # noqa: E501 - """Get Software for Model # noqa: E501 - - Get Software for Model # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_model_software(model, async_req=True) - >>> result = thread.get() - - :param model: Model to list available software for (required) - :type model: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Firmware] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_model_software_with_http_info(model, **kwargs) # noqa: E501 - - def v1_get_model_software_with_http_info(self, model, **kwargs): # noqa: E501 - """Get Software for Model # noqa: E501 - - Get Software for Model # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_model_software_with_http_info(model, async_req=True) - >>> result = thread.get() - - :param model: Model to list available software for (required) - :type model: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Firmware], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'model' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_model_software" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'model' is set - if self.api_client.client_side_validation and ('model' not in local_var_params or # noqa: E501 - local_var_params['model'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `model` when calling `v1_get_model_software`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'model' in local_var_params: - path_params['model'] = local_var_params['model'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Firmware]", - } - - return self.api_client.call_api( - '/v1/models/{model}/software', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_models(self, **kwargs): # noqa: E501 - """Get Supported Models # noqa: E501 - - Get Supported Models # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_models(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Model] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_models_with_http_info(**kwargs) # noqa: E501 - - def v1_get_models_with_http_info(self, **kwargs): # noqa: E501 - """Get Supported Models # noqa: E501 - - Get Supported Models # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_models_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Model], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_models" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Model]", - } - - return self.api_client.call_api( - '/v1/models', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_network_connection(self, id, **kwargs): # noqa: E501 - """Return the configuration and per project statuses for a single network provider. # noqa: E501 - - You must have the domain administrator or project administrator role to fetch a network connection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_network_connection(id, async_req=True) - >>> result = thread.get() - - :param id: Network Connection Identifier - uuid (required) - :type id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NetworkConnection - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_network_connection_with_http_info(id, **kwargs) # noqa: E501 - - def v1_get_network_connection_with_http_info(self, id, **kwargs): # noqa: E501 - """Return the configuration and per project statuses for a single network provider. # noqa: E501 - - You must have the domain administrator or project administrator role to fetch a network connection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_network_connection_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param id: Network Connection Identifier - uuid (required) - :type id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NetworkConnection, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_network_connection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `v1_get_network_connection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "NetworkConnection", - 403: "ApiError", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/network/connections/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_project(self, project_id, **kwargs): # noqa: E501 - """Get a Project # noqa: E501 - - Get a Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Project - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_project_with_http_info(project_id, **kwargs) # noqa: E501 - - def v1_get_project_with_http_info(self, project_id, **kwargs): # noqa: E501 - """Get a Project # noqa: E501 - - Get a Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_with_http_info(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Project, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_project" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_get_project`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Project", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects/{projectId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_project_instances(self, project_id, **kwargs): # noqa: E501 - """Get Instances in Project # noqa: E501 - - Get Instances in Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_instances(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param name: Filter by project name - :type name: str - :param return_attr: Attributes to include in instance return - :type return_attr: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Instance] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_project_instances_with_http_info(project_id, **kwargs) # noqa: E501 - - def v1_get_project_instances_with_http_info(self, project_id, **kwargs): # noqa: E501 - """Get Instances in Project # noqa: E501 - - Get Instances in Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_instances_with_http_info(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param name: Filter by project name - :type name: str - :param return_attr: Attributes to include in instance return - :type return_attr: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Instance], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'name', - 'return_attr' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_project_instances" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_get_project_instances`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 - query_params.append(('name', local_var_params['name'])) # noqa: E501 - if 'return_attr' in local_var_params and local_var_params['return_attr'] is not None: # noqa: E501 - query_params.append(('returnAttr', local_var_params['return_attr'])) # noqa: E501 - collection_formats['returnAttr'] = 'csv' # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Instance]", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects/{projectId}/instances', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_project_keys(self, project_id, **kwargs): # noqa: E501 - """Get Project Authorized Keys # noqa: E501 - - Get Project Authorized Keys # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_keys(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[ProjectKey] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_project_keys_with_http_info(project_id, **kwargs) # noqa: E501 - - def v1_get_project_keys_with_http_info(self, project_id, **kwargs): # noqa: E501 - """Get Project Authorized Keys # noqa: E501 - - Get Project Authorized Keys # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_keys_with_http_info(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[ProjectKey], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_project_keys" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_get_project_keys`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[ProjectKey]", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects/{projectId}/keys', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_project_network_log(self, project_id, **kwargs): # noqa: E501 - """Retrieve the network connection log for a project # noqa: E501 - - Retrieve the network connection log for a project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_network_log(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID (must be a valid UUID) (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: str - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_project_network_log_with_http_info(project_id, **kwargs) # noqa: E501 - - def v1_get_project_network_log_with_http_info(self, project_id, **kwargs): # noqa: E501 - """Retrieve the network connection log for a project # noqa: E501 - - Retrieve the network connection log for a project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_network_log_with_http_info(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID (must be a valid UUID) (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_project_network_log" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_get_project_network_log`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "str", - 400: "ApiError", - 403: "ApiError", - 503: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects/{projectId}/network/log', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_project_network_status(self, project_id, **kwargs): # noqa: E501 - """Retrieve the network connection status for a project # noqa: E501 - - Retrieve the network connection status for a project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_network_status(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NetworkStatusResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_project_network_status_with_http_info(project_id, **kwargs) # noqa: E501 - - def v1_get_project_network_status_with_http_info(self, project_id, **kwargs): # noqa: E501 - """Retrieve the network connection status for a project # noqa: E501 - - Retrieve the network connection status for a project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_network_status_with_http_info(project_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NetworkStatusResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_project_network_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_get_project_network_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "NetworkStatusResponse", - 400: "ApiError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects/{projectId}/network/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_project_vpn_config(self, project_id, format, **kwargs): # noqa: E501 - """Get Project VPN Configuration # noqa: E501 - - A Project VPN allows connection _into_ virtual devices in the project (e.g., connecting a researcher's computer as a VPN client to a virtual device within the project). If a Project VPN has been defined, this will return the configuration. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_vpn_config(project_id, format, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param format: VPN Config format (required) - :type format: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: str - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_project_vpn_config_with_http_info(project_id, format, **kwargs) # noqa: E501 - - def v1_get_project_vpn_config_with_http_info(self, project_id, format, **kwargs): # noqa: E501 - """Get Project VPN Configuration # noqa: E501 - - A Project VPN allows connection _into_ virtual devices in the project (e.g., connecting a researcher's computer as a VPN client to a virtual device within the project). If a Project VPN has been defined, this will return the configuration. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_project_vpn_config_with_http_info(project_id, format, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param format: VPN Config format (required) - :type format: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'format' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_project_vpn_config" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_get_project_vpn_config`") # noqa: E501 - # verify the required parameter 'format' is set - if self.api_client.client_side_validation and ('format' not in local_var_params or # noqa: E501 - local_var_params['format'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `format` when calling `v1_get_project_vpn_config`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - if 'format' in local_var_params: - path_params['format'] = local_var_params['format'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "str", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects/{projectId}/vpnconfig/{format}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_projects(self, **kwargs): # noqa: E501 - """Get Projects # noqa: E501 - - Get Projects # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_projects(async_req=True) - >>> result = thread.get() - - :param name: Filter by project name - :type name: str - :param ids_only: Only include id of project in results - :type ids_only: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Project] - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_projects_with_http_info(**kwargs) # noqa: E501 - - def v1_get_projects_with_http_info(self, **kwargs): # noqa: E501 - """Get Projects # noqa: E501 - - Get Projects # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_projects_with_http_info(async_req=True) - >>> result = thread.get() - - :param name: Filter by project name - :type name: str - :param ids_only: Only include id of project in results - :type ids_only: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Project], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'ids_only' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_projects" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 - query_params.append(('name', local_var_params['name'])) # noqa: E501 - if 'ids_only' in local_var_params and local_var_params['ids_only'] is not None: # noqa: E501 - query_params.append(('ids_only', local_var_params['ids_only'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Project]", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/projects', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_reset_link_info(self, token, **kwargs): # noqa: E501 - """Send Password Reset Link Info # noqa: E501 - - Send Password Reset Link Info # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_reset_link_info(token, async_req=True) - >>> result = thread.get() - - :param token: Reset token (required) - :type token: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ResetLinkInfoReturn - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_reset_link_info_with_http_info(token, **kwargs) # noqa: E501 - - def v1_get_reset_link_info_with_http_info(self, token, **kwargs): # noqa: E501 - """Send Password Reset Link Info # noqa: E501 - - Send Password Reset Link Info # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_reset_link_info_with_http_info(token, async_req=True) - >>> result = thread.get() - - :param token: Reset token (required) - :type token: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ResetLinkInfoReturn, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'token' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_reset_link_info" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'token' is set - if self.api_client.client_side_validation and ('token' not in local_var_params or # noqa: E501 - local_var_params['token'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `token` when calling `v1_get_reset_link_info`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'token' in local_var_params and local_var_params['token'] is not None: # noqa: E501 - query_params.append(('token', local_var_params['token'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = { - 200: "ResetLinkInfoReturn", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/users/reset-link-info', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_shared_snapshots(self, **kwargs): # noqa: E501 - """Fetch shared snapshots # noqa: E501 - - Fetch snapshots shared with and shared by the requesting user # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_shared_snapshots(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: UserSnapshots - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_shared_snapshots_with_http_info(**kwargs) # noqa: E501 - - def v1_get_shared_snapshots_with_http_info(self, **kwargs): # noqa: E501 - """Fetch shared snapshots # noqa: E501 - - Fetch snapshots shared with and shared by the requesting user # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_shared_snapshots_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(UserSnapshots, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_shared_snapshots" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "UserSnapshots", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/snapshots/shared', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_get_snapshot(self, snapshot_id, **kwargs): # noqa: E501 - """Get Snapshot # noqa: E501 - - Get Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_snapshot(snapshot_id, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_get_snapshot_with_http_info(snapshot_id, **kwargs) # noqa: E501 - - def v1_get_snapshot_with_http_info(self, snapshot_id, **kwargs): # noqa: E501 - """Get Snapshot # noqa: E501 - - Get Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_get_snapshot_with_http_info(snapshot_id, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'snapshot_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_get_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_get_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/snapshots/{snapshotId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_install_firmware(self, install_firmware_request, **kwargs): # noqa: E501 - """Installs a firmware for cluster-wide use # noqa: E501 - - Takes an uploaded firmware image and installs it for cluster-wide use. The firmware is then removed from Images. In order to install a firmware, you need to follow a 4-step process. First, POST /v1/images/ with { name: string, type: 'fw' } using content-type application/json to acquire an imageId. Second, upload the firmware file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/cluster/firmware-service/firmware with { imageId: string; filename: string } using content-type application/json to acquire a taskId. The 'filename' must be an exact match for the filename in the firmware service that you're uploading this image for. Fourth, you can poll the state of the installation via GET /v1/images/install-firmware/:taskId. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_install_firmware(install_firmware_request, async_req=True) - >>> result = thread.get() - - :param install_firmware_request: User data (required) - :type install_firmware_request: InstallFirmwareRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InstallFirmwareResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_install_firmware_with_http_info(install_firmware_request, **kwargs) # noqa: E501 - - def v1_install_firmware_with_http_info(self, install_firmware_request, **kwargs): # noqa: E501 - """Installs a firmware for cluster-wide use # noqa: E501 - - Takes an uploaded firmware image and installs it for cluster-wide use. The firmware is then removed from Images. In order to install a firmware, you need to follow a 4-step process. First, POST /v1/images/ with { name: string, type: 'fw' } using content-type application/json to acquire an imageId. Second, upload the firmware file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/cluster/firmware-service/firmware with { imageId: string; filename: string } using content-type application/json to acquire a taskId. The 'filename' must be an exact match for the filename in the firmware service that you're uploading this image for. Fourth, you can poll the state of the installation via GET /v1/images/install-firmware/:taskId. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_install_firmware_with_http_info(install_firmware_request, async_req=True) - >>> result = thread.get() - - :param install_firmware_request: User data (required) - :type install_firmware_request: InstallFirmwareRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InstallFirmwareResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'install_firmware_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_install_firmware" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'install_firmware_request' is set - if self.api_client.client_side_validation and ('install_firmware_request' not in local_var_params or # noqa: E501 - local_var_params['install_firmware_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `install_firmware_request` when calling `v1_install_firmware`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'install_firmware_request' in local_var_params: - body_params = local_var_params['install_firmware_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 201: "InstallFirmwareResponse", - 400: "UserError", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/images/install-firmware', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_instances_instance_id_message_post(self, instance_id, body, **kwargs): # noqa: E501 - """Inject a message into an iOS VM # noqa: E501 - - Given a message and source phone number, place this message as an incoming SMS message on the iOS VM. For advanced usage, a raw message of bytes may be sent. In this case, the parameter should provide hex encoded bytes (0x00 0x11 0x22 0x33 in the example below) which are sent verbatim. The user must ensure that the body is the correct format for the underlying device stack. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_instances_instance_id_message_post(instance_id, body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param body: Message data (required) - :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_instances_instance_id_message_post_with_http_info(instance_id, body, **kwargs) # noqa: E501 - - def v1_instances_instance_id_message_post_with_http_info(self, instance_id, body, **kwargs): # noqa: E501 - """Inject a message into an iOS VM # noqa: E501 - - Given a message and source phone number, place this message as an incoming SMS message on the iOS VM. For advanced usage, a raw message of bytes may be sent. In this case, the parameter should provide hex encoded bytes (0x00 0x11 0x22 0x33 in the example below) which are sent verbatim. The user must ensure that the body is the correct format for the underlying device stack. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_instances_instance_id_message_post_with_http_info(instance_id, body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param body: Message data (required) - :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_instances_instance_id_message_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_instances_instance_id_message_post`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `v1_instances_instance_id_message_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/message', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_instances_instance_id_netdump_pcap_get(self, instance_id, **kwargs): # noqa: E501 - """Download a netdump pcap file # noqa: E501 - - Download a netdump pcap file # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_instances_instance_id_netdump_pcap_get(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: file - """ - kwargs['_return_http_data_only'] = True - return self.v1_instances_instance_id_netdump_pcap_get_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_instances_instance_id_netdump_pcap_get_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Download a netdump pcap file # noqa: E501 - - Download a netdump pcap file # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_instances_instance_id_netdump_pcap_get_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(file, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_instances_instance_id_netdump_pcap_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_instances_instance_id_netdump_pcap_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/vnd.tcpdump.pcap', 'application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "file", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/netdump.pcap', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_instances_instance_id_network_monitor_pcap_get(self, instance_id, **kwargs): # noqa: E501 - """Download a Network Monitor pcap file # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_instances_instance_id_network_monitor_pcap_get(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: file - """ - kwargs['_return_http_data_only'] = True - return self.v1_instances_instance_id_network_monitor_pcap_get_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_instances_instance_id_network_monitor_pcap_get_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Download a Network Monitor pcap file # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_instances_instance_id_network_monitor_pcap_get_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(file, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_instances_instance_id_network_monitor_pcap_get" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_instances_instance_id_network_monitor_pcap_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/vnd.tcpdump.pcap', 'application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "file", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/networkMonitor.pcap', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_kcrange(self, instance_id, **kwargs): # noqa: E501 - """Get Kernel extension ranges # noqa: E501 - - Get Kernel extension ranges # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_kcrange(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Kcrange] - """ - kwargs['_return_http_data_only'] = True - return self.v1_kcrange_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_kcrange_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get Kernel extension ranges # noqa: E501 - - Get Kernel extension ranges # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_kcrange_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Kcrange], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_kcrange" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_kcrange`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Kcrange]", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/btrace-kcrange', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_list_network_connections(self, **kwargs): # noqa: E501 - """List available network connections # noqa: E501 - - You must have the domain administrator or project administrator role to list network connections. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_list_network_connections(async_req=True) - >>> result = thread.get() - - :param limit: The maximum number of items to return. - :type limit: float - :param offset: The starting index of the items to return. - :type offset: float - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NetworkConnectionOffsetPaginationResult - """ - kwargs['_return_http_data_only'] = True - return self.v1_list_network_connections_with_http_info(**kwargs) # noqa: E501 - - def v1_list_network_connections_with_http_info(self, **kwargs): # noqa: E501 - """List available network connections # noqa: E501 - - You must have the domain administrator or project administrator role to list network connections. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_list_network_connections_with_http_info(async_req=True) - >>> result = thread.get() - - :param limit: The maximum number of items to return. - :type limit: float - :param offset: The starting index of the items to return. - :type offset: float - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NetworkConnectionOffsetPaginationResult, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'limit', - 'offset' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_list_network_connections" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501 - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "NetworkConnectionOffsetPaginationResult", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/network/connections', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_list_network_interfaces(self, **kwargs): # noqa: E501 - """List available physical network interfaces # noqa: E501 - - Lists available physical network interfaces that can be used for VLAN configuration. You must have the domain administrator role to list network interfaces. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_list_network_interfaces(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[str] - """ - kwargs['_return_http_data_only'] = True - return self.v1_list_network_interfaces_with_http_info(**kwargs) # noqa: E501 - - def v1_list_network_interfaces_with_http_info(self, **kwargs): # noqa: E501 - """List available physical network interfaces # noqa: E501 - - Lists available physical network interfaces that can be used for VLAN configuration. You must have the domain administrator role to list network interfaces. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_list_network_interfaces_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_list_network_interfaces" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[str]", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/network/interfaces', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_list_network_providers(self, **kwargs): # noqa: E501 - """List available network providers # noqa: E501 - - Provides a list of registered network providers to be used when [creating network connections](#post-/v1/network/connections). You must have the domain administrator role to list network providers. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_list_network_providers(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NetworkConnectionProviderOffsetPaginationResult - """ - kwargs['_return_http_data_only'] = True - return self.v1_list_network_providers_with_http_info(**kwargs) # noqa: E501 - - def v1_list_network_providers_with_http_info(self, **kwargs): # noqa: E501 - """List available network providers # noqa: E501 - - Provides a list of registered network providers to be used when [creating network connections](#post-/v1/network/connections). You must have the domain administrator role to list network providers. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_list_network_providers_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NetworkConnectionProviderOffsetPaginationResult, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_list_network_providers" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "NetworkConnectionProviderOffsetPaginationResult", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/network/providers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_list_threads(self, instance_id, **kwargs): # noqa: E501 - """Get Running Threads (CoreTrace) # noqa: E501 - - Get Running Threads (CoreTrace) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_list_threads(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[KernelTask] - """ - kwargs['_return_http_data_only'] = True - return self.v1_list_threads_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_list_threads_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get Running Threads (CoreTrace) # noqa: E501 - - Get Running Threads (CoreTrace) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_list_threads_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[KernelTask], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_list_threads" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_list_threads`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[KernelTask]", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/strace/thread-list', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_load_extension(self, v1_load_extension_parameters, **kwargs): # noqa: E501 - """Load an extension # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_load_extension(v1_load_extension_parameters, async_req=True) - >>> result = thread.get() - - :param v1_load_extension_parameters: application/json (required) - :type v1_load_extension_parameters: V1LoadExtensionParameters - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Extension - """ - kwargs['_return_http_data_only'] = True - return self.v1_load_extension_with_http_info(v1_load_extension_parameters, **kwargs) # noqa: E501 - - def v1_load_extension_with_http_info(self, v1_load_extension_parameters, **kwargs): # noqa: E501 - """Load an extension # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_load_extension_with_http_info(v1_load_extension_parameters, async_req=True) - >>> result = thread.get() - - :param v1_load_extension_parameters: application/json (required) - :type v1_load_extension_parameters: V1LoadExtensionParameters - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Extension, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'v1_load_extension_parameters' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_load_extension" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'v1_load_extension_parameters' is set - if self.api_client.client_side_validation and ('v1_load_extension_parameters' not in local_var_params or # noqa: E501 - local_var_params['v1_load_extension_parameters'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `v1_load_extension_parameters` when calling `v1_load_extension`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'v1_load_extension_parameters' in local_var_params: - body_params = local_var_params['v1_load_extension_parameters'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Extension", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/extensions', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_media_play(self, instance_id, media_play_body, **kwargs): # noqa: E501 - """Start playing media # noqa: E501 - - Start playing media # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_media_play(instance_id, media_play_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param media_play_body: Request Body (required) - :type media_play_body: MediaPlayBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_media_play_with_http_info(instance_id, media_play_body, **kwargs) # noqa: E501 - - def v1_media_play_with_http_info(self, instance_id, media_play_body, **kwargs): # noqa: E501 - """Start playing media # noqa: E501 - - Start playing media # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_media_play_with_http_info(instance_id, media_play_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param media_play_body: Request Body (required) - :type media_play_body: MediaPlayBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'media_play_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_media_play" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_media_play`") # noqa: E501 - # verify the required parameter 'media_play_body' is set - if self.api_client.client_side_validation and ('media_play_body' not in local_var_params or # noqa: E501 - local_var_params['media_play_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `media_play_body` when calling `v1_media_play`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'media_play_body' in local_var_params: - body_params = local_var_params['media_play_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/media/play', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_media_stop(self, instance_id, **kwargs): # noqa: E501 - """Stop playing media # noqa: E501 - - Stop playing media # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_media_stop(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_media_stop_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_media_stop_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Stop playing media # noqa: E501 - - Stop playing media # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_media_stop_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_media_stop" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_media_stop`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/media/stop', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_parse_extension_json(self, extension, **kwargs): # noqa: E501 - """Validates extension.json # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_parse_extension_json(extension, async_req=True) - >>> result = thread.get() - - :param extension: extension.json contents (required) - :type extension: Extension - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: object - """ - kwargs['_return_http_data_only'] = True - return self.v1_parse_extension_json_with_http_info(extension, **kwargs) # noqa: E501 - - def v1_parse_extension_json_with_http_info(self, extension, **kwargs): # noqa: E501 - """Validates extension.json # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_parse_extension_json_with_http_info(extension, async_req=True) - >>> result = thread.get() - - :param extension: extension.json contents (required) - :type extension: Extension - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'extension' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_parse_extension_json" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'extension' is set - if self.api_client.client_side_validation and ('extension' not in local_var_params or # noqa: E501 - local_var_params['extension'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `extension` when calling `v1_parse_extension_json`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'extension' in local_var_params: - body_params = local_var_params['extension'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "object", - 400: "UserError", - } - - return self.api_client.call_api( - '/v1/extensions/parse/extension.json', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_partial_update_network_connection(self, id, update_network_connection_options, **kwargs): # noqa: E501 - """Update Network Connection (partial) # noqa: E501 - - Only updates the specified attributes. You must have the domain administrator role to update a network connection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_partial_update_network_connection(id, update_network_connection_options, async_req=True) - >>> result = thread.get() - - :param id: Network Connection Identifier - uuid (required) - :type id: str - :param update_network_connection_options: Network Connection Options (required) - :type update_network_connection_options: UpdateNetworkConnectionOptions - :param force: Force deletion (true only or not present) - :type force: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NetworkConnection - """ - kwargs['_return_http_data_only'] = True - return self.v1_partial_update_network_connection_with_http_info(id, update_network_connection_options, **kwargs) # noqa: E501 - - def v1_partial_update_network_connection_with_http_info(self, id, update_network_connection_options, **kwargs): # noqa: E501 - """Update Network Connection (partial) # noqa: E501 - - Only updates the specified attributes. You must have the domain administrator role to update a network connection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_partial_update_network_connection_with_http_info(id, update_network_connection_options, async_req=True) - >>> result = thread.get() - - :param id: Network Connection Identifier - uuid (required) - :type id: str - :param update_network_connection_options: Network Connection Options (required) - :type update_network_connection_options: UpdateNetworkConnectionOptions - :param force: Force deletion (true only or not present) - :type force: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NetworkConnection, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'id', - 'update_network_connection_options', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_partial_update_network_connection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `v1_partial_update_network_connection`") # noqa: E501 - # verify the required parameter 'update_network_connection_options' is set - if self.api_client.client_side_validation and ('update_network_connection_options' not in local_var_params or # noqa: E501 - local_var_params['update_network_connection_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `update_network_connection_options` when calling `v1_partial_update_network_connection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'update_network_connection_options' in local_var_params: - body_params = local_var_params['update_network_connection_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "NetworkConnection", - } - - return self.api_client.call_api( - '/v1/network/connections/{id}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_patch_instance(self, instance_id, patch_instance_options, **kwargs): # noqa: E501 - """Update Instance # noqa: E501 - - Update Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_patch_instance(instance_id, patch_instance_options, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID (required) - :type instance_id: str - :param patch_instance_options: (required) - :type patch_instance_options: PatchInstanceOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Instance - """ - kwargs['_return_http_data_only'] = True - return self.v1_patch_instance_with_http_info(instance_id, patch_instance_options, **kwargs) # noqa: E501 - - def v1_patch_instance_with_http_info(self, instance_id, patch_instance_options, **kwargs): # noqa: E501 - """Update Instance # noqa: E501 - - Update Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_patch_instance_with_http_info(instance_id, patch_instance_options, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID (required) - :type instance_id: str - :param patch_instance_options: (required) - :type patch_instance_options: PatchInstanceOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Instance, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'patch_instance_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_patch_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_patch_instance`") # noqa: E501 - # verify the required parameter 'patch_instance_options' is set - if self.api_client.client_side_validation and ('patch_instance_options' not in local_var_params or # noqa: E501 - local_var_params['patch_instance_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `patch_instance_options` when calling `v1_patch_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'patch_instance_options' in local_var_params: - body_params = local_var_params['patch_instance_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Instance", - 403: "ApiError", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_patch_instance_read_only(self, instance_id, patch_instance_read_only, **kwargs): # noqa: E501 - """Update Instance Read Only # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_patch_instance_read_only(instance_id, patch_instance_read_only, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID (required) - :type instance_id: str - :param patch_instance_read_only: (required) - :type patch_instance_read_only: PatchInstanceReadOnly - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Instance - """ - kwargs['_return_http_data_only'] = True - return self.v1_patch_instance_read_only_with_http_info(instance_id, patch_instance_read_only, **kwargs) # noqa: E501 - - def v1_patch_instance_read_only_with_http_info(self, instance_id, patch_instance_read_only, **kwargs): # noqa: E501 - """Update Instance Read Only # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_patch_instance_read_only_with_http_info(instance_id, patch_instance_read_only, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID (required) - :type instance_id: str - :param patch_instance_read_only: (required) - :type patch_instance_read_only: PatchInstanceReadOnly - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Instance, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'patch_instance_read_only' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_patch_instance_read_only" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_patch_instance_read_only`") # noqa: E501 - # verify the required parameter 'patch_instance_read_only' is set - if self.api_client.client_side_validation and ('patch_instance_read_only' not in local_var_params or # noqa: E501 - local_var_params['patch_instance_read_only'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `patch_instance_read_only` when calling `v1_patch_instance_read_only`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'patch_instance_read_only' in local_var_params: - body_params = local_var_params['patch_instance_read_only'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Instance", - 403: "ApiError", - 404: "ApiNotFoundError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/read-only', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_pause_instance(self, instance_id, **kwargs): # noqa: E501 - """Pause an Instance # noqa: E501 - - Pause an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_pause_instance(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_pause_instance_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_pause_instance_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Pause an Instance # noqa: E501 - - Pause an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_pause_instance_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_pause_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_pause_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/pause', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_post_instance_input(self, instance_id, instance_input, **kwargs): # noqa: E501 - """Provide Instance Input # noqa: E501 - - Sends a touch or button event to the VM. - Buttons (or keys) to be held during the input are specified as an array of strings, each string must be either a single ascii character or one of the following keywords: - VM Buttons: finger, homeButton, holdButton, volumeUp, volumeDown, ringerSwitch, backButton, overviewButton - Keyboard Buttons: again, alt, alterase, apostrophe, back, backslash, backspace, bassboost, bookmarks, bsp, calc, camera, cancel, caps, capslock, chat, close, closecd, comma, compose, computer, config, connect, copy, ctrl, cut, cyclewindows, dashboard, del, delete, deletefile, dot, down, edit, eject, ejectclose, email, end, enter, equal, esc, escape, exit, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, fastfwd, file, finance, find, forward, front, grave, hangeul, hanja, help, henkan, home, homepage, hp, hrgn, ins, insert, iso, k102, kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9, kpasterisk, kpcomma, kpdot, kpenter, kpequal, kpjpcomma, kpleftparen, kpminus, kpplus, kpplusminus, kprightparen, kpslash, ktkn, ktknhrgn, left, leftalt, leftbrace, leftctrl, leftmeta, leftshift, linefeed, macro, mail, menu, meta, minus, move, msdos, muhenkan, mute, new, next, numlock, open, pagedown, pageup, paste, pause, pausecd, pgdn, pgup, phone, play, playcd, playpause, power, previous, print, prog1, prog2, prog3, prog4, props, question, record, redo, refresh, return, rewind, right, rightalt, rightbrace, rightctrl, rightmeta, rightshift, ro, rotate, scale, screenlock, scrolldown, scrolllock, scrollup, search, semicolon, sendfile, setup, shift, shop, slash, sleep, sound, space, sport, stop, stopcd, suspend, sysrq, tab, undo, up, voldown, volup, wakeup, www, xfer, yen, zkhk # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_post_instance_input(instance_id, instance_input, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param instance_input: The input to send to the VM (required) - :type instance_input: list[InstanceInput] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InputResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_post_instance_input_with_http_info(instance_id, instance_input, **kwargs) # noqa: E501 - - def v1_post_instance_input_with_http_info(self, instance_id, instance_input, **kwargs): # noqa: E501 - """Provide Instance Input # noqa: E501 - - Sends a touch or button event to the VM. - Buttons (or keys) to be held during the input are specified as an array of strings, each string must be either a single ascii character or one of the following keywords: - VM Buttons: finger, homeButton, holdButton, volumeUp, volumeDown, ringerSwitch, backButton, overviewButton - Keyboard Buttons: again, alt, alterase, apostrophe, back, backslash, backspace, bassboost, bookmarks, bsp, calc, camera, cancel, caps, capslock, chat, close, closecd, comma, compose, computer, config, connect, copy, ctrl, cut, cyclewindows, dashboard, del, delete, deletefile, dot, down, edit, eject, ejectclose, email, end, enter, equal, esc, escape, exit, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, fastfwd, file, finance, find, forward, front, grave, hangeul, hanja, help, henkan, home, homepage, hp, hrgn, ins, insert, iso, k102, kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9, kpasterisk, kpcomma, kpdot, kpenter, kpequal, kpjpcomma, kpleftparen, kpminus, kpplus, kpplusminus, kprightparen, kpslash, ktkn, ktknhrgn, left, leftalt, leftbrace, leftctrl, leftmeta, leftshift, linefeed, macro, mail, menu, meta, minus, move, msdos, muhenkan, mute, new, next, numlock, open, pagedown, pageup, paste, pause, pausecd, pgdn, pgup, phone, play, playcd, playpause, power, previous, print, prog1, prog2, prog3, prog4, props, question, record, redo, refresh, return, rewind, right, rightalt, rightbrace, rightctrl, rightmeta, rightshift, ro, rotate, scale, screenlock, scrolldown, scrolllock, scrollup, search, semicolon, sendfile, setup, shift, shop, slash, sleep, sound, space, sport, stop, stopcd, suspend, sysrq, tab, undo, up, voldown, volup, wakeup, www, xfer, yen, zkhk # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_post_instance_input_with_http_info(instance_id, instance_input, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param instance_input: The input to send to the VM (required) - :type instance_input: list[InstanceInput] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InputResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'instance_input' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_post_instance_input" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_post_instance_input`") # noqa: E501 - # verify the required parameter 'instance_input' is set - if self.api_client.client_side_validation and ('instance_input' not in local_var_params or # noqa: E501 - local_var_params['instance_input'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_input` when calling `v1_post_instance_input`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'instance_input' in local_var_params: - body_params = local_var_params['instance_input'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InputResponse", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/input', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_ready(self, **kwargs): # noqa: E501 - """API Status # noqa: E501 - - Check if API is ready for queries # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_ready(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_ready_with_http_info(**kwargs) # noqa: E501 - - def v1_ready_with_http_info(self, **kwargs): # noqa: E501 - """API Status # noqa: E501 - - Check if API is ready for queries # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_ready_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_ready" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/ready', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_reboot_instance(self, instance_id, **kwargs): # noqa: E501 - """Reboot an Instance # noqa: E501 - - Reboot an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_reboot_instance(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_reboot_instance_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_reboot_instance_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Reboot an Instance # noqa: E501 - - Reboot an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_reboot_instance_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_reboot_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_reboot_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/reboot', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_remove_project_key(self, project_id, key_id, **kwargs): # noqa: E501 - """Delete Project Authorized Key # noqa: E501 - - Delete Project Authorized Key # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_remove_project_key(project_id, key_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param key_id: Key ID - uuid (required) - :type key_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_remove_project_key_with_http_info(project_id, key_id, **kwargs) # noqa: E501 - - def v1_remove_project_key_with_http_info(self, project_id, key_id, **kwargs): # noqa: E501 - """Delete Project Authorized Key # noqa: E501 - - Delete Project Authorized Key # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_remove_project_key_with_http_info(project_id, key_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param key_id: Key ID - uuid (required) - :type key_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'key_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_remove_project_key" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_remove_project_key`") # noqa: E501 - # verify the required parameter 'key_id' is set - if self.api_client.client_side_validation and ('key_id' not in local_var_params or # noqa: E501 - local_var_params['key_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `key_id` when calling `v1_remove_project_key`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - if 'key_id' in local_var_params: - path_params['keyId'] = local_var_params['key_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/projects/{projectId}/keys/{keyId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_remove_team_role_from_project(self, project_id, team_id, role_id, **kwargs): # noqa: E501 - """Remove team role from project # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_remove_team_role_from_project(project_id, team_id, role_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param team_id: Team ID - uuid (required) - :type team_id: str - :param role_id: Role ID (required) - :type role_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_remove_team_role_from_project_with_http_info(project_id, team_id, role_id, **kwargs) # noqa: E501 - - def v1_remove_team_role_from_project_with_http_info(self, project_id, team_id, role_id, **kwargs): # noqa: E501 - """Remove team role from project # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_remove_team_role_from_project_with_http_info(project_id, team_id, role_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param team_id: Team ID - uuid (required) - :type team_id: str - :param role_id: Role ID (required) - :type role_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'team_id', - 'role_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_remove_team_role_from_project" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_remove_team_role_from_project`") # noqa: E501 - # verify the required parameter 'team_id' is set - if self.api_client.client_side_validation and ('team_id' not in local_var_params or # noqa: E501 - local_var_params['team_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `team_id` when calling `v1_remove_team_role_from_project`") # noqa: E501 - # verify the required parameter 'role_id' is set - if self.api_client.client_side_validation and ('role_id' not in local_var_params or # noqa: E501 - local_var_params['role_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `role_id` when calling `v1_remove_team_role_from_project`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - if 'team_id' in local_var_params: - path_params['teamId'] = local_var_params['team_id'] # noqa: E501 - if 'role_id' in local_var_params: - path_params['roleId'] = local_var_params['role_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_remove_user_from_team(self, team_id, user_id, **kwargs): # noqa: E501 - """Remove user from team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_remove_user_from_team(team_id, user_id, async_req=True) - >>> result = thread.get() - - :param team_id: Team ID - uuid (required) - :type team_id: str - :param user_id: User ID - uuid (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_remove_user_from_team_with_http_info(team_id, user_id, **kwargs) # noqa: E501 - - def v1_remove_user_from_team_with_http_info(self, team_id, user_id, **kwargs): # noqa: E501 - """Remove user from team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_remove_user_from_team_with_http_info(team_id, user_id, async_req=True) - >>> result = thread.get() - - :param team_id: Team ID - uuid (required) - :type team_id: str - :param user_id: User ID - uuid (required) - :type user_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'team_id', - 'user_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_remove_user_from_team" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'team_id' is set - if self.api_client.client_side_validation and ('team_id' not in local_var_params or # noqa: E501 - local_var_params['team_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `team_id` when calling `v1_remove_user_from_team`") # noqa: E501 - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `v1_remove_user_from_team`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'team_id' in local_var_params: - path_params['teamId'] = local_var_params['team_id'] # noqa: E501 - if 'user_id' in local_var_params: - path_params['userId'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/teams/{teamId}/users/{userId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_remove_user_role_from_project(self, project_id, user_id, role_id, **kwargs): # noqa: E501 - """Remove user role from project # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_remove_user_role_from_project(project_id, user_id, role_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param user_id: User ID - uuid (required) - :type user_id: str - :param role_id: Role ID (required) - :type role_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_remove_user_role_from_project_with_http_info(project_id, user_id, role_id, **kwargs) # noqa: E501 - - def v1_remove_user_role_from_project_with_http_info(self, project_id, user_id, role_id, **kwargs): # noqa: E501 - """Remove user role from project # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_remove_user_role_from_project_with_http_info(project_id, user_id, role_id, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param user_id: User ID - uuid (required) - :type user_id: str - :param role_id: Role ID (required) - :type role_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'user_id', - 'role_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_remove_user_role_from_project" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_remove_user_role_from_project`") # noqa: E501 - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `v1_remove_user_role_from_project`") # noqa: E501 - # verify the required parameter 'role_id' is set - if self.api_client.client_side_validation and ('role_id' not in local_var_params or # noqa: E501 - local_var_params['role_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `role_id` when calling `v1_remove_user_role_from_project`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - if 'user_id' in local_var_params: - path_params['userId'] = local_var_params['user_id'] # noqa: E501 - if 'role_id' in local_var_params: - path_params['roleId'] = local_var_params['role_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/roles/projects/{projectId}/users/{userId}/roles/{roleId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_rename_instance_snapshot(self, instance_id, snapshot_id, snapshot_creation_options, **kwargs): # noqa: E501 - """Rename an Instance Snapshot # noqa: E501 - - Rename an Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_rename_instance_snapshot(instance_id, snapshot_id, snapshot_creation_options, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param snapshot_creation_options: (required) - :type snapshot_creation_options: SnapshotCreationOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_rename_instance_snapshot_with_http_info(instance_id, snapshot_id, snapshot_creation_options, **kwargs) # noqa: E501 - - def v1_rename_instance_snapshot_with_http_info(self, instance_id, snapshot_id, snapshot_creation_options, **kwargs): # noqa: E501 - """Rename an Instance Snapshot # noqa: E501 - - Rename an Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_rename_instance_snapshot_with_http_info(instance_id, snapshot_id, snapshot_creation_options, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param snapshot_creation_options: (required) - :type snapshot_creation_options: SnapshotCreationOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'snapshot_id', - 'snapshot_creation_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_rename_instance_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_rename_instance_snapshot`") # noqa: E501 - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_rename_instance_snapshot`") # noqa: E501 - # verify the required parameter 'snapshot_creation_options' is set - if self.api_client.client_side_validation and ('snapshot_creation_options' not in local_var_params or # noqa: E501 - local_var_params['snapshot_creation_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_creation_options` when calling `v1_rename_instance_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'snapshot_creation_options' in local_var_params: - body_params = local_var_params['snapshot_creation_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/snapshots/{snapshotId}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_reset_user_password(self, password_reset_body, **kwargs): # noqa: E501 - """Reset User Password # noqa: E501 - - Reset User Password # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_reset_user_password(password_reset_body, async_req=True) - >>> result = thread.get() - - :param password_reset_body: application/json (required) - :type password_reset_body: PasswordResetBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_reset_user_password_with_http_info(password_reset_body, **kwargs) # noqa: E501 - - def v1_reset_user_password_with_http_info(self, password_reset_body, **kwargs): # noqa: E501 - """Reset User Password # noqa: E501 - - Reset User Password # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_reset_user_password_with_http_info(password_reset_body, async_req=True) - >>> result = thread.get() - - :param password_reset_body: application/json (required) - :type password_reset_body: PasswordResetBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'password_reset_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_reset_user_password" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'password_reset_body' is set - if self.api_client.client_side_validation and ('password_reset_body' not in local_var_params or # noqa: E501 - local_var_params['password_reset_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `password_reset_body` when calling `v1_reset_user_password`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'password_reset_body' in local_var_params: - body_params = local_var_params['password_reset_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/users/reset-password', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_restore_backup(self, instance_id, **kwargs): # noqa: E501 - """Restore backup # noqa: E501 - - Restore backup # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_restore_backup(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param restore_backup_data: Restore backup data - :type restore_backup_data: RestoreBackupData - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_restore_backup_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_restore_backup_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Restore backup # noqa: E501 - - Restore backup # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_restore_backup_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param restore_backup_data: Restore backup data - :type restore_backup_data: RestoreBackupData - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'restore_backup_data' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_restore_backup" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_restore_backup`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'restore_backup_data' in local_var_params: - body_params = local_var_params['restore_backup_data'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/restoreBackup', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_restore_instance_snapshot(self, instance_id, snapshot_id, **kwargs): # noqa: E501 - """Restore an Instance Snapshot # noqa: E501 - - Restore an Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_restore_instance_snapshot(instance_id, snapshot_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_restore_instance_snapshot_with_http_info(instance_id, snapshot_id, **kwargs) # noqa: E501 - - def v1_restore_instance_snapshot_with_http_info(self, instance_id, snapshot_id, **kwargs): # noqa: E501 - """Restore an Instance Snapshot # noqa: E501 - - Restore an Instance Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_restore_instance_snapshot_with_http_info(instance_id, snapshot_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'snapshot_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_restore_instance_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_restore_instance_snapshot`") # noqa: E501 - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_restore_instance_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/snapshots/{snapshotId}/restore', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_roles(self, **kwargs): # noqa: E501 - """Get all roles # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_roles(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Role] - """ - kwargs['_return_http_data_only'] = True - return self.v1_roles_with_http_info(**kwargs) # noqa: E501 - - def v1_roles_with_http_info(self, **kwargs): # noqa: E501 - """Get all roles # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_roles_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Role], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_roles" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Role]", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/roles', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_rotate_instance(self, instance_id, rotate_body, **kwargs): # noqa: E501 - """Rotate device to specified orientation # noqa: E501 - - Rotate device to orientation. Accepted orientations: 1. Portrait 2. Portrait vertically inverted (up-side-down) 3. Landscape with top of the device to the left 4. Landscape with top of the device to the right # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_rotate_instance(instance_id, rotate_body, async_req=True) - >>> result = thread.get() - - :param instance_id: (required) - :type instance_id: str - :param rotate_body: (required) - :type rotate_body: RotateBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_rotate_instance_with_http_info(instance_id, rotate_body, **kwargs) # noqa: E501 - - def v1_rotate_instance_with_http_info(self, instance_id, rotate_body, **kwargs): # noqa: E501 - """Rotate device to specified orientation # noqa: E501 - - Rotate device to orientation. Accepted orientations: 1. Portrait 2. Portrait vertically inverted (up-side-down) 3. Landscape with top of the device to the left 4. Landscape with top of the device to the right # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_rotate_instance_with_http_info(instance_id, rotate_body, async_req=True) - >>> result = thread.get() - - :param instance_id: (required) - :type instance_id: str - :param rotate_body: (required) - :type rotate_body: RotateBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'rotate_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_rotate_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_rotate_instance`") # noqa: E501 - # verify the required parameter 'rotate_body' is set - if self.api_client.client_side_validation and ('rotate_body' not in local_var_params or # noqa: E501 - local_var_params['rotate_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `rotate_body` when calling `v1_rotate_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'rotate_body' in local_var_params: - body_params = local_var_params['rotate_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/rotate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_send_user_reset_link(self, reset_link_body, **kwargs): # noqa: E501 - """Send Password Reset Link # noqa: E501 - - Send Password Reset Link # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_send_user_reset_link(reset_link_body, async_req=True) - >>> result = thread.get() - - :param reset_link_body: application/json (required) - :type reset_link_body: ResetLinkBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_send_user_reset_link_with_http_info(reset_link_body, **kwargs) # noqa: E501 - - def v1_send_user_reset_link_with_http_info(self, reset_link_body, **kwargs): # noqa: E501 - """Send Password Reset Link # noqa: E501 - - Send Password Reset Link # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_send_user_reset_link_with_http_info(reset_link_body, async_req=True) - >>> result = thread.get() - - :param reset_link_body: application/json (required) - :type reset_link_body: ResetLinkBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'reset_link_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_send_user_reset_link" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'reset_link_body' is set - if self.api_client.client_side_validation and ('reset_link_body' not in local_var_params or # noqa: E501 - local_var_params['reset_link_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `reset_link_body` when calling `v1_send_user_reset_link`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'reset_link_body' in local_var_params: - body_params = local_var_params['reset_link_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/users/send-reset-link', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_set_instance_gpios(self, instance_id, gpios_state, **kwargs): # noqa: E501 - """Set Instance GPIOs # noqa: E501 - - Set Instance GPIOs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_set_instance_gpios(instance_id, gpios_state, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param gpios_state: New GPIO state (required) - :type gpios_state: GpiosState - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: GpiosState - """ - kwargs['_return_http_data_only'] = True - return self.v1_set_instance_gpios_with_http_info(instance_id, gpios_state, **kwargs) # noqa: E501 - - def v1_set_instance_gpios_with_http_info(self, instance_id, gpios_state, **kwargs): # noqa: E501 - """Set Instance GPIOs # noqa: E501 - - Set Instance GPIOs # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_set_instance_gpios_with_http_info(instance_id, gpios_state, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param gpios_state: New GPIO state (required) - :type gpios_state: GpiosState - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(GpiosState, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'gpios_state' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_set_instance_gpios" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_set_instance_gpios`") # noqa: E501 - # verify the required parameter 'gpios_state' is set - if self.api_client.client_side_validation and ('gpios_state' not in local_var_params or # noqa: E501 - local_var_params['gpios_state'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `gpios_state` when calling `v1_set_instance_gpios`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'gpios_state' in local_var_params: - body_params = local_var_params['gpios_state'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "GpiosState", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/gpios', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_set_instance_peripherals(self, instance_id, peripherals_data, **kwargs): # noqa: E501 - """Set Instance Peripherals # noqa: E501 - - Set Instance Peripherals # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_set_instance_peripherals(instance_id, peripherals_data, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param peripherals_data: New peripherals state (required) - :type peripherals_data: PeripheralsData - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: PeripheralsData - """ - kwargs['_return_http_data_only'] = True - return self.v1_set_instance_peripherals_with_http_info(instance_id, peripherals_data, **kwargs) # noqa: E501 - - def v1_set_instance_peripherals_with_http_info(self, instance_id, peripherals_data, **kwargs): # noqa: E501 - """Set Instance Peripherals # noqa: E501 - - Set Instance Peripherals # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_set_instance_peripherals_with_http_info(instance_id, peripherals_data, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param peripherals_data: New peripherals state (required) - :type peripherals_data: PeripheralsData - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(PeripheralsData, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'peripherals_data' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_set_instance_peripherals" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_set_instance_peripherals`") # noqa: E501 - # verify the required parameter 'peripherals_data' is set - if self.api_client.client_side_validation and ('peripherals_data' not in local_var_params or # noqa: E501 - local_var_params['peripherals_data'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `peripherals_data` when calling `v1_set_instance_peripherals`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'peripherals_data' in local_var_params: - body_params = local_var_params['peripherals_data'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "PeripheralsData", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/instances/{instanceId}/peripherals', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_set_instance_state(self, instance_id, v1_set_state_body, **kwargs): # noqa: E501 - """Set state of Instance # noqa: E501 - - Set state of Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_set_instance_state(instance_id, v1_set_state_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param v1_set_state_body: Desired State (required) - :type v1_set_state_body: V1SetStateBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_set_instance_state_with_http_info(instance_id, v1_set_state_body, **kwargs) # noqa: E501 - - def v1_set_instance_state_with_http_info(self, instance_id, v1_set_state_body, **kwargs): # noqa: E501 - """Set state of Instance # noqa: E501 - - Set state of Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_set_instance_state_with_http_info(instance_id, v1_set_state_body, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param v1_set_state_body: Desired State (required) - :type v1_set_state_body: V1SetStateBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'v1_set_state_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_set_instance_state" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_set_instance_state`") # noqa: E501 - # verify the required parameter 'v1_set_state_body' is set - if self.api_client.client_side_validation and ('v1_set_state_body' not in local_var_params or # noqa: E501 - local_var_params['v1_set_state_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `v1_set_state_body` when calling `v1_set_instance_state`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'v1_set_state_body' in local_var_params: - body_params = local_var_params['v1_set_state_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/state', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_set_snapshot_permissions(self, snapshot_id, snapshot_permissions_request_payload, **kwargs): # noqa: E501 - """Set member list # noqa: E501 - - Sets the list of members who have access to the snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_set_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param snapshot_permissions_request_payload: (required) - :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_set_snapshot_permissions_with_http_info(snapshot_id, snapshot_permissions_request_payload, **kwargs) # noqa: E501 - - def v1_set_snapshot_permissions_with_http_info(self, snapshot_id, snapshot_permissions_request_payload, **kwargs): # noqa: E501 - """Set member list # noqa: E501 - - Sets the list of members who have access to the snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_set_snapshot_permissions_with_http_info(snapshot_id, snapshot_permissions_request_payload, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param snapshot_permissions_request_payload: (required) - :type snapshot_permissions_request_payload: SnapshotPermissionsRequestPayload - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'snapshot_id', - 'snapshot_permissions_request_payload' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_set_snapshot_permissions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_set_snapshot_permissions`") # noqa: E501 - # verify the required parameter 'snapshot_permissions_request_payload' is set - if self.api_client.client_side_validation and ('snapshot_permissions_request_payload' not in local_var_params or # noqa: E501 - local_var_params['snapshot_permissions_request_payload'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_permissions_request_payload` when calling `v1_set_snapshot_permissions`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'snapshot_permissions_request_payload' in local_var_params: - body_params = local_var_params['snapshot_permissions_request_payload'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/snapshots/{snapshotId}/permissions', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_share_snapshot(self, snapshot_id, post_share_snapshot_request_payload, **kwargs): # noqa: E501 - """Share snapshot # noqa: E501 - - Share a snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_share_snapshot(snapshot_id, post_share_snapshot_request_payload, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param post_share_snapshot_request_payload: (required) - :type post_share_snapshot_request_payload: PostShareSnapshotRequestPayload - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_share_snapshot_with_http_info(snapshot_id, post_share_snapshot_request_payload, **kwargs) # noqa: E501 - - def v1_share_snapshot_with_http_info(self, snapshot_id, post_share_snapshot_request_payload, **kwargs): # noqa: E501 - """Share snapshot # noqa: E501 - - Share a snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_share_snapshot_with_http_info(snapshot_id, post_share_snapshot_request_payload, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param post_share_snapshot_request_payload: (required) - :type post_share_snapshot_request_payload: PostShareSnapshotRequestPayload - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'snapshot_id', - 'post_share_snapshot_request_payload' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_share_snapshot" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_share_snapshot`") # noqa: E501 - # verify the required parameter 'post_share_snapshot_request_payload' is set - if self.api_client.client_side_validation and ('post_share_snapshot_request_payload' not in local_var_params or # noqa: E501 - local_var_params['post_share_snapshot_request_payload'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `post_share_snapshot_request_payload` when calling `v1_share_snapshot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'post_share_snapshot_request_payload' in local_var_params: - body_params = local_var_params['post_share_snapshot_request_payload'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/snapshots/{snapshotId}/share', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_snapshot_rename(self, snapshot_id, snapshot_creation_options, **kwargs): # noqa: E501 - """Rename a Snapshot # noqa: E501 - - Rename a Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_snapshot_rename(snapshot_id, snapshot_creation_options, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param snapshot_creation_options: (required) - :type snapshot_creation_options: SnapshotCreationOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Snapshot - """ - kwargs['_return_http_data_only'] = True - return self.v1_snapshot_rename_with_http_info(snapshot_id, snapshot_creation_options, **kwargs) # noqa: E501 - - def v1_snapshot_rename_with_http_info(self, snapshot_id, snapshot_creation_options, **kwargs): # noqa: E501 - """Rename a Snapshot # noqa: E501 - - Rename a Snapshot # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_snapshot_rename_with_http_info(snapshot_id, snapshot_creation_options, async_req=True) - >>> result = thread.get() - - :param snapshot_id: Snapshot ID - uuid (required) - :type snapshot_id: str - :param snapshot_creation_options: (required) - :type snapshot_creation_options: SnapshotCreationOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Snapshot, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'snapshot_id', - 'snapshot_creation_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_snapshot_rename" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'snapshot_id' is set - if self.api_client.client_side_validation and ('snapshot_id' not in local_var_params or # noqa: E501 - local_var_params['snapshot_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_id` when calling `v1_snapshot_rename`") # noqa: E501 - # verify the required parameter 'snapshot_creation_options' is set - if self.api_client.client_side_validation and ('snapshot_creation_options' not in local_var_params or # noqa: E501 - local_var_params['snapshot_creation_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `snapshot_creation_options` when calling `v1_snapshot_rename`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'snapshot_id' in local_var_params: - path_params['snapshotId'] = local_var_params['snapshot_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'snapshot_creation_options' in local_var_params: - body_params = local_var_params['snapshot_creation_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Snapshot", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/snapshots/{snapshotId}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_start_core_trace(self, instance_id, **kwargs): # noqa: E501 - """Start CoreTrace on an instance # noqa: E501 - - Start CoreTrace on an instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_core_trace(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_start_core_trace_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_start_core_trace_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Start CoreTrace on an instance # noqa: E501 - - Start CoreTrace on an instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_core_trace_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_start_core_trace" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_start_core_trace`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/strace/enable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_start_hyper_trace(self, instance_id, btrace_enable_options, **kwargs): # noqa: E501 - """Start HyperTrace on an instance # noqa: E501 - - Start HyperTrace on an instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_hyper_trace(instance_id, btrace_enable_options, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param btrace_enable_options: (required) - :type btrace_enable_options: BtraceEnableOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_start_hyper_trace_with_http_info(instance_id, btrace_enable_options, **kwargs) # noqa: E501 - - def v1_start_hyper_trace_with_http_info(self, instance_id, btrace_enable_options, **kwargs): # noqa: E501 - """Start HyperTrace on an instance # noqa: E501 - - Start HyperTrace on an instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_hyper_trace_with_http_info(instance_id, btrace_enable_options, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param btrace_enable_options: (required) - :type btrace_enable_options: BtraceEnableOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'btrace_enable_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_start_hyper_trace" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_start_hyper_trace`") # noqa: E501 - # verify the required parameter 'btrace_enable_options' is set - if self.api_client.client_side_validation and ('btrace_enable_options' not in local_var_params or # noqa: E501 - local_var_params['btrace_enable_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `btrace_enable_options` when calling `v1_start_hyper_trace`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'btrace_enable_options' in local_var_params: - body_params = local_var_params['btrace_enable_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/btrace/enable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_start_instance(self, instance_id, **kwargs): # noqa: E501 - """Start an Instance # noqa: E501 - - Start an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_instance(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param instance_start_options: Start options - :type instance_start_options: InstanceStartOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_start_instance_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_start_instance_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Start an Instance # noqa: E501 - - Start an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_instance_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param instance_start_options: Start options - :type instance_start_options: InstanceStartOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'instance_start_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_start_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_start_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'instance_start_options' in local_var_params: - body_params = local_var_params['instance_start_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/start', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_start_netdump(self, instance_id, **kwargs): # noqa: E501 - """Start Enhanced Network Monitor on an instance. # noqa: E501 - - Start Enhanced Network Monitor on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_netdump(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param netdump_filter: - :type netdump_filter: NetdumpFilter - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_start_netdump_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_start_netdump_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Start Enhanced Network Monitor on an instance. # noqa: E501 - - Start Enhanced Network Monitor on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_netdump_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param netdump_filter: - :type netdump_filter: NetdumpFilter - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'netdump_filter' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_start_netdump" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_start_netdump`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'netdump_filter' in local_var_params: - body_params = local_var_params['netdump_filter'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/netdump/enable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_start_network_monitor(self, instance_id, **kwargs): # noqa: E501 - """Start Network Monitor on an instance. # noqa: E501 - - Start Network Monitor on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_network_monitor(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param sslsplit_filter: - :type sslsplit_filter: SslsplitFilter - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_start_network_monitor_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_start_network_monitor_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Start Network Monitor on an instance. # noqa: E501 - - Start Network Monitor on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_start_network_monitor_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param sslsplit_filter: - :type sslsplit_filter: SslsplitFilter - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'sslsplit_filter' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_start_network_monitor" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_start_network_monitor`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'sslsplit_filter' in local_var_params: - body_params = local_var_params['sslsplit_filter'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/sslsplit/enable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_stop_core_trace(self, instance_id, **kwargs): # noqa: E501 - """Stop CoreTrace on an instance. # noqa: E501 - - Stop CoreTrace on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_core_trace(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_stop_core_trace_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_stop_core_trace_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Stop CoreTrace on an instance. # noqa: E501 - - Stop CoreTrace on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_core_trace_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_stop_core_trace" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_stop_core_trace`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/strace/disable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_stop_hyper_trace(self, instance_id, **kwargs): # noqa: E501 - """Stop HyperTrace on an instance. # noqa: E501 - - Stop HyperTrace on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_hyper_trace(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_stop_hyper_trace_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_stop_hyper_trace_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Stop HyperTrace on an instance. # noqa: E501 - - Stop HyperTrace on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_hyper_trace_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_stop_hyper_trace" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_stop_hyper_trace`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/btrace/disable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_stop_instance(self, instance_id, **kwargs): # noqa: E501 - """Stop an Instance # noqa: E501 - - Stop an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_instance(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param instance_stop_options: Stop options - :type instance_stop_options: InstanceStopOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_stop_instance_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_stop_instance_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Stop an Instance # noqa: E501 - - Stop an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_instance_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param instance_stop_options: Stop options - :type instance_stop_options: InstanceStopOptions - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'instance_stop_options' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_stop_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_stop_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'instance_stop_options' in local_var_params: - body_params = local_var_params['instance_stop_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/stop', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_stop_netdump(self, instance_id, **kwargs): # noqa: E501 - """Stop Enhanced Network Monitor on an instance. # noqa: E501 - - Stop Enhanced Network Monitor on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_netdump(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_stop_netdump_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_stop_netdump_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Stop Enhanced Network Monitor on an instance. # noqa: E501 - - Stop Enhanced Network Monitor on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_netdump_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_stop_netdump" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_stop_netdump`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/netdump/disable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_stop_network_monitor(self, instance_id, **kwargs): # noqa: E501 - """Stop Network Monitor on an instance. # noqa: E501 - - Stop Network Monitor on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_network_monitor(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_stop_network_monitor_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_stop_network_monitor_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Stop Network Monitor on an instance. # noqa: E501 - - Stop Network Monitor on an instance. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_stop_network_monitor_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_stop_network_monitor" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_stop_network_monitor`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/sslsplit/disable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_team_change(self, team_id, create_team, **kwargs): # noqa: E501 - """Update team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_team_change(team_id, create_team, async_req=True) - >>> result = thread.get() - - :param team_id: Team ID - uuid (required) - :type team_id: str - :param create_team: (required) - :type create_team: CreateTeam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_team_change_with_http_info(team_id, create_team, **kwargs) # noqa: E501 - - def v1_team_change_with_http_info(self, team_id, create_team, **kwargs): # noqa: E501 - """Update team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_team_change_with_http_info(team_id, create_team, async_req=True) - >>> result = thread.get() - - :param team_id: Team ID - uuid (required) - :type team_id: str - :param create_team: (required) - :type create_team: CreateTeam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'team_id', - 'create_team' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_team_change" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'team_id' is set - if self.api_client.client_side_validation and ('team_id' not in local_var_params or # noqa: E501 - local_var_params['team_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `team_id` when calling `v1_team_change`") # noqa: E501 - # verify the required parameter 'create_team' is set - if self.api_client.client_side_validation and ('create_team' not in local_var_params or # noqa: E501 - local_var_params['create_team'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_team` when calling `v1_team_change`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'team_id' in local_var_params: - path_params['teamId'] = local_var_params['team_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_team' in local_var_params: - body_params = local_var_params['create_team'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/teams/{teamId}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_team_create(self, create_team, **kwargs): # noqa: E501 - """Create team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_team_create(create_team, async_req=True) - >>> result = thread.get() - - :param create_team: (required) - :type create_team: CreateTeam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: TeamCreate - """ - kwargs['_return_http_data_only'] = True - return self.v1_team_create_with_http_info(create_team, **kwargs) # noqa: E501 - - def v1_team_create_with_http_info(self, create_team, **kwargs): # noqa: E501 - """Create team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_team_create_with_http_info(create_team, async_req=True) - >>> result = thread.get() - - :param create_team: (required) - :type create_team: CreateTeam - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(TeamCreate, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'create_team' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_team_create" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'create_team' is set - if self.api_client.client_side_validation and ('create_team' not in local_var_params or # noqa: E501 - local_var_params['create_team'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `create_team` when calling `v1_team_create`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'create_team' in local_var_params: - body_params = local_var_params['create_team'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "TeamCreate", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/teams', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_team_delete(self, team_id, **kwargs): # noqa: E501 - """Delete team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_team_delete(team_id, async_req=True) - >>> result = thread.get() - - :param team_id: Team ID - uuid (required) - :type team_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_team_delete_with_http_info(team_id, **kwargs) # noqa: E501 - - def v1_team_delete_with_http_info(self, team_id, **kwargs): # noqa: E501 - """Delete team # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_team_delete_with_http_info(team_id, async_req=True) - >>> result = thread.get() - - :param team_id: Team ID - uuid (required) - :type team_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'team_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_team_delete" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'team_id' is set - if self.api_client.client_side_validation and ('team_id' not in local_var_params or # noqa: E501 - local_var_params['team_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `team_id` when calling `v1_team_delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'team_id' in local_var_params: - path_params['teamId'] = local_var_params['team_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/teams/{teamId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_teams(self, **kwargs): # noqa: E501 - """Get teams # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_teams(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[Team] - """ - kwargs['_return_http_data_only'] = True - return self.v1_teams_with_http_info(**kwargs) # noqa: E501 - - def v1_teams_with_http_info(self, **kwargs): # noqa: E501 - """Get teams # noqa: E501 - - This endpoint is available for Enterprise accounts only # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_teams_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[Team], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_teams" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[Team]", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/teams', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_unpause_instance(self, instance_id, **kwargs): # noqa: E501 - """Unpause an Instance # noqa: E501 - - Unpause an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_unpause_instance(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_unpause_instance_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v1_unpause_instance_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Unpause an Instance # noqa: E501 - - Unpause an Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_unpause_instance_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_unpause_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_unpause_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/unpause', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_update_domain_auth_provider(self, domain_id, provider_id, domain_auth_provider_request, **kwargs): # noqa: E501 - """Update an auth provider for a domain # noqa: E501 - - Update an auth provider for a domain # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_domain_auth_provider(domain_id, provider_id, domain_auth_provider_request, async_req=True) - >>> result = thread.get() - - :param domain_id: Domain ID - uuid (required) - :type domain_id: str - :param provider_id: Provider ID - uuid (required) - :type provider_id: str - :param domain_auth_provider_request: Request Data (required) - :type domain_auth_provider_request: DomainAuthProviderRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: DomainAuthProviderResponse - """ - kwargs['_return_http_data_only'] = True - return self.v1_update_domain_auth_provider_with_http_info(domain_id, provider_id, domain_auth_provider_request, **kwargs) # noqa: E501 - - def v1_update_domain_auth_provider_with_http_info(self, domain_id, provider_id, domain_auth_provider_request, **kwargs): # noqa: E501 - """Update an auth provider for a domain # noqa: E501 - - Update an auth provider for a domain # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_domain_auth_provider_with_http_info(domain_id, provider_id, domain_auth_provider_request, async_req=True) - >>> result = thread.get() - - :param domain_id: Domain ID - uuid (required) - :type domain_id: str - :param provider_id: Provider ID - uuid (required) - :type provider_id: str - :param domain_auth_provider_request: Request Data (required) - :type domain_auth_provider_request: DomainAuthProviderRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(DomainAuthProviderResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'domain_id', - 'provider_id', - 'domain_auth_provider_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_update_domain_auth_provider" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'domain_id' is set - if self.api_client.client_side_validation and ('domain_id' not in local_var_params or # noqa: E501 - local_var_params['domain_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `domain_id` when calling `v1_update_domain_auth_provider`") # noqa: E501 - # verify the required parameter 'provider_id' is set - if self.api_client.client_side_validation and ('provider_id' not in local_var_params or # noqa: E501 - local_var_params['provider_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `provider_id` when calling `v1_update_domain_auth_provider`") # noqa: E501 - # verify the required parameter 'domain_auth_provider_request' is set - if self.api_client.client_side_validation and ('domain_auth_provider_request' not in local_var_params or # noqa: E501 - local_var_params['domain_auth_provider_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `domain_auth_provider_request` when calling `v1_update_domain_auth_provider`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'domain_id' in local_var_params: - path_params['domainId'] = local_var_params['domain_id'] # noqa: E501 - if 'provider_id' in local_var_params: - path_params['providerId'] = local_var_params['provider_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'domain_auth_provider_request' in local_var_params: - body_params = local_var_params['domain_auth_provider_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "DomainAuthProviderResponse", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/domain/{domainId}/auth/{providerId}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_update_extension(self, extension_id, update_extension, **kwargs): # noqa: E501 - """Update an existing extension # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_extension(extension_id, update_extension, async_req=True) - >>> result = thread.get() - - :param extension_id: Extension ID (required) - :type extension_id: str - :param update_extension: application/json (required) - :type update_extension: UpdateExtension - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_update_extension_with_http_info(extension_id, update_extension, **kwargs) # noqa: E501 - - def v1_update_extension_with_http_info(self, extension_id, update_extension, **kwargs): # noqa: E501 - """Update an existing extension # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_extension_with_http_info(extension_id, update_extension, async_req=True) - >>> result = thread.get() - - :param extension_id: Extension ID (required) - :type extension_id: str - :param update_extension: application/json (required) - :type update_extension: UpdateExtension - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'extension_id', - 'update_extension' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_update_extension" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'extension_id' is set - if self.api_client.client_side_validation and ('extension_id' not in local_var_params or # noqa: E501 - local_var_params['extension_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `extension_id` when calling `v1_update_extension`") # noqa: E501 - # verify the required parameter 'update_extension' is set - if self.api_client.client_side_validation and ('update_extension' not in local_var_params or # noqa: E501 - local_var_params['update_extension'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `update_extension` when calling `v1_update_extension`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'extension_id' in local_var_params: - path_params['extensionId'] = local_var_params['extension_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'update_extension' in local_var_params: - body_params = local_var_params['update_extension'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/extensions/{extensionId}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_update_hook(self, hook_id, v1_update_hook_parameters, **kwargs): # noqa: E501 - """Update an existing hypervisor hook # noqa: E501 - - Update an existing hypervisor hook # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_hook(hook_id, v1_update_hook_parameters, async_req=True) - >>> result = thread.get() - - :param hook_id: Hook ID (required) - :type hook_id: str - :param v1_update_hook_parameters: application/json (required) - :type v1_update_hook_parameters: V1UpdateHookParameters - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Hook - """ - kwargs['_return_http_data_only'] = True - return self.v1_update_hook_with_http_info(hook_id, v1_update_hook_parameters, **kwargs) # noqa: E501 - - def v1_update_hook_with_http_info(self, hook_id, v1_update_hook_parameters, **kwargs): # noqa: E501 - """Update an existing hypervisor hook # noqa: E501 - - Update an existing hypervisor hook # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_hook_with_http_info(hook_id, v1_update_hook_parameters, async_req=True) - >>> result = thread.get() - - :param hook_id: Hook ID (required) - :type hook_id: str - :param v1_update_hook_parameters: application/json (required) - :type v1_update_hook_parameters: V1UpdateHookParameters - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Hook, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'hook_id', - 'v1_update_hook_parameters' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_update_hook" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'hook_id' is set - if self.api_client.client_side_validation and ('hook_id' not in local_var_params or # noqa: E501 - local_var_params['hook_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `hook_id` when calling `v1_update_hook`") # noqa: E501 - # verify the required parameter 'v1_update_hook_parameters' is set - if self.api_client.client_side_validation and ('v1_update_hook_parameters' not in local_var_params or # noqa: E501 - local_var_params['v1_update_hook_parameters'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `v1_update_hook_parameters` when calling `v1_update_hook`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'hook_id' in local_var_params: - path_params['hookId'] = local_var_params['hook_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'v1_update_hook_parameters' in local_var_params: - body_params = local_var_params['v1_update_hook_parameters'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Hook", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/hooks/{hookId}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_update_network_connection(self, id, update_network_connection_options, **kwargs): # noqa: E501 - """Update Network Connection # noqa: E501 - - You must have the domain administrator role to update a network connection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_network_connection(id, update_network_connection_options, async_req=True) - >>> result = thread.get() - - :param id: Network Connection Identifier - uuid (required) - :type id: str - :param update_network_connection_options: Network Connection Options (required) - :type update_network_connection_options: UpdateNetworkConnectionOptions - :param force: Force deletion (true only or not present) - :type force: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: NetworkConnection - """ - kwargs['_return_http_data_only'] = True - return self.v1_update_network_connection_with_http_info(id, update_network_connection_options, **kwargs) # noqa: E501 - - def v1_update_network_connection_with_http_info(self, id, update_network_connection_options, **kwargs): # noqa: E501 - """Update Network Connection # noqa: E501 - - You must have the domain administrator role to update a network connection. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_network_connection_with_http_info(id, update_network_connection_options, async_req=True) - >>> result = thread.get() - - :param id: Network Connection Identifier - uuid (required) - :type id: str - :param update_network_connection_options: Network Connection Options (required) - :type update_network_connection_options: UpdateNetworkConnectionOptions - :param force: Force deletion (true only or not present) - :type force: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(NetworkConnection, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'id', - 'update_network_connection_options', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_update_network_connection" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'id' is set - if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 - local_var_params['id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `id` when calling `v1_update_network_connection`") # noqa: E501 - # verify the required parameter 'update_network_connection_options' is set - if self.api_client.client_side_validation and ('update_network_connection_options' not in local_var_params or # noqa: E501 - local_var_params['update_network_connection_options'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `update_network_connection_options` when calling `v1_update_network_connection`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in local_var_params: - path_params['id'] = local_var_params['id'] # noqa: E501 - - query_params = [] - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'update_network_connection_options' in local_var_params: - body_params = local_var_params['update_network_connection_options'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PUT', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "NetworkConnection", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/network/connections/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_update_project(self, project_id, project, **kwargs): # noqa: E501 - """Update a Project # noqa: E501 - - Update a Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_project(project_id, project, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param project: Updated Project Settings (required) - :type project: Project - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Project - """ - kwargs['_return_http_data_only'] = True - return self.v1_update_project_with_http_info(project_id, project, **kwargs) # noqa: E501 - - def v1_update_project_with_http_info(self, project_id, project, **kwargs): # noqa: E501 - """Update a Project # noqa: E501 - - Update a Project # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_project_with_http_info(project_id, project, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param project: Updated Project Settings (required) - :type project: Project - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Project, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'project' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_update_project" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_update_project`") # noqa: E501 - # verify the required parameter 'project' is set - if self.api_client.client_side_validation and ('project' not in local_var_params or # noqa: E501 - local_var_params['project'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project` when calling `v1_update_project`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'project' in local_var_params: - body_params = local_var_params['project'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "Project", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/projects/{projectId}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_update_project_settings(self, project_id, project_settings, **kwargs): # noqa: E501 - """Change Project Settings # noqa: E501 - - Change Project Settings # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_project_settings(project_id, project_settings, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param project_settings: New settings (required) - :type project_settings: ProjectSettings - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_update_project_settings_with_http_info(project_id, project_settings, **kwargs) # noqa: E501 - - def v1_update_project_settings_with_http_info(self, project_id, project_settings, **kwargs): # noqa: E501 - """Change Project Settings # noqa: E501 - - Change Project Settings # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_project_settings_with_http_info(project_id, project_settings, async_req=True) - >>> result = thread.get() - - :param project_id: Project ID - uuid (required) - :type project_id: str - :param project_settings: New settings (required) - :type project_settings: ProjectSettings - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'project_id', - 'project_settings' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_update_project_settings" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'project_id' is set - if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 - local_var_params['project_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_id` when calling `v1_update_project_settings`") # noqa: E501 - # verify the required parameter 'project_settings' is set - if self.api_client.client_side_validation and ('project_settings' not in local_var_params or # noqa: E501 - local_var_params['project_settings'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `project_settings` when calling `v1_update_project_settings`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'project_id' in local_var_params: - path_params['projectId'] = local_var_params['project_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'project_settings' in local_var_params: - body_params = local_var_params['project_settings'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/projects/{projectId}/settings', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_update_user(self, user_id, user_update, **kwargs): # noqa: E501 - """Update User # noqa: E501 - - Update a user. Fields such as `name`, `label`, `password`, and `clusterAdministrator` can be updated. Only users with the Cluster Administrator role can set or modify the `clusterAdministrator` flag. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_user(user_id, user_update, async_req=True) - >>> result = thread.get() - - :param user_id: userId - uuid (required) - :type user_id: str - :param user_update: User data (required) - :type user_update: UserUpdate - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_update_user_with_http_info(user_id, user_update, **kwargs) # noqa: E501 - - def v1_update_user_with_http_info(self, user_id, user_update, **kwargs): # noqa: E501 - """Update User # noqa: E501 - - Update a user. Fields such as `name`, `label`, `password`, and `clusterAdministrator` can be updated. Only users with the Cluster Administrator role can set or modify the `clusterAdministrator` flag. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_update_user_with_http_info(user_id, user_update, async_req=True) - >>> result = thread.get() - - :param user_id: userId - uuid (required) - :type user_id: str - :param user_update: User data (required) - :type user_update: UserUpdate - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'user_id', - 'user_update' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_update_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if self.api_client.client_side_validation and ('user_id' not in local_var_params or # noqa: E501 - local_var_params['user_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_id` when calling `v1_update_user`") # noqa: E501 - # verify the required parameter 'user_update' is set - if self.api_client.client_side_validation and ('user_update' not in local_var_params or # noqa: E501 - local_var_params['user_update'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `user_update` when calling `v1_update_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userId'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'user_update' in local_var_params: - body_params = local_var_params['user_update'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'PATCH', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/users/{userId}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_upgrade_instance(self, instance_id, instance_upgrade_body, **kwargs): # noqa: E501 - """Upgrade iOS version # noqa: E501 - - Upgrade iOS version # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_upgrade_instance(instance_id, instance_upgrade_body, async_req=True) - >>> result = thread.get() - - :param instance_id: (required) - :type instance_id: str - :param instance_upgrade_body: (required) - :type instance_upgrade_body: InstanceUpgradeBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_upgrade_instance_with_http_info(instance_id, instance_upgrade_body, **kwargs) # noqa: E501 - - def v1_upgrade_instance_with_http_info(self, instance_id, instance_upgrade_body, **kwargs): # noqa: E501 - """Upgrade iOS version # noqa: E501 - - Upgrade iOS version # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_upgrade_instance_with_http_info(instance_id, instance_upgrade_body, async_req=True) - >>> result = thread.get() - - :param instance_id: (required) - :type instance_id: str - :param instance_upgrade_body: (required) - :type instance_upgrade_body: InstanceUpgradeBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'instance_upgrade_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_upgrade_instance" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v1_upgrade_instance`") # noqa: E501 - # verify the required parameter 'instance_upgrade_body' is set - if self.api_client.client_side_validation and ('instance_upgrade_body' not in local_var_params or # noqa: E501 - local_var_params['instance_upgrade_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_upgrade_body` when calling `v1_upgrade_instance`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'instance_upgrade_body' in local_var_params: - body_params = local_var_params['instance_upgrade_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/instances/{instanceId}/upgrade', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_upload_image_data(self, image_id, body, **kwargs): # noqa: E501 - """Upload Image Data # noqa: E501 - - If the active project has enough remaining quota, updates an Image with the contents of the request body. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_upload_image_data(image_id, body, async_req=True) - >>> result = thread.get() - - :param image_id: Image ID - uuid (required) - :type image_id: str - :param body: Uploaded Image (required) - :type body: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_upload_image_data_with_http_info(image_id, body, **kwargs) # noqa: E501 - - def v1_upload_image_data_with_http_info(self, image_id, body, **kwargs): # noqa: E501 - """Upload Image Data # noqa: E501 - - If the active project has enough remaining quota, updates an Image with the contents of the request body. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_upload_image_data_with_http_info(image_id, body, async_req=True) - >>> result = thread.get() - - :param image_id: Image ID - uuid (required) - :type image_id: str - :param body: Uploaded Image (required) - :type body: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'image_id', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_upload_image_data" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'image_id' is set - if self.api_client.client_side_validation and ('image_id' not in local_var_params or # noqa: E501 - local_var_params['image_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `image_id` when calling `v1_upload_image_data`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `v1_upload_image_data`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'image_id' in local_var_params: - path_params['imageId'] = local_var_params['image_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['binary'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/images/{imageId}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_user_agree_terms(self, **kwargs): # noqa: E501 - """Consent to the current terms and conditions # noqa: E501 - - Consent to the current terms and conditions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_user_agree_terms(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: AgreedAck - """ - kwargs['_return_http_data_only'] = True - return self.v1_user_agree_terms_with_http_info(**kwargs) # noqa: E501 - - def v1_user_agree_terms_with_http_info(self, **kwargs): # noqa: E501 - """Consent to the current terms and conditions # noqa: E501 - - Consent to the current terms and conditions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_user_agree_terms_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(AgreedAck, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_user_agree_terms" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "AgreedAck", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/users/agree', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_users_change_password_post(self, password_change_body, **kwargs): # noqa: E501 - """Change User Password # noqa: E501 - - Authenticated solely by the old-password. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_users_change_password_post(password_change_body, async_req=True) - >>> result = thread.get() - - :param password_change_body: (required) - :type password_change_body: PasswordChangeBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_users_change_password_post_with_http_info(password_change_body, **kwargs) # noqa: E501 - - def v1_users_change_password_post_with_http_info(self, password_change_body, **kwargs): # noqa: E501 - """Change User Password # noqa: E501 - - Authenticated solely by the old-password. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_users_change_password_post_with_http_info(password_change_body, async_req=True) - >>> result = thread.get() - - :param password_change_body: (required) - :type password_change_body: PasswordChangeBody - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - 'password_change_body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_users_change_password_post" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'password_change_body' is set - if self.api_client.client_side_validation and ('password_change_body' not in local_var_params or # noqa: E501 - local_var_params['password_change_body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `password_change_body` when calling `v1_users_change_password_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'password_change_body' in local_var_params: - body_params = local_var_params['password_change_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/users/change-password', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_users_login(self, credentials, **kwargs): # noqa: E501 - """Log In # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_users_login(credentials, async_req=True) - >>> result = thread.get() - - :param credentials: Authorization data (required) - :type credentials: Credentials - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Token - """ - kwargs['_return_http_data_only'] = True - return self.v1_users_login_with_http_info(credentials, **kwargs) # noqa: E501 - - def v1_users_login_with_http_info(self, credentials, **kwargs): # noqa: E501 - """Log In # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_users_login_with_http_info(credentials, async_req=True) - >>> result = thread.get() - - :param credentials: Authorization data (required) - :type credentials: Credentials - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Token, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'credentials' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_users_login" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'credentials' is set - if self.api_client.client_side_validation and ('credentials' not in local_var_params or # noqa: E501 - local_var_params['credentials'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `credentials` when calling `v1_users_login`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'credentials' in local_var_params: - body_params = local_var_params['credentials'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - response_types_map = { - 200: "Token", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/users/login', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_web_player_allowed_domains(self, **kwargs): # noqa: E501 - """Retrieve the list of allowed domains for all Webplayer sessions # noqa: E501 - - Retrieve the list of allowed domains for all Webplayer sessions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_allowed_domains(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs['_return_http_data_only'] = True - return self.v1_web_player_allowed_domains_with_http_info(**kwargs) # noqa: E501 - - def v1_web_player_allowed_domains_with_http_info(self, **kwargs): # noqa: E501 - """Retrieve the list of allowed domains for all Webplayer sessions # noqa: E501 - - Retrieve the list of allowed domains for all Webplayer sessions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_allowed_domains_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_web_player_allowed_domains" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = {} - - return self.api_client.call_api( - '/v1/webplayer/allowedDomains', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_web_player_create_session(self, web_player_create_session_request, **kwargs): # noqa: E501 - """Create a new Webplayer Session # noqa: E501 - - Create a new Webplayer Session # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_create_session(web_player_create_session_request, async_req=True) - >>> result = thread.get() - - :param web_player_create_session_request: Request Data (required) - :type web_player_create_session_request: WebPlayerCreateSessionRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: WebPlayerSession - """ - kwargs['_return_http_data_only'] = True - return self.v1_web_player_create_session_with_http_info(web_player_create_session_request, **kwargs) # noqa: E501 - - def v1_web_player_create_session_with_http_info(self, web_player_create_session_request, **kwargs): # noqa: E501 - """Create a new Webplayer Session # noqa: E501 - - Create a new Webplayer Session # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_create_session_with_http_info(web_player_create_session_request, async_req=True) - >>> result = thread.get() - - :param web_player_create_session_request: Request Data (required) - :type web_player_create_session_request: WebPlayerCreateSessionRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(WebPlayerSession, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'web_player_create_session_request' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_web_player_create_session" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'web_player_create_session_request' is set - if self.api_client.client_side_validation and ('web_player_create_session_request' not in local_var_params or # noqa: E501 - local_var_params['web_player_create_session_request'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `web_player_create_session_request` when calling `v1_web_player_create_session`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - if 'web_player_create_session_request' in local_var_params: - body_params = local_var_params['web_player_create_session_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = local_var_params.get('_content_type', - self.api_client.select_header_content_type( - ['application/json'], - 'POST', body_params)) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "WebPlayerSession", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/webplayer', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_web_player_destroy_session(self, session_id, **kwargs): # noqa: E501 - """Tear down a Webplayer Session # noqa: E501 - - Tear down a Webplayer Session # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_destroy_session(session_id, async_req=True) - >>> result = thread.get() - - :param session_id: Webplayer Session identifier (required) - :type session_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[str] - """ - kwargs['_return_http_data_only'] = True - return self.v1_web_player_destroy_session_with_http_info(session_id, **kwargs) # noqa: E501 - - def v1_web_player_destroy_session_with_http_info(self, session_id, **kwargs): # noqa: E501 - """Tear down a Webplayer Session # noqa: E501 - - Tear down a Webplayer Session # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_destroy_session_with_http_info(session_id, async_req=True) - >>> result = thread.get() - - :param session_id: Webplayer Session identifier (required) - :type session_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'session_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_web_player_destroy_session" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'session_id' is set - if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501 - local_var_params['session_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `session_id` when calling `v1_web_player_destroy_session`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'session_id' in local_var_params: - path_params['sessionId'] = local_var_params['session_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[str]", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/webplayer/{sessionId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_web_player_list_sessions(self, **kwargs): # noqa: E501 - """List all Webplayer sessions # noqa: E501 - - List all Webplayer sessions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_list_sessions(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: list[WebPlayerSession] - """ - kwargs['_return_http_data_only'] = True - return self.v1_web_player_list_sessions_with_http_info(**kwargs) # noqa: E501 - - def v1_web_player_list_sessions_with_http_info(self, **kwargs): # noqa: E501 - """List all Webplayer sessions # noqa: E501 - - List all Webplayer sessions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_list_sessions_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(list[WebPlayerSession], status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_web_player_list_sessions" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "list[WebPlayerSession]", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v1/webplayer', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v1_web_player_session_info(self, session_id, **kwargs): # noqa: E501 - """Retrieve Webplayer Session Information # noqa: E501 - - Retrieve Webplayer Session Information # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_session_info(session_id, async_req=True) - >>> result = thread.get() - - :param session_id: Webplayer Session identifier (required) - :type session_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: WebPlayerSession - """ - kwargs['_return_http_data_only'] = True - return self.v1_web_player_session_info_with_http_info(session_id, **kwargs) # noqa: E501 - - def v1_web_player_session_info_with_http_info(self, session_id, **kwargs): # noqa: E501 - """Retrieve Webplayer Session Information # noqa: E501 - - Retrieve Webplayer Session Information # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v1_web_player_session_info_with_http_info(session_id, async_req=True) - >>> result = thread.get() - - :param session_id: Webplayer Session identifier (required) - :type session_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(WebPlayerSession, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'session_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v1_web_player_session_info" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'session_id' is set - if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501 - local_var_params['session_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `session_id` when calling `v1_web_player_session_info`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'session_id' in local_var_params: - path_params['sessionId'] = local_var_params['session_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "WebPlayerSession", - 400: "UserError", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v1/webplayer/{sessionId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v2_get_instance_quick_connect_command(self, instance_id, **kwargs): # noqa: E501 - """Recommended SSH Command for Quick Connect # noqa: E501 - - Recommended SSH Command for Quick Connect # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v2_get_instance_quick_connect_command(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: str - """ - kwargs['_return_http_data_only'] = True - return self.v2_get_instance_quick_connect_command_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v2_get_instance_quick_connect_command_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Recommended SSH Command for Quick Connect # noqa: E501 - - Recommended SSH Command for Quick Connect # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v2_get_instance_quick_connect_command_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v2_get_instance_quick_connect_command" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v2_get_instance_quick_connect_command`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "str", - 400: "UserError", - 403: "ApiError", - } - - return self.api_client.call_api( - '/v2/instances/{instanceId}/quickConnectCommand', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) - - def v2_get_instance_state(self, instance_id, **kwargs): # noqa: E501 - """Get state of Instance # noqa: E501 - - Get state of Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v2_get_instance_state(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param return_attr: The attributes to return. - :type return_attr: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: InstanceState - """ - kwargs['_return_http_data_only'] = True - return self.v2_get_instance_state_with_http_info(instance_id, **kwargs) # noqa: E501 - - def v2_get_instance_state_with_http_info(self, instance_id, **kwargs): # noqa: E501 - """Get state of Instance # noqa: E501 - - Get state of Instance # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.v2_get_instance_state_with_http_info(instance_id, async_req=True) - >>> result = thread.get() - - :param instance_id: Instance ID - uuid (required) - :type instance_id: str - :param return_attr: The attributes to return. - :type return_attr: list[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _return_http_data_only: response data without head status code - and headers - :type _return_http_data_only: bool, optional - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :type _preload_content: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(InstanceState, status_code(int), headers(HTTPHeaderDict)) - """ - - local_var_params = locals() - - all_params = [ - 'instance_id', - 'return_attr' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout', - '_request_auth', - '_content_type', - '_headers' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method v2_get_instance_state" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'instance_id' is set - if self.api_client.client_side_validation and ('instance_id' not in local_var_params or # noqa: E501 - local_var_params['instance_id'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `instance_id` when calling `v2_get_instance_state`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'instance_id' in local_var_params: - path_params['instanceId'] = local_var_params['instance_id'] # noqa: E501 - - query_params = [] - if 'return_attr' in local_var_params and local_var_params['return_attr'] is not None: # noqa: E501 - query_params.append(('returnAttr', local_var_params['return_attr'])) # noqa: E501 - collection_formats['returnAttr'] = 'multi' # noqa: E501 - - header_params = dict(local_var_params.get('_headers', {})) - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerAuth'] # noqa: E501 - - response_types_map = { - 200: "InstanceState", - 403: "ApiError", - 404: "UserError", - } - - return self.api_client.call_api( - '/v2/instances/{instanceId}/state', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_types_map=response_types_map, - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats, - _request_auth=local_var_params.get('_request_auth')) diff --git a/corellium_api/api_client.py b/corellium_api/api_client.py deleted file mode 100644 index bdd225e..0000000 --- a/corellium_api/api_client.py +++ /dev/null @@ -1,701 +0,0 @@ -# coding: utf-8 -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - -from __future__ import absolute_import - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from corellium_api.configuration import Configuration -import corellium_api.models -from corellium_api import rest -from corellium_api.exceptions import ApiValueError, ApiException - - -class ApiClient(object): - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): - if configuration is None: - configuration = Configuration.get_default_copy() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.4.2/python' - self.client_side_validation = configuration.client_side_validation - - async def __aenter__(self): - return self - - async def __aexit__(self, exc_type, exc_value, traceback): - await self.close() - - async def close(self): - await self.rest_client.close() - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - async def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_types_map=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None, - _request_auth=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, query_params, auth_settings, - request_auth=_request_auth) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - try: - # perform request and return response - response_data = await self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - except ApiException as e: - e.body = e.body.decode('utf-8') if six.PY3 else e.body - raise e - - self.last_response = response_data - - return_data = response_data - - if not _preload_content: - return return_data - - response_type = response_types_map.get(response_data.status, None) - - if six.PY3 and response_type not in ["file", "bytes"]: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - - # deserialize response data - - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.openapi_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(corellium_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_types_map=None, auth_settings=None, - async_req=None, _return_http_data_only=None, - collection_formats=None,_preload_content=True, - _request_timeout=None, _host=None, _request_auth=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_token: dict, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _request_auth) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _request_auth)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types, method=None, body=None): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :param method: http method (e.g. POST, PATCH). - :param body: http body to send. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, queries, auth_settings, - request_auth=None): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params(headers, queries, request_auth) - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params(headers, queries, auth_setting) - - def _apply_auth_params(self, headers, queries, auth_setting): - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - has_discriminator = False - if (hasattr(klass, 'get_real_child_model') - and klass.discriminator_value_class_map): - has_discriminator = True - - if not klass.openapi_types and has_discriminator is False: - return data - - kwargs = {} - if (data is not None and - klass.openapi_types is not None and - isinstance(data, (list, dict))): - for attr, attr_type in six.iteritems(klass.openapi_types): - if klass.attribute_map[attr] in data: - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if has_discriminator: - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/corellium_api/configuration.py b/corellium_api/configuration.py deleted file mode 100644 index d4a5102..0000000 --- a/corellium_api/configuration.py +++ /dev/null @@ -1,458 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import copy -import logging -import sys -import urllib3 - -import six -from six.moves import http_client as httplib -from corellium_api.exceptions import ApiValueError - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor - """ - self._base_path = "https://app.corellium.com/api" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("corellium_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - - self.connection_pool_maxsize = 100 - """This value is passed to the aiohttp to limit simultaneous connections. - Default values is 100, None means no-limit. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - def get_default_copy(cls): - """Return new instance of configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'ApiToken or JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.6.0-29198\n"\ - "SDK Package Version: 0.4.2".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://{serverName}/api", - 'description': "", - 'variables': { - 'serverName': { - 'description': "No description provided", - 'default_value': "app.corellium.com", - } - } - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/corellium_api/exceptions.py b/corellium_api/exceptions.py deleted file mode 100644 index 49dd56c..0000000 --- a/corellium_api/exceptions.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -import six - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, six.integer_types): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/corellium_api/models/__init__.py b/corellium_api/models/__init__.py deleted file mode 100644 index 8dc4e48..0000000 --- a/corellium_api/models/__init__.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# import models into model package -from corellium_api.models.activity import Activity -from corellium_api.models.activity_export_dto import ActivityExportDto -from corellium_api.models.activity_export_response import ActivityExportResponse -from corellium_api.models.activity_list import ActivityList -from corellium_api.models.activity_request import ActivityRequest -from corellium_api.models.address import Address -from corellium_api.models.agent_app import AgentApp -from corellium_api.models.agent_app_ready_response import AgentAppReadyResponse -from corellium_api.models.agent_app_status import AgentAppStatus -from corellium_api.models.agent_apps_list import AgentAppsList -from corellium_api.models.agent_apps_status_list import AgentAppsStatusList -from corellium_api.models.agent_error import AgentError -from corellium_api.models.agent_icons import AgentIcons -from corellium_api.models.agent_install_body import AgentInstallBody -from corellium_api.models.agent_profiles_return import AgentProfilesReturn -from corellium_api.models.agent_system_adb_auth import AgentSystemAdbAuth -from corellium_api.models.agent_system_get_prop_body import AgentSystemGetPropBody -from corellium_api.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody -from corellium_api.models.agent_value_return import AgentValueReturn -from corellium_api.models.agreed_ack import AgreedAck -from corellium_api.models.allowed_domains_response import AllowedDomainsResponse -from corellium_api.models.api_conflict_error import ApiConflictError -from corellium_api.models.api_error import ApiError -from corellium_api.models.api_internal_consistency_error import ApiInternalConsistencyError -from corellium_api.models.api_not_found_error import ApiNotFoundError -from corellium_api.models.api_token import ApiToken -from corellium_api.models.assessment import Assessment -from corellium_api.models.assessment_history import AssessmentHistory -from corellium_api.models.assessment_history_line_item import AssessmentHistoryLineItem -from corellium_api.models.assessment_id_status import AssessmentIdStatus -from corellium_api.models.attach_interface_request import AttachInterfaceRequest -from corellium_api.models.auth_provider import AuthProvider -from corellium_api.models.bit import Bit -from corellium_api.models.btrace_enable_options import BtraceEnableOptions -from corellium_api.models.button import Button -from corellium_api.models.check_subdomain_response import CheckSubdomainResponse -from corellium_api.models.config_response import ConfigResponse -from corellium_api.models.config_response_maintenance import ConfigResponseMaintenance -from corellium_api.models.coupon_options import CouponOptions -from corellium_api.models.create_assessment_dto import CreateAssessmentDto -from corellium_api.models.create_interconnect_request import CreateInterconnectRequest -from corellium_api.models.create_network_connection_options import CreateNetworkConnectionOptions -from corellium_api.models.create_team import CreateTeam -from corellium_api.models.created_by import CreatedBy -from corellium_api.models.credentials import Credentials -from corellium_api.models.detach_interface_request import DetachInterfaceRequest -from corellium_api.models.device import Device -from corellium_api.models.domain_auth_provider_request import DomainAuthProviderRequest -from corellium_api.models.domain_auth_provider_response import DomainAuthProviderResponse -from corellium_api.models.domain_options import DomainOptions -from corellium_api.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo -from corellium_api.models.extension import Extension -from corellium_api.models.features import Features -from corellium_api.models.file_changes import FileChanges -from corellium_api.models.firmware import Firmware -from corellium_api.models.firmware_asset import FirmwareAsset -from corellium_api.models.get_assessments_by_instance_id500_response import GetAssessmentsByInstanceId500Response -from corellium_api.models.get_interconnects_response import GetInterconnectsResponse -from corellium_api.models.gpio_state_definition import GpioStateDefinition -from corellium_api.models.gpios_state import GpiosState -from corellium_api.models.grant_trial_request_response import GrantTrialRequestResponse -from corellium_api.models.hook import Hook -from corellium_api.models.image import Image -from corellium_api.models.input_response import InputResponse -from corellium_api.models.install_firmware_request import InstallFirmwareRequest -from corellium_api.models.install_firmware_response import InstallFirmwareResponse -from corellium_api.models.instance import Instance -from corellium_api.models.instance_agent_state import InstanceAgentState -from corellium_api.models.instance_boot_options import InstanceBootOptions -from corellium_api.models.instance_boot_options_additional_tag import InstanceBootOptionsAdditionalTag -from corellium_api.models.instance_console_endpoint import InstanceConsoleEndpoint -from corellium_api.models.instance_create_options import InstanceCreateOptions -from corellium_api.models.instance_input import InstanceInput -from corellium_api.models.instance_interface import InstanceInterface -from corellium_api.models.instance_netdump_state import InstanceNetdumpState -from corellium_api.models.instance_netmon_state import InstanceNetmonState -from corellium_api.models.instance_return import InstanceReturn -from corellium_api.models.instance_services import InstanceServices -from corellium_api.models.instance_start_options import InstanceStartOptions -from corellium_api.models.instance_state import InstanceState -from corellium_api.models.instance_stop_options import InstanceStopOptions -from corellium_api.models.instance_upgrade_body import InstanceUpgradeBody -from corellium_api.models.interconnect_response import InterconnectResponse -from corellium_api.models.invitation import Invitation -from corellium_api.models.invite_revoke_params import InviteRevokeParams -from corellium_api.models.invite_revoke_params_ids import InviteRevokeParamsIds -from corellium_api.models.kcrange import Kcrange -from corellium_api.models.kernel_task import KernelTask -from corellium_api.models.kernel_thread import KernelThread -from corellium_api.models.logging import Logging -from corellium_api.models.maintenance import Maintenance -from corellium_api.models.media_play_body import MediaPlayBody -from corellium_api.models.metered_subscription_usage import MeteredSubscriptionUsage -from corellium_api.models.model import Model -from corellium_api.models.model_software import ModelSoftware -from corellium_api.models.netdump_filter import NetdumpFilter -from corellium_api.models.network_connection import NetworkConnection -from corellium_api.models.network_connection_offset_pagination_result import NetworkConnectionOffsetPaginationResult -from corellium_api.models.network_connection_provider import NetworkConnectionProvider -from corellium_api.models.network_connection_provider_offset_pagination_result import NetworkConnectionProviderOffsetPaginationResult -from corellium_api.models.network_status_response import NetworkStatusResponse -from corellium_api.models.node_information import NodeInformation -from corellium_api.models.open_id_config import OpenIDConfig -from corellium_api.models.pagination import Pagination -from corellium_api.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest -from corellium_api.models.password_change_body import PasswordChangeBody -from corellium_api.models.password_reset_body import PasswordResetBody -from corellium_api.models.patch_instance_options import PatchInstanceOptions -from corellium_api.models.patch_instance_read_only import PatchInstanceReadOnly -from corellium_api.models.peripherals_data import PeripheralsData -from corellium_api.models.plan import Plan -from corellium_api.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload -from corellium_api.models.project import Project -from corellium_api.models.project_key import ProjectKey -from corellium_api.models.project_network_state import ProjectNetworkState -from corellium_api.models.project_quota import ProjectQuota -from corellium_api.models.project_settings import ProjectSettings -from corellium_api.models.project_usage import ProjectUsage -from corellium_api.models.proxy_config import ProxyConfig -from corellium_api.models.reset_link_body import ResetLinkBody -from corellium_api.models.reset_link_info_return import ResetLinkInfoReturn -from corellium_api.models.restore_backup_data import RestoreBackupData -from corellium_api.models.role import Role -from corellium_api.models.rotate_body import RotateBody -from corellium_api.models.shared_snapshots_info import SharedSnapshotsInfo -from corellium_api.models.snapshot import Snapshot -from corellium_api.models.snapshot_creation_options import SnapshotCreationOptions -from corellium_api.models.snapshot_member import SnapshotMember -from corellium_api.models.snapshot_owner import SnapshotOwner -from corellium_api.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload -from corellium_api.models.snapshot_sharing import SnapshotSharing -from corellium_api.models.snapshot_sharing_permissions import SnapshotSharingPermissions -from corellium_api.models.snapshot_status import SnapshotStatus -from corellium_api.models.sslsplit_filter import SslsplitFilter -from corellium_api.models.subscriber_invite import SubscriberInvite -from corellium_api.models.team import Team -from corellium_api.models.team_create import TeamCreate -from corellium_api.models.test_assessment_dto import TestAssessmentDto -from corellium_api.models.text_input import TextInput -from corellium_api.models.token import Token -from corellium_api.models.touch_curve_input import TouchCurveInput -from corellium_api.models.touch_input import TouchInput -from corellium_api.models.touch_input_buttons_inner import TouchInputButtonsInner -from corellium_api.models.trial import Trial -from corellium_api.models.trial_extension import TrialExtension -from corellium_api.models.trial_request_metadata import TrialRequestMetadata -from corellium_api.models.trial_request_options import TrialRequestOptions -from corellium_api.models.update_assessment_dto import UpdateAssessmentDto -from corellium_api.models.update_extension import UpdateExtension -from corellium_api.models.update_interconnect_request import UpdateInterconnectRequest -from corellium_api.models.update_network_connection_options import UpdateNetworkConnectionOptions -from corellium_api.models.update_trial_request_params import UpdateTrialRequestParams -from corellium_api.models.user import User -from corellium_api.models.user_create import UserCreate -from corellium_api.models.user_create_return import UserCreateReturn -from corellium_api.models.user_error import UserError -from corellium_api.models.user_snapshots import UserSnapshots -from corellium_api.models.user_update import UserUpdate -from corellium_api.models.v1_check_subdomain_existence_parameters import V1CheckSubdomainExistenceParameters -from corellium_api.models.v1_create_hook_parameters import V1CreateHookParameters -from corellium_api.models.v1_load_extension_parameters import V1LoadExtensionParameters -from corellium_api.models.v1_set_state_body import V1SetStateBody -from corellium_api.models.v1_update_hook_parameters import V1UpdateHookParameters -from corellium_api.models.validation_error import ValidationError -from corellium_api.models.volume_options import VolumeOptions -from corellium_api.models.vpn_definition import VpnDefinition -from corellium_api.models.web_player_create_session_request import WebPlayerCreateSessionRequest -from corellium_api.models.web_player_session import WebPlayerSession diff --git a/corellium_api/models/activity.py b/corellium_api/models/activity.py deleted file mode 100644 index 1e0e55a..0000000 --- a/corellium_api/models/activity.py +++ /dev/null @@ -1,402 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Activity(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'domain': 'str', - 'actor': 'str', - 'event': 'str', - 'outcome': 'str', - 'metadata': 'object', - 'corellium_version': 'str', - 'project_id': 'str', - 'instance_id': 'str', - 'created_at': 'str', - 'updated_at': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'domain': 'domain', - 'actor': 'actor', - 'event': 'event', - 'outcome': 'outcome', - 'metadata': 'metadata', - 'corellium_version': 'corelliumVersion', - 'project_id': 'projectId', - 'instance_id': 'instanceId', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, identifier=None, domain=None, actor=None, event=None, outcome=None, metadata=None, corellium_version=None, project_id=None, instance_id=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """Activity - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._domain = None - self._actor = None - self._event = None - self._outcome = None - self._metadata = None - self._corellium_version = None - self._project_id = None - self._instance_id = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - self.identifier = identifier - self.domain = domain - self.actor = actor - self.event = event - self.outcome = outcome - self.metadata = metadata - self.corellium_version = corellium_version - self.project_id = project_id - self.instance_id = instance_id - self.created_at = created_at - self.updated_at = updated_at - - @property - def identifier(self): - """Gets the identifier of this Activity. # noqa: E501 - - Unique identifier for the activity entry # noqa: E501 - - :return: The identifier of this Activity. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this Activity. - - Unique identifier for the activity entry # noqa: E501 - - :param identifier: The identifier of this Activity. # noqa: E501 - :type identifier: str - """ - - self._identifier = identifier - - @property - def domain(self): - """Gets the domain of this Activity. # noqa: E501 - - Unique identifier for the domain # noqa: E501 - - :return: The domain of this Activity. # noqa: E501 - :rtype: str - """ - return self._domain - - @domain.setter - def domain(self, domain): - """Sets the domain of this Activity. - - Unique identifier for the domain # noqa: E501 - - :param domain: The domain of this Activity. # noqa: E501 - :type domain: str - """ - - self._domain = domain - - @property - def actor(self): - """Gets the actor of this Activity. # noqa: E501 - - Unique identifier for the user # noqa: E501 - - :return: The actor of this Activity. # noqa: E501 - :rtype: str - """ - return self._actor - - @actor.setter - def actor(self, actor): - """Sets the actor of this Activity. - - Unique identifier for the user # noqa: E501 - - :param actor: The actor of this Activity. # noqa: E501 - :type actor: str - """ - - self._actor = actor - - @property - def event(self): - """Gets the event of this Activity. # noqa: E501 - - Resource associated with the activity # noqa: E501 - - :return: The event of this Activity. # noqa: E501 - :rtype: str - """ - return self._event - - @event.setter - def event(self, event): - """Sets the event of this Activity. - - Resource associated with the activity # noqa: E501 - - :param event: The event of this Activity. # noqa: E501 - :type event: str - """ - - self._event = event - - @property - def outcome(self): - """Gets the outcome of this Activity. # noqa: E501 - - The outcome of the activity # noqa: E501 - - :return: The outcome of this Activity. # noqa: E501 - :rtype: str - """ - return self._outcome - - @outcome.setter - def outcome(self, outcome): - """Sets the outcome of this Activity. - - The outcome of the activity # noqa: E501 - - :param outcome: The outcome of this Activity. # noqa: E501 - :type outcome: str - """ - - self._outcome = outcome - - @property - def metadata(self): - """Gets the metadata of this Activity. # noqa: E501 - - Related information that pertains to the activity # noqa: E501 - - :return: The metadata of this Activity. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this Activity. - - Related information that pertains to the activity # noqa: E501 - - :param metadata: The metadata of this Activity. # noqa: E501 - :type metadata: object - """ - - self._metadata = metadata - - @property - def corellium_version(self): - """Gets the corellium_version of this Activity. # noqa: E501 - - The Corellium version this activity occurred in # noqa: E501 - - :return: The corellium_version of this Activity. # noqa: E501 - :rtype: str - """ - return self._corellium_version - - @corellium_version.setter - def corellium_version(self, corellium_version): - """Sets the corellium_version of this Activity. - - The Corellium version this activity occurred in # noqa: E501 - - :param corellium_version: The corellium_version of this Activity. # noqa: E501 - :type corellium_version: str - """ - - self._corellium_version = corellium_version - - @property - def project_id(self): - """Gets the project_id of this Activity. # noqa: E501 - - Unique identifier for project if applicable # noqa: E501 - - :return: The project_id of this Activity. # noqa: E501 - :rtype: str - """ - return self._project_id - - @project_id.setter - def project_id(self, project_id): - """Sets the project_id of this Activity. - - Unique identifier for project if applicable # noqa: E501 - - :param project_id: The project_id of this Activity. # noqa: E501 - :type project_id: str - """ - - self._project_id = project_id - - @property - def instance_id(self): - """Gets the instance_id of this Activity. # noqa: E501 - - Unique identifier for instance if applicable # noqa: E501 - - :return: The instance_id of this Activity. # noqa: E501 - :rtype: str - """ - return self._instance_id - - @instance_id.setter - def instance_id(self, instance_id): - """Sets the instance_id of this Activity. - - Unique identifier for instance if applicable # noqa: E501 - - :param instance_id: The instance_id of this Activity. # noqa: E501 - :type instance_id: str - """ - - self._instance_id = instance_id - - @property - def created_at(self): - """Gets the created_at of this Activity. # noqa: E501 - - Timestamp of when the activity was created # noqa: E501 - - :return: The created_at of this Activity. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Activity. - - Timestamp of when the activity was created # noqa: E501 - - :param created_at: The created_at of this Activity. # noqa: E501 - :type created_at: str - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Activity. # noqa: E501 - - Timestamp of when the activity was last updated # noqa: E501 - - :return: The updated_at of this Activity. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Activity. - - Timestamp of when the activity was last updated # noqa: E501 - - :param updated_at: The updated_at of this Activity. # noqa: E501 - :type updated_at: str - """ - - self._updated_at = updated_at - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Activity): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Activity): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/activity_export_dto.py b/corellium_api/models/activity_export_dto.py deleted file mode 100644 index b844e1c..0000000 --- a/corellium_api/models/activity_export_dto.py +++ /dev/null @@ -1,321 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ActivityExportDto(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'resource': 'str', - 'order_by': 'str', - 'instance': 'str', - 'project': 'str', - 'actor': 'str', - 'search': 'str', - 'to': 'str', - '_from': 'str' - } - - attribute_map = { - 'resource': 'resource', - 'order_by': 'orderBy', - 'instance': 'instance', - 'project': 'project', - 'actor': 'actor', - 'search': 'search', - 'to': 'to', - '_from': 'from' - } - - def __init__(self, resource=None, order_by=None, instance=None, project=None, actor=None, search=None, to=None, _from=None, local_vars_configuration=None): # noqa: E501 - """ActivityExportDto - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._resource = None - self._order_by = None - self._instance = None - self._project = None - self._actor = None - self._search = None - self._to = None - self.__from = None - self.discriminator = None - - self.resource = resource - self.order_by = order_by - self.instance = instance - self.project = project - self.actor = actor - self.search = search - self.to = to - self._from = _from - - @property - def resource(self): - """Gets the resource of this ActivityExportDto. # noqa: E501 - - Event to filter on # noqa: E501 - - :return: The resource of this ActivityExportDto. # noqa: E501 - :rtype: str - """ - return self._resource - - @resource.setter - def resource(self, resource): - """Sets the resource of this ActivityExportDto. - - Event to filter on # noqa: E501 - - :param resource: The resource of this ActivityExportDto. # noqa: E501 - :type resource: str - """ - - self._resource = resource - - @property - def order_by(self): - """Gets the order_by of this ActivityExportDto. # noqa: E501 - - Column to order by # noqa: E501 - - :return: The order_by of this ActivityExportDto. # noqa: E501 - :rtype: str - """ - return self._order_by - - @order_by.setter - def order_by(self, order_by): - """Sets the order_by of this ActivityExportDto. - - Column to order by # noqa: E501 - - :param order_by: The order_by of this ActivityExportDto. # noqa: E501 - :type order_by: str - """ - - self._order_by = order_by - - @property - def instance(self): - """Gets the instance of this ActivityExportDto. # noqa: E501 - - Instance ID # noqa: E501 - - :return: The instance of this ActivityExportDto. # noqa: E501 - :rtype: str - """ - return self._instance - - @instance.setter - def instance(self, instance): - """Sets the instance of this ActivityExportDto. - - Instance ID # noqa: E501 - - :param instance: The instance of this ActivityExportDto. # noqa: E501 - :type instance: str - """ - - self._instance = instance - - @property - def project(self): - """Gets the project of this ActivityExportDto. # noqa: E501 - - Project ID # noqa: E501 - - :return: The project of this ActivityExportDto. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this ActivityExportDto. - - Project ID # noqa: E501 - - :param project: The project of this ActivityExportDto. # noqa: E501 - :type project: str - """ - - self._project = project - - @property - def actor(self): - """Gets the actor of this ActivityExportDto. # noqa: E501 - - User ID # noqa: E501 - - :return: The actor of this ActivityExportDto. # noqa: E501 - :rtype: str - """ - return self._actor - - @actor.setter - def actor(self, actor): - """Sets the actor of this ActivityExportDto. - - User ID # noqa: E501 - - :param actor: The actor of this ActivityExportDto. # noqa: E501 - :type actor: str - """ - - self._actor = actor - - @property - def search(self): - """Gets the search of this ActivityExportDto. # noqa: E501 - - Arbitrary search string against activity metadata # noqa: E501 - - :return: The search of this ActivityExportDto. # noqa: E501 - :rtype: str - """ - return self._search - - @search.setter - def search(self, search): - """Sets the search of this ActivityExportDto. - - Arbitrary search string against activity metadata # noqa: E501 - - :param search: The search of this ActivityExportDto. # noqa: E501 - :type search: str - """ - - self._search = search - - @property - def to(self): - """Gets the to of this ActivityExportDto. # noqa: E501 - - Include activities up to given ISO 8601 Date # noqa: E501 - - :return: The to of this ActivityExportDto. # noqa: E501 - :rtype: str - """ - return self._to - - @to.setter - def to(self, to): - """Sets the to of this ActivityExportDto. - - Include activities up to given ISO 8601 Date # noqa: E501 - - :param to: The to of this ActivityExportDto. # noqa: E501 - :type to: str - """ - - self._to = to - - @property - def _from(self): - """Gets the _from of this ActivityExportDto. # noqa: E501 - - Include activities from given ISO 8601 Date # noqa: E501 - - :return: The _from of this ActivityExportDto. # noqa: E501 - :rtype: str - """ - return self.__from - - @_from.setter - def _from(self, _from): - """Sets the _from of this ActivityExportDto. - - Include activities from given ISO 8601 Date # noqa: E501 - - :param _from: The _from of this ActivityExportDto. # noqa: E501 - :type _from: str - """ - - self.__from = _from - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ActivityExportDto): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ActivityExportDto): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/activity_export_response.py b/corellium_api/models/activity_export_response.py deleted file mode 100644 index f95335c..0000000 --- a/corellium_api/models/activity_export_response.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ActivityExportResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str' - } - - attribute_map = { - 'id': 'id' - } - - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - """ActivityExportResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self.discriminator = None - - self.id = id - - @property - def id(self): - """Gets the id of this ActivityExportResponse. # noqa: E501 - - Task identifier # noqa: E501 - - :return: The id of this ActivityExportResponse. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ActivityExportResponse. - - Task identifier # noqa: E501 - - :param id: The id of this ActivityExportResponse. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ActivityExportResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ActivityExportResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/activity_list.py b/corellium_api/models/activity_list.py deleted file mode 100644 index d69b614..0000000 --- a/corellium_api/models/activity_list.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ActivityList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'data': 'list[Activity]', - 'pagination': 'Pagination' - } - - attribute_map = { - 'data': 'data', - 'pagination': 'pagination' - } - - def __init__(self, data=None, pagination=None, local_vars_configuration=None): # noqa: E501 - """ActivityList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._data = None - self._pagination = None - self.discriminator = None - - self.data = data - if pagination is not None: - self.pagination = pagination - - @property - def data(self): - """Gets the data of this ActivityList. # noqa: E501 - - List of activities # noqa: E501 - - :return: The data of this ActivityList. # noqa: E501 - :rtype: list[Activity] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this ActivityList. - - List of activities # noqa: E501 - - :param data: The data of this ActivityList. # noqa: E501 - :type data: list[Activity] - """ - - self._data = data - - @property - def pagination(self): - """Gets the pagination of this ActivityList. # noqa: E501 - - - :return: The pagination of this ActivityList. # noqa: E501 - :rtype: Pagination - """ - return self._pagination - - @pagination.setter - def pagination(self, pagination): - """Sets the pagination of this ActivityList. - - - :param pagination: The pagination of this ActivityList. # noqa: E501 - :type pagination: Pagination - """ - - self._pagination = pagination - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ActivityList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ActivityList): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/activity_request.py b/corellium_api/models/activity_request.py deleted file mode 100644 index 180bd1f..0000000 --- a/corellium_api/models/activity_request.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ActivityRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'resource': 'str', - 'limit': 'float', - 'order_by': 'str', - 'page': 'float', - 'instance': 'str', - 'project': 'str', - 'actor': 'str', - 'search': 'str', - 'to': 'str', - '_from': 'str' - } - - attribute_map = { - 'resource': 'resource', - 'limit': 'limit', - 'order_by': 'orderBy', - 'page': 'page', - 'instance': 'instance', - 'project': 'project', - 'actor': 'actor', - 'search': 'search', - 'to': 'to', - '_from': 'from' - } - - def __init__(self, resource=None, limit=None, order_by=None, page=None, instance=None, project=None, actor=None, search=None, to=None, _from=None, local_vars_configuration=None): # noqa: E501 - """ActivityRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._resource = None - self._limit = None - self._order_by = None - self._page = None - self._instance = None - self._project = None - self._actor = None - self._search = None - self._to = None - self.__from = None - self.discriminator = None - - self.resource = resource - self.limit = limit - self.order_by = order_by - self.page = page - self.instance = instance - self.project = project - self.actor = actor - self.search = search - self.to = to - self._from = _from - - @property - def resource(self): - """Gets the resource of this ActivityRequest. # noqa: E501 - - Resource filter # noqa: E501 - - :return: The resource of this ActivityRequest. # noqa: E501 - :rtype: str - """ - return self._resource - - @resource.setter - def resource(self, resource): - """Sets the resource of this ActivityRequest. - - Resource filter # noqa: E501 - - :param resource: The resource of this ActivityRequest. # noqa: E501 - :type resource: str - """ - - self._resource = resource - - @property - def limit(self): - """Gets the limit of this ActivityRequest. # noqa: E501 - - Number of entries to return, defaults to 10 # noqa: E501 - - :return: The limit of this ActivityRequest. # noqa: E501 - :rtype: float - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this ActivityRequest. - - Number of entries to return, defaults to 10 # noqa: E501 - - :param limit: The limit of this ActivityRequest. # noqa: E501 - :type limit: float - """ - - self._limit = limit - - @property - def order_by(self): - """Gets the order_by of this ActivityRequest. # noqa: E501 - - Sorting order ('-createdAt' or 'createdAt') # noqa: E501 - - :return: The order_by of this ActivityRequest. # noqa: E501 - :rtype: str - """ - return self._order_by - - @order_by.setter - def order_by(self, order_by): - """Sets the order_by of this ActivityRequest. - - Sorting order ('-createdAt' or 'createdAt') # noqa: E501 - - :param order_by: The order_by of this ActivityRequest. # noqa: E501 - :type order_by: str - """ - - self._order_by = order_by - - @property - def page(self): - """Gets the page of this ActivityRequest. # noqa: E501 - - Paginated results. Must be a positive integer. If not provided, defaults to the first page. # noqa: E501 - - :return: The page of this ActivityRequest. # noqa: E501 - :rtype: float - """ - return self._page - - @page.setter - def page(self, page): - """Sets the page of this ActivityRequest. - - Paginated results. Must be a positive integer. If not provided, defaults to the first page. # noqa: E501 - - :param page: The page of this ActivityRequest. # noqa: E501 - :type page: float - """ - - self._page = page - - @property - def instance(self): - """Gets the instance of this ActivityRequest. # noqa: E501 - - Instance identifier used to filter instance resources # noqa: E501 - - :return: The instance of this ActivityRequest. # noqa: E501 - :rtype: str - """ - return self._instance - - @instance.setter - def instance(self, instance): - """Sets the instance of this ActivityRequest. - - Instance identifier used to filter instance resources # noqa: E501 - - :param instance: The instance of this ActivityRequest. # noqa: E501 - :type instance: str - """ - - self._instance = instance - - @property - def project(self): - """Gets the project of this ActivityRequest. # noqa: E501 - - Instance identifier used to filter instance resources # noqa: E501 - - :return: The project of this ActivityRequest. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this ActivityRequest. - - Instance identifier used to filter instance resources # noqa: E501 - - :param project: The project of this ActivityRequest. # noqa: E501 - :type project: str - """ - - self._project = project - - @property - def actor(self): - """Gets the actor of this ActivityRequest. # noqa: E501 - - Actor identifier used to filter actor resources # noqa: E501 - - :return: The actor of this ActivityRequest. # noqa: E501 - :rtype: str - """ - return self._actor - - @actor.setter - def actor(self, actor): - """Sets the actor of this ActivityRequest. - - Actor identifier used to filter actor resources # noqa: E501 - - :param actor: The actor of this ActivityRequest. # noqa: E501 - :type actor: str - """ - - self._actor = actor - - @property - def search(self): - """Gets the search of this ActivityRequest. # noqa: E501 - - Last filter applied and is a fuzzy match on results # noqa: E501 - - :return: The search of this ActivityRequest. # noqa: E501 - :rtype: str - """ - return self._search - - @search.setter - def search(self, search): - """Sets the search of this ActivityRequest. - - Last filter applied and is a fuzzy match on results # noqa: E501 - - :param search: The search of this ActivityRequest. # noqa: E501 - :type search: str - """ - - self._search = search - - @property - def to(self): - """Gets the to of this ActivityRequest. # noqa: E501 - - Date to filter to, keyed off of createdAt # noqa: E501 - - :return: The to of this ActivityRequest. # noqa: E501 - :rtype: str - """ - return self._to - - @to.setter - def to(self, to): - """Sets the to of this ActivityRequest. - - Date to filter to, keyed off of createdAt # noqa: E501 - - :param to: The to of this ActivityRequest. # noqa: E501 - :type to: str - """ - - self._to = to - - @property - def _from(self): - """Gets the _from of this ActivityRequest. # noqa: E501 - - Date to filter from, keyed off of createdAt # noqa: E501 - - :return: The _from of this ActivityRequest. # noqa: E501 - :rtype: str - """ - return self.__from - - @_from.setter - def _from(self, _from): - """Sets the _from of this ActivityRequest. - - Date to filter from, keyed off of createdAt # noqa: E501 - - :param _from: The _from of this ActivityRequest. # noqa: E501 - :type _from: str - """ - - self.__from = _from - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ActivityRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ActivityRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/address.py b/corellium_api/models/address.py deleted file mode 100644 index d0aa534..0000000 --- a/corellium_api/models/address.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Address(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'address1': 'str', - 'address2': 'str', - 'city': 'str', - 'country': 'str', - 'postal_code': 'str', - 'state': 'str' - } - - attribute_map = { - 'address1': 'address1', - 'address2': 'address2', - 'city': 'city', - 'country': 'country', - 'postal_code': 'postal_code', - 'state': 'state' - } - - def __init__(self, address1=None, address2=None, city=None, country=None, postal_code=None, state=None, local_vars_configuration=None): # noqa: E501 - """Address - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._address1 = None - self._address2 = None - self._city = None - self._country = None - self._postal_code = None - self._state = None - self.discriminator = None - - self.address1 = address1 - self.address2 = address2 - self.city = city - self.country = country - self.postal_code = postal_code - self.state = state - - @property - def address1(self): - """Gets the address1 of this Address. # noqa: E501 - - Address line 1 (e.g., street, PO Box, or company name). # noqa: E501 - - :return: The address1 of this Address. # noqa: E501 - :rtype: str - """ - return self._address1 - - @address1.setter - def address1(self, address1): - """Sets the address1 of this Address. - - Address line 1 (e.g., street, PO Box, or company name). # noqa: E501 - - :param address1: The address1 of this Address. # noqa: E501 - :type address1: str - """ - - self._address1 = address1 - - @property - def address2(self): - """Gets the address2 of this Address. # noqa: E501 - - Address line 2 (e.g., apartment, suite, unit, or building). # noqa: E501 - - :return: The address2 of this Address. # noqa: E501 - :rtype: str - """ - return self._address2 - - @address2.setter - def address2(self, address2): - """Sets the address2 of this Address. - - Address line 2 (e.g., apartment, suite, unit, or building). # noqa: E501 - - :param address2: The address2 of this Address. # noqa: E501 - :type address2: str - """ - - self._address2 = address2 - - @property - def city(self): - """Gets the city of this Address. # noqa: E501 - - City, district, suburb, town, or village. # noqa: E501 - - :return: The city of this Address. # noqa: E501 - :rtype: str - """ - return self._city - - @city.setter - def city(self, city): - """Sets the city of this Address. - - City, district, suburb, town, or village. # noqa: E501 - - :param city: The city of this Address. # noqa: E501 - :type city: str - """ - - self._city = city - - @property - def country(self): - """Gets the country of this Address. # noqa: E501 - - Two-letter country code (ISO 3166-1 alpha-2). # noqa: E501 - - :return: The country of this Address. # noqa: E501 - :rtype: str - """ - return self._country - - @country.setter - def country(self, country): - """Sets the country of this Address. - - Two-letter country code (ISO 3166-1 alpha-2). # noqa: E501 - - :param country: The country of this Address. # noqa: E501 - :type country: str - """ - - self._country = country - - @property - def postal_code(self): - """Gets the postal_code of this Address. # noqa: E501 - - ZIP or postal code. # noqa: E501 - - :return: The postal_code of this Address. # noqa: E501 - :rtype: str - """ - return self._postal_code - - @postal_code.setter - def postal_code(self, postal_code): - """Sets the postal_code of this Address. - - ZIP or postal code. # noqa: E501 - - :param postal_code: The postal_code of this Address. # noqa: E501 - :type postal_code: str - """ - - self._postal_code = postal_code - - @property - def state(self): - """Gets the state of this Address. # noqa: E501 - - State, county, province, or region. # noqa: E501 - - :return: The state of this Address. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this Address. - - State, county, province, or region. # noqa: E501 - - :param state: The state of this Address. # noqa: E501 - :type state: str - """ - - self._state = state - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Address): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Address): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_app.py b/corellium_api/models/agent_app.py deleted file mode 100644 index 8c20764..0000000 --- a/corellium_api/models/agent_app.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentApp(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'tags': 'list[str]', - 'running': 'bool', - 'disk_usage': 'float', - 'date': 'float', - 'application_type': 'str', - 'name': 'str', - 'bundle_id': 'str', - 'bundle_path': 'str', - 'bundle_data_path': 'str' - } - - attribute_map = { - 'tags': 'tags', - 'running': 'running', - 'disk_usage': 'diskUsage', - 'date': 'Date', - 'application_type': 'applicationType', - 'name': 'name', - 'bundle_id': 'bundleID', - 'bundle_path': 'bundlePath', - 'bundle_data_path': 'bundleDataPath' - } - - def __init__(self, tags=None, running=None, disk_usage=None, date=None, application_type=None, name=None, bundle_id=None, bundle_path=None, bundle_data_path=None, local_vars_configuration=None): # noqa: E501 - """AgentApp - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._tags = None - self._running = None - self._disk_usage = None - self._date = None - self._application_type = None - self._name = None - self._bundle_id = None - self._bundle_path = None - self._bundle_data_path = None - self.discriminator = None - - self.tags = tags - self.running = running - self.disk_usage = disk_usage - self.date = date - self.application_type = application_type - self.name = name - self.bundle_id = bundle_id - self.bundle_path = bundle_path - self.bundle_data_path = bundle_data_path - - @property - def tags(self): - """Gets the tags of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The tags of this AgentApp. # noqa: E501 - :rtype: list[str] - """ - return self._tags - - @tags.setter - def tags(self, tags): - """Sets the tags of this AgentApp. - - # noqa: E501 - - :param tags: The tags of this AgentApp. # noqa: E501 - :type tags: list[str] - """ - - self._tags = tags - - @property - def running(self): - """Gets the running of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The running of this AgentApp. # noqa: E501 - :rtype: bool - """ - return self._running - - @running.setter - def running(self, running): - """Sets the running of this AgentApp. - - # noqa: E501 - - :param running: The running of this AgentApp. # noqa: E501 - :type running: bool - """ - - self._running = running - - @property - def disk_usage(self): - """Gets the disk_usage of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The disk_usage of this AgentApp. # noqa: E501 - :rtype: float - """ - return self._disk_usage - - @disk_usage.setter - def disk_usage(self, disk_usage): - """Sets the disk_usage of this AgentApp. - - # noqa: E501 - - :param disk_usage: The disk_usage of this AgentApp. # noqa: E501 - :type disk_usage: float - """ - - self._disk_usage = disk_usage - - @property - def date(self): - """Gets the date of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The date of this AgentApp. # noqa: E501 - :rtype: float - """ - return self._date - - @date.setter - def date(self, date): - """Sets the date of this AgentApp. - - # noqa: E501 - - :param date: The date of this AgentApp. # noqa: E501 - :type date: float - """ - - self._date = date - - @property - def application_type(self): - """Gets the application_type of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The application_type of this AgentApp. # noqa: E501 - :rtype: str - """ - return self._application_type - - @application_type.setter - def application_type(self, application_type): - """Sets the application_type of this AgentApp. - - # noqa: E501 - - :param application_type: The application_type of this AgentApp. # noqa: E501 - :type application_type: str - """ - - self._application_type = application_type - - @property - def name(self): - """Gets the name of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The name of this AgentApp. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this AgentApp. - - # noqa: E501 - - :param name: The name of this AgentApp. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def bundle_id(self): - """Gets the bundle_id of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The bundle_id of this AgentApp. # noqa: E501 - :rtype: str - """ - return self._bundle_id - - @bundle_id.setter - def bundle_id(self, bundle_id): - """Sets the bundle_id of this AgentApp. - - # noqa: E501 - - :param bundle_id: The bundle_id of this AgentApp. # noqa: E501 - :type bundle_id: str - """ - - self._bundle_id = bundle_id - - @property - def bundle_path(self): - """Gets the bundle_path of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The bundle_path of this AgentApp. # noqa: E501 - :rtype: str - """ - return self._bundle_path - - @bundle_path.setter - def bundle_path(self, bundle_path): - """Sets the bundle_path of this AgentApp. - - # noqa: E501 - - :param bundle_path: The bundle_path of this AgentApp. # noqa: E501 - :type bundle_path: str - """ - - self._bundle_path = bundle_path - - @property - def bundle_data_path(self): - """Gets the bundle_data_path of this AgentApp. # noqa: E501 - - # noqa: E501 - - :return: The bundle_data_path of this AgentApp. # noqa: E501 - :rtype: str - """ - return self._bundle_data_path - - @bundle_data_path.setter - def bundle_data_path(self, bundle_data_path): - """Sets the bundle_data_path of this AgentApp. - - # noqa: E501 - - :param bundle_data_path: The bundle_data_path of this AgentApp. # noqa: E501 - :type bundle_data_path: str - """ - - self._bundle_data_path = bundle_data_path - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentApp): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentApp): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_app_ready_response.py b/corellium_api/models/agent_app_ready_response.py deleted file mode 100644 index 0c85c5f..0000000 --- a/corellium_api/models/agent_app_ready_response.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentAppReadyResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'ready': 'bool' - } - - attribute_map = { - 'ready': 'ready' - } - - def __init__(self, ready=None, local_vars_configuration=None): # noqa: E501 - """AgentAppReadyResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._ready = None - self.discriminator = None - - self.ready = ready - - @property - def ready(self): - """Gets the ready of this AgentAppReadyResponse. # noqa: E501 - - # noqa: E501 - - :return: The ready of this AgentAppReadyResponse. # noqa: E501 - :rtype: bool - """ - return self._ready - - @ready.setter - def ready(self, ready): - """Sets the ready of this AgentAppReadyResponse. - - # noqa: E501 - - :param ready: The ready of this AgentAppReadyResponse. # noqa: E501 - :type ready: bool - """ - if self.local_vars_configuration.client_side_validation and ready is None: # noqa: E501 - raise ValueError("Invalid value for `ready`, must not be `None`") # noqa: E501 - - self._ready = ready - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentAppReadyResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentAppReadyResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_app_status.py b/corellium_api/models/agent_app_status.py deleted file mode 100644 index 22d84a1..0000000 --- a/corellium_api/models/agent_app_status.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentAppStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'running': 'bool', - 'bundle_id': 'str' - } - - attribute_map = { - 'running': 'running', - 'bundle_id': 'bundleID' - } - - def __init__(self, running=None, bundle_id=None, local_vars_configuration=None): # noqa: E501 - """AgentAppStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._running = None - self._bundle_id = None - self.discriminator = None - - self.running = running - self.bundle_id = bundle_id - - @property - def running(self): - """Gets the running of this AgentAppStatus. # noqa: E501 - - # noqa: E501 - - :return: The running of this AgentAppStatus. # noqa: E501 - :rtype: bool - """ - return self._running - - @running.setter - def running(self, running): - """Sets the running of this AgentAppStatus. - - # noqa: E501 - - :param running: The running of this AgentAppStatus. # noqa: E501 - :type running: bool - """ - - self._running = running - - @property - def bundle_id(self): - """Gets the bundle_id of this AgentAppStatus. # noqa: E501 - - # noqa: E501 - - :return: The bundle_id of this AgentAppStatus. # noqa: E501 - :rtype: str - """ - return self._bundle_id - - @bundle_id.setter - def bundle_id(self, bundle_id): - """Sets the bundle_id of this AgentAppStatus. - - # noqa: E501 - - :param bundle_id: The bundle_id of this AgentAppStatus. # noqa: E501 - :type bundle_id: str - """ - - self._bundle_id = bundle_id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentAppStatus): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentAppStatus): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_apps_list.py b/corellium_api/models/agent_apps_list.py deleted file mode 100644 index cfb26d3..0000000 --- a/corellium_api/models/agent_apps_list.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentAppsList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'apps': 'list[AgentApp]', - 'frontmost': 'str' - } - - attribute_map = { - 'apps': 'apps', - 'frontmost': 'frontmost' - } - - def __init__(self, apps=None, frontmost=None, local_vars_configuration=None): # noqa: E501 - """AgentAppsList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._apps = None - self._frontmost = None - self.discriminator = None - - self.apps = apps - self.frontmost = frontmost - - @property - def apps(self): - """Gets the apps of this AgentAppsList. # noqa: E501 - - # noqa: E501 - - :return: The apps of this AgentAppsList. # noqa: E501 - :rtype: list[AgentApp] - """ - return self._apps - - @apps.setter - def apps(self, apps): - """Sets the apps of this AgentAppsList. - - # noqa: E501 - - :param apps: The apps of this AgentAppsList. # noqa: E501 - :type apps: list[AgentApp] - """ - - self._apps = apps - - @property - def frontmost(self): - """Gets the frontmost of this AgentAppsList. # noqa: E501 - - bundleID of frontmost app or empty string if none are frontmost # noqa: E501 - - :return: The frontmost of this AgentAppsList. # noqa: E501 - :rtype: str - """ - return self._frontmost - - @frontmost.setter - def frontmost(self, frontmost): - """Sets the frontmost of this AgentAppsList. - - bundleID of frontmost app or empty string if none are frontmost # noqa: E501 - - :param frontmost: The frontmost of this AgentAppsList. # noqa: E501 - :type frontmost: str - """ - - self._frontmost = frontmost - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentAppsList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentAppsList): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_apps_status_list.py b/corellium_api/models/agent_apps_status_list.py deleted file mode 100644 index 618d747..0000000 --- a/corellium_api/models/agent_apps_status_list.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentAppsStatusList(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'apps': 'list[AgentAppStatus]', - 'frontmost': 'str' - } - - attribute_map = { - 'apps': 'apps', - 'frontmost': 'frontmost' - } - - def __init__(self, apps=None, frontmost=None, local_vars_configuration=None): # noqa: E501 - """AgentAppsStatusList - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._apps = None - self._frontmost = None - self.discriminator = None - - self.apps = apps - self.frontmost = frontmost - - @property - def apps(self): - """Gets the apps of this AgentAppsStatusList. # noqa: E501 - - # noqa: E501 - - :return: The apps of this AgentAppsStatusList. # noqa: E501 - :rtype: list[AgentAppStatus] - """ - return self._apps - - @apps.setter - def apps(self, apps): - """Sets the apps of this AgentAppsStatusList. - - # noqa: E501 - - :param apps: The apps of this AgentAppsStatusList. # noqa: E501 - :type apps: list[AgentAppStatus] - """ - - self._apps = apps - - @property - def frontmost(self): - """Gets the frontmost of this AgentAppsStatusList. # noqa: E501 - - bundleID of frontmost app or empty string if none are frontmost # noqa: E501 - - :return: The frontmost of this AgentAppsStatusList. # noqa: E501 - :rtype: str - """ - return self._frontmost - - @frontmost.setter - def frontmost(self, frontmost): - """Sets the frontmost of this AgentAppsStatusList. - - bundleID of frontmost app or empty string if none are frontmost # noqa: E501 - - :param frontmost: The frontmost of this AgentAppsStatusList. # noqa: E501 - :type frontmost: str - """ - - self._frontmost = frontmost - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentAppsStatusList): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentAppsStatusList): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_error.py b/corellium_api/models/agent_error.py deleted file mode 100644 index 5fd42ea..0000000 --- a/corellium_api/models/agent_error.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentError(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'error': 'str', - 'error_id': 'str', - 'original_error': 'object' - } - - attribute_map = { - 'error': 'error', - 'error_id': 'errorID', - 'original_error': 'originalError' - } - - def __init__(self, error=None, error_id=None, original_error=None, local_vars_configuration=None): # noqa: E501 - """AgentError - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._error = None - self._error_id = None - self._original_error = None - self.discriminator = None - - self.error = error - self.error_id = error_id - self.original_error = original_error - - @property - def error(self): - """Gets the error of this AgentError. # noqa: E501 - - The error encountered by the agent # noqa: E501 - - :return: The error of this AgentError. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this AgentError. - - The error encountered by the agent # noqa: E501 - - :param error: The error of this AgentError. # noqa: E501 - :type error: str - """ - if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 - raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 - - self._error = error - - @property - def error_id(self): - """Gets the error_id of this AgentError. # noqa: E501 - - AgentError # noqa: E501 - - :return: The error_id of this AgentError. # noqa: E501 - :rtype: str - """ - return self._error_id - - @error_id.setter - def error_id(self, error_id): - """Sets the error_id of this AgentError. - - AgentError # noqa: E501 - - :param error_id: The error_id of this AgentError. # noqa: E501 - :type error_id: str - """ - if self.local_vars_configuration.client_side_validation and error_id is None: # noqa: E501 - raise ValueError("Invalid value for `error_id`, must not be `None`") # noqa: E501 - allowed_values = ["AgentError"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and error_id not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `error_id` ({0}), must be one of {1}" # noqa: E501 - .format(error_id, allowed_values) - ) - - self._error_id = error_id - - @property - def original_error(self): - """Gets the original_error of this AgentError. # noqa: E501 - - The full error encountered by the agent # noqa: E501 - - :return: The original_error of this AgentError. # noqa: E501 - :rtype: object - """ - return self._original_error - - @original_error.setter - def original_error(self, original_error): - """Sets the original_error of this AgentError. - - The full error encountered by the agent # noqa: E501 - - :param original_error: The original_error of this AgentError. # noqa: E501 - :type original_error: object - """ - - self._original_error = original_error - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentError): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentError): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_icons.py b/corellium_api/models/agent_icons.py deleted file mode 100644 index f6b4726..0000000 --- a/corellium_api/models/agent_icons.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentIcons(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'icon': 'str' - } - - attribute_map = { - 'icon': 'icon' - } - - def __init__(self, icon=None, local_vars_configuration=None): # noqa: E501 - """AgentIcons - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._icon = None - self.discriminator = None - - self.icon = icon - - @property - def icon(self): - """Gets the icon of this AgentIcons. # noqa: E501 - - The data for an icon # noqa: E501 - - :return: The icon of this AgentIcons. # noqa: E501 - :rtype: str - """ - return self._icon - - @icon.setter - def icon(self, icon): - """Sets the icon of this AgentIcons. - - The data for an icon # noqa: E501 - - :param icon: The icon of this AgentIcons. # noqa: E501 - :type icon: str - """ - - self._icon = icon - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentIcons): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentIcons): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_install_body.py b/corellium_api/models/agent_install_body.py deleted file mode 100644 index 9fea20f..0000000 --- a/corellium_api/models/agent_install_body.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentInstallBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'path': 'str' - } - - attribute_map = { - 'path': 'path' - } - - def __init__(self, path=None, local_vars_configuration=None): # noqa: E501 - """AgentInstallBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._path = None - self.discriminator = None - - self.path = path - - @property - def path(self): - """Gets the path of this AgentInstallBody. # noqa: E501 - - path to app to install # noqa: E501 - - :return: The path of this AgentInstallBody. # noqa: E501 - :rtype: str - """ - return self._path - - @path.setter - def path(self, path): - """Sets the path of this AgentInstallBody. - - path to app to install # noqa: E501 - - :param path: The path of this AgentInstallBody. # noqa: E501 - :type path: str - """ - - self._path = path - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentInstallBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentInstallBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_profiles_return.py b/corellium_api/models/agent_profiles_return.py deleted file mode 100644 index c90478a..0000000 --- a/corellium_api/models/agent_profiles_return.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentProfilesReturn(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'profiles': 'list[str]' - } - - attribute_map = { - 'profiles': 'profiles' - } - - def __init__(self, profiles=None, local_vars_configuration=None): # noqa: E501 - """AgentProfilesReturn - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._profiles = None - self.discriminator = None - - self.profiles = profiles - - @property - def profiles(self): - """Gets the profiles of this AgentProfilesReturn. # noqa: E501 - - # noqa: E501 - - :return: The profiles of this AgentProfilesReturn. # noqa: E501 - :rtype: list[str] - """ - return self._profiles - - @profiles.setter - def profiles(self, profiles): - """Sets the profiles of this AgentProfilesReturn. - - # noqa: E501 - - :param profiles: The profiles of this AgentProfilesReturn. # noqa: E501 - :type profiles: list[str] - """ - if self.local_vars_configuration.client_side_validation and profiles is None: # noqa: E501 - raise ValueError("Invalid value for `profiles`, must not be `None`") # noqa: E501 - - self._profiles = profiles - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentProfilesReturn): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentProfilesReturn): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_system_adb_auth.py b/corellium_api/models/agent_system_adb_auth.py deleted file mode 100644 index 76c4cb6..0000000 --- a/corellium_api/models/agent_system_adb_auth.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentSystemAdbAuth(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'enabled': 'bool' - } - - attribute_map = { - 'enabled': 'enabled' - } - - def __init__(self, enabled=None, local_vars_configuration=None): # noqa: E501 - """AgentSystemAdbAuth - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._enabled = None - self.discriminator = None - - self.enabled = enabled - - @property - def enabled(self): - """Gets the enabled of this AgentSystemAdbAuth. # noqa: E501 - - # noqa: E501 - - :return: The enabled of this AgentSystemAdbAuth. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this AgentSystemAdbAuth. - - # noqa: E501 - - :param enabled: The enabled of this AgentSystemAdbAuth. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentSystemAdbAuth): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentSystemAdbAuth): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_system_get_prop_body.py b/corellium_api/models/agent_system_get_prop_body.py deleted file mode 100644 index 1b234ae..0000000 --- a/corellium_api/models/agent_system_get_prop_body.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentSystemGetPropBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - '_property': 'str' - } - - attribute_map = { - '_property': 'property' - } - - def __init__(self, _property=None, local_vars_configuration=None): # noqa: E501 - """AgentSystemGetPropBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self.__property = None - self.discriminator = None - - self._property = _property - - @property - def _property(self): - """Gets the _property of this AgentSystemGetPropBody. # noqa: E501 - - # noqa: E501 - - :return: The _property of this AgentSystemGetPropBody. # noqa: E501 - :rtype: str - """ - return self.__property - - @_property.setter - def _property(self, _property): - """Sets the _property of this AgentSystemGetPropBody. - - # noqa: E501 - - :param _property: The _property of this AgentSystemGetPropBody. # noqa: E501 - :type _property: str - """ - if self.local_vars_configuration.client_side_validation and _property is None: # noqa: E501 - raise ValueError("Invalid value for `_property`, must not be `None`") # noqa: E501 - - self.__property = _property - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentSystemGetPropBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentSystemGetPropBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_system_set_hostname_body.py b/corellium_api/models/agent_system_set_hostname_body.py deleted file mode 100644 index 614736c..0000000 --- a/corellium_api/models/agent_system_set_hostname_body.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentSystemSetHostnameBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'hostname': 'str' - } - - attribute_map = { - 'hostname': 'hostname' - } - - def __init__(self, hostname=None, local_vars_configuration=None): # noqa: E501 - """AgentSystemSetHostnameBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._hostname = None - self.discriminator = None - - self.hostname = hostname - - @property - def hostname(self): - """Gets the hostname of this AgentSystemSetHostnameBody. # noqa: E501 - - # noqa: E501 - - :return: The hostname of this AgentSystemSetHostnameBody. # noqa: E501 - :rtype: str - """ - return self._hostname - - @hostname.setter - def hostname(self, hostname): - """Sets the hostname of this AgentSystemSetHostnameBody. - - # noqa: E501 - - :param hostname: The hostname of this AgentSystemSetHostnameBody. # noqa: E501 - :type hostname: str - """ - if self.local_vars_configuration.client_side_validation and hostname is None: # noqa: E501 - raise ValueError("Invalid value for `hostname`, must not be `None`") # noqa: E501 - - self._hostname = hostname - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentSystemSetHostnameBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentSystemSetHostnameBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agent_value_return.py b/corellium_api/models/agent_value_return.py deleted file mode 100644 index a19cc80..0000000 --- a/corellium_api/models/agent_value_return.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgentValueReturn(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'value': 'str' - } - - attribute_map = { - 'value': 'value' - } - - def __init__(self, value=None, local_vars_configuration=None): # noqa: E501 - """AgentValueReturn - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._value = None - self.discriminator = None - - self.value = value - - @property - def value(self): - """Gets the value of this AgentValueReturn. # noqa: E501 - - The requested value # noqa: E501 - - :return: The value of this AgentValueReturn. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this AgentValueReturn. - - The requested value # noqa: E501 - - :param value: The value of this AgentValueReturn. # noqa: E501 - :type value: str - """ - - self._value = value - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgentValueReturn): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgentValueReturn): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/agreed_ack.py b/corellium_api/models/agreed_ack.py deleted file mode 100644 index fd5a30b..0000000 --- a/corellium_api/models/agreed_ack.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AgreedAck(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'agreed_to_terms': 'datetime' - } - - attribute_map = { - 'agreed_to_terms': 'agreedToTerms' - } - - def __init__(self, agreed_to_terms=None, local_vars_configuration=None): # noqa: E501 - """AgreedAck - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._agreed_to_terms = None - self.discriminator = None - - self.agreed_to_terms = agreed_to_terms - - @property - def agreed_to_terms(self): - """Gets the agreed_to_terms of this AgreedAck. # noqa: E501 - - Date agreed # noqa: E501 - - :return: The agreed_to_terms of this AgreedAck. # noqa: E501 - :rtype: datetime - """ - return self._agreed_to_terms - - @agreed_to_terms.setter - def agreed_to_terms(self, agreed_to_terms): - """Sets the agreed_to_terms of this AgreedAck. - - Date agreed # noqa: E501 - - :param agreed_to_terms: The agreed_to_terms of this AgreedAck. # noqa: E501 - :type agreed_to_terms: datetime - """ - - self._agreed_to_terms = agreed_to_terms - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AgreedAck): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AgreedAck): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/allowed_domains_response.py b/corellium_api/models/allowed_domains_response.py deleted file mode 100644 index 86abe52..0000000 --- a/corellium_api/models/allowed_domains_response.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AllowedDomainsResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'allowed_domains': 'list[str]' - } - - attribute_map = { - 'allowed_domains': 'allowedDomains' - } - - def __init__(self, allowed_domains=None, local_vars_configuration=None): # noqa: E501 - """AllowedDomainsResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._allowed_domains = None - self.discriminator = None - - self.allowed_domains = allowed_domains - - @property - def allowed_domains(self): - """Gets the allowed_domains of this AllowedDomainsResponse. # noqa: E501 - - List of allowed domains # noqa: E501 - - :return: The allowed_domains of this AllowedDomainsResponse. # noqa: E501 - :rtype: list[str] - """ - return self._allowed_domains - - @allowed_domains.setter - def allowed_domains(self, allowed_domains): - """Sets the allowed_domains of this AllowedDomainsResponse. - - List of allowed domains # noqa: E501 - - :param allowed_domains: The allowed_domains of this AllowedDomainsResponse. # noqa: E501 - :type allowed_domains: list[str] - """ - - self._allowed_domains = allowed_domains - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AllowedDomainsResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AllowedDomainsResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/api_conflict_error.py b/corellium_api/models/api_conflict_error.py deleted file mode 100644 index 4d0f7d3..0000000 --- a/corellium_api/models/api_conflict_error.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ApiConflictError(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'error': 'str', - 'error_id': 'str', - 'object': 'object' - } - - attribute_map = { - 'error': 'error', - 'error_id': 'errorID', - 'object': 'object' - } - - def __init__(self, error=None, error_id=None, object=None, local_vars_configuration=None): # noqa: E501 - """ApiConflictError - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._error = None - self._error_id = None - self._object = None - self.discriminator = None - - self.error = error - self.error_id = error_id - self.object = object - - @property - def error(self): - """Gets the error of this ApiConflictError. # noqa: E501 - - Error text # noqa: E501 - - :return: The error of this ApiConflictError. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this ApiConflictError. - - Error text # noqa: E501 - - :param error: The error of this ApiConflictError. # noqa: E501 - :type error: str - """ - if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 - raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 - - self._error = error - - @property - def error_id(self): - """Gets the error_id of this ApiConflictError. # noqa: E501 - - Error ID # noqa: E501 - - :return: The error_id of this ApiConflictError. # noqa: E501 - :rtype: str - """ - return self._error_id - - @error_id.setter - def error_id(self, error_id): - """Sets the error_id of this ApiConflictError. - - Error ID # noqa: E501 - - :param error_id: The error_id of this ApiConflictError. # noqa: E501 - :type error_id: str - """ - if self.local_vars_configuration.client_side_validation and error_id is None: # noqa: E501 - raise ValueError("Invalid value for `error_id`, must not be `None`") # noqa: E501 - allowed_values = ["Conflict"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and error_id not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `error_id` ({0}), must be one of {1}" # noqa: E501 - .format(error_id, allowed_values) - ) - - self._error_id = error_id - - @property - def object(self): - """Gets the object of this ApiConflictError. # noqa: E501 - - Object that is conflicted with # noqa: E501 - - :return: The object of this ApiConflictError. # noqa: E501 - :rtype: object - """ - return self._object - - @object.setter - def object(self, object): - """Sets the object of this ApiConflictError. - - Object that is conflicted with # noqa: E501 - - :param object: The object of this ApiConflictError. # noqa: E501 - :type object: object - """ - - self._object = object - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiConflictError): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ApiConflictError): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/api_error.py b/corellium_api/models/api_error.py deleted file mode 100644 index d67a1bb..0000000 --- a/corellium_api/models/api_error.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ApiError(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'error': 'str', - 'error_id': 'str', - 'original_error': 'str' - } - - attribute_map = { - 'error': 'error', - 'error_id': 'errorID', - 'original_error': 'originalError' - } - - def __init__(self, error=None, error_id=None, original_error=None, local_vars_configuration=None): # noqa: E501 - """ApiError - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._error = None - self._error_id = None - self._original_error = None - self.discriminator = None - - self.error = error - self.error_id = error_id - self.original_error = original_error - - @property - def error(self): - """Gets the error of this ApiError. # noqa: E501 - - Error text # noqa: E501 - - :return: The error of this ApiError. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this ApiError. - - Error text # noqa: E501 - - :param error: The error of this ApiError. # noqa: E501 - :type error: str - """ - if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 - raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 - - self._error = error - - @property - def error_id(self): - """Gets the error_id of this ApiError. # noqa: E501 - - Error ID # noqa: E501 - - :return: The error_id of this ApiError. # noqa: E501 - :rtype: str - """ - return self._error_id - - @error_id.setter - def error_id(self, error_id): - """Sets the error_id of this ApiError. - - Error ID # noqa: E501 - - :param error_id: The error_id of this ApiError. # noqa: E501 - :type error_id: str - """ - if self.local_vars_configuration.client_side_validation and error_id is None: # noqa: E501 - raise ValueError("Invalid value for `error_id`, must not be `None`") # noqa: E501 - - self._error_id = error_id - - @property - def original_error(self): - """Gets the original_error of this ApiError. # noqa: E501 - - Upstream error description # noqa: E501 - - :return: The original_error of this ApiError. # noqa: E501 - :rtype: str - """ - return self._original_error - - @original_error.setter - def original_error(self, original_error): - """Sets the original_error of this ApiError. - - Upstream error description # noqa: E501 - - :param original_error: The original_error of this ApiError. # noqa: E501 - :type original_error: str - """ - - self._original_error = original_error - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiError): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ApiError): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/api_internal_consistency_error.py b/corellium_api/models/api_internal_consistency_error.py deleted file mode 100644 index f7b7cc0..0000000 --- a/corellium_api/models/api_internal_consistency_error.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ApiInternalConsistencyError(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'error': 'str', - 'error_id': 'str', - 'original_error': 'str' - } - - attribute_map = { - 'error': 'error', - 'error_id': 'errorID', - 'original_error': 'originalError' - } - - def __init__(self, error=None, error_id=None, original_error=None, local_vars_configuration=None): # noqa: E501 - """ApiInternalConsistencyError - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._error = None - self._error_id = None - self._original_error = None - self.discriminator = None - - self.error = error - self.error_id = error_id - self.original_error = original_error - - @property - def error(self): - """Gets the error of this ApiInternalConsistencyError. # noqa: E501 - - Error text # noqa: E501 - - :return: The error of this ApiInternalConsistencyError. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this ApiInternalConsistencyError. - - Error text # noqa: E501 - - :param error: The error of this ApiInternalConsistencyError. # noqa: E501 - :type error: str - """ - if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 - raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 - - self._error = error - - @property - def error_id(self): - """Gets the error_id of this ApiInternalConsistencyError. # noqa: E501 - - Error ID # noqa: E501 - - :return: The error_id of this ApiInternalConsistencyError. # noqa: E501 - :rtype: str - """ - return self._error_id - - @error_id.setter - def error_id(self, error_id): - """Sets the error_id of this ApiInternalConsistencyError. - - Error ID # noqa: E501 - - :param error_id: The error_id of this ApiInternalConsistencyError. # noqa: E501 - :type error_id: str - """ - if self.local_vars_configuration.client_side_validation and error_id is None: # noqa: E501 - raise ValueError("Invalid value for `error_id`, must not be `None`") # noqa: E501 - - self._error_id = error_id - - @property - def original_error(self): - """Gets the original_error of this ApiInternalConsistencyError. # noqa: E501 - - Upstream error description # noqa: E501 - - :return: The original_error of this ApiInternalConsistencyError. # noqa: E501 - :rtype: str - """ - return self._original_error - - @original_error.setter - def original_error(self, original_error): - """Sets the original_error of this ApiInternalConsistencyError. - - Upstream error description # noqa: E501 - - :param original_error: The original_error of this ApiInternalConsistencyError. # noqa: E501 - :type original_error: str - """ - - self._original_error = original_error - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiInternalConsistencyError): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ApiInternalConsistencyError): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/api_not_found_error.py b/corellium_api/models/api_not_found_error.py deleted file mode 100644 index 03052f1..0000000 --- a/corellium_api/models/api_not_found_error.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ApiNotFoundError(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'error': 'str', - 'error_id': 'str', - 'name': 'str', - 'params': 'object' - } - - attribute_map = { - 'error': 'error', - 'error_id': 'errorID', - 'name': 'name', - 'params': 'params' - } - - def __init__(self, error=None, error_id=None, name=None, params=None, local_vars_configuration=None): # noqa: E501 - """ApiNotFoundError - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._error = None - self._error_id = None - self._name = None - self._params = None - self.discriminator = None - - self.error = error - self.error_id = error_id - self.name = name - self.params = params - - @property - def error(self): - """Gets the error of this ApiNotFoundError. # noqa: E501 - - Error text # noqa: E501 - - :return: The error of this ApiNotFoundError. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this ApiNotFoundError. - - Error text # noqa: E501 - - :param error: The error of this ApiNotFoundError. # noqa: E501 - :type error: str - """ - if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 - raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 - - self._error = error - - @property - def error_id(self): - """Gets the error_id of this ApiNotFoundError. # noqa: E501 - - Error ID # noqa: E501 - - :return: The error_id of this ApiNotFoundError. # noqa: E501 - :rtype: str - """ - return self._error_id - - @error_id.setter - def error_id(self, error_id): - """Sets the error_id of this ApiNotFoundError. - - Error ID # noqa: E501 - - :param error_id: The error_id of this ApiNotFoundError. # noqa: E501 - :type error_id: str - """ - if self.local_vars_configuration.client_side_validation and error_id is None: # noqa: E501 - raise ValueError("Invalid value for `error_id`, must not be `None`") # noqa: E501 - - self._error_id = error_id - - @property - def name(self): - """Gets the name of this ApiNotFoundError. # noqa: E501 - - Name of the object requested # noqa: E501 - - :return: The name of this ApiNotFoundError. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ApiNotFoundError. - - Name of the object requested # noqa: E501 - - :param name: The name of this ApiNotFoundError. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def params(self): - """Gets the params of this ApiNotFoundError. # noqa: E501 - - params provided by user # noqa: E501 - - :return: The params of this ApiNotFoundError. # noqa: E501 - :rtype: object - """ - return self._params - - @params.setter - def params(self, params): - """Sets the params of this ApiNotFoundError. - - params provided by user # noqa: E501 - - :param params: The params of this ApiNotFoundError. # noqa: E501 - :type params: object - """ - - self._params = params - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiNotFoundError): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ApiNotFoundError): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/api_token.py b/corellium_api/models/api_token.py deleted file mode 100644 index 1bc8bab..0000000 --- a/corellium_api/models/api_token.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ApiToken(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_token': 'str' - } - - attribute_map = { - 'api_token': 'apiToken' - } - - def __init__(self, api_token=None, local_vars_configuration=None): # noqa: E501 - """ApiToken - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._api_token = None - self.discriminator = None - - self.api_token = api_token - - @property - def api_token(self): - """Gets the api_token of this ApiToken. # noqa: E501 - - # noqa: E501 - - :return: The api_token of this ApiToken. # noqa: E501 - :rtype: str - """ - return self._api_token - - @api_token.setter - def api_token(self, api_token): - """Sets the api_token of this ApiToken. - - # noqa: E501 - - :param api_token: The api_token of this ApiToken. # noqa: E501 - :type api_token: str - """ - if self.local_vars_configuration.client_side_validation and api_token is None: # noqa: E501 - raise ValueError("Invalid value for `api_token`, must not be `None`") # noqa: E501 - - self._api_token = api_token - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiToken): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ApiToken): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/assessment.py b/corellium_api/models/assessment.py deleted file mode 100644 index b306c1e..0000000 --- a/corellium_api/models/assessment.py +++ /dev/null @@ -1,420 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Assessment(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'created_by': 'str', - 'report_id': 'str', - 'bundle': 'object', - 'results': 'object', - 'metadata': 'object', - 'wordlist': 'object', - 'instance_id': 'str', - 'bundle_id': 'str', - 'wordlist_id': 'str', - 'status': 'str' - } - - attribute_map = { - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'created_by': 'createdBy', - 'report_id': 'reportId', - 'bundle': 'bundle', - 'results': 'results', - 'metadata': 'metadata', - 'wordlist': 'wordlist', - 'instance_id': 'instanceId', - 'bundle_id': 'bundleId', - 'wordlist_id': 'wordlistId', - 'status': 'status' - } - - def __init__(self, created_at=None, updated_at=None, created_by=None, report_id=None, bundle=None, results=None, metadata=None, wordlist=None, instance_id=None, bundle_id=None, wordlist_id=None, status=None, local_vars_configuration=None): # noqa: E501 - """Assessment - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._created_at = None - self._updated_at = None - self._created_by = None - self._report_id = None - self._bundle = None - self._results = None - self._metadata = None - self._wordlist = None - self._instance_id = None - self._bundle_id = None - self._wordlist_id = None - self._status = None - self.discriminator = None - - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - if created_by is not None: - self.created_by = created_by - if report_id is not None: - self.report_id = report_id - if bundle is not None: - self.bundle = bundle - if results is not None: - self.results = results - if metadata is not None: - self.metadata = metadata - if wordlist is not None: - self.wordlist = wordlist - self.instance_id = instance_id - self.bundle_id = bundle_id - if wordlist_id is not None: - self.wordlist_id = wordlist_id - self.status = status - - @property - def created_at(self): - """Gets the created_at of this Assessment. # noqa: E501 - - - :return: The created_at of this Assessment. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Assessment. - - - :param created_at: The created_at of this Assessment. # noqa: E501 - :type created_at: datetime - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Assessment. # noqa: E501 - - - :return: The updated_at of this Assessment. # noqa: E501 - :rtype: datetime - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Assessment. - - - :param updated_at: The updated_at of this Assessment. # noqa: E501 - :type updated_at: datetime - """ - - self._updated_at = updated_at - - @property - def created_by(self): - """Gets the created_by of this Assessment. # noqa: E501 - - - :return: The created_by of this Assessment. # noqa: E501 - :rtype: str - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """Sets the created_by of this Assessment. - - - :param created_by: The created_by of this Assessment. # noqa: E501 - :type created_by: str - """ - - self._created_by = created_by - - @property - def report_id(self): - """Gets the report_id of this Assessment. # noqa: E501 - - - :return: The report_id of this Assessment. # noqa: E501 - :rtype: str - """ - return self._report_id - - @report_id.setter - def report_id(self, report_id): - """Sets the report_id of this Assessment. - - - :param report_id: The report_id of this Assessment. # noqa: E501 - :type report_id: str - """ - - self._report_id = report_id - - @property - def bundle(self): - """Gets the bundle of this Assessment. # noqa: E501 - - - :return: The bundle of this Assessment. # noqa: E501 - :rtype: object - """ - return self._bundle - - @bundle.setter - def bundle(self, bundle): - """Sets the bundle of this Assessment. - - - :param bundle: The bundle of this Assessment. # noqa: E501 - :type bundle: object - """ - - self._bundle = bundle - - @property - def results(self): - """Gets the results of this Assessment. # noqa: E501 - - - :return: The results of this Assessment. # noqa: E501 - :rtype: object - """ - return self._results - - @results.setter - def results(self, results): - """Sets the results of this Assessment. - - - :param results: The results of this Assessment. # noqa: E501 - :type results: object - """ - - self._results = results - - @property - def metadata(self): - """Gets the metadata of this Assessment. # noqa: E501 - - - :return: The metadata of this Assessment. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this Assessment. - - - :param metadata: The metadata of this Assessment. # noqa: E501 - :type metadata: object - """ - - self._metadata = metadata - - @property - def wordlist(self): - """Gets the wordlist of this Assessment. # noqa: E501 - - - :return: The wordlist of this Assessment. # noqa: E501 - :rtype: object - """ - return self._wordlist - - @wordlist.setter - def wordlist(self, wordlist): - """Sets the wordlist of this Assessment. - - - :param wordlist: The wordlist of this Assessment. # noqa: E501 - :type wordlist: object - """ - - self._wordlist = wordlist - - @property - def instance_id(self): - """Gets the instance_id of this Assessment. # noqa: E501 - - - :return: The instance_id of this Assessment. # noqa: E501 - :rtype: str - """ - return self._instance_id - - @instance_id.setter - def instance_id(self, instance_id): - """Sets the instance_id of this Assessment. - - - :param instance_id: The instance_id of this Assessment. # noqa: E501 - :type instance_id: str - """ - if self.local_vars_configuration.client_side_validation and instance_id is None: # noqa: E501 - raise ValueError("Invalid value for `instance_id`, must not be `None`") # noqa: E501 - - self._instance_id = instance_id - - @property - def bundle_id(self): - """Gets the bundle_id of this Assessment. # noqa: E501 - - - :return: The bundle_id of this Assessment. # noqa: E501 - :rtype: str - """ - return self._bundle_id - - @bundle_id.setter - def bundle_id(self, bundle_id): - """Sets the bundle_id of this Assessment. - - - :param bundle_id: The bundle_id of this Assessment. # noqa: E501 - :type bundle_id: str - """ - if self.local_vars_configuration.client_side_validation and bundle_id is None: # noqa: E501 - raise ValueError("Invalid value for `bundle_id`, must not be `None`") # noqa: E501 - - self._bundle_id = bundle_id - - @property - def wordlist_id(self): - """Gets the wordlist_id of this Assessment. # noqa: E501 - - - :return: The wordlist_id of this Assessment. # noqa: E501 - :rtype: str - """ - return self._wordlist_id - - @wordlist_id.setter - def wordlist_id(self, wordlist_id): - """Sets the wordlist_id of this Assessment. - - - :param wordlist_id: The wordlist_id of this Assessment. # noqa: E501 - :type wordlist_id: str - """ - - self._wordlist_id = wordlist_id - - @property - def status(self): - """Gets the status of this Assessment. # noqa: E501 - - - :return: The status of this Assessment. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this Assessment. - - - :param status: The status of this Assessment. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - - self._status = status - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Assessment): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Assessment): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/assessment_history.py b/corellium_api/models/assessment_history.py deleted file mode 100644 index 187e427..0000000 --- a/corellium_api/models/assessment_history.py +++ /dev/null @@ -1,250 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AssessmentHistory(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'float', - 'count': 'float', - 'limit': 'float', - 'offset': 'float', - 'results': 'list[AssessmentHistoryLineItem]' - } - - attribute_map = { - 'total': 'total', - 'count': 'count', - 'limit': 'limit', - 'offset': 'offset', - 'results': 'results' - } - - def __init__(self, total=None, count=None, limit=None, offset=None, results=None, local_vars_configuration=None): # noqa: E501 - """AssessmentHistory - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._count = None - self._limit = None - self._offset = None - self._results = None - self.discriminator = None - - self.total = total - self.count = count - self.limit = limit - self.offset = offset - self.results = results - - @property - def total(self): - """Gets the total of this AssessmentHistory. # noqa: E501 - - Total number of items # noqa: E501 - - :return: The total of this AssessmentHistory. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this AssessmentHistory. - - Total number of items # noqa: E501 - - :param total: The total of this AssessmentHistory. # noqa: E501 - :type total: float - """ - if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 - raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 - - self._total = total - - @property - def count(self): - """Gets the count of this AssessmentHistory. # noqa: E501 - - Number of items in current response # noqa: E501 - - :return: The count of this AssessmentHistory. # noqa: E501 - :rtype: float - """ - return self._count - - @count.setter - def count(self, count): - """Sets the count of this AssessmentHistory. - - Number of items in current response # noqa: E501 - - :param count: The count of this AssessmentHistory. # noqa: E501 - :type count: float - """ - if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501 - raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 - - self._count = count - - @property - def limit(self): - """Gets the limit of this AssessmentHistory. # noqa: E501 - - Limit used for the request # noqa: E501 - - :return: The limit of this AssessmentHistory. # noqa: E501 - :rtype: float - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this AssessmentHistory. - - Limit used for the request # noqa: E501 - - :param limit: The limit of this AssessmentHistory. # noqa: E501 - :type limit: float - """ - if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 - raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 - - self._limit = limit - - @property - def offset(self): - """Gets the offset of this AssessmentHistory. # noqa: E501 - - Offset used for the request # noqa: E501 - - :return: The offset of this AssessmentHistory. # noqa: E501 - :rtype: float - """ - return self._offset - - @offset.setter - def offset(self, offset): - """Sets the offset of this AssessmentHistory. - - Offset used for the request # noqa: E501 - - :param offset: The offset of this AssessmentHistory. # noqa: E501 - :type offset: float - """ - if self.local_vars_configuration.client_side_validation and offset is None: # noqa: E501 - raise ValueError("Invalid value for `offset`, must not be `None`") # noqa: E501 - - self._offset = offset - - @property - def results(self): - """Gets the results of this AssessmentHistory. # noqa: E501 - - The list of assessments # noqa: E501 - - :return: The results of this AssessmentHistory. # noqa: E501 - :rtype: list[AssessmentHistoryLineItem] - """ - return self._results - - @results.setter - def results(self, results): - """Sets the results of this AssessmentHistory. - - The list of assessments # noqa: E501 - - :param results: The results of this AssessmentHistory. # noqa: E501 - :type results: list[AssessmentHistoryLineItem] - """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 - - self._results = results - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssessmentHistory): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssessmentHistory): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/assessment_history_line_item.py b/corellium_api/models/assessment_history_line_item.py deleted file mode 100644 index 4ea9033..0000000 --- a/corellium_api/models/assessment_history_line_item.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AssessmentHistoryLineItem(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'date': 'float', - 'complete': 'float', - 'incomplete': 'float' - } - - attribute_map = { - 'date': 'date', - 'complete': 'complete', - 'incomplete': 'incomplete' - } - - def __init__(self, date=None, complete=None, incomplete=None, local_vars_configuration=None): # noqa: E501 - """AssessmentHistoryLineItem - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._date = None - self._complete = None - self._incomplete = None - self.discriminator = None - - self.date = date - self.complete = complete - self.incomplete = incomplete - - @property - def date(self): - """Gets the date of this AssessmentHistoryLineItem. # noqa: E501 - - UNIX Date representing the month # noqa: E501 - - :return: The date of this AssessmentHistoryLineItem. # noqa: E501 - :rtype: float - """ - return self._date - - @date.setter - def date(self, date): - """Sets the date of this AssessmentHistoryLineItem. - - UNIX Date representing the month # noqa: E501 - - :param date: The date of this AssessmentHistoryLineItem. # noqa: E501 - :type date: float - """ - if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 - raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 - - self._date = date - - @property - def complete(self): - """Gets the complete of this AssessmentHistoryLineItem. # noqa: E501 - - The number of successful assessments # noqa: E501 - - :return: The complete of this AssessmentHistoryLineItem. # noqa: E501 - :rtype: float - """ - return self._complete - - @complete.setter - def complete(self, complete): - """Sets the complete of this AssessmentHistoryLineItem. - - The number of successful assessments # noqa: E501 - - :param complete: The complete of this AssessmentHistoryLineItem. # noqa: E501 - :type complete: float - """ - if self.local_vars_configuration.client_side_validation and complete is None: # noqa: E501 - raise ValueError("Invalid value for `complete`, must not be `None`") # noqa: E501 - - self._complete = complete - - @property - def incomplete(self): - """Gets the incomplete of this AssessmentHistoryLineItem. # noqa: E501 - - The number of failed assessments # noqa: E501 - - :return: The incomplete of this AssessmentHistoryLineItem. # noqa: E501 - :rtype: float - """ - return self._incomplete - - @incomplete.setter - def incomplete(self, incomplete): - """Sets the incomplete of this AssessmentHistoryLineItem. - - The number of failed assessments # noqa: E501 - - :param incomplete: The incomplete of this AssessmentHistoryLineItem. # noqa: E501 - :type incomplete: float - """ - if self.local_vars_configuration.client_side_validation and incomplete is None: # noqa: E501 - raise ValueError("Invalid value for `incomplete`, must not be `None`") # noqa: E501 - - self._incomplete = incomplete - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssessmentHistoryLineItem): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssessmentHistoryLineItem): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/assessment_id_status.py b/corellium_api/models/assessment_id_status.py deleted file mode 100644 index a4a98d8..0000000 --- a/corellium_api/models/assessment_id_status.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AssessmentIdStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'status': 'str' - } - - attribute_map = { - 'id': 'id', - 'status': 'status' - } - - def __init__(self, id=None, status=None, local_vars_configuration=None): # noqa: E501 - """AssessmentIdStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._status = None - self.discriminator = None - - if id is not None: - self.id = id - self.status = status - - @property - def id(self): - """Gets the id of this AssessmentIdStatus. # noqa: E501 - - - :return: The id of this AssessmentIdStatus. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AssessmentIdStatus. - - - :param id: The id of this AssessmentIdStatus. # noqa: E501 - :type id: str - """ - - self._id = id - - @property - def status(self): - """Gets the status of this AssessmentIdStatus. # noqa: E501 - - - :return: The status of this AssessmentIdStatus. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this AssessmentIdStatus. - - - :param status: The status of this AssessmentIdStatus. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - - self._status = status - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AssessmentIdStatus): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AssessmentIdStatus): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/attach_interface_request.py b/corellium_api/models/attach_interface_request.py deleted file mode 100644 index 5e84eeb..0000000 --- a/corellium_api/models/attach_interface_request.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AttachInterfaceRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'interface_id': 'str', - 'interconnect_id': 'str' - } - - attribute_map = { - 'interface_id': 'interfaceId', - 'interconnect_id': 'interconnectId' - } - - def __init__(self, interface_id=None, interconnect_id=None, local_vars_configuration=None): # noqa: E501 - """AttachInterfaceRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._interface_id = None - self._interconnect_id = None - self.discriminator = None - - self.interface_id = interface_id - self.interconnect_id = interconnect_id - - @property - def interface_id(self): - """Gets the interface_id of this AttachInterfaceRequest. # noqa: E501 - - Interface identifier # noqa: E501 - - :return: The interface_id of this AttachInterfaceRequest. # noqa: E501 - :rtype: str - """ - return self._interface_id - - @interface_id.setter - def interface_id(self, interface_id): - """Sets the interface_id of this AttachInterfaceRequest. - - Interface identifier # noqa: E501 - - :param interface_id: The interface_id of this AttachInterfaceRequest. # noqa: E501 - :type interface_id: str - """ - if self.local_vars_configuration.client_side_validation and interface_id is None: # noqa: E501 - raise ValueError("Invalid value for `interface_id`, must not be `None`") # noqa: E501 - - self._interface_id = interface_id - - @property - def interconnect_id(self): - """Gets the interconnect_id of this AttachInterfaceRequest. # noqa: E501 - - Interconnect identifier # noqa: E501 - - :return: The interconnect_id of this AttachInterfaceRequest. # noqa: E501 - :rtype: str - """ - return self._interconnect_id - - @interconnect_id.setter - def interconnect_id(self, interconnect_id): - """Sets the interconnect_id of this AttachInterfaceRequest. - - Interconnect identifier # noqa: E501 - - :param interconnect_id: The interconnect_id of this AttachInterfaceRequest. # noqa: E501 - :type interconnect_id: str - """ - if self.local_vars_configuration.client_side_validation and interconnect_id is None: # noqa: E501 - raise ValueError("Invalid value for `interconnect_id`, must not be `None`") # noqa: E501 - - self._interconnect_id = interconnect_id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AttachInterfaceRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AttachInterfaceRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/auth_provider.py b/corellium_api/models/auth_provider.py deleted file mode 100644 index 83bf4f3..0000000 --- a/corellium_api/models/auth_provider.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class AuthProvider(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'identifier': 'str', - 'provider_type': 'str', - 'default': 'bool', - 'label': 'str', - 'enabled': 'bool', - 'authorization_url': 'str', - 'id': 'str', - 'provider': 'str' - } - - attribute_map = { - 'name': 'name', - 'identifier': 'identifier', - 'provider_type': 'providerType', - 'default': 'default', - 'label': 'label', - 'enabled': 'enabled', - 'authorization_url': 'authorizationUrl', - 'id': 'id', - 'provider': 'provider' - } - - def __init__(self, name=None, identifier=None, provider_type=None, default=None, label=None, enabled=None, authorization_url=None, id=None, provider=None, local_vars_configuration=None): # noqa: E501 - """AuthProvider - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._identifier = None - self._provider_type = None - self._default = None - self._label = None - self._enabled = None - self._authorization_url = None - self._id = None - self._provider = None - self.discriminator = None - - self.name = name - self.identifier = identifier - self.provider_type = provider_type - self.default = default - self.label = label - self.enabled = enabled - self.authorization_url = authorization_url - self.id = id - self.provider = provider - - @property - def name(self): - """Gets the name of this AuthProvider. # noqa: E501 - - Provider name for a given provider type # noqa: E501 - - :return: The name of this AuthProvider. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this AuthProvider. - - Provider name for a given provider type # noqa: E501 - - :param name: The name of this AuthProvider. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def identifier(self): - """Gets the identifier of this AuthProvider. # noqa: E501 - - The identifier for the provider # noqa: E501 - - :return: The identifier of this AuthProvider. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this AuthProvider. - - The identifier for the provider # noqa: E501 - - :param identifier: The identifier of this AuthProvider. # noqa: E501 - :type identifier: str - """ - - self._identifier = identifier - - @property - def provider_type(self): - """Gets the provider_type of this AuthProvider. # noqa: E501 - - Provider type # noqa: E501 - - :return: The provider_type of this AuthProvider. # noqa: E501 - :rtype: str - """ - return self._provider_type - - @provider_type.setter - def provider_type(self, provider_type): - """Sets the provider_type of this AuthProvider. - - Provider type # noqa: E501 - - :param provider_type: The provider_type of this AuthProvider. # noqa: E501 - :type provider_type: str - """ - - self._provider_type = provider_type - - @property - def default(self): - """Gets the default of this AuthProvider. # noqa: E501 - - Denotes whether it's the default # noqa: E501 - - :return: The default of this AuthProvider. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this AuthProvider. - - Denotes whether it's the default # noqa: E501 - - :param default: The default of this AuthProvider. # noqa: E501 - :type default: bool - """ - - self._default = default - - @property - def label(self): - """Gets the label of this AuthProvider. # noqa: E501 - - Provider label # noqa: E501 - - :return: The label of this AuthProvider. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this AuthProvider. - - Provider label # noqa: E501 - - :param label: The label of this AuthProvider. # noqa: E501 - :type label: str - """ - - self._label = label - - @property - def enabled(self): - """Gets the enabled of this AuthProvider. # noqa: E501 - - Denotes whether they're enabled or not # noqa: E501 - - :return: The enabled of this AuthProvider. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this AuthProvider. - - Denotes whether they're enabled or not # noqa: E501 - - :param enabled: The enabled of this AuthProvider. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - @property - def authorization_url(self): - """Gets the authorization_url of this AuthProvider. # noqa: E501 - - URL for provider auth # noqa: E501 - - :return: The authorization_url of this AuthProvider. # noqa: E501 - :rtype: str - """ - return self._authorization_url - - @authorization_url.setter - def authorization_url(self, authorization_url): - """Sets the authorization_url of this AuthProvider. - - URL for provider auth # noqa: E501 - - :param authorization_url: The authorization_url of this AuthProvider. # noqa: E501 - :type authorization_url: str - """ - - self._authorization_url = authorization_url - - @property - def id(self): - """Gets the id of this AuthProvider. # noqa: E501 - - The identifier for the provider # noqa: E501 - - :return: The id of this AuthProvider. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AuthProvider. - - The identifier for the provider # noqa: E501 - - :param id: The id of this AuthProvider. # noqa: E501 - :type id: str - """ - - self._id = id - - @property - def provider(self): - """Gets the provider of this AuthProvider. # noqa: E501 - - Auth provider # noqa: E501 - - :return: The provider of this AuthProvider. # noqa: E501 - :rtype: str - """ - return self._provider - - @provider.setter - def provider(self, provider): - """Sets the provider of this AuthProvider. - - Auth provider # noqa: E501 - - :param provider: The provider of this AuthProvider. # noqa: E501 - :type provider: str - """ - - self._provider = provider - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AuthProvider): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, AuthProvider): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/bit.py b/corellium_api/models/bit.py deleted file mode 100644 index b7da4ca..0000000 --- a/corellium_api/models/bit.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Bit(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - _0 = "0" - _1 = "1" - - allowable_values = [_0, _1] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """Bit - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Bit): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Bit): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/btrace_enable_options.py b/corellium_api/models/btrace_enable_options.py deleted file mode 100644 index 5c56705..0000000 --- a/corellium_api/models/btrace_enable_options.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class BtraceEnableOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'ranges': 'list[list[str]]' - } - - attribute_map = { - 'ranges': 'ranges' - } - - def __init__(self, ranges=None, local_vars_configuration=None): # noqa: E501 - """BtraceEnableOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._ranges = None - self.discriminator = None - - self.ranges = ranges - - @property - def ranges(self): - """Gets the ranges of this BtraceEnableOptions. # noqa: E501 - - # noqa: E501 - - :return: The ranges of this BtraceEnableOptions. # noqa: E501 - :rtype: list[list[str]] - """ - return self._ranges - - @ranges.setter - def ranges(self, ranges): - """Sets the ranges of this BtraceEnableOptions. - - # noqa: E501 - - :param ranges: The ranges of this BtraceEnableOptions. # noqa: E501 - :type ranges: list[list[str]] - """ - - self._ranges = ranges - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BtraceEnableOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, BtraceEnableOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/button.py b/corellium_api/models/button.py deleted file mode 100644 index c8ce7ac..0000000 --- a/corellium_api/models/button.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Button(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - FINGER = "finger" - HOMEBUTTON = "homeButton" - HOLDBUTTON = "holdButton" - VOLUMEUP = "volumeUp" - VOLUMEDOWN = "volumeDown" - RINGERSWITCH = "ringerSwitch" - BACKBUTTON = "backButton" - OVERVIEWBUTTON = "overviewButton" - - allowable_values = [FINGER, HOMEBUTTON, HOLDBUTTON, VOLUMEUP, VOLUMEDOWN, RINGERSWITCH, BACKBUTTON, OVERVIEWBUTTON] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """Button - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Button): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Button): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/check_subdomain_response.py b/corellium_api/models/check_subdomain_response.py deleted file mode 100644 index 0b773b1..0000000 --- a/corellium_api/models/check_subdomain_response.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class CheckSubdomainResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'available': 'bool' - } - - attribute_map = { - 'available': 'available' - } - - def __init__(self, available=None, local_vars_configuration=None): # noqa: E501 - """CheckSubdomainResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._available = None - self.discriminator = None - - self.available = available - - @property - def available(self): - """Gets the available of this CheckSubdomainResponse. # noqa: E501 - - Indicates whether the subdomain is available or not # noqa: E501 - - :return: The available of this CheckSubdomainResponse. # noqa: E501 - :rtype: bool - """ - return self._available - - @available.setter - def available(self, available): - """Sets the available of this CheckSubdomainResponse. - - Indicates whether the subdomain is available or not # noqa: E501 - - :param available: The available of this CheckSubdomainResponse. # noqa: E501 - :type available: bool - """ - if self.local_vars_configuration.client_side_validation and available is None: # noqa: E501 - raise ValueError("Invalid value for `available`, must not be `None`") # noqa: E501 - - self._available = available - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CheckSubdomainResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CheckSubdomainResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/config_response.py b/corellium_api/models/config_response.py deleted file mode 100644 index efa32a0..0000000 --- a/corellium_api/models/config_response.py +++ /dev/null @@ -1,1019 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ConfigResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'on_site': 'bool', - 'network_types': 'list[str]', - 'network_type': 'str', - 'show_domain_settings': 'bool', - 'version': 'str', - 'invalid_build': 'bool', - 'sep_sim': 'bool', - 'installer_available': 'bool', - 'invoiced_publishable_key': 'str', - 'stripe_public_key': 'str', - 'intercom_id': 'str', - 'aux_webhook': 'str', - 'gtm_id': 'str', - 'zapier_feedback_webhook': 'str', - 'zapier_bugs_webhook': 'str', - 'billing_backend': 'str', - 'maintenance': 'ConfigResponseMaintenance', - 'logging': 'Logging', - 'cloud_admin': 'str', - 'files_admin': 'str', - 'cloud_domain': 'str', - 'billing_domain': 'str', - 'app_domain': 'str', - 'max_network_monitor_file_size': 'str', - 'enable_firmware_image_upload': 'bool', - 'auth_providers': 'list[AuthProvider]', - 'snapshot_limit': 'float', - 'max_kernel_size': 'float', - 'max_ramdisk_size': 'float', - 'charm_sdk': 'str', - 'trial': 'Trial', - 'sentry_url': 'str', - 'domain_authentication_providers': 'bool', - 'default_ssid': 'str' - } - - attribute_map = { - 'on_site': 'onSite', - 'network_types': 'networkTypes', - 'network_type': 'networkType', - 'show_domain_settings': 'showDomainSettings', - 'version': 'version', - 'invalid_build': 'invalidBuild', - 'sep_sim': 'sepSim', - 'installer_available': 'installerAvailable', - 'invoiced_publishable_key': 'invoicedPublishableKey', - 'stripe_public_key': 'stripePublicKey', - 'intercom_id': 'intercomId', - 'aux_webhook': 'auxWebhook', - 'gtm_id': 'gtmId', - 'zapier_feedback_webhook': 'zapierFeedbackWebhook', - 'zapier_bugs_webhook': 'zapierBugsWebhook', - 'billing_backend': 'billingBackend', - 'maintenance': 'maintenance', - 'logging': 'logging', - 'cloud_admin': 'cloudAdmin', - 'files_admin': 'filesAdmin', - 'cloud_domain': 'cloudDomain', - 'billing_domain': 'billingDomain', - 'app_domain': 'appDomain', - 'max_network_monitor_file_size': 'maxNetworkMonitorFileSize', - 'enable_firmware_image_upload': 'enableFirmwareImageUpload', - 'auth_providers': 'authProviders', - 'snapshot_limit': 'snapshotLimit', - 'max_kernel_size': 'maxKernelSize', - 'max_ramdisk_size': 'maxRamdiskSize', - 'charm_sdk': 'charmSDK', - 'trial': 'trial', - 'sentry_url': 'sentryUrl', - 'domain_authentication_providers': 'domainAuthenticationProviders', - 'default_ssid': 'defaultSsid' - } - - def __init__(self, on_site=None, network_types=None, network_type=None, show_domain_settings=None, version=None, invalid_build=None, sep_sim=None, installer_available=None, invoiced_publishable_key=None, stripe_public_key=None, intercom_id=None, aux_webhook=None, gtm_id=None, zapier_feedback_webhook=None, zapier_bugs_webhook=None, billing_backend=None, maintenance=None, logging=None, cloud_admin=None, files_admin=None, cloud_domain=None, billing_domain=None, app_domain=None, max_network_monitor_file_size=None, enable_firmware_image_upload=None, auth_providers=None, snapshot_limit=None, max_kernel_size=None, max_ramdisk_size=None, charm_sdk=None, trial=None, sentry_url=None, domain_authentication_providers=None, default_ssid=None, local_vars_configuration=None): # noqa: E501 - """ConfigResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._on_site = None - self._network_types = None - self._network_type = None - self._show_domain_settings = None - self._version = None - self._invalid_build = None - self._sep_sim = None - self._installer_available = None - self._invoiced_publishable_key = None - self._stripe_public_key = None - self._intercom_id = None - self._aux_webhook = None - self._gtm_id = None - self._zapier_feedback_webhook = None - self._zapier_bugs_webhook = None - self._billing_backend = None - self._maintenance = None - self._logging = None - self._cloud_admin = None - self._files_admin = None - self._cloud_domain = None - self._billing_domain = None - self._app_domain = None - self._max_network_monitor_file_size = None - self._enable_firmware_image_upload = None - self._auth_providers = None - self._snapshot_limit = None - self._max_kernel_size = None - self._max_ramdisk_size = None - self._charm_sdk = None - self._trial = None - self._sentry_url = None - self._domain_authentication_providers = None - self._default_ssid = None - self.discriminator = None - - self.on_site = on_site - self.network_types = network_types - self.network_type = network_type - self.show_domain_settings = show_domain_settings - self.version = version - self.invalid_build = invalid_build - self.sep_sim = sep_sim - self.installer_available = installer_available - self.invoiced_publishable_key = invoiced_publishable_key - self.stripe_public_key = stripe_public_key - self.intercom_id = intercom_id - self.aux_webhook = aux_webhook - self.gtm_id = gtm_id - self.zapier_feedback_webhook = zapier_feedback_webhook - self.zapier_bugs_webhook = zapier_bugs_webhook - self.billing_backend = billing_backend - self.maintenance = maintenance - if logging is not None: - self.logging = logging - self.cloud_admin = cloud_admin - self.files_admin = files_admin - self.cloud_domain = cloud_domain - self.billing_domain = billing_domain - self.app_domain = app_domain - self.max_network_monitor_file_size = max_network_monitor_file_size - self.enable_firmware_image_upload = enable_firmware_image_upload - self.auth_providers = auth_providers - self.snapshot_limit = snapshot_limit - self.max_kernel_size = max_kernel_size - self.max_ramdisk_size = max_ramdisk_size - self.charm_sdk = charm_sdk - if trial is not None: - self.trial = trial - self.sentry_url = sentry_url - self.domain_authentication_providers = domain_authentication_providers - self.default_ssid = default_ssid - - @property - def on_site(self): - """Gets the on_site of this ConfigResponse. # noqa: E501 - - Denotes whether it's an on-site install # noqa: E501 - - :return: The on_site of this ConfigResponse. # noqa: E501 - :rtype: bool - """ - return self._on_site - - @on_site.setter - def on_site(self, on_site): - """Sets the on_site of this ConfigResponse. - - Denotes whether it's an on-site install # noqa: E501 - - :param on_site: The on_site of this ConfigResponse. # noqa: E501 - :type on_site: bool - """ - - self._on_site = on_site - - @property - def network_types(self): - """Gets the network_types of this ConfigResponse. # noqa: E501 - - Valid network types (e.g. \"nat\", \"bridged\", \"routed\") # noqa: E501 - - :return: The network_types of this ConfigResponse. # noqa: E501 - :rtype: list[str] - """ - return self._network_types - - @network_types.setter - def network_types(self, network_types): - """Sets the network_types of this ConfigResponse. - - Valid network types (e.g. \"nat\", \"bridged\", \"routed\") # noqa: E501 - - :param network_types: The network_types of this ConfigResponse. # noqa: E501 - :type network_types: list[str] - """ - - self._network_types = network_types - - @property - def network_type(self): - """Gets the network_type of this ConfigResponse. # noqa: E501 - - Current network type setting # noqa: E501 - - :return: The network_type of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._network_type - - @network_type.setter - def network_type(self, network_type): - """Sets the network_type of this ConfigResponse. - - Current network type setting # noqa: E501 - - :param network_type: The network_type of this ConfigResponse. # noqa: E501 - :type network_type: str - """ - - self._network_type = network_type - - @property - def show_domain_settings(self): - """Gets the show_domain_settings of this ConfigResponse. # noqa: E501 - - Denotes whether to show domain settings # noqa: E501 - - :return: The show_domain_settings of this ConfigResponse. # noqa: E501 - :rtype: bool - """ - return self._show_domain_settings - - @show_domain_settings.setter - def show_domain_settings(self, show_domain_settings): - """Sets the show_domain_settings of this ConfigResponse. - - Denotes whether to show domain settings # noqa: E501 - - :param show_domain_settings: The show_domain_settings of this ConfigResponse. # noqa: E501 - :type show_domain_settings: bool - """ - - self._show_domain_settings = show_domain_settings - - @property - def version(self): - """Gets the version of this ConfigResponse. # noqa: E501 - - Denotes the version # noqa: E501 - - :return: The version of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this ConfigResponse. - - Denotes the version # noqa: E501 - - :param version: The version of this ConfigResponse. # noqa: E501 - :type version: str - """ - - self._version = version - - @property - def invalid_build(self): - """Gets the invalid_build of this ConfigResponse. # noqa: E501 - - Denotes whether the build is invalid # noqa: E501 - - :return: The invalid_build of this ConfigResponse. # noqa: E501 - :rtype: bool - """ - return self._invalid_build - - @invalid_build.setter - def invalid_build(self, invalid_build): - """Sets the invalid_build of this ConfigResponse. - - Denotes whether the build is invalid # noqa: E501 - - :param invalid_build: The invalid_build of this ConfigResponse. # noqa: E501 - :type invalid_build: bool - """ - - self._invalid_build = invalid_build - - @property - def sep_sim(self): - """Gets the sep_sim of this ConfigResponse. # noqa: E501 - - Denotes whether sepSim is enabled # noqa: E501 - - :return: The sep_sim of this ConfigResponse. # noqa: E501 - :rtype: bool - """ - return self._sep_sim - - @sep_sim.setter - def sep_sim(self, sep_sim): - """Sets the sep_sim of this ConfigResponse. - - Denotes whether sepSim is enabled # noqa: E501 - - :param sep_sim: The sep_sim of this ConfigResponse. # noqa: E501 - :type sep_sim: bool - """ - - self._sep_sim = sep_sim - - @property - def installer_available(self): - """Gets the installer_available of this ConfigResponse. # noqa: E501 - - Denotes whether installer is available # noqa: E501 - - :return: The installer_available of this ConfigResponse. # noqa: E501 - :rtype: bool - """ - return self._installer_available - - @installer_available.setter - def installer_available(self, installer_available): - """Sets the installer_available of this ConfigResponse. - - Denotes whether installer is available # noqa: E501 - - :param installer_available: The installer_available of this ConfigResponse. # noqa: E501 - :type installer_available: bool - """ - - self._installer_available = installer_available - - @property - def invoiced_publishable_key(self): - """Gets the invoiced_publishable_key of this ConfigResponse. # noqa: E501 - - API publishable key to use for Invoiced # noqa: E501 - - :return: The invoiced_publishable_key of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._invoiced_publishable_key - - @invoiced_publishable_key.setter - def invoiced_publishable_key(self, invoiced_publishable_key): - """Sets the invoiced_publishable_key of this ConfigResponse. - - API publishable key to use for Invoiced # noqa: E501 - - :param invoiced_publishable_key: The invoiced_publishable_key of this ConfigResponse. # noqa: E501 - :type invoiced_publishable_key: str - """ - - self._invoiced_publishable_key = invoiced_publishable_key - - @property - def stripe_public_key(self): - """Gets the stripe_public_key of this ConfigResponse. # noqa: E501 - - Stripe public key # noqa: E501 - - :return: The stripe_public_key of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._stripe_public_key - - @stripe_public_key.setter - def stripe_public_key(self, stripe_public_key): - """Sets the stripe_public_key of this ConfigResponse. - - Stripe public key # noqa: E501 - - :param stripe_public_key: The stripe_public_key of this ConfigResponse. # noqa: E501 - :type stripe_public_key: str - """ - - self._stripe_public_key = stripe_public_key - - @property - def intercom_id(self): - """Gets the intercom_id of this ConfigResponse. # noqa: E501 - - Intercom app ID, also known as workspace ID # noqa: E501 - - :return: The intercom_id of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._intercom_id - - @intercom_id.setter - def intercom_id(self, intercom_id): - """Sets the intercom_id of this ConfigResponse. - - Intercom app ID, also known as workspace ID # noqa: E501 - - :param intercom_id: The intercom_id of this ConfigResponse. # noqa: E501 - :type intercom_id: str - """ - - self._intercom_id = intercom_id - - @property - def aux_webhook(self): - """Gets the aux_webhook of this ConfigResponse. # noqa: E501 - - Webhook URL for aux # noqa: E501 - - :return: The aux_webhook of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._aux_webhook - - @aux_webhook.setter - def aux_webhook(self, aux_webhook): - """Sets the aux_webhook of this ConfigResponse. - - Webhook URL for aux # noqa: E501 - - :param aux_webhook: The aux_webhook of this ConfigResponse. # noqa: E501 - :type aux_webhook: str - """ - - self._aux_webhook = aux_webhook - - @property - def gtm_id(self): - """Gets the gtm_id of this ConfigResponse. # noqa: E501 - - Google Tag Manager # noqa: E501 - - :return: The gtm_id of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._gtm_id - - @gtm_id.setter - def gtm_id(self, gtm_id): - """Sets the gtm_id of this ConfigResponse. - - Google Tag Manager # noqa: E501 - - :param gtm_id: The gtm_id of this ConfigResponse. # noqa: E501 - :type gtm_id: str - """ - - self._gtm_id = gtm_id - - @property - def zapier_feedback_webhook(self): - """Gets the zapier_feedback_webhook of this ConfigResponse. # noqa: E501 - - Webhook URL to send feedback into Productboard automatically # noqa: E501 - - :return: The zapier_feedback_webhook of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._zapier_feedback_webhook - - @zapier_feedback_webhook.setter - def zapier_feedback_webhook(self, zapier_feedback_webhook): - """Sets the zapier_feedback_webhook of this ConfigResponse. - - Webhook URL to send feedback into Productboard automatically # noqa: E501 - - :param zapier_feedback_webhook: The zapier_feedback_webhook of this ConfigResponse. # noqa: E501 - :type zapier_feedback_webhook: str - """ - - self._zapier_feedback_webhook = zapier_feedback_webhook - - @property - def zapier_bugs_webhook(self): - """Gets the zapier_bugs_webhook of this ConfigResponse. # noqa: E501 - - Webhook URL to send frontend errors to Jira automatically # noqa: E501 - - :return: The zapier_bugs_webhook of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._zapier_bugs_webhook - - @zapier_bugs_webhook.setter - def zapier_bugs_webhook(self, zapier_bugs_webhook): - """Sets the zapier_bugs_webhook of this ConfigResponse. - - Webhook URL to send frontend errors to Jira automatically # noqa: E501 - - :param zapier_bugs_webhook: The zapier_bugs_webhook of this ConfigResponse. # noqa: E501 - :type zapier_bugs_webhook: str - """ - - self._zapier_bugs_webhook = zapier_bugs_webhook - - @property - def billing_backend(self): - """Gets the billing_backend of this ConfigResponse. # noqa: E501 - - Default backend billing api name for new subscriptions (e.g. \"stripe\") # noqa: E501 - - :return: The billing_backend of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._billing_backend - - @billing_backend.setter - def billing_backend(self, billing_backend): - """Sets the billing_backend of this ConfigResponse. - - Default backend billing api name for new subscriptions (e.g. \"stripe\") # noqa: E501 - - :param billing_backend: The billing_backend of this ConfigResponse. # noqa: E501 - :type billing_backend: str - """ - - self._billing_backend = billing_backend - - @property - def maintenance(self): - """Gets the maintenance of this ConfigResponse. # noqa: E501 - - - :return: The maintenance of this ConfigResponse. # noqa: E501 - :rtype: ConfigResponseMaintenance - """ - return self._maintenance - - @maintenance.setter - def maintenance(self, maintenance): - """Sets the maintenance of this ConfigResponse. - - - :param maintenance: The maintenance of this ConfigResponse. # noqa: E501 - :type maintenance: ConfigResponseMaintenance - """ - - self._maintenance = maintenance - - @property - def logging(self): - """Gets the logging of this ConfigResponse. # noqa: E501 - - - :return: The logging of this ConfigResponse. # noqa: E501 - :rtype: Logging - """ - return self._logging - - @logging.setter - def logging(self, logging): - """Sets the logging of this ConfigResponse. - - - :param logging: The logging of this ConfigResponse. # noqa: E501 - :type logging: Logging - """ - - self._logging = logging - - @property - def cloud_admin(self): - """Gets the cloud_admin of this ConfigResponse. # noqa: E501 - - URL for cloud admin login # noqa: E501 - - :return: The cloud_admin of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._cloud_admin - - @cloud_admin.setter - def cloud_admin(self, cloud_admin): - """Sets the cloud_admin of this ConfigResponse. - - URL for cloud admin login # noqa: E501 - - :param cloud_admin: The cloud_admin of this ConfigResponse. # noqa: E501 - :type cloud_admin: str - """ - - self._cloud_admin = cloud_admin - - @property - def files_admin(self): - """Gets the files_admin of this ConfigResponse. # noqa: E501 - - URL for files admin login # noqa: E501 - - :return: The files_admin of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._files_admin - - @files_admin.setter - def files_admin(self, files_admin): - """Sets the files_admin of this ConfigResponse. - - URL for files admin login # noqa: E501 - - :param files_admin: The files_admin of this ConfigResponse. # noqa: E501 - :type files_admin: str - """ - - self._files_admin = files_admin - - @property - def cloud_domain(self): - """Gets the cloud_domain of this ConfigResponse. # noqa: E501 - - Cloud domain name (usually corellium.com or staging.corellium.com) # noqa: E501 - - :return: The cloud_domain of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._cloud_domain - - @cloud_domain.setter - def cloud_domain(self, cloud_domain): - """Sets the cloud_domain of this ConfigResponse. - - Cloud domain name (usually corellium.com or staging.corellium.com) # noqa: E501 - - :param cloud_domain: The cloud_domain of this ConfigResponse. # noqa: E501 - :type cloud_domain: str - """ - - self._cloud_domain = cloud_domain - - @property - def billing_domain(self): - """Gets the billing_domain of this ConfigResponse. # noqa: E501 - - Billing domain name # noqa: E501 - - :return: The billing_domain of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._billing_domain - - @billing_domain.setter - def billing_domain(self, billing_domain): - """Sets the billing_domain of this ConfigResponse. - - Billing domain name # noqa: E501 - - :param billing_domain: The billing_domain of this ConfigResponse. # noqa: E501 - :type billing_domain: str - """ - - self._billing_domain = billing_domain - - @property - def app_domain(self): - """Gets the app_domain of this ConfigResponse. # noqa: E501 - - App domain name (usually app.corellium.com or app.staging.corellium.com) # noqa: E501 - - :return: The app_domain of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._app_domain - - @app_domain.setter - def app_domain(self, app_domain): - """Sets the app_domain of this ConfigResponse. - - App domain name (usually app.corellium.com or app.staging.corellium.com) # noqa: E501 - - :param app_domain: The app_domain of this ConfigResponse. # noqa: E501 - :type app_domain: str - """ - - self._app_domain = app_domain - - @property - def max_network_monitor_file_size(self): - """Gets the max_network_monitor_file_size of this ConfigResponse. # noqa: E501 - - Maximum network monitor file size # noqa: E501 - - :return: The max_network_monitor_file_size of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._max_network_monitor_file_size - - @max_network_monitor_file_size.setter - def max_network_monitor_file_size(self, max_network_monitor_file_size): - """Sets the max_network_monitor_file_size of this ConfigResponse. - - Maximum network monitor file size # noqa: E501 - - :param max_network_monitor_file_size: The max_network_monitor_file_size of this ConfigResponse. # noqa: E501 - :type max_network_monitor_file_size: str - """ - - self._max_network_monitor_file_size = max_network_monitor_file_size - - @property - def enable_firmware_image_upload(self): - """Gets the enable_firmware_image_upload of this ConfigResponse. # noqa: E501 - - Denotes whether users can upload firmware images # noqa: E501 - - :return: The enable_firmware_image_upload of this ConfigResponse. # noqa: E501 - :rtype: bool - """ - return self._enable_firmware_image_upload - - @enable_firmware_image_upload.setter - def enable_firmware_image_upload(self, enable_firmware_image_upload): - """Sets the enable_firmware_image_upload of this ConfigResponse. - - Denotes whether users can upload firmware images # noqa: E501 - - :param enable_firmware_image_upload: The enable_firmware_image_upload of this ConfigResponse. # noqa: E501 - :type enable_firmware_image_upload: bool - """ - - self._enable_firmware_image_upload = enable_firmware_image_upload - - @property - def auth_providers(self): - """Gets the auth_providers of this ConfigResponse. # noqa: E501 - - Auth providers # noqa: E501 - - :return: The auth_providers of this ConfigResponse. # noqa: E501 - :rtype: list[AuthProvider] - """ - return self._auth_providers - - @auth_providers.setter - def auth_providers(self, auth_providers): - """Sets the auth_providers of this ConfigResponse. - - Auth providers # noqa: E501 - - :param auth_providers: The auth_providers of this ConfigResponse. # noqa: E501 - :type auth_providers: list[AuthProvider] - """ - - self._auth_providers = auth_providers - - @property - def snapshot_limit(self): - """Gets the snapshot_limit of this ConfigResponse. # noqa: E501 - - Maximum number of snapshots to allow # noqa: E501 - - :return: The snapshot_limit of this ConfigResponse. # noqa: E501 - :rtype: float - """ - return self._snapshot_limit - - @snapshot_limit.setter - def snapshot_limit(self, snapshot_limit): - """Sets the snapshot_limit of this ConfigResponse. - - Maximum number of snapshots to allow # noqa: E501 - - :param snapshot_limit: The snapshot_limit of this ConfigResponse. # noqa: E501 - :type snapshot_limit: float - """ - - self._snapshot_limit = snapshot_limit - - @property - def max_kernel_size(self): - """Gets the max_kernel_size of this ConfigResponse. # noqa: E501 - - The maximum size, in bytes, (default: 100 MB) that an uploaded kernel should be # noqa: E501 - - :return: The max_kernel_size of this ConfigResponse. # noqa: E501 - :rtype: float - """ - return self._max_kernel_size - - @max_kernel_size.setter - def max_kernel_size(self, max_kernel_size): - """Sets the max_kernel_size of this ConfigResponse. - - The maximum size, in bytes, (default: 100 MB) that an uploaded kernel should be # noqa: E501 - - :param max_kernel_size: The max_kernel_size of this ConfigResponse. # noqa: E501 - :type max_kernel_size: float - """ - - self._max_kernel_size = max_kernel_size - - @property - def max_ramdisk_size(self): - """Gets the max_ramdisk_size of this ConfigResponse. # noqa: E501 - - The maximum size, in bytes, (default: 500 MB) that an uploaded ramdisk should be # noqa: E501 - - :return: The max_ramdisk_size of this ConfigResponse. # noqa: E501 - :rtype: float - """ - return self._max_ramdisk_size - - @max_ramdisk_size.setter - def max_ramdisk_size(self, max_ramdisk_size): - """Sets the max_ramdisk_size of this ConfigResponse. - - The maximum size, in bytes, (default: 500 MB) that an uploaded ramdisk should be # noqa: E501 - - :param max_ramdisk_size: The max_ramdisk_size of this ConfigResponse. # noqa: E501 - :type max_ramdisk_size: float - """ - - self._max_ramdisk_size = max_ramdisk_size - - @property - def charm_sdk(self): - """Gets the charm_sdk of this ConfigResponse. # noqa: E501 - - Denotes whether charmSDK is enabled # noqa: E501 - - :return: The charm_sdk of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._charm_sdk - - @charm_sdk.setter - def charm_sdk(self, charm_sdk): - """Sets the charm_sdk of this ConfigResponse. - - Denotes whether charmSDK is enabled # noqa: E501 - - :param charm_sdk: The charm_sdk of this ConfigResponse. # noqa: E501 - :type charm_sdk: str - """ - - self._charm_sdk = charm_sdk - - @property - def trial(self): - """Gets the trial of this ConfigResponse. # noqa: E501 - - - :return: The trial of this ConfigResponse. # noqa: E501 - :rtype: Trial - """ - return self._trial - - @trial.setter - def trial(self, trial): - """Sets the trial of this ConfigResponse. - - - :param trial: The trial of this ConfigResponse. # noqa: E501 - :type trial: Trial - """ - - self._trial = trial - - @property - def sentry_url(self): - """Gets the sentry_url of this ConfigResponse. # noqa: E501 - - Sentry URL # noqa: E501 - - :return: The sentry_url of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._sentry_url - - @sentry_url.setter - def sentry_url(self, sentry_url): - """Sets the sentry_url of this ConfigResponse. - - Sentry URL # noqa: E501 - - :param sentry_url: The sentry_url of this ConfigResponse. # noqa: E501 - :type sentry_url: str - """ - - self._sentry_url = sentry_url - - @property - def domain_authentication_providers(self): - """Gets the domain_authentication_providers of this ConfigResponse. # noqa: E501 - - If enabled, adds the default providers in their current configuration # noqa: E501 - - :return: The domain_authentication_providers of this ConfigResponse. # noqa: E501 - :rtype: bool - """ - return self._domain_authentication_providers - - @domain_authentication_providers.setter - def domain_authentication_providers(self, domain_authentication_providers): - """Sets the domain_authentication_providers of this ConfigResponse. - - If enabled, adds the default providers in their current configuration # noqa: E501 - - :param domain_authentication_providers: The domain_authentication_providers of this ConfigResponse. # noqa: E501 - :type domain_authentication_providers: bool - """ - - self._domain_authentication_providers = domain_authentication_providers - - @property - def default_ssid(self): - """Gets the default_ssid of this ConfigResponse. # noqa: E501 - - The configured Default SSID from /etc/corellium/setup.json # noqa: E501 - - :return: The default_ssid of this ConfigResponse. # noqa: E501 - :rtype: str - """ - return self._default_ssid - - @default_ssid.setter - def default_ssid(self, default_ssid): - """Sets the default_ssid of this ConfigResponse. - - The configured Default SSID from /etc/corellium/setup.json # noqa: E501 - - :param default_ssid: The default_ssid of this ConfigResponse. # noqa: E501 - :type default_ssid: str - """ - - self._default_ssid = default_ssid - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConfigResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ConfigResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/config_response_maintenance.py b/corellium_api/models/config_response_maintenance.py deleted file mode 100644 index f5cfd5b..0000000 --- a/corellium_api/models/config_response_maintenance.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ConfigResponseMaintenance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'message': 'str', - 'header': 'str' - } - - attribute_map = { - 'message': 'message', - 'header': 'header' - } - - def __init__(self, message=None, header=None, local_vars_configuration=None): # noqa: E501 - """ConfigResponseMaintenance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._message = None - self._header = None - self.discriminator = None - - self.message = message - self.header = header - - @property - def message(self): - """Gets the message of this ConfigResponseMaintenance. # noqa: E501 - - Maintenance message # noqa: E501 - - :return: The message of this ConfigResponseMaintenance. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ConfigResponseMaintenance. - - Maintenance message # noqa: E501 - - :param message: The message of this ConfigResponseMaintenance. # noqa: E501 - :type message: str - """ - - self._message = message - - @property - def header(self): - """Gets the header of this ConfigResponseMaintenance. # noqa: E501 - - Maintenance header # noqa: E501 - - :return: The header of this ConfigResponseMaintenance. # noqa: E501 - :rtype: str - """ - return self._header - - @header.setter - def header(self, header): - """Sets the header of this ConfigResponseMaintenance. - - Maintenance header # noqa: E501 - - :param header: The header of this ConfigResponseMaintenance. # noqa: E501 - :type header: str - """ - - self._header = header - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConfigResponseMaintenance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ConfigResponseMaintenance): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/coupon_options.py b/corellium_api/models/coupon_options.py deleted file mode 100644 index be939d3..0000000 --- a/corellium_api/models/coupon_options.py +++ /dev/null @@ -1,198 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class CouponOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'amount': 'float', - 'used': 'bool' - } - - attribute_map = { - 'type': 'type', - 'amount': 'amount', - 'used': 'used' - } - - def __init__(self, type=None, amount=None, used=None, local_vars_configuration=None): # noqa: E501 - """CouponOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._amount = None - self._used = None - self.discriminator = None - - self.type = type - self.amount = amount - self.used = used - - @property - def type(self): - """Gets the type of this CouponOptions. # noqa: E501 - - # noqa: E501 - - :return: The type of this CouponOptions. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CouponOptions. - - # noqa: E501 - - :param type: The type of this CouponOptions. # noqa: E501 - :type type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["percent", "discount", "absolute"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def amount(self): - """Gets the amount of this CouponOptions. # noqa: E501 - - Amount # noqa: E501 - - :return: The amount of this CouponOptions. # noqa: E501 - :rtype: float - """ - return self._amount - - @amount.setter - def amount(self, amount): - """Sets the amount of this CouponOptions. - - Amount # noqa: E501 - - :param amount: The amount of this CouponOptions. # noqa: E501 - :type amount: float - """ - if self.local_vars_configuration.client_side_validation and amount is None: # noqa: E501 - raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 - - self._amount = amount - - @property - def used(self): - """Gets the used of this CouponOptions. # noqa: E501 - - Is Used. If true, this coupon has been used and cannot be used again # noqa: E501 - - :return: The used of this CouponOptions. # noqa: E501 - :rtype: bool - """ - return self._used - - @used.setter - def used(self, used): - """Sets the used of this CouponOptions. - - Is Used. If true, this coupon has been used and cannot be used again # noqa: E501 - - :param used: The used of this CouponOptions. # noqa: E501 - :type used: bool - """ - if self.local_vars_configuration.client_side_validation and used is None: # noqa: E501 - raise ValueError("Invalid value for `used`, must not be `None`") # noqa: E501 - - self._used = used - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CouponOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CouponOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/create_assessment_dto.py b/corellium_api/models/create_assessment_dto.py deleted file mode 100644 index 3729f9f..0000000 --- a/corellium_api/models/create_assessment_dto.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class CreateAssessmentDto(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'instance_id': 'str', - 'bundle_id': 'str', - 'wordlist_id': 'str' - } - - attribute_map = { - 'instance_id': 'instanceId', - 'bundle_id': 'bundleId', - 'wordlist_id': 'wordlistId' - } - - def __init__(self, instance_id=None, bundle_id=None, wordlist_id=None, local_vars_configuration=None): # noqa: E501 - """CreateAssessmentDto - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._instance_id = None - self._bundle_id = None - self._wordlist_id = None - self.discriminator = None - - self.instance_id = instance_id - self.bundle_id = bundle_id - if wordlist_id is not None: - self.wordlist_id = wordlist_id - - @property - def instance_id(self): - """Gets the instance_id of this CreateAssessmentDto. # noqa: E501 - - - :return: The instance_id of this CreateAssessmentDto. # noqa: E501 - :rtype: str - """ - return self._instance_id - - @instance_id.setter - def instance_id(self, instance_id): - """Sets the instance_id of this CreateAssessmentDto. - - - :param instance_id: The instance_id of this CreateAssessmentDto. # noqa: E501 - :type instance_id: str - """ - if self.local_vars_configuration.client_side_validation and instance_id is None: # noqa: E501 - raise ValueError("Invalid value for `instance_id`, must not be `None`") # noqa: E501 - - self._instance_id = instance_id - - @property - def bundle_id(self): - """Gets the bundle_id of this CreateAssessmentDto. # noqa: E501 - - - :return: The bundle_id of this CreateAssessmentDto. # noqa: E501 - :rtype: str - """ - return self._bundle_id - - @bundle_id.setter - def bundle_id(self, bundle_id): - """Sets the bundle_id of this CreateAssessmentDto. - - - :param bundle_id: The bundle_id of this CreateAssessmentDto. # noqa: E501 - :type bundle_id: str - """ - if self.local_vars_configuration.client_side_validation and bundle_id is None: # noqa: E501 - raise ValueError("Invalid value for `bundle_id`, must not be `None`") # noqa: E501 - - self._bundle_id = bundle_id - - @property - def wordlist_id(self): - """Gets the wordlist_id of this CreateAssessmentDto. # noqa: E501 - - - :return: The wordlist_id of this CreateAssessmentDto. # noqa: E501 - :rtype: str - """ - return self._wordlist_id - - @wordlist_id.setter - def wordlist_id(self, wordlist_id): - """Sets the wordlist_id of this CreateAssessmentDto. - - - :param wordlist_id: The wordlist_id of this CreateAssessmentDto. # noqa: E501 - :type wordlist_id: str - """ - - self._wordlist_id = wordlist_id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateAssessmentDto): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateAssessmentDto): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/create_interconnect_request.py b/corellium_api/models/create_interconnect_request.py deleted file mode 100644 index b365b73..0000000 --- a/corellium_api/models/create_interconnect_request.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class CreateInterconnectRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'protocol': 'str', - 'type': 'str', - 'project': 'str', - 'interfaces': 'list[str]' - } - - attribute_map = { - 'name': 'name', - 'protocol': 'protocol', - 'type': 'type', - 'project': 'project', - 'interfaces': 'interfaces' - } - - def __init__(self, name=None, protocol=None, type=None, project=None, interfaces=None, local_vars_configuration=None): # noqa: E501 - """CreateInterconnectRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._protocol = None - self._type = None - self._project = None - self._interfaces = None - self.discriminator = None - - self.name = name - self.protocol = protocol - self.type = type - self.project = project - self.interfaces = interfaces - - @property - def name(self): - """Gets the name of this CreateInterconnectRequest. # noqa: E501 - - The name of the interconnect # noqa: E501 - - :return: The name of this CreateInterconnectRequest. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this CreateInterconnectRequest. - - The name of the interconnect # noqa: E501 - - :param name: The name of this CreateInterconnectRequest. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def protocol(self): - """Gets the protocol of this CreateInterconnectRequest. # noqa: E501 - - The protocol used by the interconnect # noqa: E501 - - :return: The protocol of this CreateInterconnectRequest. # noqa: E501 - :rtype: str - """ - return self._protocol - - @protocol.setter - def protocol(self, protocol): - """Sets the protocol of this CreateInterconnectRequest. - - The protocol used by the interconnect # noqa: E501 - - :param protocol: The protocol of this CreateInterconnectRequest. # noqa: E501 - :type protocol: str - """ - - self._protocol = protocol - - @property - def type(self): - """Gets the type of this CreateInterconnectRequest. # noqa: E501 - - The type of interconnect # noqa: E501 - - :return: The type of this CreateInterconnectRequest. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this CreateInterconnectRequest. - - The type of interconnect # noqa: E501 - - :param type: The type of this CreateInterconnectRequest. # noqa: E501 - :type type: str - """ - allowed_values = [None,"hub", "switch"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def project(self): - """Gets the project of this CreateInterconnectRequest. # noqa: E501 - - The UUID of the project # noqa: E501 - - :return: The project of this CreateInterconnectRequest. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this CreateInterconnectRequest. - - The UUID of the project # noqa: E501 - - :param project: The project of this CreateInterconnectRequest. # noqa: E501 - :type project: str - """ - - self._project = project - - @property - def interfaces(self): - """Gets the interfaces of this CreateInterconnectRequest. # noqa: E501 - - Array of instance identifiers # noqa: E501 - - :return: The interfaces of this CreateInterconnectRequest. # noqa: E501 - :rtype: list[str] - """ - return self._interfaces - - @interfaces.setter - def interfaces(self, interfaces): - """Sets the interfaces of this CreateInterconnectRequest. - - Array of instance identifiers # noqa: E501 - - :param interfaces: The interfaces of this CreateInterconnectRequest. # noqa: E501 - :type interfaces: list[str] - """ - - self._interfaces = interfaces - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateInterconnectRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateInterconnectRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/create_network_connection_options.py b/corellium_api/models/create_network_connection_options.py deleted file mode 100644 index 1d3fdab..0000000 --- a/corellium_api/models/create_network_connection_options.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class CreateNetworkConnectionOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'name': 'str', - 'provider': 'str', - 'config': 'object' - } - - attribute_map = { - 'identifier': 'identifier', - 'name': 'name', - 'provider': 'provider', - 'config': 'config' - } - - def __init__(self, identifier=None, name=None, provider=None, config=None, local_vars_configuration=None): # noqa: E501 - """CreateNetworkConnectionOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._name = None - self._provider = None - self._config = None - self.discriminator = None - - self.identifier = identifier - self.name = name - self.provider = provider - self.config = config - - @property - def identifier(self): - """Gets the identifier of this CreateNetworkConnectionOptions. # noqa: E501 - - UUIDv4 # noqa: E501 - - :return: The identifier of this CreateNetworkConnectionOptions. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this CreateNetworkConnectionOptions. - - UUIDv4 # noqa: E501 - - :param identifier: The identifier of this CreateNetworkConnectionOptions. # noqa: E501 - :type identifier: str - """ - if self.local_vars_configuration.client_side_validation and identifier is None: # noqa: E501 - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def name(self): - """Gets the name of this CreateNetworkConnectionOptions. # noqa: E501 - - User specified name for this network connection. e.g. My Network Connection # noqa: E501 - - :return: The name of this CreateNetworkConnectionOptions. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this CreateNetworkConnectionOptions. - - User specified name for this network connection. e.g. My Network Connection # noqa: E501 - - :param name: The name of this CreateNetworkConnectionOptions. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def provider(self): - """Gets the provider of this CreateNetworkConnectionOptions. # noqa: E501 - - One of the registered [network provider types](#get-/v1/network/providers) # noqa: E501 - - :return: The provider of this CreateNetworkConnectionOptions. # noqa: E501 - :rtype: str - """ - return self._provider - - @provider.setter - def provider(self, provider): - """Sets the provider of this CreateNetworkConnectionOptions. - - One of the registered [network provider types](#get-/v1/network/providers) # noqa: E501 - - :param provider: The provider of this CreateNetworkConnectionOptions. # noqa: E501 - :type provider: str - """ - if self.local_vars_configuration.client_side_validation and provider is None: # noqa: E501 - raise ValueError("Invalid value for `provider`, must not be `None`") # noqa: E501 - - self._provider = provider - - @property - def config(self): - """Gets the config of this CreateNetworkConnectionOptions. # noqa: E501 - - An object containing network connection configuration data. Will vary based on network provider type. See examples. # noqa: E501 - - :return: The config of this CreateNetworkConnectionOptions. # noqa: E501 - :rtype: object - """ - return self._config - - @config.setter - def config(self, config): - """Sets the config of this CreateNetworkConnectionOptions. - - An object containing network connection configuration data. Will vary based on network provider type. See examples. # noqa: E501 - - :param config: The config of this CreateNetworkConnectionOptions. # noqa: E501 - :type config: object - """ - - self._config = config - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateNetworkConnectionOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateNetworkConnectionOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/create_team.py b/corellium_api/models/create_team.py deleted file mode 100644 index 7653b80..0000000 --- a/corellium_api/models/create_team.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class CreateTeam(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str' - } - - attribute_map = { - 'name': 'name' - } - - def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 - """CreateTeam - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self.discriminator = None - - self.name = name - - @property - def name(self): - """Gets the name of this CreateTeam. # noqa: E501 - - Team name # noqa: E501 - - :return: The name of this CreateTeam. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this CreateTeam. - - Team name # noqa: E501 - - :param name: The name of this CreateTeam. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateTeam): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreateTeam): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/created_by.py b/corellium_api/models/created_by.py deleted file mode 100644 index 079a9e3..0000000 --- a/corellium_api/models/created_by.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class CreatedBy(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'username': 'str', - 'label': 'str', - 'deleted': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'label': 'label', - 'deleted': 'deleted' - } - - def __init__(self, id=None, username=None, label=None, deleted=None, local_vars_configuration=None): # noqa: E501 - """CreatedBy - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._username = None - self._label = None - self._deleted = None - self.discriminator = None - - self.id = id - self.username = username - self.label = label - self.deleted = deleted - - @property - def id(self): - """Gets the id of this CreatedBy. # noqa: E501 - - User Identifier # noqa: E501 - - :return: The id of this CreatedBy. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CreatedBy. - - User Identifier # noqa: E501 - - :param id: The id of this CreatedBy. # noqa: E501 - :type id: str - """ - - self._id = id - - @property - def username(self): - """Gets the username of this CreatedBy. # noqa: E501 - - Username # noqa: E501 - - :return: The username of this CreatedBy. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this CreatedBy. - - Username # noqa: E501 - - :param username: The username of this CreatedBy. # noqa: E501 - :type username: str - """ - - self._username = username - - @property - def label(self): - """Gets the label of this CreatedBy. # noqa: E501 - - User Label # noqa: E501 - - :return: The label of this CreatedBy. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this CreatedBy. - - User Label # noqa: E501 - - :param label: The label of this CreatedBy. # noqa: E501 - :type label: str - """ - - self._label = label - - @property - def deleted(self): - """Gets the deleted of this CreatedBy. # noqa: E501 - - Indicates if user was deleted # noqa: E501 - - :return: The deleted of this CreatedBy. # noqa: E501 - :rtype: bool - """ - return self._deleted - - @deleted.setter - def deleted(self, deleted): - """Sets the deleted of this CreatedBy. - - Indicates if user was deleted # noqa: E501 - - :param deleted: The deleted of this CreatedBy. # noqa: E501 - :type deleted: bool - """ - - self._deleted = deleted - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreatedBy): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, CreatedBy): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/credentials.py b/corellium_api/models/credentials.py deleted file mode 100644 index 711bdbb..0000000 --- a/corellium_api/models/credentials.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Credentials(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'username': 'str', - 'password': 'str' - } - - attribute_map = { - 'username': 'username', - 'password': 'password' - } - - def __init__(self, username=None, password=None, local_vars_configuration=None): # noqa: E501 - """Credentials - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._username = None - self._password = None - self.discriminator = None - - self.username = username - self.password = password - - @property - def username(self): - """Gets the username of this Credentials. # noqa: E501 - - Authentication Username # noqa: E501 - - :return: The username of this Credentials. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this Credentials. - - Authentication Username # noqa: E501 - - :param username: The username of this Credentials. # noqa: E501 - :type username: str - """ - if self.local_vars_configuration.client_side_validation and username is None: # noqa: E501 - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - @property - def password(self): - """Gets the password of this Credentials. # noqa: E501 - - Authentication Password # noqa: E501 - - :return: The password of this Credentials. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this Credentials. - - Authentication Password # noqa: E501 - - :param password: The password of this Credentials. # noqa: E501 - :type password: str - """ - if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - - self._password = password - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Credentials): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Credentials): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/detach_interface_request.py b/corellium_api/models/detach_interface_request.py deleted file mode 100644 index 2a709e5..0000000 --- a/corellium_api/models/detach_interface_request.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class DetachInterfaceRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'interconnect_id': 'str' - } - - attribute_map = { - 'interconnect_id': 'interconnectId' - } - - def __init__(self, interconnect_id=None, local_vars_configuration=None): # noqa: E501 - """DetachInterfaceRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._interconnect_id = None - self.discriminator = None - - self.interconnect_id = interconnect_id - - @property - def interconnect_id(self): - """Gets the interconnect_id of this DetachInterfaceRequest. # noqa: E501 - - Interconnect identifier # noqa: E501 - - :return: The interconnect_id of this DetachInterfaceRequest. # noqa: E501 - :rtype: str - """ - return self._interconnect_id - - @interconnect_id.setter - def interconnect_id(self, interconnect_id): - """Sets the interconnect_id of this DetachInterfaceRequest. - - Interconnect identifier # noqa: E501 - - :param interconnect_id: The interconnect_id of this DetachInterfaceRequest. # noqa: E501 - :type interconnect_id: str - """ - if self.local_vars_configuration.client_side_validation and interconnect_id is None: # noqa: E501 - raise ValueError("Invalid value for `interconnect_id`, must not be `None`") # noqa: E501 - - self._interconnect_id = interconnect_id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DetachInterfaceRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DetachInterfaceRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/device.py b/corellium_api/models/device.py deleted file mode 100644 index b3874e1..0000000 --- a/corellium_api/models/device.py +++ /dev/null @@ -1,354 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Device(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'model': 'str', - 'name': 'str', - 'platform': 'str', - 'hwmodel': 'str', - 'bdid': 'str', - 'cpid': 'str', - 'created_at': 'str', - 'updated_at': 'str' - } - - attribute_map = { - 'type': 'type', - 'model': 'model', - 'name': 'name', - 'platform': 'platform', - 'hwmodel': 'hwmodel', - 'bdid': 'bdid', - 'cpid': 'cpid', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, type=None, model=None, name=None, platform=None, hwmodel=None, bdid=None, cpid=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """Device - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._model = None - self._name = None - self._platform = None - self._hwmodel = None - self._bdid = None - self._cpid = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - self.type = type - self.model = model - self.name = name - self.platform = platform - self.hwmodel = hwmodel - self.bdid = bdid - self.cpid = cpid - self.created_at = created_at - self.updated_at = updated_at - - @property - def type(self): - """Gets the type of this Device. # noqa: E501 - - # noqa: E501 - - :return: The type of this Device. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Device. - - # noqa: E501 - - :param type: The type of this Device. # noqa: E501 - :type type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - - self._type = type - - @property - def model(self): - """Gets the model of this Device. # noqa: E501 - - # noqa: E501 - - :return: The model of this Device. # noqa: E501 - :rtype: str - """ - return self._model - - @model.setter - def model(self, model): - """Sets the model of this Device. - - # noqa: E501 - - :param model: The model of this Device. # noqa: E501 - :type model: str - """ - if self.local_vars_configuration.client_side_validation and model is None: # noqa: E501 - raise ValueError("Invalid value for `model`, must not be `None`") # noqa: E501 - - self._model = model - - @property - def name(self): - """Gets the name of this Device. # noqa: E501 - - # noqa: E501 - - :return: The name of this Device. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Device. - - # noqa: E501 - - :param name: The name of this Device. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def platform(self): - """Gets the platform of this Device. # noqa: E501 - - # noqa: E501 - - :return: The platform of this Device. # noqa: E501 - :rtype: str - """ - return self._platform - - @platform.setter - def platform(self, platform): - """Sets the platform of this Device. - - # noqa: E501 - - :param platform: The platform of this Device. # noqa: E501 - :type platform: str - """ - - self._platform = platform - - @property - def hwmodel(self): - """Gets the hwmodel of this Device. # noqa: E501 - - # noqa: E501 - - :return: The hwmodel of this Device. # noqa: E501 - :rtype: str - """ - return self._hwmodel - - @hwmodel.setter - def hwmodel(self, hwmodel): - """Sets the hwmodel of this Device. - - # noqa: E501 - - :param hwmodel: The hwmodel of this Device. # noqa: E501 - :type hwmodel: str - """ - - self._hwmodel = hwmodel - - @property - def bdid(self): - """Gets the bdid of this Device. # noqa: E501 - - # noqa: E501 - - :return: The bdid of this Device. # noqa: E501 - :rtype: str - """ - return self._bdid - - @bdid.setter - def bdid(self, bdid): - """Sets the bdid of this Device. - - # noqa: E501 - - :param bdid: The bdid of this Device. # noqa: E501 - :type bdid: str - """ - - self._bdid = bdid - - @property - def cpid(self): - """Gets the cpid of this Device. # noqa: E501 - - # noqa: E501 - - :return: The cpid of this Device. # noqa: E501 - :rtype: str - """ - return self._cpid - - @cpid.setter - def cpid(self, cpid): - """Sets the cpid of this Device. - - # noqa: E501 - - :param cpid: The cpid of this Device. # noqa: E501 - :type cpid: str - """ - - self._cpid = cpid - - @property - def created_at(self): - """Gets the created_at of this Device. # noqa: E501 - - # noqa: E501 - - :return: The created_at of this Device. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Device. - - # noqa: E501 - - :param created_at: The created_at of this Device. # noqa: E501 - :type created_at: str - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Device. # noqa: E501 - - # noqa: E501 - - :return: The updated_at of this Device. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Device. - - # noqa: E501 - - :param updated_at: The updated_at of this Device. # noqa: E501 - :type updated_at: str - """ - - self._updated_at = updated_at - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Device): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Device): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/domain_auth_provider_request.py b/corellium_api/models/domain_auth_provider_request.py deleted file mode 100644 index 09789ff..0000000 --- a/corellium_api/models/domain_auth_provider_request.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class DomainAuthProviderRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'provider_type': 'str', - 'enabled': 'bool', - 'label': 'str', - 'config': 'OpenIDConfig' - } - - attribute_map = { - 'provider_type': 'providerType', - 'enabled': 'enabled', - 'label': 'label', - 'config': 'config' - } - - def __init__(self, provider_type=None, enabled=None, label=None, config=None, local_vars_configuration=None): # noqa: E501 - """DomainAuthProviderRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._provider_type = None - self._enabled = None - self._label = None - self._config = None - self.discriminator = None - - self.provider_type = provider_type - self.enabled = enabled - self.label = label - if config is not None: - self.config = config - - @property - def provider_type(self): - """Gets the provider_type of this DomainAuthProviderRequest. # noqa: E501 - - Provider Type # noqa: E501 - - :return: The provider_type of this DomainAuthProviderRequest. # noqa: E501 - :rtype: str - """ - return self._provider_type - - @provider_type.setter - def provider_type(self, provider_type): - """Sets the provider_type of this DomainAuthProviderRequest. - - Provider Type # noqa: E501 - - :param provider_type: The provider_type of this DomainAuthProviderRequest. # noqa: E501 - :type provider_type: str - """ - if self.local_vars_configuration.client_side_validation and provider_type is None: # noqa: E501 - raise ValueError("Invalid value for `provider_type`, must not be `None`") # noqa: E501 - - self._provider_type = provider_type - - @property - def enabled(self): - """Gets the enabled of this DomainAuthProviderRequest. # noqa: E501 - - Enabled/Disabled # noqa: E501 - - :return: The enabled of this DomainAuthProviderRequest. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this DomainAuthProviderRequest. - - Enabled/Disabled # noqa: E501 - - :param enabled: The enabled of this DomainAuthProviderRequest. # noqa: E501 - :type enabled: bool - """ - if self.local_vars_configuration.client_side_validation and enabled is None: # noqa: E501 - raise ValueError("Invalid value for `enabled`, must not be `None`") # noqa: E501 - - self._enabled = enabled - - @property - def label(self): - """Gets the label of this DomainAuthProviderRequest. # noqa: E501 - - Login Button Text # noqa: E501 - - :return: The label of this DomainAuthProviderRequest. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this DomainAuthProviderRequest. - - Login Button Text # noqa: E501 - - :param label: The label of this DomainAuthProviderRequest. # noqa: E501 - :type label: str - """ - - self._label = label - - @property - def config(self): - """Gets the config of this DomainAuthProviderRequest. # noqa: E501 - - - :return: The config of this DomainAuthProviderRequest. # noqa: E501 - :rtype: OpenIDConfig - """ - return self._config - - @config.setter - def config(self, config): - """Sets the config of this DomainAuthProviderRequest. - - - :param config: The config of this DomainAuthProviderRequest. # noqa: E501 - :type config: OpenIDConfig - """ - - self._config = config - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DomainAuthProviderRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DomainAuthProviderRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/domain_auth_provider_response.py b/corellium_api/models/domain_auth_provider_response.py deleted file mode 100644 index e0c898d..0000000 --- a/corellium_api/models/domain_auth_provider_response.py +++ /dev/null @@ -1,469 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class DomainAuthProviderResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'id': 'str', - 'provider_type': 'str', - 'provider': 'str', - 'label': 'str', - 'name': 'str', - 'authorization_url': 'str', - 'default': 'bool', - 'enabled': 'bool', - 'config': 'OpenIDConfig', - 'created_by': 'str', - 'created_at': 'str', - 'updated_at': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'id': 'id', - 'provider_type': 'providerType', - 'provider': 'provider', - 'label': 'label', - 'name': 'name', - 'authorization_url': 'authorizationUrl', - 'default': 'default', - 'enabled': 'enabled', - 'config': 'config', - 'created_by': 'createdBy', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, identifier=None, id=None, provider_type=None, provider=None, label=None, name=None, authorization_url=None, default=None, enabled=None, config=None, created_by=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """DomainAuthProviderResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._id = None - self._provider_type = None - self._provider = None - self._label = None - self._name = None - self._authorization_url = None - self._default = None - self._enabled = None - self._config = None - self._created_by = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - self.identifier = identifier - self.id = id - self.provider_type = provider_type - self.provider = provider - self.label = label - self.name = name - self.authorization_url = authorization_url - self.default = default - self.enabled = enabled - if config is not None: - self.config = config - self.created_by = created_by - self.created_at = created_at - self.updated_at = updated_at - - @property - def identifier(self): - """Gets the identifier of this DomainAuthProviderResponse. # noqa: E501 - - Provider ID # noqa: E501 - - :return: The identifier of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this DomainAuthProviderResponse. - - Provider ID # noqa: E501 - - :param identifier: The identifier of this DomainAuthProviderResponse. # noqa: E501 - :type identifier: str - """ - if self.local_vars_configuration.client_side_validation and identifier is None: # noqa: E501 - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def id(self): - """Gets the id of this DomainAuthProviderResponse. # noqa: E501 - - Provider ID for backward compatibility with frontend # noqa: E501 - - :return: The id of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this DomainAuthProviderResponse. - - Provider ID for backward compatibility with frontend # noqa: E501 - - :param id: The id of this DomainAuthProviderResponse. # noqa: E501 - :type id: str - """ - - self._id = id - - @property - def provider_type(self): - """Gets the provider_type of this DomainAuthProviderResponse. # noqa: E501 - - Provider Type # noqa: E501 - - :return: The provider_type of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._provider_type - - @provider_type.setter - def provider_type(self, provider_type): - """Sets the provider_type of this DomainAuthProviderResponse. - - Provider Type # noqa: E501 - - :param provider_type: The provider_type of this DomainAuthProviderResponse. # noqa: E501 - :type provider_type: str - """ - if self.local_vars_configuration.client_side_validation and provider_type is None: # noqa: E501 - raise ValueError("Invalid value for `provider_type`, must not be `None`") # noqa: E501 - - self._provider_type = provider_type - - @property - def provider(self): - """Gets the provider of this DomainAuthProviderResponse. # noqa: E501 - - Provider Type for backward compatibility with frontend # noqa: E501 - - :return: The provider of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._provider - - @provider.setter - def provider(self, provider): - """Sets the provider of this DomainAuthProviderResponse. - - Provider Type for backward compatibility with frontend # noqa: E501 - - :param provider: The provider of this DomainAuthProviderResponse. # noqa: E501 - :type provider: str - """ - - self._provider = provider - - @property - def label(self): - """Gets the label of this DomainAuthProviderResponse. # noqa: E501 - - Login Button Text # noqa: E501 - - :return: The label of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this DomainAuthProviderResponse. - - Login Button Text # noqa: E501 - - :param label: The label of this DomainAuthProviderResponse. # noqa: E501 - :type label: str - """ - if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 - raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 - - self._label = label - - @property - def name(self): - """Gets the name of this DomainAuthProviderResponse. # noqa: E501 - - Title Text for the Frontend's Provider Configuration Form # noqa: E501 - - :return: The name of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this DomainAuthProviderResponse. - - Title Text for the Frontend's Provider Configuration Form # noqa: E501 - - :param name: The name of this DomainAuthProviderResponse. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def authorization_url(self): - """Gets the authorization_url of this DomainAuthProviderResponse. # noqa: E501 - - Coordinator endpoint for Authorizing with this provider # noqa: E501 - - :return: The authorization_url of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._authorization_url - - @authorization_url.setter - def authorization_url(self, authorization_url): - """Sets the authorization_url of this DomainAuthProviderResponse. - - Coordinator endpoint for Authorizing with this provider # noqa: E501 - - :param authorization_url: The authorization_url of this DomainAuthProviderResponse. # noqa: E501 - :type authorization_url: str - """ - - self._authorization_url = authorization_url - - @property - def default(self): - """Gets the default of this DomainAuthProviderResponse. # noqa: E501 - - True: Configured in coordinator.json, False: Custom Domain Provider # noqa: E501 - - :return: The default of this DomainAuthProviderResponse. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this DomainAuthProviderResponse. - - True: Configured in coordinator.json, False: Custom Domain Provider # noqa: E501 - - :param default: The default of this DomainAuthProviderResponse. # noqa: E501 - :type default: bool - """ - if self.local_vars_configuration.client_side_validation and default is None: # noqa: E501 - raise ValueError("Invalid value for `default`, must not be `None`") # noqa: E501 - - self._default = default - - @property - def enabled(self): - """Gets the enabled of this DomainAuthProviderResponse. # noqa: E501 - - Enabled/Disabled # noqa: E501 - - :return: The enabled of this DomainAuthProviderResponse. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this DomainAuthProviderResponse. - - Enabled/Disabled # noqa: E501 - - :param enabled: The enabled of this DomainAuthProviderResponse. # noqa: E501 - :type enabled: bool - """ - if self.local_vars_configuration.client_side_validation and enabled is None: # noqa: E501 - raise ValueError("Invalid value for `enabled`, must not be `None`") # noqa: E501 - - self._enabled = enabled - - @property - def config(self): - """Gets the config of this DomainAuthProviderResponse. # noqa: E501 - - - :return: The config of this DomainAuthProviderResponse. # noqa: E501 - :rtype: OpenIDConfig - """ - return self._config - - @config.setter - def config(self, config): - """Sets the config of this DomainAuthProviderResponse. - - - :param config: The config of this DomainAuthProviderResponse. # noqa: E501 - :type config: OpenIDConfig - """ - - self._config = config - - @property - def created_by(self): - """Gets the created_by of this DomainAuthProviderResponse. # noqa: E501 - - Optional User ID of creator # noqa: E501 - - :return: The created_by of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """Sets the created_by of this DomainAuthProviderResponse. - - Optional User ID of creator # noqa: E501 - - :param created_by: The created_by of this DomainAuthProviderResponse. # noqa: E501 - :type created_by: str - """ - - self._created_by = created_by - - @property - def created_at(self): - """Gets the created_at of this DomainAuthProviderResponse. # noqa: E501 - - Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The created_at of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this DomainAuthProviderResponse. - - Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param created_at: The created_at of this DomainAuthProviderResponse. # noqa: E501 - :type created_at: str - """ - if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 - raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this DomainAuthProviderResponse. # noqa: E501 - - Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The updated_at of this DomainAuthProviderResponse. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this DomainAuthProviderResponse. - - Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param updated_at: The updated_at of this DomainAuthProviderResponse. # noqa: E501 - :type updated_at: str - """ - if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 - raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 - - self._updated_at = updated_at - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DomainAuthProviderResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DomainAuthProviderResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/domain_options.py b/corellium_api/models/domain_options.py deleted file mode 100644 index fd2402e..0000000 --- a/corellium_api/models/domain_options.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class DomainOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'totp_required': 'bool', - 'trial_extension': 'TrialExtension', - 'snapshot_sharing_permissions': 'SnapshotSharingPermissions' - } - - attribute_map = { - 'totp_required': 'totpRequired', - 'trial_extension': 'trialExtension', - 'snapshot_sharing_permissions': 'snapshotSharingPermissions' - } - - def __init__(self, totp_required=None, trial_extension=None, snapshot_sharing_permissions=None, local_vars_configuration=None): # noqa: E501 - """DomainOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._totp_required = None - self._trial_extension = None - self._snapshot_sharing_permissions = None - self.discriminator = None - - self.totp_required = totp_required - if trial_extension is not None: - self.trial_extension = trial_extension - if snapshot_sharing_permissions is not None: - self.snapshot_sharing_permissions = snapshot_sharing_permissions - - @property - def totp_required(self): - """Gets the totp_required of this DomainOptions. # noqa: E501 - - if true, totp is required # noqa: E501 - - :return: The totp_required of this DomainOptions. # noqa: E501 - :rtype: bool - """ - return self._totp_required - - @totp_required.setter - def totp_required(self, totp_required): - """Sets the totp_required of this DomainOptions. - - if true, totp is required # noqa: E501 - - :param totp_required: The totp_required of this DomainOptions. # noqa: E501 - :type totp_required: bool - """ - - self._totp_required = totp_required - - @property - def trial_extension(self): - """Gets the trial_extension of this DomainOptions. # noqa: E501 - - - :return: The trial_extension of this DomainOptions. # noqa: E501 - :rtype: TrialExtension - """ - return self._trial_extension - - @trial_extension.setter - def trial_extension(self, trial_extension): - """Sets the trial_extension of this DomainOptions. - - - :param trial_extension: The trial_extension of this DomainOptions. # noqa: E501 - :type trial_extension: TrialExtension - """ - - self._trial_extension = trial_extension - - @property - def snapshot_sharing_permissions(self): - """Gets the snapshot_sharing_permissions of this DomainOptions. # noqa: E501 - - - :return: The snapshot_sharing_permissions of this DomainOptions. # noqa: E501 - :rtype: SnapshotSharingPermissions - """ - return self._snapshot_sharing_permissions - - @snapshot_sharing_permissions.setter - def snapshot_sharing_permissions(self, snapshot_sharing_permissions): - """Sets the snapshot_sharing_permissions of this DomainOptions. - - - :param snapshot_sharing_permissions: The snapshot_sharing_permissions of this DomainOptions. # noqa: E501 - :type snapshot_sharing_permissions: SnapshotSharingPermissions - """ - - self._snapshot_sharing_permissions = snapshot_sharing_permissions - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DomainOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DomainOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/extended_firmware_asset_info.py b/corellium_api/models/extended_firmware_asset_info.py deleted file mode 100644 index 4ecf581..0000000 --- a/corellium_api/models/extended_firmware_asset_info.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ExtendedFirmwareAssetInfo(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'firmwares': 'list[str]', - 'instances': 'list[str]' - } - - attribute_map = { - 'firmwares': 'firmwares', - 'instances': 'instances' - } - - def __init__(self, firmwares=None, instances=None, local_vars_configuration=None): # noqa: E501 - """ExtendedFirmwareAssetInfo - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._firmwares = None - self._instances = None - self.discriminator = None - - self.firmwares = firmwares - self.instances = instances - - @property - def firmwares(self): - """Gets the firmwares of this ExtendedFirmwareAssetInfo. # noqa: E501 - - Firmware Records from FW Service # noqa: E501 - - :return: The firmwares of this ExtendedFirmwareAssetInfo. # noqa: E501 - :rtype: list[str] - """ - return self._firmwares - - @firmwares.setter - def firmwares(self, firmwares): - """Sets the firmwares of this ExtendedFirmwareAssetInfo. - - Firmware Records from FW Service # noqa: E501 - - :param firmwares: The firmwares of this ExtendedFirmwareAssetInfo. # noqa: E501 - :type firmwares: list[str] - """ - if self.local_vars_configuration.client_side_validation and firmwares is None: # noqa: E501 - raise ValueError("Invalid value for `firmwares`, must not be `None`") # noqa: E501 - - self._firmwares = firmwares - - @property - def instances(self): - """Gets the instances of this ExtendedFirmwareAssetInfo. # noqa: E501 - - Instances using one of the firmwares, and thus the asset # noqa: E501 - - :return: The instances of this ExtendedFirmwareAssetInfo. # noqa: E501 - :rtype: list[str] - """ - return self._instances - - @instances.setter - def instances(self, instances): - """Sets the instances of this ExtendedFirmwareAssetInfo. - - Instances using one of the firmwares, and thus the asset # noqa: E501 - - :param instances: The instances of this ExtendedFirmwareAssetInfo. # noqa: E501 - :type instances: list[str] - """ - if self.local_vars_configuration.client_side_validation and instances is None: # noqa: E501 - raise ValueError("Invalid value for `instances`, must not be `None`") # noqa: E501 - - self._instances = instances - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ExtendedFirmwareAssetInfo): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ExtendedFirmwareAssetInfo): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/extension.py b/corellium_api/models/extension.py deleted file mode 100644 index e4cbe17..0000000 --- a/corellium_api/models/extension.py +++ /dev/null @@ -1,294 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Extension(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'enabled': 'bool', - 'created_at': 'str', - 'updated_at': 'str', - 'image_id': 'str', - 'state': 'str', - 'flavors': 'list[object]' - } - - attribute_map = { - 'identifier': 'identifier', - 'enabled': 'enabled', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'image_id': 'imageId', - 'state': 'state', - 'flavors': 'flavors' - } - - def __init__(self, identifier=None, enabled=None, created_at=None, updated_at=None, image_id=None, state=None, flavors=None, local_vars_configuration=None): # noqa: E501 - """Extension - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._enabled = None - self._created_at = None - self._updated_at = None - self._image_id = None - self._state = None - self._flavors = None - self.discriminator = None - - self.identifier = identifier - self.enabled = enabled - self.created_at = created_at - self.updated_at = updated_at - self.image_id = image_id - self.state = state - self.flavors = flavors - - @property - def identifier(self): - """Gets the identifier of this Extension. # noqa: E501 - - Identifier # noqa: E501 - - :return: The identifier of this Extension. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this Extension. - - Identifier # noqa: E501 - - :param identifier: The identifier of this Extension. # noqa: E501 - :type identifier: str - """ - - self._identifier = identifier - - @property - def enabled(self): - """Gets the enabled of this Extension. # noqa: E501 - - If true, instances requiring this extension can be created or started # noqa: E501 - - :return: The enabled of this Extension. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this Extension. - - If true, instances requiring this extension can be created or started # noqa: E501 - - :param enabled: The enabled of this Extension. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - @property - def created_at(self): - """Gets the created_at of this Extension. # noqa: E501 - - Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The created_at of this Extension. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Extension. - - Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param created_at: The created_at of this Extension. # noqa: E501 - :type created_at: str - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Extension. # noqa: E501 - - Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The updated_at of this Extension. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Extension. - - Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param updated_at: The updated_at of this Extension. # noqa: E501 - :type updated_at: str - """ - - self._updated_at = updated_at - - @property - def image_id(self): - """Gets the image_id of this Extension. # noqa: E501 - - Image Id # noqa: E501 - - :return: The image_id of this Extension. # noqa: E501 - :rtype: str - """ - return self._image_id - - @image_id.setter - def image_id(self, image_id): - """Sets the image_id of this Extension. - - Image Id # noqa: E501 - - :param image_id: The image_id of this Extension. # noqa: E501 - :type image_id: str - """ - - self._image_id = image_id - - @property - def state(self): - """Gets the state of this Extension. # noqa: E501 - - State # noqa: E501 - - :return: The state of this Extension. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this Extension. - - State # noqa: E501 - - :param state: The state of this Extension. # noqa: E501 - :type state: str - """ - - self._state = state - - @property - def flavors(self): - """Gets the flavors of this Extension. # noqa: E501 - - Array of Flavor definitions # noqa: E501 - - :return: The flavors of this Extension. # noqa: E501 - :rtype: list[object] - """ - return self._flavors - - @flavors.setter - def flavors(self, flavors): - """Sets the flavors of this Extension. - - Array of Flavor definitions # noqa: E501 - - :param flavors: The flavors of this Extension. # noqa: E501 - :type flavors: list[object] - """ - - self._flavors = flavors - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Extension): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Extension): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/features.py b/corellium_api/models/features.py deleted file mode 100644 index 230021a..0000000 --- a/corellium_api/models/features.py +++ /dev/null @@ -1,645 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Features(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'apps': 'bool', - 'connect': 'bool', - 'console': 'bool', - 'coretrace': 'bool', - 'device_control': 'bool', - 'device_delete': 'bool', - 'files': 'bool', - 'frida': 'bool', - 'images': 'bool', - 'messaging': 'bool', - 'netmon': 'bool', - 'network': 'bool', - 'port_forwarding': 'bool', - 'power_management': 'bool', - 'profile': 'bool', - 'sensors': 'bool', - 'settings': 'bool', - 'snapshots': 'bool', - 'strace': 'bool', - 'system': 'bool' - } - - attribute_map = { - 'apps': 'apps', - 'connect': 'connect', - 'console': 'console', - 'coretrace': 'coretrace', - 'device_control': 'deviceControl', - 'device_delete': 'deviceDelete', - 'files': 'files', - 'frida': 'frida', - 'images': 'images', - 'messaging': 'messaging', - 'netmon': 'netmon', - 'network': 'network', - 'port_forwarding': 'portForwarding', - 'power_management': 'powerManagement', - 'profile': 'profile', - 'sensors': 'sensors', - 'settings': 'settings', - 'snapshots': 'snapshots', - 'strace': 'strace', - 'system': 'system' - } - - def __init__(self, apps=None, connect=None, console=None, coretrace=None, device_control=None, device_delete=None, files=None, frida=None, images=None, messaging=None, netmon=None, network=None, port_forwarding=None, power_management=None, profile=None, sensors=None, settings=None, snapshots=None, strace=None, system=None, local_vars_configuration=None): # noqa: E501 - """Features - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._apps = None - self._connect = None - self._console = None - self._coretrace = None - self._device_control = None - self._device_delete = None - self._files = None - self._frida = None - self._images = None - self._messaging = None - self._netmon = None - self._network = None - self._port_forwarding = None - self._power_management = None - self._profile = None - self._sensors = None - self._settings = None - self._snapshots = None - self._strace = None - self._system = None - self.discriminator = None - - self.apps = apps - self.connect = connect - self.console = console - self.coretrace = coretrace - self.device_control = device_control - self.device_delete = device_delete - self.files = files - self.frida = frida - self.images = images - self.messaging = messaging - self.netmon = netmon - self.network = network - self.port_forwarding = port_forwarding - self.power_management = power_management - self.profile = profile - self.sensors = sensors - self.settings = settings - self.snapshots = snapshots - self.strace = strace - self.system = system - - @property - def apps(self): - """Gets the apps of this Features. # noqa: E501 - - # noqa: E501 - - :return: The apps of this Features. # noqa: E501 - :rtype: bool - """ - return self._apps - - @apps.setter - def apps(self, apps): - """Sets the apps of this Features. - - # noqa: E501 - - :param apps: The apps of this Features. # noqa: E501 - :type apps: bool - """ - - self._apps = apps - - @property - def connect(self): - """Gets the connect of this Features. # noqa: E501 - - # noqa: E501 - - :return: The connect of this Features. # noqa: E501 - :rtype: bool - """ - return self._connect - - @connect.setter - def connect(self, connect): - """Sets the connect of this Features. - - # noqa: E501 - - :param connect: The connect of this Features. # noqa: E501 - :type connect: bool - """ - - self._connect = connect - - @property - def console(self): - """Gets the console of this Features. # noqa: E501 - - # noqa: E501 - - :return: The console of this Features. # noqa: E501 - :rtype: bool - """ - return self._console - - @console.setter - def console(self, console): - """Sets the console of this Features. - - # noqa: E501 - - :param console: The console of this Features. # noqa: E501 - :type console: bool - """ - - self._console = console - - @property - def coretrace(self): - """Gets the coretrace of this Features. # noqa: E501 - - # noqa: E501 - - :return: The coretrace of this Features. # noqa: E501 - :rtype: bool - """ - return self._coretrace - - @coretrace.setter - def coretrace(self, coretrace): - """Sets the coretrace of this Features. - - # noqa: E501 - - :param coretrace: The coretrace of this Features. # noqa: E501 - :type coretrace: bool - """ - - self._coretrace = coretrace - - @property - def device_control(self): - """Gets the device_control of this Features. # noqa: E501 - - # noqa: E501 - - :return: The device_control of this Features. # noqa: E501 - :rtype: bool - """ - return self._device_control - - @device_control.setter - def device_control(self, device_control): - """Sets the device_control of this Features. - - # noqa: E501 - - :param device_control: The device_control of this Features. # noqa: E501 - :type device_control: bool - """ - - self._device_control = device_control - - @property - def device_delete(self): - """Gets the device_delete of this Features. # noqa: E501 - - # noqa: E501 - - :return: The device_delete of this Features. # noqa: E501 - :rtype: bool - """ - return self._device_delete - - @device_delete.setter - def device_delete(self, device_delete): - """Sets the device_delete of this Features. - - # noqa: E501 - - :param device_delete: The device_delete of this Features. # noqa: E501 - :type device_delete: bool - """ - - self._device_delete = device_delete - - @property - def files(self): - """Gets the files of this Features. # noqa: E501 - - # noqa: E501 - - :return: The files of this Features. # noqa: E501 - :rtype: bool - """ - return self._files - - @files.setter - def files(self, files): - """Sets the files of this Features. - - # noqa: E501 - - :param files: The files of this Features. # noqa: E501 - :type files: bool - """ - - self._files = files - - @property - def frida(self): - """Gets the frida of this Features. # noqa: E501 - - # noqa: E501 - - :return: The frida of this Features. # noqa: E501 - :rtype: bool - """ - return self._frida - - @frida.setter - def frida(self, frida): - """Sets the frida of this Features. - - # noqa: E501 - - :param frida: The frida of this Features. # noqa: E501 - :type frida: bool - """ - - self._frida = frida - - @property - def images(self): - """Gets the images of this Features. # noqa: E501 - - # noqa: E501 - - :return: The images of this Features. # noqa: E501 - :rtype: bool - """ - return self._images - - @images.setter - def images(self, images): - """Sets the images of this Features. - - # noqa: E501 - - :param images: The images of this Features. # noqa: E501 - :type images: bool - """ - - self._images = images - - @property - def messaging(self): - """Gets the messaging of this Features. # noqa: E501 - - # noqa: E501 - - :return: The messaging of this Features. # noqa: E501 - :rtype: bool - """ - return self._messaging - - @messaging.setter - def messaging(self, messaging): - """Sets the messaging of this Features. - - # noqa: E501 - - :param messaging: The messaging of this Features. # noqa: E501 - :type messaging: bool - """ - - self._messaging = messaging - - @property - def netmon(self): - """Gets the netmon of this Features. # noqa: E501 - - # noqa: E501 - - :return: The netmon of this Features. # noqa: E501 - :rtype: bool - """ - return self._netmon - - @netmon.setter - def netmon(self, netmon): - """Sets the netmon of this Features. - - # noqa: E501 - - :param netmon: The netmon of this Features. # noqa: E501 - :type netmon: bool - """ - - self._netmon = netmon - - @property - def network(self): - """Gets the network of this Features. # noqa: E501 - - # noqa: E501 - - :return: The network of this Features. # noqa: E501 - :rtype: bool - """ - return self._network - - @network.setter - def network(self, network): - """Sets the network of this Features. - - # noqa: E501 - - :param network: The network of this Features. # noqa: E501 - :type network: bool - """ - - self._network = network - - @property - def port_forwarding(self): - """Gets the port_forwarding of this Features. # noqa: E501 - - # noqa: E501 - - :return: The port_forwarding of this Features. # noqa: E501 - :rtype: bool - """ - return self._port_forwarding - - @port_forwarding.setter - def port_forwarding(self, port_forwarding): - """Sets the port_forwarding of this Features. - - # noqa: E501 - - :param port_forwarding: The port_forwarding of this Features. # noqa: E501 - :type port_forwarding: bool - """ - - self._port_forwarding = port_forwarding - - @property - def power_management(self): - """Gets the power_management of this Features. # noqa: E501 - - # noqa: E501 - - :return: The power_management of this Features. # noqa: E501 - :rtype: bool - """ - return self._power_management - - @power_management.setter - def power_management(self, power_management): - """Sets the power_management of this Features. - - # noqa: E501 - - :param power_management: The power_management of this Features. # noqa: E501 - :type power_management: bool - """ - - self._power_management = power_management - - @property - def profile(self): - """Gets the profile of this Features. # noqa: E501 - - # noqa: E501 - - :return: The profile of this Features. # noqa: E501 - :rtype: bool - """ - return self._profile - - @profile.setter - def profile(self, profile): - """Sets the profile of this Features. - - # noqa: E501 - - :param profile: The profile of this Features. # noqa: E501 - :type profile: bool - """ - - self._profile = profile - - @property - def sensors(self): - """Gets the sensors of this Features. # noqa: E501 - - # noqa: E501 - - :return: The sensors of this Features. # noqa: E501 - :rtype: bool - """ - return self._sensors - - @sensors.setter - def sensors(self, sensors): - """Sets the sensors of this Features. - - # noqa: E501 - - :param sensors: The sensors of this Features. # noqa: E501 - :type sensors: bool - """ - - self._sensors = sensors - - @property - def settings(self): - """Gets the settings of this Features. # noqa: E501 - - # noqa: E501 - - :return: The settings of this Features. # noqa: E501 - :rtype: bool - """ - return self._settings - - @settings.setter - def settings(self, settings): - """Sets the settings of this Features. - - # noqa: E501 - - :param settings: The settings of this Features. # noqa: E501 - :type settings: bool - """ - - self._settings = settings - - @property - def snapshots(self): - """Gets the snapshots of this Features. # noqa: E501 - - # noqa: E501 - - :return: The snapshots of this Features. # noqa: E501 - :rtype: bool - """ - return self._snapshots - - @snapshots.setter - def snapshots(self, snapshots): - """Sets the snapshots of this Features. - - # noqa: E501 - - :param snapshots: The snapshots of this Features. # noqa: E501 - :type snapshots: bool - """ - - self._snapshots = snapshots - - @property - def strace(self): - """Gets the strace of this Features. # noqa: E501 - - # noqa: E501 - - :return: The strace of this Features. # noqa: E501 - :rtype: bool - """ - return self._strace - - @strace.setter - def strace(self, strace): - """Sets the strace of this Features. - - # noqa: E501 - - :param strace: The strace of this Features. # noqa: E501 - :type strace: bool - """ - - self._strace = strace - - @property - def system(self): - """Gets the system of this Features. # noqa: E501 - - # noqa: E501 - - :return: The system of this Features. # noqa: E501 - :rtype: bool - """ - return self._system - - @system.setter - def system(self, system): - """Sets the system of this Features. - - # noqa: E501 - - :param system: The system of this Features. # noqa: E501 - :type system: bool - """ - - self._system = system - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Features): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Features): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/file_changes.py b/corellium_api/models/file_changes.py deleted file mode 100644 index 83cdc03..0000000 --- a/corellium_api/models/file_changes.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class FileChanges(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'path': 'str', - 'mode': 'float', - 'uid': 'float', - 'gid': 'float' - } - - attribute_map = { - 'path': 'path', - 'mode': 'mode', - 'uid': 'uid', - 'gid': 'gid' - } - - def __init__(self, path=None, mode=None, uid=None, gid=None, local_vars_configuration=None): # noqa: E501 - """FileChanges - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._path = None - self._mode = None - self._uid = None - self._gid = None - self.discriminator = None - - self.path = path - self.mode = mode - self.uid = uid - self.gid = gid - - @property - def path(self): - """Gets the path of this FileChanges. # noqa: E501 - - Optional New path # noqa: E501 - - :return: The path of this FileChanges. # noqa: E501 - :rtype: str - """ - return self._path - - @path.setter - def path(self, path): - """Sets the path of this FileChanges. - - Optional New path # noqa: E501 - - :param path: The path of this FileChanges. # noqa: E501 - :type path: str - """ - - self._path = path - - @property - def mode(self): - """Gets the mode of this FileChanges. # noqa: E501 - - Optional New Mode # noqa: E501 - - :return: The mode of this FileChanges. # noqa: E501 - :rtype: float - """ - return self._mode - - @mode.setter - def mode(self, mode): - """Sets the mode of this FileChanges. - - Optional New Mode # noqa: E501 - - :param mode: The mode of this FileChanges. # noqa: E501 - :type mode: float - """ - - self._mode = mode - - @property - def uid(self): - """Gets the uid of this FileChanges. # noqa: E501 - - Optional New Owner UID # noqa: E501 - - :return: The uid of this FileChanges. # noqa: E501 - :rtype: float - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this FileChanges. - - Optional New Owner UID # noqa: E501 - - :param uid: The uid of this FileChanges. # noqa: E501 - :type uid: float - """ - - self._uid = uid - - @property - def gid(self): - """Gets the gid of this FileChanges. # noqa: E501 - - Optional New Group GID # noqa: E501 - - :return: The gid of this FileChanges. # noqa: E501 - :rtype: float - """ - return self._gid - - @gid.setter - def gid(self, gid): - """Sets the gid of this FileChanges. - - Optional New Group GID # noqa: E501 - - :param gid: The gid of this FileChanges. # noqa: E501 - :type gid: float - """ - - self._gid = gid - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FileChanges): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FileChanges): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/firmware.py b/corellium_api/models/firmware.py deleted file mode 100644 index d9423ee..0000000 --- a/corellium_api/models/firmware.py +++ /dev/null @@ -1,510 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Firmware(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'version': 'str', - 'buildid': 'str', - 'android_flavor': 'str', - 'api_version': 'str', - 'sha256sum': 'str', - 'sha1sum': 'str', - 'md5sum': 'str', - 'size': 'float', - 'unique_id': 'str', - 'metadata': 'object', - 'releasedate': 'datetime', - 'uploaddate': 'datetime', - 'url': 'str', - 'orig_url': 'str', - 'filename': 'str' - } - - attribute_map = { - 'version': 'version', - 'buildid': 'buildid', - 'android_flavor': 'AndroidFlavor', - 'api_version': 'APIVersion', - 'sha256sum': 'sha256sum', - 'sha1sum': 'sha1sum', - 'md5sum': 'md5sum', - 'size': 'size', - 'unique_id': 'uniqueId', - 'metadata': 'metadata', - 'releasedate': 'releasedate', - 'uploaddate': 'uploaddate', - 'url': 'url', - 'orig_url': 'orig_url', - 'filename': 'filename' - } - - def __init__(self, version=None, buildid=None, android_flavor=None, api_version=None, sha256sum=None, sha1sum=None, md5sum=None, size=None, unique_id=None, metadata=None, releasedate=None, uploaddate=None, url=None, orig_url=None, filename=None, local_vars_configuration=None): # noqa: E501 - """Firmware - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._version = None - self._buildid = None - self._android_flavor = None - self._api_version = None - self._sha256sum = None - self._sha1sum = None - self._md5sum = None - self._size = None - self._unique_id = None - self._metadata = None - self._releasedate = None - self._uploaddate = None - self._url = None - self._orig_url = None - self._filename = None - self.discriminator = None - - self.version = version - self.buildid = buildid - self.android_flavor = android_flavor - self.api_version = api_version - self.sha256sum = sha256sum - self.sha1sum = sha1sum - self.md5sum = md5sum - self.size = size - self.unique_id = unique_id - self.metadata = metadata - self.releasedate = releasedate - self.uploaddate = uploaddate - self.url = url - self.orig_url = orig_url - self.filename = filename - - @property - def version(self): - """Gets the version of this Firmware. # noqa: E501 - - # noqa: E501 - - :return: The version of this Firmware. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this Firmware. - - # noqa: E501 - - :param version: The version of this Firmware. # noqa: E501 - :type version: str - """ - - self._version = version - - @property - def buildid(self): - """Gets the buildid of this Firmware. # noqa: E501 - - # noqa: E501 - - :return: The buildid of this Firmware. # noqa: E501 - :rtype: str - """ - return self._buildid - - @buildid.setter - def buildid(self, buildid): - """Sets the buildid of this Firmware. - - # noqa: E501 - - :param buildid: The buildid of this Firmware. # noqa: E501 - :type buildid: str - """ - - self._buildid = buildid - - @property - def android_flavor(self): - """Gets the android_flavor of this Firmware. # noqa: E501 - - Android only flavor # noqa: E501 - - :return: The android_flavor of this Firmware. # noqa: E501 - :rtype: str - """ - return self._android_flavor - - @android_flavor.setter - def android_flavor(self, android_flavor): - """Sets the android_flavor of this Firmware. - - Android only flavor # noqa: E501 - - :param android_flavor: The android_flavor of this Firmware. # noqa: E501 - :type android_flavor: str - """ - - self._android_flavor = android_flavor - - @property - def api_version(self): - """Gets the api_version of this Firmware. # noqa: E501 - - Android only API version # noqa: E501 - - :return: The api_version of this Firmware. # noqa: E501 - :rtype: str - """ - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Sets the api_version of this Firmware. - - Android only API version # noqa: E501 - - :param api_version: The api_version of this Firmware. # noqa: E501 - :type api_version: str - """ - - self._api_version = api_version - - @property - def sha256sum(self): - """Gets the sha256sum of this Firmware. # noqa: E501 - - # noqa: E501 - - :return: The sha256sum of this Firmware. # noqa: E501 - :rtype: str - """ - return self._sha256sum - - @sha256sum.setter - def sha256sum(self, sha256sum): - """Sets the sha256sum of this Firmware. - - # noqa: E501 - - :param sha256sum: The sha256sum of this Firmware. # noqa: E501 - :type sha256sum: str - """ - - self._sha256sum = sha256sum - - @property - def sha1sum(self): - """Gets the sha1sum of this Firmware. # noqa: E501 - - # noqa: E501 - - :return: The sha1sum of this Firmware. # noqa: E501 - :rtype: str - """ - return self._sha1sum - - @sha1sum.setter - def sha1sum(self, sha1sum): - """Sets the sha1sum of this Firmware. - - # noqa: E501 - - :param sha1sum: The sha1sum of this Firmware. # noqa: E501 - :type sha1sum: str - """ - - self._sha1sum = sha1sum - - @property - def md5sum(self): - """Gets the md5sum of this Firmware. # noqa: E501 - - # noqa: E501 - - :return: The md5sum of this Firmware. # noqa: E501 - :rtype: str - """ - return self._md5sum - - @md5sum.setter - def md5sum(self, md5sum): - """Sets the md5sum of this Firmware. - - # noqa: E501 - - :param md5sum: The md5sum of this Firmware. # noqa: E501 - :type md5sum: str - """ - - self._md5sum = md5sum - - @property - def size(self): - """Gets the size of this Firmware. # noqa: E501 - - # noqa: E501 - - :return: The size of this Firmware. # noqa: E501 - :rtype: float - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this Firmware. - - # noqa: E501 - - :param size: The size of this Firmware. # noqa: E501 - :type size: float - """ - - self._size = size - - @property - def unique_id(self): - """Gets the unique_id of this Firmware. # noqa: E501 - - # noqa: E501 - - :return: The unique_id of this Firmware. # noqa: E501 - :rtype: str - """ - return self._unique_id - - @unique_id.setter - def unique_id(self, unique_id): - """Sets the unique_id of this Firmware. - - # noqa: E501 - - :param unique_id: The unique_id of this Firmware. # noqa: E501 - :type unique_id: str - """ - - self._unique_id = unique_id - - @property - def metadata(self): - """Gets the metadata of this Firmware. # noqa: E501 - - Firmware metadata # noqa: E501 - - :return: The metadata of this Firmware. # noqa: E501 - :rtype: object - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this Firmware. - - Firmware metadata # noqa: E501 - - :param metadata: The metadata of this Firmware. # noqa: E501 - :type metadata: object - """ - - self._metadata = metadata - - @property - def releasedate(self): - """Gets the releasedate of this Firmware. # noqa: E501 - - Release Date # noqa: E501 - - :return: The releasedate of this Firmware. # noqa: E501 - :rtype: datetime - """ - return self._releasedate - - @releasedate.setter - def releasedate(self, releasedate): - """Sets the releasedate of this Firmware. - - Release Date # noqa: E501 - - :param releasedate: The releasedate of this Firmware. # noqa: E501 - :type releasedate: datetime - """ - - self._releasedate = releasedate - - @property - def uploaddate(self): - """Gets the uploaddate of this Firmware. # noqa: E501 - - Date uploaded # noqa: E501 - - :return: The uploaddate of this Firmware. # noqa: E501 - :rtype: datetime - """ - return self._uploaddate - - @uploaddate.setter - def uploaddate(self, uploaddate): - """Sets the uploaddate of this Firmware. - - Date uploaded # noqa: E501 - - :param uploaddate: The uploaddate of this Firmware. # noqa: E501 - :type uploaddate: datetime - """ - - self._uploaddate = uploaddate - - @property - def url(self): - """Gets the url of this Firmware. # noqa: E501 - - URL firmware is available at # noqa: E501 - - :return: The url of this Firmware. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this Firmware. - - URL firmware is available at # noqa: E501 - - :param url: The url of this Firmware. # noqa: E501 - :type url: str - """ - - self._url = url - - @property - def orig_url(self): - """Gets the orig_url of this Firmware. # noqa: E501 - - URL firmware is available at from vendor # noqa: E501 - - :return: The orig_url of this Firmware. # noqa: E501 - :rtype: str - """ - return self._orig_url - - @orig_url.setter - def orig_url(self, orig_url): - """Sets the orig_url of this Firmware. - - URL firmware is available at from vendor # noqa: E501 - - :param orig_url: The orig_url of this Firmware. # noqa: E501 - :type orig_url: str - """ - - self._orig_url = orig_url - - @property - def filename(self): - """Gets the filename of this Firmware. # noqa: E501 - - # noqa: E501 - - :return: The filename of this Firmware. # noqa: E501 - :rtype: str - """ - return self._filename - - @filename.setter - def filename(self, filename): - """Sets the filename of this Firmware. - - # noqa: E501 - - :param filename: The filename of this Firmware. # noqa: E501 - :type filename: str - """ - - self._filename = filename - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Firmware): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Firmware): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/firmware_asset.py b/corellium_api/models/firmware_asset.py deleted file mode 100644 index 93016f0..0000000 --- a/corellium_api/models/firmware_asset.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class FirmwareAsset(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'domain': 'str', - 'url': 'str', - 'payload': 'str', - 'size': 'float', - 'md5sum': 'str', - 'sha1sum': 'str', - 'sha256sum': 'str', - 'uploaddate': 'str', - 'created_at': 'str', - 'updated_at': 'str' - } - - attribute_map = { - 'domain': 'domain', - 'url': 'url', - 'payload': 'payload', - 'size': 'size', - 'md5sum': 'md5sum', - 'sha1sum': 'sha1sum', - 'sha256sum': 'sha256sum', - 'uploaddate': 'uploaddate', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, domain=None, url=None, payload=None, size=None, md5sum=None, sha1sum=None, sha256sum=None, uploaddate=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """FirmwareAsset - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._domain = None - self._url = None - self._payload = None - self._size = None - self._md5sum = None - self._sha1sum = None - self._sha256sum = None - self._uploaddate = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - self.domain = domain - self.url = url - self.payload = payload - self.size = size - self.md5sum = md5sum - self.sha1sum = sha1sum - self.sha256sum = sha256sum - self.uploaddate = uploaddate - self.created_at = created_at - self.updated_at = updated_at - - @property - def domain(self): - """Gets the domain of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The domain of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._domain - - @domain.setter - def domain(self, domain): - """Sets the domain of this FirmwareAsset. - - # noqa: E501 - - :param domain: The domain of this FirmwareAsset. # noqa: E501 - :type domain: str - """ - if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 - raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 - - self._domain = domain - - @property - def url(self): - """Gets the url of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The url of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this FirmwareAsset. - - # noqa: E501 - - :param url: The url of this FirmwareAsset. # noqa: E501 - :type url: str - """ - if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - - self._url = url - - @property - def payload(self): - """Gets the payload of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The payload of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._payload - - @payload.setter - def payload(self, payload): - """Sets the payload of this FirmwareAsset. - - # noqa: E501 - - :param payload: The payload of this FirmwareAsset. # noqa: E501 - :type payload: str - """ - if self.local_vars_configuration.client_side_validation and payload is None: # noqa: E501 - raise ValueError("Invalid value for `payload`, must not be `None`") # noqa: E501 - - self._payload = payload - - @property - def size(self): - """Gets the size of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The size of this FirmwareAsset. # noqa: E501 - :rtype: float - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this FirmwareAsset. - - # noqa: E501 - - :param size: The size of this FirmwareAsset. # noqa: E501 - :type size: float - """ - if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 - raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 - - self._size = size - - @property - def md5sum(self): - """Gets the md5sum of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The md5sum of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._md5sum - - @md5sum.setter - def md5sum(self, md5sum): - """Sets the md5sum of this FirmwareAsset. - - # noqa: E501 - - :param md5sum: The md5sum of this FirmwareAsset. # noqa: E501 - :type md5sum: str - """ - - self._md5sum = md5sum - - @property - def sha1sum(self): - """Gets the sha1sum of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The sha1sum of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._sha1sum - - @sha1sum.setter - def sha1sum(self, sha1sum): - """Sets the sha1sum of this FirmwareAsset. - - # noqa: E501 - - :param sha1sum: The sha1sum of this FirmwareAsset. # noqa: E501 - :type sha1sum: str - """ - - self._sha1sum = sha1sum - - @property - def sha256sum(self): - """Gets the sha256sum of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The sha256sum of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._sha256sum - - @sha256sum.setter - def sha256sum(self, sha256sum): - """Sets the sha256sum of this FirmwareAsset. - - # noqa: E501 - - :param sha256sum: The sha256sum of this FirmwareAsset. # noqa: E501 - :type sha256sum: str - """ - - self._sha256sum = sha256sum - - @property - def uploaddate(self): - """Gets the uploaddate of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The uploaddate of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._uploaddate - - @uploaddate.setter - def uploaddate(self, uploaddate): - """Sets the uploaddate of this FirmwareAsset. - - # noqa: E501 - - :param uploaddate: The uploaddate of this FirmwareAsset. # noqa: E501 - :type uploaddate: str - """ - - self._uploaddate = uploaddate - - @property - def created_at(self): - """Gets the created_at of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The created_at of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this FirmwareAsset. - - # noqa: E501 - - :param created_at: The created_at of this FirmwareAsset. # noqa: E501 - :type created_at: str - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this FirmwareAsset. # noqa: E501 - - # noqa: E501 - - :return: The updated_at of this FirmwareAsset. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this FirmwareAsset. - - # noqa: E501 - - :param updated_at: The updated_at of this FirmwareAsset. # noqa: E501 - :type updated_at: str - """ - - self._updated_at = updated_at - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FirmwareAsset): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, FirmwareAsset): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/get_assessments_by_instance_id500_response.py b/corellium_api/models/get_assessments_by_instance_id500_response.py deleted file mode 100644 index 22c7cf4..0000000 --- a/corellium_api/models/get_assessments_by_instance_id500_response.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class GetAssessmentsByInstanceId500Response(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'error': 'str' - } - - attribute_map = { - 'error': 'error' - } - - def __init__(self, error=None, local_vars_configuration=None): # noqa: E501 - """GetAssessmentsByInstanceId500Response - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._error = None - self.discriminator = None - - if error is not None: - self.error = error - - @property - def error(self): - """Gets the error of this GetAssessmentsByInstanceId500Response. # noqa: E501 - - - :return: The error of this GetAssessmentsByInstanceId500Response. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this GetAssessmentsByInstanceId500Response. - - - :param error: The error of this GetAssessmentsByInstanceId500Response. # noqa: E501 - :type error: str - """ - - self._error = error - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GetAssessmentsByInstanceId500Response): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GetAssessmentsByInstanceId500Response): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/get_interconnects_response.py b/corellium_api/models/get_interconnects_response.py deleted file mode 100644 index 8e2f8c1..0000000 --- a/corellium_api/models/get_interconnects_response.py +++ /dev/null @@ -1,240 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class GetInterconnectsResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'results': 'list[InterconnectResponse]', - 'count': 'float', - 'total': 'float', - 'limit': 'float', - 'offset': 'float' - } - - attribute_map = { - 'results': 'results', - 'count': 'count', - 'total': 'total', - 'limit': 'limit', - 'offset': 'offset' - } - - def __init__(self, results=None, count=None, total=None, limit=None, offset=None, local_vars_configuration=None): # noqa: E501 - """GetInterconnectsResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._results = None - self._count = None - self._total = None - self._limit = None - self._offset = None - self.discriminator = None - - self.results = results - self.count = count - self.total = total - self.limit = limit - self.offset = offset - - @property - def results(self): - """Gets the results of this GetInterconnectsResponse. # noqa: E501 - - Array of interconnects # noqa: E501 - - :return: The results of this GetInterconnectsResponse. # noqa: E501 - :rtype: list[InterconnectResponse] - """ - return self._results - - @results.setter - def results(self, results): - """Sets the results of this GetInterconnectsResponse. - - Array of interconnects # noqa: E501 - - :param results: The results of this GetInterconnectsResponse. # noqa: E501 - :type results: list[InterconnectResponse] - """ - - self._results = results - - @property - def count(self): - """Gets the count of this GetInterconnectsResponse. # noqa: E501 - - Number of interconnects in this response # noqa: E501 - - :return: The count of this GetInterconnectsResponse. # noqa: E501 - :rtype: float - """ - return self._count - - @count.setter - def count(self, count): - """Sets the count of this GetInterconnectsResponse. - - Number of interconnects in this response # noqa: E501 - - :param count: The count of this GetInterconnectsResponse. # noqa: E501 - :type count: float - """ - - self._count = count - - @property - def total(self): - """Gets the total of this GetInterconnectsResponse. # noqa: E501 - - Total number of interconnects # noqa: E501 - - :return: The total of this GetInterconnectsResponse. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this GetInterconnectsResponse. - - Total number of interconnects # noqa: E501 - - :param total: The total of this GetInterconnectsResponse. # noqa: E501 - :type total: float - """ - - self._total = total - - @property - def limit(self): - """Gets the limit of this GetInterconnectsResponse. # noqa: E501 - - Limit used for pagination # noqa: E501 - - :return: The limit of this GetInterconnectsResponse. # noqa: E501 - :rtype: float - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this GetInterconnectsResponse. - - Limit used for pagination # noqa: E501 - - :param limit: The limit of this GetInterconnectsResponse. # noqa: E501 - :type limit: float - """ - - self._limit = limit - - @property - def offset(self): - """Gets the offset of this GetInterconnectsResponse. # noqa: E501 - - Offset used for pagination # noqa: E501 - - :return: The offset of this GetInterconnectsResponse. # noqa: E501 - :rtype: float - """ - return self._offset - - @offset.setter - def offset(self, offset): - """Sets the offset of this GetInterconnectsResponse. - - Offset used for pagination # noqa: E501 - - :param offset: The offset of this GetInterconnectsResponse. # noqa: E501 - :type offset: float - """ - - self._offset = offset - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GetInterconnectsResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GetInterconnectsResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/gpio_state_definition.py b/corellium_api/models/gpio_state_definition.py deleted file mode 100644 index 3bae812..0000000 --- a/corellium_api/models/gpio_state_definition.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class GpioStateDefinition(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'bit_count': 'float', - 'banks': 'list[list[Bit]]' - } - - attribute_map = { - 'bit_count': 'bitCount', - 'banks': 'banks' - } - - def __init__(self, bit_count=None, banks=None, local_vars_configuration=None): # noqa: E501 - """GpioStateDefinition - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._bit_count = None - self._banks = None - self.discriminator = None - - self.bit_count = bit_count - self.banks = banks - - @property - def bit_count(self): - """Gets the bit_count of this GpioStateDefinition. # noqa: E501 - - count of bits in members of this bank # noqa: E501 - - :return: The bit_count of this GpioStateDefinition. # noqa: E501 - :rtype: float - """ - return self._bit_count - - @bit_count.setter - def bit_count(self, bit_count): - """Sets the bit_count of this GpioStateDefinition. - - count of bits in members of this bank # noqa: E501 - - :param bit_count: The bit_count of this GpioStateDefinition. # noqa: E501 - :type bit_count: float - """ - if self.local_vars_configuration.client_side_validation and bit_count is None: # noqa: E501 - raise ValueError("Invalid value for `bit_count`, must not be `None`") # noqa: E501 - - self._bit_count = bit_count - - @property - def banks(self): - """Gets the banks of this GpioStateDefinition. # noqa: E501 - - bits for each bank of this name as an array of arrays # noqa: E501 - - :return: The banks of this GpioStateDefinition. # noqa: E501 - :rtype: list[list[Bit]] - """ - return self._banks - - @banks.setter - def banks(self, banks): - """Sets the banks of this GpioStateDefinition. - - bits for each bank of this name as an array of arrays # noqa: E501 - - :param banks: The banks of this GpioStateDefinition. # noqa: E501 - :type banks: list[list[Bit]] - """ - if self.local_vars_configuration.client_side_validation and banks is None: # noqa: E501 - raise ValueError("Invalid value for `banks`, must not be `None`") # noqa: E501 - - self._banks = banks - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GpioStateDefinition): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GpioStateDefinition): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/gpios_state.py b/corellium_api/models/gpios_state.py deleted file mode 100644 index 91585d7..0000000 --- a/corellium_api/models/gpios_state.py +++ /dev/null @@ -1,183 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class GpiosState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'led': 'GpioStateDefinition', - 'button': 'GpioStateDefinition', - 'switch': 'GpioStateDefinition' - } - - attribute_map = { - 'led': 'led', - 'button': 'button', - 'switch': 'switch' - } - - def __init__(self, led=None, button=None, switch=None, local_vars_configuration=None): # noqa: E501 - """GpiosState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._led = None - self._button = None - self._switch = None - self.discriminator = None - - if led is not None: - self.led = led - if button is not None: - self.button = button - if switch is not None: - self.switch = switch - - @property - def led(self): - """Gets the led of this GpiosState. # noqa: E501 - - - :return: The led of this GpiosState. # noqa: E501 - :rtype: GpioStateDefinition - """ - return self._led - - @led.setter - def led(self, led): - """Sets the led of this GpiosState. - - - :param led: The led of this GpiosState. # noqa: E501 - :type led: GpioStateDefinition - """ - - self._led = led - - @property - def button(self): - """Gets the button of this GpiosState. # noqa: E501 - - - :return: The button of this GpiosState. # noqa: E501 - :rtype: GpioStateDefinition - """ - return self._button - - @button.setter - def button(self, button): - """Sets the button of this GpiosState. - - - :param button: The button of this GpiosState. # noqa: E501 - :type button: GpioStateDefinition - """ - - self._button = button - - @property - def switch(self): - """Gets the switch of this GpiosState. # noqa: E501 - - - :return: The switch of this GpiosState. # noqa: E501 - :rtype: GpioStateDefinition - """ - return self._switch - - @switch.setter - def switch(self, switch): - """Sets the switch of this GpiosState. - - - :param switch: The switch of this GpiosState. # noqa: E501 - :type switch: GpioStateDefinition - """ - - self._switch = switch - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GpiosState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GpiosState): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/grant_trial_request_response.py b/corellium_api/models/grant_trial_request_response.py deleted file mode 100644 index 4e3f798..0000000 --- a/corellium_api/models/grant_trial_request_response.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class GrantTrialRequestResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'code': 'str' - } - - attribute_map = { - 'code': 'code' - } - - def __init__(self, code=None, local_vars_configuration=None): # noqa: E501 - """GrantTrialRequestResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._code = None - self.discriminator = None - - self.code = code - - @property - def code(self): - """Gets the code of this GrantTrialRequestResponse. # noqa: E501 - - Trial request code # noqa: E501 - - :return: The code of this GrantTrialRequestResponse. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this GrantTrialRequestResponse. - - Trial request code # noqa: E501 - - :param code: The code of this GrantTrialRequestResponse. # noqa: E501 - :type code: str - """ - - self._code = code - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GrantTrialRequestResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, GrantTrialRequestResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/hook.py b/corellium_api/models/hook.py deleted file mode 100644 index bc1c749..0000000 --- a/corellium_api/models/hook.py +++ /dev/null @@ -1,354 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Hook(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'label': 'str', - 'address': 'str', - 'patch': 'str', - 'patch_type': 'str', - 'enabled': 'bool', - 'created_at': 'str', - 'updated_at': 'str', - 'instance_id': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'label': 'label', - 'address': 'address', - 'patch': 'patch', - 'patch_type': 'patchType', - 'enabled': 'enabled', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'instance_id': 'instanceId' - } - - def __init__(self, identifier=None, label=None, address=None, patch=None, patch_type=None, enabled=None, created_at=None, updated_at=None, instance_id=None, local_vars_configuration=None): # noqa: E501 - """Hook - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._label = None - self._address = None - self._patch = None - self._patch_type = None - self._enabled = None - self._created_at = None - self._updated_at = None - self._instance_id = None - self.discriminator = None - - self.identifier = identifier - self.label = label - self.address = address - self.patch = patch - self.patch_type = patch_type - self.enabled = enabled - self.created_at = created_at - self.updated_at = updated_at - self.instance_id = instance_id - - @property - def identifier(self): - """Gets the identifier of this Hook. # noqa: E501 - - Identifier # noqa: E501 - - :return: The identifier of this Hook. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this Hook. - - Identifier # noqa: E501 - - :param identifier: The identifier of this Hook. # noqa: E501 - :type identifier: str - """ - - self._identifier = identifier - - @property - def label(self): - """Gets the label of this Hook. # noqa: E501 - - Label # noqa: E501 - - :return: The label of this Hook. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this Hook. - - Label # noqa: E501 - - :param label: The label of this Hook. # noqa: E501 - :type label: str - """ - - self._label = label - - @property - def address(self): - """Gets the address of this Hook. # noqa: E501 - - Address # noqa: E501 - - :return: The address of this Hook. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this Hook. - - Address # noqa: E501 - - :param address: The address of this Hook. # noqa: E501 - :type address: str - """ - - self._address = address - - @property - def patch(self): - """Gets the patch of this Hook. # noqa: E501 - - Patch # noqa: E501 - - :return: The patch of this Hook. # noqa: E501 - :rtype: str - """ - return self._patch - - @patch.setter - def patch(self, patch): - """Sets the patch of this Hook. - - Patch # noqa: E501 - - :param patch: The patch of this Hook. # noqa: E501 - :type patch: str - """ - - self._patch = patch - - @property - def patch_type(self): - """Gets the patch_type of this Hook. # noqa: E501 - - Patch Type # noqa: E501 - - :return: The patch_type of this Hook. # noqa: E501 - :rtype: str - """ - return self._patch_type - - @patch_type.setter - def patch_type(self, patch_type): - """Sets the patch_type of this Hook. - - Patch Type # noqa: E501 - - :param patch_type: The patch_type of this Hook. # noqa: E501 - :type patch_type: str - """ - allowed_values = [None,"csmfcc", "csmfvm"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and patch_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `patch_type` ({0}), must be one of {1}" # noqa: E501 - .format(patch_type, allowed_values) - ) - - self._patch_type = patch_type - - @property - def enabled(self): - """Gets the enabled of this Hook. # noqa: E501 - - If true, instances can call required hooks # noqa: E501 - - :return: The enabled of this Hook. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this Hook. - - If true, instances can call required hooks # noqa: E501 - - :param enabled: The enabled of this Hook. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - @property - def created_at(self): - """Gets the created_at of this Hook. # noqa: E501 - - Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The created_at of this Hook. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Hook. - - Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param created_at: The created_at of this Hook. # noqa: E501 - :type created_at: str - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Hook. # noqa: E501 - - Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The updated_at of this Hook. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Hook. - - Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param updated_at: The updated_at of this Hook. # noqa: E501 - :type updated_at: str - """ - - self._updated_at = updated_at - - @property - def instance_id(self): - """Gets the instance_id of this Hook. # noqa: E501 - - Instance Id # noqa: E501 - - :return: The instance_id of this Hook. # noqa: E501 - :rtype: str - """ - return self._instance_id - - @instance_id.setter - def instance_id(self, instance_id): - """Sets the instance_id of this Hook. - - Instance Id # noqa: E501 - - :param instance_id: The instance_id of this Hook. # noqa: E501 - :type instance_id: str - """ - - self._instance_id = instance_id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Hook): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Hook): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/image.py b/corellium_api/models/image.py deleted file mode 100644 index 0362882..0000000 --- a/corellium_api/models/image.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Image(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'status': 'str', - 'id': 'str', - 'name': 'str', - 'type': 'str', - 'filename': 'str', - 'uniqueid': 'str', - 'size': 'float', - 'project': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime' - } - - attribute_map = { - 'status': 'status', - 'id': 'id', - 'name': 'name', - 'type': 'type', - 'filename': 'filename', - 'uniqueid': 'uniqueid', - 'size': 'size', - 'project': 'project', - 'created_at': 'created_at', - 'updated_at': 'updated_at' - } - - def __init__(self, status=None, id=None, name=None, type=None, filename=None, uniqueid=None, size=None, project=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """Image - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._status = None - self._id = None - self._name = None - self._type = None - self._filename = None - self._uniqueid = None - self._size = None - self._project = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - self.status = status - self.id = id - self.name = name - self.type = type - self.filename = filename - self.uniqueid = uniqueid - self.size = size - self.project = project - self.created_at = created_at - self.updated_at = updated_at - - @property - def status(self): - """Gets the status of this Image. # noqa: E501 - - # noqa: E501 - - :return: The status of this Image. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this Image. - - # noqa: E501 - - :param status: The status of this Image. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - - self._status = status - - @property - def id(self): - """Gets the id of this Image. # noqa: E501 - - Image ID # noqa: E501 - - :return: The id of this Image. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Image. - - Image ID # noqa: E501 - - :param id: The id of this Image. # noqa: E501 - :type id: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this Image. # noqa: E501 - - # noqa: E501 - - :return: The name of this Image. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Image. - - # noqa: E501 - - :param name: The name of this Image. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def type(self): - """Gets the type of this Image. # noqa: E501 - - Type of image # noqa: E501 - - :return: The type of this Image. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Image. - - Type of image # noqa: E501 - - :param type: The type of this Image. # noqa: E501 - :type type: str - """ - allowed_values = [None,"fwbinary", "kernel", "devicetree", "ramdisk", "loaderfile", "sepfw", "seprom", "bootrom", "llb", "iboot", "ibootdata", "fwpackage", "partition", "backup"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def filename(self): - """Gets the filename of this Image. # noqa: E501 - - # noqa: E501 - - :return: The filename of this Image. # noqa: E501 - :rtype: str - """ - return self._filename - - @filename.setter - def filename(self, filename): - """Sets the filename of this Image. - - # noqa: E501 - - :param filename: The filename of this Image. # noqa: E501 - :type filename: str - """ - - self._filename = filename - - @property - def uniqueid(self): - """Gets the uniqueid of this Image. # noqa: E501 - - # noqa: E501 - - :return: The uniqueid of this Image. # noqa: E501 - :rtype: str - """ - return self._uniqueid - - @uniqueid.setter - def uniqueid(self, uniqueid): - """Sets the uniqueid of this Image. - - # noqa: E501 - - :param uniqueid: The uniqueid of this Image. # noqa: E501 - :type uniqueid: str - """ - - self._uniqueid = uniqueid - - @property - def size(self): - """Gets the size of this Image. # noqa: E501 - - # noqa: E501 - - :return: The size of this Image. # noqa: E501 - :rtype: float - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this Image. - - # noqa: E501 - - :param size: The size of this Image. # noqa: E501 - :type size: float - """ - - self._size = size - - @property - def project(self): - """Gets the project of this Image. # noqa: E501 - - project ID # noqa: E501 - - :return: The project of this Image. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this Image. - - project ID # noqa: E501 - - :param project: The project of this Image. # noqa: E501 - :type project: str - """ - - self._project = project - - @property - def created_at(self): - """Gets the created_at of this Image. # noqa: E501 - - When Image was created # noqa: E501 - - :return: The created_at of this Image. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Image. - - When Image was created # noqa: E501 - - :param created_at: The created_at of this Image. # noqa: E501 - :type created_at: datetime - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Image. # noqa: E501 - - When Image was last updated # noqa: E501 - - :return: The updated_at of this Image. # noqa: E501 - :rtype: datetime - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Image. - - When Image was last updated # noqa: E501 - - :param updated_at: The updated_at of this Image. # noqa: E501 - :type updated_at: datetime - """ - - self._updated_at = updated_at - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Image): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Image): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/input_response.py b/corellium_api/models/input_response.py deleted file mode 100644 index ce8c5bc..0000000 --- a/corellium_api/models/input_response.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InputResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'eta': 'float' - } - - attribute_map = { - 'eta': 'eta' - } - - def __init__(self, eta=None, local_vars_configuration=None): # noqa: E501 - """InputResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._eta = None - self.discriminator = None - - self.eta = eta - - @property - def eta(self): - """Gets the eta of this InputResponse. # noqa: E501 - - Expected time to complete # noqa: E501 - - :return: The eta of this InputResponse. # noqa: E501 - :rtype: float - """ - return self._eta - - @eta.setter - def eta(self, eta): - """Sets the eta of this InputResponse. - - Expected time to complete # noqa: E501 - - :param eta: The eta of this InputResponse. # noqa: E501 - :type eta: float - """ - - self._eta = eta - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InputResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InputResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/install_firmware_request.py b/corellium_api/models/install_firmware_request.py deleted file mode 100644 index 67ab1e2..0000000 --- a/corellium_api/models/install_firmware_request.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstallFirmwareRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'image_id': 'str', - 'filename': 'str' - } - - attribute_map = { - 'image_id': 'imageId', - 'filename': 'filename' - } - - def __init__(self, image_id=None, filename=None, local_vars_configuration=None): # noqa: E501 - """InstallFirmwareRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._image_id = None - self._filename = None - self.discriminator = None - - self.image_id = image_id - self.filename = filename - - @property - def image_id(self): - """Gets the image_id of this InstallFirmwareRequest. # noqa: E501 - - Image ID # noqa: E501 - - :return: The image_id of this InstallFirmwareRequest. # noqa: E501 - :rtype: str - """ - return self._image_id - - @image_id.setter - def image_id(self, image_id): - """Sets the image_id of this InstallFirmwareRequest. - - Image ID # noqa: E501 - - :param image_id: The image_id of this InstallFirmwareRequest. # noqa: E501 - :type image_id: str - """ - if self.local_vars_configuration.client_side_validation and image_id is None: # noqa: E501 - raise ValueError("Invalid value for `image_id`, must not be `None`") # noqa: E501 - - self._image_id = image_id - - @property - def filename(self): - """Gets the filename of this InstallFirmwareRequest. # noqa: E501 - - Filename of the firmware # noqa: E501 - - :return: The filename of this InstallFirmwareRequest. # noqa: E501 - :rtype: str - """ - return self._filename - - @filename.setter - def filename(self, filename): - """Sets the filename of this InstallFirmwareRequest. - - Filename of the firmware # noqa: E501 - - :param filename: The filename of this InstallFirmwareRequest. # noqa: E501 - :type filename: str - """ - if self.local_vars_configuration.client_side_validation and filename is None: # noqa: E501 - raise ValueError("Invalid value for `filename`, must not be `None`") # noqa: E501 - - self._filename = filename - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstallFirmwareRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstallFirmwareRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/install_firmware_response.py b/corellium_api/models/install_firmware_response.py deleted file mode 100644 index af2a974..0000000 --- a/corellium_api/models/install_firmware_response.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstallFirmwareResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'task_id': 'str', - 'installed_firmware_url': 'str' - } - - attribute_map = { - 'task_id': 'taskId', - 'installed_firmware_url': 'installedFirmwareUrl' - } - - def __init__(self, task_id=None, installed_firmware_url=None, local_vars_configuration=None): # noqa: E501 - """InstallFirmwareResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._task_id = None - self._installed_firmware_url = None - self.discriminator = None - - self.task_id = task_id - self.installed_firmware_url = installed_firmware_url - - @property - def task_id(self): - """Gets the task_id of this InstallFirmwareResponse. # noqa: E501 - - Task ID # noqa: E501 - - :return: The task_id of this InstallFirmwareResponse. # noqa: E501 - :rtype: str - """ - return self._task_id - - @task_id.setter - def task_id(self, task_id): - """Sets the task_id of this InstallFirmwareResponse. - - Task ID # noqa: E501 - - :param task_id: The task_id of this InstallFirmwareResponse. # noqa: E501 - :type task_id: str - """ - - self._task_id = task_id - - @property - def installed_firmware_url(self): - """Gets the installed_firmware_url of this InstallFirmwareResponse. # noqa: E501 - - Installed Firmware URL # noqa: E501 - - :return: The installed_firmware_url of this InstallFirmwareResponse. # noqa: E501 - :rtype: str - """ - return self._installed_firmware_url - - @installed_firmware_url.setter - def installed_firmware_url(self, installed_firmware_url): - """Sets the installed_firmware_url of this InstallFirmwareResponse. - - Installed Firmware URL # noqa: E501 - - :param installed_firmware_url: The installed_firmware_url of this InstallFirmwareResponse. # noqa: E501 - :type installed_firmware_url: str - """ - - self._installed_firmware_url = installed_firmware_url - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstallFirmwareResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstallFirmwareResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance.py b/corellium_api/models/instance.py deleted file mode 100644 index 2311941..0000000 --- a/corellium_api/models/instance.py +++ /dev/null @@ -1,880 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Instance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'key': 'str', - 'flavor': 'str', - 'type': 'str', - 'project': 'str', - 'state': 'InstanceState', - 'state_changed': 'datetime', - 'started_at': 'str', - 'user_task': 'str', - 'task_state': 'str', - 'error': 'str', - 'boot_options': 'InstanceBootOptions', - 'service_ip': 'str', - 'wifi_ip': 'str', - 'secondary_ip': 'str', - 'services': 'InstanceServices', - 'panicked': 'bool', - 'created': 'datetime', - 'model': 'str', - 'fwpackage': 'str', - 'os': 'str', - 'agent': 'InstanceAgentState', - 'netmon': 'InstanceNetmonState', - 'netdump': 'InstanceNetdumpState', - 'expose_port': 'str', - 'fault': 'bool', - 'patches': 'list[str]', - 'created_by': 'CreatedBy' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'key': 'key', - 'flavor': 'flavor', - 'type': 'type', - 'project': 'project', - 'state': 'state', - 'state_changed': 'stateChanged', - 'started_at': 'startedAt', - 'user_task': 'userTask', - 'task_state': 'taskState', - 'error': 'error', - 'boot_options': 'bootOptions', - 'service_ip': 'serviceIp', - 'wifi_ip': 'wifiIp', - 'secondary_ip': 'secondaryIp', - 'services': 'services', - 'panicked': 'panicked', - 'created': 'created', - 'model': 'model', - 'fwpackage': 'fwpackage', - 'os': 'os', - 'agent': 'agent', - 'netmon': 'netmon', - 'netdump': 'netdump', - 'expose_port': 'exposePort', - 'fault': 'fault', - 'patches': 'patches', - 'created_by': 'createdBy' - } - - def __init__(self, id=None, name=None, key=None, flavor=None, type=None, project=None, state=None, state_changed=None, started_at=None, user_task=None, task_state=None, error=None, boot_options=None, service_ip=None, wifi_ip=None, secondary_ip=None, services=None, panicked=None, created=None, model=None, fwpackage=None, os=None, agent=None, netmon=None, netdump=None, expose_port=None, fault=None, patches=None, created_by=None, local_vars_configuration=None): # noqa: E501 - """Instance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._key = None - self._flavor = None - self._type = None - self._project = None - self._state = None - self._state_changed = None - self._started_at = None - self._user_task = None - self._task_state = None - self._error = None - self._boot_options = None - self._service_ip = None - self._wifi_ip = None - self._secondary_ip = None - self._services = None - self._panicked = None - self._created = None - self._model = None - self._fwpackage = None - self._os = None - self._agent = None - self._netmon = None - self._netdump = None - self._expose_port = None - self._fault = None - self._patches = None - self._created_by = None - self.discriminator = None - - self.id = id - self.name = name - self.key = key - self.flavor = flavor - self.type = type - self.project = project - if state is not None: - self.state = state - self.state_changed = state_changed - self.started_at = started_at - self.user_task = user_task - self.task_state = task_state - self.error = error - if boot_options is not None: - self.boot_options = boot_options - self.service_ip = service_ip - self.wifi_ip = wifi_ip - self.secondary_ip = secondary_ip - if services is not None: - self.services = services - self.panicked = panicked - self.created = created - self.model = model - self.fwpackage = fwpackage - self.os = os - self.agent = agent - if netmon is not None: - self.netmon = netmon - if netdump is not None: - self.netdump = netdump - self.expose_port = expose_port - self.fault = fault - self.patches = patches - if created_by is not None: - self.created_by = created_by - - @property - def id(self): - """Gets the id of this Instance. # noqa: E501 - - Instance Identifier # noqa: E501 - - :return: The id of this Instance. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Instance. - - Instance Identifier # noqa: E501 - - :param id: The id of this Instance. # noqa: E501 - :type id: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this Instance. # noqa: E501 - - Instance Name # noqa: E501 - - :return: The name of this Instance. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Instance. - - Instance Name # noqa: E501 - - :param name: The name of this Instance. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def key(self): - """Gets the key of this Instance. # noqa: E501 - - Key used to encrypt the Instance # noqa: E501 - - :return: The key of this Instance. # noqa: E501 - :rtype: str - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this Instance. - - Key used to encrypt the Instance # noqa: E501 - - :param key: The key of this Instance. # noqa: E501 - :type key: str - """ - - self._key = key - - @property - def flavor(self): - """Gets the flavor of this Instance. # noqa: E501 - - The type of virtual machine this is # noqa: E501 - - :return: The flavor of this Instance. # noqa: E501 - :rtype: str - """ - return self._flavor - - @flavor.setter - def flavor(self, flavor): - """Sets the flavor of this Instance. - - The type of virtual machine this is # noqa: E501 - - :param flavor: The flavor of this Instance. # noqa: E501 - :type flavor: str - """ - - self._flavor = flavor - - @property - def type(self): - """Gets the type of this Instance. # noqa: E501 - - # noqa: E501 - - :return: The type of this Instance. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Instance. - - # noqa: E501 - - :param type: The type of this Instance. # noqa: E501 - :type type: str - """ - - self._type = type - - @property - def project(self): - """Gets the project of this Instance. # noqa: E501 - - The projectId of the project this instance belongs to # noqa: E501 - - :return: The project of this Instance. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this Instance. - - The projectId of the project this instance belongs to # noqa: E501 - - :param project: The project of this Instance. # noqa: E501 - :type project: str - """ - - self._project = project - - @property - def state(self): - """Gets the state of this Instance. # noqa: E501 - - - :return: The state of this Instance. # noqa: E501 - :rtype: InstanceState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this Instance. - - - :param state: The state of this Instance. # noqa: E501 - :type state: InstanceState - """ - - self._state = state - - @property - def state_changed(self): - """Gets the state_changed of this Instance. # noqa: E501 - - Time the state of the instance last changed # noqa: E501 - - :return: The state_changed of this Instance. # noqa: E501 - :rtype: datetime - """ - return self._state_changed - - @state_changed.setter - def state_changed(self, state_changed): - """Sets the state_changed of this Instance. - - Time the state of the instance last changed # noqa: E501 - - :param state_changed: The state_changed of this Instance. # noqa: E501 - :type state_changed: datetime - """ - - self._state_changed = state_changed - - @property - def started_at(self): - """Gets the started_at of this Instance. # noqa: E501 - - Time the instance was started # noqa: E501 - - :return: The started_at of this Instance. # noqa: E501 - :rtype: str - """ - return self._started_at - - @started_at.setter - def started_at(self, started_at): - """Sets the started_at of this Instance. - - Time the instance was started # noqa: E501 - - :param started_at: The started_at of this Instance. # noqa: E501 - :type started_at: str - """ - - self._started_at = started_at - - @property - def user_task(self): - """Gets the user_task of this Instance. # noqa: E501 - - Currently executing User Task # noqa: E501 - - :return: The user_task of this Instance. # noqa: E501 - :rtype: str - """ - return self._user_task - - @user_task.setter - def user_task(self, user_task): - """Sets the user_task of this Instance. - - Currently executing User Task # noqa: E501 - - :param user_task: The user_task of this Instance. # noqa: E501 - :type user_task: str - """ - - self._user_task = user_task - - @property - def task_state(self): - """Gets the task_state of this Instance. # noqa: E501 - - Current task state if any # noqa: E501 - - :return: The task_state of this Instance. # noqa: E501 - :rtype: str - """ - return self._task_state - - @task_state.setter - def task_state(self, task_state): - """Sets the task_state of this Instance. - - Current task state if any # noqa: E501 - - :param task_state: The task_state of this Instance. # noqa: E501 - :type task_state: str - """ - - self._task_state = task_state - - @property - def error(self): - """Gets the error of this Instance. # noqa: E501 - - Current error state if any # noqa: E501 - - :return: The error of this Instance. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this Instance. - - Current error state if any # noqa: E501 - - :param error: The error of this Instance. # noqa: E501 - :type error: str - """ - - self._error = error - - @property - def boot_options(self): - """Gets the boot_options of this Instance. # noqa: E501 - - - :return: The boot_options of this Instance. # noqa: E501 - :rtype: InstanceBootOptions - """ - return self._boot_options - - @boot_options.setter - def boot_options(self, boot_options): - """Sets the boot_options of this Instance. - - - :param boot_options: The boot_options of this Instance. # noqa: E501 - :type boot_options: InstanceBootOptions - """ - - self._boot_options = boot_options - - @property - def service_ip(self): - """Gets the service_ip of this Instance. # noqa: E501 - - Services IP Address # noqa: E501 - - :return: The service_ip of this Instance. # noqa: E501 - :rtype: str - """ - return self._service_ip - - @service_ip.setter - def service_ip(self, service_ip): - """Sets the service_ip of this Instance. - - Services IP Address # noqa: E501 - - :param service_ip: The service_ip of this Instance. # noqa: E501 - :type service_ip: str - """ - - self._service_ip = service_ip - - @property - def wifi_ip(self): - """Gets the wifi_ip of this Instance. # noqa: E501 - - LAN IP Address # noqa: E501 - - :return: The wifi_ip of this Instance. # noqa: E501 - :rtype: str - """ - return self._wifi_ip - - @wifi_ip.setter - def wifi_ip(self, wifi_ip): - """Sets the wifi_ip of this Instance. - - LAN IP Address # noqa: E501 - - :param wifi_ip: The wifi_ip of this Instance. # noqa: E501 - :type wifi_ip: str - """ - - self._wifi_ip = wifi_ip - - @property - def secondary_ip(self): - """Gets the secondary_ip of this Instance. # noqa: E501 - - Secondary Interface LAN IP Address (if supported) # noqa: E501 - - :return: The secondary_ip of this Instance. # noqa: E501 - :rtype: str - """ - return self._secondary_ip - - @secondary_ip.setter - def secondary_ip(self, secondary_ip): - """Sets the secondary_ip of this Instance. - - Secondary Interface LAN IP Address (if supported) # noqa: E501 - - :param secondary_ip: The secondary_ip of this Instance. # noqa: E501 - :type secondary_ip: str - """ - - self._secondary_ip = secondary_ip - - @property - def services(self): - """Gets the services of this Instance. # noqa: E501 - - - :return: The services of this Instance. # noqa: E501 - :rtype: InstanceServices - """ - return self._services - - @services.setter - def services(self, services): - """Sets the services of this Instance. - - - :param services: The services of this Instance. # noqa: E501 - :type services: InstanceServices - """ - - self._services = services - - @property - def panicked(self): - """Gets the panicked of this Instance. # noqa: E501 - - # noqa: E501 - - :return: The panicked of this Instance. # noqa: E501 - :rtype: bool - """ - return self._panicked - - @panicked.setter - def panicked(self, panicked): - """Sets the panicked of this Instance. - - # noqa: E501 - - :param panicked: The panicked of this Instance. # noqa: E501 - :type panicked: bool - """ - - self._panicked = panicked - - @property - def created(self): - """Gets the created of this Instance. # noqa: E501 - - Time instance was created # noqa: E501 - - :return: The created of this Instance. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this Instance. - - Time instance was created # noqa: E501 - - :param created: The created of this Instance. # noqa: E501 - :type created: datetime - """ - - self._created = created - - @property - def model(self): - """Gets the model of this Instance. # noqa: E501 - - Model of virtual machine device # noqa: E501 - - :return: The model of this Instance. # noqa: E501 - :rtype: str - """ - return self._model - - @model.setter - def model(self, model): - """Sets the model of this Instance. - - Model of virtual machine device # noqa: E501 - - :param model: The model of this Instance. # noqa: E501 - :type model: str - """ - - self._model = model - - @property - def fwpackage(self): - """Gets the fwpackage of this Instance. # noqa: E501 - - URL that package used to create this instance is available at # noqa: E501 - - :return: The fwpackage of this Instance. # noqa: E501 - :rtype: str - """ - return self._fwpackage - - @fwpackage.setter - def fwpackage(self, fwpackage): - """Sets the fwpackage of this Instance. - - URL that package used to create this instance is available at # noqa: E501 - - :param fwpackage: The fwpackage of this Instance. # noqa: E501 - :type fwpackage: str - """ - - self._fwpackage = fwpackage - - @property - def os(self): - """Gets the os of this Instance. # noqa: E501 - - # noqa: E501 - - :return: The os of this Instance. # noqa: E501 - :rtype: str - """ - return self._os - - @os.setter - def os(self, os): - """Sets the os of this Instance. - - # noqa: E501 - - :param os: The os of this Instance. # noqa: E501 - :type os: str - """ - - self._os = os - - @property - def agent(self): - """Gets the agent of this Instance. # noqa: E501 - - - :return: The agent of this Instance. # noqa: E501 - :rtype: InstanceAgentState - """ - return self._agent - - @agent.setter - def agent(self, agent): - """Sets the agent of this Instance. - - - :param agent: The agent of this Instance. # noqa: E501 - :type agent: InstanceAgentState - """ - - self._agent = agent - - @property - def netmon(self): - """Gets the netmon of this Instance. # noqa: E501 - - - :return: The netmon of this Instance. # noqa: E501 - :rtype: InstanceNetmonState - """ - return self._netmon - - @netmon.setter - def netmon(self, netmon): - """Sets the netmon of this Instance. - - - :param netmon: The netmon of this Instance. # noqa: E501 - :type netmon: InstanceNetmonState - """ - - self._netmon = netmon - - @property - def netdump(self): - """Gets the netdump of this Instance. # noqa: E501 - - - :return: The netdump of this Instance. # noqa: E501 - :rtype: InstanceNetdumpState - """ - return self._netdump - - @netdump.setter - def netdump(self, netdump): - """Sets the netdump of this Instance. - - - :param netdump: The netdump of this Instance. # noqa: E501 - :type netdump: InstanceNetdumpState - """ - - self._netdump = netdump - - @property - def expose_port(self): - """Gets the expose_port of this Instance. # noqa: E501 - - # noqa: E501 - - :return: The expose_port of this Instance. # noqa: E501 - :rtype: str - """ - return self._expose_port - - @expose_port.setter - def expose_port(self, expose_port): - """Sets the expose_port of this Instance. - - # noqa: E501 - - :param expose_port: The expose_port of this Instance. # noqa: E501 - :type expose_port: str - """ - - self._expose_port = expose_port - - @property - def fault(self): - """Gets the fault of this Instance. # noqa: E501 - - # noqa: E501 - - :return: The fault of this Instance. # noqa: E501 - :rtype: bool - """ - return self._fault - - @fault.setter - def fault(self, fault): - """Sets the fault of this Instance. - - # noqa: E501 - - :param fault: The fault of this Instance. # noqa: E501 - :type fault: bool - """ - - self._fault = fault - - @property - def patches(self): - """Gets the patches of this Instance. # noqa: E501 - - # noqa: E501 - - :return: The patches of this Instance. # noqa: E501 - :rtype: list[str] - """ - return self._patches - - @patches.setter - def patches(self, patches): - """Sets the patches of this Instance. - - # noqa: E501 - - :param patches: The patches of this Instance. # noqa: E501 - :type patches: list[str] - """ - - self._patches = patches - - @property - def created_by(self): - """Gets the created_by of this Instance. # noqa: E501 - - - :return: The created_by of this Instance. # noqa: E501 - :rtype: CreatedBy - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """Sets the created_by of this Instance. - - - :param created_by: The created_by of this Instance. # noqa: E501 - :type created_by: CreatedBy - """ - - self._created_by = created_by - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Instance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Instance): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_agent_state.py b/corellium_api/models/instance_agent_state.py deleted file mode 100644 index 884454c..0000000 --- a/corellium_api/models/instance_agent_state.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceAgentState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'hash': 'str', - 'info': 'str' - } - - attribute_map = { - 'hash': 'hash', - 'info': 'info' - } - - def __init__(self, hash=None, info=None, local_vars_configuration=None): # noqa: E501 - """InstanceAgentState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._hash = None - self._info = None - self.discriminator = None - - self.hash = hash - self.info = info - - @property - def hash(self): - """Gets the hash of this InstanceAgentState. # noqa: E501 - - # noqa: E501 - - :return: The hash of this InstanceAgentState. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this InstanceAgentState. - - # noqa: E501 - - :param hash: The hash of this InstanceAgentState. # noqa: E501 - :type hash: str - """ - - self._hash = hash - - @property - def info(self): - """Gets the info of this InstanceAgentState. # noqa: E501 - - # noqa: E501 - - :return: The info of this InstanceAgentState. # noqa: E501 - :rtype: str - """ - return self._info - - @info.setter - def info(self, info): - """Sets the info of this InstanceAgentState. - - # noqa: E501 - - :param info: The info of this InstanceAgentState. # noqa: E501 - :type info: str - """ - - self._info = info - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceAgentState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceAgentState): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_boot_options.py b/corellium_api/models/instance_boot_options.py deleted file mode 100644 index d1318c7..0000000 --- a/corellium_api/models/instance_boot_options.py +++ /dev/null @@ -1,321 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceBootOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'boot_args': 'str', - 'restore_boot_args': 'str', - 'udid': 'str', - 'ecid': 'str', - 'random_seed': 'str', - 'pac': 'bool', - 'aprr': 'bool', - 'additional_tags': 'list[InstanceBootOptionsAdditionalTag]' - } - - attribute_map = { - 'boot_args': 'bootArgs', - 'restore_boot_args': 'restoreBootArgs', - 'udid': 'udid', - 'ecid': 'ecid', - 'random_seed': 'randomSeed', - 'pac': 'pac', - 'aprr': 'aprr', - 'additional_tags': 'additionalTags' - } - - def __init__(self, boot_args=None, restore_boot_args=None, udid=None, ecid=None, random_seed=None, pac=None, aprr=None, additional_tags=None, local_vars_configuration=None): # noqa: E501 - """InstanceBootOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._boot_args = None - self._restore_boot_args = None - self._udid = None - self._ecid = None - self._random_seed = None - self._pac = None - self._aprr = None - self._additional_tags = None - self.discriminator = None - - self.boot_args = boot_args - self.restore_boot_args = restore_boot_args - self.udid = udid - self.ecid = ecid - self.random_seed = random_seed - self.pac = pac - self.aprr = aprr - self.additional_tags = additional_tags - - @property - def boot_args(self): - """Gets the boot_args of this InstanceBootOptions. # noqa: E501 - - # noqa: E501 - - :return: The boot_args of this InstanceBootOptions. # noqa: E501 - :rtype: str - """ - return self._boot_args - - @boot_args.setter - def boot_args(self, boot_args): - """Sets the boot_args of this InstanceBootOptions. - - # noqa: E501 - - :param boot_args: The boot_args of this InstanceBootOptions. # noqa: E501 - :type boot_args: str - """ - - self._boot_args = boot_args - - @property - def restore_boot_args(self): - """Gets the restore_boot_args of this InstanceBootOptions. # noqa: E501 - - # noqa: E501 - - :return: The restore_boot_args of this InstanceBootOptions. # noqa: E501 - :rtype: str - """ - return self._restore_boot_args - - @restore_boot_args.setter - def restore_boot_args(self, restore_boot_args): - """Sets the restore_boot_args of this InstanceBootOptions. - - # noqa: E501 - - :param restore_boot_args: The restore_boot_args of this InstanceBootOptions. # noqa: E501 - :type restore_boot_args: str - """ - - self._restore_boot_args = restore_boot_args - - @property - def udid(self): - """Gets the udid of this InstanceBootOptions. # noqa: E501 - - Boot udid # noqa: E501 - - :return: The udid of this InstanceBootOptions. # noqa: E501 - :rtype: str - """ - return self._udid - - @udid.setter - def udid(self, udid): - """Sets the udid of this InstanceBootOptions. - - Boot udid # noqa: E501 - - :param udid: The udid of this InstanceBootOptions. # noqa: E501 - :type udid: str - """ - - self._udid = udid - - @property - def ecid(self): - """Gets the ecid of this InstanceBootOptions. # noqa: E501 - - Assigned ECID # noqa: E501 - - :return: The ecid of this InstanceBootOptions. # noqa: E501 - :rtype: str - """ - return self._ecid - - @ecid.setter - def ecid(self, ecid): - """Sets the ecid of this InstanceBootOptions. - - Assigned ECID # noqa: E501 - - :param ecid: The ecid of this InstanceBootOptions. # noqa: E501 - :type ecid: str - """ - - self._ecid = ecid - - @property - def random_seed(self): - """Gets the random_seed of this InstanceBootOptions. # noqa: E501 - - Random seed to provide to boot if any # noqa: E501 - - :return: The random_seed of this InstanceBootOptions. # noqa: E501 - :rtype: str - """ - return self._random_seed - - @random_seed.setter - def random_seed(self, random_seed): - """Sets the random_seed of this InstanceBootOptions. - - Random seed to provide to boot if any # noqa: E501 - - :param random_seed: The random_seed of this InstanceBootOptions. # noqa: E501 - :type random_seed: str - """ - - self._random_seed = random_seed - - @property - def pac(self): - """Gets the pac of this InstanceBootOptions. # noqa: E501 - - Enable PAC # noqa: E501 - - :return: The pac of this InstanceBootOptions. # noqa: E501 - :rtype: bool - """ - return self._pac - - @pac.setter - def pac(self, pac): - """Sets the pac of this InstanceBootOptions. - - Enable PAC # noqa: E501 - - :param pac: The pac of this InstanceBootOptions. # noqa: E501 - :type pac: bool - """ - - self._pac = pac - - @property - def aprr(self): - """Gets the aprr of this InstanceBootOptions. # noqa: E501 - - Enable APRR # noqa: E501 - - :return: The aprr of this InstanceBootOptions. # noqa: E501 - :rtype: bool - """ - return self._aprr - - @aprr.setter - def aprr(self, aprr): - """Sets the aprr of this InstanceBootOptions. - - Enable APRR # noqa: E501 - - :param aprr: The aprr of this InstanceBootOptions. # noqa: E501 - :type aprr: bool - """ - - self._aprr = aprr - - @property - def additional_tags(self): - """Gets the additional_tags of this InstanceBootOptions. # noqa: E501 - - # noqa: E501 - - :return: The additional_tags of this InstanceBootOptions. # noqa: E501 - :rtype: list[InstanceBootOptionsAdditionalTag] - """ - return self._additional_tags - - @additional_tags.setter - def additional_tags(self, additional_tags): - """Sets the additional_tags of this InstanceBootOptions. - - # noqa: E501 - - :param additional_tags: The additional_tags of this InstanceBootOptions. # noqa: E501 - :type additional_tags: list[InstanceBootOptionsAdditionalTag] - """ - - self._additional_tags = additional_tags - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceBootOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceBootOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_boot_options_additional_tag.py b/corellium_api/models/instance_boot_options_additional_tag.py deleted file mode 100644 index 80586ba..0000000 --- a/corellium_api/models/instance_boot_options_additional_tag.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceBootOptionsAdditionalTag(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - KALLOC = "kalloc" - GPU = "gpu" - NO_KEYBOARD = "no-keyboard" - NODEVMODE = "nodevmode" - SEP_CONS_EXT = "sep-cons-ext" - IBOOT_JAILBREAK = "iboot-jailbreak" - LLB_JAILBREAK = "llb-jailbreak" - ROM_JAILBREAK = "rom-jailbreak" - - allowable_values = [KALLOC, GPU, NO_KEYBOARD, NODEVMODE, SEP_CONS_EXT, IBOOT_JAILBREAK, LLB_JAILBREAK, ROM_JAILBREAK] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """InstanceBootOptionsAdditionalTag - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceBootOptionsAdditionalTag): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceBootOptionsAdditionalTag): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_console_endpoint.py b/corellium_api/models/instance_console_endpoint.py deleted file mode 100644 index 93631c7..0000000 --- a/corellium_api/models/instance_console_endpoint.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceConsoleEndpoint(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'url': 'str' - } - - attribute_map = { - 'url': 'url' - } - - def __init__(self, url=None, local_vars_configuration=None): # noqa: E501 - """InstanceConsoleEndpoint - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._url = None - self.discriminator = None - - self.url = url - - @property - def url(self): - """Gets the url of this InstanceConsoleEndpoint. # noqa: E501 - - Console Websocket URL # noqa: E501 - - :return: The url of this InstanceConsoleEndpoint. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this InstanceConsoleEndpoint. - - Console Websocket URL # noqa: E501 - - :param url: The url of this InstanceConsoleEndpoint. # noqa: E501 - :type url: str - """ - - self._url = url - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceConsoleEndpoint): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceConsoleEndpoint): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_create_options.py b/corellium_api/models/instance_create_options.py deleted file mode 100644 index 4cd5593..0000000 --- a/corellium_api/models/instance_create_options.py +++ /dev/null @@ -1,462 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceCreateOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'shared_snapshot': 'str', - 'shared_snapshot_password': 'str', - 'name': 'str', - 'key': 'str', - 'flavor': 'str', - 'project': 'str', - 'os': 'str', - 'osbuild': 'str', - 'patches': 'list[str]', - 'fwpackage': 'str', - 'orig_fw_package_url': 'str', - 'encrypt': 'bool', - 'wifi_mac': 'str' - } - - attribute_map = { - 'shared_snapshot': 'sharedSnapshot', - 'shared_snapshot_password': 'sharedSnapshotPassword', - 'name': 'name', - 'key': 'key', - 'flavor': 'flavor', - 'project': 'project', - 'os': 'os', - 'osbuild': 'osbuild', - 'patches': 'patches', - 'fwpackage': 'fwpackage', - 'orig_fw_package_url': 'origFwPackageUrl', - 'encrypt': 'encrypt', - 'wifi_mac': 'wifiMac' - } - - def __init__(self, shared_snapshot=None, shared_snapshot_password=None, name=None, key=None, flavor=None, project=None, os=None, osbuild=None, patches=None, fwpackage=None, orig_fw_package_url=None, encrypt=None, wifi_mac=None, local_vars_configuration=None): # noqa: E501 - """InstanceCreateOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._shared_snapshot = None - self._shared_snapshot_password = None - self._name = None - self._key = None - self._flavor = None - self._project = None - self._os = None - self._osbuild = None - self._patches = None - self._fwpackage = None - self._orig_fw_package_url = None - self._encrypt = None - self._wifi_mac = None - self.discriminator = None - - self.shared_snapshot = shared_snapshot - self.shared_snapshot_password = shared_snapshot_password - self.name = name - self.key = key - self.flavor = flavor - self.project = project - self.os = os - self.osbuild = osbuild - self.patches = patches - self.fwpackage = fwpackage - self.orig_fw_package_url = orig_fw_package_url - self.encrypt = encrypt - self.wifi_mac = wifi_mac - - @property - def shared_snapshot(self): - """Gets the shared_snapshot of this InstanceCreateOptions. # noqa: E501 - - identifier of the snapshot that was shared. # noqa: E501 - - :return: The shared_snapshot of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._shared_snapshot - - @shared_snapshot.setter - def shared_snapshot(self, shared_snapshot): - """Sets the shared_snapshot of this InstanceCreateOptions. - - identifier of the snapshot that was shared. # noqa: E501 - - :param shared_snapshot: The shared_snapshot of this InstanceCreateOptions. # noqa: E501 - :type shared_snapshot: str - """ - - self._shared_snapshot = shared_snapshot - - @property - def shared_snapshot_password(self): - """Gets the shared_snapshot_password of this InstanceCreateOptions. # noqa: E501 - - optional password if the shared snapshot requires a password. # noqa: E501 - - :return: The shared_snapshot_password of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._shared_snapshot_password - - @shared_snapshot_password.setter - def shared_snapshot_password(self, shared_snapshot_password): - """Sets the shared_snapshot_password of this InstanceCreateOptions. - - optional password if the shared snapshot requires a password. # noqa: E501 - - :param shared_snapshot_password: The shared_snapshot_password of this InstanceCreateOptions. # noqa: E501 - :type shared_snapshot_password: str - """ - - self._shared_snapshot_password = shared_snapshot_password - - @property - def name(self): - """Gets the name of this InstanceCreateOptions. # noqa: E501 - - the name of the device # noqa: E501 - - :return: The name of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this InstanceCreateOptions. - - the name of the device # noqa: E501 - - :param name: The name of this InstanceCreateOptions. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def key(self): - """Gets the key of this InstanceCreateOptions. # noqa: E501 - - Key used to encrypt the Instance # noqa: E501 - - :return: The key of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this InstanceCreateOptions. - - Key used to encrypt the Instance # noqa: E501 - - :param key: The key of this InstanceCreateOptions. # noqa: E501 - :type key: str - """ - - self._key = key - - @property - def flavor(self): - """Gets the flavor of this InstanceCreateOptions. # noqa: E501 - - the flavor id # noqa: E501 - - :return: The flavor of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._flavor - - @flavor.setter - def flavor(self, flavor): - """Sets the flavor of this InstanceCreateOptions. - - the flavor id # noqa: E501 - - :param flavor: The flavor of this InstanceCreateOptions. # noqa: E501 - :type flavor: str - """ - if self.local_vars_configuration.client_side_validation and flavor is None: # noqa: E501 - raise ValueError("Invalid value for `flavor`, must not be `None`") # noqa: E501 - - self._flavor = flavor - - @property - def project(self): - """Gets the project of this InstanceCreateOptions. # noqa: E501 - - project UUID # noqa: E501 - - :return: The project of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this InstanceCreateOptions. - - project UUID # noqa: E501 - - :param project: The project of this InstanceCreateOptions. # noqa: E501 - :type project: str - """ - if self.local_vars_configuration.client_side_validation and project is None: # noqa: E501 - raise ValueError("Invalid value for `project`, must not be `None`") # noqa: E501 - - self._project = project - - @property - def os(self): - """Gets the os of this InstanceCreateOptions. # noqa: E501 - - OS Version # noqa: E501 - - :return: The os of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._os - - @os.setter - def os(self, os): - """Sets the os of this InstanceCreateOptions. - - OS Version # noqa: E501 - - :param os: The os of this InstanceCreateOptions. # noqa: E501 - :type os: str - """ - if self.local_vars_configuration.client_side_validation and os is None: # noqa: E501 - raise ValueError("Invalid value for `os`, must not be `None`") # noqa: E501 - - self._os = os - - @property - def osbuild(self): - """Gets the osbuild of this InstanceCreateOptions. # noqa: E501 - - OS Build # noqa: E501 - - :return: The osbuild of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._osbuild - - @osbuild.setter - def osbuild(self, osbuild): - """Sets the osbuild of this InstanceCreateOptions. - - OS Build # noqa: E501 - - :param osbuild: The osbuild of this InstanceCreateOptions. # noqa: E501 - :type osbuild: str - """ - - self._osbuild = osbuild - - @property - def patches(self): - """Gets the patches of this InstanceCreateOptions. # noqa: E501 - - list of patches to apply # noqa: E501 - - :return: The patches of this InstanceCreateOptions. # noqa: E501 - :rtype: list[str] - """ - return self._patches - - @patches.setter - def patches(self, patches): - """Sets the patches of this InstanceCreateOptions. - - list of patches to apply # noqa: E501 - - :param patches: The patches of this InstanceCreateOptions. # noqa: E501 - :type patches: list[str] - """ - - self._patches = patches - - @property - def fwpackage(self): - """Gets the fwpackage of this InstanceCreateOptions. # noqa: E501 - - URL or image id # noqa: E501 - - :return: The fwpackage of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._fwpackage - - @fwpackage.setter - def fwpackage(self, fwpackage): - """Sets the fwpackage of this InstanceCreateOptions. - - URL or image id # noqa: E501 - - :param fwpackage: The fwpackage of this InstanceCreateOptions. # noqa: E501 - :type fwpackage: str - """ - - self._fwpackage = fwpackage - - @property - def orig_fw_package_url(self): - """Gets the orig_fw_package_url of this InstanceCreateOptions. # noqa: E501 - - URL that firmware package used to create this instance is available at # noqa: E501 - - :return: The orig_fw_package_url of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._orig_fw_package_url - - @orig_fw_package_url.setter - def orig_fw_package_url(self, orig_fw_package_url): - """Sets the orig_fw_package_url of this InstanceCreateOptions. - - URL that firmware package used to create this instance is available at # noqa: E501 - - :param orig_fw_package_url: The orig_fw_package_url of this InstanceCreateOptions. # noqa: E501 - :type orig_fw_package_url: str - """ - - self._orig_fw_package_url = orig_fw_package_url - - @property - def encrypt(self): - """Gets the encrypt of this InstanceCreateOptions. # noqa: E501 - - # noqa: E501 - - :return: The encrypt of this InstanceCreateOptions. # noqa: E501 - :rtype: bool - """ - return self._encrypt - - @encrypt.setter - def encrypt(self, encrypt): - """Sets the encrypt of this InstanceCreateOptions. - - # noqa: E501 - - :param encrypt: The encrypt of this InstanceCreateOptions. # noqa: E501 - :type encrypt: bool - """ - - self._encrypt = encrypt - - @property - def wifi_mac(self): - """Gets the wifi_mac of this InstanceCreateOptions. # noqa: E501 - - # noqa: E501 - - :return: The wifi_mac of this InstanceCreateOptions. # noqa: E501 - :rtype: str - """ - return self._wifi_mac - - @wifi_mac.setter - def wifi_mac(self, wifi_mac): - """Sets the wifi_mac of this InstanceCreateOptions. - - # noqa: E501 - - :param wifi_mac: The wifi_mac of this InstanceCreateOptions. # noqa: E501 - :type wifi_mac: str - """ - - self._wifi_mac = wifi_mac - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceCreateOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceCreateOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_input.py b/corellium_api/models/instance_input.py deleted file mode 100644 index 4a087aa..0000000 --- a/corellium_api/models/instance_input.py +++ /dev/null @@ -1,441 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceInput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'position': 'object', - 'buttons': 'list[TouchInputButtonsInner]', - 'normalized': 'bool', - 'wait': 'float', - 'start': 'object', - 'end': 'object', - 'bezier_points': 'list[object]', - 'start_buttons': 'list[TouchInputButtonsInner]', - 'end_buttons': 'list[TouchInputButtonsInner]', - 'duration': 'float', - 'required': 'str', - 'key_duration': 'float' - } - - attribute_map = { - 'position': 'position', - 'buttons': 'buttons', - 'normalized': 'normalized', - 'wait': 'wait', - 'start': 'start', - 'end': 'end', - 'bezier_points': 'bezierPoints', - 'start_buttons': 'startButtons', - 'end_buttons': 'endButtons', - 'duration': 'duration', - 'required': 'required', - 'key_duration': 'keyDuration' - } - - def __init__(self, position=None, buttons=None, normalized=None, wait=None, start=None, end=None, bezier_points=None, start_buttons=None, end_buttons=None, duration=None, required=None, key_duration=None, local_vars_configuration=None): # noqa: E501 - """InstanceInput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._position = None - self._buttons = None - self._normalized = None - self._wait = None - self._start = None - self._end = None - self._bezier_points = None - self._start_buttons = None - self._end_buttons = None - self._duration = None - self._required = None - self._key_duration = None - self.discriminator = None - - self.position = position - self.buttons = buttons - self.normalized = normalized - self.wait = wait - self.start = start - self.end = end - self.bezier_points = bezier_points - self.start_buttons = start_buttons - self.end_buttons = end_buttons - self.duration = duration - self.required = required - self.key_duration = key_duration - - @property - def position(self): - """Gets the position of this InstanceInput. # noqa: E501 - - Finger Positions # noqa: E501 - - :return: The position of this InstanceInput. # noqa: E501 - :rtype: object - """ - return self._position - - @position.setter - def position(self, position): - """Sets the position of this InstanceInput. - - Finger Positions # noqa: E501 - - :param position: The position of this InstanceInput. # noqa: E501 - :type position: object - """ - if self.local_vars_configuration.client_side_validation and position is None: # noqa: E501 - raise ValueError("Invalid value for `position`, must not be `None`") # noqa: E501 - - self._position = position - - @property - def buttons(self): - """Gets the buttons of this InstanceInput. # noqa: E501 - - Buttons to be held when this position is reached. Either a Button enum object or an ASCII character. No change if not defined. # noqa: E501 - - :return: The buttons of this InstanceInput. # noqa: E501 - :rtype: list[TouchInputButtonsInner] - """ - return self._buttons - - @buttons.setter - def buttons(self, buttons): - """Sets the buttons of this InstanceInput. - - Buttons to be held when this position is reached. Either a Button enum object or an ASCII character. No change if not defined. # noqa: E501 - - :param buttons: The buttons of this InstanceInput. # noqa: E501 - :type buttons: list[TouchInputButtonsInner] - """ - - self._buttons = buttons - - @property - def normalized(self): - """Gets the normalized of this InstanceInput. # noqa: E501 - - true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) # noqa: E501 - - :return: The normalized of this InstanceInput. # noqa: E501 - :rtype: bool - """ - return self._normalized - - @normalized.setter - def normalized(self, normalized): - """Sets the normalized of this InstanceInput. - - true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) # noqa: E501 - - :param normalized: The normalized of this InstanceInput. # noqa: E501 - :type normalized: bool - """ - - self._normalized = normalized - - @property - def wait(self): - """Gets the wait of this InstanceInput. # noqa: E501 - - Duration to wait before this input is executed. Instant if not defined. # noqa: E501 - - :return: The wait of this InstanceInput. # noqa: E501 - :rtype: float - """ - return self._wait - - @wait.setter - def wait(self, wait): - """Sets the wait of this InstanceInput. - - Duration to wait before this input is executed. Instant if not defined. # noqa: E501 - - :param wait: The wait of this InstanceInput. # noqa: E501 - :type wait: float - """ - - self._wait = wait - - @property - def start(self): - """Gets the start of this InstanceInput. # noqa: E501 - - Finger Positions # noqa: E501 - - :return: The start of this InstanceInput. # noqa: E501 - :rtype: object - """ - return self._start - - @start.setter - def start(self, start): - """Sets the start of this InstanceInput. - - Finger Positions # noqa: E501 - - :param start: The start of this InstanceInput. # noqa: E501 - :type start: object - """ - if self.local_vars_configuration.client_side_validation and start is None: # noqa: E501 - raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 - - self._start = start - - @property - def end(self): - """Gets the end of this InstanceInput. # noqa: E501 - - Finger Positions # noqa: E501 - - :return: The end of this InstanceInput. # noqa: E501 - :rtype: object - """ - return self._end - - @end.setter - def end(self, end): - """Sets the end of this InstanceInput. - - Finger Positions # noqa: E501 - - :param end: The end of this InstanceInput. # noqa: E501 - :type end: object - """ - if self.local_vars_configuration.client_side_validation and end is None: # noqa: E501 - raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 - - self._end = end - - @property - def bezier_points(self): - """Gets the bezier_points of this InstanceInput. # noqa: E501 - - array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined. # noqa: E501 - - :return: The bezier_points of this InstanceInput. # noqa: E501 - :rtype: list[object] - """ - return self._bezier_points - - @bezier_points.setter - def bezier_points(self, bezier_points): - """Sets the bezier_points of this InstanceInput. - - array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined. # noqa: E501 - - :param bezier_points: The bezier_points of this InstanceInput. # noqa: E501 - :type bezier_points: list[object] - """ - - self._bezier_points = bezier_points - - @property - def start_buttons(self): - """Gets the start_buttons of this InstanceInput. # noqa: E501 - - Buttons to be held during this curve. # noqa: E501 - - :return: The start_buttons of this InstanceInput. # noqa: E501 - :rtype: list[TouchInputButtonsInner] - """ - return self._start_buttons - - @start_buttons.setter - def start_buttons(self, start_buttons): - """Sets the start_buttons of this InstanceInput. - - Buttons to be held during this curve. # noqa: E501 - - :param start_buttons: The start_buttons of this InstanceInput. # noqa: E501 - :type start_buttons: list[TouchInputButtonsInner] - """ - if self.local_vars_configuration.client_side_validation and start_buttons is None: # noqa: E501 - raise ValueError("Invalid value for `start_buttons`, must not be `None`") # noqa: E501 - - self._start_buttons = start_buttons - - @property - def end_buttons(self): - """Gets the end_buttons of this InstanceInput. # noqa: E501 - - Buttons to be left held after this curve. Same as startButtons if not defined. # noqa: E501 - - :return: The end_buttons of this InstanceInput. # noqa: E501 - :rtype: list[TouchInputButtonsInner] - """ - return self._end_buttons - - @end_buttons.setter - def end_buttons(self, end_buttons): - """Sets the end_buttons of this InstanceInput. - - Buttons to be left held after this curve. Same as startButtons if not defined. # noqa: E501 - - :param end_buttons: The end_buttons of this InstanceInput. # noqa: E501 - :type end_buttons: list[TouchInputButtonsInner] - """ - - self._end_buttons = end_buttons - - @property - def duration(self): - """Gets the duration of this InstanceInput. # noqa: E501 - - Duration to execute this curve over. # noqa: E501 - - :return: The duration of this InstanceInput. # noqa: E501 - :rtype: float - """ - return self._duration - - @duration.setter - def duration(self, duration): - """Sets the duration of this InstanceInput. - - Duration to execute this curve over. # noqa: E501 - - :param duration: The duration of this InstanceInput. # noqa: E501 - :type duration: float - """ - if self.local_vars_configuration.client_side_validation and duration is None: # noqa: E501 - raise ValueError("Invalid value for `duration`, must not be `None`") # noqa: E501 - - self._duration = duration - - @property - def required(self): - """Gets the required of this InstanceInput. # noqa: E501 - - text to type # noqa: E501 - - :return: The required of this InstanceInput. # noqa: E501 - :rtype: str - """ - return self._required - - @required.setter - def required(self, required): - """Sets the required of this InstanceInput. - - text to type # noqa: E501 - - :param required: The required of this InstanceInput. # noqa: E501 - :type required: str - """ - if self.local_vars_configuration.client_side_validation and required is None: # noqa: E501 - raise ValueError("Invalid value for `required`, must not be `None`") # noqa: E501 - - self._required = required - - @property - def key_duration(self): - """Gets the key_duration of this InstanceInput. # noqa: E501 - - How long to take to type each key. 150ms if not defined. # noqa: E501 - - :return: The key_duration of this InstanceInput. # noqa: E501 - :rtype: float - """ - return self._key_duration - - @key_duration.setter - def key_duration(self, key_duration): - """Sets the key_duration of this InstanceInput. - - How long to take to type each key. 150ms if not defined. # noqa: E501 - - :param key_duration: The key_duration of this InstanceInput. # noqa: E501 - :type key_duration: float - """ - - self._key_duration = key_duration - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceInput): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceInput): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_interface.py b/corellium_api/models/instance_interface.py deleted file mode 100644 index cd99e87..0000000 --- a/corellium_api/models/instance_interface.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceInterface(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'device_id': 'str', - 'interface_id': 'str' - } - - attribute_map = { - 'device_id': 'deviceId', - 'interface_id': 'interfaceId' - } - - def __init__(self, device_id=None, interface_id=None, local_vars_configuration=None): # noqa: E501 - """InstanceInterface - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._device_id = None - self._interface_id = None - self.discriminator = None - - self.device_id = device_id - self.interface_id = interface_id - - @property - def device_id(self): - """Gets the device_id of this InstanceInterface. # noqa: E501 - - The instance id # noqa: E501 - - :return: The device_id of this InstanceInterface. # noqa: E501 - :rtype: str - """ - return self._device_id - - @device_id.setter - def device_id(self, device_id): - """Sets the device_id of this InstanceInterface. - - The instance id # noqa: E501 - - :param device_id: The device_id of this InstanceInterface. # noqa: E501 - :type device_id: str - """ - - self._device_id = device_id - - @property - def interface_id(self): - """Gets the interface_id of this InstanceInterface. # noqa: E501 - - The interface id # noqa: E501 - - :return: The interface_id of this InstanceInterface. # noqa: E501 - :rtype: str - """ - return self._interface_id - - @interface_id.setter - def interface_id(self, interface_id): - """Sets the interface_id of this InstanceInterface. - - The interface id # noqa: E501 - - :param interface_id: The interface_id of this InstanceInterface. # noqa: E501 - :type interface_id: str - """ - - self._interface_id = interface_id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceInterface): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceInterface): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_netdump_state.py b/corellium_api/models/instance_netdump_state.py deleted file mode 100644 index f8df951..0000000 --- a/corellium_api/models/instance_netdump_state.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceNetdumpState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'hash': 'str', - 'info': 'str', - 'enabled': 'bool' - } - - attribute_map = { - 'hash': 'hash', - 'info': 'info', - 'enabled': 'enabled' - } - - def __init__(self, hash=None, info=None, enabled=None, local_vars_configuration=None): # noqa: E501 - """InstanceNetdumpState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._hash = None - self._info = None - self._enabled = None - self.discriminator = None - - self.hash = hash - self.info = info - self.enabled = enabled - - @property - def hash(self): - """Gets the hash of this InstanceNetdumpState. # noqa: E501 - - # noqa: E501 - - :return: The hash of this InstanceNetdumpState. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this InstanceNetdumpState. - - # noqa: E501 - - :param hash: The hash of this InstanceNetdumpState. # noqa: E501 - :type hash: str - """ - - self._hash = hash - - @property - def info(self): - """Gets the info of this InstanceNetdumpState. # noqa: E501 - - # noqa: E501 - - :return: The info of this InstanceNetdumpState. # noqa: E501 - :rtype: str - """ - return self._info - - @info.setter - def info(self, info): - """Sets the info of this InstanceNetdumpState. - - # noqa: E501 - - :param info: The info of this InstanceNetdumpState. # noqa: E501 - :type info: str - """ - - self._info = info - - @property - def enabled(self): - """Gets the enabled of this InstanceNetdumpState. # noqa: E501 - - # noqa: E501 - - :return: The enabled of this InstanceNetdumpState. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this InstanceNetdumpState. - - # noqa: E501 - - :param enabled: The enabled of this InstanceNetdumpState. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceNetdumpState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceNetdumpState): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_netmon_proc_map_state.py b/corellium_api/models/instance_netmon_proc_map_state.py deleted file mode 100644 index f387375..0000000 --- a/corellium_api/models/instance_netmon_proc_map_state.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 4.5.0-16740 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceNetmonProcMapState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'hash': 'str', - 'info': 'str', - 'enabled': 'bool' - } - - attribute_map = { - 'hash': 'hash', - 'info': 'info', - 'enabled': 'enabled' - } - - def __init__(self, hash=None, info=None, enabled=None, local_vars_configuration=None): # noqa: E501 - """InstanceNetmonProcMapState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._hash = None - self._info = None - self._enabled = None - self.discriminator = None - - self.hash = hash - self.info = info - self.enabled = enabled - - @property - def hash(self): - """Gets the hash of this InstanceNetmonProcMapState. # noqa: E501 - - # noqa: E501 - - :return: The hash of this InstanceNetmonProcMapState. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this InstanceNetmonProcMapState. - - # noqa: E501 - - :param hash: The hash of this InstanceNetmonProcMapState. # noqa: E501 - :type hash: str - """ - - self._hash = hash - - @property - def info(self): - """Gets the info of this InstanceNetmonProcMapState. # noqa: E501 - - # noqa: E501 - - :return: The info of this InstanceNetmonProcMapState. # noqa: E501 - :rtype: str - """ - return self._info - - @info.setter - def info(self, info): - """Sets the info of this InstanceNetmonProcMapState. - - # noqa: E501 - - :param info: The info of this InstanceNetmonProcMapState. # noqa: E501 - :type info: str - """ - - self._info = info - - @property - def enabled(self): - """Gets the enabled of this InstanceNetmonProcMapState. # noqa: E501 - - # noqa: E501 - - :return: The enabled of this InstanceNetmonProcMapState. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this InstanceNetmonProcMapState. - - # noqa: E501 - - :param enabled: The enabled of this InstanceNetmonProcMapState. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceNetmonProcMapState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceNetmonProcMapState): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_netmon_state.py b/corellium_api/models/instance_netmon_state.py deleted file mode 100644 index 155e053..0000000 --- a/corellium_api/models/instance_netmon_state.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceNetmonState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'hash': 'str', - 'info': 'str', - 'enabled': 'bool' - } - - attribute_map = { - 'hash': 'hash', - 'info': 'info', - 'enabled': 'enabled' - } - - def __init__(self, hash=None, info=None, enabled=None, local_vars_configuration=None): # noqa: E501 - """InstanceNetmonState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._hash = None - self._info = None - self._enabled = None - self.discriminator = None - - self.hash = hash - self.info = info - self.enabled = enabled - - @property - def hash(self): - """Gets the hash of this InstanceNetmonState. # noqa: E501 - - # noqa: E501 - - :return: The hash of this InstanceNetmonState. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this InstanceNetmonState. - - # noqa: E501 - - :param hash: The hash of this InstanceNetmonState. # noqa: E501 - :type hash: str - """ - - self._hash = hash - - @property - def info(self): - """Gets the info of this InstanceNetmonState. # noqa: E501 - - # noqa: E501 - - :return: The info of this InstanceNetmonState. # noqa: E501 - :rtype: str - """ - return self._info - - @info.setter - def info(self, info): - """Sets the info of this InstanceNetmonState. - - # noqa: E501 - - :param info: The info of this InstanceNetmonState. # noqa: E501 - :type info: str - """ - - self._info = info - - @property - def enabled(self): - """Gets the enabled of this InstanceNetmonState. # noqa: E501 - - # noqa: E501 - - :return: The enabled of this InstanceNetmonState. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this InstanceNetmonState. - - # noqa: E501 - - :param enabled: The enabled of this InstanceNetmonState. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceNetmonState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceNetmonState): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_return.py b/corellium_api/models/instance_return.py deleted file mode 100644 index 7d73e22..0000000 --- a/corellium_api/models/instance_return.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceReturn(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'state': 'InstanceState' - } - - attribute_map = { - 'id': 'id', - 'state': 'state' - } - - def __init__(self, id=None, state=None, local_vars_configuration=None): # noqa: E501 - """InstanceReturn - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._state = None - self.discriminator = None - - self.id = id - self.state = state - - @property - def id(self): - """Gets the id of this InstanceReturn. # noqa: E501 - - Instance ID # noqa: E501 - - :return: The id of this InstanceReturn. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this InstanceReturn. - - Instance ID # noqa: E501 - - :param id: The id of this InstanceReturn. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def state(self): - """Gets the state of this InstanceReturn. # noqa: E501 - - - :return: The state of this InstanceReturn. # noqa: E501 - :rtype: InstanceState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this InstanceReturn. - - - :param state: The state of this InstanceReturn. # noqa: E501 - :type state: InstanceState - """ - if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501 - raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 - - self._state = state - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceReturn): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceReturn): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_services.py b/corellium_api/models/instance_services.py deleted file mode 100644 index 37a5d8f..0000000 --- a/corellium_api/models/instance_services.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceServices(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'vpn': 'VpnDefinition' - } - - attribute_map = { - 'vpn': 'vpn' - } - - def __init__(self, vpn=None, local_vars_configuration=None): # noqa: E501 - """InstanceServices - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._vpn = None - self.discriminator = None - - if vpn is not None: - self.vpn = vpn - - @property - def vpn(self): - """Gets the vpn of this InstanceServices. # noqa: E501 - - - :return: The vpn of this InstanceServices. # noqa: E501 - :rtype: VpnDefinition - """ - return self._vpn - - @vpn.setter - def vpn(self, vpn): - """Sets the vpn of this InstanceServices. - - - :param vpn: The vpn of this InstanceServices. # noqa: E501 - :type vpn: VpnDefinition - """ - - self._vpn = vpn - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceServices): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceServices): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_start_options.py b/corellium_api/models/instance_start_options.py deleted file mode 100644 index 8e90cb3..0000000 --- a/corellium_api/models/instance_start_options.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceStartOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'paused': 'bool', - 'sockcap': 'bool' - } - - attribute_map = { - 'paused': 'paused', - 'sockcap': 'sockcap' - } - - def __init__(self, paused=None, sockcap=None, local_vars_configuration=None): # noqa: E501 - """InstanceStartOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._paused = None - self._sockcap = None - self.discriminator = None - - self.paused = paused - self.sockcap = sockcap - - @property - def paused(self): - """Gets the paused of this InstanceStartOptions. # noqa: E501 - - Start device paused # noqa: E501 - - :return: The paused of this InstanceStartOptions. # noqa: E501 - :rtype: bool - """ - return self._paused - - @paused.setter - def paused(self, paused): - """Sets the paused of this InstanceStartOptions. - - Start device paused # noqa: E501 - - :param paused: The paused of this InstanceStartOptions. # noqa: E501 - :type paused: bool - """ - - self._paused = paused - - @property - def sockcap(self): - """Gets the sockcap of this InstanceStartOptions. # noqa: E501 - - Start device with Process Network Monitoring enabled # noqa: E501 - - :return: The sockcap of this InstanceStartOptions. # noqa: E501 - :rtype: bool - """ - return self._sockcap - - @sockcap.setter - def sockcap(self, sockcap): - """Sets the sockcap of this InstanceStartOptions. - - Start device with Process Network Monitoring enabled # noqa: E501 - - :param sockcap: The sockcap of this InstanceStartOptions. # noqa: E501 - :type sockcap: bool - """ - - self._sockcap = sockcap - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceStartOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceStartOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_state.py b/corellium_api/models/instance_state.py deleted file mode 100644 index c69288f..0000000 --- a/corellium_api/models/instance_state.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ON = "on" - OFF = "off" - BOOTING = "booting" - DELETING = "deleting" - CREATING = "creating" - RESTORING = "restoring" - PAUSED = "paused" - REBOOTING = "rebooting" - ERROR = "error" - - allowable_values = [ON, OFF, BOOTING, DELETING, CREATING, RESTORING, PAUSED, REBOOTING, ERROR] # noqa: E501 - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """InstanceState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceState): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_stop_options.py b/corellium_api/models/instance_stop_options.py deleted file mode 100644 index c83cc0a..0000000 --- a/corellium_api/models/instance_stop_options.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceStopOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'soft': 'bool' - } - - attribute_map = { - 'soft': 'soft' - } - - def __init__(self, soft=None, local_vars_configuration=None): # noqa: E501 - """InstanceStopOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._soft = None - self.discriminator = None - - self.soft = soft - - @property - def soft(self): - """Gets the soft of this InstanceStopOptions. # noqa: E501 - - Request VM OS power down # noqa: E501 - - :return: The soft of this InstanceStopOptions. # noqa: E501 - :rtype: bool - """ - return self._soft - - @soft.setter - def soft(self, soft): - """Sets the soft of this InstanceStopOptions. - - Request VM OS power down # noqa: E501 - - :param soft: The soft of this InstanceStopOptions. # noqa: E501 - :type soft: bool - """ - - self._soft = soft - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceStopOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceStopOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/instance_upgrade_body.py b/corellium_api/models/instance_upgrade_body.py deleted file mode 100644 index 992a364..0000000 --- a/corellium_api/models/instance_upgrade_body.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InstanceUpgradeBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'os': 'str', - 'osbuild': 'str' - } - - attribute_map = { - 'os': 'os', - 'osbuild': 'osbuild' - } - - def __init__(self, os=None, osbuild=None, local_vars_configuration=None): # noqa: E501 - """InstanceUpgradeBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._os = None - self._osbuild = None - self.discriminator = None - - self.os = os - self.osbuild = osbuild - - @property - def os(self): - """Gets the os of this InstanceUpgradeBody. # noqa: E501 - - iOS version # noqa: E501 - - :return: The os of this InstanceUpgradeBody. # noqa: E501 - :rtype: str - """ - return self._os - - @os.setter - def os(self, os): - """Sets the os of this InstanceUpgradeBody. - - iOS version # noqa: E501 - - :param os: The os of this InstanceUpgradeBody. # noqa: E501 - :type os: str - """ - if self.local_vars_configuration.client_side_validation and os is None: # noqa: E501 - raise ValueError("Invalid value for `os`, must not be `None`") # noqa: E501 - - self._os = os - - @property - def osbuild(self): - """Gets the osbuild of this InstanceUpgradeBody. # noqa: E501 - - (optional) iOS build ID # noqa: E501 - - :return: The osbuild of this InstanceUpgradeBody. # noqa: E501 - :rtype: str - """ - return self._osbuild - - @osbuild.setter - def osbuild(self, osbuild): - """Sets the osbuild of this InstanceUpgradeBody. - - (optional) iOS build ID # noqa: E501 - - :param osbuild: The osbuild of this InstanceUpgradeBody. # noqa: E501 - :type osbuild: str - """ - - self._osbuild = osbuild - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InstanceUpgradeBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InstanceUpgradeBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/interconnect_response.py b/corellium_api/models/interconnect_response.py deleted file mode 100644 index 705c5e6..0000000 --- a/corellium_api/models/interconnect_response.py +++ /dev/null @@ -1,354 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InterconnectResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'protocol': 'str', - 'type': 'str', - 'project': 'str', - 'status': 'str', - 'interfaces': 'list[InstanceInterface]', - 'created_at': 'str', - 'updated_at': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'protocol': 'protocol', - 'type': 'type', - 'project': 'project', - 'status': 'status', - 'interfaces': 'interfaces', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, id=None, name=None, protocol=None, type=None, project=None, status=None, interfaces=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """InterconnectResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._protocol = None - self._type = None - self._project = None - self._status = None - self._interfaces = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - self.id = id - self.name = name - self.protocol = protocol - self.type = type - self.project = project - self.status = status - self.interfaces = interfaces - self.created_at = created_at - self.updated_at = updated_at - - @property - def id(self): - """Gets the id of this InterconnectResponse. # noqa: E501 - - The interconnect identifier # noqa: E501 - - :return: The id of this InterconnectResponse. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this InterconnectResponse. - - The interconnect identifier # noqa: E501 - - :param id: The id of this InterconnectResponse. # noqa: E501 - :type id: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this InterconnectResponse. # noqa: E501 - - The name of the interconnect # noqa: E501 - - :return: The name of this InterconnectResponse. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this InterconnectResponse. - - The name of the interconnect # noqa: E501 - - :param name: The name of this InterconnectResponse. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def protocol(self): - """Gets the protocol of this InterconnectResponse. # noqa: E501 - - The protocol used by the interconnect # noqa: E501 - - :return: The protocol of this InterconnectResponse. # noqa: E501 - :rtype: str - """ - return self._protocol - - @protocol.setter - def protocol(self, protocol): - """Sets the protocol of this InterconnectResponse. - - The protocol used by the interconnect # noqa: E501 - - :param protocol: The protocol of this InterconnectResponse. # noqa: E501 - :type protocol: str - """ - - self._protocol = protocol - - @property - def type(self): - """Gets the type of this InterconnectResponse. # noqa: E501 - - The type of interconnect # noqa: E501 - - :return: The type of this InterconnectResponse. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this InterconnectResponse. - - The type of interconnect # noqa: E501 - - :param type: The type of this InterconnectResponse. # noqa: E501 - :type type: str - """ - allowed_values = [None,"hub", "switch"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def project(self): - """Gets the project of this InterconnectResponse. # noqa: E501 - - The UUID of the project # noqa: E501 - - :return: The project of this InterconnectResponse. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this InterconnectResponse. - - The UUID of the project # noqa: E501 - - :param project: The project of this InterconnectResponse. # noqa: E501 - :type project: str - """ - - self._project = project - - @property - def status(self): - """Gets the status of this InterconnectResponse. # noqa: E501 - - The current status of the interconnect # noqa: E501 - - :return: The status of this InterconnectResponse. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this InterconnectResponse. - - The current status of the interconnect # noqa: E501 - - :param status: The status of this InterconnectResponse. # noqa: E501 - :type status: str - """ - - self._status = status - - @property - def interfaces(self): - """Gets the interfaces of this InterconnectResponse. # noqa: E501 - - Array of instance interfaces # noqa: E501 - - :return: The interfaces of this InterconnectResponse. # noqa: E501 - :rtype: list[InstanceInterface] - """ - return self._interfaces - - @interfaces.setter - def interfaces(self, interfaces): - """Sets the interfaces of this InterconnectResponse. - - Array of instance interfaces # noqa: E501 - - :param interfaces: The interfaces of this InterconnectResponse. # noqa: E501 - :type interfaces: list[InstanceInterface] - """ - - self._interfaces = interfaces - - @property - def created_at(self): - """Gets the created_at of this InterconnectResponse. # noqa: E501 - - Creation timestamp # noqa: E501 - - :return: The created_at of this InterconnectResponse. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this InterconnectResponse. - - Creation timestamp # noqa: E501 - - :param created_at: The created_at of this InterconnectResponse. # noqa: E501 - :type created_at: str - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this InterconnectResponse. # noqa: E501 - - Last update timestamp # noqa: E501 - - :return: The updated_at of this InterconnectResponse. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this InterconnectResponse. - - Last update timestamp # noqa: E501 - - :param updated_at: The updated_at of this InterconnectResponse. # noqa: E501 - :type updated_at: str - """ - - self._updated_at = updated_at - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InterconnectResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InterconnectResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/invitation.py b/corellium_api/models/invitation.py deleted file mode 100644 index f29946f..0000000 --- a/corellium_api/models/invitation.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Invitation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'email': 'str', - 'settings': 'object' - } - - attribute_map = { - 'identifier': 'identifier', - 'email': 'email', - 'settings': 'settings' - } - - def __init__(self, identifier=None, email=None, settings=None, local_vars_configuration=None): # noqa: E501 - """Invitation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._email = None - self._settings = None - self.discriminator = None - - self.identifier = identifier - self.email = email - self.settings = settings - - @property - def identifier(self): - """Gets the identifier of this Invitation. # noqa: E501 - - Invite ID # noqa: E501 - - :return: The identifier of this Invitation. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this Invitation. - - Invite ID # noqa: E501 - - :param identifier: The identifier of this Invitation. # noqa: E501 - :type identifier: str - """ - - self._identifier = identifier - - @property - def email(self): - """Gets the email of this Invitation. # noqa: E501 - - Invited email # noqa: E501 - - :return: The email of this Invitation. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Invitation. - - Invited email # noqa: E501 - - :param email: The email of this Invitation. # noqa: E501 - :type email: str - """ - - self._email = email - - @property - def settings(self): - """Gets the settings of this Invitation. # noqa: E501 - - # noqa: E501 - - :return: The settings of this Invitation. # noqa: E501 - :rtype: object - """ - return self._settings - - @settings.setter - def settings(self, settings): - """Sets the settings of this Invitation. - - # noqa: E501 - - :param settings: The settings of this Invitation. # noqa: E501 - :type settings: object - """ - - self._settings = settings - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Invitation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Invitation): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/invite_revoke_params.py b/corellium_api/models/invite_revoke_params.py deleted file mode 100644 index bb07663..0000000 --- a/corellium_api/models/invite_revoke_params.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InviteRevokeParams(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'ids': 'InviteRevokeParamsIds' - } - - attribute_map = { - 'ids': 'ids' - } - - def __init__(self, ids=None, local_vars_configuration=None): # noqa: E501 - """InviteRevokeParams - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._ids = None - self.discriminator = None - - self.ids = ids - - @property - def ids(self): - """Gets the ids of this InviteRevokeParams. # noqa: E501 - - - :return: The ids of this InviteRevokeParams. # noqa: E501 - :rtype: InviteRevokeParamsIds - """ - return self._ids - - @ids.setter - def ids(self, ids): - """Sets the ids of this InviteRevokeParams. - - - :param ids: The ids of this InviteRevokeParams. # noqa: E501 - :type ids: InviteRevokeParamsIds - """ - - self._ids = ids - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InviteRevokeParams): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InviteRevokeParams): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/invite_revoke_params_ids.py b/corellium_api/models/invite_revoke_params_ids.py deleted file mode 100644 index 3c07cd6..0000000 --- a/corellium_api/models/invite_revoke_params_ids.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class InviteRevokeParamsIds(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """InviteRevokeParamsIds - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InviteRevokeParamsIds): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, InviteRevokeParamsIds): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/kcrange.py b/corellium_api/models/kcrange.py deleted file mode 100644 index 01ed75a..0000000 --- a/corellium_api/models/kcrange.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Kcrange(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kext': 'str', - 'range': 'list[str]' - } - - attribute_map = { - 'kext': 'kext', - 'range': 'range' - } - - def __init__(self, kext=None, range=None, local_vars_configuration=None): # noqa: E501 - """Kcrange - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._kext = None - self._range = None - self.discriminator = None - - self.kext = kext - self.range = range - - @property - def kext(self): - """Gets the kext of this Kcrange. # noqa: E501 - - Kernel Extension # noqa: E501 - - :return: The kext of this Kcrange. # noqa: E501 - :rtype: str - """ - return self._kext - - @kext.setter - def kext(self, kext): - """Sets the kext of this Kcrange. - - Kernel Extension # noqa: E501 - - :param kext: The kext of this Kcrange. # noqa: E501 - :type kext: str - """ - - self._kext = kext - - @property - def range(self): - """Gets the range of this Kcrange. # noqa: E501 - - Range # noqa: E501 - - :return: The range of this Kcrange. # noqa: E501 - :rtype: list[str] - """ - return self._range - - @range.setter - def range(self, range): - """Sets the range of this Kcrange. - - Range # noqa: E501 - - :param range: The range of this Kcrange. # noqa: E501 - :type range: list[str] - """ - - self._range = range - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Kcrange): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Kcrange): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/kernel_task.py b/corellium_api/models/kernel_task.py deleted file mode 100644 index 99b20e3..0000000 --- a/corellium_api/models/kernel_task.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class KernelTask(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kernel_id': 'str', - 'name': 'str', - 'pid': 'float', - 'threads': 'list[KernelThread]' - } - - attribute_map = { - 'kernel_id': 'kernelId', - 'name': 'name', - 'pid': 'pid', - 'threads': 'threads' - } - - def __init__(self, kernel_id=None, name=None, pid=None, threads=None, local_vars_configuration=None): # noqa: E501 - """KernelTask - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._kernel_id = None - self._name = None - self._pid = None - self._threads = None - self.discriminator = None - - self.kernel_id = kernel_id - self.name = name - self.pid = pid - self.threads = threads - - @property - def kernel_id(self): - """Gets the kernel_id of this KernelTask. # noqa: E501 - - Kernel Task ID # noqa: E501 - - :return: The kernel_id of this KernelTask. # noqa: E501 - :rtype: str - """ - return self._kernel_id - - @kernel_id.setter - def kernel_id(self, kernel_id): - """Sets the kernel_id of this KernelTask. - - Kernel Task ID # noqa: E501 - - :param kernel_id: The kernel_id of this KernelTask. # noqa: E501 - :type kernel_id: str - """ - - self._kernel_id = kernel_id - - @property - def name(self): - """Gets the name of this KernelTask. # noqa: E501 - - Thread name # noqa: E501 - - :return: The name of this KernelTask. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this KernelTask. - - Thread name # noqa: E501 - - :param name: The name of this KernelTask. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def pid(self): - """Gets the pid of this KernelTask. # noqa: E501 - - Process ID of task # noqa: E501 - - :return: The pid of this KernelTask. # noqa: E501 - :rtype: float - """ - return self._pid - - @pid.setter - def pid(self, pid): - """Sets the pid of this KernelTask. - - Process ID of task # noqa: E501 - - :param pid: The pid of this KernelTask. # noqa: E501 - :type pid: float - """ - - self._pid = pid - - @property - def threads(self): - """Gets the threads of this KernelTask. # noqa: E501 - - # noqa: E501 - - :return: The threads of this KernelTask. # noqa: E501 - :rtype: list[KernelThread] - """ - return self._threads - - @threads.setter - def threads(self, threads): - """Sets the threads of this KernelTask. - - # noqa: E501 - - :param threads: The threads of this KernelTask. # noqa: E501 - :type threads: list[KernelThread] - """ - - self._threads = threads - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KernelTask): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KernelTask): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/kernel_thread.py b/corellium_api/models/kernel_thread.py deleted file mode 100644 index 5f79bb8..0000000 --- a/corellium_api/models/kernel_thread.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class KernelThread(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kernel_id': 'str', - 'tid': 'float', - 'stack': 'list[str]' - } - - attribute_map = { - 'kernel_id': 'kernelId', - 'tid': 'tid', - 'stack': 'stack' - } - - def __init__(self, kernel_id=None, tid=None, stack=None, local_vars_configuration=None): # noqa: E501 - """KernelThread - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._kernel_id = None - self._tid = None - self._stack = None - self.discriminator = None - - self.kernel_id = kernel_id - self.tid = tid - self.stack = stack - - @property - def kernel_id(self): - """Gets the kernel_id of this KernelThread. # noqa: E501 - - Kernel Thread ID # noqa: E501 - - :return: The kernel_id of this KernelThread. # noqa: E501 - :rtype: str - """ - return self._kernel_id - - @kernel_id.setter - def kernel_id(self, kernel_id): - """Sets the kernel_id of this KernelThread. - - Kernel Thread ID # noqa: E501 - - :param kernel_id: The kernel_id of this KernelThread. # noqa: E501 - :type kernel_id: str - """ - - self._kernel_id = kernel_id - - @property - def tid(self): - """Gets the tid of this KernelThread. # noqa: E501 - - Task ID # noqa: E501 - - :return: The tid of this KernelThread. # noqa: E501 - :rtype: float - """ - return self._tid - - @tid.setter - def tid(self, tid): - """Sets the tid of this KernelThread. - - Task ID # noqa: E501 - - :param tid: The tid of this KernelThread. # noqa: E501 - :type tid: float - """ - - self._tid = tid - - @property - def stack(self): - """Gets the stack of this KernelThread. # noqa: E501 - - Array of stack addresses # noqa: E501 - - :return: The stack of this KernelThread. # noqa: E501 - :rtype: list[str] - """ - return self._stack - - @stack.setter - def stack(self, stack): - """Sets the stack of this KernelThread. - - Array of stack addresses # noqa: E501 - - :param stack: The stack of this KernelThread. # noqa: E501 - :type stack: list[str] - """ - - self._stack = stack - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, KernelThread): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, KernelThread): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/logging.py b/corellium_api/models/logging.py deleted file mode 100644 index 5605411..0000000 --- a/corellium_api/models/logging.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Logging(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'development': 'bool', - 'throw_warnings': 'bool' - } - - attribute_map = { - 'development': 'development', - 'throw_warnings': 'throwWarnings' - } - - def __init__(self, development=None, throw_warnings=None, local_vars_configuration=None): # noqa: E501 - """Logging - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._development = None - self._throw_warnings = None - self.discriminator = None - - self.development = development - self.throw_warnings = throw_warnings - - @property - def development(self): - """Gets the development of this Logging. # noqa: E501 - - Denotes whether it's in development # noqa: E501 - - :return: The development of this Logging. # noqa: E501 - :rtype: bool - """ - return self._development - - @development.setter - def development(self, development): - """Sets the development of this Logging. - - Denotes whether it's in development # noqa: E501 - - :param development: The development of this Logging. # noqa: E501 - :type development: bool - """ - - self._development = development - - @property - def throw_warnings(self): - """Gets the throw_warnings of this Logging. # noqa: E501 - - Denotes whether to throw warnings # noqa: E501 - - :return: The throw_warnings of this Logging. # noqa: E501 - :rtype: bool - """ - return self._throw_warnings - - @throw_warnings.setter - def throw_warnings(self, throw_warnings): - """Sets the throw_warnings of this Logging. - - Denotes whether to throw warnings # noqa: E501 - - :param throw_warnings: The throw_warnings of this Logging. # noqa: E501 - :type throw_warnings: bool - """ - - self._throw_warnings = throw_warnings - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Logging): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Logging): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/maintenance.py b/corellium_api/models/maintenance.py deleted file mode 100644 index ee3a543..0000000 --- a/corellium_api/models/maintenance.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Maintenance(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'message': 'str', - 'header': 'str' - } - - attribute_map = { - 'message': 'message', - 'header': 'header' - } - - def __init__(self, message=None, header=None, local_vars_configuration=None): # noqa: E501 - """Maintenance - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._message = None - self._header = None - self.discriminator = None - - self.message = message - self.header = header - - @property - def message(self): - """Gets the message of this Maintenance. # noqa: E501 - - Maintenance message # noqa: E501 - - :return: The message of this Maintenance. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this Maintenance. - - Maintenance message # noqa: E501 - - :param message: The message of this Maintenance. # noqa: E501 - :type message: str - """ - - self._message = message - - @property - def header(self): - """Gets the header of this Maintenance. # noqa: E501 - - Maintenance header # noqa: E501 - - :return: The header of this Maintenance. # noqa: E501 - :rtype: str - """ - return self._header - - @header.setter - def header(self, header): - """Sets the header of this Maintenance. - - Maintenance header # noqa: E501 - - :param header: The header of this Maintenance. # noqa: E501 - :type header: str - """ - - self._header = header - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Maintenance): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Maintenance): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/media_play_body.py b/corellium_api/models/media_play_body.py deleted file mode 100644 index c96e884..0000000 --- a/corellium_api/models/media_play_body.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class MediaPlayBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'image_id': 'str', - 'url': 'str' - } - - attribute_map = { - 'image_id': 'imageId', - 'url': 'url' - } - - def __init__(self, image_id=None, url=None, local_vars_configuration=None): # noqa: E501 - """MediaPlayBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._image_id = None - self._url = None - self.discriminator = None - - self.image_id = image_id - self.url = url - - @property - def image_id(self): - """Gets the image_id of this MediaPlayBody. # noqa: E501 - - Image ID # noqa: E501 - - :return: The image_id of this MediaPlayBody. # noqa: E501 - :rtype: str - """ - return self._image_id - - @image_id.setter - def image_id(self, image_id): - """Sets the image_id of this MediaPlayBody. - - Image ID # noqa: E501 - - :param image_id: The image_id of this MediaPlayBody. # noqa: E501 - :type image_id: str - """ - - self._image_id = image_id - - @property - def url(self): - """Gets the url of this MediaPlayBody. # noqa: E501 - - URL to a media file # noqa: E501 - - :return: The url of this MediaPlayBody. # noqa: E501 - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this MediaPlayBody. - - URL to a media file # noqa: E501 - - :param url: The url of this MediaPlayBody. # noqa: E501 - :type url: str - """ - - self._url = url - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MediaPlayBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MediaPlayBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/metered_subscription_usage.py b/corellium_api/models/metered_subscription_usage.py deleted file mode 100644 index 27e8bfd..0000000 --- a/corellium_api/models/metered_subscription_usage.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class MeteredSubscriptionUsage(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'burst_rate': 'float', - 'allocated_hours': 'float', - 'plan_billed_amount': 'float', - 'plan_billed_units': 'float', - 'burst_billed_amount': 'float', - 'burst_billed_units': 'float', - 'burst_outstanding_amount': 'float', - 'burst_outstanding_units': 'float', - 'total_usage_amount': 'float', - 'total_used_units': 'float' - } - - attribute_map = { - 'burst_rate': 'burst_rate', - 'allocated_hours': 'allocated_hours', - 'plan_billed_amount': 'plan_billed_amount', - 'plan_billed_units': 'plan_billed_units', - 'burst_billed_amount': 'burst_billed_amount', - 'burst_billed_units': 'burst_billed_units', - 'burst_outstanding_amount': 'burst_outstanding_amount', - 'burst_outstanding_units': 'burst_outstanding_units', - 'total_usage_amount': 'total_usage_amount', - 'total_used_units': 'total_used_units' - } - - def __init__(self, burst_rate=None, allocated_hours=None, plan_billed_amount=None, plan_billed_units=None, burst_billed_amount=None, burst_billed_units=None, burst_outstanding_amount=None, burst_outstanding_units=None, total_usage_amount=None, total_used_units=None, local_vars_configuration=None): # noqa: E501 - """MeteredSubscriptionUsage - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._burst_rate = None - self._allocated_hours = None - self._plan_billed_amount = None - self._plan_billed_units = None - self._burst_billed_amount = None - self._burst_billed_units = None - self._burst_outstanding_amount = None - self._burst_outstanding_units = None - self._total_usage_amount = None - self._total_used_units = None - self.discriminator = None - - self.burst_rate = burst_rate - self.allocated_hours = allocated_hours - self.plan_billed_amount = plan_billed_amount - self.plan_billed_units = plan_billed_units - self.burst_billed_amount = burst_billed_amount - self.burst_billed_units = burst_billed_units - self.burst_outstanding_amount = burst_outstanding_amount - self.burst_outstanding_units = burst_outstanding_units - self.total_usage_amount = total_usage_amount - self.total_used_units = total_used_units - - @property - def burst_rate(self): - """Gets the burst_rate of this MeteredSubscriptionUsage. # noqa: E501 - - Unit price # noqa: E501 - - :return: The burst_rate of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._burst_rate - - @burst_rate.setter - def burst_rate(self, burst_rate): - """Sets the burst_rate of this MeteredSubscriptionUsage. - - Unit price # noqa: E501 - - :param burst_rate: The burst_rate of this MeteredSubscriptionUsage. # noqa: E501 - :type burst_rate: float - """ - - self._burst_rate = burst_rate - - @property - def allocated_hours(self): - """Gets the allocated_hours of this MeteredSubscriptionUsage. # noqa: E501 - - Allocated hours # noqa: E501 - - :return: The allocated_hours of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._allocated_hours - - @allocated_hours.setter - def allocated_hours(self, allocated_hours): - """Sets the allocated_hours of this MeteredSubscriptionUsage. - - Allocated hours # noqa: E501 - - :param allocated_hours: The allocated_hours of this MeteredSubscriptionUsage. # noqa: E501 - :type allocated_hours: float - """ - - self._allocated_hours = allocated_hours - - @property - def plan_billed_amount(self): - """Gets the plan_billed_amount of this MeteredSubscriptionUsage. # noqa: E501 - - Plan cost # noqa: E501 - - :return: The plan_billed_amount of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._plan_billed_amount - - @plan_billed_amount.setter - def plan_billed_amount(self, plan_billed_amount): - """Sets the plan_billed_amount of this MeteredSubscriptionUsage. - - Plan cost # noqa: E501 - - :param plan_billed_amount: The plan_billed_amount of this MeteredSubscriptionUsage. # noqa: E501 - :type plan_billed_amount: float - """ - - self._plan_billed_amount = plan_billed_amount - - @property - def plan_billed_units(self): - """Gets the plan_billed_units of this MeteredSubscriptionUsage. # noqa: E501 - - Units included in plan # noqa: E501 - - :return: The plan_billed_units of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._plan_billed_units - - @plan_billed_units.setter - def plan_billed_units(self, plan_billed_units): - """Sets the plan_billed_units of this MeteredSubscriptionUsage. - - Units included in plan # noqa: E501 - - :param plan_billed_units: The plan_billed_units of this MeteredSubscriptionUsage. # noqa: E501 - :type plan_billed_units: float - """ - - self._plan_billed_units = plan_billed_units - - @property - def burst_billed_amount(self): - """Gets the burst_billed_amount of this MeteredSubscriptionUsage. # noqa: E501 - - Amount billed # noqa: E501 - - :return: The burst_billed_amount of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._burst_billed_amount - - @burst_billed_amount.setter - def burst_billed_amount(self, burst_billed_amount): - """Sets the burst_billed_amount of this MeteredSubscriptionUsage. - - Amount billed # noqa: E501 - - :param burst_billed_amount: The burst_billed_amount of this MeteredSubscriptionUsage. # noqa: E501 - :type burst_billed_amount: float - """ - - self._burst_billed_amount = burst_billed_amount - - @property - def burst_billed_units(self): - """Gets the burst_billed_units of this MeteredSubscriptionUsage. # noqa: E501 - - Units billed # noqa: E501 - - :return: The burst_billed_units of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._burst_billed_units - - @burst_billed_units.setter - def burst_billed_units(self, burst_billed_units): - """Sets the burst_billed_units of this MeteredSubscriptionUsage. - - Units billed # noqa: E501 - - :param burst_billed_units: The burst_billed_units of this MeteredSubscriptionUsage. # noqa: E501 - :type burst_billed_units: float - """ - - self._burst_billed_units = burst_billed_units - - @property - def burst_outstanding_amount(self): - """Gets the burst_outstanding_amount of this MeteredSubscriptionUsage. # noqa: E501 - - Outstanding amount # noqa: E501 - - :return: The burst_outstanding_amount of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._burst_outstanding_amount - - @burst_outstanding_amount.setter - def burst_outstanding_amount(self, burst_outstanding_amount): - """Sets the burst_outstanding_amount of this MeteredSubscriptionUsage. - - Outstanding amount # noqa: E501 - - :param burst_outstanding_amount: The burst_outstanding_amount of this MeteredSubscriptionUsage. # noqa: E501 - :type burst_outstanding_amount: float - """ - - self._burst_outstanding_amount = burst_outstanding_amount - - @property - def burst_outstanding_units(self): - """Gets the burst_outstanding_units of this MeteredSubscriptionUsage. # noqa: E501 - - Outstanding units # noqa: E501 - - :return: The burst_outstanding_units of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._burst_outstanding_units - - @burst_outstanding_units.setter - def burst_outstanding_units(self, burst_outstanding_units): - """Sets the burst_outstanding_units of this MeteredSubscriptionUsage. - - Outstanding units # noqa: E501 - - :param burst_outstanding_units: The burst_outstanding_units of this MeteredSubscriptionUsage. # noqa: E501 - :type burst_outstanding_units: float - """ - - self._burst_outstanding_units = burst_outstanding_units - - @property - def total_usage_amount(self): - """Gets the total_usage_amount of this MeteredSubscriptionUsage. # noqa: E501 - - Total cost in cents for current period # noqa: E501 - - :return: The total_usage_amount of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._total_usage_amount - - @total_usage_amount.setter - def total_usage_amount(self, total_usage_amount): - """Sets the total_usage_amount of this MeteredSubscriptionUsage. - - Total cost in cents for current period # noqa: E501 - - :param total_usage_amount: The total_usage_amount of this MeteredSubscriptionUsage. # noqa: E501 - :type total_usage_amount: float - """ - - self._total_usage_amount = total_usage_amount - - @property - def total_used_units(self): - """Gets the total_used_units of this MeteredSubscriptionUsage. # noqa: E501 - - Total used units for current period # noqa: E501 - - :return: The total_used_units of this MeteredSubscriptionUsage. # noqa: E501 - :rtype: float - """ - return self._total_used_units - - @total_used_units.setter - def total_used_units(self, total_used_units): - """Sets the total_used_units of this MeteredSubscriptionUsage. - - Total used units for current period # noqa: E501 - - :param total_used_units: The total_used_units of this MeteredSubscriptionUsage. # noqa: E501 - :type total_used_units: float - """ - - self._total_used_units = total_used_units - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MeteredSubscriptionUsage): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, MeteredSubscriptionUsage): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/model.py b/corellium_api/models/model.py deleted file mode 100644 index 8e258ab..0000000 --- a/corellium_api/models/model.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Model(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'name': 'str', - 'flavor': 'str', - 'description': 'str', - 'model': 'str', - 'board_config': 'str', - 'platform': 'str', - 'cpid': 'float', - 'bdid': 'float', - 'peripherals': 'bool' - } - - attribute_map = { - 'type': 'type', - 'name': 'name', - 'flavor': 'flavor', - 'description': 'description', - 'model': 'model', - 'board_config': 'boardConfig', - 'platform': 'platform', - 'cpid': 'cpid', - 'bdid': 'bdid', - 'peripherals': 'peripherals' - } - - def __init__(self, type=None, name=None, flavor=None, description=None, model=None, board_config=None, platform=None, cpid=None, bdid=None, peripherals=None, local_vars_configuration=None): # noqa: E501 - """Model - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._name = None - self._flavor = None - self._description = None - self._model = None - self._board_config = None - self._platform = None - self._cpid = None - self._bdid = None - self._peripherals = None - self.discriminator = None - - self.type = type - self.name = name - self.flavor = flavor - self.description = description - self.model = model - self.board_config = board_config - self.platform = platform - self.cpid = cpid - self.bdid = bdid - self.peripherals = peripherals - - @property - def type(self): - """Gets the type of this Model. # noqa: E501 - - # noqa: E501 - - :return: The type of this Model. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Model. - - # noqa: E501 - - :param type: The type of this Model. # noqa: E501 - :type type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - - self._type = type - - @property - def name(self): - """Gets the name of this Model. # noqa: E501 - - # noqa: E501 - - :return: The name of this Model. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Model. - - # noqa: E501 - - :param name: The name of this Model. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def flavor(self): - """Gets the flavor of this Model. # noqa: E501 - - # noqa: E501 - - :return: The flavor of this Model. # noqa: E501 - :rtype: str - """ - return self._flavor - - @flavor.setter - def flavor(self, flavor): - """Sets the flavor of this Model. - - # noqa: E501 - - :param flavor: The flavor of this Model. # noqa: E501 - :type flavor: str - """ - if self.local_vars_configuration.client_side_validation and flavor is None: # noqa: E501 - raise ValueError("Invalid value for `flavor`, must not be `None`") # noqa: E501 - - self._flavor = flavor - - @property - def description(self): - """Gets the description of this Model. # noqa: E501 - - # noqa: E501 - - :return: The description of this Model. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Model. - - # noqa: E501 - - :param description: The description of this Model. # noqa: E501 - :type description: str - """ - - self._description = description - - @property - def model(self): - """Gets the model of this Model. # noqa: E501 - - # noqa: E501 - - :return: The model of this Model. # noqa: E501 - :rtype: str - """ - return self._model - - @model.setter - def model(self, model): - """Sets the model of this Model. - - # noqa: E501 - - :param model: The model of this Model. # noqa: E501 - :type model: str - """ - if self.local_vars_configuration.client_side_validation and model is None: # noqa: E501 - raise ValueError("Invalid value for `model`, must not be `None`") # noqa: E501 - - self._model = model - - @property - def board_config(self): - """Gets the board_config of this Model. # noqa: E501 - - # noqa: E501 - - :return: The board_config of this Model. # noqa: E501 - :rtype: str - """ - return self._board_config - - @board_config.setter - def board_config(self, board_config): - """Sets the board_config of this Model. - - # noqa: E501 - - :param board_config: The board_config of this Model. # noqa: E501 - :type board_config: str - """ - - self._board_config = board_config - - @property - def platform(self): - """Gets the platform of this Model. # noqa: E501 - - # noqa: E501 - - :return: The platform of this Model. # noqa: E501 - :rtype: str - """ - return self._platform - - @platform.setter - def platform(self, platform): - """Sets the platform of this Model. - - # noqa: E501 - - :param platform: The platform of this Model. # noqa: E501 - :type platform: str - """ - - self._platform = platform - - @property - def cpid(self): - """Gets the cpid of this Model. # noqa: E501 - - # noqa: E501 - - :return: The cpid of this Model. # noqa: E501 - :rtype: float - """ - return self._cpid - - @cpid.setter - def cpid(self, cpid): - """Sets the cpid of this Model. - - # noqa: E501 - - :param cpid: The cpid of this Model. # noqa: E501 - :type cpid: float - """ - - self._cpid = cpid - - @property - def bdid(self): - """Gets the bdid of this Model. # noqa: E501 - - # noqa: E501 - - :return: The bdid of this Model. # noqa: E501 - :rtype: float - """ - return self._bdid - - @bdid.setter - def bdid(self, bdid): - """Sets the bdid of this Model. - - # noqa: E501 - - :param bdid: The bdid of this Model. # noqa: E501 - :type bdid: float - """ - - self._bdid = bdid - - @property - def peripherals(self): - """Gets the peripherals of this Model. # noqa: E501 - - # noqa: E501 - - :return: The peripherals of this Model. # noqa: E501 - :rtype: bool - """ - return self._peripherals - - @peripherals.setter - def peripherals(self, peripherals): - """Sets the peripherals of this Model. - - # noqa: E501 - - :param peripherals: The peripherals of this Model. # noqa: E501 - :type peripherals: bool - """ - - self._peripherals = peripherals - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Model): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Model): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/model_software.py b/corellium_api/models/model_software.py deleted file mode 100644 index b898ed7..0000000 --- a/corellium_api/models/model_software.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ModelSoftware(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'board_config': 'str', - 'platform': 'str', - 'cpid': 'float', - 'bdid': 'float', - 'firmwares': 'list[Firmware]' - } - - attribute_map = { - 'name': 'name', - 'board_config': 'boardConfig', - 'platform': 'platform', - 'cpid': 'cpid', - 'bdid': 'bdid', - 'firmwares': 'firmwares' - } - - def __init__(self, name=None, board_config=None, platform=None, cpid=None, bdid=None, firmwares=None, local_vars_configuration=None): # noqa: E501 - """ModelSoftware - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._board_config = None - self._platform = None - self._cpid = None - self._bdid = None - self._firmwares = None - self.discriminator = None - - self.name = name - self.board_config = board_config - self.platform = platform - self.cpid = cpid - self.bdid = bdid - self.firmwares = firmwares - - @property - def name(self): - """Gets the name of this ModelSoftware. # noqa: E501 - - # noqa: E501 - - :return: The name of this ModelSoftware. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ModelSoftware. - - # noqa: E501 - - :param name: The name of this ModelSoftware. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def board_config(self): - """Gets the board_config of this ModelSoftware. # noqa: E501 - - # noqa: E501 - - :return: The board_config of this ModelSoftware. # noqa: E501 - :rtype: str - """ - return self._board_config - - @board_config.setter - def board_config(self, board_config): - """Sets the board_config of this ModelSoftware. - - # noqa: E501 - - :param board_config: The board_config of this ModelSoftware. # noqa: E501 - :type board_config: str - """ - - self._board_config = board_config - - @property - def platform(self): - """Gets the platform of this ModelSoftware. # noqa: E501 - - # noqa: E501 - - :return: The platform of this ModelSoftware. # noqa: E501 - :rtype: str - """ - return self._platform - - @platform.setter - def platform(self, platform): - """Sets the platform of this ModelSoftware. - - # noqa: E501 - - :param platform: The platform of this ModelSoftware. # noqa: E501 - :type platform: str - """ - - self._platform = platform - - @property - def cpid(self): - """Gets the cpid of this ModelSoftware. # noqa: E501 - - # noqa: E501 - - :return: The cpid of this ModelSoftware. # noqa: E501 - :rtype: float - """ - return self._cpid - - @cpid.setter - def cpid(self, cpid): - """Sets the cpid of this ModelSoftware. - - # noqa: E501 - - :param cpid: The cpid of this ModelSoftware. # noqa: E501 - :type cpid: float - """ - - self._cpid = cpid - - @property - def bdid(self): - """Gets the bdid of this ModelSoftware. # noqa: E501 - - # noqa: E501 - - :return: The bdid of this ModelSoftware. # noqa: E501 - :rtype: float - """ - return self._bdid - - @bdid.setter - def bdid(self, bdid): - """Sets the bdid of this ModelSoftware. - - # noqa: E501 - - :param bdid: The bdid of this ModelSoftware. # noqa: E501 - :type bdid: float - """ - - self._bdid = bdid - - @property - def firmwares(self): - """Gets the firmwares of this ModelSoftware. # noqa: E501 - - # noqa: E501 - - :return: The firmwares of this ModelSoftware. # noqa: E501 - :rtype: list[Firmware] - """ - return self._firmwares - - @firmwares.setter - def firmwares(self, firmwares): - """Sets the firmwares of this ModelSoftware. - - # noqa: E501 - - :param firmwares: The firmwares of this ModelSoftware. # noqa: E501 - :type firmwares: list[Firmware] - """ - - self._firmwares = firmwares - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ModelSoftware): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ModelSoftware): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/net_mon_proc_map_filter.py b/corellium_api/models/net_mon_proc_map_filter.py deleted file mode 100644 index 882f513..0000000 --- a/corellium_api/models/net_mon_proc_map_filter.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 4.5.0-16740 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class NetMonProcMapFilter(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'port_ranges': 'list[str]', - 'src_ports': 'list[str]', - 'dst_ports': 'list[str]', - 'ports': 'list[str]', - 'protocols': 'list[str]', - 'processes': 'list[str]' - } - - attribute_map = { - 'port_ranges': 'portRanges', - 'src_ports': 'srcPorts', - 'dst_ports': 'dstPorts', - 'ports': 'ports', - 'protocols': 'protocols', - 'processes': 'processes' - } - - def __init__(self, port_ranges=None, src_ports=None, dst_ports=None, ports=None, protocols=None, processes=None, local_vars_configuration=None): # noqa: E501 - """NetMonProcMapFilter - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._port_ranges = None - self._src_ports = None - self._dst_ports = None - self._ports = None - self._protocols = None - self._processes = None - self.discriminator = None - - self.port_ranges = port_ranges - self.src_ports = src_ports - self.dst_ports = dst_ports - self.ports = ports - self.protocols = protocols - self.processes = processes - - @property - def port_ranges(self): - """Gets the port_ranges of this NetMonProcMapFilter. # noqa: E501 - - # noqa: E501 - - :return: The port_ranges of this NetMonProcMapFilter. # noqa: E501 - :rtype: list[str] - """ - return self._port_ranges - - @port_ranges.setter - def port_ranges(self, port_ranges): - """Sets the port_ranges of this NetMonProcMapFilter. - - # noqa: E501 - - :param port_ranges: The port_ranges of this NetMonProcMapFilter. # noqa: E501 - :type port_ranges: list[str] - """ - - self._port_ranges = port_ranges - - @property - def src_ports(self): - """Gets the src_ports of this NetMonProcMapFilter. # noqa: E501 - - # noqa: E501 - - :return: The src_ports of this NetMonProcMapFilter. # noqa: E501 - :rtype: list[str] - """ - return self._src_ports - - @src_ports.setter - def src_ports(self, src_ports): - """Sets the src_ports of this NetMonProcMapFilter. - - # noqa: E501 - - :param src_ports: The src_ports of this NetMonProcMapFilter. # noqa: E501 - :type src_ports: list[str] - """ - - self._src_ports = src_ports - - @property - def dst_ports(self): - """Gets the dst_ports of this NetMonProcMapFilter. # noqa: E501 - - # noqa: E501 - - :return: The dst_ports of this NetMonProcMapFilter. # noqa: E501 - :rtype: list[str] - """ - return self._dst_ports - - @dst_ports.setter - def dst_ports(self, dst_ports): - """Sets the dst_ports of this NetMonProcMapFilter. - - # noqa: E501 - - :param dst_ports: The dst_ports of this NetMonProcMapFilter. # noqa: E501 - :type dst_ports: list[str] - """ - - self._dst_ports = dst_ports - - @property - def ports(self): - """Gets the ports of this NetMonProcMapFilter. # noqa: E501 - - # noqa: E501 - - :return: The ports of this NetMonProcMapFilter. # noqa: E501 - :rtype: list[str] - """ - return self._ports - - @ports.setter - def ports(self, ports): - """Sets the ports of this NetMonProcMapFilter. - - # noqa: E501 - - :param ports: The ports of this NetMonProcMapFilter. # noqa: E501 - :type ports: list[str] - """ - - self._ports = ports - - @property - def protocols(self): - """Gets the protocols of this NetMonProcMapFilter. # noqa: E501 - - # noqa: E501 - - :return: The protocols of this NetMonProcMapFilter. # noqa: E501 - :rtype: list[str] - """ - return self._protocols - - @protocols.setter - def protocols(self, protocols): - """Sets the protocols of this NetMonProcMapFilter. - - # noqa: E501 - - :param protocols: The protocols of this NetMonProcMapFilter. # noqa: E501 - :type protocols: list[str] - """ - - self._protocols = protocols - - @property - def processes(self): - """Gets the processes of this NetMonProcMapFilter. # noqa: E501 - - # noqa: E501 - - :return: The processes of this NetMonProcMapFilter. # noqa: E501 - :rtype: list[str] - """ - return self._processes - - @processes.setter - def processes(self, processes): - """Sets the processes of this NetMonProcMapFilter. - - # noqa: E501 - - :param processes: The processes of this NetMonProcMapFilter. # noqa: E501 - :type processes: list[str] - """ - - self._processes = processes - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, NetMonProcMapFilter): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, NetMonProcMapFilter): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/netdump_filter.py b/corellium_api/models/netdump_filter.py deleted file mode 100644 index 1cceebc..0000000 --- a/corellium_api/models/netdump_filter.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class NetdumpFilter(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'port_ranges': 'list[str]', - 'src_ports': 'list[str]', - 'dst_ports': 'list[str]', - 'ports': 'list[str]', - 'protocols': 'list[str]', - 'processes': 'list[str]' - } - - attribute_map = { - 'port_ranges': 'portRanges', - 'src_ports': 'srcPorts', - 'dst_ports': 'dstPorts', - 'ports': 'ports', - 'protocols': 'protocols', - 'processes': 'processes' - } - - def __init__(self, port_ranges=None, src_ports=None, dst_ports=None, ports=None, protocols=None, processes=None, local_vars_configuration=None): # noqa: E501 - """NetdumpFilter - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._port_ranges = None - self._src_ports = None - self._dst_ports = None - self._ports = None - self._protocols = None - self._processes = None - self.discriminator = None - - self.port_ranges = port_ranges - self.src_ports = src_ports - self.dst_ports = dst_ports - self.ports = ports - self.protocols = protocols - self.processes = processes - - @property - def port_ranges(self): - """Gets the port_ranges of this NetdumpFilter. # noqa: E501 - - # noqa: E501 - - :return: The port_ranges of this NetdumpFilter. # noqa: E501 - :rtype: list[str] - """ - return self._port_ranges - - @port_ranges.setter - def port_ranges(self, port_ranges): - """Sets the port_ranges of this NetdumpFilter. - - # noqa: E501 - - :param port_ranges: The port_ranges of this NetdumpFilter. # noqa: E501 - :type port_ranges: list[str] - """ - - self._port_ranges = port_ranges - - @property - def src_ports(self): - """Gets the src_ports of this NetdumpFilter. # noqa: E501 - - # noqa: E501 - - :return: The src_ports of this NetdumpFilter. # noqa: E501 - :rtype: list[str] - """ - return self._src_ports - - @src_ports.setter - def src_ports(self, src_ports): - """Sets the src_ports of this NetdumpFilter. - - # noqa: E501 - - :param src_ports: The src_ports of this NetdumpFilter. # noqa: E501 - :type src_ports: list[str] - """ - - self._src_ports = src_ports - - @property - def dst_ports(self): - """Gets the dst_ports of this NetdumpFilter. # noqa: E501 - - # noqa: E501 - - :return: The dst_ports of this NetdumpFilter. # noqa: E501 - :rtype: list[str] - """ - return self._dst_ports - - @dst_ports.setter - def dst_ports(self, dst_ports): - """Sets the dst_ports of this NetdumpFilter. - - # noqa: E501 - - :param dst_ports: The dst_ports of this NetdumpFilter. # noqa: E501 - :type dst_ports: list[str] - """ - - self._dst_ports = dst_ports - - @property - def ports(self): - """Gets the ports of this NetdumpFilter. # noqa: E501 - - # noqa: E501 - - :return: The ports of this NetdumpFilter. # noqa: E501 - :rtype: list[str] - """ - return self._ports - - @ports.setter - def ports(self, ports): - """Sets the ports of this NetdumpFilter. - - # noqa: E501 - - :param ports: The ports of this NetdumpFilter. # noqa: E501 - :type ports: list[str] - """ - - self._ports = ports - - @property - def protocols(self): - """Gets the protocols of this NetdumpFilter. # noqa: E501 - - # noqa: E501 - - :return: The protocols of this NetdumpFilter. # noqa: E501 - :rtype: list[str] - """ - return self._protocols - - @protocols.setter - def protocols(self, protocols): - """Sets the protocols of this NetdumpFilter. - - # noqa: E501 - - :param protocols: The protocols of this NetdumpFilter. # noqa: E501 - :type protocols: list[str] - """ - - self._protocols = protocols - - @property - def processes(self): - """Gets the processes of this NetdumpFilter. # noqa: E501 - - # noqa: E501 - - :return: The processes of this NetdumpFilter. # noqa: E501 - :rtype: list[str] - """ - return self._processes - - @processes.setter - def processes(self, processes): - """Sets the processes of this NetdumpFilter. - - # noqa: E501 - - :param processes: The processes of this NetdumpFilter. # noqa: E501 - :type processes: list[str] - """ - - self._processes = processes - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, NetdumpFilter): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, NetdumpFilter): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/network_connection.py b/corellium_api/models/network_connection.py deleted file mode 100644 index 93ff22d..0000000 --- a/corellium_api/models/network_connection.py +++ /dev/null @@ -1,364 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class NetworkConnection(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'provider': 'str', - 'name': 'str', - 'config': 'object', - 'projects': 'list[ProjectNetworkState]', - 'created_at': 'str', - 'updated_at': 'str', - 'created_by': 'str', - 'updated_by': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'provider': 'provider', - 'name': 'name', - 'config': 'config', - 'projects': 'projects', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'created_by': 'createdBy', - 'updated_by': 'updatedBy' - } - - def __init__(self, identifier=None, provider=None, name=None, config=None, projects=None, created_at=None, updated_at=None, created_by=None, updated_by=None, local_vars_configuration=None): # noqa: E501 - """NetworkConnection - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._provider = None - self._name = None - self._config = None - self._projects = None - self._created_at = None - self._updated_at = None - self._created_by = None - self._updated_by = None - self.discriminator = None - - self.identifier = identifier - self.provider = provider - self.name = name - self.config = config - self.projects = projects - self.created_at = created_at - self.updated_at = updated_at - self.created_by = created_by - self.updated_by = updated_by - - @property - def identifier(self): - """Gets the identifier of this NetworkConnection. # noqa: E501 - - UUIDv4 # noqa: E501 - - :return: The identifier of this NetworkConnection. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this NetworkConnection. - - UUIDv4 # noqa: E501 - - :param identifier: The identifier of this NetworkConnection. # noqa: E501 - :type identifier: str - """ - if self.local_vars_configuration.client_side_validation and identifier is None: # noqa: E501 - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def provider(self): - """Gets the provider of this NetworkConnection. # noqa: E501 - - One of the registered [network provider types](#get-/v1/network/providers) # noqa: E501 - - :return: The provider of this NetworkConnection. # noqa: E501 - :rtype: str - """ - return self._provider - - @provider.setter - def provider(self, provider): - """Sets the provider of this NetworkConnection. - - One of the registered [network provider types](#get-/v1/network/providers) # noqa: E501 - - :param provider: The provider of this NetworkConnection. # noqa: E501 - :type provider: str - """ - if self.local_vars_configuration.client_side_validation and provider is None: # noqa: E501 - raise ValueError("Invalid value for `provider`, must not be `None`") # noqa: E501 - - self._provider = provider - - @property - def name(self): - """Gets the name of this NetworkConnection. # noqa: E501 - - User specified name for this network connection. e.g., \"My Network Connection\" # noqa: E501 - - :return: The name of this NetworkConnection. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this NetworkConnection. - - User specified name for this network connection. e.g., \"My Network Connection\" # noqa: E501 - - :param name: The name of this NetworkConnection. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def config(self): - """Gets the config of this NetworkConnection. # noqa: E501 - - An object containing network connection configuration data. Will vary based on network provider type. # noqa: E501 - - :return: The config of this NetworkConnection. # noqa: E501 - :rtype: object - """ - return self._config - - @config.setter - def config(self, config): - """Sets the config of this NetworkConnection. - - An object containing network connection configuration data. Will vary based on network provider type. # noqa: E501 - - :param config: The config of this NetworkConnection. # noqa: E501 - :type config: object - """ - if self.local_vars_configuration.client_side_validation and config is None: # noqa: E501 - raise ValueError("Invalid value for `config`, must not be `None`") # noqa: E501 - - self._config = config - - @property - def projects(self): - """Gets the projects of this NetworkConnection. # noqa: E501 - - An object where the keys are project IDs and the values are {@link ProjectNetworkState} objects representing the state of each project. # noqa: E501 - - :return: The projects of this NetworkConnection. # noqa: E501 - :rtype: list[ProjectNetworkState] - """ - return self._projects - - @projects.setter - def projects(self, projects): - """Sets the projects of this NetworkConnection. - - An object where the keys are project IDs and the values are {@link ProjectNetworkState} objects representing the state of each project. # noqa: E501 - - :param projects: The projects of this NetworkConnection. # noqa: E501 - :type projects: list[ProjectNetworkState] - """ - - self._projects = projects - - @property - def created_at(self): - """Gets the created_at of this NetworkConnection. # noqa: E501 - - Created Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" # noqa: E501 - - :return: The created_at of this NetworkConnection. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this NetworkConnection. - - Created Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" # noqa: E501 - - :param created_at: The created_at of this NetworkConnection. # noqa: E501 - :type created_at: str - """ - if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 - raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this NetworkConnection. # noqa: E501 - - Updated Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" # noqa: E501 - - :return: The updated_at of this NetworkConnection. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this NetworkConnection. - - Updated Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" # noqa: E501 - - :param updated_at: The updated_at of this NetworkConnection. # noqa: E501 - :type updated_at: str - """ - if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 - raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 - - self._updated_at = updated_at - - @property - def created_by(self): - """Gets the created_by of this NetworkConnection. # noqa: E501 - - UUIDv4 of the user who created this record. # noqa: E501 - - :return: The created_by of this NetworkConnection. # noqa: E501 - :rtype: str - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """Sets the created_by of this NetworkConnection. - - UUIDv4 of the user who created this record. # noqa: E501 - - :param created_by: The created_by of this NetworkConnection. # noqa: E501 - :type created_by: str - """ - if self.local_vars_configuration.client_side_validation and created_by is None: # noqa: E501 - raise ValueError("Invalid value for `created_by`, must not be `None`") # noqa: E501 - - self._created_by = created_by - - @property - def updated_by(self): - """Gets the updated_by of this NetworkConnection. # noqa: E501 - - UUIDv4 of the user who last updated this record. # noqa: E501 - - :return: The updated_by of this NetworkConnection. # noqa: E501 - :rtype: str - """ - return self._updated_by - - @updated_by.setter - def updated_by(self, updated_by): - """Sets the updated_by of this NetworkConnection. - - UUIDv4 of the user who last updated this record. # noqa: E501 - - :param updated_by: The updated_by of this NetworkConnection. # noqa: E501 - :type updated_by: str - """ - if self.local_vars_configuration.client_side_validation and updated_by is None: # noqa: E501 - raise ValueError("Invalid value for `updated_by`, must not be `None`") # noqa: E501 - - self._updated_by = updated_by - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, NetworkConnection): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, NetworkConnection): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/network_connection_offset_pagination_result.py b/corellium_api/models/network_connection_offset_pagination_result.py deleted file mode 100644 index 03a3167..0000000 --- a/corellium_api/models/network_connection_offset_pagination_result.py +++ /dev/null @@ -1,250 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class NetworkConnectionOffsetPaginationResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'float', - 'count': 'float', - 'limit': 'float', - 'offset': 'float', - 'results': 'list[NetworkConnection]' - } - - attribute_map = { - 'total': 'total', - 'count': 'count', - 'limit': 'limit', - 'offset': 'offset', - 'results': 'results' - } - - def __init__(self, total=None, count=None, limit=None, offset=None, results=None, local_vars_configuration=None): # noqa: E501 - """NetworkConnectionOffsetPaginationResult - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._count = None - self._limit = None - self._offset = None - self._results = None - self.discriminator = None - - self.total = total - self.count = count - self.limit = limit - self.offset = offset - self.results = results - - @property - def total(self): - """Gets the total of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - - Total number of items. # noqa: E501 - - :return: The total of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this NetworkConnectionOffsetPaginationResult. - - Total number of items. # noqa: E501 - - :param total: The total of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :type total: float - """ - if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 - raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 - - self._total = total - - @property - def count(self): - """Gets the count of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - - The number of items returned in this result. # noqa: E501 - - :return: The count of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :rtype: float - """ - return self._count - - @count.setter - def count(self, count): - """Sets the count of this NetworkConnectionOffsetPaginationResult. - - The number of items returned in this result. # noqa: E501 - - :param count: The count of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :type count: float - """ - if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501 - raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 - - self._count = count - - @property - def limit(self): - """Gets the limit of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - - The maximum number of items that could be returned for this result. # noqa: E501 - - :return: The limit of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :rtype: float - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this NetworkConnectionOffsetPaginationResult. - - The maximum number of items that could be returned for this result. # noqa: E501 - - :param limit: The limit of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :type limit: float - """ - if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 - raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 - - self._limit = limit - - @property - def offset(self): - """Gets the offset of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - - That starting item 0-indexed. # noqa: E501 - - :return: The offset of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :rtype: float - """ - return self._offset - - @offset.setter - def offset(self, offset): - """Sets the offset of this NetworkConnectionOffsetPaginationResult. - - That starting item 0-indexed. # noqa: E501 - - :param offset: The offset of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :type offset: float - """ - if self.local_vars_configuration.client_side_validation and offset is None: # noqa: E501 - raise ValueError("Invalid value for `offset`, must not be `None`") # noqa: E501 - - self._offset = offset - - @property - def results(self): - """Gets the results of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - - Array of network connections associated with this domain. # noqa: E501 - - :return: The results of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :rtype: list[NetworkConnection] - """ - return self._results - - @results.setter - def results(self, results): - """Sets the results of this NetworkConnectionOffsetPaginationResult. - - Array of network connections associated with this domain. # noqa: E501 - - :param results: The results of this NetworkConnectionOffsetPaginationResult. # noqa: E501 - :type results: list[NetworkConnection] - """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 - - self._results = results - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, NetworkConnectionOffsetPaginationResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, NetworkConnectionOffsetPaginationResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/network_connection_provider.py b/corellium_api/models/network_connection_provider.py deleted file mode 100644 index 2c5e9b1..0000000 --- a/corellium_api/models/network_connection_provider.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class NetworkConnectionProvider(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'type': 'str' - } - - attribute_map = { - 'name': 'name', - 'type': 'type' - } - - def __init__(self, name=None, type=None, local_vars_configuration=None): # noqa: E501 - """NetworkConnectionProvider - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._type = None - self.discriminator = None - - self.name = name - self.type = type - - @property - def name(self): - """Gets the name of this NetworkConnectionProvider. # noqa: E501 - - Human friendly name for Network Connection Provider. # noqa: E501 - - :return: The name of this NetworkConnectionProvider. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this NetworkConnectionProvider. - - Human friendly name for Network Connection Provider. # noqa: E501 - - :param name: The name of this NetworkConnectionProvider. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def type(self): - """Gets the type of this NetworkConnectionProvider. # noqa: E501 - - Internal identifier for Network Connection Provider. # noqa: E501 - - :return: The type of this NetworkConnectionProvider. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this NetworkConnectionProvider. - - Internal identifier for Network Connection Provider. # noqa: E501 - - :param type: The type of this NetworkConnectionProvider. # noqa: E501 - :type type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - - self._type = type - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, NetworkConnectionProvider): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, NetworkConnectionProvider): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/network_connection_provider_offset_pagination_result.py b/corellium_api/models/network_connection_provider_offset_pagination_result.py deleted file mode 100644 index c8b144e..0000000 --- a/corellium_api/models/network_connection_provider_offset_pagination_result.py +++ /dev/null @@ -1,250 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class NetworkConnectionProviderOffsetPaginationResult(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'total': 'float', - 'count': 'float', - 'limit': 'float', - 'offset': 'float', - 'results': 'list[NetworkConnectionProvider]' - } - - attribute_map = { - 'total': 'total', - 'count': 'count', - 'limit': 'limit', - 'offset': 'offset', - 'results': 'results' - } - - def __init__(self, total=None, count=None, limit=None, offset=None, results=None, local_vars_configuration=None): # noqa: E501 - """NetworkConnectionProviderOffsetPaginationResult - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._total = None - self._count = None - self._limit = None - self._offset = None - self._results = None - self.discriminator = None - - self.total = total - self.count = count - self.limit = limit - self.offset = offset - self.results = results - - @property - def total(self): - """Gets the total of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - - Total number of items. # noqa: E501 - - :return: The total of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :rtype: float - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this NetworkConnectionProviderOffsetPaginationResult. - - Total number of items. # noqa: E501 - - :param total: The total of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :type total: float - """ - if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501 - raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 - - self._total = total - - @property - def count(self): - """Gets the count of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - - The number of items returned in this result. # noqa: E501 - - :return: The count of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :rtype: float - """ - return self._count - - @count.setter - def count(self, count): - """Sets the count of this NetworkConnectionProviderOffsetPaginationResult. - - The number of items returned in this result. # noqa: E501 - - :param count: The count of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :type count: float - """ - if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501 - raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 - - self._count = count - - @property - def limit(self): - """Gets the limit of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - - The maximum number of items that could be returned for this result. # noqa: E501 - - :return: The limit of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :rtype: float - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this NetworkConnectionProviderOffsetPaginationResult. - - The maximum number of items that could be returned for this result. # noqa: E501 - - :param limit: The limit of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :type limit: float - """ - if self.local_vars_configuration.client_side_validation and limit is None: # noqa: E501 - raise ValueError("Invalid value for `limit`, must not be `None`") # noqa: E501 - - self._limit = limit - - @property - def offset(self): - """Gets the offset of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - - That starting item 0-indexed. # noqa: E501 - - :return: The offset of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :rtype: float - """ - return self._offset - - @offset.setter - def offset(self, offset): - """Sets the offset of this NetworkConnectionProviderOffsetPaginationResult. - - That starting item 0-indexed. # noqa: E501 - - :param offset: The offset of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :type offset: float - """ - if self.local_vars_configuration.client_side_validation and offset is None: # noqa: E501 - raise ValueError("Invalid value for `offset`, must not be `None`") # noqa: E501 - - self._offset = offset - - @property - def results(self): - """Gets the results of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - - Array of network connection providers. # noqa: E501 - - :return: The results of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :rtype: list[NetworkConnectionProvider] - """ - return self._results - - @results.setter - def results(self, results): - """Sets the results of this NetworkConnectionProviderOffsetPaginationResult. - - Array of network connection providers. # noqa: E501 - - :param results: The results of this NetworkConnectionProviderOffsetPaginationResult. # noqa: E501 - :type results: list[NetworkConnectionProvider] - """ - if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 - raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 - - self._results = results - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, NetworkConnectionProviderOffsetPaginationResult): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, NetworkConnectionProviderOffsetPaginationResult): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/network_status_response.py b/corellium_api/models/network_status_response.py deleted file mode 100644 index 7655bdf..0000000 --- a/corellium_api/models/network_status_response.py +++ /dev/null @@ -1,227 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class NetworkStatusResponse(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str', - 'name': 'str', - 'state': 'str', - 'params': 'object' - } - - attribute_map = { - 'type': 'type', - 'name': 'name', - 'state': 'state', - 'params': 'params' - } - - def __init__(self, type=None, name=None, state=None, params=None, local_vars_configuration=None): # noqa: E501 - """NetworkStatusResponse - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._type = None - self._name = None - self._state = None - self._params = None - self.discriminator = None - - self.type = type - self.name = name - self.state = state - self.params = params - - @property - def type(self): - """Gets the type of this NetworkStatusResponse. # noqa: E501 - - Network Provider # noqa: E501 - - :return: The type of this NetworkStatusResponse. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this NetworkStatusResponse. - - Network Provider # noqa: E501 - - :param type: The type of this NetworkStatusResponse. # noqa: E501 - :type type: str - """ - if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - - self._type = type - - @property - def name(self): - """Gets the name of this NetworkStatusResponse. # noqa: E501 - - User defined name # noqa: E501 - - :return: The name of this NetworkStatusResponse. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this NetworkStatusResponse. - - User defined name # noqa: E501 - - :param name: The name of this NetworkStatusResponse. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def state(self): - """Gets the state of this NetworkStatusResponse. # noqa: E501 - - Current state of the network connection # noqa: E501 - - :return: The state of this NetworkStatusResponse. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this NetworkStatusResponse. - - Current state of the network connection # noqa: E501 - - :param state: The state of this NetworkStatusResponse. # noqa: E501 - :type state: str - """ - if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501 - raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 - allowed_values = ["inactive", "connecting", "connected", "error"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def params(self): - """Gets the params of this NetworkStatusResponse. # noqa: E501 - - Additional state information # noqa: E501 - - :return: The params of this NetworkStatusResponse. # noqa: E501 - :rtype: object - """ - return self._params - - @params.setter - def params(self, params): - """Sets the params of this NetworkStatusResponse. - - Additional state information # noqa: E501 - - :param params: The params of this NetworkStatusResponse. # noqa: E501 - :type params: object - """ - if self.local_vars_configuration.client_side_validation and params is None: # noqa: E501 - raise ValueError("Invalid value for `params`, must not be `None`") # noqa: E501 - - self._params = params - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, NetworkStatusResponse): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, NetworkStatusResponse): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/node_information.py b/corellium_api/models/node_information.py deleted file mode 100644 index 63c5c5a..0000000 --- a/corellium_api/models/node_information.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class NodeInformation(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'node_id': 'str', - 'address': 'str', - 'hostname': 'str', - 'ssh_port': 'float', - 'node_types': 'list[str]' - } - - attribute_map = { - 'node_id': 'nodeId', - 'address': 'address', - 'hostname': 'hostname', - 'ssh_port': 'sshPort', - 'node_types': 'nodeTypes' - } - - def __init__(self, node_id=None, address=None, hostname=None, ssh_port=None, node_types=None, local_vars_configuration=None): # noqa: E501 - """NodeInformation - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._node_id = None - self._address = None - self._hostname = None - self._ssh_port = None - self._node_types = None - self.discriminator = None - - self.node_id = node_id - self.address = address - self.hostname = hostname - self.ssh_port = ssh_port - self.node_types = node_types - - @property - def node_id(self): - """Gets the node_id of this NodeInformation. # noqa: E501 - - Unique identifier for the node # noqa: E501 - - :return: The node_id of this NodeInformation. # noqa: E501 - :rtype: str - """ - return self._node_id - - @node_id.setter - def node_id(self, node_id): - """Sets the node_id of this NodeInformation. - - Unique identifier for the node # noqa: E501 - - :param node_id: The node_id of this NodeInformation. # noqa: E501 - :type node_id: str - """ - if self.local_vars_configuration.client_side_validation and node_id is None: # noqa: E501 - raise ValueError("Invalid value for `node_id`, must not be `None`") # noqa: E501 - - self._node_id = node_id - - @property - def address(self): - """Gets the address of this NodeInformation. # noqa: E501 - - IP address of the node # noqa: E501 - - :return: The address of this NodeInformation. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this NodeInformation. - - IP address of the node # noqa: E501 - - :param address: The address of this NodeInformation. # noqa: E501 - :type address: str - """ - if self.local_vars_configuration.client_side_validation and address is None: # noqa: E501 - raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 - - self._address = address - - @property - def hostname(self): - """Gets the hostname of this NodeInformation. # noqa: E501 - - Hostname of the node # noqa: E501 - - :return: The hostname of this NodeInformation. # noqa: E501 - :rtype: str - """ - return self._hostname - - @hostname.setter - def hostname(self, hostname): - """Sets the hostname of this NodeInformation. - - Hostname of the node # noqa: E501 - - :param hostname: The hostname of this NodeInformation. # noqa: E501 - :type hostname: str - """ - if self.local_vars_configuration.client_side_validation and hostname is None: # noqa: E501 - raise ValueError("Invalid value for `hostname`, must not be `None`") # noqa: E501 - - self._hostname = hostname - - @property - def ssh_port(self): - """Gets the ssh_port of this NodeInformation. # noqa: E501 - - SSH port for the node # noqa: E501 - - :return: The ssh_port of this NodeInformation. # noqa: E501 - :rtype: float - """ - return self._ssh_port - - @ssh_port.setter - def ssh_port(self, ssh_port): - """Sets the ssh_port of this NodeInformation. - - SSH port for the node # noqa: E501 - - :param ssh_port: The ssh_port of this NodeInformation. # noqa: E501 - :type ssh_port: float - """ - - self._ssh_port = ssh_port - - @property - def node_types(self): - """Gets the node_types of this NodeInformation. # noqa: E501 - - Types of services running on this node [compute,controller,gpu] # noqa: E501 - - :return: The node_types of this NodeInformation. # noqa: E501 - :rtype: list[str] - """ - return self._node_types - - @node_types.setter - def node_types(self, node_types): - """Sets the node_types of this NodeInformation. - - Types of services running on this node [compute,controller,gpu] # noqa: E501 - - :param node_types: The node_types of this NodeInformation. # noqa: E501 - :type node_types: list[str] - """ - if self.local_vars_configuration.client_side_validation and node_types is None: # noqa: E501 - raise ValueError("Invalid value for `node_types`, must not be `None`") # noqa: E501 - - self._node_types = node_types - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, NodeInformation): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, NodeInformation): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/open_id_config.py b/corellium_api/models/open_id_config.py deleted file mode 100644 index 0bb86be..0000000 --- a/corellium_api/models/open_id_config.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class OpenIDConfig(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'discovery_url': 'str', - 'client_id': 'str', - 'client_secret': 'str', - 'invited_only': 'bool' - } - - attribute_map = { - 'discovery_url': 'discoveryUrl', - 'client_id': 'clientId', - 'client_secret': 'clientSecret', - 'invited_only': 'invitedOnly' - } - - def __init__(self, discovery_url=None, client_id=None, client_secret=None, invited_only=None, local_vars_configuration=None): # noqa: E501 - """OpenIDConfig - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._discovery_url = None - self._client_id = None - self._client_secret = None - self._invited_only = None - self.discriminator = None - - self.discovery_url = discovery_url - self.client_id = client_id - self.client_secret = client_secret - self.invited_only = invited_only - - @property - def discovery_url(self): - """Gets the discovery_url of this OpenIDConfig. # noqa: E501 - - Service Discovery URL # noqa: E501 - - :return: The discovery_url of this OpenIDConfig. # noqa: E501 - :rtype: str - """ - return self._discovery_url - - @discovery_url.setter - def discovery_url(self, discovery_url): - """Sets the discovery_url of this OpenIDConfig. - - Service Discovery URL # noqa: E501 - - :param discovery_url: The discovery_url of this OpenIDConfig. # noqa: E501 - :type discovery_url: str - """ - - self._discovery_url = discovery_url - - @property - def client_id(self): - """Gets the client_id of this OpenIDConfig. # noqa: E501 - - Service Client ID # noqa: E501 - - :return: The client_id of this OpenIDConfig. # noqa: E501 - :rtype: str - """ - return self._client_id - - @client_id.setter - def client_id(self, client_id): - """Sets the client_id of this OpenIDConfig. - - Service Client ID # noqa: E501 - - :param client_id: The client_id of this OpenIDConfig. # noqa: E501 - :type client_id: str - """ - - self._client_id = client_id - - @property - def client_secret(self): - """Gets the client_secret of this OpenIDConfig. # noqa: E501 - - Service Client Secret # noqa: E501 - - :return: The client_secret of this OpenIDConfig. # noqa: E501 - :rtype: str - """ - return self._client_secret - - @client_secret.setter - def client_secret(self, client_secret): - """Sets the client_secret of this OpenIDConfig. - - Service Client Secret # noqa: E501 - - :param client_secret: The client_secret of this OpenIDConfig. # noqa: E501 - :type client_secret: str - """ - - self._client_secret = client_secret - - @property - def invited_only(self): - """Gets the invited_only of this OpenIDConfig. # noqa: E501 - - Only accept individuals with invitations # noqa: E501 - - :return: The invited_only of this OpenIDConfig. # noqa: E501 - :rtype: bool - """ - return self._invited_only - - @invited_only.setter - def invited_only(self, invited_only): - """Sets the invited_only of this OpenIDConfig. - - Only accept individuals with invitations # noqa: E501 - - :param invited_only: The invited_only of this OpenIDConfig. # noqa: E501 - :type invited_only: bool - """ - - self._invited_only = invited_only - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OpenIDConfig): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, OpenIDConfig): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/pagination.py b/corellium_api/models/pagination.py deleted file mode 100644 index 3dfff99..0000000 --- a/corellium_api/models/pagination.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Pagination(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'current_page': 'float', - 'total_pages': 'float', - 'total_items': 'float', - 'items_per_page': 'float' - } - - attribute_map = { - 'current_page': 'currentPage', - 'total_pages': 'totalPages', - 'total_items': 'totalItems', - 'items_per_page': 'itemsPerPage' - } - - def __init__(self, current_page=None, total_pages=None, total_items=None, items_per_page=None, local_vars_configuration=None): # noqa: E501 - """Pagination - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._current_page = None - self._total_pages = None - self._total_items = None - self._items_per_page = None - self.discriminator = None - - self.current_page = current_page - self.total_pages = total_pages - self.total_items = total_items - self.items_per_page = items_per_page - - @property - def current_page(self): - """Gets the current_page of this Pagination. # noqa: E501 - - The current page # noqa: E501 - - :return: The current_page of this Pagination. # noqa: E501 - :rtype: float - """ - return self._current_page - - @current_page.setter - def current_page(self, current_page): - """Sets the current_page of this Pagination. - - The current page # noqa: E501 - - :param current_page: The current_page of this Pagination. # noqa: E501 - :type current_page: float - """ - - self._current_page = current_page - - @property - def total_pages(self): - """Gets the total_pages of this Pagination. # noqa: E501 - - The total number of pages # noqa: E501 - - :return: The total_pages of this Pagination. # noqa: E501 - :rtype: float - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this Pagination. - - The total number of pages # noqa: E501 - - :param total_pages: The total_pages of this Pagination. # noqa: E501 - :type total_pages: float - """ - - self._total_pages = total_pages - - @property - def total_items(self): - """Gets the total_items of this Pagination. # noqa: E501 - - The total number of activity entries # noqa: E501 - - :return: The total_items of this Pagination. # noqa: E501 - :rtype: float - """ - return self._total_items - - @total_items.setter - def total_items(self, total_items): - """Sets the total_items of this Pagination. - - The total number of activity entries # noqa: E501 - - :param total_items: The total_items of this Pagination. # noqa: E501 - :type total_items: float - """ - - self._total_items = total_items - - @property - def items_per_page(self): - """Gets the items_per_page of this Pagination. # noqa: E501 - - The number of activity entries per page # noqa: E501 - - :return: The items_per_page of this Pagination. # noqa: E501 - :rtype: float - """ - return self._items_per_page - - @items_per_page.setter - def items_per_page(self, items_per_page): - """Sets the items_per_page of this Pagination. - - The number of activity entries per page # noqa: E501 - - :param items_per_page: The items_per_page of this Pagination. # noqa: E501 - :type items_per_page: float - """ - - self._items_per_page = items_per_page - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Pagination): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Pagination): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/partial_update_interconnect_request.py b/corellium_api/models/partial_update_interconnect_request.py deleted file mode 100644 index 227650e..0000000 --- a/corellium_api/models/partial_update_interconnect_request.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class PartialUpdateInterconnectRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'interfaces': 'list[object]', - 'interfaces': 'str' - } - - attribute_map = { - 'name': 'name', - 'interfaces': 'interfaces', - 'interfaces': 'interfaces[]' - } - - def __init__(self, name=None, interfaces=None, interfaces=None, local_vars_configuration=None): # noqa: E501 - """PartialUpdateInterconnectRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._interfaces = None - self._interfaces = None - self.discriminator = None - - self.name = name - self.interfaces = interfaces - self.interfaces = interfaces - - @property - def name(self): - """Gets the name of this PartialUpdateInterconnectRequest. # noqa: E501 - - The name of the interconnect (optional) # noqa: E501 - - :return: The name of this PartialUpdateInterconnectRequest. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this PartialUpdateInterconnectRequest. - - The name of the interconnect (optional) # noqa: E501 - - :param name: The name of this PartialUpdateInterconnectRequest. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def interfaces(self): - """Gets the interfaces of this PartialUpdateInterconnectRequest. # noqa: E501 - - Array of interfaces with deviceId and interfaceId (optional) # noqa: E501 - - :return: The interfaces of this PartialUpdateInterconnectRequest. # noqa: E501 - :rtype: list[object] - """ - return self._interfaces - - @interfaces.setter - def interfaces(self, interfaces): - """Sets the interfaces of this PartialUpdateInterconnectRequest. - - Array of interfaces with deviceId and interfaceId (optional) # noqa: E501 - - :param interfaces: The interfaces of this PartialUpdateInterconnectRequest. # noqa: E501 - :type interfaces: list[object] - """ - - self._interfaces = interfaces - - @property - def interfaces(self): - """Gets the interfaces of this PartialUpdateInterconnectRequest. # noqa: E501 - - The interface identifier # noqa: E501 - - :return: The interfaces of this PartialUpdateInterconnectRequest. # noqa: E501 - :rtype: str - """ - return self._interfaces - - @interfaces.setter - def interfaces(self, interfaces): - """Sets the interfaces of this PartialUpdateInterconnectRequest. - - The interface identifier # noqa: E501 - - :param interfaces: The interfaces of this PartialUpdateInterconnectRequest. # noqa: E501 - :type interfaces: str - """ - - self._interfaces = interfaces - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PartialUpdateInterconnectRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PartialUpdateInterconnectRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/password_change_body.py b/corellium_api/models/password_change_body.py deleted file mode 100644 index 4f46ad2..0000000 --- a/corellium_api/models/password_change_body.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class PasswordChangeBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user': 'str', - 'old_password': 'str', - 'new_password': 'str' - } - - attribute_map = { - 'user': 'user', - 'old_password': 'old-password', - 'new_password': 'new-password' - } - - def __init__(self, user=None, old_password=None, new_password=None, local_vars_configuration=None): # noqa: E501 - """PasswordChangeBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._user = None - self._old_password = None - self._new_password = None - self.discriminator = None - - self.user = user - self.old_password = old_password - self.new_password = new_password - - @property - def user(self): - """Gets the user of this PasswordChangeBody. # noqa: E501 - - userId # noqa: E501 - - :return: The user of this PasswordChangeBody. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this PasswordChangeBody. - - userId # noqa: E501 - - :param user: The user of this PasswordChangeBody. # noqa: E501 - :type user: str - """ - if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def old_password(self): - """Gets the old_password of this PasswordChangeBody. # noqa: E501 - - old password # noqa: E501 - - :return: The old_password of this PasswordChangeBody. # noqa: E501 - :rtype: str - """ - return self._old_password - - @old_password.setter - def old_password(self, old_password): - """Sets the old_password of this PasswordChangeBody. - - old password # noqa: E501 - - :param old_password: The old_password of this PasswordChangeBody. # noqa: E501 - :type old_password: str - """ - if self.local_vars_configuration.client_side_validation and old_password is None: # noqa: E501 - raise ValueError("Invalid value for `old_password`, must not be `None`") # noqa: E501 - - self._old_password = old_password - - @property - def new_password(self): - """Gets the new_password of this PasswordChangeBody. # noqa: E501 - - new password # noqa: E501 - - :return: The new_password of this PasswordChangeBody. # noqa: E501 - :rtype: str - """ - return self._new_password - - @new_password.setter - def new_password(self, new_password): - """Sets the new_password of this PasswordChangeBody. - - new password # noqa: E501 - - :param new_password: The new_password of this PasswordChangeBody. # noqa: E501 - :type new_password: str - """ - if self.local_vars_configuration.client_side_validation and new_password is None: # noqa: E501 - raise ValueError("Invalid value for `new_password`, must not be `None`") # noqa: E501 - - self._new_password = new_password - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PasswordChangeBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PasswordChangeBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/password_reset_body.py b/corellium_api/models/password_reset_body.py deleted file mode 100644 index 29437b1..0000000 --- a/corellium_api/models/password_reset_body.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class PasswordResetBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'token': 'str', - 'totp_token': 'str', - 'new_password': 'str' - } - - attribute_map = { - 'token': 'token', - 'totp_token': 'totpToken', - 'new_password': 'new-password' - } - - def __init__(self, token=None, totp_token=None, new_password=None, local_vars_configuration=None): # noqa: E501 - """PasswordResetBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._token = None - self._totp_token = None - self._new_password = None - self.discriminator = None - - self.token = token - self.totp_token = totp_token - self.new_password = new_password - - @property - def token(self): - """Gets the token of this PasswordResetBody. # noqa: E501 - - Password reset token # noqa: E501 - - :return: The token of this PasswordResetBody. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this PasswordResetBody. - - Password reset token # noqa: E501 - - :param token: The token of this PasswordResetBody. # noqa: E501 - :type token: str - """ - if self.local_vars_configuration.client_side_validation and token is None: # noqa: E501 - raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 - - self._token = token - - @property - def totp_token(self): - """Gets the totp_token of this PasswordResetBody. # noqa: E501 - - Password reset totpToken # noqa: E501 - - :return: The totp_token of this PasswordResetBody. # noqa: E501 - :rtype: str - """ - return self._totp_token - - @totp_token.setter - def totp_token(self, totp_token): - """Sets the totp_token of this PasswordResetBody. - - Password reset totpToken # noqa: E501 - - :param totp_token: The totp_token of this PasswordResetBody. # noqa: E501 - :type totp_token: str - """ - if self.local_vars_configuration.client_side_validation and totp_token is None: # noqa: E501 - raise ValueError("Invalid value for `totp_token`, must not be `None`") # noqa: E501 - - self._totp_token = totp_token - - @property - def new_password(self): - """Gets the new_password of this PasswordResetBody. # noqa: E501 - - new password # noqa: E501 - - :return: The new_password of this PasswordResetBody. # noqa: E501 - :rtype: str - """ - return self._new_password - - @new_password.setter - def new_password(self, new_password): - """Sets the new_password of this PasswordResetBody. - - new password # noqa: E501 - - :param new_password: The new_password of this PasswordResetBody. # noqa: E501 - :type new_password: str - """ - if self.local_vars_configuration.client_side_validation and new_password is None: # noqa: E501 - raise ValueError("Invalid value for `new_password`, must not be `None`") # noqa: E501 - - self._new_password = new_password - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PasswordResetBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PasswordResetBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/patch_instance_options.py b/corellium_api/models/patch_instance_options.py deleted file mode 100644 index 1bfd3cc..0000000 --- a/corellium_api/models/patch_instance_options.py +++ /dev/null @@ -1,218 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class PatchInstanceOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'state': 'str', - 'boot_options': 'InstanceBootOptions', - 'proxy': 'list[ProxyConfig]' - } - - attribute_map = { - 'name': 'name', - 'state': 'state', - 'boot_options': 'bootOptions', - 'proxy': 'proxy' - } - - def __init__(self, name=None, state=None, boot_options=None, proxy=None, local_vars_configuration=None): # noqa: E501 - """PatchInstanceOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._state = None - self._boot_options = None - self._proxy = None - self.discriminator = None - - self.name = name - self.state = state - if boot_options is not None: - self.boot_options = boot_options - self.proxy = proxy - - @property - def name(self): - """Gets the name of this PatchInstanceOptions. # noqa: E501 - - the name of the device # noqa: E501 - - :return: The name of this PatchInstanceOptions. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this PatchInstanceOptions. - - the name of the device # noqa: E501 - - :param name: The name of this PatchInstanceOptions. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def state(self): - """Gets the state of this PatchInstanceOptions. # noqa: E501 - - the desired state of the device # noqa: E501 - - :return: The state of this PatchInstanceOptions. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this PatchInstanceOptions. - - the desired state of the device # noqa: E501 - - :param state: The state of this PatchInstanceOptions. # noqa: E501 - :type state: str - """ - allowed_values = [None,"on", "off", "paused", "deleting"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def boot_options(self): - """Gets the boot_options of this PatchInstanceOptions. # noqa: E501 - - - :return: The boot_options of this PatchInstanceOptions. # noqa: E501 - :rtype: InstanceBootOptions - """ - return self._boot_options - - @boot_options.setter - def boot_options(self, boot_options): - """Sets the boot_options of this PatchInstanceOptions. - - - :param boot_options: The boot_options of this PatchInstanceOptions. # noqa: E501 - :type boot_options: InstanceBootOptions - """ - - self._boot_options = boot_options - - @property - def proxy(self): - """Gets the proxy of this PatchInstanceOptions. # noqa: E501 - - # noqa: E501 - - :return: The proxy of this PatchInstanceOptions. # noqa: E501 - :rtype: list[ProxyConfig] - """ - return self._proxy - - @proxy.setter - def proxy(self, proxy): - """Sets the proxy of this PatchInstanceOptions. - - # noqa: E501 - - :param proxy: The proxy of this PatchInstanceOptions. # noqa: E501 - :type proxy: list[ProxyConfig] - """ - - self._proxy = proxy - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PatchInstanceOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PatchInstanceOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/patch_instance_read_only.py b/corellium_api/models/patch_instance_read_only.py deleted file mode 100644 index 806d771..0000000 --- a/corellium_api/models/patch_instance_read_only.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class PatchInstanceReadOnly(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'read_only': 'str' - } - - attribute_map = { - 'read_only': 'readOnly' - } - - def __init__(self, read_only=None, local_vars_configuration=None): # noqa: E501 - """PatchInstanceReadOnly - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._read_only = None - self.discriminator = None - - self.read_only = read_only - - @property - def read_only(self): - """Gets the read_only of this PatchInstanceReadOnly. # noqa: E501 - - The desired state of readOnly. Possible values: 'enabled', 'disabled'. # noqa: E501 - - :return: The read_only of this PatchInstanceReadOnly. # noqa: E501 - :rtype: str - """ - return self._read_only - - @read_only.setter - def read_only(self, read_only): - """Sets the read_only of this PatchInstanceReadOnly. - - The desired state of readOnly. Possible values: 'enabled', 'disabled'. # noqa: E501 - - :param read_only: The read_only of this PatchInstanceReadOnly. # noqa: E501 - :type read_only: str - """ - - self._read_only = read_only - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PatchInstanceReadOnly): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PatchInstanceReadOnly): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/peripherals_data.py b/corellium_api/models/peripherals_data.py deleted file mode 100644 index 2cb1994..0000000 --- a/corellium_api/models/peripherals_data.py +++ /dev/null @@ -1,348 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class PeripheralsData(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'acceleration': 'list[float]', - 'gyroscope': 'list[float]', - 'magnetic': 'list[float]', - 'orientation': 'list[float]', - 'temperature': 'float', - 'proximity': 'float', - 'light': 'float', - 'pressure': 'float', - 'humidity': 'float' - } - - attribute_map = { - 'acceleration': 'acceleration', - 'gyroscope': 'gyroscope', - 'magnetic': 'magnetic', - 'orientation': 'orientation', - 'temperature': 'temperature', - 'proximity': 'proximity', - 'light': 'light', - 'pressure': 'pressure', - 'humidity': 'humidity' - } - - def __init__(self, acceleration=None, gyroscope=None, magnetic=None, orientation=None, temperature=None, proximity=None, light=None, pressure=None, humidity=None, local_vars_configuration=None): # noqa: E501 - """PeripheralsData - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._acceleration = None - self._gyroscope = None - self._magnetic = None - self._orientation = None - self._temperature = None - self._proximity = None - self._light = None - self._pressure = None - self._humidity = None - self.discriminator = None - - self.acceleration = acceleration - self.gyroscope = gyroscope - self.magnetic = magnetic - self.orientation = orientation - self.temperature = temperature - self.proximity = proximity - self.light = light - self.pressure = pressure - self.humidity = humidity - - @property - def acceleration(self): - """Gets the acceleration of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The acceleration of this PeripheralsData. # noqa: E501 - :rtype: list[float] - """ - return self._acceleration - - @acceleration.setter - def acceleration(self, acceleration): - """Sets the acceleration of this PeripheralsData. - - # noqa: E501 - - :param acceleration: The acceleration of this PeripheralsData. # noqa: E501 - :type acceleration: list[float] - """ - - self._acceleration = acceleration - - @property - def gyroscope(self): - """Gets the gyroscope of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The gyroscope of this PeripheralsData. # noqa: E501 - :rtype: list[float] - """ - return self._gyroscope - - @gyroscope.setter - def gyroscope(self, gyroscope): - """Sets the gyroscope of this PeripheralsData. - - # noqa: E501 - - :param gyroscope: The gyroscope of this PeripheralsData. # noqa: E501 - :type gyroscope: list[float] - """ - - self._gyroscope = gyroscope - - @property - def magnetic(self): - """Gets the magnetic of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The magnetic of this PeripheralsData. # noqa: E501 - :rtype: list[float] - """ - return self._magnetic - - @magnetic.setter - def magnetic(self, magnetic): - """Sets the magnetic of this PeripheralsData. - - # noqa: E501 - - :param magnetic: The magnetic of this PeripheralsData. # noqa: E501 - :type magnetic: list[float] - """ - - self._magnetic = magnetic - - @property - def orientation(self): - """Gets the orientation of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The orientation of this PeripheralsData. # noqa: E501 - :rtype: list[float] - """ - return self._orientation - - @orientation.setter - def orientation(self, orientation): - """Sets the orientation of this PeripheralsData. - - # noqa: E501 - - :param orientation: The orientation of this PeripheralsData. # noqa: E501 - :type orientation: list[float] - """ - - self._orientation = orientation - - @property - def temperature(self): - """Gets the temperature of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The temperature of this PeripheralsData. # noqa: E501 - :rtype: float - """ - return self._temperature - - @temperature.setter - def temperature(self, temperature): - """Sets the temperature of this PeripheralsData. - - # noqa: E501 - - :param temperature: The temperature of this PeripheralsData. # noqa: E501 - :type temperature: float - """ - - self._temperature = temperature - - @property - def proximity(self): - """Gets the proximity of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The proximity of this PeripheralsData. # noqa: E501 - :rtype: float - """ - return self._proximity - - @proximity.setter - def proximity(self, proximity): - """Sets the proximity of this PeripheralsData. - - # noqa: E501 - - :param proximity: The proximity of this PeripheralsData. # noqa: E501 - :type proximity: float - """ - - self._proximity = proximity - - @property - def light(self): - """Gets the light of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The light of this PeripheralsData. # noqa: E501 - :rtype: float - """ - return self._light - - @light.setter - def light(self, light): - """Sets the light of this PeripheralsData. - - # noqa: E501 - - :param light: The light of this PeripheralsData. # noqa: E501 - :type light: float - """ - - self._light = light - - @property - def pressure(self): - """Gets the pressure of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The pressure of this PeripheralsData. # noqa: E501 - :rtype: float - """ - return self._pressure - - @pressure.setter - def pressure(self, pressure): - """Sets the pressure of this PeripheralsData. - - # noqa: E501 - - :param pressure: The pressure of this PeripheralsData. # noqa: E501 - :type pressure: float - """ - - self._pressure = pressure - - @property - def humidity(self): - """Gets the humidity of this PeripheralsData. # noqa: E501 - - # noqa: E501 - - :return: The humidity of this PeripheralsData. # noqa: E501 - :rtype: float - """ - return self._humidity - - @humidity.setter - def humidity(self, humidity): - """Sets the humidity of this PeripheralsData. - - # noqa: E501 - - :param humidity: The humidity of this PeripheralsData. # noqa: E501 - :type humidity: float - """ - - self._humidity = humidity - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PeripheralsData): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PeripheralsData): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/plan.py b/corellium_api/models/plan.py deleted file mode 100644 index 77ca43c..0000000 --- a/corellium_api/models/plan.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Plan(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'plan_id': 'str', - 'name': 'str' - } - - attribute_map = { - 'plan_id': 'planId', - 'name': 'name' - } - - def __init__(self, plan_id=None, name=None, local_vars_configuration=None): # noqa: E501 - """Plan - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._plan_id = None - self._name = None - self.discriminator = None - - self.plan_id = plan_id - self.name = name - - @property - def plan_id(self): - """Gets the plan_id of this Plan. # noqa: E501 - - Plan ID # noqa: E501 - - :return: The plan_id of this Plan. # noqa: E501 - :rtype: str - """ - return self._plan_id - - @plan_id.setter - def plan_id(self, plan_id): - """Sets the plan_id of this Plan. - - Plan ID # noqa: E501 - - :param plan_id: The plan_id of this Plan. # noqa: E501 - :type plan_id: str - """ - - self._plan_id = plan_id - - @property - def name(self): - """Gets the name of this Plan. # noqa: E501 - - Plan Name # noqa: E501 - - :return: The name of this Plan. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Plan. - - Plan Name # noqa: E501 - - :param name: The name of this Plan. # noqa: E501 - :type name: str - """ - - self._name = name - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Plan): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Plan): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/plan_options.py b/corellium_api/models/plan_options.py deleted file mode 100644 index 4c613a0..0000000 --- a/corellium_api/models/plan_options.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 3.11.0-13738 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class PlanOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'license_type': 'str', - 'cores': 'int' - } - - attribute_map = { - 'license_type': 'licenseType', - 'cores': 'cores' - } - - def __init__(self, license_type=None, cores=None, local_vars_configuration=None): # noqa: E501 - """PlanOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._license_type = None - self._cores = None - self.discriminator = None - - self.license_type = license_type - self.cores = cores - - @property - def license_type(self): - """Gets the license_type of this PlanOptions. # noqa: E501 - - - :return: The license_type of this PlanOptions. # noqa: E501 - :rtype: str - """ - return self._license_type - - @license_type.setter - def license_type(self, license_type): - """Sets the license_type of this PlanOptions. - - - :param license_type: The license_type of this PlanOptions. # noqa: E501 - :type license_type: str - """ - if self.local_vars_configuration.client_side_validation and license_type is None: # noqa: E501 - raise ValueError("Invalid value for `license_type`, must not be `None`") # noqa: E501 - allowed_values = ["premium", "individual", "standard", "enterprise", "individual-usage", "enterprise-usage", "unrestricted"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and license_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `license_type` ({0}), must be one of {1}" # noqa: E501 - .format(license_type, allowed_values) - ) - - self._license_type = license_type - - @property - def cores(self): - """Gets the cores of this PlanOptions. # noqa: E501 - - Number of CPU cores # noqa: E501 - - :return: The cores of this PlanOptions. # noqa: E501 - :rtype: int - """ - return self._cores - - @cores.setter - def cores(self, cores): - """Sets the cores of this PlanOptions. - - Number of CPU cores # noqa: E501 - - :param cores: The cores of this PlanOptions. # noqa: E501 - :type cores: int - """ - if self.local_vars_configuration.client_side_validation and cores is None: # noqa: E501 - raise ValueError("Invalid value for `cores`, must not be `None`") # noqa: E501 - - self._cores = cores - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PlanOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PlanOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/post_share_snapshot_request_payload.py b/corellium_api/models/post_share_snapshot_request_payload.py deleted file mode 100644 index 0a050eb..0000000 --- a/corellium_api/models/post_share_snapshot_request_payload.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class PostShareSnapshotRequestPayload(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'sharing_type': 'str', - 'password': 'str' - } - - attribute_map = { - 'sharing_type': 'sharingType', - 'password': 'password' - } - - def __init__(self, sharing_type=None, password=None, local_vars_configuration=None): # noqa: E501 - """PostShareSnapshotRequestPayload - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._sharing_type = None - self._password = None - self.discriminator = None - - self.sharing_type = sharing_type - self.password = password - - @property - def sharing_type(self): - """Gets the sharing_type of this PostShareSnapshotRequestPayload. # noqa: E501 - - # noqa: E501 - - :return: The sharing_type of this PostShareSnapshotRequestPayload. # noqa: E501 - :rtype: str - """ - return self._sharing_type - - @sharing_type.setter - def sharing_type(self, sharing_type): - """Sets the sharing_type of this PostShareSnapshotRequestPayload. - - # noqa: E501 - - :param sharing_type: The sharing_type of this PostShareSnapshotRequestPayload. # noqa: E501 - :type sharing_type: str - """ - if self.local_vars_configuration.client_side_validation and sharing_type is None: # noqa: E501 - raise ValueError("Invalid value for `sharing_type`, must not be `None`") # noqa: E501 - allowed_values = ["publicLink", "domainRestrictedLink", "passwordPublicLink", "emailInvite."] # noqa: E501 - if self.local_vars_configuration.client_side_validation and sharing_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `sharing_type` ({0}), must be one of {1}" # noqa: E501 - .format(sharing_type, allowed_values) - ) - - self._sharing_type = sharing_type - - @property - def password(self): - """Gets the password of this PostShareSnapshotRequestPayload. # noqa: E501 - - Password for passwordPublicLink. # noqa: E501 - - :return: The password of this PostShareSnapshotRequestPayload. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this PostShareSnapshotRequestPayload. - - Password for passwordPublicLink. # noqa: E501 - - :param password: The password of this PostShareSnapshotRequestPayload. # noqa: E501 - :type password: str - """ - - self._password = password - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PostShareSnapshotRequestPayload): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, PostShareSnapshotRequestPayload): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/project.py b/corellium_api/models/project.py deleted file mode 100644 index 54fef82..0000000 --- a/corellium_api/models/project.py +++ /dev/null @@ -1,239 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Project(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'settings': 'ProjectSettings', - 'quotas': 'ProjectQuota', - 'quotas_used': 'ProjectUsage' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'settings': 'settings', - 'quotas': 'quotas', - 'quotas_used': 'quotasUsed' - } - - def __init__(self, id=None, name=None, settings=None, quotas=None, quotas_used=None, local_vars_configuration=None): # noqa: E501 - """Project - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._settings = None - self._quotas = None - self._quotas_used = None - self.discriminator = None - - self.id = id - self.name = name - if settings is not None: - self.settings = settings - if quotas is not None: - self.quotas = quotas - if quotas_used is not None: - self.quotas_used = quotas_used - - @property - def id(self): - """Gets the id of this Project. # noqa: E501 - - Project Identifier # noqa: E501 - - :return: The id of this Project. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Project. - - Project Identifier # noqa: E501 - - :param id: The id of this Project. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this Project. # noqa: E501 - - Project Name # noqa: E501 - - :return: The name of this Project. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Project. - - Project Name # noqa: E501 - - :param name: The name of this Project. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def settings(self): - """Gets the settings of this Project. # noqa: E501 - - - :return: The settings of this Project. # noqa: E501 - :rtype: ProjectSettings - """ - return self._settings - - @settings.setter - def settings(self, settings): - """Sets the settings of this Project. - - - :param settings: The settings of this Project. # noqa: E501 - :type settings: ProjectSettings - """ - - self._settings = settings - - @property - def quotas(self): - """Gets the quotas of this Project. # noqa: E501 - - - :return: The quotas of this Project. # noqa: E501 - :rtype: ProjectQuota - """ - return self._quotas - - @quotas.setter - def quotas(self, quotas): - """Sets the quotas of this Project. - - - :param quotas: The quotas of this Project. # noqa: E501 - :type quotas: ProjectQuota - """ - - self._quotas = quotas - - @property - def quotas_used(self): - """Gets the quotas_used of this Project. # noqa: E501 - - - :return: The quotas_used of this Project. # noqa: E501 - :rtype: ProjectUsage - """ - return self._quotas_used - - @quotas_used.setter - def quotas_used(self, quotas_used): - """Sets the quotas_used of this Project. - - - :param quotas_used: The quotas_used of this Project. # noqa: E501 - :type quotas_used: ProjectUsage - """ - - self._quotas_used = quotas_used - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Project): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Project): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/project_key.py b/corellium_api/models/project_key.py deleted file mode 100644 index 58b4b08..0000000 --- a/corellium_api/models/project_key.py +++ /dev/null @@ -1,304 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ProjectKey(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'kind': 'str', - 'project': 'str', - 'key': 'str', - 'fingerprint': 'str', - 'updated_at': 'datetime', - 'created_at': 'datetime' - } - - attribute_map = { - 'identifier': 'identifier', - 'kind': 'kind', - 'project': 'project', - 'key': 'key', - 'fingerprint': 'fingerprint', - 'updated_at': 'updatedAt', - 'created_at': 'createdAt' - } - - def __init__(self, identifier=None, kind=None, project=None, key=None, fingerprint=None, updated_at=None, created_at=None, local_vars_configuration=None): # noqa: E501 - """ProjectKey - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._kind = None - self._project = None - self._key = None - self._fingerprint = None - self._updated_at = None - self._created_at = None - self.discriminator = None - - self.identifier = identifier - self.kind = kind - self.project = project - self.key = key - self.fingerprint = fingerprint - self.updated_at = updated_at - self.created_at = created_at - - @property - def identifier(self): - """Gets the identifier of this ProjectKey. # noqa: E501 - - keyId # noqa: E501 - - :return: The identifier of this ProjectKey. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this ProjectKey. - - keyId # noqa: E501 - - :param identifier: The identifier of this ProjectKey. # noqa: E501 - :type identifier: str - """ - - self._identifier = identifier - - @property - def kind(self): - """Gets the kind of this ProjectKey. # noqa: E501 - - kind of key # noqa: E501 - - :return: The kind of this ProjectKey. # noqa: E501 - :rtype: str - """ - return self._kind - - @kind.setter - def kind(self, kind): - """Sets the kind of this ProjectKey. - - kind of key # noqa: E501 - - :param kind: The kind of this ProjectKey. # noqa: E501 - :type kind: str - """ - if self.local_vars_configuration.client_side_validation and kind is None: # noqa: E501 - raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 - allowed_values = ["ssh", "adb"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and kind not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `kind` ({0}), must be one of {1}" # noqa: E501 - .format(kind, allowed_values) - ) - - self._kind = kind - - @property - def project(self): - """Gets the project of this ProjectKey. # noqa: E501 - - projectId # noqa: E501 - - :return: The project of this ProjectKey. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this ProjectKey. - - projectId # noqa: E501 - - :param project: The project of this ProjectKey. # noqa: E501 - :type project: str - """ - - self._project = project - - @property - def key(self): - """Gets the key of this ProjectKey. # noqa: E501 - - The public key # noqa: E501 - - :return: The key of this ProjectKey. # noqa: E501 - :rtype: str - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this ProjectKey. - - The public key # noqa: E501 - - :param key: The key of this ProjectKey. # noqa: E501 - :type key: str - """ - if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501 - raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 - - self._key = key - - @property - def fingerprint(self): - """Gets the fingerprint of this ProjectKey. # noqa: E501 - - Key fingerprint # noqa: E501 - - :return: The fingerprint of this ProjectKey. # noqa: E501 - :rtype: str - """ - return self._fingerprint - - @fingerprint.setter - def fingerprint(self, fingerprint): - """Sets the fingerprint of this ProjectKey. - - Key fingerprint # noqa: E501 - - :param fingerprint: The fingerprint of this ProjectKey. # noqa: E501 - :type fingerprint: str - """ - - self._fingerprint = fingerprint - - @property - def updated_at(self): - """Gets the updated_at of this ProjectKey. # noqa: E501 - - Time of last update # noqa: E501 - - :return: The updated_at of this ProjectKey. # noqa: E501 - :rtype: datetime - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this ProjectKey. - - Time of last update # noqa: E501 - - :param updated_at: The updated_at of this ProjectKey. # noqa: E501 - :type updated_at: datetime - """ - - self._updated_at = updated_at - - @property - def created_at(self): - """Gets the created_at of this ProjectKey. # noqa: E501 - - Time of creation # noqa: E501 - - :return: The created_at of this ProjectKey. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this ProjectKey. - - Time of creation # noqa: E501 - - :param created_at: The created_at of this ProjectKey. # noqa: E501 - :type created_at: datetime - """ - - self._created_at = created_at - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ProjectKey): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ProjectKey): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/project_network_state.py b/corellium_api/models/project_network_state.py deleted file mode 100644 index fd9a2b3..0000000 --- a/corellium_api/models/project_network_state.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ProjectNetworkState(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'str', - 'details': 'object' - } - - attribute_map = { - 'state': 'state', - 'details': 'details' - } - - def __init__(self, state=None, details=None, local_vars_configuration=None): # noqa: E501 - """ProjectNetworkState - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._state = None - self._details = None - self.discriminator = None - - self.state = state - self.details = details - - @property - def state(self): - """Gets the state of this ProjectNetworkState. # noqa: E501 - - State of the project network connection. One of: disconnected, disconnecting, connecting, connected, error # noqa: E501 - - :return: The state of this ProjectNetworkState. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this ProjectNetworkState. - - State of the project network connection. One of: disconnected, disconnecting, connecting, connected, error # noqa: E501 - - :param state: The state of this ProjectNetworkState. # noqa: E501 - :type state: str - """ - if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501 - raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 - - self._state = state - - @property - def details(self): - """Gets the details of this ProjectNetworkState. # noqa: E501 - - Additional parameters for the network state. # noqa: E501 - - :return: The details of this ProjectNetworkState. # noqa: E501 - :rtype: object - """ - return self._details - - @details.setter - def details(self, details): - """Sets the details of this ProjectNetworkState. - - Additional parameters for the network state. # noqa: E501 - - :param details: The details of this ProjectNetworkState. # noqa: E501 - :type details: object - """ - - self._details = details - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ProjectNetworkState): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ProjectNetworkState): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/project_quota.py b/corellium_api/models/project_quota.py deleted file mode 100644 index ce4cacf..0000000 --- a/corellium_api/models/project_quota.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ProjectQuota(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'cores': 'float', - 'instances': 'float', - 'ram': 'float' - } - - attribute_map = { - 'cores': 'cores', - 'instances': 'instances', - 'ram': 'ram' - } - - def __init__(self, cores=None, instances=None, ram=None, local_vars_configuration=None): # noqa: E501 - """ProjectQuota - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._cores = None - self._instances = None - self._ram = None - self.discriminator = None - - self.cores = cores - self.instances = instances - self.ram = ram - - @property - def cores(self): - """Gets the cores of this ProjectQuota. # noqa: E501 - - # noqa: E501 - - :return: The cores of this ProjectQuota. # noqa: E501 - :rtype: float - """ - return self._cores - - @cores.setter - def cores(self, cores): - """Sets the cores of this ProjectQuota. - - # noqa: E501 - - :param cores: The cores of this ProjectQuota. # noqa: E501 - :type cores: float - """ - - self._cores = cores - - @property - def instances(self): - """Gets the instances of this ProjectQuota. # noqa: E501 - - # noqa: E501 - - :return: The instances of this ProjectQuota. # noqa: E501 - :rtype: float - """ - return self._instances - - @instances.setter - def instances(self, instances): - """Sets the instances of this ProjectQuota. - - # noqa: E501 - - :param instances: The instances of this ProjectQuota. # noqa: E501 - :type instances: float - """ - - self._instances = instances - - @property - def ram(self): - """Gets the ram of this ProjectQuota. # noqa: E501 - - # noqa: E501 - - :return: The ram of this ProjectQuota. # noqa: E501 - :rtype: float - """ - return self._ram - - @ram.setter - def ram(self, ram): - """Sets the ram of this ProjectQuota. - - # noqa: E501 - - :param ram: The ram of this ProjectQuota. # noqa: E501 - :type ram: float - """ - - self._ram = ram - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ProjectQuota): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ProjectQuota): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/project_settings.py b/corellium_api/models/project_settings.py deleted file mode 100644 index 5b4be84..0000000 --- a/corellium_api/models/project_settings.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ProjectSettings(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'internet_access': 'bool', - 'connection': 'str', - 'dhcp': 'bool' - } - - attribute_map = { - 'internet_access': 'internet-access', - 'connection': 'connection', - 'dhcp': 'dhcp' - } - - def __init__(self, internet_access=None, connection=None, dhcp=None, local_vars_configuration=None): # noqa: E501 - """ProjectSettings - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._internet_access = None - self._connection = None - self._dhcp = None - self.discriminator = None - - self.internet_access = internet_access - self.connection = connection - self.dhcp = dhcp - - @property - def internet_access(self): - """Gets the internet_access of this ProjectSettings. # noqa: E501 - - # noqa: E501 - - :return: The internet_access of this ProjectSettings. # noqa: E501 - :rtype: bool - """ - return self._internet_access - - @internet_access.setter - def internet_access(self, internet_access): - """Sets the internet_access of this ProjectSettings. - - # noqa: E501 - - :param internet_access: The internet_access of this ProjectSettings. # noqa: E501 - :type internet_access: bool - """ - if self.local_vars_configuration.client_side_validation and internet_access is None: # noqa: E501 - raise ValueError("Invalid value for `internet_access`, must not be `None`") # noqa: E501 - - self._internet_access = internet_access - - @property - def connection(self): - """Gets the connection of this ProjectSettings. # noqa: E501 - - UUIDv4 network connection identifier or null for no vpn connection # noqa: E501 - - :return: The connection of this ProjectSettings. # noqa: E501 - :rtype: str - """ - return self._connection - - @connection.setter - def connection(self, connection): - """Sets the connection of this ProjectSettings. - - UUIDv4 network connection identifier or null for no vpn connection # noqa: E501 - - :param connection: The connection of this ProjectSettings. # noqa: E501 - :type connection: str - """ - - self._connection = connection - - @property - def dhcp(self): - """Gets the dhcp of this ProjectSettings. # noqa: E501 - - # noqa: E501 - - :return: The dhcp of this ProjectSettings. # noqa: E501 - :rtype: bool - """ - return self._dhcp - - @dhcp.setter - def dhcp(self, dhcp): - """Sets the dhcp of this ProjectSettings. - - # noqa: E501 - - :param dhcp: The dhcp of this ProjectSettings. # noqa: E501 - :type dhcp: bool - """ - if self.local_vars_configuration.client_side_validation and dhcp is None: # noqa: E501 - raise ValueError("Invalid value for `dhcp`, must not be `None`") # noqa: E501 - - self._dhcp = dhcp - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ProjectSettings): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ProjectSettings): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/project_usage.py b/corellium_api/models/project_usage.py deleted file mode 100644 index 402ff60..0000000 --- a/corellium_api/models/project_usage.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ProjectUsage(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'cores': 'float', - 'instances': 'float', - 'ram': 'float', - 'gpu': 'float' - } - - attribute_map = { - 'cores': 'cores', - 'instances': 'instances', - 'ram': 'ram', - 'gpu': 'gpu' - } - - def __init__(self, cores=None, instances=None, ram=None, gpu=None, local_vars_configuration=None): # noqa: E501 - """ProjectUsage - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._cores = None - self._instances = None - self._ram = None - self._gpu = None - self.discriminator = None - - self.cores = cores - self.instances = instances - self.ram = ram - self.gpu = gpu - - @property - def cores(self): - """Gets the cores of this ProjectUsage. # noqa: E501 - - # noqa: E501 - - :return: The cores of this ProjectUsage. # noqa: E501 - :rtype: float - """ - return self._cores - - @cores.setter - def cores(self, cores): - """Sets the cores of this ProjectUsage. - - # noqa: E501 - - :param cores: The cores of this ProjectUsage. # noqa: E501 - :type cores: float - """ - - self._cores = cores - - @property - def instances(self): - """Gets the instances of this ProjectUsage. # noqa: E501 - - # noqa: E501 - - :return: The instances of this ProjectUsage. # noqa: E501 - :rtype: float - """ - return self._instances - - @instances.setter - def instances(self, instances): - """Sets the instances of this ProjectUsage. - - # noqa: E501 - - :param instances: The instances of this ProjectUsage. # noqa: E501 - :type instances: float - """ - - self._instances = instances - - @property - def ram(self): - """Gets the ram of this ProjectUsage. # noqa: E501 - - # noqa: E501 - - :return: The ram of this ProjectUsage. # noqa: E501 - :rtype: float - """ - return self._ram - - @ram.setter - def ram(self, ram): - """Sets the ram of this ProjectUsage. - - # noqa: E501 - - :param ram: The ram of this ProjectUsage. # noqa: E501 - :type ram: float - """ - - self._ram = ram - - @property - def gpu(self): - """Gets the gpu of this ProjectUsage. # noqa: E501 - - # noqa: E501 - - :return: The gpu of this ProjectUsage. # noqa: E501 - :rtype: float - """ - return self._gpu - - @gpu.setter - def gpu(self, gpu): - """Sets the gpu of this ProjectUsage. - - # noqa: E501 - - :param gpu: The gpu of this ProjectUsage. # noqa: E501 - :type gpu: float - """ - - self._gpu = gpu - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ProjectUsage): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ProjectUsage): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/proxy_config.py b/corellium_api/models/proxy_config.py deleted file mode 100644 index 5a5f1f5..0000000 --- a/corellium_api/models/proxy_config.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ProxyConfig(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'device_port': 'float', - 'first_available': 'bool', - 'expose': 'bool', - 'router_port': 'float' - } - - attribute_map = { - 'device_port': 'devicePort', - 'first_available': 'firstAvailable', - 'expose': 'expose', - 'router_port': 'routerPort' - } - - def __init__(self, device_port=None, first_available=None, expose=None, router_port=None, local_vars_configuration=None): # noqa: E501 - """ProxyConfig - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._device_port = None - self._first_available = None - self._expose = None - self._router_port = None - self.discriminator = None - - self.device_port = device_port - self.first_available = first_available - self.expose = expose - self.router_port = router_port - - @property - def device_port(self): - """Gets the device_port of this ProxyConfig. # noqa: E501 - - The device port to use for proxying. # noqa: E501 - - :return: The device_port of this ProxyConfig. # noqa: E501 - :rtype: float - """ - return self._device_port - - @device_port.setter - def device_port(self, device_port): - """Sets the device_port of this ProxyConfig. - - The device port to use for proxying. # noqa: E501 - - :param device_port: The device_port of this ProxyConfig. # noqa: E501 - :type device_port: float - """ - - self._device_port = device_port - - @property - def first_available(self): - """Gets the first_available of this ProxyConfig. # noqa: E501 - - If `true`, the first available port will be used if `devicePort` is not available. # noqa: E501 - - :return: The first_available of this ProxyConfig. # noqa: E501 - :rtype: bool - """ - return self._first_available - - @first_available.setter - def first_available(self, first_available): - """Sets the first_available of this ProxyConfig. - - If `true`, the first available port will be used if `devicePort` is not available. # noqa: E501 - - :param first_available: The first_available of this ProxyConfig. # noqa: E501 - :type first_available: bool - """ - - self._first_available = first_available - - @property - def expose(self): - """Gets the expose of this ProxyConfig. # noqa: E501 - - If `true`, the proxy will be exposed to the external interface. # noqa: E501 - - :return: The expose of this ProxyConfig. # noqa: E501 - :rtype: bool - """ - return self._expose - - @expose.setter - def expose(self, expose): - """Sets the expose of this ProxyConfig. - - If `true`, the proxy will be exposed to the external interface. # noqa: E501 - - :param expose: The expose of this ProxyConfig. # noqa: E501 - :type expose: bool - """ - - self._expose = expose - - @property - def router_port(self): - """Gets the router_port of this ProxyConfig. # noqa: E501 - - The router port to use for proxying. # noqa: E501 - - :return: The router_port of this ProxyConfig. # noqa: E501 - :rtype: float - """ - return self._router_port - - @router_port.setter - def router_port(self, router_port): - """Sets the router_port of this ProxyConfig. - - The router port to use for proxying. # noqa: E501 - - :param router_port: The router_port of this ProxyConfig. # noqa: E501 - :type router_port: float - """ - - self._router_port = router_port - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ProxyConfig): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ProxyConfig): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/rate_info.py b/corellium_api/models/rate_info.py deleted file mode 100644 index b060644..0000000 --- a/corellium_api/models/rate_info.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 5.2.0-17368 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class RateInfo(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'on_rate_microcents': 'int', - 'off_rate_microcents': 'int' - } - - attribute_map = { - 'on_rate_microcents': 'onRateMicrocents', - 'off_rate_microcents': 'offRateMicrocents' - } - - def __init__(self, on_rate_microcents=None, off_rate_microcents=None, local_vars_configuration=None): # noqa: E501 - """RateInfo - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._on_rate_microcents = None - self._off_rate_microcents = None - self.discriminator = None - - self.on_rate_microcents = on_rate_microcents - self.off_rate_microcents = off_rate_microcents - - @property - def on_rate_microcents(self): - """Gets the on_rate_microcents of this RateInfo. # noqa: E501 - - The amount per second, in microcents (USD), that this instance charges to be running. # noqa: E501 - - :return: The on_rate_microcents of this RateInfo. # noqa: E501 - :rtype: int - """ - return self._on_rate_microcents - - @on_rate_microcents.setter - def on_rate_microcents(self, on_rate_microcents): - """Sets the on_rate_microcents of this RateInfo. - - The amount per second, in microcents (USD), that this instance charges to be running. # noqa: E501 - - :param on_rate_microcents: The on_rate_microcents of this RateInfo. # noqa: E501 - :type on_rate_microcents: int - """ - - self._on_rate_microcents = on_rate_microcents - - @property - def off_rate_microcents(self): - """Gets the off_rate_microcents of this RateInfo. # noqa: E501 - - The amount per second, in microcents (USD), that this instance charges to be stored. # noqa: E501 - - :return: The off_rate_microcents of this RateInfo. # noqa: E501 - :rtype: int - """ - return self._off_rate_microcents - - @off_rate_microcents.setter - def off_rate_microcents(self, off_rate_microcents): - """Sets the off_rate_microcents of this RateInfo. - - The amount per second, in microcents (USD), that this instance charges to be stored. # noqa: E501 - - :param off_rate_microcents: The off_rate_microcents of this RateInfo. # noqa: E501 - :type off_rate_microcents: int - """ - - self._off_rate_microcents = off_rate_microcents - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RateInfo): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RateInfo): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/reset_link_body.py b/corellium_api/models/reset_link_body.py deleted file mode 100644 index 8abfb7c..0000000 --- a/corellium_api/models/reset_link_body.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ResetLinkBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'email': 'str' - } - - attribute_map = { - 'email': 'email' - } - - def __init__(self, email=None, local_vars_configuration=None): # noqa: E501 - """ResetLinkBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._email = None - self.discriminator = None - - self.email = email - - @property - def email(self): - """Gets the email of this ResetLinkBody. # noqa: E501 - - Email address to request password reset link for # noqa: E501 - - :return: The email of this ResetLinkBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this ResetLinkBody. - - Email address to request password reset link for # noqa: E501 - - :param email: The email of this ResetLinkBody. # noqa: E501 - :type email: str - """ - if self.local_vars_configuration.client_side_validation and email is None: # noqa: E501 - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 - - self._email = email - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResetLinkBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ResetLinkBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/reset_link_info_return.py b/corellium_api/models/reset_link_info_return.py deleted file mode 100644 index c742e32..0000000 --- a/corellium_api/models/reset_link_info_return.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ResetLinkInfoReturn(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'user_id': 'str', - 'username': 'str', - 'domain': 'str' - } - - attribute_map = { - 'user_id': 'userId', - 'username': 'username', - 'domain': 'domain' - } - - def __init__(self, user_id=None, username=None, domain=None, local_vars_configuration=None): # noqa: E501 - """ResetLinkInfoReturn - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._user_id = None - self._username = None - self._domain = None - self.discriminator = None - - self.user_id = user_id - self.username = username - self.domain = domain - - @property - def user_id(self): - """Gets the user_id of this ResetLinkInfoReturn. # noqa: E501 - - The user identifier # noqa: E501 - - :return: The user_id of this ResetLinkInfoReturn. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this ResetLinkInfoReturn. - - The user identifier # noqa: E501 - - :param user_id: The user_id of this ResetLinkInfoReturn. # noqa: E501 - :type user_id: str - """ - - self._user_id = user_id - - @property - def username(self): - """Gets the username of this ResetLinkInfoReturn. # noqa: E501 - - The user name # noqa: E501 - - :return: The username of this ResetLinkInfoReturn. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this ResetLinkInfoReturn. - - The user name # noqa: E501 - - :param username: The username of this ResetLinkInfoReturn. # noqa: E501 - :type username: str - """ - - self._username = username - - @property - def domain(self): - """Gets the domain of this ResetLinkInfoReturn. # noqa: E501 - - The domain name # noqa: E501 - - :return: The domain of this ResetLinkInfoReturn. # noqa: E501 - :rtype: str - """ - return self._domain - - @domain.setter - def domain(self, domain): - """Sets the domain of this ResetLinkInfoReturn. - - The domain name # noqa: E501 - - :param domain: The domain of this ResetLinkInfoReturn. # noqa: E501 - :type domain: str - """ - - self._domain = domain - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResetLinkInfoReturn): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ResetLinkInfoReturn): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/restore_backup_data.py b/corellium_api/models/restore_backup_data.py deleted file mode 100644 index 009d435..0000000 --- a/corellium_api/models/restore_backup_data.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class RestoreBackupData(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'password': 'str' - } - - attribute_map = { - 'password': 'password' - } - - def __init__(self, password=None, local_vars_configuration=None): # noqa: E501 - """RestoreBackupData - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._password = None - self.discriminator = None - - self.password = password - - @property - def password(self): - """Gets the password of this RestoreBackupData. # noqa: E501 - - Required for encrypted backup # noqa: E501 - - :return: The password of this RestoreBackupData. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this RestoreBackupData. - - Required for encrypted backup # noqa: E501 - - :param password: The password of this RestoreBackupData. # noqa: E501 - :type password: str - """ - - self._password = password - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RestoreBackupData): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RestoreBackupData): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/role.py b/corellium_api/models/role.py deleted file mode 100644 index f23c387..0000000 --- a/corellium_api/models/role.py +++ /dev/null @@ -1,198 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Role(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'role': 'str', - 'project': 'str', - 'user': 'str' - } - - attribute_map = { - 'role': 'role', - 'project': 'project', - 'user': 'user' - } - - def __init__(self, role=None, project=None, user=None, local_vars_configuration=None): # noqa: E501 - """Role - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._role = None - self._project = None - self._user = None - self.discriminator = None - - self.role = role - self.project = project - self.user = user - - @property - def role(self): - """Gets the role of this Role. # noqa: E501 - - # noqa: E501 - - :return: The role of this Role. # noqa: E501 - :rtype: str - """ - return self._role - - @role.setter - def role(self, role): - """Sets the role of this Role. - - # noqa: E501 - - :param role: The role of this Role. # noqa: E501 - :type role: str - """ - if self.local_vars_configuration.client_side_validation and role is None: # noqa: E501 - raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501 - allowed_values = ["admin", "_member_"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and role not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `role` ({0}), must be one of {1}" # noqa: E501 - .format(role, allowed_values) - ) - - self._role = role - - @property - def project(self): - """Gets the project of this Role. # noqa: E501 - - Project ID # noqa: E501 - - :return: The project of this Role. # noqa: E501 - :rtype: str - """ - return self._project - - @project.setter - def project(self, project): - """Sets the project of this Role. - - Project ID # noqa: E501 - - :param project: The project of this Role. # noqa: E501 - :type project: str - """ - if self.local_vars_configuration.client_side_validation and project is None: # noqa: E501 - raise ValueError("Invalid value for `project`, must not be `None`") # noqa: E501 - - self._project = project - - @property - def user(self): - """Gets the user of this Role. # noqa: E501 - - User ID # noqa: E501 - - :return: The user of this Role. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this Role. - - User ID # noqa: E501 - - :param user: The user of this Role. # noqa: E501 - :type user: str - """ - if self.local_vars_configuration.client_side_validation and user is None: # noqa: E501 - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Role): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Role): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/rotate_body.py b/corellium_api/models/rotate_body.py deleted file mode 100644 index b70cf9b..0000000 --- a/corellium_api/models/rotate_body.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class RotateBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'orientation': 'float' - } - - attribute_map = { - 'orientation': 'orientation' - } - - def __init__(self, orientation=None, local_vars_configuration=None): # noqa: E501 - """RotateBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._orientation = None - self.discriminator = None - - self.orientation = orientation - - @property - def orientation(self): - """Gets the orientation of this RotateBody. # noqa: E501 - - Desired orientation # noqa: E501 - - :return: The orientation of this RotateBody. # noqa: E501 - :rtype: float - """ - return self._orientation - - @orientation.setter - def orientation(self, orientation): - """Sets the orientation of this RotateBody. - - Desired orientation # noqa: E501 - - :param orientation: The orientation of this RotateBody. # noqa: E501 - :type orientation: float - """ - if self.local_vars_configuration.client_side_validation and orientation is None: # noqa: E501 - raise ValueError("Invalid value for `orientation`, must not be `None`") # noqa: E501 - allowed_values = [1, 2, 3, 4] # noqa: E501 - if self.local_vars_configuration.client_side_validation and orientation not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `orientation` ({0}), must be one of {1}" # noqa: E501 - .format(orientation, allowed_values) - ) - - self._orientation = orientation - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RotateBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, RotateBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/shared_snapshots_info.py b/corellium_api/models/shared_snapshots_info.py deleted file mode 100644 index 0d59784..0000000 --- a/corellium_api/models/shared_snapshots_info.py +++ /dev/null @@ -1,274 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SharedSnapshotsInfo(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'model': 'str', - 'shared_on': 'float', - 'shared_with_member': 'str', - 'shared_by': 'SnapshotOwner' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'model': 'model', - 'shared_on': 'sharedOn', - 'shared_with_member': 'sharedWithMember', - 'shared_by': 'sharedBy' - } - - def __init__(self, id=None, name=None, model=None, shared_on=None, shared_with_member=None, shared_by=None, local_vars_configuration=None): # noqa: E501 - """SharedSnapshotsInfo - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._model = None - self._shared_on = None - self._shared_with_member = None - self._shared_by = None - self.discriminator = None - - self.id = id - self.name = name - self.model = model - self.shared_on = shared_on - self.shared_with_member = shared_with_member - if shared_by is not None: - self.shared_by = shared_by - - @property - def id(self): - """Gets the id of this SharedSnapshotsInfo. # noqa: E501 - - UUID of the snapshot # noqa: E501 - - :return: The id of this SharedSnapshotsInfo. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this SharedSnapshotsInfo. - - UUID of the snapshot # noqa: E501 - - :param id: The id of this SharedSnapshotsInfo. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this SharedSnapshotsInfo. # noqa: E501 - - Snapshot name # noqa: E501 - - :return: The name of this SharedSnapshotsInfo. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SharedSnapshotsInfo. - - Snapshot name # noqa: E501 - - :param name: The name of this SharedSnapshotsInfo. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def model(self): - """Gets the model of this SharedSnapshotsInfo. # noqa: E501 - - Device model # noqa: E501 - - :return: The model of this SharedSnapshotsInfo. # noqa: E501 - :rtype: str - """ - return self._model - - @model.setter - def model(self, model): - """Sets the model of this SharedSnapshotsInfo. - - Device model # noqa: E501 - - :param model: The model of this SharedSnapshotsInfo. # noqa: E501 - :type model: str - """ - if self.local_vars_configuration.client_side_validation and model is None: # noqa: E501 - raise ValueError("Invalid value for `model`, must not be `None`") # noqa: E501 - - self._model = model - - @property - def shared_on(self): - """Gets the shared_on of this SharedSnapshotsInfo. # noqa: E501 - - UNIX Date of when the snapshot was first shared with member # noqa: E501 - - :return: The shared_on of this SharedSnapshotsInfo. # noqa: E501 - :rtype: float - """ - return self._shared_on - - @shared_on.setter - def shared_on(self, shared_on): - """Sets the shared_on of this SharedSnapshotsInfo. - - UNIX Date of when the snapshot was first shared with member # noqa: E501 - - :param shared_on: The shared_on of this SharedSnapshotsInfo. # noqa: E501 - :type shared_on: float - """ - if self.local_vars_configuration.client_side_validation and shared_on is None: # noqa: E501 - raise ValueError("Invalid value for `shared_on`, must not be `None`") # noqa: E501 - - self._shared_on = shared_on - - @property - def shared_with_member(self): - """Gets the shared_with_member of this SharedSnapshotsInfo. # noqa: E501 - - The member who the snapshot was shared with. Only present in sharedWithUser # noqa: E501 - - :return: The shared_with_member of this SharedSnapshotsInfo. # noqa: E501 - :rtype: str - """ - return self._shared_with_member - - @shared_with_member.setter - def shared_with_member(self, shared_with_member): - """Sets the shared_with_member of this SharedSnapshotsInfo. - - The member who the snapshot was shared with. Only present in sharedWithUser # noqa: E501 - - :param shared_with_member: The shared_with_member of this SharedSnapshotsInfo. # noqa: E501 - :type shared_with_member: str - """ - - self._shared_with_member = shared_with_member - - @property - def shared_by(self): - """Gets the shared_by of this SharedSnapshotsInfo. # noqa: E501 - - - :return: The shared_by of this SharedSnapshotsInfo. # noqa: E501 - :rtype: SnapshotOwner - """ - return self._shared_by - - @shared_by.setter - def shared_by(self, shared_by): - """Sets the shared_by of this SharedSnapshotsInfo. - - - :param shared_by: The shared_by of this SharedSnapshotsInfo. # noqa: E501 - :type shared_by: SnapshotOwner - """ - - self._shared_by = shared_by - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SharedSnapshotsInfo): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SharedSnapshotsInfo): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/snapshot.py b/corellium_api/models/snapshot.py deleted file mode 100644 index 99ac04c..0000000 --- a/corellium_api/models/snapshot.py +++ /dev/null @@ -1,388 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Snapshot(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'instance': 'str', - 'status': 'SnapshotStatus', - 'date': 'float', - 'fresh': 'bool', - 'live': 'bool', - 'local': 'bool', - 'model': 'str', - 'sharing': 'SnapshotSharing' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'instance': 'instance', - 'status': 'status', - 'date': 'date', - 'fresh': 'fresh', - 'live': 'live', - 'local': 'local', - 'model': 'model', - 'sharing': 'sharing' - } - - def __init__(self, id=None, name=None, instance=None, status=None, date=None, fresh=None, live=None, local=None, model=None, sharing=None, local_vars_configuration=None): # noqa: E501 - """Snapshot - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._name = None - self._instance = None - self._status = None - self._date = None - self._fresh = None - self._live = None - self._local = None - self._model = None - self._sharing = None - self.discriminator = None - - self.id = id - self.name = name - self.instance = instance - self.status = status - self.date = date - self.fresh = fresh - self.live = live - self.local = local - self.model = model - if sharing is not None: - self.sharing = sharing - - @property - def id(self): - """Gets the id of this Snapshot. # noqa: E501 - - Snapshot ID # noqa: E501 - - :return: The id of this Snapshot. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Snapshot. - - Snapshot ID # noqa: E501 - - :param id: The id of this Snapshot. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this Snapshot. # noqa: E501 - - Snapshot name # noqa: E501 - - :return: The name of this Snapshot. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Snapshot. - - Snapshot name # noqa: E501 - - :param name: The name of this Snapshot. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def instance(self): - """Gets the instance of this Snapshot. # noqa: E501 - - Instance that this snapshot is of # noqa: E501 - - :return: The instance of this Snapshot. # noqa: E501 - :rtype: str - """ - return self._instance - - @instance.setter - def instance(self, instance): - """Sets the instance of this Snapshot. - - Instance that this snapshot is of # noqa: E501 - - :param instance: The instance of this Snapshot. # noqa: E501 - :type instance: str - """ - if self.local_vars_configuration.client_side_validation and instance is None: # noqa: E501 - raise ValueError("Invalid value for `instance`, must not be `None`") # noqa: E501 - - self._instance = instance - - @property - def status(self): - """Gets the status of this Snapshot. # noqa: E501 - - - :return: The status of this Snapshot. # noqa: E501 - :rtype: SnapshotStatus - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this Snapshot. - - - :param status: The status of this Snapshot. # noqa: E501 - :type status: SnapshotStatus - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - - self._status = status - - @property - def date(self): - """Gets the date of this Snapshot. # noqa: E501 - - UNIX Date that the snapshot was created # noqa: E501 - - :return: The date of this Snapshot. # noqa: E501 - :rtype: float - """ - return self._date - - @date.setter - def date(self, date): - """Sets the date of this Snapshot. - - UNIX Date that the snapshot was created # noqa: E501 - - :param date: The date of this Snapshot. # noqa: E501 - :type date: float - """ - if self.local_vars_configuration.client_side_validation and date is None: # noqa: E501 - raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 - - self._date = date - - @property - def fresh(self): - """Gets the fresh of this Snapshot. # noqa: E501 - - # noqa: E501 - - :return: The fresh of this Snapshot. # noqa: E501 - :rtype: bool - """ - return self._fresh - - @fresh.setter - def fresh(self, fresh): - """Sets the fresh of this Snapshot. - - # noqa: E501 - - :param fresh: The fresh of this Snapshot. # noqa: E501 - :type fresh: bool - """ - if self.local_vars_configuration.client_side_validation and fresh is None: # noqa: E501 - raise ValueError("Invalid value for `fresh`, must not be `None`") # noqa: E501 - - self._fresh = fresh - - @property - def live(self): - """Gets the live of this Snapshot. # noqa: E501 - - Live snapshot (included state and memory) # noqa: E501 - - :return: The live of this Snapshot. # noqa: E501 - :rtype: bool - """ - return self._live - - @live.setter - def live(self, live): - """Sets the live of this Snapshot. - - Live snapshot (included state and memory) # noqa: E501 - - :param live: The live of this Snapshot. # noqa: E501 - :type live: bool - """ - if self.local_vars_configuration.client_side_validation and live is None: # noqa: E501 - raise ValueError("Invalid value for `live`, must not be `None`") # noqa: E501 - - self._live = live - - @property - def local(self): - """Gets the local of this Snapshot. # noqa: E501 - - # noqa: E501 - - :return: The local of this Snapshot. # noqa: E501 - :rtype: bool - """ - return self._local - - @local.setter - def local(self, local): - """Sets the local of this Snapshot. - - # noqa: E501 - - :param local: The local of this Snapshot. # noqa: E501 - :type local: bool - """ - if self.local_vars_configuration.client_side_validation and local is None: # noqa: E501 - raise ValueError("Invalid value for `local`, must not be `None`") # noqa: E501 - - self._local = local - - @property - def model(self): - """Gets the model of this Snapshot. # noqa: E501 - - The device model # noqa: E501 - - :return: The model of this Snapshot. # noqa: E501 - :rtype: str - """ - return self._model - - @model.setter - def model(self, model): - """Sets the model of this Snapshot. - - The device model # noqa: E501 - - :param model: The model of this Snapshot. # noqa: E501 - :type model: str - """ - - self._model = model - - @property - def sharing(self): - """Gets the sharing of this Snapshot. # noqa: E501 - - - :return: The sharing of this Snapshot. # noqa: E501 - :rtype: SnapshotSharing - """ - return self._sharing - - @sharing.setter - def sharing(self, sharing): - """Sets the sharing of this Snapshot. - - - :param sharing: The sharing of this Snapshot. # noqa: E501 - :type sharing: SnapshotSharing - """ - - self._sharing = sharing - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Snapshot): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Snapshot): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/snapshot_creation_options.py b/corellium_api/models/snapshot_creation_options.py deleted file mode 100644 index 49aae1e..0000000 --- a/corellium_api/models/snapshot_creation_options.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SnapshotCreationOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str' - } - - attribute_map = { - 'name': 'name' - } - - def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 - """SnapshotCreationOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self.discriminator = None - - self.name = name - - @property - def name(self): - """Gets the name of this SnapshotCreationOptions. # noqa: E501 - - Snapshot name # noqa: E501 - - :return: The name of this SnapshotCreationOptions. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SnapshotCreationOptions. - - Snapshot name # noqa: E501 - - :param name: The name of this SnapshotCreationOptions. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SnapshotCreationOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SnapshotCreationOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/snapshot_member.py b/corellium_api/models/snapshot_member.py deleted file mode 100644 index d6841ab..0000000 --- a/corellium_api/models/snapshot_member.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SnapshotMember(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'email': 'str', - 'invite_sent_at': 'float', - 'shared_on': 'float', - 'user_id': 'str', - 'label': 'str' - } - - attribute_map = { - 'email': 'email', - 'invite_sent_at': 'inviteSentAt', - 'shared_on': 'sharedOn', - 'user_id': 'userId', - 'label': 'label' - } - - def __init__(self, email=None, invite_sent_at=None, shared_on=None, user_id=None, label=None, local_vars_configuration=None): # noqa: E501 - """SnapshotMember - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._email = None - self._invite_sent_at = None - self._shared_on = None - self._user_id = None - self._label = None - self.discriminator = None - - self.email = email - self.invite_sent_at = invite_sent_at - self.shared_on = shared_on - self.user_id = user_id - self.label = label - - @property - def email(self): - """Gets the email of this SnapshotMember. # noqa: E501 - - The email of the member # noqa: E501 - - :return: The email of this SnapshotMember. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this SnapshotMember. - - The email of the member # noqa: E501 - - :param email: The email of this SnapshotMember. # noqa: E501 - :type email: str - """ - if self.local_vars_configuration.client_side_validation and email is None: # noqa: E501 - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 - - self._email = email - - @property - def invite_sent_at(self): - """Gets the invite_sent_at of this SnapshotMember. # noqa: E501 - - The date when the invite was sent # noqa: E501 - - :return: The invite_sent_at of this SnapshotMember. # noqa: E501 - :rtype: float - """ - return self._invite_sent_at - - @invite_sent_at.setter - def invite_sent_at(self, invite_sent_at): - """Sets the invite_sent_at of this SnapshotMember. - - The date when the invite was sent # noqa: E501 - - :param invite_sent_at: The invite_sent_at of this SnapshotMember. # noqa: E501 - :type invite_sent_at: float - """ - if self.local_vars_configuration.client_side_validation and invite_sent_at is None: # noqa: E501 - raise ValueError("Invalid value for `invite_sent_at`, must not be `None`") # noqa: E501 - - self._invite_sent_at = invite_sent_at - - @property - def shared_on(self): - """Gets the shared_on of this SnapshotMember. # noqa: E501 - - UNIX Date of when the snapshot was first shared with member # noqa: E501 - - :return: The shared_on of this SnapshotMember. # noqa: E501 - :rtype: float - """ - return self._shared_on - - @shared_on.setter - def shared_on(self, shared_on): - """Sets the shared_on of this SnapshotMember. - - UNIX Date of when the snapshot was first shared with member # noqa: E501 - - :param shared_on: The shared_on of this SnapshotMember. # noqa: E501 - :type shared_on: float - """ - if self.local_vars_configuration.client_side_validation and shared_on is None: # noqa: E501 - raise ValueError("Invalid value for `shared_on`, must not be `None`") # noqa: E501 - - self._shared_on = shared_on - - @property - def user_id(self): - """Gets the user_id of this SnapshotMember. # noqa: E501 - - The member's user ID # noqa: E501 - - :return: The user_id of this SnapshotMember. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this SnapshotMember. - - The member's user ID # noqa: E501 - - :param user_id: The user_id of this SnapshotMember. # noqa: E501 - :type user_id: str - """ - - self._user_id = user_id - - @property - def label(self): - """Gets the label of this SnapshotMember. # noqa: E501 - - The user's label or name # noqa: E501 - - :return: The label of this SnapshotMember. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this SnapshotMember. - - The user's label or name # noqa: E501 - - :param label: The label of this SnapshotMember. # noqa: E501 - :type label: str - """ - - self._label = label - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SnapshotMember): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SnapshotMember): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/snapshot_owner.py b/corellium_api/models/snapshot_owner.py deleted file mode 100644 index f82740a..0000000 --- a/corellium_api/models/snapshot_owner.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SnapshotOwner(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'email': 'str' - } - - attribute_map = { - 'name': 'name', - 'email': 'email' - } - - def __init__(self, name=None, email=None, local_vars_configuration=None): # noqa: E501 - """SnapshotOwner - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._email = None - self.discriminator = None - - self.name = name - self.email = email - - @property - def name(self): - """Gets the name of this SnapshotOwner. # noqa: E501 - - The name of the owner. # noqa: E501 - - :return: The name of this SnapshotOwner. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SnapshotOwner. - - The name of the owner. # noqa: E501 - - :param name: The name of this SnapshotOwner. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def email(self): - """Gets the email of this SnapshotOwner. # noqa: E501 - - The email of the member. # noqa: E501 - - :return: The email of this SnapshotOwner. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this SnapshotOwner. - - The email of the member. # noqa: E501 - - :param email: The email of this SnapshotOwner. # noqa: E501 - :type email: str - """ - if self.local_vars_configuration.client_side_validation and email is None: # noqa: E501 - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 - - self._email = email - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SnapshotOwner): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SnapshotOwner): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/snapshot_permissions_request_payload.py b/corellium_api/models/snapshot_permissions_request_payload.py deleted file mode 100644 index 8d1593b..0000000 --- a/corellium_api/models/snapshot_permissions_request_payload.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SnapshotPermissionsRequestPayload(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'members': 'list[str]' - } - - attribute_map = { - 'members': 'members' - } - - def __init__(self, members=None, local_vars_configuration=None): # noqa: E501 - """SnapshotPermissionsRequestPayload - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._members = None - self.discriminator = None - - self.members = members - - @property - def members(self): - """Gets the members of this SnapshotPermissionsRequestPayload. # noqa: E501 - - The email addresses or user ids of the members. # noqa: E501 - - :return: The members of this SnapshotPermissionsRequestPayload. # noqa: E501 - :rtype: list[str] - """ - return self._members - - @members.setter - def members(self, members): - """Sets the members of this SnapshotPermissionsRequestPayload. - - The email addresses or user ids of the members. # noqa: E501 - - :param members: The members of this SnapshotPermissionsRequestPayload. # noqa: E501 - :type members: list[str] - """ - if self.local_vars_configuration.client_side_validation and members is None: # noqa: E501 - raise ValueError("Invalid value for `members`, must not be `None`") # noqa: E501 - - self._members = members - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SnapshotPermissionsRequestPayload): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SnapshotPermissionsRequestPayload): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/snapshot_sharing.py b/corellium_api/models/snapshot_sharing.py deleted file mode 100644 index 5f1d3da..0000000 --- a/corellium_api/models/snapshot_sharing.py +++ /dev/null @@ -1,220 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SnapshotSharing(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'sharing_type': 'str', - 'password': 'str', - 'shared_by': 'SnapshotOwner', - 'members': 'list[SnapshotMember]' - } - - attribute_map = { - 'sharing_type': 'sharingType', - 'password': 'password', - 'shared_by': 'sharedBy', - 'members': 'members' - } - - def __init__(self, sharing_type=None, password=None, shared_by=None, members=None, local_vars_configuration=None): # noqa: E501 - """SnapshotSharing - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._sharing_type = None - self._password = None - self._shared_by = None - self._members = None - self.discriminator = None - - self.sharing_type = sharing_type - self.password = password - if shared_by is not None: - self.shared_by = shared_by - self.members = members - - @property - def sharing_type(self): - """Gets the sharing_type of this SnapshotSharing. # noqa: E501 - - # noqa: E501 - - :return: The sharing_type of this SnapshotSharing. # noqa: E501 - :rtype: str - """ - return self._sharing_type - - @sharing_type.setter - def sharing_type(self, sharing_type): - """Sets the sharing_type of this SnapshotSharing. - - # noqa: E501 - - :param sharing_type: The sharing_type of this SnapshotSharing. # noqa: E501 - :type sharing_type: str - """ - if self.local_vars_configuration.client_side_validation and sharing_type is None: # noqa: E501 - raise ValueError("Invalid value for `sharing_type`, must not be `None`") # noqa: E501 - allowed_values = ["publicLink", "domainRestrictedLink", "passwordPublicLink", "emailInvite"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and sharing_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `sharing_type` ({0}), must be one of {1}" # noqa: E501 - .format(sharing_type, allowed_values) - ) - - self._sharing_type = sharing_type - - @property - def password(self): - """Gets the password of this SnapshotSharing. # noqa: E501 - - Password with using passwordPublicLink # noqa: E501 - - :return: The password of this SnapshotSharing. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this SnapshotSharing. - - Password with using passwordPublicLink # noqa: E501 - - :param password: The password of this SnapshotSharing. # noqa: E501 - :type password: str - """ - - self._password = password - - @property - def shared_by(self): - """Gets the shared_by of this SnapshotSharing. # noqa: E501 - - - :return: The shared_by of this SnapshotSharing. # noqa: E501 - :rtype: SnapshotOwner - """ - return self._shared_by - - @shared_by.setter - def shared_by(self, shared_by): - """Sets the shared_by of this SnapshotSharing. - - - :param shared_by: The shared_by of this SnapshotSharing. # noqa: E501 - :type shared_by: SnapshotOwner - """ - - self._shared_by = shared_by - - @property - def members(self): - """Gets the members of this SnapshotSharing. # noqa: E501 - - The members who have access to the snapshot # noqa: E501 - - :return: The members of this SnapshotSharing. # noqa: E501 - :rtype: list[SnapshotMember] - """ - return self._members - - @members.setter - def members(self, members): - """Sets the members of this SnapshotSharing. - - The members who have access to the snapshot # noqa: E501 - - :param members: The members of this SnapshotSharing. # noqa: E501 - :type members: list[SnapshotMember] - """ - - self._members = members - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SnapshotSharing): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SnapshotSharing): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/snapshot_sharing_permissions.py b/corellium_api/models/snapshot_sharing_permissions.py deleted file mode 100644 index ee93262..0000000 --- a/corellium_api/models/snapshot_sharing_permissions.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SnapshotSharingPermissions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'cloud_enabled': 'bool', - 'domain_enabled': 'bool', - 'public_link': 'bool', - 'domain_restricted_link': 'bool', - 'password_public_link': 'bool', - 'email_invite': 'bool' - } - - attribute_map = { - 'cloud_enabled': 'cloudEnabled', - 'domain_enabled': 'domainEnabled', - 'public_link': 'publicLink', - 'domain_restricted_link': 'domainRestrictedLink', - 'password_public_link': 'passwordPublicLink', - 'email_invite': 'emailInvite' - } - - def __init__(self, cloud_enabled=None, domain_enabled=None, public_link=None, domain_restricted_link=None, password_public_link=None, email_invite=None, local_vars_configuration=None): # noqa: E501 - """SnapshotSharingPermissions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._cloud_enabled = None - self._domain_enabled = None - self._public_link = None - self._domain_restricted_link = None - self._password_public_link = None - self._email_invite = None - self.discriminator = None - - self.cloud_enabled = cloud_enabled - self.domain_enabled = domain_enabled - self.public_link = public_link - self.domain_restricted_link = domain_restricted_link - self.password_public_link = password_public_link - self.email_invite = email_invite - - @property - def cloud_enabled(self): - """Gets the cloud_enabled of this SnapshotSharingPermissions. # noqa: E501 - - Indicates if snapshot permissions are enabled by the cloud admin # noqa: E501 - - :return: The cloud_enabled of this SnapshotSharingPermissions. # noqa: E501 - :rtype: bool - """ - return self._cloud_enabled - - @cloud_enabled.setter - def cloud_enabled(self, cloud_enabled): - """Sets the cloud_enabled of this SnapshotSharingPermissions. - - Indicates if snapshot permissions are enabled by the cloud admin # noqa: E501 - - :param cloud_enabled: The cloud_enabled of this SnapshotSharingPermissions. # noqa: E501 - :type cloud_enabled: bool - """ - - self._cloud_enabled = cloud_enabled - - @property - def domain_enabled(self): - """Gets the domain_enabled of this SnapshotSharingPermissions. # noqa: E501 - - Indicates if snapshot permissions are enabled by the domain admin # noqa: E501 - - :return: The domain_enabled of this SnapshotSharingPermissions. # noqa: E501 - :rtype: bool - """ - return self._domain_enabled - - @domain_enabled.setter - def domain_enabled(self, domain_enabled): - """Sets the domain_enabled of this SnapshotSharingPermissions. - - Indicates if snapshot permissions are enabled by the domain admin # noqa: E501 - - :param domain_enabled: The domain_enabled of this SnapshotSharingPermissions. # noqa: E501 - :type domain_enabled: bool - """ - - self._domain_enabled = domain_enabled - - @property - def public_link(self): - """Gets the public_link of this SnapshotSharingPermissions. # noqa: E501 - - Indicates if public link access is enabled # noqa: E501 - - :return: The public_link of this SnapshotSharingPermissions. # noqa: E501 - :rtype: bool - """ - return self._public_link - - @public_link.setter - def public_link(self, public_link): - """Sets the public_link of this SnapshotSharingPermissions. - - Indicates if public link access is enabled # noqa: E501 - - :param public_link: The public_link of this SnapshotSharingPermissions. # noqa: E501 - :type public_link: bool - """ - - self._public_link = public_link - - @property - def domain_restricted_link(self): - """Gets the domain_restricted_link of this SnapshotSharingPermissions. # noqa: E501 - - Indicates if domain-restricted link access is enabled # noqa: E501 - - :return: The domain_restricted_link of this SnapshotSharingPermissions. # noqa: E501 - :rtype: bool - """ - return self._domain_restricted_link - - @domain_restricted_link.setter - def domain_restricted_link(self, domain_restricted_link): - """Sets the domain_restricted_link of this SnapshotSharingPermissions. - - Indicates if domain-restricted link access is enabled # noqa: E501 - - :param domain_restricted_link: The domain_restricted_link of this SnapshotSharingPermissions. # noqa: E501 - :type domain_restricted_link: bool - """ - - self._domain_restricted_link = domain_restricted_link - - @property - def password_public_link(self): - """Gets the password_public_link of this SnapshotSharingPermissions. # noqa: E501 - - Indicates if password-protected public link access is enabled # noqa: E501 - - :return: The password_public_link of this SnapshotSharingPermissions. # noqa: E501 - :rtype: bool - """ - return self._password_public_link - - @password_public_link.setter - def password_public_link(self, password_public_link): - """Sets the password_public_link of this SnapshotSharingPermissions. - - Indicates if password-protected public link access is enabled # noqa: E501 - - :param password_public_link: The password_public_link of this SnapshotSharingPermissions. # noqa: E501 - :type password_public_link: bool - """ - - self._password_public_link = password_public_link - - @property - def email_invite(self): - """Gets the email_invite of this SnapshotSharingPermissions. # noqa: E501 - - Indicates if email invite access is enabled # noqa: E501 - - :return: The email_invite of this SnapshotSharingPermissions. # noqa: E501 - :rtype: bool - """ - return self._email_invite - - @email_invite.setter - def email_invite(self, email_invite): - """Sets the email_invite of this SnapshotSharingPermissions. - - Indicates if email invite access is enabled # noqa: E501 - - :param email_invite: The email_invite of this SnapshotSharingPermissions. # noqa: E501 - :type email_invite: bool - """ - - self._email_invite = email_invite - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SnapshotSharingPermissions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SnapshotSharingPermissions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/snapshot_status.py b/corellium_api/models/snapshot_status.py deleted file mode 100644 index d9c4512..0000000 --- a/corellium_api/models/snapshot_status.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SnapshotStatus(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'task': 'str', - 'created': 'bool' - } - - attribute_map = { - 'task': 'task', - 'created': 'created' - } - - def __init__(self, task=None, created=None, local_vars_configuration=None): # noqa: E501 - """SnapshotStatus - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._task = None - self._created = None - self.discriminator = None - - self.task = task - self.created = created - - @property - def task(self): - """Gets the task of this SnapshotStatus. # noqa: E501 - - The current task being performed on the snapshot # noqa: E501 - - :return: The task of this SnapshotStatus. # noqa: E501 - :rtype: str - """ - return self._task - - @task.setter - def task(self, task): - """Sets the task of this SnapshotStatus. - - The current task being performed on the snapshot # noqa: E501 - - :param task: The task of this SnapshotStatus. # noqa: E501 - :type task: str - """ - - self._task = task - - @property - def created(self): - """Gets the created of this SnapshotStatus. # noqa: E501 - - Indicates if the snapshot has been successfully created # noqa: E501 - - :return: The created of this SnapshotStatus. # noqa: E501 - :rtype: bool - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this SnapshotStatus. - - Indicates if the snapshot has been successfully created # noqa: E501 - - :param created: The created of this SnapshotStatus. # noqa: E501 - :type created: bool - """ - - self._created = created - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SnapshotStatus): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SnapshotStatus): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/sslsplit_filter.py b/corellium_api/models/sslsplit_filter.py deleted file mode 100644 index 5240c87..0000000 --- a/corellium_api/models/sslsplit_filter.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SslsplitFilter(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'truncate_pcap': 'bool' - } - - attribute_map = { - 'truncate_pcap': 'truncatePcap' - } - - def __init__(self, truncate_pcap=None, local_vars_configuration=None): # noqa: E501 - """SslsplitFilter - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._truncate_pcap = None - self.discriminator = None - - self.truncate_pcap = truncate_pcap - - @property - def truncate_pcap(self): - """Gets the truncate_pcap of this SslsplitFilter. # noqa: E501 - - # noqa: E501 - - :return: The truncate_pcap of this SslsplitFilter. # noqa: E501 - :rtype: bool - """ - return self._truncate_pcap - - @truncate_pcap.setter - def truncate_pcap(self, truncate_pcap): - """Sets the truncate_pcap of this SslsplitFilter. - - # noqa: E501 - - :param truncate_pcap: The truncate_pcap of this SslsplitFilter. # noqa: E501 - :type truncate_pcap: bool - """ - - self._truncate_pcap = truncate_pcap - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SslsplitFilter): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SslsplitFilter): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/subscriber_invite.py b/corellium_api/models/subscriber_invite.py deleted file mode 100644 index 222c5ed..0000000 --- a/corellium_api/models/subscriber_invite.py +++ /dev/null @@ -1,465 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class SubscriberInvite(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'coupon_options': 'CouponOptions', - 'plan': 'Plan', - 'trial': 'Trial', - 'name': 'str', - 'email': 'str', - 'coupon_code': 'str', - 'domain': 'str', - 'aggregate': 'str', - 'use_by': 'str', - 'active': 'bool', - 'reusable': 'bool', - 'created_at': 'str', - 'updated_at': 'str' - } - - attribute_map = { - 'coupon_options': 'coupon_options', - 'plan': 'plan', - 'trial': 'trial', - 'name': 'name', - 'email': 'email', - 'coupon_code': 'coupon_code', - 'domain': 'domain', - 'aggregate': 'aggregate', - 'use_by': 'use_by', - 'active': 'active', - 'reusable': 'reusable', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, coupon_options=None, plan=None, trial=None, name=None, email=None, coupon_code=None, domain=None, aggregate=None, use_by=None, active=None, reusable=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 - """SubscriberInvite - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._coupon_options = None - self._plan = None - self._trial = None - self._name = None - self._email = None - self._coupon_code = None - self._domain = None - self._aggregate = None - self._use_by = None - self._active = None - self._reusable = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - if coupon_options is not None: - self.coupon_options = coupon_options - if plan is not None: - self.plan = plan - if trial is not None: - self.trial = trial - self.name = name - self.email = email - self.coupon_code = coupon_code - self.domain = domain - self.aggregate = aggregate - self.use_by = use_by - self.active = active - self.reusable = reusable - self.created_at = created_at - self.updated_at = updated_at - - @property - def coupon_options(self): - """Gets the coupon_options of this SubscriberInvite. # noqa: E501 - - - :return: The coupon_options of this SubscriberInvite. # noqa: E501 - :rtype: CouponOptions - """ - return self._coupon_options - - @coupon_options.setter - def coupon_options(self, coupon_options): - """Sets the coupon_options of this SubscriberInvite. - - - :param coupon_options: The coupon_options of this SubscriberInvite. # noqa: E501 - :type coupon_options: CouponOptions - """ - - self._coupon_options = coupon_options - - @property - def plan(self): - """Gets the plan of this SubscriberInvite. # noqa: E501 - - - :return: The plan of this SubscriberInvite. # noqa: E501 - :rtype: Plan - """ - return self._plan - - @plan.setter - def plan(self, plan): - """Sets the plan of this SubscriberInvite. - - - :param plan: The plan of this SubscriberInvite. # noqa: E501 - :type plan: Plan - """ - - self._plan = plan - - @property - def trial(self): - """Gets the trial of this SubscriberInvite. # noqa: E501 - - - :return: The trial of this SubscriberInvite. # noqa: E501 - :rtype: Trial - """ - return self._trial - - @trial.setter - def trial(self, trial): - """Sets the trial of this SubscriberInvite. - - - :param trial: The trial of this SubscriberInvite. # noqa: E501 - :type trial: Trial - """ - - self._trial = trial - - @property - def name(self): - """Gets the name of this SubscriberInvite. # noqa: E501 - - Name # noqa: E501 - - :return: The name of this SubscriberInvite. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SubscriberInvite. - - Name # noqa: E501 - - :param name: The name of this SubscriberInvite. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def email(self): - """Gets the email of this SubscriberInvite. # noqa: E501 - - Email # noqa: E501 - - :return: The email of this SubscriberInvite. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this SubscriberInvite. - - Email # noqa: E501 - - :param email: The email of this SubscriberInvite. # noqa: E501 - :type email: str - """ - - self._email = email - - @property - def coupon_code(self): - """Gets the coupon_code of this SubscriberInvite. # noqa: E501 - - Coupon code # noqa: E501 - - :return: The coupon_code of this SubscriberInvite. # noqa: E501 - :rtype: str - """ - return self._coupon_code - - @coupon_code.setter - def coupon_code(self, coupon_code): - """Sets the coupon_code of this SubscriberInvite. - - Coupon code # noqa: E501 - - :param coupon_code: The coupon_code of this SubscriberInvite. # noqa: E501 - :type coupon_code: str - """ - if self.local_vars_configuration.client_side_validation and coupon_code is None: # noqa: E501 - raise ValueError("Invalid value for `coupon_code`, must not be `None`") # noqa: E501 - - self._coupon_code = coupon_code - - @property - def domain(self): - """Gets the domain of this SubscriberInvite. # noqa: E501 - - Domain # noqa: E501 - - :return: The domain of this SubscriberInvite. # noqa: E501 - :rtype: str - """ - return self._domain - - @domain.setter - def domain(self, domain): - """Sets the domain of this SubscriberInvite. - - Domain # noqa: E501 - - :param domain: The domain of this SubscriberInvite. # noqa: E501 - :type domain: str - """ - - self._domain = domain - - @property - def aggregate(self): - """Gets the aggregate of this SubscriberInvite. # noqa: E501 - - Aggregate # noqa: E501 - - :return: The aggregate of this SubscriberInvite. # noqa: E501 - :rtype: str - """ - return self._aggregate - - @aggregate.setter - def aggregate(self, aggregate): - """Sets the aggregate of this SubscriberInvite. - - Aggregate # noqa: E501 - - :param aggregate: The aggregate of this SubscriberInvite. # noqa: E501 - :type aggregate: str - """ - if self.local_vars_configuration.client_side_validation and aggregate is None: # noqa: E501 - raise ValueError("Invalid value for `aggregate`, must not be `None`") # noqa: E501 - - self._aggregate = aggregate - - @property - def use_by(self): - """Gets the use_by of this SubscriberInvite. # noqa: E501 - - Used By # noqa: E501 - - :return: The use_by of this SubscriberInvite. # noqa: E501 - :rtype: str - """ - return self._use_by - - @use_by.setter - def use_by(self, use_by): - """Sets the use_by of this SubscriberInvite. - - Used By # noqa: E501 - - :param use_by: The use_by of this SubscriberInvite. # noqa: E501 - :type use_by: str - """ - - self._use_by = use_by - - @property - def active(self): - """Gets the active of this SubscriberInvite. # noqa: E501 - - Is Active flag # noqa: E501 - - :return: The active of this SubscriberInvite. # noqa: E501 - :rtype: bool - """ - return self._active - - @active.setter - def active(self, active): - """Sets the active of this SubscriberInvite. - - Is Active flag # noqa: E501 - - :param active: The active of this SubscriberInvite. # noqa: E501 - :type active: bool - """ - if self.local_vars_configuration.client_side_validation and active is None: # noqa: E501 - raise ValueError("Invalid value for `active`, must not be `None`") # noqa: E501 - - self._active = active - - @property - def reusable(self): - """Gets the reusable of this SubscriberInvite. # noqa: E501 - - Is reusable flag # noqa: E501 - - :return: The reusable of this SubscriberInvite. # noqa: E501 - :rtype: bool - """ - return self._reusable - - @reusable.setter - def reusable(self, reusable): - """Sets the reusable of this SubscriberInvite. - - Is reusable flag # noqa: E501 - - :param reusable: The reusable of this SubscriberInvite. # noqa: E501 - :type reusable: bool - """ - if self.local_vars_configuration.client_side_validation and reusable is None: # noqa: E501 - raise ValueError("Invalid value for `reusable`, must not be `None`") # noqa: E501 - - self._reusable = reusable - - @property - def created_at(self): - """Gets the created_at of this SubscriberInvite. # noqa: E501 - - Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The created_at of this SubscriberInvite. # noqa: E501 - :rtype: str - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this SubscriberInvite. - - Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param created_at: The created_at of this SubscriberInvite. # noqa: E501 - :type created_at: str - """ - if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 - raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this SubscriberInvite. # noqa: E501 - - Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The updated_at of this SubscriberInvite. # noqa: E501 - :rtype: str - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this SubscriberInvite. - - Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param updated_at: The updated_at of this SubscriberInvite. # noqa: E501 - :type updated_at: str - """ - if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 - raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 - - self._updated_at = updated_at - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SubscriberInvite): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, SubscriberInvite): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/team.py b/corellium_api/models/team.py deleted file mode 100644 index 7fc5dd9..0000000 --- a/corellium_api/models/team.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Team(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'label': 'str', - 'users': 'list[User]' - } - - attribute_map = { - 'id': 'id', - 'label': 'label', - 'users': 'users' - } - - def __init__(self, id=None, label=None, users=None, local_vars_configuration=None): # noqa: E501 - """Team - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._label = None - self._users = None - self.discriminator = None - - self.id = id - self.label = label - self.users = users - - @property - def id(self): - """Gets the id of this Team. # noqa: E501 - - Team ID # noqa: E501 - - :return: The id of this Team. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Team. - - Team ID # noqa: E501 - - :param id: The id of this Team. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def label(self): - """Gets the label of this Team. # noqa: E501 - - Team Label # noqa: E501 - - :return: The label of this Team. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this Team. - - Team Label # noqa: E501 - - :param label: The label of this Team. # noqa: E501 - :type label: str - """ - if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 - raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 - - self._label = label - - @property - def users(self): - """Gets the users of this Team. # noqa: E501 - - Users # noqa: E501 - - :return: The users of this Team. # noqa: E501 - :rtype: list[User] - """ - return self._users - - @users.setter - def users(self, users): - """Sets the users of this Team. - - Users # noqa: E501 - - :param users: The users of this Team. # noqa: E501 - :type users: list[User] - """ - - self._users = users - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Team): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Team): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/team_create.py b/corellium_api/models/team_create.py deleted file mode 100644 index 787c653..0000000 --- a/corellium_api/models/team_create.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TeamCreate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str' - } - - attribute_map = { - 'id': 'id' - } - - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - """TeamCreate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self.discriminator = None - - self.id = id - - @property - def id(self): - """Gets the id of this TeamCreate. # noqa: E501 - - ID of newly created team # noqa: E501 - - :return: The id of this TeamCreate. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TeamCreate. - - ID of newly created team # noqa: E501 - - :param id: The id of this TeamCreate. # noqa: E501 - :type id: str - """ - - self._id = id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TeamCreate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TeamCreate): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/test_assessment_dto.py b/corellium_api/models/test_assessment_dto.py deleted file mode 100644 index eba7e5d..0000000 --- a/corellium_api/models/test_assessment_dto.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TestAssessmentDto(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'invert': 'bool', - 'grep': 'str' - } - - attribute_map = { - 'invert': 'invert', - 'grep': 'grep' - } - - def __init__(self, invert=None, grep=None, local_vars_configuration=None): # noqa: E501 - """TestAssessmentDto - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._invert = None - self._grep = None - self.discriminator = None - - if invert is not None: - self.invert = invert - if grep is not None: - self.grep = grep - - @property - def invert(self): - """Gets the invert of this TestAssessmentDto. # noqa: E501 - - - :return: The invert of this TestAssessmentDto. # noqa: E501 - :rtype: bool - """ - return self._invert - - @invert.setter - def invert(self, invert): - """Sets the invert of this TestAssessmentDto. - - - :param invert: The invert of this TestAssessmentDto. # noqa: E501 - :type invert: bool - """ - - self._invert = invert - - @property - def grep(self): - """Gets the grep of this TestAssessmentDto. # noqa: E501 - - - :return: The grep of this TestAssessmentDto. # noqa: E501 - :rtype: str - """ - return self._grep - - @grep.setter - def grep(self, grep): - """Sets the grep of this TestAssessmentDto. - - - :param grep: The grep of this TestAssessmentDto. # noqa: E501 - :type grep: str - """ - - self._grep = grep - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TestAssessmentDto): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TestAssessmentDto): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/text_input.py b/corellium_api/models/text_input.py deleted file mode 100644 index 80ec768..0000000 --- a/corellium_api/models/text_input.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TextInput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'required': 'str', - 'key_duration': 'float' - } - - attribute_map = { - 'required': 'required', - 'key_duration': 'keyDuration' - } - - def __init__(self, required=None, key_duration=None, local_vars_configuration=None): # noqa: E501 - """TextInput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._required = None - self._key_duration = None - self.discriminator = None - - self.required = required - self.key_duration = key_duration - - @property - def required(self): - """Gets the required of this TextInput. # noqa: E501 - - text to type # noqa: E501 - - :return: The required of this TextInput. # noqa: E501 - :rtype: str - """ - return self._required - - @required.setter - def required(self, required): - """Sets the required of this TextInput. - - text to type # noqa: E501 - - :param required: The required of this TextInput. # noqa: E501 - :type required: str - """ - if self.local_vars_configuration.client_side_validation and required is None: # noqa: E501 - raise ValueError("Invalid value for `required`, must not be `None`") # noqa: E501 - - self._required = required - - @property - def key_duration(self): - """Gets the key_duration of this TextInput. # noqa: E501 - - How long to take to type each key. 150ms if not defined. # noqa: E501 - - :return: The key_duration of this TextInput. # noqa: E501 - :rtype: float - """ - return self._key_duration - - @key_duration.setter - def key_duration(self, key_duration): - """Sets the key_duration of this TextInput. - - How long to take to type each key. 150ms if not defined. # noqa: E501 - - :param key_duration: The key_duration of this TextInput. # noqa: E501 - :type key_duration: float - """ - - self._key_duration = key_duration - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TextInput): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TextInput): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/token.py b/corellium_api/models/token.py deleted file mode 100644 index dfebc98..0000000 --- a/corellium_api/models/token.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Token(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'token': 'str' - } - - attribute_map = { - 'token': 'token' - } - - def __init__(self, token=None, local_vars_configuration=None): # noqa: E501 - """Token - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._token = None - self.discriminator = None - - self.token = token - - @property - def token(self): - """Gets the token of this Token. # noqa: E501 - - # noqa: E501 - - :return: The token of this Token. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this Token. - - # noqa: E501 - - :param token: The token of this Token. # noqa: E501 - :type token: str - """ - - self._token = token - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Token): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Token): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/touch_curve_input.py b/corellium_api/models/touch_curve_input.py deleted file mode 100644 index 7e2e1d9..0000000 --- a/corellium_api/models/touch_curve_input.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TouchCurveInput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'start': 'object', - 'end': 'object', - 'bezier_points': 'list[object]', - 'start_buttons': 'list[TouchInputButtonsInner]', - 'end_buttons': 'list[TouchInputButtonsInner]', - 'normalized': 'bool', - 'wait': 'float', - 'duration': 'float' - } - - attribute_map = { - 'start': 'start', - 'end': 'end', - 'bezier_points': 'bezierPoints', - 'start_buttons': 'startButtons', - 'end_buttons': 'endButtons', - 'normalized': 'normalized', - 'wait': 'wait', - 'duration': 'duration' - } - - def __init__(self, start=None, end=None, bezier_points=None, start_buttons=None, end_buttons=None, normalized=None, wait=None, duration=None, local_vars_configuration=None): # noqa: E501 - """TouchCurveInput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._start = None - self._end = None - self._bezier_points = None - self._start_buttons = None - self._end_buttons = None - self._normalized = None - self._wait = None - self._duration = None - self.discriminator = None - - self.start = start - self.end = end - self.bezier_points = bezier_points - self.start_buttons = start_buttons - self.end_buttons = end_buttons - self.normalized = normalized - self.wait = wait - self.duration = duration - - @property - def start(self): - """Gets the start of this TouchCurveInput. # noqa: E501 - - Finger Positions # noqa: E501 - - :return: The start of this TouchCurveInput. # noqa: E501 - :rtype: object - """ - return self._start - - @start.setter - def start(self, start): - """Sets the start of this TouchCurveInput. - - Finger Positions # noqa: E501 - - :param start: The start of this TouchCurveInput. # noqa: E501 - :type start: object - """ - if self.local_vars_configuration.client_side_validation and start is None: # noqa: E501 - raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 - - self._start = start - - @property - def end(self): - """Gets the end of this TouchCurveInput. # noqa: E501 - - Finger Positions # noqa: E501 - - :return: The end of this TouchCurveInput. # noqa: E501 - :rtype: object - """ - return self._end - - @end.setter - def end(self, end): - """Sets the end of this TouchCurveInput. - - Finger Positions # noqa: E501 - - :param end: The end of this TouchCurveInput. # noqa: E501 - :type end: object - """ - if self.local_vars_configuration.client_side_validation and end is None: # noqa: E501 - raise ValueError("Invalid value for `end`, must not be `None`") # noqa: E501 - - self._end = end - - @property - def bezier_points(self): - """Gets the bezier_points of this TouchCurveInput. # noqa: E501 - - array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined. # noqa: E501 - - :return: The bezier_points of this TouchCurveInput. # noqa: E501 - :rtype: list[object] - """ - return self._bezier_points - - @bezier_points.setter - def bezier_points(self, bezier_points): - """Sets the bezier_points of this TouchCurveInput. - - array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined. # noqa: E501 - - :param bezier_points: The bezier_points of this TouchCurveInput. # noqa: E501 - :type bezier_points: list[object] - """ - - self._bezier_points = bezier_points - - @property - def start_buttons(self): - """Gets the start_buttons of this TouchCurveInput. # noqa: E501 - - Buttons to be held during this curve. # noqa: E501 - - :return: The start_buttons of this TouchCurveInput. # noqa: E501 - :rtype: list[TouchInputButtonsInner] - """ - return self._start_buttons - - @start_buttons.setter - def start_buttons(self, start_buttons): - """Sets the start_buttons of this TouchCurveInput. - - Buttons to be held during this curve. # noqa: E501 - - :param start_buttons: The start_buttons of this TouchCurveInput. # noqa: E501 - :type start_buttons: list[TouchInputButtonsInner] - """ - if self.local_vars_configuration.client_side_validation and start_buttons is None: # noqa: E501 - raise ValueError("Invalid value for `start_buttons`, must not be `None`") # noqa: E501 - - self._start_buttons = start_buttons - - @property - def end_buttons(self): - """Gets the end_buttons of this TouchCurveInput. # noqa: E501 - - Buttons to be left held after this curve. Same as startButtons if not defined. # noqa: E501 - - :return: The end_buttons of this TouchCurveInput. # noqa: E501 - :rtype: list[TouchInputButtonsInner] - """ - return self._end_buttons - - @end_buttons.setter - def end_buttons(self, end_buttons): - """Sets the end_buttons of this TouchCurveInput. - - Buttons to be left held after this curve. Same as startButtons if not defined. # noqa: E501 - - :param end_buttons: The end_buttons of this TouchCurveInput. # noqa: E501 - :type end_buttons: list[TouchInputButtonsInner] - """ - - self._end_buttons = end_buttons - - @property - def normalized(self): - """Gets the normalized of this TouchCurveInput. # noqa: E501 - - true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) # noqa: E501 - - :return: The normalized of this TouchCurveInput. # noqa: E501 - :rtype: bool - """ - return self._normalized - - @normalized.setter - def normalized(self, normalized): - """Sets the normalized of this TouchCurveInput. - - true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) # noqa: E501 - - :param normalized: The normalized of this TouchCurveInput. # noqa: E501 - :type normalized: bool - """ - - self._normalized = normalized - - @property - def wait(self): - """Gets the wait of this TouchCurveInput. # noqa: E501 - - Duration to wait before this input is executed. Instant if not defined. # noqa: E501 - - :return: The wait of this TouchCurveInput. # noqa: E501 - :rtype: float - """ - return self._wait - - @wait.setter - def wait(self, wait): - """Sets the wait of this TouchCurveInput. - - Duration to wait before this input is executed. Instant if not defined. # noqa: E501 - - :param wait: The wait of this TouchCurveInput. # noqa: E501 - :type wait: float - """ - - self._wait = wait - - @property - def duration(self): - """Gets the duration of this TouchCurveInput. # noqa: E501 - - Duration to execute this curve over. # noqa: E501 - - :return: The duration of this TouchCurveInput. # noqa: E501 - :rtype: float - """ - return self._duration - - @duration.setter - def duration(self, duration): - """Sets the duration of this TouchCurveInput. - - Duration to execute this curve over. # noqa: E501 - - :param duration: The duration of this TouchCurveInput. # noqa: E501 - :type duration: float - """ - if self.local_vars_configuration.client_side_validation and duration is None: # noqa: E501 - raise ValueError("Invalid value for `duration`, must not be `None`") # noqa: E501 - - self._duration = duration - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TouchCurveInput): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TouchCurveInput): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/touch_input.py b/corellium_api/models/touch_input.py deleted file mode 100644 index 36f9ab3..0000000 --- a/corellium_api/models/touch_input.py +++ /dev/null @@ -1,215 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TouchInput(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'position': 'object', - 'buttons': 'list[TouchInputButtonsInner]', - 'normalized': 'bool', - 'wait': 'float' - } - - attribute_map = { - 'position': 'position', - 'buttons': 'buttons', - 'normalized': 'normalized', - 'wait': 'wait' - } - - def __init__(self, position=None, buttons=None, normalized=None, wait=None, local_vars_configuration=None): # noqa: E501 - """TouchInput - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._position = None - self._buttons = None - self._normalized = None - self._wait = None - self.discriminator = None - - self.position = position - self.buttons = buttons - self.normalized = normalized - self.wait = wait - - @property - def position(self): - """Gets the position of this TouchInput. # noqa: E501 - - Finger Positions # noqa: E501 - - :return: The position of this TouchInput. # noqa: E501 - :rtype: object - """ - return self._position - - @position.setter - def position(self, position): - """Sets the position of this TouchInput. - - Finger Positions # noqa: E501 - - :param position: The position of this TouchInput. # noqa: E501 - :type position: object - """ - if self.local_vars_configuration.client_side_validation and position is None: # noqa: E501 - raise ValueError("Invalid value for `position`, must not be `None`") # noqa: E501 - - self._position = position - - @property - def buttons(self): - """Gets the buttons of this TouchInput. # noqa: E501 - - Buttons to be held when this position is reached. Either a Button enum object or an ASCII character. No change if not defined. # noqa: E501 - - :return: The buttons of this TouchInput. # noqa: E501 - :rtype: list[TouchInputButtonsInner] - """ - return self._buttons - - @buttons.setter - def buttons(self, buttons): - """Sets the buttons of this TouchInput. - - Buttons to be held when this position is reached. Either a Button enum object or an ASCII character. No change if not defined. # noqa: E501 - - :param buttons: The buttons of this TouchInput. # noqa: E501 - :type buttons: list[TouchInputButtonsInner] - """ - - self._buttons = buttons - - @property - def normalized(self): - """Gets the normalized of this TouchInput. # noqa: E501 - - true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) # noqa: E501 - - :return: The normalized of this TouchInput. # noqa: E501 - :rtype: bool - """ - return self._normalized - - @normalized.setter - def normalized(self, normalized): - """Sets the normalized of this TouchInput. - - true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) # noqa: E501 - - :param normalized: The normalized of this TouchInput. # noqa: E501 - :type normalized: bool - """ - - self._normalized = normalized - - @property - def wait(self): - """Gets the wait of this TouchInput. # noqa: E501 - - Duration to wait before this input is executed. Instant if not defined. # noqa: E501 - - :return: The wait of this TouchInput. # noqa: E501 - :rtype: float - """ - return self._wait - - @wait.setter - def wait(self, wait): - """Sets the wait of this TouchInput. - - Duration to wait before this input is executed. Instant if not defined. # noqa: E501 - - :param wait: The wait of this TouchInput. # noqa: E501 - :type wait: float - """ - - self._wait = wait - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TouchInput): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TouchInput): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/touch_input_buttons_inner.py b/corellium_api/models/touch_input_buttons_inner.py deleted file mode 100644 index 8199da2..0000000 --- a/corellium_api/models/touch_input_buttons_inner.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TouchInputButtonsInner(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self, local_vars_configuration=None): # noqa: E501 - """TouchInputButtonsInner - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - self.discriminator = None - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TouchInputButtonsInner): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TouchInputButtonsInner): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/trial.py b/corellium_api/models/trial.py deleted file mode 100644 index 2571828..0000000 --- a/corellium_api/models/trial.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class Trial(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'default_duration': 'float', - 'default_hours': 'float', - 'default_devices': 'float', - 'default_cores': 'float' - } - - attribute_map = { - 'default_duration': 'defaultDuration', - 'default_hours': 'defaultHours', - 'default_devices': 'defaultDevices', - 'default_cores': 'defaultCores' - } - - def __init__(self, default_duration=None, default_hours=None, default_devices=None, default_cores=None, local_vars_configuration=None): # noqa: E501 - """Trial - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._default_duration = None - self._default_hours = None - self._default_devices = None - self._default_cores = None - self.discriminator = None - - self.default_duration = default_duration - self.default_hours = default_hours - self.default_devices = default_devices - self.default_cores = default_cores - - @property - def default_duration(self): - """Gets the default_duration of this Trial. # noqa: E501 - - Maintenance message # noqa: E501 - - :return: The default_duration of this Trial. # noqa: E501 - :rtype: float - """ - return self._default_duration - - @default_duration.setter - def default_duration(self, default_duration): - """Sets the default_duration of this Trial. - - Maintenance message # noqa: E501 - - :param default_duration: The default_duration of this Trial. # noqa: E501 - :type default_duration: float - """ - - self._default_duration = default_duration - - @property - def default_hours(self): - """Gets the default_hours of this Trial. # noqa: E501 - - Maintenance header # noqa: E501 - - :return: The default_hours of this Trial. # noqa: E501 - :rtype: float - """ - return self._default_hours - - @default_hours.setter - def default_hours(self, default_hours): - """Sets the default_hours of this Trial. - - Maintenance header # noqa: E501 - - :param default_hours: The default_hours of this Trial. # noqa: E501 - :type default_hours: float - """ - - self._default_hours = default_hours - - @property - def default_devices(self): - """Gets the default_devices of this Trial. # noqa: E501 - - Maintenance header # noqa: E501 - - :return: The default_devices of this Trial. # noqa: E501 - :rtype: float - """ - return self._default_devices - - @default_devices.setter - def default_devices(self, default_devices): - """Sets the default_devices of this Trial. - - Maintenance header # noqa: E501 - - :param default_devices: The default_devices of this Trial. # noqa: E501 - :type default_devices: float - """ - - self._default_devices = default_devices - - @property - def default_cores(self): - """Gets the default_cores of this Trial. # noqa: E501 - - Maintenance header # noqa: E501 - - :return: The default_cores of this Trial. # noqa: E501 - :rtype: float - """ - return self._default_cores - - @default_cores.setter - def default_cores(self, default_cores): - """Sets the default_cores of this Trial. - - Maintenance header # noqa: E501 - - :param default_cores: The default_cores of this Trial. # noqa: E501 - :type default_cores: float - """ - - self._default_cores = default_cores - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Trial): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Trial): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/trial_extension.py b/corellium_api/models/trial_extension.py deleted file mode 100644 index d817379..0000000 --- a/corellium_api/models/trial_extension.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TrialExtension(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'duration': 'float', - 'reason': 'str', - 'denied': 'bool', - 'denied_reason': 'str' - } - - attribute_map = { - 'duration': 'duration', - 'reason': 'reason', - 'denied': 'denied', - 'denied_reason': 'deniedReason' - } - - def __init__(self, duration=None, reason=None, denied=None, denied_reason=None, local_vars_configuration=None): # noqa: E501 - """TrialExtension - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._duration = None - self._reason = None - self._denied = None - self._denied_reason = None - self.discriminator = None - - self.duration = duration - self.reason = reason - self.denied = denied - self.denied_reason = denied_reason - - @property - def duration(self): - """Gets the duration of this TrialExtension. # noqa: E501 - - how many additional days? # noqa: E501 - - :return: The duration of this TrialExtension. # noqa: E501 - :rtype: float - """ - return self._duration - - @duration.setter - def duration(self, duration): - """Sets the duration of this TrialExtension. - - how many additional days? # noqa: E501 - - :param duration: The duration of this TrialExtension. # noqa: E501 - :type duration: float - """ - - self._duration = duration - - @property - def reason(self): - """Gets the reason of this TrialExtension. # noqa: E501 - - why does the user want more time? # noqa: E501 - - :return: The reason of this TrialExtension. # noqa: E501 - :rtype: str - """ - return self._reason - - @reason.setter - def reason(self, reason): - """Sets the reason of this TrialExtension. - - why does the user want more time? # noqa: E501 - - :param reason: The reason of this TrialExtension. # noqa: E501 - :type reason: str - """ - - self._reason = reason - - @property - def denied(self): - """Gets the denied of this TrialExtension. # noqa: E501 - - # noqa: E501 - - :return: The denied of this TrialExtension. # noqa: E501 - :rtype: bool - """ - return self._denied - - @denied.setter - def denied(self, denied): - """Sets the denied of this TrialExtension. - - # noqa: E501 - - :param denied: The denied of this TrialExtension. # noqa: E501 - :type denied: bool - """ - - self._denied = denied - - @property - def denied_reason(self): - """Gets the denied_reason of this TrialExtension. # noqa: E501 - - explanation for why the request was denied # noqa: E501 - - :return: The denied_reason of this TrialExtension. # noqa: E501 - :rtype: str - """ - return self._denied_reason - - @denied_reason.setter - def denied_reason(self, denied_reason): - """Sets the denied_reason of this TrialExtension. - - explanation for why the request was denied # noqa: E501 - - :param denied_reason: The denied_reason of this TrialExtension. # noqa: E501 - :type denied_reason: str - """ - - self._denied_reason = denied_reason - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TrialExtension): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TrialExtension): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/trial_request_metadata.py b/corellium_api/models/trial_request_metadata.py deleted file mode 100644 index 7a6f95d..0000000 --- a/corellium_api/models/trial_request_metadata.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TrialRequestMetadata(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'company': 'str', - 'malware': 'bool', - 'research': 'bool', - 'pentest': 'bool', - 'other': 'str' - } - - attribute_map = { - 'name': 'name', - 'company': 'company', - 'malware': 'malware', - 'research': 'research', - 'pentest': 'pentest', - 'other': 'other' - } - - def __init__(self, name=None, company=None, malware=None, research=None, pentest=None, other=None, local_vars_configuration=None): # noqa: E501 - """TrialRequestMetadata - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._company = None - self._malware = None - self._research = None - self._pentest = None - self._other = None - self.discriminator = None - - self.name = name - self.company = company - self.malware = malware - self.research = research - self.pentest = pentest - self.other = other - - @property - def name(self): - """Gets the name of this TrialRequestMetadata. # noqa: E501 - - # noqa: E501 - - :return: The name of this TrialRequestMetadata. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TrialRequestMetadata. - - # noqa: E501 - - :param name: The name of this TrialRequestMetadata. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def company(self): - """Gets the company of this TrialRequestMetadata. # noqa: E501 - - provided company name # noqa: E501 - - :return: The company of this TrialRequestMetadata. # noqa: E501 - :rtype: str - """ - return self._company - - @company.setter - def company(self, company): - """Sets the company of this TrialRequestMetadata. - - provided company name # noqa: E501 - - :param company: The company of this TrialRequestMetadata. # noqa: E501 - :type company: str - """ - - self._company = company - - @property - def malware(self): - """Gets the malware of this TrialRequestMetadata. # noqa: E501 - - option from sign up form, interesting using for malware # noqa: E501 - - :return: The malware of this TrialRequestMetadata. # noqa: E501 - :rtype: bool - """ - return self._malware - - @malware.setter - def malware(self, malware): - """Sets the malware of this TrialRequestMetadata. - - option from sign up form, interesting using for malware # noqa: E501 - - :param malware: The malware of this TrialRequestMetadata. # noqa: E501 - :type malware: bool - """ - - self._malware = malware - - @property - def research(self): - """Gets the research of this TrialRequestMetadata. # noqa: E501 - - option from sign up form, interesting using for research # noqa: E501 - - :return: The research of this TrialRequestMetadata. # noqa: E501 - :rtype: bool - """ - return self._research - - @research.setter - def research(self, research): - """Sets the research of this TrialRequestMetadata. - - option from sign up form, interesting using for research # noqa: E501 - - :param research: The research of this TrialRequestMetadata. # noqa: E501 - :type research: bool - """ - - self._research = research - - @property - def pentest(self): - """Gets the pentest of this TrialRequestMetadata. # noqa: E501 - - option from sign up form, interesting using for pentesting # noqa: E501 - - :return: The pentest of this TrialRequestMetadata. # noqa: E501 - :rtype: bool - """ - return self._pentest - - @pentest.setter - def pentest(self, pentest): - """Sets the pentest of this TrialRequestMetadata. - - option from sign up form, interesting using for pentesting # noqa: E501 - - :param pentest: The pentest of this TrialRequestMetadata. # noqa: E501 - :type pentest: bool - """ - - self._pentest = pentest - - @property - def other(self): - """Gets the other of this TrialRequestMetadata. # noqa: E501 - - option from sign up form, interesting using for other area added here # noqa: E501 - - :return: The other of this TrialRequestMetadata. # noqa: E501 - :rtype: str - """ - return self._other - - @other.setter - def other(self, other): - """Sets the other of this TrialRequestMetadata. - - option from sign up form, interesting using for other area added here # noqa: E501 - - :param other: The other of this TrialRequestMetadata. # noqa: E501 - :type other: str - """ - - self._other = other - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TrialRequestMetadata): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TrialRequestMetadata): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/trial_request_options.py b/corellium_api/models/trial_request_options.py deleted file mode 100644 index c1480bb..0000000 --- a/corellium_api/models/trial_request_options.py +++ /dev/null @@ -1,265 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class TrialRequestOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'address': 'Address', - 'email': 'str', - 'name': 'str', - 'metadata': 'TrialRequestMetadata', - 'enterprise': 'bool', - 'token': 'str' - } - - attribute_map = { - 'address': 'address', - 'email': 'email', - 'name': 'name', - 'metadata': 'metadata', - 'enterprise': 'enterprise', - 'token': 'token' - } - - def __init__(self, address=None, email=None, name=None, metadata=None, enterprise=None, token=None, local_vars_configuration=None): # noqa: E501 - """TrialRequestOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._address = None - self._email = None - self._name = None - self._metadata = None - self._enterprise = None - self._token = None - self.discriminator = None - - if address is not None: - self.address = address - self.email = email - self.name = name - if metadata is not None: - self.metadata = metadata - self.enterprise = enterprise - self.token = token - - @property - def address(self): - """Gets the address of this TrialRequestOptions. # noqa: E501 - - - :return: The address of this TrialRequestOptions. # noqa: E501 - :rtype: Address - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this TrialRequestOptions. - - - :param address: The address of this TrialRequestOptions. # noqa: E501 - :type address: Address - """ - - self._address = address - - @property - def email(self): - """Gets the email of this TrialRequestOptions. # noqa: E501 - - The user's email address. # noqa: E501 - - :return: The email of this TrialRequestOptions. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this TrialRequestOptions. - - The user's email address. # noqa: E501 - - :param email: The email of this TrialRequestOptions. # noqa: E501 - :type email: str - """ - - self._email = email - - @property - def name(self): - """Gets the name of this TrialRequestOptions. # noqa: E501 - - The user's full name. # noqa: E501 - - :return: The name of this TrialRequestOptions. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TrialRequestOptions. - - The user's full name. # noqa: E501 - - :param name: The name of this TrialRequestOptions. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def metadata(self): - """Gets the metadata of this TrialRequestOptions. # noqa: E501 - - - :return: The metadata of this TrialRequestOptions. # noqa: E501 - :rtype: TrialRequestMetadata - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this TrialRequestOptions. - - - :param metadata: The metadata of this TrialRequestOptions. # noqa: E501 - :type metadata: TrialRequestMetadata - """ - - self._metadata = metadata - - @property - def enterprise(self): - """Gets the enterprise of this TrialRequestOptions. # noqa: E501 - - If true, create an enterprise domain. # noqa: E501 - - :return: The enterprise of this TrialRequestOptions. # noqa: E501 - :rtype: bool - """ - return self._enterprise - - @enterprise.setter - def enterprise(self, enterprise): - """Sets the enterprise of this TrialRequestOptions. - - If true, create an enterprise domain. # noqa: E501 - - :param enterprise: The enterprise of this TrialRequestOptions. # noqa: E501 - :type enterprise: bool - """ - - self._enterprise = enterprise - - @property - def token(self): - """Gets the token of this TrialRequestOptions. # noqa: E501 - - Stripe payment token. # noqa: E501 - - :return: The token of this TrialRequestOptions. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this TrialRequestOptions. - - Stripe payment token. # noqa: E501 - - :param token: The token of this TrialRequestOptions. # noqa: E501 - :type token: str - """ - - self._token = token - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TrialRequestOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TrialRequestOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/update_assessment_dto.py b/corellium_api/models/update_assessment_dto.py deleted file mode 100644 index 059d213..0000000 --- a/corellium_api/models/update_assessment_dto.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UpdateAssessmentDto(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'status': 'str' - } - - attribute_map = { - 'status': 'status' - } - - def __init__(self, status=None, local_vars_configuration=None): # noqa: E501 - """UpdateAssessmentDto - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._status = None - self.discriminator = None - - self.status = status - - @property - def status(self): - """Gets the status of this UpdateAssessmentDto. # noqa: E501 - - - :return: The status of this UpdateAssessmentDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this UpdateAssessmentDto. - - - :param status: The status of this UpdateAssessmentDto. # noqa: E501 - :type status: str - """ - if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - - self._status = status - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpdateAssessmentDto): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UpdateAssessmentDto): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/update_extension.py b/corellium_api/models/update_extension.py deleted file mode 100644 index 0bb2778..0000000 --- a/corellium_api/models/update_extension.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UpdateExtension(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'enabled': 'bool' - } - - attribute_map = { - 'enabled': 'enabled' - } - - def __init__(self, enabled=None, local_vars_configuration=None): # noqa: E501 - """UpdateExtension - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._enabled = None - self.discriminator = None - - self.enabled = enabled - - @property - def enabled(self): - """Gets the enabled of this UpdateExtension. # noqa: E501 - - If true, instances requiring this extension can be created or started # noqa: E501 - - :return: The enabled of this UpdateExtension. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this UpdateExtension. - - If true, instances requiring this extension can be created or started # noqa: E501 - - :param enabled: The enabled of this UpdateExtension. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpdateExtension): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UpdateExtension): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/update_interconnect_request.py b/corellium_api/models/update_interconnect_request.py deleted file mode 100644 index 27c0224..0000000 --- a/corellium_api/models/update_interconnect_request.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UpdateInterconnectRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'interfaces': 'list[object]', - 'interfaces': 'str' - } - - attribute_map = { - 'name': 'name', - 'interfaces': 'interfaces', - 'interfaces': 'interfaces[]' - } - - def __init__(self, name=None, interfaces=None, interfaces=None, local_vars_configuration=None): # noqa: E501 - """UpdateInterconnectRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._interfaces = None - self._interfaces = None - self.discriminator = None - - self.name = name - self.interfaces = interfaces - self.interfaces = interfaces - - @property - def name(self): - """Gets the name of this UpdateInterconnectRequest. # noqa: E501 - - The name of the interconnect # noqa: E501 - - :return: The name of this UpdateInterconnectRequest. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UpdateInterconnectRequest. - - The name of the interconnect # noqa: E501 - - :param name: The name of this UpdateInterconnectRequest. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def interfaces(self): - """Gets the interfaces of this UpdateInterconnectRequest. # noqa: E501 - - Array of interfaces with deviceId and interfaceId # noqa: E501 - - :return: The interfaces of this UpdateInterconnectRequest. # noqa: E501 - :rtype: list[object] - """ - return self._interfaces - - @interfaces.setter - def interfaces(self, interfaces): - """Sets the interfaces of this UpdateInterconnectRequest. - - Array of interfaces with deviceId and interfaceId # noqa: E501 - - :param interfaces: The interfaces of this UpdateInterconnectRequest. # noqa: E501 - :type interfaces: list[object] - """ - - self._interfaces = interfaces - - @property - def interfaces(self): - """Gets the interfaces of this UpdateInterconnectRequest. # noqa: E501 - - The interface identifier # noqa: E501 - - :return: The interfaces of this UpdateInterconnectRequest. # noqa: E501 - :rtype: str - """ - return self._interfaces - - @interfaces.setter - def interfaces(self, interfaces): - """Sets the interfaces of this UpdateInterconnectRequest. - - The interface identifier # noqa: E501 - - :param interfaces: The interfaces of this UpdateInterconnectRequest. # noqa: E501 - :type interfaces: str - """ - - self._interfaces = interfaces - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpdateInterconnectRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UpdateInterconnectRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/update_network_connection_options.py b/corellium_api/models/update_network_connection_options.py deleted file mode 100644 index 772210f..0000000 --- a/corellium_api/models/update_network_connection_options.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UpdateNetworkConnectionOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'config': 'object' - } - - attribute_map = { - 'name': 'name', - 'config': 'config' - } - - def __init__(self, name=None, config=None, local_vars_configuration=None): # noqa: E501 - """UpdateNetworkConnectionOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._config = None - self.discriminator = None - - self.name = name - self.config = config - - @property - def name(self): - """Gets the name of this UpdateNetworkConnectionOptions. # noqa: E501 - - User specified name for this network connection. e.g. My Network Connection # noqa: E501 - - :return: The name of this UpdateNetworkConnectionOptions. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UpdateNetworkConnectionOptions. - - User specified name for this network connection. e.g. My Network Connection # noqa: E501 - - :param name: The name of this UpdateNetworkConnectionOptions. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def config(self): - """Gets the config of this UpdateNetworkConnectionOptions. # noqa: E501 - - An object containing network connection configuration data. Will vary based on network provider type. See examples. # noqa: E501 - - :return: The config of this UpdateNetworkConnectionOptions. # noqa: E501 - :rtype: object - """ - return self._config - - @config.setter - def config(self, config): - """Sets the config of this UpdateNetworkConnectionOptions. - - An object containing network connection configuration data. Will vary based on network provider type. See examples. # noqa: E501 - - :param config: The config of this UpdateNetworkConnectionOptions. # noqa: E501 - :type config: object - """ - - self._config = config - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpdateNetworkConnectionOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UpdateNetworkConnectionOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/update_trial_request_params.py b/corellium_api/models/update_trial_request_params.py deleted file mode 100644 index 2deb499..0000000 --- a/corellium_api/models/update_trial_request_params.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UpdateTrialRequestParams(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'extension_days': 'float', - 'extension_hours': 'float' - } - - attribute_map = { - 'extension_days': 'extensionDays', - 'extension_hours': 'extensionHours' - } - - def __init__(self, extension_days=None, extension_hours=None, local_vars_configuration=None): # noqa: E501 - """UpdateTrialRequestParams - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._extension_days = None - self._extension_hours = None - self.discriminator = None - - self.extension_days = extension_days - self.extension_hours = extension_hours - - @property - def extension_days(self): - """Gets the extension_days of this UpdateTrialRequestParams. # noqa: E501 - - Days to add to the trial before it ends. # noqa: E501 - - :return: The extension_days of this UpdateTrialRequestParams. # noqa: E501 - :rtype: float - """ - return self._extension_days - - @extension_days.setter - def extension_days(self, extension_days): - """Sets the extension_days of this UpdateTrialRequestParams. - - Days to add to the trial before it ends. # noqa: E501 - - :param extension_days: The extension_days of this UpdateTrialRequestParams. # noqa: E501 - :type extension_days: float - """ - - self._extension_days = extension_days - - @property - def extension_hours(self): - """Gets the extension_hours of this UpdateTrialRequestParams. # noqa: E501 - - Hours of usage to add to the trial. This will be either device-hours or core-hours depending on the trial. # noqa: E501 - - :return: The extension_hours of this UpdateTrialRequestParams. # noqa: E501 - :rtype: float - """ - return self._extension_hours - - @extension_hours.setter - def extension_hours(self, extension_hours): - """Sets the extension_hours of this UpdateTrialRequestParams. - - Hours of usage to add to the trial. This will be either device-hours or core-hours depending on the trial. # noqa: E501 - - :param extension_hours: The extension_hours of this UpdateTrialRequestParams. # noqa: E501 - :type extension_hours: float - """ - - self._extension_hours = extension_hours - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpdateTrialRequestParams): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UpdateTrialRequestParams): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/user.py b/corellium_api/models/user.py deleted file mode 100644 index dba503c..0000000 --- a/corellium_api/models/user.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class User(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'label': 'str', - 'name': 'str', - 'email': 'str', - 'administrator': 'bool', - 'can_edit_user_attributes': 'bool', - 'cluster_administrator': 'bool' - } - - attribute_map = { - 'id': 'id', - 'label': 'label', - 'name': 'name', - 'email': 'email', - 'administrator': 'administrator', - 'can_edit_user_attributes': 'canEditUserAttributes', - 'cluster_administrator': 'clusterAdministrator' - } - - def __init__(self, id=None, label=None, name=None, email=None, administrator=None, can_edit_user_attributes=None, cluster_administrator=None, local_vars_configuration=None): # noqa: E501 - """User - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self._label = None - self._name = None - self._email = None - self._administrator = None - self._can_edit_user_attributes = None - self._cluster_administrator = None - self.discriminator = None - - self.id = id - self.label = label - self.name = name - self.email = email - self.administrator = administrator - self.can_edit_user_attributes = can_edit_user_attributes - self.cluster_administrator = cluster_administrator - - @property - def id(self): - """Gets the id of this User. # noqa: E501 - - User ID # noqa: E501 - - :return: The id of this User. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this User. - - User ID # noqa: E501 - - :param id: The id of this User. # noqa: E501 - :type id: str - """ - if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def label(self): - """Gets the label of this User. # noqa: E501 - - User Label # noqa: E501 - - :return: The label of this User. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this User. - - User Label # noqa: E501 - - :param label: The label of this User. # noqa: E501 - :type label: str - """ - if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 - raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 - - self._label = label - - @property - def name(self): - """Gets the name of this User. # noqa: E501 - - User Name # noqa: E501 - - :return: The name of this User. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this User. - - User Name # noqa: E501 - - :param name: The name of this User. # noqa: E501 - :type name: str - """ - if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def email(self): - """Gets the email of this User. # noqa: E501 - - User Email # noqa: E501 - - :return: The email of this User. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this User. - - User Email # noqa: E501 - - :param email: The email of this User. # noqa: E501 - :type email: str - """ - if self.local_vars_configuration.client_side_validation and email is None: # noqa: E501 - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 - - self._email = email - - @property - def administrator(self): - """Gets the administrator of this User. # noqa: E501 - - the flag that specifies whether user is Administrator or not # noqa: E501 - - :return: The administrator of this User. # noqa: E501 - :rtype: bool - """ - return self._administrator - - @administrator.setter - def administrator(self, administrator): - """Sets the administrator of this User. - - the flag that specifies whether user is Administrator or not # noqa: E501 - - :param administrator: The administrator of this User. # noqa: E501 - :type administrator: bool - """ - - self._administrator = administrator - - @property - def can_edit_user_attributes(self): - """Gets the can_edit_user_attributes of this User. # noqa: E501 - - Flag to determine if user attributes are editable. # noqa: E501 - - :return: The can_edit_user_attributes of this User. # noqa: E501 - :rtype: bool - """ - return self._can_edit_user_attributes - - @can_edit_user_attributes.setter - def can_edit_user_attributes(self, can_edit_user_attributes): - """Sets the can_edit_user_attributes of this User. - - Flag to determine if user attributes are editable. # noqa: E501 - - :param can_edit_user_attributes: The can_edit_user_attributes of this User. # noqa: E501 - :type can_edit_user_attributes: bool - """ - - self._can_edit_user_attributes = can_edit_user_attributes - - @property - def cluster_administrator(self): - """Gets the cluster_administrator of this User. # noqa: E501 - - the flag that specifies whether user is cluster administrator or not # noqa: E501 - - :return: The cluster_administrator of this User. # noqa: E501 - :rtype: bool - """ - return self._cluster_administrator - - @cluster_administrator.setter - def cluster_administrator(self, cluster_administrator): - """Sets the cluster_administrator of this User. - - the flag that specifies whether user is cluster administrator or not # noqa: E501 - - :param cluster_administrator: The cluster_administrator of this User. # noqa: E501 - :type cluster_administrator: bool - """ - - self._cluster_administrator = cluster_administrator - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, User): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, User): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/user_create.py b/corellium_api/models/user_create.py deleted file mode 100644 index 56e7f2b..0000000 --- a/corellium_api/models/user_create.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UserCreate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'label': 'str', - 'password': 'str', - 'email': 'str', - 'administrator': 'bool', - 'cluster_administrator': 'bool' - } - - attribute_map = { - 'name': 'name', - 'label': 'label', - 'password': 'password', - 'email': 'email', - 'administrator': 'administrator', - 'cluster_administrator': 'clusterAdministrator' - } - - def __init__(self, name=None, label=None, password=None, email=None, administrator=None, cluster_administrator=None, local_vars_configuration=None): # noqa: E501 - """UserCreate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._label = None - self._password = None - self._email = None - self._administrator = None - self._cluster_administrator = None - self.discriminator = None - - self.name = name - self.label = label - self.password = password - self.email = email - self.administrator = administrator - self.cluster_administrator = cluster_administrator - - @property - def name(self): - """Gets the name of this UserCreate. # noqa: E501 - - The user name. # noqa: E501 - - :return: The name of this UserCreate. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserCreate. - - The user name. # noqa: E501 - - :param name: The name of this UserCreate. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def label(self): - """Gets the label of this UserCreate. # noqa: E501 - - The user label (e.g., \"Domain Administrator\"). # noqa: E501 - - :return: The label of this UserCreate. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this UserCreate. - - The user label (e.g., \"Domain Administrator\"). # noqa: E501 - - :param label: The label of this UserCreate. # noqa: E501 - :type label: str - """ - - self._label = label - - @property - def password(self): - """Gets the password of this UserCreate. # noqa: E501 - - The password (optional) if using SSO. # noqa: E501 - - :return: The password of this UserCreate. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this UserCreate. - - The password (optional) if using SSO. # noqa: E501 - - :param password: The password of this UserCreate. # noqa: E501 - :type password: str - """ - - self._password = password - - @property - def email(self): - """Gets the email of this UserCreate. # noqa: E501 - - The email (optional) if onsite. # noqa: E501 - - :return: The email of this UserCreate. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this UserCreate. - - The email (optional) if onsite. # noqa: E501 - - :param email: The email of this UserCreate. # noqa: E501 - :type email: str - """ - - self._email = email - - @property - def administrator(self): - """Gets the administrator of this UserCreate. # noqa: E501 - - Whether the user is a domain administrator. Only users with the Domain Administrator role can set this. # noqa: E501 - - :return: The administrator of this UserCreate. # noqa: E501 - :rtype: bool - """ - return self._administrator - - @administrator.setter - def administrator(self, administrator): - """Sets the administrator of this UserCreate. - - Whether the user is a domain administrator. Only users with the Domain Administrator role can set this. # noqa: E501 - - :param administrator: The administrator of this UserCreate. # noqa: E501 - :type administrator: bool - """ - - self._administrator = administrator - - @property - def cluster_administrator(self): - """Gets the cluster_administrator of this UserCreate. # noqa: E501 - - Whether the user is a cluster administrator. Only users with the Cluster Administrator role can set this. # noqa: E501 - - :return: The cluster_administrator of this UserCreate. # noqa: E501 - :rtype: bool - """ - return self._cluster_administrator - - @cluster_administrator.setter - def cluster_administrator(self, cluster_administrator): - """Sets the cluster_administrator of this UserCreate. - - Whether the user is a cluster administrator. Only users with the Cluster Administrator role can set this. # noqa: E501 - - :param cluster_administrator: The cluster_administrator of this UserCreate. # noqa: E501 - :type cluster_administrator: bool - """ - - self._cluster_administrator = cluster_administrator - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserCreate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserCreate): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/user_create_return.py b/corellium_api/models/user_create_return.py deleted file mode 100644 index cdf1b3c..0000000 --- a/corellium_api/models/user_create_return.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UserCreateReturn(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str' - } - - attribute_map = { - 'id': 'id' - } - - def __init__(self, id=None, local_vars_configuration=None): # noqa: E501 - """UserCreateReturn - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._id = None - self.discriminator = None - - self.id = id - - @property - def id(self): - """Gets the id of this UserCreateReturn. # noqa: E501 - - The user identifier # noqa: E501 - - :return: The id of this UserCreateReturn. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserCreateReturn. - - The user identifier # noqa: E501 - - :param id: The id of this UserCreateReturn. # noqa: E501 - :type id: str - """ - - self._id = id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserCreateReturn): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserCreateReturn): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/user_error.py b/corellium_api/models/user_error.py deleted file mode 100644 index 9c08cd8..0000000 --- a/corellium_api/models/user_error.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UserError(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'error': 'str', - 'error_id': 'str', - 'field': 'str' - } - - attribute_map = { - 'error': 'error', - 'error_id': 'errorID', - 'field': 'field' - } - - def __init__(self, error=None, error_id=None, field=None, local_vars_configuration=None): # noqa: E501 - """UserError - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._error = None - self._error_id = None - self._field = None - self.discriminator = None - - self.error = error - self.error_id = error_id - self.field = field - - @property - def error(self): - """Gets the error of this UserError. # noqa: E501 - - Error text # noqa: E501 - - :return: The error of this UserError. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this UserError. - - Error text # noqa: E501 - - :param error: The error of this UserError. # noqa: E501 - :type error: str - """ - if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 - raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 - - self._error = error - - @property - def error_id(self): - """Gets the error_id of this UserError. # noqa: E501 - - Error ID # noqa: E501 - - :return: The error_id of this UserError. # noqa: E501 - :rtype: str - """ - return self._error_id - - @error_id.setter - def error_id(self, error_id): - """Sets the error_id of this UserError. - - Error ID # noqa: E501 - - :param error_id: The error_id of this UserError. # noqa: E501 - :type error_id: str - """ - if self.local_vars_configuration.client_side_validation and error_id is None: # noqa: E501 - raise ValueError("Invalid value for `error_id`, must not be `None`") # noqa: E501 - allowed_values = ["UserError"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and error_id not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `error_id` ({0}), must be one of {1}" # noqa: E501 - .format(error_id, allowed_values) - ) - - self._error_id = error_id - - @property - def field(self): - """Gets the field of this UserError. # noqa: E501 - - Field associated with error # noqa: E501 - - :return: The field of this UserError. # noqa: E501 - :rtype: str - """ - return self._field - - @field.setter - def field(self, field): - """Sets the field of this UserError. - - Field associated with error # noqa: E501 - - :param field: The field of this UserError. # noqa: E501 - :type field: str - """ - - self._field = field - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserError): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserError): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/user_snapshots.py b/corellium_api/models/user_snapshots.py deleted file mode 100644 index 73e46b0..0000000 --- a/corellium_api/models/user_snapshots.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UserSnapshots(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'shared_with_user': 'SharedSnapshotsInfo', - 'shared_by_user': 'SharedSnapshotsInfo' - } - - attribute_map = { - 'shared_with_user': 'sharedWithUser', - 'shared_by_user': 'sharedByUser' - } - - def __init__(self, shared_with_user=None, shared_by_user=None, local_vars_configuration=None): # noqa: E501 - """UserSnapshots - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._shared_with_user = None - self._shared_by_user = None - self.discriminator = None - - self.shared_with_user = shared_with_user - self.shared_by_user = shared_by_user - - @property - def shared_with_user(self): - """Gets the shared_with_user of this UserSnapshots. # noqa: E501 - - - :return: The shared_with_user of this UserSnapshots. # noqa: E501 - :rtype: SharedSnapshotsInfo - """ - return self._shared_with_user - - @shared_with_user.setter - def shared_with_user(self, shared_with_user): - """Sets the shared_with_user of this UserSnapshots. - - - :param shared_with_user: The shared_with_user of this UserSnapshots. # noqa: E501 - :type shared_with_user: SharedSnapshotsInfo - """ - if self.local_vars_configuration.client_side_validation and shared_with_user is None: # noqa: E501 - raise ValueError("Invalid value for `shared_with_user`, must not be `None`") # noqa: E501 - - self._shared_with_user = shared_with_user - - @property - def shared_by_user(self): - """Gets the shared_by_user of this UserSnapshots. # noqa: E501 - - - :return: The shared_by_user of this UserSnapshots. # noqa: E501 - :rtype: SharedSnapshotsInfo - """ - return self._shared_by_user - - @shared_by_user.setter - def shared_by_user(self, shared_by_user): - """Sets the shared_by_user of this UserSnapshots. - - - :param shared_by_user: The shared_by_user of this UserSnapshots. # noqa: E501 - :type shared_by_user: SharedSnapshotsInfo - """ - if self.local_vars_configuration.client_side_validation and shared_by_user is None: # noqa: E501 - raise ValueError("Invalid value for `shared_by_user`, must not be `None`") # noqa: E501 - - self._shared_by_user = shared_by_user - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserSnapshots): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserSnapshots): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/user_update.py b/corellium_api/models/user_update.py deleted file mode 100644 index a3303df..0000000 --- a/corellium_api/models/user_update.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class UserUpdate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'label': 'str' - } - - attribute_map = { - 'name': 'name', - 'label': 'label' - } - - def __init__(self, name=None, label=None, local_vars_configuration=None): # noqa: E501 - """UserUpdate - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._name = None - self._label = None - self.discriminator = None - - self.name = name - self.label = label - - @property - def name(self): - """Gets the name of this UserUpdate. # noqa: E501 - - The user name. # noqa: E501 - - :return: The name of this UserUpdate. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserUpdate. - - The user name. # noqa: E501 - - :param name: The name of this UserUpdate. # noqa: E501 - :type name: str - """ - - self._name = name - - @property - def label(self): - """Gets the label of this UserUpdate. # noqa: E501 - - The user label (e.g., \"Domain Administrator\"). # noqa: E501 - - :return: The label of this UserUpdate. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this UserUpdate. - - The user label (e.g., \"Domain Administrator\"). # noqa: E501 - - :param label: The label of this UserUpdate. # noqa: E501 - :type label: str - """ - - self._label = label - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserUpdate): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, UserUpdate): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/v1_check_subdomain_existence_parameters.py b/corellium_api/models/v1_check_subdomain_existence_parameters.py deleted file mode 100644 index dcad032..0000000 --- a/corellium_api/models/v1_check_subdomain_existence_parameters.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class V1CheckSubdomainExistenceParameters(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'domain': 'str' - } - - attribute_map = { - 'domain': 'domain' - } - - def __init__(self, domain=None, local_vars_configuration=None): # noqa: E501 - """V1CheckSubdomainExistenceParameters - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._domain = None - self.discriminator = None - - self.domain = domain - - @property - def domain(self): - """Gets the domain of this V1CheckSubdomainExistenceParameters. # noqa: E501 - - Domain to check # noqa: E501 - - :return: The domain of this V1CheckSubdomainExistenceParameters. # noqa: E501 - :rtype: str - """ - return self._domain - - @domain.setter - def domain(self, domain): - """Sets the domain of this V1CheckSubdomainExistenceParameters. - - Domain to check # noqa: E501 - - :param domain: The domain of this V1CheckSubdomainExistenceParameters. # noqa: E501 - :type domain: str - """ - if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 - raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 - - self._domain = domain - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, V1CheckSubdomainExistenceParameters): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, V1CheckSubdomainExistenceParameters): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/v1_create_hook_parameters.py b/corellium_api/models/v1_create_hook_parameters.py deleted file mode 100644 index c2913fd..0000000 --- a/corellium_api/models/v1_create_hook_parameters.py +++ /dev/null @@ -1,227 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class V1CreateHookParameters(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'label': 'str', - 'address': 'str', - 'patch': 'str', - 'patch_type': 'str' - } - - attribute_map = { - 'label': 'label', - 'address': 'address', - 'patch': 'patch', - 'patch_type': 'patchType' - } - - def __init__(self, label=None, address=None, patch=None, patch_type=None, local_vars_configuration=None): # noqa: E501 - """V1CreateHookParameters - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._label = None - self._address = None - self._patch = None - self._patch_type = None - self.discriminator = None - - self.label = label - self.address = address - self.patch = patch - self.patch_type = patch_type - - @property - def label(self): - """Gets the label of this V1CreateHookParameters. # noqa: E501 - - Label # noqa: E501 - - :return: The label of this V1CreateHookParameters. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this V1CreateHookParameters. - - Label # noqa: E501 - - :param label: The label of this V1CreateHookParameters. # noqa: E501 - :type label: str - """ - if self.local_vars_configuration.client_side_validation and label is None: # noqa: E501 - raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 - - self._label = label - - @property - def address(self): - """Gets the address of this V1CreateHookParameters. # noqa: E501 - - Address # noqa: E501 - - :return: The address of this V1CreateHookParameters. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this V1CreateHookParameters. - - Address # noqa: E501 - - :param address: The address of this V1CreateHookParameters. # noqa: E501 - :type address: str - """ - if self.local_vars_configuration.client_side_validation and address is None: # noqa: E501 - raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 - - self._address = address - - @property - def patch(self): - """Gets the patch of this V1CreateHookParameters. # noqa: E501 - - Patch # noqa: E501 - - :return: The patch of this V1CreateHookParameters. # noqa: E501 - :rtype: str - """ - return self._patch - - @patch.setter - def patch(self, patch): - """Sets the patch of this V1CreateHookParameters. - - Patch # noqa: E501 - - :param patch: The patch of this V1CreateHookParameters. # noqa: E501 - :type patch: str - """ - if self.local_vars_configuration.client_side_validation and patch is None: # noqa: E501 - raise ValueError("Invalid value for `patch`, must not be `None`") # noqa: E501 - - self._patch = patch - - @property - def patch_type(self): - """Gets the patch_type of this V1CreateHookParameters. # noqa: E501 - - Patch Type # noqa: E501 - - :return: The patch_type of this V1CreateHookParameters. # noqa: E501 - :rtype: str - """ - return self._patch_type - - @patch_type.setter - def patch_type(self, patch_type): - """Sets the patch_type of this V1CreateHookParameters. - - Patch Type # noqa: E501 - - :param patch_type: The patch_type of this V1CreateHookParameters. # noqa: E501 - :type patch_type: str - """ - if self.local_vars_configuration.client_side_validation and patch_type is None: # noqa: E501 - raise ValueError("Invalid value for `patch_type`, must not be `None`") # noqa: E501 - allowed_values = ["csmfcc", "csmfvm"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and patch_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `patch_type` ({0}), must be one of {1}" # noqa: E501 - .format(patch_type, allowed_values) - ) - - self._patch_type = patch_type - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, V1CreateHookParameters): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, V1CreateHookParameters): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/v1_load_extension_parameters.py b/corellium_api/models/v1_load_extension_parameters.py deleted file mode 100644 index 9e10ebf..0000000 --- a/corellium_api/models/v1_load_extension_parameters.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class V1LoadExtensionParameters(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'image_id': 'str' - } - - attribute_map = { - 'image_id': 'imageId' - } - - def __init__(self, image_id=None, local_vars_configuration=None): # noqa: E501 - """V1LoadExtensionParameters - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._image_id = None - self.discriminator = None - - self.image_id = image_id - - @property - def image_id(self): - """Gets the image_id of this V1LoadExtensionParameters. # noqa: E501 - - The uuid of the image to load # noqa: E501 - - :return: The image_id of this V1LoadExtensionParameters. # noqa: E501 - :rtype: str - """ - return self._image_id - - @image_id.setter - def image_id(self, image_id): - """Sets the image_id of this V1LoadExtensionParameters. - - The uuid of the image to load # noqa: E501 - - :param image_id: The image_id of this V1LoadExtensionParameters. # noqa: E501 - :type image_id: str - """ - if self.local_vars_configuration.client_side_validation and image_id is None: # noqa: E501 - raise ValueError("Invalid value for `image_id`, must not be `None`") # noqa: E501 - - self._image_id = image_id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, V1LoadExtensionParameters): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, V1LoadExtensionParameters): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/v1_set_state_body.py b/corellium_api/models/v1_set_state_body.py deleted file mode 100644 index d8935b5..0000000 --- a/corellium_api/models/v1_set_state_body.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class V1SetStateBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'state': 'InstanceState' - } - - attribute_map = { - 'state': 'state' - } - - def __init__(self, state=None, local_vars_configuration=None): # noqa: E501 - """V1SetStateBody - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._state = None - self.discriminator = None - - self.state = state - - @property - def state(self): - """Gets the state of this V1SetStateBody. # noqa: E501 - - - :return: The state of this V1SetStateBody. # noqa: E501 - :rtype: InstanceState - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this V1SetStateBody. - - - :param state: The state of this V1SetStateBody. # noqa: E501 - :type state: InstanceState - """ - if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501 - raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 - - self._state = state - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, V1SetStateBody): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, V1SetStateBody): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/v1_update_hook_parameters.py b/corellium_api/models/v1_update_hook_parameters.py deleted file mode 100644 index cb385e7..0000000 --- a/corellium_api/models/v1_update_hook_parameters.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class V1UpdateHookParameters(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'label': 'str', - 'address': 'str', - 'patch': 'str', - 'patch_type': 'str', - 'enabled': 'bool' - } - - attribute_map = { - 'label': 'label', - 'address': 'address', - 'patch': 'patch', - 'patch_type': 'patchType', - 'enabled': 'enabled' - } - - def __init__(self, label=None, address=None, patch=None, patch_type=None, enabled=None, local_vars_configuration=None): # noqa: E501 - """V1UpdateHookParameters - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._label = None - self._address = None - self._patch = None - self._patch_type = None - self._enabled = None - self.discriminator = None - - self.label = label - self.address = address - self.patch = patch - self.patch_type = patch_type - self.enabled = enabled - - @property - def label(self): - """Gets the label of this V1UpdateHookParameters. # noqa: E501 - - Label # noqa: E501 - - :return: The label of this V1UpdateHookParameters. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this V1UpdateHookParameters. - - Label # noqa: E501 - - :param label: The label of this V1UpdateHookParameters. # noqa: E501 - :type label: str - """ - - self._label = label - - @property - def address(self): - """Gets the address of this V1UpdateHookParameters. # noqa: E501 - - Address # noqa: E501 - - :return: The address of this V1UpdateHookParameters. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this V1UpdateHookParameters. - - Address # noqa: E501 - - :param address: The address of this V1UpdateHookParameters. # noqa: E501 - :type address: str - """ - - self._address = address - - @property - def patch(self): - """Gets the patch of this V1UpdateHookParameters. # noqa: E501 - - Patch # noqa: E501 - - :return: The patch of this V1UpdateHookParameters. # noqa: E501 - :rtype: str - """ - return self._patch - - @patch.setter - def patch(self, patch): - """Sets the patch of this V1UpdateHookParameters. - - Patch # noqa: E501 - - :param patch: The patch of this V1UpdateHookParameters. # noqa: E501 - :type patch: str - """ - - self._patch = patch - - @property - def patch_type(self): - """Gets the patch_type of this V1UpdateHookParameters. # noqa: E501 - - Patch Type # noqa: E501 - - :return: The patch_type of this V1UpdateHookParameters. # noqa: E501 - :rtype: str - """ - return self._patch_type - - @patch_type.setter - def patch_type(self, patch_type): - """Sets the patch_type of this V1UpdateHookParameters. - - Patch Type # noqa: E501 - - :param patch_type: The patch_type of this V1UpdateHookParameters. # noqa: E501 - :type patch_type: str - """ - allowed_values = [None,"csmfcc", "csmfvm"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and patch_type not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `patch_type` ({0}), must be one of {1}" # noqa: E501 - .format(patch_type, allowed_values) - ) - - self._patch_type = patch_type - - @property - def enabled(self): - """Gets the enabled of this V1UpdateHookParameters. # noqa: E501 - - Enabled # noqa: E501 - - :return: The enabled of this V1UpdateHookParameters. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this V1UpdateHookParameters. - - Enabled # noqa: E501 - - :param enabled: The enabled of this V1UpdateHookParameters. # noqa: E501 - :type enabled: bool - """ - - self._enabled = enabled - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, V1UpdateHookParameters): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, V1UpdateHookParameters): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/validation_error.py b/corellium_api/models/validation_error.py deleted file mode 100644 index 7c249c1..0000000 --- a/corellium_api/models/validation_error.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class ValidationError(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'error': 'str', - 'error_id': 'str', - 'field': 'str' - } - - attribute_map = { - 'error': 'error', - 'error_id': 'errorID', - 'field': 'field' - } - - def __init__(self, error=None, error_id=None, field=None, local_vars_configuration=None): # noqa: E501 - """ValidationError - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._error = None - self._error_id = None - self._field = None - self.discriminator = None - - self.error = error - self.error_id = error_id - self.field = field - - @property - def error(self): - """Gets the error of this ValidationError. # noqa: E501 - - Error text # noqa: E501 - - :return: The error of this ValidationError. # noqa: E501 - :rtype: str - """ - return self._error - - @error.setter - def error(self, error): - """Sets the error of this ValidationError. - - Error text # noqa: E501 - - :param error: The error of this ValidationError. # noqa: E501 - :type error: str - """ - if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 - raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 - - self._error = error - - @property - def error_id(self): - """Gets the error_id of this ValidationError. # noqa: E501 - - Error ID # noqa: E501 - - :return: The error_id of this ValidationError. # noqa: E501 - :rtype: str - """ - return self._error_id - - @error_id.setter - def error_id(self, error_id): - """Sets the error_id of this ValidationError. - - Error ID # noqa: E501 - - :param error_id: The error_id of this ValidationError. # noqa: E501 - :type error_id: str - """ - if self.local_vars_configuration.client_side_validation and error_id is None: # noqa: E501 - raise ValueError("Invalid value for `error_id`, must not be `None`") # noqa: E501 - allowed_values = ["ValidationError"] # noqa: E501 - if self.local_vars_configuration.client_side_validation and error_id not in allowed_values: # noqa: E501 - raise ValueError( - "Invalid value for `error_id` ({0}), must be one of {1}" # noqa: E501 - .format(error_id, allowed_values) - ) - - self._error_id = error_id - - @property - def field(self): - """Gets the field of this ValidationError. # noqa: E501 - - Field associated with error # noqa: E501 - - :return: The field of this ValidationError. # noqa: E501 - :rtype: str - """ - return self._field - - @field.setter - def field(self, field): - """Sets the field of this ValidationError. - - Field associated with error # noqa: E501 - - :param field: The field of this ValidationError. # noqa: E501 - :type field: str - """ - - self._field = field - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ValidationError): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ValidationError): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/volume_options.py b/corellium_api/models/volume_options.py deleted file mode 100644 index ea52739..0000000 --- a/corellium_api/models/volume_options.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class VolumeOptions(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'blocks': 'float', - 'name': 'str' - } - - attribute_map = { - 'blocks': 'blocks', - 'name': 'name' - } - - def __init__(self, blocks=None, name=None, local_vars_configuration=None): # noqa: E501 - """VolumeOptions - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._blocks = None - self._name = None - self.discriminator = None - - self.blocks = blocks - self.name = name - - @property - def blocks(self): - """Gets the blocks of this VolumeOptions. # noqa: E501 - - blocks to resize partition to # noqa: E501 - - :return: The blocks of this VolumeOptions. # noqa: E501 - :rtype: float - """ - return self._blocks - - @blocks.setter - def blocks(self, blocks): - """Sets the blocks of this VolumeOptions. - - blocks to resize partition to # noqa: E501 - - :param blocks: The blocks of this VolumeOptions. # noqa: E501 - :type blocks: float - """ - - self._blocks = blocks - - @property - def name(self): - """Gets the name of this VolumeOptions. # noqa: E501 - - name of partition # noqa: E501 - - :return: The name of this VolumeOptions. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this VolumeOptions. - - name of partition # noqa: E501 - - :param name: The name of this VolumeOptions. # noqa: E501 - :type name: str - """ - - self._name = name - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, VolumeOptions): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, VolumeOptions): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/vpn_definition.py b/corellium_api/models/vpn_definition.py deleted file mode 100644 index d06b309..0000000 --- a/corellium_api/models/vpn_definition.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class VpnDefinition(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'proxy': 'list[object]', - 'listeners': 'list[object]' - } - - attribute_map = { - 'proxy': 'proxy', - 'listeners': 'listeners' - } - - def __init__(self, proxy=None, listeners=None, local_vars_configuration=None): # noqa: E501 - """VpnDefinition - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._proxy = None - self._listeners = None - self.discriminator = None - - self.proxy = proxy - self.listeners = listeners - - @property - def proxy(self): - """Gets the proxy of this VpnDefinition. # noqa: E501 - - # noqa: E501 - - :return: The proxy of this VpnDefinition. # noqa: E501 - :rtype: list[object] - """ - return self._proxy - - @proxy.setter - def proxy(self, proxy): - """Sets the proxy of this VpnDefinition. - - # noqa: E501 - - :param proxy: The proxy of this VpnDefinition. # noqa: E501 - :type proxy: list[object] - """ - - self._proxy = proxy - - @property - def listeners(self): - """Gets the listeners of this VpnDefinition. # noqa: E501 - - # noqa: E501 - - :return: The listeners of this VpnDefinition. # noqa: E501 - :rtype: list[object] - """ - return self._listeners - - @listeners.setter - def listeners(self, listeners): - """Sets the listeners of this VpnDefinition. - - # noqa: E501 - - :param listeners: The listeners of this VpnDefinition. # noqa: E501 - :type listeners: list[object] - """ - - self._listeners = listeners - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, VpnDefinition): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, VpnDefinition): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/web_player_create_session_request.py b/corellium_api/models/web_player_create_session_request.py deleted file mode 100644 index a2c337a..0000000 --- a/corellium_api/models/web_player_create_session_request.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class WebPlayerCreateSessionRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'project_id': 'str', - 'instance_id': 'str', - 'expires_in': 'float', - 'features': 'Features', - 'client_id': 'str' - } - - attribute_map = { - 'project_id': 'projectId', - 'instance_id': 'instanceId', - 'expires_in': 'expiresIn', - 'features': 'features', - 'client_id': 'clientId' - } - - def __init__(self, project_id=None, instance_id=None, expires_in=None, features=None, client_id=None, local_vars_configuration=None): # noqa: E501 - """WebPlayerCreateSessionRequest - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._project_id = None - self._instance_id = None - self._expires_in = None - self._features = None - self._client_id = None - self.discriminator = None - - self.project_id = project_id - self.instance_id = instance_id - self.expires_in = expires_in - self.features = features - self.client_id = client_id - - @property - def project_id(self): - """Gets the project_id of this WebPlayerCreateSessionRequest. # noqa: E501 - - Project Identifier # noqa: E501 - - :return: The project_id of this WebPlayerCreateSessionRequest. # noqa: E501 - :rtype: str - """ - return self._project_id - - @project_id.setter - def project_id(self, project_id): - """Sets the project_id of this WebPlayerCreateSessionRequest. - - Project Identifier # noqa: E501 - - :param project_id: The project_id of this WebPlayerCreateSessionRequest. # noqa: E501 - :type project_id: str - """ - if self.local_vars_configuration.client_side_validation and project_id is None: # noqa: E501 - raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501 - - self._project_id = project_id - - @property - def instance_id(self): - """Gets the instance_id of this WebPlayerCreateSessionRequest. # noqa: E501 - - VM Instance Identifier # noqa: E501 - - :return: The instance_id of this WebPlayerCreateSessionRequest. # noqa: E501 - :rtype: str - """ - return self._instance_id - - @instance_id.setter - def instance_id(self, instance_id): - """Sets the instance_id of this WebPlayerCreateSessionRequest. - - VM Instance Identifier # noqa: E501 - - :param instance_id: The instance_id of this WebPlayerCreateSessionRequest. # noqa: E501 - :type instance_id: str - """ - if self.local_vars_configuration.client_side_validation and instance_id is None: # noqa: E501 - raise ValueError("Invalid value for `instance_id`, must not be `None`") # noqa: E501 - - self._instance_id = instance_id - - @property - def expires_in(self): - """Gets the expires_in of this WebPlayerCreateSessionRequest. # noqa: E501 - - Number of seconds token remains valid # noqa: E501 - - :return: The expires_in of this WebPlayerCreateSessionRequest. # noqa: E501 - :rtype: float - """ - return self._expires_in - - @expires_in.setter - def expires_in(self, expires_in): - """Sets the expires_in of this WebPlayerCreateSessionRequest. - - Number of seconds token remains valid # noqa: E501 - - :param expires_in: The expires_in of this WebPlayerCreateSessionRequest. # noqa: E501 - :type expires_in: float - """ - if self.local_vars_configuration.client_side_validation and expires_in is None: # noqa: E501 - raise ValueError("Invalid value for `expires_in`, must not be `None`") # noqa: E501 - - self._expires_in = expires_in - - @property - def features(self): - """Gets the features of this WebPlayerCreateSessionRequest. # noqa: E501 - - - :return: The features of this WebPlayerCreateSessionRequest. # noqa: E501 - :rtype: Features - """ - return self._features - - @features.setter - def features(self, features): - """Sets the features of this WebPlayerCreateSessionRequest. - - - :param features: The features of this WebPlayerCreateSessionRequest. # noqa: E501 - :type features: Features - """ - if self.local_vars_configuration.client_side_validation and features is None: # noqa: E501 - raise ValueError("Invalid value for `features`, must not be `None`") # noqa: E501 - - self._features = features - - @property - def client_id(self): - """Gets the client_id of this WebPlayerCreateSessionRequest. # noqa: E501 - - Optional string value supplied by client for tracking purposes # noqa: E501 - - :return: The client_id of this WebPlayerCreateSessionRequest. # noqa: E501 - :rtype: str - """ - return self._client_id - - @client_id.setter - def client_id(self, client_id): - """Sets the client_id of this WebPlayerCreateSessionRequest. - - Optional string value supplied by client for tracking purposes # noqa: E501 - - :param client_id: The client_id of this WebPlayerCreateSessionRequest. # noqa: E501 - :type client_id: str - """ - - self._client_id = client_id - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WebPlayerCreateSessionRequest): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, WebPlayerCreateSessionRequest): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/models/web_player_session.py b/corellium_api/models/web_player_session.py deleted file mode 100644 index 9f59c1e..0000000 --- a/corellium_api/models/web_player_session.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint -import re # noqa: F401 -import six - -from corellium_api.configuration import Configuration - - -class WebPlayerSession(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'identifier': 'str', - 'token': 'str', - 'expiration': 'float' - } - - attribute_map = { - 'identifier': 'identifier', - 'token': 'token', - 'expiration': 'expiration' - } - - def __init__(self, identifier=None, token=None, expiration=None, local_vars_configuration=None): # noqa: E501 - """WebPlayerSession - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._identifier = None - self._token = None - self._expiration = None - self.discriminator = None - - self.identifier = identifier - self.token = token - self.expiration = expiration - - @property - def identifier(self): - """Gets the identifier of this WebPlayerSession. # noqa: E501 - - New Session Identifier # noqa: E501 - - :return: The identifier of this WebPlayerSession. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this WebPlayerSession. - - New Session Identifier # noqa: E501 - - :param identifier: The identifier of this WebPlayerSession. # noqa: E501 - :type identifier: str - """ - if self.local_vars_configuration.client_side_validation and identifier is None: # noqa: E501 - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def token(self): - """Gets the token of this WebPlayerSession. # noqa: E501 - - Session Token # noqa: E501 - - :return: The token of this WebPlayerSession. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this WebPlayerSession. - - Session Token # noqa: E501 - - :param token: The token of this WebPlayerSession. # noqa: E501 - :type token: str - """ - if self.local_vars_configuration.client_side_validation and token is None: # noqa: E501 - raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 - - self._token = token - - @property - def expiration(self): - """Gets the expiration of this WebPlayerSession. # noqa: E501 - - Expiration in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :return: The expiration of this WebPlayerSession. # noqa: E501 - :rtype: float - """ - return self._expiration - - @expiration.setter - def expiration(self, expiration): - """Sets the expiration of this WebPlayerSession. - - Expiration in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z # noqa: E501 - - :param expiration: The expiration of this WebPlayerSession. # noqa: E501 - :type expiration: float - """ - if self.local_vars_configuration.client_side_validation and expiration is None: # noqa: E501 - raise ValueError("Invalid value for `expiration`, must not be `None`") # noqa: E501 - - self._expiration = expiration - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map( - lambda x: convert(x), - value - )) - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], convert(item[1])), - value.items() - )) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, WebPlayerSession): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, WebPlayerSession): - return True - - return self.to_dict() != other.to_dict() diff --git a/corellium_api/rest.py b/corellium_api/rest.py deleted file mode 100644 index b2ec19d..0000000 --- a/corellium_api/rest.py +++ /dev/null @@ -1,247 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -import io -import json -import logging -import re -import ssl - -import aiohttp -# python 2 and python 3 compatibility library -from six.moves.urllib.parse import urlencode - -from corellium_api.exceptions import ApiException, ApiValueError - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp, data): - self.aiohttp_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = data - - def getheaders(self): - """Returns a CIMultiDictProxy of the response headers.""" - return self.aiohttp_response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.aiohttp_response.headers.get(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - - # maxsize is number of requests to host that are allowed in parallel - if maxsize is None: - maxsize = configuration.connection_pool_maxsize - - ssl_context = ssl.create_default_context(cafile=configuration.ssl_ca_cert) - if configuration.cert_file: - ssl_context.load_cert_chain( - configuration.cert_file, keyfile=configuration.key_file - ) - - if not configuration.verify_ssl: - ssl_context.check_hostname = False - ssl_context.verify_mode = ssl.CERT_NONE - - connector = aiohttp.TCPConnector( - limit=maxsize, - ssl=ssl_context - ) - - self.proxy = configuration.proxy - self.proxy_headers = configuration.proxy_headers - - # https pool manager - self.pool_manager = aiohttp.ClientSession( - connector=connector, - trust_env=True - ) - - async def close(self): - await self.pool_manager.close() - - async def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Execute request - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: this is a non-applicable field for - the AiohttpClient. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - timeout = _request_timeout or 5 * 60 - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - args = { - "method": method, - "url": url, - "timeout": timeout, - "headers": headers - } - - if self.proxy: - args["proxy"] = self.proxy - if self.proxy_headers: - args["proxy_headers"] = self.proxy_headers - - if query_params: - args["url"] += '?' + urlencode(query_params) - - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if re.search('json', headers['Content-Type'], re.IGNORECASE): - if body is not None: - body = json.dumps(body) - args["data"] = body - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - args["data"] = aiohttp.FormData(post_params) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by aiohttp - del headers['Content-Type'] - data = aiohttp.FormData() - for param in post_params: - k, v = param - if isinstance(v, tuple) and len(v) == 3: - data.add_field(k, - value=v[1], - filename=v[0], - content_type=v[2]) - else: - data.add_field(k, v) - args["data"] = data - - # Pass a `bytes` parameter directly in the body to support - # other content types than Json when `body` argument is provided - # in serialized form - elif isinstance(body, bytes): - args["data"] = body - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - - r = await self.pool_manager.request(**args) - if _preload_content: - - data = await r.read() - r = RESTResponse(r, data) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - async def GET(self, url, headers=None, query_params=None, - _preload_content=True, _request_timeout=None): - return (await self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params)) - - async def HEAD(self, url, headers=None, query_params=None, - _preload_content=True, _request_timeout=None): - return (await self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params)) - - async def OPTIONS(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - return (await self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return (await self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def POST(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - return (await self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return (await self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def PATCH(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - return (await self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) diff --git a/docs/AcceptSnapshotBody.md b/docs/AcceptSnapshotBody.md new file mode 100644 index 0000000..64123b1 --- /dev/null +++ b/docs/AcceptSnapshotBody.md @@ -0,0 +1,30 @@ +# AcceptSnapshotBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_code** | **str** | The access code the snapshot's owner gave you (shown in `sharing.accessCode` on their snapshot). | +**password** | **str** | Password of the shared snapshot, as set when it was shared. Required when the snapshot was shared with sharing type passwordPublicLink. | [optional] + +## Example + +```python +from corellium.models.accept_snapshot_body import AcceptSnapshotBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AcceptSnapshotBody from a JSON string +accept_snapshot_body_instance = AcceptSnapshotBody.from_json(json) +# print the JSON string representation of the object +print(AcceptSnapshotBody.to_json()) + +# convert the object into a dict +accept_snapshot_body_dict = accept_snapshot_body_instance.to_dict() +# create an instance of AcceptSnapshotBody from a dict +accept_snapshot_body_from_dict = AcceptSnapshotBody.from_dict(accept_snapshot_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AcceptSnapshotRequestPayload.md b/docs/AcceptSnapshotRequestPayload.md new file mode 100644 index 0000000..847a5ef --- /dev/null +++ b/docs/AcceptSnapshotRequestPayload.md @@ -0,0 +1,31 @@ +# AcceptSnapshotRequestPayload + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_code** | **str** | Access code of the shared snapshot. | +**password** | **str** | Password of the shared snapshot. Required when it was shared with sharing type passwordPublicLink. | [optional] + +## Example + +```python +from corellium.models.accept_snapshot_request_payload import AcceptSnapshotRequestPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of AcceptSnapshotRequestPayload from a JSON string +accept_snapshot_request_payload_instance = AcceptSnapshotRequestPayload.from_json(json) +# print the JSON string representation of the object +print(AcceptSnapshotRequestPayload.to_json()) + +# convert the object into a dict +accept_snapshot_request_payload_dict = accept_snapshot_request_payload_instance.to_dict() +# create an instance of AcceptSnapshotRequestPayload from a dict +accept_snapshot_request_payload_from_dict = AcceptSnapshotRequestPayload.from_dict(accept_snapshot_request_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AccountSetupResponse.md b/docs/AccountSetupResponse.md new file mode 100644 index 0000000..9195ac5 --- /dev/null +++ b/docs/AccountSetupResponse.md @@ -0,0 +1,29 @@ +# AccountSetupResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Whether account setup succeeded. | + +## Example + +```python +from corellium.models.account_setup_response import AccountSetupResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountSetupResponse from a JSON string +account_setup_response_instance = AccountSetupResponse.from_json(json) +# print the JSON string representation of the object +print(AccountSetupResponse.to_json()) + +# convert the object into a dict +account_setup_response_dict = account_setup_response_instance.to_dict() +# create an instance of AccountSetupResponse from a dict +account_setup_response_from_dict = AccountSetupResponse.from_dict(account_setup_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Activity.md b/docs/Activity.md index a7b7f51..8bbdea7 100644 --- a/docs/Activity.md +++ b/docs/Activity.md @@ -1,22 +1,39 @@ # Activity - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identifier** | **str** | Unique identifier for the activity entry | [optional] -**domain** | **str** | Unique identifier for the domain | [optional] -**actor** | **str** | Unique identifier for the user | [optional] -**event** | **str** | Resource associated with the activity | [optional] -**outcome** | **str** | The outcome of the activity | [optional] -**metadata** | **object** | Related information that pertains to the activity | [optional] -**corellium_version** | **str** | The Corellium version this activity occurred in | [optional] -**project_id** | **str** | Unique identifier for project if applicable | [optional] -**instance_id** | **str** | Unique identifier for instance if applicable | [optional] -**created_at** | **str** | Timestamp of when the activity was created | [optional] -**updated_at** | **str** | Timestamp of when the activity was last updated | [optional] +**identifier** | **str** | Unique identifier for the activity entry. | +**domain** | **str** | Unique identifier for the domain. | +**actor** | **str** | Unique identifier for the user. | +**event** | **str** | Resource associated with the activity. | +**outcome** | **str** | The outcome of the activity. | +**metadata** | **Dict[str, Optional[object]]** | Related information that pertains to the activity. | +**corellium_version** | **str** | The Corellium version this activity occurred in. | +**project_id** | **str** | Unique identifier for project if applicable. | +**instance_id** | **str** | Unique identifier for instance if applicable. | +**created_at** | **datetime** | Timestamp of when the activity was created. | +**updated_at** | **datetime** | Timestamp of when the activity was last updated. | + +## Example + +```python +from corellium.models.activity import Activity + +# TODO update the JSON string below +json = "{}" +# create an instance of Activity from a JSON string +activity_instance = Activity.from_json(json) +# print the JSON string representation of the object +print(Activity.to_json()) +# convert the object into a dict +activity_dict = activity_instance.to_dict() +# create an instance of Activity from a dict +activity_from_dict = Activity.from_dict(activity_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ActivityApi.md b/docs/ActivityApi.md new file mode 100644 index 0000000..5f43378 --- /dev/null +++ b/docs/ActivityApi.md @@ -0,0 +1,480 @@ +# corellium.ActivityApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_activity_export**](ActivityApi.md#v3_create_activity_export) | **POST** /v3/activity/export | Start activity export +[**v3_download_activity**](ActivityApi.md#v3_download_activity) | **GET** /v3/activity/export/{taskId}/download | Download activity for a given task +[**v3_get_activity_export_status**](ActivityApi.md#v3_get_activity_export_status) | **GET** /v3/activity/export/{taskId} | Get export task status +[**v3_get_activity_export_tasks**](ActivityApi.md#v3_get_activity_export_tasks) | **GET** /v3/activity/export | Get all export tasks for user +[**v3_list_activities**](ActivityApi.md#v3_list_activities) | **GET** /v3/activity | Get resource activities + + +# **v3_create_activity_export** +> CreateActivityExportResponse v3_create_activity_export(accept, create_activity_export_body=create_activity_export_body) + +Start activity export + +**Required role:** Domain administrator. + +Starts building a file of activity records for download, for audits or offline analysis. Requires a domain administrator and the user-logging license feature (403 otherwise). + +Choose the file format with the `Accept` header: `application/json` or `text/csv` (any other value returns 400). The body takes the same filters as `v3ListActivities`, but the export is not paginated: it contains every matching record. + +**Workflow:** +1. `v3CreateActivityExport` (this call). Returns 201 with an `id` like `activity-export/`. +2. Poll `v3GetActivityExportStatus` with the `` part until `status` is `complete`. +3. `v3DownloadActivity` with the same UUID to get the file. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_export_format import ActivityExportFormat +from corellium.models.create_activity_export_body import CreateActivityExportBody +from corellium.models.create_activity_export_response import CreateActivityExportResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityApi(api_client) + accept = corellium.ActivityExportFormat() # ActivityExportFormat | Specifies the activity export file format. + create_activity_export_body = corellium.CreateActivityExportBody() # CreateActivityExportBody | (optional) + + try: + # Start activity export + api_response = api_instance.v3_create_activity_export(accept, create_activity_export_body=create_activity_export_body) + print("The response of ActivityApi->v3_create_activity_export:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityApi->v3_create_activity_export: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accept** | [**ActivityExportFormat**](.md)| Specifies the activity export file format. | + **create_activity_export_body** | [**CreateActivityExportBody**](CreateActivityExportBody.md)| | [optional] + +### Return type + +[**CreateActivityExportResponse**](CreateActivityExportResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Export task accepted. | - | +**400** | Invalid request body or export rejected. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_download_activity** +> bytearray v3_download_activity(task_id) + +Download activity for a given task + +**Required role:** Domain administrator. + +Downloads the file produced by a finished activity export, as JSON or CSV depending on the format you asked for. Pass the UUID part of the export `id`. Returns 404 if the file is not ready or does not exist; check `v3GetActivityExportStatus` first. Requires a domain administrator and the user-logging license feature. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityApi(api_client) + task_id = '722cdce5-6f71-4f4a-b2b6-c00f11c015f6' # str | + + try: + # Download activity for a given task + api_response = api_instance.v3_download_activity(task_id) + print("The response of ActivityApi->v3_download_activity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityApi->v3_download_activity: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task_id** | **str**| | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, text/csv + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Activity export file download. | - | +**400** | Unable to get image export type. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Task not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_activity_export_status** +> ActivityExportStatus v3_get_activity_export_status(task_id) + +Get export task status + +**Required role:** Domain administrator. + +Returns the status of an activity export started with `v3CreateActivityExport`. Pass the UUID part of the export `id`. Poll until `status` is `complete`, then call `v3DownloadActivity`. Finished tasks are cleaned up, so a task that no longer exists is reported as `complete`. Requires a domain administrator and the user-logging license feature. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_export_status import ActivityExportStatus +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityApi(api_client) + task_id = '722cdce5-6f71-4f4a-b2b6-c00f11c015f6' # str | + + try: + # Get export task status + api_response = api_instance.v3_get_activity_export_status(task_id) + print("The response of ActivityApi->v3_get_activity_export_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityApi->v3_get_activity_export_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task_id** | **str**| | + +### Return type + +[**ActivityExportStatus**](ActivityExportStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Task status. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_activity_export_tasks** +> ActivityExportTaskList v3_get_activity_export_tasks(limit=limit, offset=offset) + +Get all export tasks for user + +**Required role:** Domain administrator. + +Lists the activity exports you have started, with each one's status and the filters it used. Requires a domain administrator and the user-logging license feature. Results are paginated with `limit` and `offset`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_export_task_list import ActivityExportTaskList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # Get all export tasks for user + api_response = api_instance.v3_get_activity_export_tasks(limit=limit, offset=offset) + print("The response of ActivityApi->v3_get_activity_export_tasks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityApi->v3_get_activity_export_tasks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**ActivityExportTaskList**](ActivityExportTaskList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of export tasks. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_activities** +> ActivityListResponse v3_list_activities(resource=resource, limit=limit, offset=offset, order_by=order_by, instance_id=instance_id, project_id=project_id, actor=actor, search=search, to=to, var_from=var_from) + +Get resource activities + +Returns the activity log: a record of what happened in your domain, such as devices created, started and deleted, users signing in, and settings changed, with who did it and when. You only see events your role allows. Filter by device, project, user, time range or free text, and page with `limit` and `offset`. For a full download of many records, use `v3CreateActivityExport` instead. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_list_response import ActivityListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityApi(api_client) + resource = None # object | Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`. (optional) + limit = 10 # float | Number of entries to return. (optional) (default to 10) + offset = 0 # float | Number of results to skip. (optional) (default to 0) + order_by = '-createdAt' # str | Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first). (optional) (default to '-createdAt') + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Only activity about this device. (optional) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | Only activity in this project. (optional) + actor = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | Only activity performed by this user (user ID). (optional) + search = 'iPhone15,2' # str | Free-text search. Applied last, as a loose match on the results that pass the other filters. (optional) + to = '2026-05-22T13:58:34Z' # datetime | Only activity at or before this time (ISO 8601). (optional) + var_from = '2026-05-22T00:00Z' # datetime | Only activity at or after this time (ISO 8601). (optional) + + try: + # Get resource activities + api_response = api_instance.v3_list_activities(resource=resource, limit=limit, offset=offset, order_by=order_by, instance_id=instance_id, project_id=project_id, actor=actor, search=search, to=to, var_from=var_from) + print("The response of ActivityApi->v3_list_activities:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityApi->v3_list_activities: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource** | [**object**](.md)| Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`. | [optional] + **limit** | **float**| Number of entries to return. | [optional] [default to 10] + **offset** | **float**| Number of results to skip. | [optional] [default to 0] + **order_by** | **str**| Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first). | [optional] [default to '-createdAt'] + **instance_id** | **str**| Only activity about this device. | [optional] + **project_id** | **str**| Only activity in this project. | [optional] + **actor** | **str**| Only activity performed by this user (user ID). | [optional] + **search** | **str**| Free-text search. Applied last, as a loose match on the results that pass the other filters. | [optional] + **to** | **datetime**| Only activity at or before this time (ISO 8601). | [optional] + **var_from** | **datetime**| Only activity at or after this time (ISO 8601). | [optional] + +### Return type + +[**ActivityListResponse**](ActivityListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of activities. | - | +**400** | Invalid query parameter(s) or column name. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ActivityExportDto.md b/docs/ActivityExportDto.md index 87c834a..a2a7ec2 100644 --- a/docs/ActivityExportDto.md +++ b/docs/ActivityExportDto.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **resource** | **str** | Event to filter on | [optional] @@ -12,8 +13,25 @@ Name | Type | Description | Notes **actor** | **str** | User ID | [optional] **search** | **str** | Arbitrary search string against activity metadata | [optional] **to** | **str** | Include activities up to given ISO 8601 Date | [optional] -**_from** | **str** | Include activities from given ISO 8601 Date | [optional] +**var_from** | **str** | Include activities from given ISO 8601 Date | [optional] + +## Example + +```python +from corellium.models.activity_export_dto import ActivityExportDto + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityExportDto from a JSON string +activity_export_dto_instance = ActivityExportDto.from_json(json) +# print the JSON string representation of the object +print(ActivityExportDto.to_json()) +# convert the object into a dict +activity_export_dto_dict = activity_export_dto_instance.to_dict() +# create an instance of ActivityExportDto from a dict +activity_export_dto_from_dict = ActivityExportDto.from_dict(activity_export_dto_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ActivityExportFormat.md b/docs/ActivityExportFormat.md new file mode 100644 index 0000000..f39af76 --- /dev/null +++ b/docs/ActivityExportFormat.md @@ -0,0 +1,13 @@ +# ActivityExportFormat + +Specifies the activity export file format. + +## Enum + +* `APPLICATION_SLASH_JSON` (value: `'application/json'`) + +* `TEXT_SLASH_CSV` (value: `'text/csv'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivityExportResponse.md b/docs/ActivityExportResponse.md index ee92440..64cdcd7 100644 --- a/docs/ActivityExportResponse.md +++ b/docs/ActivityExportResponse.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Task identifier | +## Example + +```python +from corellium.models.activity_export_response import ActivityExportResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityExportResponse from a JSON string +activity_export_response_instance = ActivityExportResponse.from_json(json) +# print the JSON string representation of the object +print(ActivityExportResponse.to_json()) + +# convert the object into a dict +activity_export_response_dict = activity_export_response_instance.to_dict() +# create an instance of ActivityExportResponse from a dict +activity_export_response_from_dict = ActivityExportResponse.from_dict(activity_export_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ActivityExportStatus.md b/docs/ActivityExportStatus.md new file mode 100644 index 0000000..dfc6af6 --- /dev/null +++ b/docs/ActivityExportStatus.md @@ -0,0 +1,29 @@ +# ActivityExportStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Where the export task is. Poll until it is `complete`, then download the file. | + +## Example + +```python +from corellium.models.activity_export_status import ActivityExportStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityExportStatus from a JSON string +activity_export_status_instance = ActivityExportStatus.from_json(json) +# print the JSON string representation of the object +print(ActivityExportStatus.to_json()) + +# convert the object into a dict +activity_export_status_dict = activity_export_status_instance.to_dict() +# create an instance of ActivityExportStatus from a dict +activity_export_status_from_dict = ActivityExportStatus.from_dict(activity_export_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivityExportTask.md b/docs/ActivityExportTask.md new file mode 100644 index 0000000..4fb5185 --- /dev/null +++ b/docs/ActivityExportTask.md @@ -0,0 +1,34 @@ +# ActivityExportTask + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Task identifier in the form `activity-export/<UUID>`. | +**scheduled_at** | **datetime** | Timestamp of when the task is scheduled to execute. | +**status** | **str** | Where the export task is. Poll until it is `complete`, then download the file. | +**args** | **Dict[str, Optional[object]]** | Arguments passed to the task. | +**created_at** | **datetime** | Timestamp of when the task was created. | +**updated_at** | **datetime** | Timestamp of when the task was last updated. | + +## Example + +```python +from corellium.models.activity_export_task import ActivityExportTask + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityExportTask from a JSON string +activity_export_task_instance = ActivityExportTask.from_json(json) +# print the JSON string representation of the object +print(ActivityExportTask.to_json()) + +# convert the object into a dict +activity_export_task_dict = activity_export_task_instance.to_dict() +# create an instance of ActivityExportTask from a dict +activity_export_task_from_dict = ActivityExportTask.from_dict(activity_export_task_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivityExportTaskList.md b/docs/ActivityExportTaskList.md new file mode 100644 index 0000000..28df43f --- /dev/null +++ b/docs/ActivityExportTaskList.md @@ -0,0 +1,34 @@ +# ActivityExportTaskList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ActivityExportTask]**](ActivityExportTask.md) | List of export tasks. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.activity_export_task_list import ActivityExportTaskList + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityExportTaskList from a JSON string +activity_export_task_list_instance = ActivityExportTaskList.from_json(json) +# print the JSON string representation of the object +print(ActivityExportTaskList.to_json()) + +# convert the object into a dict +activity_export_task_list_dict = activity_export_task_list_instance.to_dict() +# create an instance of ActivityExportTaskList from a dict +activity_export_task_list_from_dict = ActivityExportTaskList.from_dict(activity_export_task_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivityList.md b/docs/ActivityList.md index 2053f00..4349c49 100644 --- a/docs/ActivityList.md +++ b/docs/ActivityList.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**list[Activity]**](Activity.md) | List of activities | [optional] +**data** | [**List[ActivityV1]**](ActivityV1.md) | List of activities | [optional] **pagination** | [**Pagination**](Pagination.md) | | [optional] +## Example + +```python +from corellium.models.activity_list import ActivityList + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityList from a JSON string +activity_list_instance = ActivityList.from_json(json) +# print the JSON string representation of the object +print(ActivityList.to_json()) + +# convert the object into a dict +activity_list_dict = activity_list_instance.to_dict() +# create an instance of ActivityList from a dict +activity_list_from_dict = ActivityList.from_dict(activity_list_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ActivityListResponse.md b/docs/ActivityListResponse.md new file mode 100644 index 0000000..f446387 --- /dev/null +++ b/docs/ActivityListResponse.md @@ -0,0 +1,34 @@ +# ActivityListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Activity]**](Activity.md) | Activity list. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.activity_list_response import ActivityListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityListResponse from a JSON string +activity_list_response_instance = ActivityListResponse.from_json(json) +# print the JSON string representation of the object +print(ActivityListResponse.to_json()) + +# convert the object into a dict +activity_list_response_dict = activity_list_response_instance.to_dict() +# create an instance of ActivityListResponse from a dict +activity_list_response_from_dict = ActivityListResponse.from_dict(activity_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivityRequest.md b/docs/ActivityRequest.md index 14678b1..a4da310 100644 --- a/docs/ActivityRequest.md +++ b/docs/ActivityRequest.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **resource** | **str** | Resource filter | [optional] @@ -14,8 +15,25 @@ Name | Type | Description | Notes **actor** | **str** | Actor identifier used to filter actor resources | [optional] **search** | **str** | Last filter applied and is a fuzzy match on results | [optional] **to** | **str** | Date to filter to, keyed off of createdAt | [optional] -**_from** | **str** | Date to filter from, keyed off of createdAt | [optional] +**var_from** | **str** | Date to filter from, keyed off of createdAt | [optional] + +## Example + +```python +from corellium.models.activity_request import ActivityRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityRequest from a JSON string +activity_request_instance = ActivityRequest.from_json(json) +# print the JSON string representation of the object +print(ActivityRequest.to_json()) +# convert the object into a dict +activity_request_dict = activity_request_instance.to_dict() +# create an instance of ActivityRequest from a dict +activity_request_from_dict = ActivityRequest.from_dict(activity_request_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ActivityResourceNotStartsWithFilter.md b/docs/ActivityResourceNotStartsWithFilter.md new file mode 100644 index 0000000..72e5cc5 --- /dev/null +++ b/docs/ActivityResourceNotStartsWithFilter.md @@ -0,0 +1,29 @@ +# ActivityResourceNotStartsWithFilter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**starts_with** | **object** | Exclude resources beginning with one or more prefixes. | + +## Example + +```python +from corellium.models.activity_resource_not_starts_with_filter import ActivityResourceNotStartsWithFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityResourceNotStartsWithFilter from a JSON string +activity_resource_not_starts_with_filter_instance = ActivityResourceNotStartsWithFilter.from_json(json) +# print the JSON string representation of the object +print(ActivityResourceNotStartsWithFilter.to_json()) + +# convert the object into a dict +activity_resource_not_starts_with_filter_dict = activity_resource_not_starts_with_filter_instance.to_dict() +# create an instance of ActivityResourceNotStartsWithFilter from a dict +activity_resource_not_starts_with_filter_from_dict = ActivityResourceNotStartsWithFilter.from_dict(activity_resource_not_starts_with_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivityResourceStartsWithFilter.md b/docs/ActivityResourceStartsWithFilter.md new file mode 100644 index 0000000..0a4d672 --- /dev/null +++ b/docs/ActivityResourceStartsWithFilter.md @@ -0,0 +1,29 @@ +# ActivityResourceStartsWithFilter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**starts_with** | **object** | Match resources beginning with one or more prefixes. | + +## Example + +```python +from corellium.models.activity_resource_starts_with_filter import ActivityResourceStartsWithFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityResourceStartsWithFilter from a JSON string +activity_resource_starts_with_filter_instance = ActivityResourceStartsWithFilter.from_json(json) +# print the JSON string representation of the object +print(ActivityResourceStartsWithFilter.to_json()) + +# convert the object into a dict +activity_resource_starts_with_filter_dict = activity_resource_starts_with_filter_instance.to_dict() +# create an instance of ActivityResourceStartsWithFilter from a dict +activity_resource_starts_with_filter_from_dict = ActivityResourceStartsWithFilter.from_dict(activity_resource_starts_with_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivityV1.md b/docs/ActivityV1.md new file mode 100644 index 0000000..0ee8008 --- /dev/null +++ b/docs/ActivityV1.md @@ -0,0 +1,40 @@ +# ActivityV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Unique identifier for the activity entry | [optional] +**domain** | **str** | Unique identifier for the domain | [optional] +**actor** | **str** | Unique identifier for the user | [optional] +**event** | **str** | Resource associated with the activity | [optional] +**outcome** | **str** | The outcome of the activity | [optional] +**metadata** | **object** | Related information that pertains to the activity | [optional] +**corellium_version** | **str** | The Corellium version this activity occurred in | [optional] +**project_id** | **str** | Unique identifier for project if applicable | [optional] +**instance_id** | **str** | Unique identifier for instance if applicable | [optional] +**created_at** | **str** | Timestamp of when the activity was created | [optional] +**updated_at** | **str** | Timestamp of when the activity was last updated | [optional] + +## Example + +```python +from corellium.models.activity_v1 import ActivityV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityV1 from a JSON string +activity_v1_instance = ActivityV1.from_json(json) +# print the JSON string representation of the object +print(ActivityV1.to_json()) + +# convert the object into a dict +activity_v1_dict = activity_v1_instance.to_dict() +# create an instance of ActivityV1 from a dict +activity_v1_from_dict = ActivityV1.from_dict(activity_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ActivityV1Api.md b/docs/ActivityV1Api.md new file mode 100644 index 0000000..e3307a4 --- /dev/null +++ b/docs/ActivityV1Api.md @@ -0,0 +1,434 @@ +# corellium.ActivityV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_activity_export**](ActivityV1Api.md#v1_activity_export) | **POST** /v1/activity/export | Start activity export +[**v1_activity_list**](ActivityV1Api.md#v1_activity_list) | **GET** /v1/activity | Get resource activities +[**v1_download_activity**](ActivityV1Api.md#v1_download_activity) | **GET** /v1/activity/export/{taskId}/download | Download activity +[**v1_get_activity_export_status**](ActivityV1Api.md#v1_get_activity_export_status) | **GET** /v1/activity/export/{taskId} | Get export task status +[**v1_get_activity_export_tasks**](ActivityV1Api.md#v1_get_activity_export_tasks) | **GET** /v1/activity/export | Get all export tasks for user + + +# **v1_activity_export** +> ActivityExportResponse v1_activity_export(activity_export_dto) + +Start activity export + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_export_dto import ActivityExportDto +from corellium.models.activity_export_response import ActivityExportResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityV1Api(api_client) + activity_export_dto = corellium.ActivityExportDto() # ActivityExportDto | + + try: + # Start activity export + api_response = api_instance.v1_activity_export(activity_export_dto) + print("The response of ActivityV1Api->v1_activity_export:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityV1Api->v1_activity_export: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **activity_export_dto** | [**ActivityExportDto**](ActivityExportDto.md)| | + +### Return type + +[**ActivityExportResponse**](ActivityExportResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_activity_list** +> ActivityList v1_activity_list(request=request) + +Get resource activities + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_list import ActivityList +from corellium.models.activity_request import ActivityRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityV1Api(api_client) + request = corellium.ActivityRequest() # ActivityRequest | (optional) + + try: + # Get resource activities + api_response = api_instance.v1_activity_list(request=request) + print("The response of ActivityV1Api->v1_activity_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityV1Api->v1_activity_list: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request** | [**ActivityRequest**](.md)| | [optional] + +### Return type + +[**ActivityList**](ActivityList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_download_activity** +> ActivityList v1_download_activity(task_id) + +Download activity + +Download activity for a given task + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_list import ActivityList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityV1Api(api_client) + task_id = 'task_id_example' # str | Export ID + + try: + # Download activity + api_response = api_instance.v1_download_activity(task_id) + print("The response of ActivityV1Api->v1_download_activity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityV1Api->v1_download_activity: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task_id** | **str**| Export ID | + +### Return type + +[**ActivityList**](ActivityList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_activity_export_status** +> ActivityList v1_get_activity_export_status(task_id) + +Get export task status + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_list import ActivityList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityV1Api(api_client) + task_id = 'task_id_example' # str | Export ID + + try: + # Get export task status + api_response = api_instance.v1_get_activity_export_status(task_id) + print("The response of ActivityV1Api->v1_get_activity_export_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityV1Api->v1_get_activity_export_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task_id** | **str**| Export ID | + +### Return type + +[**ActivityList**](ActivityList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_activity_export_tasks** +> ActivityList v1_get_activity_export_tasks() + +Get all export tasks for user + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.activity_list import ActivityList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ActivityV1Api(api_client) + + try: + # Get all export tasks for user + api_response = api_instance.v1_get_activity_export_tasks() + print("The response of ActivityV1Api->v1_get_activity_export_tasks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ActivityV1Api->v1_get_activity_export_tasks: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ActivityList**](ActivityList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Address.md b/docs/Address.md index 8a56796..e901988 100644 --- a/docs/Address.md +++ b/docs/Address.md @@ -3,6 +3,7 @@ The user's address ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address1** | **str** | Address line 1 (e.g., street, PO Box, or company name). | [optional] @@ -12,6 +13,23 @@ Name | Type | Description | Notes **postal_code** | **str** | ZIP or postal code. | [optional] **state** | **str** | State, county, province, or region. | [optional] +## Example + +```python +from corellium.models.address import Address + +# TODO update the JSON string below +json = "{}" +# create an instance of Address from a JSON string +address_instance = Address.from_json(json) +# print the JSON string representation of the object +print(Address.to_json()) + +# convert the object into a dict +address_dict = address_instance.to_dict() +# create an instance of Address from a dict +address_from_dict = Address.from_dict(address_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentApi.md b/docs/AgentApi.md new file mode 100644 index 0000000..7018158 --- /dev/null +++ b/docs/AgentApi.md @@ -0,0 +1,3439 @@ +# corellium.AgentApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_delete_file_agent**](AgentApi.md#v3_delete_file_agent) | **DELETE** /v3/instances/{instanceId}/agent/v1/file/device/{filePath} | Delete a file on VM +[**v3_get_adb_auth_agent**](AgentApi.md#v3_get_adb_auth_agent) | **GET** /v3/instances/{instanceId}/agent/v1/system/adbauth | Get ADB auth setting +[**v3_get_app_ready_agent**](AgentApi.md#v3_get_app_ready_agent) | **GET** /v3/instances/{instanceId}/agent/v1/app/ready | Check if app subsystem is ready +[**v3_get_container_health_agent**](AgentApi.md#v3_get_container_health_agent) | **GET** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/is-healthy | Get container health +[**v3_get_file_agent**](AgentApi.md#v3_get_file_agent) | **GET** /v3/instances/{instanceId}/agent/v1/file/device/{filePath} | Download a file from VM +[**v3_get_network_agent**](AgentApi.md#v3_get_network_agent) | **GET** /v3/instances/{instanceId}/agent/v1/system/network | Get eth0 IP address +[**v3_get_prop_agent**](AgentApi.md#v3_get_prop_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/getprop | Get a system property +[**v3_get_remote_it_status_agent**](AgentApi.md#v3_get_remote_it_status_agent) | **GET** /v3/instances/{instanceId}/agent/v1/remoteit/status | Get Remote.It status +[**v3_get_temp_file_agent**](AgentApi.md#v3_get_temp_file_agent) | **POST** /v3/instances/{instanceId}/agent/v1/file/temp | Get a temp file path on VM +[**v3_install_agent**](AgentApi.md#v3_install_agent) | **POST** /v3/instances/{instanceId}/agent/v1/app/install | Install app at path +[**v3_install_open_gapps_agent**](AgentApi.md#v3_install_open_gapps_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/install-opengapps | Install OpenGApps +[**v3_install_profile_agent**](AgentApi.md#v3_install_profile_agent) | **POST** /v3/instances/{instanceId}/agent/v1/profile/install | Install a profile +[**v3_install_remote_it_agent**](AgentApi.md#v3_install_remote_it_agent) | **POST** /v3/instances/{instanceId}/agent/v1/remoteit/install | Install Remote.It +[**v3_kill_app_agent**](AgentApi.md#v3_kill_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill | Kill an app +[**v3_kill_frida_agent**](AgentApi.md#v3_kill_frida_agent) | **POST** /v3/instances/{instanceId}/agent/v1/frida/run-frida-kill | Kill Frida +[**v3_list_app_icons_agent**](AgentApi.md#v3_list_app_icons_agent) | **GET** /v3/instances/{instanceId}/agent/v1/app/icons | List app icons +[**v3_list_apps_agent**](AgentApi.md#v3_list_apps_agent) | **GET** /v3/instances/{instanceId}/agent/v1/app/apps | List apps +[**v3_list_apps_status_agent**](AgentApi.md#v3_list_apps_status_agent) | **GET** /v3/instances/{instanceId}/agent/v1/app/apps/update | List apps status +[**v3_list_containers_agent**](AgentApi.md#v3_list_containers_agent) | **GET** /v3/instances/{instanceId}/agent/v1/container/containers | List containers +[**v3_list_frida_processes_agent**](AgentApi.md#v3_list_frida_processes_agent) | **POST** /v3/instances/{instanceId}/agent/v1/frida/run-frida-ps | List Frida processes +[**v3_list_profiles_agent**](AgentApi.md#v3_list_profiles_agent) | **GET** /v3/instances/{instanceId}/agent/v1/profile/profiles | List profiles +[**v3_lock_agent**](AgentApi.md#v3_lock_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/lock | Lock device +[**v3_preauthorize_file_archive_download_agent**](AgentApi.md#v3_preauthorize_file_archive_download_agent) | **POST** /v3/instances/{instanceId}/agent-authorize/v1/file/download | Pre-authorize an archive download from VM +[**v3_preauthorize_file_download_agent**](AgentApi.md#v3_preauthorize_file_download_agent) | **POST** /v3/instances/{instanceId}/agent-authorize/v1/file/device/{filePath} | Pre-authorize a file download from VM +[**v3_run_app_agent**](AgentApi.md#v3_run_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run | Run an app +[**v3_run_frida_agent**](AgentApi.md#v3_run_frida_agent) | **POST** /v3/instances/{instanceId}/agent/v1/frida/run-frida | Run Frida +[**v3_set_adb_auth_agent**](AgentApi.md#v3_set_adb_auth_agent) | **PUT** /v3/instances/{instanceId}/agent/v1/system/adbauth | Set ADB auth setting +[**v3_set_device_properties_agent**](AgentApi.md#v3_set_device_properties_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/setDeviceProperties | Set device properties +[**v3_set_file_attributes_agent**](AgentApi.md#v3_set_file_attributes_agent) | **PATCH** /v3/instances/{instanceId}/agent/v1/file/device/{filePath} | Change attributes of a file on VM +[**v3_set_hostname_agent**](AgentApi.md#v3_set_hostname_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/setHostname | Set instance hostname +[**v3_shutdown_agent**](AgentApi.md#v3_shutdown_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/shutdown | Shut down instance +[**v3_start_container_agent**](AgentApi.md#v3_start_container_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start | Start a container +[**v3_start_container_app_agent**](AgentApi.md#v3_start_container_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start-application/{packageName}/{activityName} | Start an app in a container +[**v3_start_container_app_monitored_agent**](AgentApi.md#v3_start_container_app_monitored_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/start-application-and-monitor/{packageName}/{activityName} | Start and monitor an app in a container +[**v3_stop_container_agent**](AgentApi.md#v3_stop_container_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/stop | Stop a container +[**v3_stop_container_app_agent**](AgentApi.md#v3_stop_container_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/container/containers/{containerId}/stop-application-if-monitored | Stop a monitored app in a container +[**v3_uninstall_app_agent**](AgentApi.md#v3_uninstall_app_agent) | **POST** /v3/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall | Uninstall an app +[**v3_uninstall_profile_agent**](AgentApi.md#v3_uninstall_profile_agent) | **DELETE** /v3/instances/{instanceId}/agent/v1/profile/profiles/{profileId} | Uninstall a profile +[**v3_uninstall_remote_it_agent**](AgentApi.md#v3_uninstall_remote_it_agent) | **POST** /v3/instances/{instanceId}/agent/v1/remoteit/uninstall | Uninstall Remote.It +[**v3_unlock_agent**](AgentApi.md#v3_unlock_agent) | **POST** /v3/instances/{instanceId}/agent/v1/system/unlock | Unlock device +[**v3_upload_file_agent**](AgentApi.md#v3_upload_file_agent) | **PUT** /v3/instances/{instanceId}/agent/v1/file/device/{filePath} | Upload a file to VM + + +# **v3_delete_file_agent** +> v3_delete_file_agent(instance_id, file_path) + +Delete a file on VM + +Delete a file from the VM filesystem. + +Deletes are idempotent: an unknown `instanceId`, or a path the on-device agent no longer has, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. +Other agent-reported failures, and an unreachable agent, are still reported as failures. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + file_path = '/var/tmp/agent.log' # str | Path to the file on the VM filesystem. + + try: + # Delete a file on VM + api_instance.v3_delete_file_agent(instance_id, file_path) + except Exception as e: + print("Exception when calling AgentApi->v3_delete_file_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **file_path** | **str**| Path to the file on the VM filesystem. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | File deleted successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_adb_auth_agent** +> AgentSystemAdbAuth v3_get_adb_auth_agent(instance_id) + +Get ADB auth setting + +Get the current ADB authorization setting (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_adb_auth import AgentSystemAdbAuth +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get ADB auth setting + api_response = api_instance.v3_get_adb_auth_agent(instance_id) + print("The response of AgentApi->v3_get_adb_auth_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_adb_auth_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentSystemAdbAuth**](AgentSystemAdbAuth.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current ADB auth setting. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_app_ready_agent** +> AgentAppReadyResponse v3_get_app_ready_agent(instance_id) + +Check if app subsystem is ready + +Checks whether the device's agent is ready to manage apps. The agent is a helper service running inside the device that carries out the Agent calls (installing and running apps, reading and writing files, and so on). It starts after the device boots, so a device that just turned `on` may not be ready yet. Call this first and wait until it reports ready before using the other Agent endpoints. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_app_ready_response import AgentAppReadyResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Check if app subsystem is ready + api_response = api_instance.v3_get_app_ready_agent(instance_id) + print("The response of AgentApi->v3_get_app_ready_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_app_ready_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentAppReadyResponse**](AgentAppReadyResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | App agent state. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_container_health_agent** +> AgentContainerHealth v3_get_container_health_agent(instance_id, container_id) + +Get container health + +Check whether a nested container is healthy (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_container_health import AgentContainerHealth +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + container_id = '1' # str | Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). + + try: + # Get container health + api_response = api_instance.v3_get_container_health_agent(instance_id, container_id) + print("The response of AgentApi->v3_get_container_health_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_container_health_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **container_id** | **str**| Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). | + +### Return type + +[**AgentContainerHealth**](AgentContainerHealth.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Container health. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_file_agent** +> bytearray v3_get_file_agent(instance_id, file_path) + +Download a file from VM + +Downloads one file from the device's filesystem, given its full path on the device (for example `/tmp/log.txt`). The response body is the raw file. For large files, use `v3PreauthorizeFileDownloadAgent` so the download does not have to pass through your SDK client. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + file_path = '/var/tmp/agent.log' # str | Path to the file on the VM filesystem. + + try: + # Download a file from VM + api_response = api_instance.v3_get_file_agent(instance_id, file_path) + print("The response of AgentApi->v3_get_file_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_file_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **file_path** | **str**| Path to the file on the VM filesystem. | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | File contents. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_network_agent** +> AgentSystemNetworkResponse v3_get_network_agent(instance_id) + +Get eth0 IP address + +Get the IP address bound to eth0 (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_network_response import AgentSystemNetworkResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get eth0 IP address + api_response = api_instance.v3_get_network_agent(instance_id) + print("The response of AgentApi->v3_get_network_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_network_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentSystemNetworkResponse**](AgentSystemNetworkResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | IP address of eth0. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_prop_agent** +> AgentSystemGetPropResponse v3_get_prop_agent(instance_id, agent_system_get_prop_body) + +Get a system property + +Get the value of a system property (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_get_prop_body import AgentSystemGetPropBody +from corellium.models.agent_system_get_prop_response import AgentSystemGetPropResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + agent_system_get_prop_body = corellium.AgentSystemGetPropBody() # AgentSystemGetPropBody | + + try: + # Get a system property + api_response = api_instance.v3_get_prop_agent(instance_id, agent_system_get_prop_body) + print("The response of AgentApi->v3_get_prop_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_prop_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **agent_system_get_prop_body** | [**AgentSystemGetPropBody**](AgentSystemGetPropBody.md)| | + +### Return type + +[**AgentSystemGetPropResponse**](AgentSystemGetPropResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Value of the requested property. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_remote_it_status_agent** +> AgentRemoteItStatus v3_get_remote_it_status_agent(instance_id) + +Get Remote.It status + +Get the installation status of the Remote.It package on the VM (RPi only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_remote_it_status import AgentRemoteItStatus +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get Remote.It status + api_response = api_instance.v3_get_remote_it_status_agent(instance_id) + print("The response of AgentApi->v3_get_remote_it_status_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_remote_it_status_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentRemoteItStatus**](AgentRemoteItStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current Remote.It status. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | +**405** | Method not allowed. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_temp_file_agent** +> AgentTempFileResponse v3_get_temp_file_agent(instance_id) + +Get a temp file path on VM + +Returns an unused temporary file path on the device, free at the moment of the call. Use it as the target for `v3UploadFileAgent`, for example to stage an app package before `v3InstallAgent`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_temp_file_response import AgentTempFileResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get a temp file path on VM + api_response = api_instance.v3_get_temp_file_agent(instance_id) + print("The response of AgentApi->v3_get_temp_file_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_get_temp_file_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentTempFileResponse**](AgentTempFileResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Temporary file path. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_install_agent** +> v3_install_agent(instance_id, agent_install_body) + +Install app at path + +Installs an app from a package file that is already on the device, for example an `.ipa` (iOS) or `.apk` (Android). Returns 204 once installed. + +**Installing an app from your computer:** +1. `v3GetAppReadyAgent`: wait until the agent is ready. +2. `v3GetTempFileAgent`: get a free temporary path on the device. +3. `v3UploadFileAgent`: upload the package to that path. +4. `v3InstallAgent` (this call) with that `path`. +5. `v3ListAppsAgent` to find the app's bundle ID, then `v3RunAppAgent` to start it. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_install_body import AgentInstallBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + agent_install_body = corellium.AgentInstallBody() # AgentInstallBody | + + try: + # Install app at path + api_instance.v3_install_agent(instance_id, agent_install_body) + except Exception as e: + print("Exception when calling AgentApi->v3_install_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **agent_install_body** | [**AgentInstallBody**](AgentInstallBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | App installed successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_install_open_gapps_agent** +> v3_install_open_gapps_agent(instance_id, agent_system_install_open_gapps_body) + +Install OpenGApps + +Download and install OpenGApps on the instance (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_install_open_gapps_body import AgentSystemInstallOpenGappsBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + agent_system_install_open_gapps_body = corellium.AgentSystemInstallOpenGappsBody() # AgentSystemInstallOpenGappsBody | + + try: + # Install OpenGApps + api_instance.v3_install_open_gapps_agent(instance_id, agent_system_install_open_gapps_body) + except Exception as e: + print("Exception when calling AgentApi->v3_install_open_gapps_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **agent_system_install_open_gapps_body** | [**AgentSystemInstallOpenGappsBody**](AgentSystemInstallOpenGappsBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | OpenGApps installation started successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_install_profile_agent** +> v3_install_profile_agent(instance_id, body) + +Install a profile + +Install a configuration profile on the VM. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + body = None # bytearray | + + try: + # Install a profile + api_instance.v3_install_profile_agent(instance_id, body) + except Exception as e: + print("Exception when calling AgentApi->v3_install_profile_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **body** | **bytearray**| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Profile installed successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_install_remote_it_agent** +> AgentRemoteItStatus v3_install_remote_it_agent(instance_id) + +Install Remote.It + +Install the Remote.It package on the VM (RPi only). The device name and platform code are derived server-side from the instance and its flavor. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_remote_it_status import AgentRemoteItStatus +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Install Remote.It + api_response = api_instance.v3_install_remote_it_agent(instance_id) + print("The response of AgentApi->v3_install_remote_it_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_install_remote_it_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentRemoteItStatus**](AgentRemoteItStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Remote.It status after install. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | +**405** | Method not allowed. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_kill_app_agent** +> v3_kill_app_agent(instance_id, bundle_id) + +Kill an app + +Force-quits a running app on the device, identified by its bundle ID. The app stays installed; start it again with `v3RunAppAgent`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + bundle_id = 'com.corellium.cafe' # str | App bundle ID. + + try: + # Kill an app + api_instance.v3_kill_app_agent(instance_id, bundle_id) + except Exception as e: + print("Exception when calling AgentApi->v3_kill_app_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **bundle_id** | **str**| App bundle ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | App killed successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_kill_frida_agent** +> AgentFridaResponse v3_kill_frida_agent(instance_id) + +Kill Frida + +Stop the running Frida session on the VM. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_frida_response import AgentFridaResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Kill Frida + api_response = api_instance.v3_kill_frida_agent(instance_id) + print("The response of AgentApi->v3_kill_frida_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_kill_frida_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentFridaResponse**](AgentFridaResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Frida killed successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_app_icons_agent** +> AgentIconsResponse v3_list_app_icons_agent(instance_id, bundle_id) + +List app icons + +List app icons as base64-encoded data for the specified bundle IDs. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_icons_response import AgentIconsResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + bundle_id = ['[\"com.corellium.cafe\"]'] # List[str] | One or more app bundle IDs to fetch icons for. + + try: + # List app icons + api_response = api_instance.v3_list_app_icons_agent(instance_id, bundle_id) + print("The response of AgentApi->v3_list_app_icons_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_list_app_icons_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **bundle_id** | [**List[str]**](str.md)| One or more app bundle IDs to fetch icons for. | + +### Return type + +[**AgentIconsResponse**](AgentIconsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | App icons keyed by bundle ID. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_apps_agent** +> AgentAppsList v3_list_apps_agent(instance_id, load_icons=load_icons) + +List apps + +Lists the apps installed on the device, with each app's bundle ID (for example `com.android.egg`) and name. The bundle ID is what the run, kill and uninstall calls need. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_apps_list import AgentAppsList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + load_icons = 'load_icons_example' # str | Whether to include each app icon in the response. (optional) + + try: + # List apps + api_response = api_instance.v3_list_apps_agent(instance_id, load_icons=load_icons) + print("The response of AgentApi->v3_list_apps_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_list_apps_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **load_icons** | **str**| Whether to include each app icon in the response. | [optional] + +### Return type + +[**AgentAppsList**](AgentAppsList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Installed apps info. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**500** | The agent returned an invalid app list. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_apps_status_agent** +> AgentAppsStatusList v3_list_apps_status_agent(instance_id) + +List apps status + +Returns, for every installed app, whether it is currently running. Use it to check that an app started after `v3RunAppAgent`, or stopped after `v3KillAppAgent`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_apps_status_list import AgentAppsStatusList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # List apps status + api_response = api_instance.v3_list_apps_status_agent(instance_id) + print("The response of AgentApi->v3_list_apps_status_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_list_apps_status_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentAppsStatusList**](AgentAppsStatusList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Installed apps status info. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_containers_agent** +> AgentContainerList v3_list_containers_agent(instance_id) + +List containers + +List the nested containers on the VM (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_container_list import AgentContainerList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # List containers + api_response = api_instance.v3_list_containers_agent(instance_id) + print("The response of AgentApi->v3_list_containers_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_list_containers_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentContainerList**](AgentContainerList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of containers. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_frida_processes_agent** +> AgentFridaProcessList v3_list_frida_processes_agent(instance_id) + +List Frida processes + +Run frida-ps on the VM and return the list of processes. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_frida_process_list import AgentFridaProcessList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # List Frida processes + api_response = api_instance.v3_list_frida_processes_agent(instance_id) + print("The response of AgentApi->v3_list_frida_processes_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_list_frida_processes_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentFridaProcessList**](AgentFridaProcessList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Frida process list. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_profiles_agent** +> AgentProfileListResponse v3_list_profiles_agent(instance_id) + +List profiles + +List the configuration profiles installed on the VM. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_profile_list_response import AgentProfileListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # List profiles + api_response = api_instance.v3_list_profiles_agent(instance_id) + print("The response of AgentApi->v3_list_profiles_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_list_profiles_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentProfileListResponse**](AgentProfileListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Installed profiles. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_lock_agent** +> v3_lock_agent(instance_id) + +Lock device + +Lock the device (iOS only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Lock device + api_instance.v3_lock_agent(instance_id) + except Exception as e: + print("Exception when calling AgentApi->v3_lock_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Device locked successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_preauthorize_file_archive_download_agent** +> AgentFileDownloadToken v3_preauthorize_file_archive_download_agent(instance_id, agent_file_archive_download_body) + +Pre-authorize an archive download from VM + +Returns a short-lived token for downloading several files and folders from the device as one ZIP archive, built on the server. List the paths to include in the body, then download with `GET /v1/preauthed/{token}/{filename}`. The token expires with your current session. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_file_archive_download_body import AgentFileArchiveDownloadBody +from corellium.models.agent_file_download_token import AgentFileDownloadToken +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + agent_file_archive_download_body = corellium.AgentFileArchiveDownloadBody() # AgentFileArchiveDownloadBody | + + try: + # Pre-authorize an archive download from VM + api_response = api_instance.v3_preauthorize_file_archive_download_agent(instance_id, agent_file_archive_download_body) + print("The response of AgentApi->v3_preauthorize_file_archive_download_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_preauthorize_file_archive_download_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **agent_file_archive_download_body** | [**AgentFileArchiveDownloadBody**](AgentFileArchiveDownloadBody.md)| | + +### Return type + +[**AgentFileDownloadToken**](AgentFileDownloadToken.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Preauthorized archive download token. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_preauthorize_file_download_agent** +> AgentFileDownloadToken v3_preauthorize_file_download_agent(instance_id, file_path) + +Pre-authorize a file download from VM + +Returns a short-lived token for downloading one device file directly (for example from a browser or download manager) without an `Authorization` header and without buffering it in your SDK client. Download it with `GET /v1/preauthed/{token}/{filename}`. The token works only for this file and expires with your current session. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_file_download_token import AgentFileDownloadToken +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + file_path = '/var/tmp/agent.log' # str | Path to the file on the VM filesystem. + + try: + # Pre-authorize a file download from VM + api_response = api_instance.v3_preauthorize_file_download_agent(instance_id, file_path) + print("The response of AgentApi->v3_preauthorize_file_download_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_preauthorize_file_download_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **file_path** | **str**| Path to the file on the VM filesystem. | + +### Return type + +[**AgentFileDownloadToken**](AgentFileDownloadToken.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Preauthorized download token. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_app_agent** +> v3_run_app_agent(instance_id, bundle_id) + +Run an app + +Launches an installed app on the device, identified by its bundle ID from `v3ListAppsAgent`. Returns 204 once the launch has been requested; check `v3ListAppsStatusAgent` to confirm it is running. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + bundle_id = 'com.corellium.cafe' # str | App bundle ID. + + try: + # Run an app + api_instance.v3_run_app_agent(instance_id, bundle_id) + except Exception as e: + print("Exception when calling AgentApi->v3_run_app_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **bundle_id** | **str**| App bundle ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | App started successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_frida_agent** +> AgentFridaResponse v3_run_frida_agent(instance_id, agent_frida_run_body) + +Run Frida + +Attach Frida to a target process on the VM. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_frida_response import AgentFridaResponse +from corellium.models.agent_frida_run_body import AgentFridaRunBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + agent_frida_run_body = corellium.AgentFridaRunBody() # AgentFridaRunBody | + + try: + # Run Frida + api_response = api_instance.v3_run_frida_agent(instance_id, agent_frida_run_body) + print("The response of AgentApi->v3_run_frida_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_run_frida_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **agent_frida_run_body** | [**AgentFridaRunBody**](AgentFridaRunBody.md)| | + +### Return type + +[**AgentFridaResponse**](AgentFridaResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Frida attached successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_set_adb_auth_agent** +> v3_set_adb_auth_agent(instance_id, agent_system_adb_auth) + +Set ADB auth setting + +Enable or disable ADB authorization (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_adb_auth import AgentSystemAdbAuth +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + agent_system_adb_auth = corellium.AgentSystemAdbAuth() # AgentSystemAdbAuth | + + try: + # Set ADB auth setting + api_instance.v3_set_adb_auth_agent(instance_id, agent_system_adb_auth) + except Exception as e: + print("Exception when calling AgentApi->v3_set_adb_auth_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **agent_system_adb_auth** | [**AgentSystemAdbAuth**](AgentSystemAdbAuth.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | ADB auth setting updated successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_set_device_properties_agent** +> AgentSystemResult v3_set_device_properties_agent(instance_id, agent_system_set_device_properties_body=agent_system_set_device_properties_body) + +Set device properties + +Set device properties (model and manufacturer ID) of the instance (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_result import AgentSystemResult +from corellium.models.agent_system_set_device_properties_body import AgentSystemSetDevicePropertiesBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + agent_system_set_device_properties_body = corellium.AgentSystemSetDevicePropertiesBody() # AgentSystemSetDevicePropertiesBody | (optional) + + try: + # Set device properties + api_response = api_instance.v3_set_device_properties_agent(instance_id, agent_system_set_device_properties_body=agent_system_set_device_properties_body) + print("The response of AgentApi->v3_set_device_properties_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_set_device_properties_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **agent_system_set_device_properties_body** | [**AgentSystemSetDevicePropertiesBody**](AgentSystemSetDevicePropertiesBody.md)| | [optional] + +### Return type + +[**AgentSystemResult**](AgentSystemResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Device properties updated. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_set_file_attributes_agent** +> v3_set_file_attributes_agent(instance_id, file_path, agent_file_attributes_body=agent_file_attributes_body) + +Change attributes of a file on VM + +Changes a file on the device: move or rename it (`path`), change its permissions (`mode`), or change its owner. Send only what you want to change. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_file_attributes_body import AgentFileAttributesBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + file_path = '/var/tmp/agent.log' # str | Path to the file on the VM filesystem. + agent_file_attributes_body = corellium.AgentFileAttributesBody() # AgentFileAttributesBody | (optional) + + try: + # Change attributes of a file on VM + api_instance.v3_set_file_attributes_agent(instance_id, file_path, agent_file_attributes_body=agent_file_attributes_body) + except Exception as e: + print("Exception when calling AgentApi->v3_set_file_attributes_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **file_path** | **str**| Path to the file on the VM filesystem. | + **agent_file_attributes_body** | [**AgentFileAttributesBody**](AgentFileAttributesBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | File attributes updated successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_set_hostname_agent** +> AgentSystemResult v3_set_hostname_agent(instance_id, agent_system_set_hostname_body) + +Set instance hostname + +Set the hostname of the instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_result import AgentSystemResult +from corellium.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + agent_system_set_hostname_body = corellium.AgentSystemSetHostnameBody() # AgentSystemSetHostnameBody | + + try: + # Set instance hostname + api_response = api_instance.v3_set_hostname_agent(instance_id, agent_system_set_hostname_body) + print("The response of AgentApi->v3_set_hostname_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_set_hostname_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **agent_system_set_hostname_body** | [**AgentSystemSetHostnameBody**](AgentSystemSetHostnameBody.md)| | + +### Return type + +[**AgentSystemResult**](AgentSystemResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Hostname set successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_shutdown_agent** +> v3_shutdown_agent(instance_id) + +Shut down instance + +Shut down the instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Shut down instance + api_instance.v3_shutdown_agent(instance_id) + except Exception as e: + print("Exception when calling AgentApi->v3_shutdown_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Shutdown initiated successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_container_agent** +> v3_start_container_agent(instance_id, container_id) + +Start a container + +Start a nested container on the VM (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + container_id = '1' # str | Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). + + try: + # Start a container + api_instance.v3_start_container_agent(instance_id, container_id) + except Exception as e: + print("Exception when calling AgentApi->v3_start_container_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **container_id** | **str**| Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Container started. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_container_app_agent** +> v3_start_container_app_agent(instance_id, container_id, package_name, activity_name) + +Start an app in a container + +Start an Android application in a nested container (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + container_id = '1' # str | Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). + package_name = 'com.corellium.cafe' # str | Android package name of the application. + activity_name = 'com.corellium.cafe.MainActivity' # str | Android activity name to launch. + + try: + # Start an app in a container + api_instance.v3_start_container_app_agent(instance_id, container_id, package_name, activity_name) + except Exception as e: + print("Exception when calling AgentApi->v3_start_container_app_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **container_id** | **str**| Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). | + **package_name** | **str**| Android package name of the application. | + **activity_name** | **str**| Android activity name to launch. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Application started. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_container_app_monitored_agent** +> v3_start_container_app_monitored_agent(instance_id, container_id, package_name, activity_name) + +Start and monitor an app in a container + +Start an Android application in a nested container and monitor it (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + container_id = '1' # str | Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). + package_name = 'com.corellium.cafe' # str | Android package name of the application. + activity_name = 'com.corellium.cafe.MainActivity' # str | Android activity name to launch. + + try: + # Start and monitor an app in a container + api_instance.v3_start_container_app_monitored_agent(instance_id, container_id, package_name, activity_name) + except Exception as e: + print("Exception when calling AgentApi->v3_start_container_app_monitored_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **container_id** | **str**| Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). | + **package_name** | **str**| Android package name of the application. | + **activity_name** | **str**| Android activity name to launch. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Application started and monitored. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_stop_container_agent** +> v3_stop_container_agent(instance_id, container_id) + +Stop a container + +Stop a nested container on the VM (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + container_id = '1' # str | Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). + + try: + # Stop a container + api_instance.v3_stop_container_agent(instance_id, container_id) + except Exception as e: + print("Exception when calling AgentApi->v3_stop_container_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **container_id** | **str**| Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Container stopped. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_stop_container_app_agent** +> v3_stop_container_app_agent(instance_id, container_id) + +Stop a monitored app in a container + +Stop the monitored Android application in a nested container, if one is monitored (Android only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + container_id = '1' # str | Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). + + try: + # Stop a monitored app in a container + api_instance.v3_stop_container_app_agent(instance_id, container_id) + except Exception as e: + print("Exception when calling AgentApi->v3_stop_container_app_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **container_id** | **str**| Container identifier (the numeric suffix of the container name, e.g. \"1\" for container1). | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Application stopped. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_uninstall_app_agent** +> v3_uninstall_app_agent(instance_id, bundle_id) + +Uninstall an app + +Removes an app from the device, identified by its bundle ID. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + bundle_id = 'com.corellium.cafe' # str | App bundle ID. + + try: + # Uninstall an app + api_instance.v3_uninstall_app_agent(instance_id, bundle_id) + except Exception as e: + print("Exception when calling AgentApi->v3_uninstall_app_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **bundle_id** | **str**| App bundle ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | App uninstalled successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_uninstall_profile_agent** +> v3_uninstall_profile_agent(instance_id, profile_id) + +Uninstall a profile + +Uninstall a configuration profile from the VM. + +Deletes are idempotent: an unknown `instanceId`, or a profile that is not installed, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. +Other agent-reported failures, and an unreachable agent, are still reported as failures. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + profile_id = 'com.apple.wifi.managed' # str | The profile identifier. + + try: + # Uninstall a profile + api_instance.v3_uninstall_profile_agent(instance_id, profile_id) + except Exception as e: + print("Exception when calling AgentApi->v3_uninstall_profile_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **profile_id** | **str**| The profile identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Profile uninstalled successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_uninstall_remote_it_agent** +> AgentRemoteItStatus v3_uninstall_remote_it_agent(instance_id) + +Uninstall Remote.It + +Uninstall the Remote.It package from the VM (RPi only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_remote_it_status import AgentRemoteItStatus +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Uninstall Remote.It + api_response = api_instance.v3_uninstall_remote_it_agent(instance_id) + print("The response of AgentApi->v3_uninstall_remote_it_agent:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->v3_uninstall_remote_it_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**AgentRemoteItStatus**](AgentRemoteItStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Remote.It status after uninstall. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | +**405** | Method not allowed. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_unlock_agent** +> v3_unlock_agent(instance_id) + +Unlock device + +Unlock the device (iOS only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Unlock device + api_instance.v3_unlock_agent(instance_id) + except Exception as e: + print("Exception when calling AgentApi->v3_unlock_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Device unlocked successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_upload_file_agent** +> v3_upload_file_agent(instance_id, file_path, body) + +Upload a file to VM + +Writes a file onto the device's filesystem at the given full path, replacing any file already there. Send the raw file bytes as the body. Use `v3GetTempFileAgent` first if you just need somewhere to put a file, for example an app package to install. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + file_path = '/var/tmp/agent.log' # str | Path to the file on the VM filesystem. + body = None # bytearray | + + try: + # Upload a file to VM + api_instance.v3_upload_file_agent(instance_id, file_path, body) + except Exception as e: + print("Exception when calling AgentApi->v3_upload_file_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **file_path** | **str**| Path to the file on the VM filesystem. | + **body** | **bytearray**| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | File uploaded successfully. | - | +**400** | Agent error. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AgentApp.md b/docs/AgentApp.md index 0437b5d..905c895 100644 --- a/docs/AgentApp.md +++ b/docs/AgentApp.md @@ -1,20 +1,39 @@ # AgentApp - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tags** | **list[str]** | | [optional] -**running** | **bool** | | [optional] -**disk_usage** | **float** | | [optional] -**date** | **float** | | [optional] -**application_type** | **str** | | [optional] -**name** | **str** | | [optional] -**bundle_id** | **str** | | [optional] -**bundle_path** | **str** | | [optional] -**bundle_data_path** | **str** | | [optional] +**tags** | **List[str]** | App tags (iOS only). | [optional] +**running** | **bool** | Whether the app is currently running. | [optional] +**disk_usage** | **float** | Disk usage in bytes. | [optional] +**var_date** | **float** | Unix timestamp (seconds) of when the app was installed. | [optional] +**application_type** | **str** | Application type. | +**name** | **str** | App display name (not present for all Android apps). | [optional] +**bundle_id** | **str** | App bundle identifier. | +**bundle_path** | **str** | Path to the app bundle (iOS only). | [optional] +**bundle_data_path** | **str** | Path to the app bundle data (iOS only). | [optional] +**is_launchable** | **bool** | Whether the app is launchable (Android only). | [optional] +**icon** | **str** | Base64-encoded app icon when loadIcons is enabled. | [optional] + +## Example + +```python +from corellium.models.agent_app import AgentApp + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentApp from a JSON string +agent_app_instance = AgentApp.from_json(json) +# print the JSON string representation of the object +print(AgentApp.to_json()) +# convert the object into a dict +agent_app_dict = agent_app_instance.to_dict() +# create an instance of AgentApp from a dict +agent_app_from_dict = AgentApp.from_dict(agent_app_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentAppReadyResponse.md b/docs/AgentAppReadyResponse.md index 81df98d..ca45394 100644 --- a/docs/AgentAppReadyResponse.md +++ b/docs/AgentAppReadyResponse.md @@ -1,12 +1,29 @@ # AgentAppReadyResponse - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ready** | **bool** | | +**ready** | **bool** | Whether the app subsystem is ready. | + +## Example + +```python +from corellium.models.agent_app_ready_response import AgentAppReadyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppReadyResponse from a JSON string +agent_app_ready_response_instance = AgentAppReadyResponse.from_json(json) +# print the JSON string representation of the object +print(AgentAppReadyResponse.to_json()) +# convert the object into a dict +agent_app_ready_response_dict = agent_app_ready_response_instance.to_dict() +# create an instance of AgentAppReadyResponse from a dict +agent_app_ready_response_from_dict = AgentAppReadyResponse.from_dict(agent_app_ready_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentAppReadyResponseV1.md b/docs/AgentAppReadyResponseV1.md new file mode 100644 index 0000000..8a6857f --- /dev/null +++ b/docs/AgentAppReadyResponseV1.md @@ -0,0 +1,30 @@ +# AgentAppReadyResponseV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ready** | **bool** | | + +## Example + +```python +from corellium.models.agent_app_ready_response_v1 import AgentAppReadyResponseV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppReadyResponseV1 from a JSON string +agent_app_ready_response_v1_instance = AgentAppReadyResponseV1.from_json(json) +# print the JSON string representation of the object +print(AgentAppReadyResponseV1.to_json()) + +# convert the object into a dict +agent_app_ready_response_v1_dict = agent_app_ready_response_v1_instance.to_dict() +# create an instance of AgentAppReadyResponseV1 from a dict +agent_app_ready_response_v1_from_dict = AgentAppReadyResponseV1.from_dict(agent_app_ready_response_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentAppStatus.md b/docs/AgentAppStatus.md index 4381d9f..0fc233f 100644 --- a/docs/AgentAppStatus.md +++ b/docs/AgentAppStatus.md @@ -1,13 +1,30 @@ # AgentAppStatus - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**running** | **bool** | | [optional] -**bundle_id** | **str** | | [optional] +**running** | **bool** | Whether the app is currently running. | +**bundle_id** | **str** | App bundle identifier. | + +## Example + +```python +from corellium.models.agent_app_status import AgentAppStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppStatus from a JSON string +agent_app_status_instance = AgentAppStatus.from_json(json) +# print the JSON string representation of the object +print(AgentAppStatus.to_json()) +# convert the object into a dict +agent_app_status_dict = agent_app_status_instance.to_dict() +# create an instance of AgentAppStatus from a dict +agent_app_status_from_dict = AgentAppStatus.from_dict(agent_app_status_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentAppStatusV1.md b/docs/AgentAppStatusV1.md new file mode 100644 index 0000000..d15fe60 --- /dev/null +++ b/docs/AgentAppStatusV1.md @@ -0,0 +1,31 @@ +# AgentAppStatusV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**running** | **bool** | | [optional] +**bundle_id** | **str** | | [optional] + +## Example + +```python +from corellium.models.agent_app_status_v1 import AgentAppStatusV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppStatusV1 from a JSON string +agent_app_status_v1_instance = AgentAppStatusV1.from_json(json) +# print the JSON string representation of the object +print(AgentAppStatusV1.to_json()) + +# convert the object into a dict +agent_app_status_v1_dict = agent_app_status_v1_instance.to_dict() +# create an instance of AgentAppStatusV1 from a dict +agent_app_status_v1_from_dict = AgentAppStatusV1.from_dict(agent_app_status_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentAppV1.md b/docs/AgentAppV1.md new file mode 100644 index 0000000..389e707 --- /dev/null +++ b/docs/AgentAppV1.md @@ -0,0 +1,38 @@ +# AgentAppV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | **List[str]** | | [optional] +**running** | **bool** | | [optional] +**disk_usage** | **float** | | [optional] +**var_date** | **float** | | [optional] +**application_type** | **str** | | [optional] +**name** | **str** | | [optional] +**bundle_id** | **str** | | [optional] +**bundle_path** | **str** | | [optional] +**bundle_data_path** | **str** | | [optional] + +## Example + +```python +from corellium.models.agent_app_v1 import AgentAppV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppV1 from a JSON string +agent_app_v1_instance = AgentAppV1.from_json(json) +# print the JSON string representation of the object +print(AgentAppV1.to_json()) + +# convert the object into a dict +agent_app_v1_dict = agent_app_v1_instance.to_dict() +# create an instance of AgentAppV1 from a dict +agent_app_v1_from_dict = AgentAppV1.from_dict(agent_app_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentAppsList.md b/docs/AgentAppsList.md index 7d2310a..4ec11cb 100644 --- a/docs/AgentAppsList.md +++ b/docs/AgentAppsList.md @@ -1,13 +1,31 @@ # AgentAppsList - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**apps** | [**list[AgentApp]**](AgentApp.md) | | [optional] -**frontmost** | **str** | bundleID of frontmost app or empty string if none are frontmost | [optional] +**success** | **bool** | Whether the agent request succeeded. | +**apps** | [**List[AgentApp]**](AgentApp.md) | List of installed apps. | +**frontmost** | **str** | Bundle ID of the frontmost app or empty string if none (iOS only). | [optional] + +## Example + +```python +from corellium.models.agent_apps_list import AgentAppsList + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppsList from a JSON string +agent_apps_list_instance = AgentAppsList.from_json(json) +# print the JSON string representation of the object +print(AgentAppsList.to_json()) +# convert the object into a dict +agent_apps_list_dict = agent_apps_list_instance.to_dict() +# create an instance of AgentAppsList from a dict +agent_apps_list_from_dict = AgentAppsList.from_dict(agent_apps_list_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentAppsListV1.md b/docs/AgentAppsListV1.md new file mode 100644 index 0000000..2cbd5d5 --- /dev/null +++ b/docs/AgentAppsListV1.md @@ -0,0 +1,31 @@ +# AgentAppsListV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apps** | [**List[AgentAppV1]**](AgentAppV1.md) | | [optional] +**frontmost** | **str** | bundleID of frontmost app or empty string if none are frontmost | [optional] + +## Example + +```python +from corellium.models.agent_apps_list_v1 import AgentAppsListV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppsListV1 from a JSON string +agent_apps_list_v1_instance = AgentAppsListV1.from_json(json) +# print the JSON string representation of the object +print(AgentAppsListV1.to_json()) + +# convert the object into a dict +agent_apps_list_v1_dict = agent_apps_list_v1_instance.to_dict() +# create an instance of AgentAppsListV1 from a dict +agent_apps_list_v1_from_dict = AgentAppsListV1.from_dict(agent_apps_list_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentAppsStatusList.md b/docs/AgentAppsStatusList.md index 21a39e0..4f0033c 100644 --- a/docs/AgentAppsStatusList.md +++ b/docs/AgentAppsStatusList.md @@ -1,13 +1,32 @@ # AgentAppsStatusList - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**apps** | [**list[AgentAppStatus]**](AgentAppStatus.md) | | [optional] -**frontmost** | **str** | bundleID of frontmost app or empty string if none are frontmost | [optional] +**success** | **bool** | Whether the agent request succeeded. | +**id** | **float** | Agent sequence ID. | +**apps** | [**List[AgentAppStatus]**](AgentAppStatus.md) | List of app statuses. | +**frontmost** | **str** | Bundle ID of the frontmost app or empty string if none (iOS only). | [optional] + +## Example + +```python +from corellium.models.agent_apps_status_list import AgentAppsStatusList + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppsStatusList from a JSON string +agent_apps_status_list_instance = AgentAppsStatusList.from_json(json) +# print the JSON string representation of the object +print(AgentAppsStatusList.to_json()) +# convert the object into a dict +agent_apps_status_list_dict = agent_apps_status_list_instance.to_dict() +# create an instance of AgentAppsStatusList from a dict +agent_apps_status_list_from_dict = AgentAppsStatusList.from_dict(agent_apps_status_list_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentAppsStatusListV1.md b/docs/AgentAppsStatusListV1.md new file mode 100644 index 0000000..ac7fc01 --- /dev/null +++ b/docs/AgentAppsStatusListV1.md @@ -0,0 +1,31 @@ +# AgentAppsStatusListV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apps** | [**List[AgentAppStatusV1]**](AgentAppStatusV1.md) | | [optional] +**frontmost** | **str** | bundleID of frontmost app or empty string if none are frontmost | [optional] + +## Example + +```python +from corellium.models.agent_apps_status_list_v1 import AgentAppsStatusListV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentAppsStatusListV1 from a JSON string +agent_apps_status_list_v1_instance = AgentAppsStatusListV1.from_json(json) +# print the JSON string representation of the object +print(AgentAppsStatusListV1.to_json()) + +# convert the object into a dict +agent_apps_status_list_v1_dict = agent_apps_status_list_v1_instance.to_dict() +# create an instance of AgentAppsStatusListV1 from a dict +agent_apps_status_list_v1_from_dict = AgentAppsStatusListV1.from_dict(agent_apps_status_list_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentContainer.md b/docs/AgentContainer.md new file mode 100644 index 0000000..78d33ff --- /dev/null +++ b/docs/AgentContainer.md @@ -0,0 +1,38 @@ +# AgentContainer + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autostart** | **str** | Whether the container starts automatically. | +**groups** | **str** | Container groups. | +**ipv4** | **str** | IPv4 address. | +**ipv6** | **str** | IPv6 address. | +**name** | **str** | Container name. | +**pid** | **str** | Process ID of the container. | +**ram** | **str** | RAM usage. | +**state** | **str** | Container state (e.g. RUNNING, STOPPED). | +**swap** | **str** | Swap usage. | +**unprivileged** | **str** | Whether the container is unprivileged. | + +## Example + +```python +from corellium.models.agent_container import AgentContainer + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentContainer from a JSON string +agent_container_instance = AgentContainer.from_json(json) +# print the JSON string representation of the object +print(AgentContainer.to_json()) + +# convert the object into a dict +agent_container_dict = agent_container_instance.to_dict() +# create an instance of AgentContainer from a dict +agent_container_from_dict = AgentContainer.from_dict(agent_container_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentContainerHealth.md b/docs/AgentContainerHealth.md new file mode 100644 index 0000000..0d7ae03 --- /dev/null +++ b/docs/AgentContainerHealth.md @@ -0,0 +1,29 @@ +# AgentContainerHealth + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**healthy** | **bool** | Whether the container is healthy. | + +## Example + +```python +from corellium.models.agent_container_health import AgentContainerHealth + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentContainerHealth from a JSON string +agent_container_health_instance = AgentContainerHealth.from_json(json) +# print the JSON string representation of the object +print(AgentContainerHealth.to_json()) + +# convert the object into a dict +agent_container_health_dict = agent_container_health_instance.to_dict() +# create an instance of AgentContainerHealth from a dict +agent_container_health_from_dict = AgentContainerHealth.from_dict(agent_container_health_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentContainerList.md b/docs/AgentContainerList.md new file mode 100644 index 0000000..fafe886 --- /dev/null +++ b/docs/AgentContainerList.md @@ -0,0 +1,29 @@ +# AgentContainerList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**containers** | [**List[AgentContainer]**](AgentContainer.md) | List of containers on the VM. | + +## Example + +```python +from corellium.models.agent_container_list import AgentContainerList + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentContainerList from a JSON string +agent_container_list_instance = AgentContainerList.from_json(json) +# print the JSON string representation of the object +print(AgentContainerList.to_json()) + +# convert the object into a dict +agent_container_list_dict = agent_container_list_instance.to_dict() +# create an instance of AgentContainerList from a dict +agent_container_list_from_dict = AgentContainerList.from_dict(agent_container_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentError.md b/docs/AgentError.md index 5c2cd01..25ccbb6 100644 --- a/docs/AgentError.md +++ b/docs/AgentError.md @@ -1,14 +1,31 @@ # AgentError - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | **str** | The error encountered by the agent | -**error_id** | **str** | AgentError | -**original_error** | **object** | The full error encountered by the agent | [optional] +**error** | **str** | The error encountered by the agent. | +**error_id** | **str** | Error ID. | +**original_error** | **Dict[str, Optional[object]]** | The full error object encountered by the agent. | [optional] + +## Example + +```python +from corellium.models.agent_error import AgentError + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentError from a JSON string +agent_error_instance = AgentError.from_json(json) +# print the JSON string representation of the object +print(AgentError.to_json()) +# convert the object into a dict +agent_error_dict = agent_error_instance.to_dict() +# create an instance of AgentError from a dict +agent_error_from_dict = AgentError.from_dict(agent_error_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentErrorV1.md b/docs/AgentErrorV1.md new file mode 100644 index 0000000..2bb2f46 --- /dev/null +++ b/docs/AgentErrorV1.md @@ -0,0 +1,32 @@ +# AgentErrorV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | The error encountered by the agent | +**error_id** | **str** | AgentError | +**original_error** | **object** | The full error encountered by the agent | [optional] + +## Example + +```python +from corellium.models.agent_error_v1 import AgentErrorV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentErrorV1 from a JSON string +agent_error_v1_instance = AgentErrorV1.from_json(json) +# print the JSON string representation of the object +print(AgentErrorV1.to_json()) + +# convert the object into a dict +agent_error_v1_dict = agent_error_v1_instance.to_dict() +# create an instance of AgentErrorV1 from a dict +agent_error_v1_from_dict = AgentErrorV1.from_dict(agent_error_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentFileArchiveDownloadBody.md b/docs/AgentFileArchiveDownloadBody.md new file mode 100644 index 0000000..3572aed --- /dev/null +++ b/docs/AgentFileArchiveDownloadBody.md @@ -0,0 +1,29 @@ +# AgentFileArchiveDownloadBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**paths** | **List[str]** | File and directory paths to include. Directory paths must end with a slash. | + +## Example + +```python +from corellium.models.agent_file_archive_download_body import AgentFileArchiveDownloadBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentFileArchiveDownloadBody from a JSON string +agent_file_archive_download_body_instance = AgentFileArchiveDownloadBody.from_json(json) +# print the JSON string representation of the object +print(AgentFileArchiveDownloadBody.to_json()) + +# convert the object into a dict +agent_file_archive_download_body_dict = agent_file_archive_download_body_instance.to_dict() +# create an instance of AgentFileArchiveDownloadBody from a dict +agent_file_archive_download_body_from_dict = AgentFileArchiveDownloadBody.from_dict(agent_file_archive_download_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentFileAttributesBody.md b/docs/AgentFileAttributesBody.md new file mode 100644 index 0000000..c39cee7 --- /dev/null +++ b/docs/AgentFileAttributesBody.md @@ -0,0 +1,32 @@ +# AgentFileAttributesBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | New path to move/rename the file to. | [optional] +**mode** | **float** | New file mode as a decimal integer (octal 0644 = 420). | [optional] +**uid** | **float** | New owner UID. | [optional] +**gid** | **float** | New group GID. | [optional] + +## Example + +```python +from corellium.models.agent_file_attributes_body import AgentFileAttributesBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentFileAttributesBody from a JSON string +agent_file_attributes_body_instance = AgentFileAttributesBody.from_json(json) +# print the JSON string representation of the object +print(AgentFileAttributesBody.to_json()) + +# convert the object into a dict +agent_file_attributes_body_dict = agent_file_attributes_body_instance.to_dict() +# create an instance of AgentFileAttributesBody from a dict +agent_file_attributes_body_from_dict = AgentFileAttributesBody.from_dict(agent_file_attributes_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentFileDownloadToken.md b/docs/AgentFileDownloadToken.md new file mode 100644 index 0000000..3c482d4 --- /dev/null +++ b/docs/AgentFileDownloadToken.md @@ -0,0 +1,29 @@ +# AgentFileDownloadToken + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Authorization token for a preauthorized file download. | + +## Example + +```python +from corellium.models.agent_file_download_token import AgentFileDownloadToken + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentFileDownloadToken from a JSON string +agent_file_download_token_instance = AgentFileDownloadToken.from_json(json) +# print the JSON string representation of the object +print(AgentFileDownloadToken.to_json()) + +# convert the object into a dict +agent_file_download_token_dict = agent_file_download_token_instance.to_dict() +# create an instance of AgentFileDownloadToken from a dict +agent_file_download_token_from_dict = AgentFileDownloadToken.from_dict(agent_file_download_token_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentFridaProcessList.md b/docs/AgentFridaProcessList.md new file mode 100644 index 0000000..eee2218 --- /dev/null +++ b/docs/AgentFridaProcessList.md @@ -0,0 +1,32 @@ +# AgentFridaProcessList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Whether the agent request succeeded. | +**exit_status** | **float** | Exit status of the frida-ps command. | +**output** | **str** | Raw output of the frida-ps command. | +**attached** | [**AgentFridaProcessListAttached**](AgentFridaProcessListAttached.md) | | [optional] + +## Example + +```python +from corellium.models.agent_frida_process_list import AgentFridaProcessList + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentFridaProcessList from a JSON string +agent_frida_process_list_instance = AgentFridaProcessList.from_json(json) +# print the JSON string representation of the object +print(AgentFridaProcessList.to_json()) + +# convert the object into a dict +agent_frida_process_list_dict = agent_frida_process_list_instance.to_dict() +# create an instance of AgentFridaProcessList from a dict +agent_frida_process_list_from_dict = AgentFridaProcessList.from_dict(agent_frida_process_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentFridaProcessListAttached.md b/docs/AgentFridaProcessListAttached.md new file mode 100644 index 0000000..4437b82 --- /dev/null +++ b/docs/AgentFridaProcessListAttached.md @@ -0,0 +1,31 @@ +# AgentFridaProcessListAttached + +The process Frida is currently attached to, if any. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_name** | **str** | Name of the target process to attach to. | +**target_pid** | **float** | PID of the process Frida is attached to. | + +## Example + +```python +from corellium.models.agent_frida_process_list_attached import AgentFridaProcessListAttached + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentFridaProcessListAttached from a JSON string +agent_frida_process_list_attached_instance = AgentFridaProcessListAttached.from_json(json) +# print the JSON string representation of the object +print(AgentFridaProcessListAttached.to_json()) + +# convert the object into a dict +agent_frida_process_list_attached_dict = agent_frida_process_list_attached_instance.to_dict() +# create an instance of AgentFridaProcessListAttached from a dict +agent_frida_process_list_attached_from_dict = AgentFridaProcessListAttached.from_dict(agent_frida_process_list_attached_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentFridaResponse.md b/docs/AgentFridaResponse.md new file mode 100644 index 0000000..0621756 --- /dev/null +++ b/docs/AgentFridaResponse.md @@ -0,0 +1,30 @@ +# AgentFridaResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **float** | Agent sequence ID. | +**success** | **bool** | Whether the agent request succeeded. | + +## Example + +```python +from corellium.models.agent_frida_response import AgentFridaResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentFridaResponse from a JSON string +agent_frida_response_instance = AgentFridaResponse.from_json(json) +# print the JSON string representation of the object +print(AgentFridaResponse.to_json()) + +# convert the object into a dict +agent_frida_response_dict = agent_frida_response_instance.to_dict() +# create an instance of AgentFridaResponse from a dict +agent_frida_response_from_dict = AgentFridaResponse.from_dict(agent_frida_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentFridaRunBody.md b/docs/AgentFridaRunBody.md new file mode 100644 index 0000000..039b775 --- /dev/null +++ b/docs/AgentFridaRunBody.md @@ -0,0 +1,30 @@ +# AgentFridaRunBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_pid** | **str** | PID of the target process to attach to. | +**target_name** | **str** | Name of the target process to attach to. | + +## Example + +```python +from corellium.models.agent_frida_run_body import AgentFridaRunBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentFridaRunBody from a JSON string +agent_frida_run_body_instance = AgentFridaRunBody.from_json(json) +# print the JSON string representation of the object +print(AgentFridaRunBody.to_json()) + +# convert the object into a dict +agent_frida_run_body_dict = agent_frida_run_body_instance.to_dict() +# create an instance of AgentFridaRunBody from a dict +agent_frida_run_body_from_dict = AgentFridaRunBody.from_dict(agent_frida_run_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentIcons.md b/docs/AgentIcons.md index 65bcce3..1b95296 100644 --- a/docs/AgentIcons.md +++ b/docs/AgentIcons.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**icon** | **str** | The data for an icon | [optional] +**icon** | **bytearray** | The data for an icon | [optional] + +## Example + +```python +from corellium.models.agent_icons import AgentIcons + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentIcons from a JSON string +agent_icons_instance = AgentIcons.from_json(json) +# print the JSON string representation of the object +print(AgentIcons.to_json()) +# convert the object into a dict +agent_icons_dict = agent_icons_instance.to_dict() +# create an instance of AgentIcons from a dict +agent_icons_from_dict = AgentIcons.from_dict(agent_icons_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentIconsResponse.md b/docs/AgentIconsResponse.md new file mode 100644 index 0000000..0d6b6f6 --- /dev/null +++ b/docs/AgentIconsResponse.md @@ -0,0 +1,31 @@ +# AgentIconsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Whether the agent request succeeded. | +**id** | **float** | Agent sequence ID. | +**icons** | **Dict[str, str]** | Map of bundle ID to base64-encoded icon data. | + +## Example + +```python +from corellium.models.agent_icons_response import AgentIconsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentIconsResponse from a JSON string +agent_icons_response_instance = AgentIconsResponse.from_json(json) +# print the JSON string representation of the object +print(AgentIconsResponse.to_json()) + +# convert the object into a dict +agent_icons_response_dict = agent_icons_response_instance.to_dict() +# create an instance of AgentIconsResponse from a dict +agent_icons_response_from_dict = AgentIconsResponse.from_dict(agent_icons_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentInstallBody.md b/docs/AgentInstallBody.md index b18f126..79f14db 100644 --- a/docs/AgentInstallBody.md +++ b/docs/AgentInstallBody.md @@ -1,12 +1,29 @@ # AgentInstallBody - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**path** | **str** | path to app to install | [optional] +**path** | **str** | Path to the app to install on the VM filesystem. | + +## Example + +```python +from corellium.models.agent_install_body import AgentInstallBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentInstallBody from a JSON string +agent_install_body_instance = AgentInstallBody.from_json(json) +# print the JSON string representation of the object +print(AgentInstallBody.to_json()) +# convert the object into a dict +agent_install_body_dict = agent_install_body_instance.to_dict() +# create an instance of AgentInstallBody from a dict +agent_install_body_from_dict = AgentInstallBody.from_dict(agent_install_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentInstallBodyV1.md b/docs/AgentInstallBodyV1.md new file mode 100644 index 0000000..cf0d056 --- /dev/null +++ b/docs/AgentInstallBodyV1.md @@ -0,0 +1,30 @@ +# AgentInstallBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | path to app to install | [optional] + +## Example + +```python +from corellium.models.agent_install_body_v1 import AgentInstallBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentInstallBodyV1 from a JSON string +agent_install_body_v1_instance = AgentInstallBodyV1.from_json(json) +# print the JSON string representation of the object +print(AgentInstallBodyV1.to_json()) + +# convert the object into a dict +agent_install_body_v1_dict = agent_install_body_v1_instance.to_dict() +# create an instance of AgentInstallBodyV1 from a dict +agent_install_body_v1_from_dict = AgentInstallBodyV1.from_dict(agent_install_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentProfileListResponse.md b/docs/AgentProfileListResponse.md new file mode 100644 index 0000000..e2a77dc --- /dev/null +++ b/docs/AgentProfileListResponse.md @@ -0,0 +1,29 @@ +# AgentProfileListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**profiles** | **List[str]** | Identifiers of the installed profiles. | + +## Example + +```python +from corellium.models.agent_profile_list_response import AgentProfileListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentProfileListResponse from a JSON string +agent_profile_list_response_instance = AgentProfileListResponse.from_json(json) +# print the JSON string representation of the object +print(AgentProfileListResponse.to_json()) + +# convert the object into a dict +agent_profile_list_response_dict = agent_profile_list_response_instance.to_dict() +# create an instance of AgentProfileListResponse from a dict +agent_profile_list_response_from_dict = AgentProfileListResponse.from_dict(agent_profile_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentProfilesReturn.md b/docs/AgentProfilesReturn.md index bf7d3fc..5138c3b 100644 --- a/docs/AgentProfilesReturn.md +++ b/docs/AgentProfilesReturn.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**profiles** | **list[str]** | | +**profiles** | **List[str]** | | + +## Example + +```python +from corellium.models.agent_profiles_return import AgentProfilesReturn + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentProfilesReturn from a JSON string +agent_profiles_return_instance = AgentProfilesReturn.from_json(json) +# print the JSON string representation of the object +print(AgentProfilesReturn.to_json()) +# convert the object into a dict +agent_profiles_return_dict = agent_profiles_return_instance.to_dict() +# create an instance of AgentProfilesReturn from a dict +agent_profiles_return_from_dict = AgentProfilesReturn.from_dict(agent_profiles_return_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentRemoteItStatus.md b/docs/AgentRemoteItStatus.md new file mode 100644 index 0000000..ce9d358 --- /dev/null +++ b/docs/AgentRemoteItStatus.md @@ -0,0 +1,30 @@ +# AgentRemoteItStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**remote_it_status** | **str** | Installation state of the Remote.It package. | +**claim_code** | **str** | Remote.It claim code, present once the package is installed and claimable. | [optional] + +## Example + +```python +from corellium.models.agent_remote_it_status import AgentRemoteItStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentRemoteItStatus from a JSON string +agent_remote_it_status_instance = AgentRemoteItStatus.from_json(json) +# print the JSON string representation of the object +print(AgentRemoteItStatus.to_json()) + +# convert the object into a dict +agent_remote_it_status_dict = agent_remote_it_status_instance.to_dict() +# create an instance of AgentRemoteItStatus from a dict +agent_remote_it_status_from_dict = AgentRemoteItStatus.from_dict(agent_remote_it_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSystemAdbAuth.md b/docs/AgentSystemAdbAuth.md index 269c29f..491f787 100644 --- a/docs/AgentSystemAdbAuth.md +++ b/docs/AgentSystemAdbAuth.md @@ -1,12 +1,29 @@ # AgentSystemAdbAuth - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] +**enabled** | **bool** | Whether ADB authorization is enabled. | + +## Example + +```python +from corellium.models.agent_system_adb_auth import AgentSystemAdbAuth + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemAdbAuth from a JSON string +agent_system_adb_auth_instance = AgentSystemAdbAuth.from_json(json) +# print the JSON string representation of the object +print(AgentSystemAdbAuth.to_json()) +# convert the object into a dict +agent_system_adb_auth_dict = agent_system_adb_auth_instance.to_dict() +# create an instance of AgentSystemAdbAuth from a dict +agent_system_adb_auth_from_dict = AgentSystemAdbAuth.from_dict(agent_system_adb_auth_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentSystemAdbAuthV1.md b/docs/AgentSystemAdbAuthV1.md new file mode 100644 index 0000000..963ae47 --- /dev/null +++ b/docs/AgentSystemAdbAuthV1.md @@ -0,0 +1,30 @@ +# AgentSystemAdbAuthV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | | [optional] + +## Example + +```python +from corellium.models.agent_system_adb_auth_v1 import AgentSystemAdbAuthV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemAdbAuthV1 from a JSON string +agent_system_adb_auth_v1_instance = AgentSystemAdbAuthV1.from_json(json) +# print the JSON string representation of the object +print(AgentSystemAdbAuthV1.to_json()) + +# convert the object into a dict +agent_system_adb_auth_v1_dict = agent_system_adb_auth_v1_instance.to_dict() +# create an instance of AgentSystemAdbAuthV1 from a dict +agent_system_adb_auth_v1_from_dict = AgentSystemAdbAuthV1.from_dict(agent_system_adb_auth_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSystemGetPropBody.md b/docs/AgentSystemGetPropBody.md index 432c760..f9e63c6 100644 --- a/docs/AgentSystemGetPropBody.md +++ b/docs/AgentSystemGetPropBody.md @@ -1,12 +1,29 @@ # AgentSystemGetPropBody - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_property** | **str** | | +**var_property** | **str** | The system property to retrieve. | + +## Example + +```python +from corellium.models.agent_system_get_prop_body import AgentSystemGetPropBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemGetPropBody from a JSON string +agent_system_get_prop_body_instance = AgentSystemGetPropBody.from_json(json) +# print the JSON string representation of the object +print(AgentSystemGetPropBody.to_json()) +# convert the object into a dict +agent_system_get_prop_body_dict = agent_system_get_prop_body_instance.to_dict() +# create an instance of AgentSystemGetPropBody from a dict +agent_system_get_prop_body_from_dict = AgentSystemGetPropBody.from_dict(agent_system_get_prop_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentSystemGetPropBodyV1.md b/docs/AgentSystemGetPropBodyV1.md new file mode 100644 index 0000000..988b658 --- /dev/null +++ b/docs/AgentSystemGetPropBodyV1.md @@ -0,0 +1,30 @@ +# AgentSystemGetPropBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_property** | **str** | | + +## Example + +```python +from corellium.models.agent_system_get_prop_body_v1 import AgentSystemGetPropBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemGetPropBodyV1 from a JSON string +agent_system_get_prop_body_v1_instance = AgentSystemGetPropBodyV1.from_json(json) +# print the JSON string representation of the object +print(AgentSystemGetPropBodyV1.to_json()) + +# convert the object into a dict +agent_system_get_prop_body_v1_dict = agent_system_get_prop_body_v1_instance.to_dict() +# create an instance of AgentSystemGetPropBodyV1 from a dict +agent_system_get_prop_body_v1_from_dict = AgentSystemGetPropBodyV1.from_dict(agent_system_get_prop_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSystemGetPropResponse.md b/docs/AgentSystemGetPropResponse.md new file mode 100644 index 0000000..fcdd952 --- /dev/null +++ b/docs/AgentSystemGetPropResponse.md @@ -0,0 +1,31 @@ +# AgentSystemGetPropResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **float** | Agent sequence ID. | +**success** | **bool** | Whether the agent operation succeeded. | +**value** | **str** | The value of the requested property. Omitted when the property is unset. | [optional] + +## Example + +```python +from corellium.models.agent_system_get_prop_response import AgentSystemGetPropResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemGetPropResponse from a JSON string +agent_system_get_prop_response_instance = AgentSystemGetPropResponse.from_json(json) +# print the JSON string representation of the object +print(AgentSystemGetPropResponse.to_json()) + +# convert the object into a dict +agent_system_get_prop_response_dict = agent_system_get_prop_response_instance.to_dict() +# create an instance of AgentSystemGetPropResponse from a dict +agent_system_get_prop_response_from_dict = AgentSystemGetPropResponse.from_dict(agent_system_get_prop_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSystemInstallOpenGappsBody.md b/docs/AgentSystemInstallOpenGappsBody.md new file mode 100644 index 0000000..aea43a5 --- /dev/null +++ b/docs/AgentSystemInstallOpenGappsBody.md @@ -0,0 +1,31 @@ +# AgentSystemInstallOpenGappsBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | URL to download the OpenGApps package from. | +**hash** | **str** | Expected SHA-256 hash of the downloaded package. | +**fingerprint** | **str** | Build fingerprint to install the package against. | + +## Example + +```python +from corellium.models.agent_system_install_open_gapps_body import AgentSystemInstallOpenGappsBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemInstallOpenGappsBody from a JSON string +agent_system_install_open_gapps_body_instance = AgentSystemInstallOpenGappsBody.from_json(json) +# print the JSON string representation of the object +print(AgentSystemInstallOpenGappsBody.to_json()) + +# convert the object into a dict +agent_system_install_open_gapps_body_dict = agent_system_install_open_gapps_body_instance.to_dict() +# create an instance of AgentSystemInstallOpenGappsBody from a dict +agent_system_install_open_gapps_body_from_dict = AgentSystemInstallOpenGappsBody.from_dict(agent_system_install_open_gapps_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSystemNetworkResponse.md b/docs/AgentSystemNetworkResponse.md new file mode 100644 index 0000000..f567ce8 --- /dev/null +++ b/docs/AgentSystemNetworkResponse.md @@ -0,0 +1,29 @@ +# AgentSystemNetworkResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The IP address bound to eth0. | + +## Example + +```python +from corellium.models.agent_system_network_response import AgentSystemNetworkResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemNetworkResponse from a JSON string +agent_system_network_response_instance = AgentSystemNetworkResponse.from_json(json) +# print the JSON string representation of the object +print(AgentSystemNetworkResponse.to_json()) + +# convert the object into a dict +agent_system_network_response_dict = agent_system_network_response_instance.to_dict() +# create an instance of AgentSystemNetworkResponse from a dict +agent_system_network_response_from_dict = AgentSystemNetworkResponse.from_dict(agent_system_network_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSystemResult.md b/docs/AgentSystemResult.md new file mode 100644 index 0000000..460a24d --- /dev/null +++ b/docs/AgentSystemResult.md @@ -0,0 +1,30 @@ +# AgentSystemResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **float** | Agent sequence ID. | +**success** | **bool** | Whether the agent operation succeeded. | + +## Example + +```python +from corellium.models.agent_system_result import AgentSystemResult + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemResult from a JSON string +agent_system_result_instance = AgentSystemResult.from_json(json) +# print the JSON string representation of the object +print(AgentSystemResult.to_json()) + +# convert the object into a dict +agent_system_result_dict = agent_system_result_instance.to_dict() +# create an instance of AgentSystemResult from a dict +agent_system_result_from_dict = AgentSystemResult.from_dict(agent_system_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSystemSetDevicePropertiesBody.md b/docs/AgentSystemSetDevicePropertiesBody.md new file mode 100644 index 0000000..7030396 --- /dev/null +++ b/docs/AgentSystemSetDevicePropertiesBody.md @@ -0,0 +1,30 @@ +# AgentSystemSetDevicePropertiesBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model_id** | **str** | New model ID for the instance. Use null to reset to the default model ID. | [optional] +**manufacturer_id** | **str** | New manufacturer ID for the instance. Use null to reset to the default manufacturer ID. | [optional] + +## Example + +```python +from corellium.models.agent_system_set_device_properties_body import AgentSystemSetDevicePropertiesBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemSetDevicePropertiesBody from a JSON string +agent_system_set_device_properties_body_instance = AgentSystemSetDevicePropertiesBody.from_json(json) +# print the JSON string representation of the object +print(AgentSystemSetDevicePropertiesBody.to_json()) + +# convert the object into a dict +agent_system_set_device_properties_body_dict = agent_system_set_device_properties_body_instance.to_dict() +# create an instance of AgentSystemSetDevicePropertiesBody from a dict +agent_system_set_device_properties_body_from_dict = AgentSystemSetDevicePropertiesBody.from_dict(agent_system_set_device_properties_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentSystemSetHostnameBody.md b/docs/AgentSystemSetHostnameBody.md index e77057f..dd45e63 100644 --- a/docs/AgentSystemSetHostnameBody.md +++ b/docs/AgentSystemSetHostnameBody.md @@ -1,12 +1,29 @@ # AgentSystemSetHostnameBody - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hostname** | **str** | | +**hostname** | **str** | New hostname for the instance. | + +## Example + +```python +from corellium.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemSetHostnameBody from a JSON string +agent_system_set_hostname_body_instance = AgentSystemSetHostnameBody.from_json(json) +# print the JSON string representation of the object +print(AgentSystemSetHostnameBody.to_json()) +# convert the object into a dict +agent_system_set_hostname_body_dict = agent_system_set_hostname_body_instance.to_dict() +# create an instance of AgentSystemSetHostnameBody from a dict +agent_system_set_hostname_body_from_dict = AgentSystemSetHostnameBody.from_dict(agent_system_set_hostname_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgentSystemSetHostnameBodyV1.md b/docs/AgentSystemSetHostnameBodyV1.md new file mode 100644 index 0000000..c0e49da --- /dev/null +++ b/docs/AgentSystemSetHostnameBodyV1.md @@ -0,0 +1,30 @@ +# AgentSystemSetHostnameBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hostname** | **str** | | + +## Example + +```python +from corellium.models.agent_system_set_hostname_body_v1 import AgentSystemSetHostnameBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSystemSetHostnameBodyV1 from a JSON string +agent_system_set_hostname_body_v1_instance = AgentSystemSetHostnameBodyV1.from_json(json) +# print the JSON string representation of the object +print(AgentSystemSetHostnameBodyV1.to_json()) + +# convert the object into a dict +agent_system_set_hostname_body_v1_dict = agent_system_set_hostname_body_v1_instance.to_dict() +# create an instance of AgentSystemSetHostnameBodyV1 from a dict +agent_system_set_hostname_body_v1_from_dict = AgentSystemSetHostnameBodyV1.from_dict(agent_system_set_hostname_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentTempFileResponse.md b/docs/AgentTempFileResponse.md new file mode 100644 index 0000000..29debf6 --- /dev/null +++ b/docs/AgentTempFileResponse.md @@ -0,0 +1,29 @@ +# AgentTempFileResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | Unique temporary file path on the VM filesystem. | + +## Example + +```python +from corellium.models.agent_temp_file_response import AgentTempFileResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentTempFileResponse from a JSON string +agent_temp_file_response_instance = AgentTempFileResponse.from_json(json) +# print the JSON string representation of the object +print(AgentTempFileResponse.to_json()) + +# convert the object into a dict +agent_temp_file_response_dict = agent_temp_file_response_instance.to_dict() +# create an instance of AgentTempFileResponse from a dict +agent_temp_file_response_from_dict = AgentTempFileResponse.from_dict(agent_temp_file_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AgentV1Api.md b/docs/AgentV1Api.md new file mode 100644 index 0000000..b2f5355 --- /dev/null +++ b/docs/AgentV1Api.md @@ -0,0 +1,2012 @@ +# corellium.AgentV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_agent_app_ready**](AgentV1Api.md#v1_agent_app_ready) | **GET** /v1/instances/{instanceId}/agent/v1/app/ready | Check if App subsystem is ready +[**v1_agent_delete_file**](AgentV1Api.md#v1_agent_delete_file) | **DELETE** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Delete a File on VM +[**v1_agent_get_file**](AgentV1Api.md#v1_agent_get_file) | **GET** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Download a File from VM +[**v1_agent_get_temp_filename**](AgentV1Api.md#v1_agent_get_temp_filename) | **POST** /v1/instances/{instanceId}/agent/v1/file/temp | Get the path for a new temp file +[**v1_agent_install_app**](AgentV1Api.md#v1_agent_install_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/install | Install App at path +[**v1_agent_install_profile**](AgentV1Api.md#v1_agent_install_profile) | **POST** /v1/instances/{instanceId}/agent/v1/profile/install | Install a Profile to VM +[**v1_agent_kill_app**](AgentV1Api.md#v1_agent_kill_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill | Kill an App +[**v1_agent_list_app_icons**](AgentV1Api.md#v1_agent_list_app_icons) | **GET** /v1/instances/{instanceId}/agent/v1/app/icons | List App Icons +[**v1_agent_list_apps**](AgentV1Api.md#v1_agent_list_apps) | **GET** /v1/instances/{instanceId}/agent/v1/app/apps | List Apps +[**v1_agent_list_apps_status**](AgentV1Api.md#v1_agent_list_apps_status) | **GET** /v1/instances/{instanceId}/agent/v1/app/apps/update | List Apps Status +[**v1_agent_list_profiles**](AgentV1Api.md#v1_agent_list_profiles) | **GET** /v1/instances/{instanceId}/agent/v1/profile/profiles | List Profiles +[**v1_agent_run_app**](AgentV1Api.md#v1_agent_run_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run | Run an App +[**v1_agent_set_file_attributes**](AgentV1Api.md#v1_agent_set_file_attributes) | **PATCH** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Change Attrs of a File on VM +[**v1_agent_system_get_adb_auth**](AgentV1Api.md#v1_agent_system_get_adb_auth) | **GET** /v1/instances/{instanceId}/agent/v1/system/adbauth | Get ADB Auth Setting (AOSP only) +[**v1_agent_system_get_network**](AgentV1Api.md#v1_agent_system_get_network) | **GET** /v1/instances/{instanceId}/agent/v1/system/network | Get IP of eth0 (AOSP only) +[**v1_agent_system_get_prop**](AgentV1Api.md#v1_agent_system_get_prop) | **POST** /v1/instances/{instanceId}/agent/v1/system/getprop | Get System Property (AOSP only) +[**v1_agent_system_install_open_g_apps**](AgentV1Api.md#v1_agent_system_install_open_g_apps) | **POST** /v1/instances/{instanceId}/agent/v1/system/install-opengapps | Install OpenGApps (AOSP only) +[**v1_agent_system_lock**](AgentV1Api.md#v1_agent_system_lock) | **POST** /v1/instances/{instanceId}/agent/v1/system/lock | Lock Device (iOS Only) +[**v1_agent_system_set_adb_auth**](AgentV1Api.md#v1_agent_system_set_adb_auth) | **PUT** /v1/instances/{instanceId}/agent/v1/system/adbauth | Set ADB Auth Setting (AOSP only) +[**v1_agent_system_set_hostname**](AgentV1Api.md#v1_agent_system_set_hostname) | **POST** /v1/instances/{instanceId}/agent/v1/system/setHostname | Set Hostname of instance +[**v1_agent_system_shutdown**](AgentV1Api.md#v1_agent_system_shutdown) | **POST** /v1/instances/{instanceId}/agent/v1/system/shutdown | Instruct VM to halt +[**v1_agent_system_unlock**](AgentV1Api.md#v1_agent_system_unlock) | **POST** /v1/instances/{instanceId}/agent/v1/system/unlock | Unlock Device (iOS Only) +[**v1_agent_uninstall_app**](AgentV1Api.md#v1_agent_uninstall_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall | Uninstall an App +[**v1_agent_uninstall_profile**](AgentV1Api.md#v1_agent_uninstall_profile) | **DELETE** /v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId} | Uninstall a Profile from VM +[**v1_agent_upload_file**](AgentV1Api.md#v1_agent_upload_file) | **PUT** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Upload a file to VM + + +# **v1_agent_app_ready** +> AgentAppReadyResponseV1 v1_agent_app_ready(instance_id) + +Check if App subsystem is ready + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_app_ready_response_v1 import AgentAppReadyResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Check if App subsystem is ready + api_response = api_instance.v1_agent_app_ready(instance_id) + print("The response of AgentV1Api->v1_agent_app_ready:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_app_ready: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**AgentAppReadyResponseV1**](AgentAppReadyResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | App Agent State | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_delete_file** +> v1_agent_delete_file(instance_id, file_path) + +Delete a File on VM + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + file_path = 'file_path_example' # str | File Path on VM + + try: + # Delete a File on VM + api_instance.v1_agent_delete_file(instance_id, file_path) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_delete_file: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **file_path** | **str**| File Path on VM | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_get_file** +> bytearray v1_agent_get_file(instance_id, file_path) + +Download a File from VM + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + file_path = 'file_path_example' # str | File Path on VM + + try: + # Download a File from VM + api_response = api_instance.v1_agent_get_file(instance_id, file_path) + print("The response of AgentV1Api->v1_agent_get_file:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_get_file: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **file_path** | **str**| File Path on VM | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | File Contents | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_get_temp_filename** +> str v1_agent_get_temp_filename(instance_id) + +Get the path for a new temp file + +Returns a temporary random filename that is guranteed to be unique on the VMs +filesystem at the time of invocation of this method. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get the path for a new temp file + api_response = api_instance.v1_agent_get_temp_filename(instance_id) + print("The response of AgentV1Api->v1_agent_get_temp_filename:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_get_temp_filename: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The temp file path | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_install_app** +> v1_agent_install_app(instance_id, agent_install_body_v1) + +Install App at path + +Installs the app located at path which must be present on the VM filesystem + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_install_body_v1 import AgentInstallBodyV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + agent_install_body_v1 = { + "path": "/tmp/test.ipa" +} # AgentInstallBodyV1 | App parameters + + try: + # Install App at path + api_instance.v1_agent_install_app(instance_id, agent_install_body_v1) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_install_app: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **agent_install_body_v1** | [**AgentInstallBodyV1**](AgentInstallBodyV1.md)| App parameters | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_install_profile** +> v1_agent_install_profile(instance_id, body) + +Install a Profile to VM + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + body = None # bytearray | Profile to Install + + try: + # Install a Profile to VM + api_instance.v1_agent_install_profile(instance_id, body) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_install_profile: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **body** | **bytearray**| Profile to Install | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_kill_app** +> object v1_agent_kill_app(instance_id, bundle_id) + +Kill an App + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + bundle_id = 'bundle_id_example' # str | App Bundle ID + + try: + # Kill an App + api_response = api_instance.v1_agent_kill_app(instance_id, bundle_id) + print("The response of AgentV1Api->v1_agent_kill_app:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_kill_app: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **bundle_id** | **str**| App Bundle ID | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_list_app_icons** +> List[AgentIcons] v1_agent_list_app_icons(instance_id, bundle_id) + +List App Icons + +List App Icons as base64 data + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_icons import AgentIcons +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + bundle_id = ['bundle_id_example'] # List[str] | App Bundle ID + + try: + # List App Icons + api_response = api_instance.v1_agent_list_app_icons(instance_id, bundle_id) + print("The response of AgentV1Api->v1_agent_list_app_icons:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_list_app_icons: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **bundle_id** | [**List[str]**](str.md)| App Bundle ID | + +### Return type + +[**List[AgentIcons]**](AgentIcons.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Installed Apps Icons | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_list_apps** +> AgentAppsListV1 v1_agent_list_apps(instance_id) + +List Apps + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_apps_list_v1 import AgentAppsListV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # List Apps + api_response = api_instance.v1_agent_list_apps(instance_id) + print("The response of AgentV1Api->v1_agent_list_apps:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_list_apps: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**AgentAppsListV1**](AgentAppsListV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Installed Apps Info | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_list_apps_status** +> AgentAppsListV1 v1_agent_list_apps_status(instance_id) + +List Apps Status + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_apps_list_v1 import AgentAppsListV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # List Apps Status + api_response = api_instance.v1_agent_list_apps_status(instance_id) + print("The response of AgentV1Api->v1_agent_list_apps_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_list_apps_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**AgentAppsListV1**](AgentAppsListV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Installed Apps Status Info | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_list_profiles** +> AgentProfilesReturn v1_agent_list_profiles(instance_id) + +List Profiles + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_profiles_return import AgentProfilesReturn +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # List Profiles + api_response = api_instance.v1_agent_list_profiles(instance_id) + print("The response of AgentV1Api->v1_agent_list_profiles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_list_profiles: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**AgentProfilesReturn**](AgentProfilesReturn.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Installed Profiles | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_run_app** +> object v1_agent_run_app(instance_id, bundle_id) + +Run an App + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + bundle_id = 'bundle_id_example' # str | App Bundle ID + + try: + # Run an App + api_response = api_instance.v1_agent_run_app(instance_id, bundle_id) + print("The response of AgentV1Api->v1_agent_run_app:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_run_app: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **bundle_id** | **str**| App Bundle ID | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_set_file_attributes** +> v1_agent_set_file_attributes(instance_id, file_path, file_changes) + +Change Attrs of a File on VM + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.file_changes import FileChanges +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + file_path = 'file_path_example' # str | File Path on VM + file_changes = corellium.FileChanges() # FileChanges | New attrs + + try: + # Change Attrs of a File on VM + api_instance.v1_agent_set_file_attributes(instance_id, file_path, file_changes) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_set_file_attributes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **file_path** | **str**| File Path on VM | + **file_changes** | [**FileChanges**](FileChanges.md)| New attrs | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_get_adb_auth** +> AgentSystemAdbAuthV1 v1_agent_system_get_adb_auth(instance_id) + +Get ADB Auth Setting (AOSP only) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_adb_auth_v1 import AgentSystemAdbAuthV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get ADB Auth Setting (AOSP only) + api_response = api_instance.v1_agent_system_get_adb_auth(instance_id) + print("The response of AgentV1Api->v1_agent_system_get_adb_auth:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_get_adb_auth: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**AgentSystemAdbAuthV1**](AgentSystemAdbAuthV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current ADB Auth setting | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_get_network** +> AgentValueReturn v1_agent_system_get_network(instance_id) + +Get IP of eth0 (AOSP only) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_value_return import AgentValueReturn +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get IP of eth0 (AOSP only) + api_response = api_instance.v1_agent_system_get_network(instance_id) + print("The response of AgentV1Api->v1_agent_system_get_network:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_get_network: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**AgentValueReturn**](AgentValueReturn.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | IP Address of eth0 | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_get_prop** +> AgentValueReturn v1_agent_system_get_prop(instance_id, agent_system_get_prop_body_v1) + +Get System Property (AOSP only) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_get_prop_body_v1 import AgentSystemGetPropBodyV1 +from corellium.models.agent_value_return import AgentValueReturn +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + agent_system_get_prop_body_v1 = { + "property": "corellium.opengapps" +} # AgentSystemGetPropBodyV1 | Parameters + + try: + # Get System Property (AOSP only) + api_response = api_instance.v1_agent_system_get_prop(instance_id, agent_system_get_prop_body_v1) + print("The response of AgentV1Api->v1_agent_system_get_prop:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_get_prop: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **agent_system_get_prop_body_v1** | [**AgentSystemGetPropBodyV1**](AgentSystemGetPropBodyV1.md)| Parameters | + +### Return type + +[**AgentValueReturn**](AgentValueReturn.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Value of requested property | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_install_open_g_apps** +> v1_agent_system_install_open_g_apps(instance_id, body) + +Install OpenGApps (AOSP only) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + body = { + "url": "http://downloads.sourceforge.net/project/opengapps/arm64/20220119/open_gapps-arm64-11.0-pico-20220119.zip?r=&ts=1653516572&use_mirror=gigenet", + "hash": "58398bf7628f38ef07eaeb3abe26f3ebf0474f4d5ecdac0852bd5de3c15cc828", + "fingerprint": "google/flame/flame:11/RP1A.200720.009/6720564:user/release-keys__2020-09-05" +} # object | Installation parameters + + try: + # Install OpenGApps (AOSP only) + api_instance.v1_agent_system_install_open_g_apps(instance_id, body) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_install_open_g_apps: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **body** | **object**| Installation parameters | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_lock** +> v1_agent_system_lock(instance_id) + +Lock Device (iOS Only) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Lock Device (iOS Only) + api_instance.v1_agent_system_lock(instance_id) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_lock: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_set_adb_auth** +> v1_agent_system_set_adb_auth(instance_id, agent_system_adb_auth_v1) + +Set ADB Auth Setting (AOSP only) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_adb_auth_v1 import AgentSystemAdbAuthV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + agent_system_adb_auth_v1 = { + "enabled": true +} # AgentSystemAdbAuthV1 | Desired ADB Auth Setting + + try: + # Set ADB Auth Setting (AOSP only) + api_instance.v1_agent_system_set_adb_auth(instance_id, agent_system_adb_auth_v1) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_set_adb_auth: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **agent_system_adb_auth_v1** | [**AgentSystemAdbAuthV1**](AgentSystemAdbAuthV1.md)| Desired ADB Auth Setting | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_set_hostname** +> v1_agent_system_set_hostname(instance_id, agent_system_set_hostname_body_v1) + +Set Hostname of instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agent_system_set_hostname_body_v1 import AgentSystemSetHostnameBodyV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + agent_system_set_hostname_body_v1 = corellium.AgentSystemSetHostnameBodyV1() # AgentSystemSetHostnameBodyV1 | New hostname + + try: + # Set Hostname of instance + api_instance.v1_agent_system_set_hostname(instance_id, agent_system_set_hostname_body_v1) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_set_hostname: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **agent_system_set_hostname_body_v1** | [**AgentSystemSetHostnameBodyV1**](AgentSystemSetHostnameBodyV1.md)| New hostname | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_shutdown** +> v1_agent_system_shutdown(instance_id) + +Instruct VM to halt + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Instruct VM to halt + api_instance.v1_agent_system_shutdown(instance_id) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_shutdown: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_system_unlock** +> v1_agent_system_unlock(instance_id) + +Unlock Device (iOS Only) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Unlock Device (iOS Only) + api_instance.v1_agent_system_unlock(instance_id) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_system_unlock: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_uninstall_app** +> object v1_agent_uninstall_app(instance_id, bundle_id) + +Uninstall an App + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + bundle_id = 'bundle_id_example' # str | App Bundle ID + + try: + # Uninstall an App + api_response = api_instance.v1_agent_uninstall_app(instance_id, bundle_id) + print("The response of AgentV1Api->v1_agent_uninstall_app:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_uninstall_app: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **bundle_id** | **str**| App Bundle ID | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_uninstall_profile** +> v1_agent_uninstall_profile(instance_id, profile_id) + +Uninstall a Profile from VM + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + profile_id = 'profile_id_example' # str | Instance ID - uuid + + try: + # Uninstall a Profile from VM + api_instance.v1_agent_uninstall_profile(instance_id, profile_id) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_uninstall_profile: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **profile_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Agent Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_agent_upload_file** +> v1_agent_upload_file(instance_id, file_path, body) + +Upload a file to VM + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AgentV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + file_path = 'file_path_example' # str | File Path on VM to write to + body = None # bytearray | Uploaded File Contents + + try: + # Upload a file to VM + api_instance.v1_agent_upload_file(instance_id, file_path, body) + except Exception as e: + print("Exception when calling AgentV1Api->v1_agent_upload_file: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **file_path** | **str**| File Path on VM to write to | + **body** | **bytearray**| Uploaded File Contents | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | Agent Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AgentValueReturn.md b/docs/AgentValueReturn.md index d34d977..20cb52f 100644 --- a/docs/AgentValueReturn.md +++ b/docs/AgentValueReturn.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str** | The requested value | [optional] +## Example + +```python +from corellium.models.agent_value_return import AgentValueReturn + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentValueReturn from a JSON string +agent_value_return_instance = AgentValueReturn.from_json(json) +# print the JSON string representation of the object +print(AgentValueReturn.to_json()) + +# convert the object into a dict +agent_value_return_dict = agent_value_return_instance.to_dict() +# create an instance of AgentValueReturn from a dict +agent_value_return_from_dict = AgentValueReturn.from_dict(agent_value_return_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgreedAck.md b/docs/AgreedAck.md index 0950893..e7e48d6 100644 --- a/docs/AgreedAck.md +++ b/docs/AgreedAck.md @@ -1,12 +1,29 @@ # AgreedAck - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**agreed_to_terms** | **datetime** | Date agreed | [optional] +**agreed_to_terms** | **datetime** | Timestamp the terms were agreed to. | + +## Example + +```python +from corellium.models.agreed_ack import AgreedAck + +# TODO update the JSON string below +json = "{}" +# create an instance of AgreedAck from a JSON string +agreed_ack_instance = AgreedAck.from_json(json) +# print the JSON string representation of the object +print(AgreedAck.to_json()) +# convert the object into a dict +agreed_ack_dict = agreed_ack_instance.to_dict() +# create an instance of AgreedAck from a dict +agreed_ack_from_dict = AgreedAck.from_dict(agreed_ack_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AgreedAckV1.md b/docs/AgreedAckV1.md new file mode 100644 index 0000000..9ce758c --- /dev/null +++ b/docs/AgreedAckV1.md @@ -0,0 +1,30 @@ +# AgreedAckV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agreed_to_terms** | **datetime** | Date agreed | [optional] + +## Example + +```python +from corellium.models.agreed_ack_v1 import AgreedAckV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AgreedAckV1 from a JSON string +agreed_ack_v1_instance = AgreedAckV1.from_json(json) +# print the JSON string representation of the object +print(AgreedAckV1.to_json()) + +# convert the object into a dict +agreed_ack_v1_dict = agreed_ack_v1_instance.to_dict() +# create an instance of AgreedAckV1 from a dict +agreed_ack_v1_from_dict = AgreedAckV1.from_dict(agreed_ack_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AiToolsConfig.md b/docs/AiToolsConfig.md new file mode 100644 index 0000000..877c873 --- /dev/null +++ b/docs/AiToolsConfig.md @@ -0,0 +1,29 @@ +# AiToolsConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ai_enabled** | **bool** | Whether cluster-hosted AI features (e.g. the MCP server) are enabled. | [optional] + +## Example + +```python +from corellium.models.ai_tools_config import AiToolsConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of AiToolsConfig from a JSON string +ai_tools_config_instance = AiToolsConfig.from_json(json) +# print the JSON string representation of the object +print(AiToolsConfig.to_json()) + +# convert the object into a dict +ai_tools_config_dict = ai_tools_config_instance.to_dict() +# create an instance of AiToolsConfig from a dict +ai_tools_config_from_dict = AiToolsConfig.from_dict(ai_tools_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AiToolsConfigV1.md b/docs/AiToolsConfigV1.md new file mode 100644 index 0000000..ee46d40 --- /dev/null +++ b/docs/AiToolsConfigV1.md @@ -0,0 +1,30 @@ +# AiToolsConfigV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ai_enabled** | **bool** | Designates whether cluster-hosted AI features are enabled | [optional] + +## Example + +```python +from corellium.models.ai_tools_config_v1 import AiToolsConfigV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AiToolsConfigV1 from a JSON string +ai_tools_config_v1_instance = AiToolsConfigV1.from_json(json) +# print the JSON string representation of the object +print(AiToolsConfigV1.to_json()) + +# convert the object into a dict +ai_tools_config_v1_dict = ai_tools_config_v1_instance.to_dict() +# create an instance of AiToolsConfigV1 from a dict +ai_tools_config_v1_from_dict = AiToolsConfigV1.from_dict(ai_tools_config_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AllowedDevicesFilterSchema.md b/docs/AllowedDevicesFilterSchema.md new file mode 100644 index 0000000..792fcee --- /dev/null +++ b/docs/AllowedDevicesFilterSchema.md @@ -0,0 +1,30 @@ +# AllowedDevicesFilterSchema + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_name** | **str** | Device flavor identifier. | +**allowed_firmwares** | [**List[AllowedFirmwareSchema]**](AllowedFirmwareSchema.md) | Firmware versions permitted on this device. | + +## Example + +```python +from corellium.models.allowed_devices_filter_schema import AllowedDevicesFilterSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of AllowedDevicesFilterSchema from a JSON string +allowed_devices_filter_schema_instance = AllowedDevicesFilterSchema.from_json(json) +# print the JSON string representation of the object +print(AllowedDevicesFilterSchema.to_json()) + +# convert the object into a dict +allowed_devices_filter_schema_dict = allowed_devices_filter_schema_instance.to_dict() +# create an instance of AllowedDevicesFilterSchema from a dict +allowed_devices_filter_schema_from_dict = AllowedDevicesFilterSchema.from_dict(allowed_devices_filter_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AllowedDomainsResponse.md b/docs/AllowedDomainsResponse.md index 02643db..5ee1b07 100644 --- a/docs/AllowedDomainsResponse.md +++ b/docs/AllowedDomainsResponse.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allowed_domains** | **list[str]** | List of allowed domains | [optional] +**allowed_domains** | **List[str]** | List of allowed domains | [optional] + +## Example + +```python +from corellium.models.allowed_domains_response import AllowedDomainsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AllowedDomainsResponse from a JSON string +allowed_domains_response_instance = AllowedDomainsResponse.from_json(json) +# print the JSON string representation of the object +print(AllowedDomainsResponse.to_json()) +# convert the object into a dict +allowed_domains_response_dict = allowed_domains_response_instance.to_dict() +# create an instance of AllowedDomainsResponse from a dict +allowed_domains_response_from_dict = AllowedDomainsResponse.from_dict(allowed_domains_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AllowedFirmwareSchema.md b/docs/AllowedFirmwareSchema.md new file mode 100644 index 0000000..88ef7c6 --- /dev/null +++ b/docs/AllowedFirmwareSchema.md @@ -0,0 +1,30 @@ +# AllowedFirmwareSchema + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | Firmware version. | +**build_id** | **str** | Firmware build ID. | + +## Example + +```python +from corellium.models.allowed_firmware_schema import AllowedFirmwareSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of AllowedFirmwareSchema from a JSON string +allowed_firmware_schema_instance = AllowedFirmwareSchema.from_json(json) +# print the JSON string representation of the object +print(AllowedFirmwareSchema.to_json()) + +# convert the object into a dict +allowed_firmware_schema_dict = allowed_firmware_schema_instance.to_dict() +# create an instance of AllowedFirmwareSchema from a dict +allowed_firmware_schema_from_dict = AllowedFirmwareSchema.from_dict(allowed_firmware_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiConflictError.md b/docs/ApiConflictError.md index 69c9895..a6c3f5e 100644 --- a/docs/ApiConflictError.md +++ b/docs/ApiConflictError.md @@ -1,14 +1,31 @@ # ApiConflictError - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | **str** | Error text | -**error_id** | **str** | Error ID | -**object** | **object** | Object that is conflicted with | [optional] +**error** | **str** | Human-readable explanation of the conflict. | +**error_id** | **str** | Always `Conflict`: the request clashes with the current state, for example the resource already exists or is in a state that does not allow this action. Check the current state before retrying. | +**object** | **Dict[str, Optional[object]]** | The existing object the request conflicted with, when there is one. | [optional] + +## Example + +```python +from corellium.models.api_conflict_error import ApiConflictError + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiConflictError from a JSON string +api_conflict_error_instance = ApiConflictError.from_json(json) +# print the JSON string representation of the object +print(ApiConflictError.to_json()) +# convert the object into a dict +api_conflict_error_dict = api_conflict_error_instance.to_dict() +# create an instance of ApiConflictError from a dict +api_conflict_error_from_dict = ApiConflictError.from_dict(api_conflict_error_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiConflictErrorV1.md b/docs/ApiConflictErrorV1.md new file mode 100644 index 0000000..85dc2b8 --- /dev/null +++ b/docs/ApiConflictErrorV1.md @@ -0,0 +1,32 @@ +# ApiConflictErrorV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text | +**error_id** | **str** | Error ID | +**object** | **object** | Object that is conflicted with | [optional] + +## Example + +```python +from corellium.models.api_conflict_error_v1 import ApiConflictErrorV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiConflictErrorV1 from a JSON string +api_conflict_error_v1_instance = ApiConflictErrorV1.from_json(json) +# print the JSON string representation of the object +print(ApiConflictErrorV1.to_json()) + +# convert the object into a dict +api_conflict_error_v1_dict = api_conflict_error_v1_instance.to_dict() +# create an instance of ApiConflictErrorV1 from a dict +api_conflict_error_v1_from_dict = ApiConflictErrorV1.from_dict(api_conflict_error_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiError.md b/docs/ApiError.md index 34d235d..09fdf4d 100644 --- a/docs/ApiError.md +++ b/docs/ApiError.md @@ -1,14 +1,31 @@ # ApiError - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | **str** | Error text | -**error_id** | **str** | Error ID | -**original_error** | **str** | Upstream error description | [optional] +**error** | **str** | Human-readable explanation of the error. | +**error_id** | **str** | Short machine-readable error name, for example `PermissionDenied` or `NotFound`. Use this, not `error`, to decide what to do in code. | +**original_error** | **str** | When the platform failed while talking to another service, the error that service reported. Useful when reporting a problem to support. | [optional] + +## Example + +```python +from corellium.models.api_error import ApiError + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiError from a JSON string +api_error_instance = ApiError.from_json(json) +# print the JSON string representation of the object +print(ApiError.to_json()) +# convert the object into a dict +api_error_dict = api_error_instance.to_dict() +# create an instance of ApiError from a dict +api_error_from_dict = ApiError.from_dict(api_error_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiErrorV1.md b/docs/ApiErrorV1.md new file mode 100644 index 0000000..4b4f9c1 --- /dev/null +++ b/docs/ApiErrorV1.md @@ -0,0 +1,32 @@ +# ApiErrorV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text | +**error_id** | **str** | Error ID | +**original_error** | **str** | Upstream error description | [optional] + +## Example + +```python +from corellium.models.api_error_v1 import ApiErrorV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiErrorV1 from a JSON string +api_error_v1_instance = ApiErrorV1.from_json(json) +# print the JSON string representation of the object +print(ApiErrorV1.to_json()) + +# convert the object into a dict +api_error_v1_dict = api_error_v1_instance.to_dict() +# create an instance of ApiErrorV1 from a dict +api_error_v1_from_dict = ApiErrorV1.from_dict(api_error_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiInternalConsistencyError.md b/docs/ApiInternalConsistencyError.md index 5fe4b84..2e7d4c6 100644 --- a/docs/ApiInternalConsistencyError.md +++ b/docs/ApiInternalConsistencyError.md @@ -3,12 +3,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | **str** | Error text | **error_id** | **str** | Error ID | **original_error** | **str** | Upstream error description | [optional] +## Example + +```python +from corellium.models.api_internal_consistency_error import ApiInternalConsistencyError + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiInternalConsistencyError from a JSON string +api_internal_consistency_error_instance = ApiInternalConsistencyError.from_json(json) +# print the JSON string representation of the object +print(ApiInternalConsistencyError.to_json()) + +# convert the object into a dict +api_internal_consistency_error_dict = api_internal_consistency_error_instance.to_dict() +# create an instance of ApiInternalConsistencyError from a dict +api_internal_consistency_error_from_dict = ApiInternalConsistencyError.from_dict(api_internal_consistency_error_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiNotFoundError.md b/docs/ApiNotFoundError.md index 7a920e8..cbd7ec6 100644 --- a/docs/ApiNotFoundError.md +++ b/docs/ApiNotFoundError.md @@ -1,15 +1,32 @@ # ApiNotFoundError - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | **str** | Error text | -**error_id** | **str** | Error ID | -**name** | **str** | Name of the object requested | [optional] -**params** | **object** | params provided by user | [optional] +**error** | **str** | Human-readable explanation of what was not found. | +**error_id** | **str** | Short machine-readable error name, usually `NotFound`. | +**name** | **str** | Kind of object that was not found, for example `instance`. | [optional] +**params** | **Dict[str, Optional[object]]** | The identifiers from your request that were looked up. | [optional] + +## Example + +```python +from corellium.models.api_not_found_error import ApiNotFoundError + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiNotFoundError from a JSON string +api_not_found_error_instance = ApiNotFoundError.from_json(json) +# print the JSON string representation of the object +print(ApiNotFoundError.to_json()) +# convert the object into a dict +api_not_found_error_dict = api_not_found_error_instance.to_dict() +# create an instance of ApiNotFoundError from a dict +api_not_found_error_from_dict = ApiNotFoundError.from_dict(api_not_found_error_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiNotFoundErrorV1.md b/docs/ApiNotFoundErrorV1.md new file mode 100644 index 0000000..73cd46c --- /dev/null +++ b/docs/ApiNotFoundErrorV1.md @@ -0,0 +1,33 @@ +# ApiNotFoundErrorV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text | +**error_id** | **str** | Error ID | +**name** | **str** | Name of the object requested | [optional] +**params** | **object** | params provided by user | [optional] + +## Example + +```python +from corellium.models.api_not_found_error_v1 import ApiNotFoundErrorV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiNotFoundErrorV1 from a JSON string +api_not_found_error_v1_instance = ApiNotFoundErrorV1.from_json(json) +# print the JSON string representation of the object +print(ApiNotFoundErrorV1.to_json()) + +# convert the object into a dict +api_not_found_error_v1_dict = api_not_found_error_v1_instance.to_dict() +# create an instance of ApiNotFoundErrorV1 from a dict +api_not_found_error_v1_from_dict = ApiNotFoundErrorV1.from_dict(api_not_found_error_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiToken.md b/docs/ApiToken.md index 66ef949..d6ef3ae 100644 --- a/docs/ApiToken.md +++ b/docs/ApiToken.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_token** | **str** | | +**api_token** | **str** | Persistent API key created by the user (in the web UI or via POST /v3/auth/apitoken), used as an alternative to username/password. An opaque string, sent back verbatim. Also accepted as an Authorization Bearer credential and stored by the CLI as --token. Distinct from the session token. | + +## Example + +```python +from corellium.models.api_token import ApiToken + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiToken from a JSON string +api_token_instance = ApiToken.from_json(json) +# print the JSON string representation of the object +print(ApiToken.to_json()) +# convert the object into a dict +api_token_dict = api_token_instance.to_dict() +# create an instance of ApiToken from a dict +api_token_from_dict = ApiToken.from_dict(api_token_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiTokenResult.md b/docs/ApiTokenResult.md new file mode 100644 index 0000000..3ba630f --- /dev/null +++ b/docs/ApiTokenResult.md @@ -0,0 +1,29 @@ +# ApiTokenResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_token** | **str** | The generated API token. Returned only once and cannot be retrieved later, so store it securely. Use it wherever an API token is accepted, such as the `apiToken` field of POST /v3/auth/login. | + +## Example + +```python +from corellium.models.api_token_result import ApiTokenResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiTokenResult from a JSON string +api_token_result_instance = ApiTokenResult.from_json(json) +# print the JSON string representation of the object +print(ApiTokenResult.to_json()) + +# convert the object into a dict +api_token_result_dict = api_token_result_instance.to_dict() +# create an instance of ApiTokenResult from a dict +api_token_result_from_dict = ApiTokenResult.from_dict(api_token_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ArtifactsPath.md b/docs/ArtifactsPath.md new file mode 100644 index 0000000..9378b4b --- /dev/null +++ b/docs/ArtifactsPath.md @@ -0,0 +1,29 @@ +# ArtifactsPath + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | Absolute path of the instance's artifacts volume on the compute node. | + +## Example + +```python +from corellium.models.artifacts_path import ArtifactsPath + +# TODO update the JSON string below +json = "{}" +# create an instance of ArtifactsPath from a JSON string +artifacts_path_instance = ArtifactsPath.from_json(json) +# print the JSON string representation of the object +print(ArtifactsPath.to_json()) + +# convert the object into a dict +artifacts_path_dict = artifacts_path_instance.to_dict() +# create an instance of ArtifactsPath from a dict +artifacts_path_from_dict = ArtifactsPath.from_dict(artifacts_path_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Assessment.md b/docs/Assessment.md index d301088..9612832 100644 --- a/docs/Assessment.md +++ b/docs/Assessment.md @@ -2,21 +2,41 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created_at** | **datetime** | | [optional] -**updated_at** | **datetime** | | [optional] -**created_by** | **str** | | [optional] -**report_id** | **str** | | [optional] -**bundle** | **object** | | [optional] -**results** | **object** | | [optional] -**metadata** | **object** | | [optional] -**wordlist** | **object** | | [optional] -**instance_id** | **str** | | -**bundle_id** | **str** | | -**wordlist_id** | **str** | | [optional] -**status** | **str** | | +**id** | **str** | Identifier of the assessment. | +**status** | [**AssessmentStatus**](AssessmentStatus.md) | | +**instance_id** | **str** | Identifier of the instance under assessment. | +**bundle** | [**AssessmentBundle**](AssessmentBundle.md) | | +**wordlist** | [**AssessmentWordlist**](AssessmentWordlist.md) | | +**frida_script** | [**AssessmentFridaScript**](AssessmentFridaScript.md) | | +**report_id** | **str** | Identifier of the generated report, or null if not yet available. | +**results** | [**AssessmentResults**](AssessmentResults.md) | | +**metadata** | [**AssessmentMetadata**](AssessmentMetadata.md) | | +**severity_counts** | [**AssessmentSeverityCounts**](AssessmentSeverityCounts.md) | | +**error** | **str** | Why the assessment failed, or null. Set only when monitoring fails, to one of: \"Insufficient memory; increase device's RAM.\", \"App closed too soon; keep open until report has generated.\", \"App unable to launch; check compatibility.\", or \"Unknown error.\". An assessment that fails while tests run has status `failed` with `error` null. | +**created_by** | **str** | Identifier of the user that created the assessment, or null. | +**created_at** | **datetime** | Creation timestamp. | +**updated_at** | **datetime** | Last-update timestamp. | + +## Example + +```python +from corellium.models.assessment import Assessment + +# TODO update the JSON string below +json = "{}" +# create an instance of Assessment from a JSON string +assessment_instance = Assessment.from_json(json) +# print the JSON string representation of the object +print(Assessment.to_json()) +# convert the object into a dict +assessment_dict = assessment_instance.to_dict() +# create an instance of Assessment from a dict +assessment_from_dict = Assessment.from_dict(assessment_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssessmentBundle.md b/docs/AssessmentBundle.md new file mode 100644 index 0000000..a711836 --- /dev/null +++ b/docs/AssessmentBundle.md @@ -0,0 +1,31 @@ +# AssessmentBundle + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the application bundle. | +**name** | **str** | Display name of the application bundle. | +**version** | **str** | Version of the application bundle. | + +## Example + +```python +from corellium.models.assessment_bundle import AssessmentBundle + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentBundle from a JSON string +assessment_bundle_instance = AssessmentBundle.from_json(json) +# print the JSON string representation of the object +print(AssessmentBundle.to_json()) + +# convert the object into a dict +assessment_bundle_dict = assessment_bundle_instance.to_dict() +# create an instance of AssessmentBundle from a dict +assessment_bundle_from_dict = AssessmentBundle.from_dict(assessment_bundle_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentFormat.md b/docs/AssessmentFormat.md new file mode 100644 index 0000000..134a10d --- /dev/null +++ b/docs/AssessmentFormat.md @@ -0,0 +1,13 @@ +# AssessmentFormat + +Report download format. Defaults to \"html\". + +## Enum + +* `JSON` (value: `'json'`) + +* `HTML` (value: `'html'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentFridaScript.md b/docs/AssessmentFridaScript.md new file mode 100644 index 0000000..3e48408 --- /dev/null +++ b/docs/AssessmentFridaScript.md @@ -0,0 +1,31 @@ +# AssessmentFridaScript + +Frida script used during the assessment, or null if none. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the resource. | +**name** | **str** | Name of the resource. | + +## Example + +```python +from corellium.models.assessment_frida_script import AssessmentFridaScript + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentFridaScript from a JSON string +assessment_frida_script_instance = AssessmentFridaScript.from_json(json) +# print the JSON string representation of the object +print(AssessmentFridaScript.to_json()) + +# convert the object into a dict +assessment_frida_script_dict = assessment_frida_script_instance.to_dict() +# create an instance of AssessmentFridaScript from a dict +assessment_frida_script_from_dict = AssessmentFridaScript.from_dict(assessment_frida_script_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentHistory.md b/docs/AssessmentHistory.md index 73fc800..3810ba9 100644 --- a/docs/AssessmentHistory.md +++ b/docs/AssessmentHistory.md @@ -1,16 +1,34 @@ # AssessmentHistory - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total** | **float** | Total number of items | -**count** | **float** | Number of items in current response | -**limit** | **float** | Limit used for the request | -**offset** | **float** | Offset used for the request | -**results** | [**list[AssessmentHistoryLineItem]**](AssessmentHistoryLineItem.md) | The list of assessments | +**results** | [**List[AssessmentHistoryResultsInner]**](AssessmentHistoryResultsInner.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.assessment_history import AssessmentHistory + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentHistory from a JSON string +assessment_history_instance = AssessmentHistory.from_json(json) +# print the JSON string representation of the object +print(AssessmentHistory.to_json()) +# convert the object into a dict +assessment_history_dict = assessment_history_instance.to_dict() +# create an instance of AssessmentHistory from a dict +assessment_history_from_dict = AssessmentHistory.from_dict(assessment_history_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssessmentHistoryLineItem.md b/docs/AssessmentHistoryLineItem.md index 77eebeb..fbae6f6 100644 --- a/docs/AssessmentHistoryLineItem.md +++ b/docs/AssessmentHistoryLineItem.md @@ -3,12 +3,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date** | **float** | UNIX Date representing the month | +**var_date** | **float** | UNIX Date representing the month | **complete** | **float** | The number of successful assessments | **incomplete** | **float** | The number of failed assessments | +## Example + +```python +from corellium.models.assessment_history_line_item import AssessmentHistoryLineItem + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentHistoryLineItem from a JSON string +assessment_history_line_item_instance = AssessmentHistoryLineItem.from_json(json) +# print the JSON string representation of the object +print(AssessmentHistoryLineItem.to_json()) + +# convert the object into a dict +assessment_history_line_item_dict = assessment_history_line_item_instance.to_dict() +# create an instance of AssessmentHistoryLineItem from a dict +assessment_history_line_item_from_dict = AssessmentHistoryLineItem.from_dict(assessment_history_line_item_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssessmentHistoryResultsInner.md b/docs/AssessmentHistoryResultsInner.md new file mode 100644 index 0000000..b52741b --- /dev/null +++ b/docs/AssessmentHistoryResultsInner.md @@ -0,0 +1,31 @@ +# AssessmentHistoryResultsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_date** | **str** | Month label in \"MMM YYYY\" format (e.g. \"Jul 2025\"). | +**complete** | **float** | Number of successful assessments. | +**incomplete** | **float** | Number of failed assessments. | + +## Example + +```python +from corellium.models.assessment_history_results_inner import AssessmentHistoryResultsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentHistoryResultsInner from a JSON string +assessment_history_results_inner_instance = AssessmentHistoryResultsInner.from_json(json) +# print the JSON string representation of the object +print(AssessmentHistoryResultsInner.to_json()) + +# convert the object into a dict +assessment_history_results_inner_dict = assessment_history_results_inner_instance.to_dict() +# create an instance of AssessmentHistoryResultsInner from a dict +assessment_history_results_inner_from_dict = AssessmentHistoryResultsInner.from_dict(assessment_history_results_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentHistoryV1.md b/docs/AssessmentHistoryV1.md new file mode 100644 index 0000000..9ab3206 --- /dev/null +++ b/docs/AssessmentHistoryV1.md @@ -0,0 +1,34 @@ +# AssessmentHistoryV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total number of items | +**count** | **float** | Number of items in current response | +**limit** | **float** | Limit used for the request | +**offset** | **float** | Offset used for the request | +**results** | [**List[AssessmentHistoryLineItem]**](AssessmentHistoryLineItem.md) | The list of assessments | + +## Example + +```python +from corellium.models.assessment_history_v1 import AssessmentHistoryV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentHistoryV1 from a JSON string +assessment_history_v1_instance = AssessmentHistoryV1.from_json(json) +# print the JSON string representation of the object +print(AssessmentHistoryV1.to_json()) + +# convert the object into a dict +assessment_history_v1_dict = assessment_history_v1_instance.to_dict() +# create an instance of AssessmentHistoryV1 from a dict +assessment_history_v1_from_dict = AssessmentHistoryV1.from_dict(assessment_history_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentIdStatus.md b/docs/AssessmentIdStatus.md index c64d0a8..ea6297d 100644 --- a/docs/AssessmentIdStatus.md +++ b/docs/AssessmentIdStatus.md @@ -2,11 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**status** | **str** | | +**id** | **str** | Identifier of the assessment. | +**status** | [**AssessmentStatus**](AssessmentStatus.md) | | + +## Example + +```python +from corellium.models.assessment_id_status import AssessmentIdStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentIdStatus from a JSON string +assessment_id_status_instance = AssessmentIdStatus.from_json(json) +# print the JSON string representation of the object +print(AssessmentIdStatus.to_json()) +# convert the object into a dict +assessment_id_status_dict = assessment_id_status_instance.to_dict() +# create an instance of AssessmentIdStatus from a dict +assessment_id_status_from_dict = AssessmentIdStatus.from_dict(assessment_id_status_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssessmentMetadata.md b/docs/AssessmentMetadata.md new file mode 100644 index 0000000..cb1de87 --- /dev/null +++ b/docs/AssessmentMetadata.md @@ -0,0 +1,30 @@ +# AssessmentMetadata + +Assessment metadata, or null if unset. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**corellium_version** | **str** | Corellium platform version captured when the assessment ran. | [optional] + +## Example + +```python +from corellium.models.assessment_metadata import AssessmentMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentMetadata from a JSON string +assessment_metadata_instance = AssessmentMetadata.from_json(json) +# print the JSON string representation of the object +print(AssessmentMetadata.to_json()) + +# convert the object into a dict +assessment_metadata_dict = assessment_metadata_instance.to_dict() +# create an instance of AssessmentMetadata from a dict +assessment_metadata_from_dict = AssessmentMetadata.from_dict(assessment_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentResults.md b/docs/AssessmentResults.md new file mode 100644 index 0000000..57fb3af --- /dev/null +++ b/docs/AssessmentResults.md @@ -0,0 +1,36 @@ +# AssessmentResults + +Aggregated check results, or null if the assessment has not produced results. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_pass** | **float** | Number of checks that passed. | +**fail** | **float** | Number of checks that failed. | +**error** | **float** | Number of checks that errored during execution. | +**info** | **float** | Number of informational checks. | +**na** | **float** | Number of checks marked not applicable. | +**artifact** | **float** | Number of artifact-category outcomes. | +**score** | **float** | Computed MATRIX score, or null for assessments created before scoring was introduced. | + +## Example + +```python +from corellium.models.assessment_results import AssessmentResults + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentResults from a JSON string +assessment_results_instance = AssessmentResults.from_json(json) +# print the JSON string representation of the object +print(AssessmentResults.to_json()) + +# convert the object into a dict +assessment_results_dict = assessment_results_instance.to_dict() +# create an instance of AssessmentResults from a dict +assessment_results_from_dict = AssessmentResults.from_dict(assessment_results_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentSeverityCounts.md b/docs/AssessmentSeverityCounts.md new file mode 100644 index 0000000..96e40cf --- /dev/null +++ b/docs/AssessmentSeverityCounts.md @@ -0,0 +1,33 @@ +# AssessmentSeverityCounts + +Snapshot of available check counts by severity, or null if unset. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**high** | **float** | Number of high-severity checks available at assessment creation time. | +**medium** | **float** | Number of medium-severity checks available at assessment creation time. | +**low** | **float** | Number of low-severity checks available at assessment creation time. | +**info** | **float** | Number of informational checks available at assessment creation time. | + +## Example + +```python +from corellium.models.assessment_severity_counts import AssessmentSeverityCounts + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentSeverityCounts from a JSON string +assessment_severity_counts_instance = AssessmentSeverityCounts.from_json(json) +# print the JSON string representation of the object +print(AssessmentSeverityCounts.to_json()) + +# convert the object into a dict +assessment_severity_counts_dict = assessment_severity_counts_instance.to_dict() +# create an instance of AssessmentSeverityCounts from a dict +assessment_severity_counts_from_dict = AssessmentSeverityCounts.from_dict(assessment_severity_counts_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentStatus.md b/docs/AssessmentStatus.md new file mode 100644 index 0000000..1b8c194 --- /dev/null +++ b/docs/AssessmentStatus.md @@ -0,0 +1,25 @@ +# AssessmentStatus + +Where the assessment is in its lifecycle. In the normal workflow, statuses ending in \"ing\" are temporary: background work moves the assessment on by itself, so poll `v3GetAssessmentById` to see the next status. (`v3PatchAssessment` can overwrite the status directly; do not use it to drive the workflow.) - `new`: created by `v3CreateAssessment`. Nothing is being watched yet. Next call: `v3StartMonitoring`. - `startingMonitoring`: MATRIX is attaching to the app. Moves to `monitoring` when ready, or `failed`. - `monitoring`: MATRIX is recording what the app does. Use the app on the device now (log in, open screens, enter data). Next call: `v3StopMonitoring`. - `stoppingMonitoring`: MATRIX is detaching and saving what it recorded. Moves to `readyForTesting`, or `failed`. - `readyForTesting`: recording is finished. Next call: `v3RunTests`. - `testing`: the security checks are running. Moves to `complete` or `failed`. - `complete`: the report is ready. You can download it and adjust its findings. - `failed`: the assessment stopped. It cannot be resumed; delete it and create a new one. See the `error` field. + +## Enum + +* `NEW` (value: `'new'`) + +* `STARTINGMONITORING` (value: `'startingMonitoring'`) + +* `MONITORING` (value: `'monitoring'`) + +* `STOPPINGMONITORING` (value: `'stoppingMonitoring'`) + +* `READYFORTESTING` (value: `'readyForTesting'`) + +* `TESTING` (value: `'testing'`) + +* `COMPLETE` (value: `'complete'`) + +* `FAILED` (value: `'failed'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentWordlist.md b/docs/AssessmentWordlist.md new file mode 100644 index 0000000..71a5ec9 --- /dev/null +++ b/docs/AssessmentWordlist.md @@ -0,0 +1,31 @@ +# AssessmentWordlist + +Wordlist used during the assessment, or null if none. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the resource. | +**name** | **str** | Name of the resource. | + +## Example + +```python +from corellium.models.assessment_wordlist import AssessmentWordlist + +# TODO update the JSON string below +json = "{}" +# create an instance of AssessmentWordlist from a JSON string +assessment_wordlist_instance = AssessmentWordlist.from_json(json) +# print the JSON string representation of the object +print(AssessmentWordlist.to_json()) + +# convert the object into a dict +assessment_wordlist_dict = assessment_wordlist_instance.to_dict() +# create an instance of AssessmentWordlist from a dict +assessment_wordlist_from_dict = AssessmentWordlist.from_dict(assessment_wordlist_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssessmentsApi.md b/docs/AssessmentsApi.md new file mode 100644 index 0000000..ea2c4e7 --- /dev/null +++ b/docs/AssessmentsApi.md @@ -0,0 +1,1046 @@ +# corellium.AssessmentsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_assessment**](AssessmentsApi.md#v3_create_assessment) | **POST** /v3/services/matrix/{instanceId}/assessments | Create an assessment. +[**v3_create_report_modification**](AssessmentsApi.md#v3_create_report_modification) | **POST** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification | Create report modifications. +[**v3_delete_assessment**](AssessmentsApi.md#v3_delete_assessment) | **DELETE** /v3/services/matrix/{instanceId}/assessments/{assessmentId} | Delete an assessment. +[**v3_delete_report_modification**](AssessmentsApi.md#v3_delete_report_modification) | **DELETE** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification | Delete report modifications. +[**v3_download_report**](AssessmentsApi.md#v3_download_report) | **GET** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/download | Download an assessment report. +[**v3_get_assessment_by_id**](AssessmentsApi.md#v3_get_assessment_by_id) | **GET** /v3/services/matrix/{instanceId}/assessments/{assessmentId} | Get an assessment by ID. +[**v3_get_assessments_by_instance_id**](AssessmentsApi.md#v3_get_assessments_by_instance_id) | **GET** /v3/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments | List assessments for an instance. +[**v3_patch_assessment**](AssessmentsApi.md#v3_patch_assessment) | **PATCH** /v3/services/matrix/{instanceId}/assessments/{assessmentId} | Update an assessment status. +[**v3_run_tests**](AssessmentsApi.md#v3_run_tests) | **POST** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/test | Run assessment tests. +[**v3_start_monitoring**](AssessmentsApi.md#v3_start_monitoring) | **POST** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/start | Start assessment monitoring. +[**v3_stop_monitoring**](AssessmentsApi.md#v3_stop_monitoring) | **POST** /v3/services/matrix/{instanceId}/assessments/{assessmentId}/stop | Stop assessment monitoring. + + +# **v3_create_assessment** +> AssessmentIdStatus v3_create_assessment(instance_id, create_assessment_input) + +Create an assessment. + +Creates a new assessment for one app on the instance. This is always the first call. It does not start recording anything; it only checks the device and saves the assessment in status `new`. + +**Before you call it:** +- The instance must be powered on. +- The device must be jailbroken (iOS) or rooted (Android), and its model must support MATRIX (`mast: true` in `GET /v3/models`). Otherwise the request is rejected; currently this can come back as a server error rather than a 400, so check these conditions before calling. +- The app must already be installed. `bundleId` is the app's identifier (for example `com.android.egg`); the app's name and version are read from the device and stored on the assessment. +- Every earlier assessment on this instance must be `complete` or `failed`. Only one assessment can be in progress per instance at a time. +- Android: the web interface asks for at least 4 CPU cores and 4 GB of RAM before it offers MATRIX. This API does not check those values, but with too little memory monitoring can fail with an out-of-memory error. + +**Optional inputs.** `wordlistId` and `fridaScriptId` point to files you upload beforehand with `POST /v3/images`; see those fields for details. + +**Response.** The new assessment's `id` and `status` (`new`). Save the `id`; every later call needs it. Next call: `v3StartMonitoring`. + +**How a MATRIX assessment works.** MATRIX tests one installed app for mobile security problems (for example insecure storage, weak crypto, or sensitive data sent over the network). It first records what the app does while you use it, then runs its checks against that recording and the device, and finally produces a report. Call these operations in order: + +1. `v3CreateAssessment` with the app's `bundleId`. Status: `new`. +2. `v3StartMonitoring`. Status goes `startingMonitoring`, then `monitoring`. +3. Use the app on the device through the normal display or an automation tool. Exercise the features you care about. Keep the app open. +4. `v3StopMonitoring`. Status goes `stoppingMonitoring`, then `readyForTesting`. +5. `v3RunTests`. Status goes `testing`, then `complete` or `failed`. +6. Poll `v3GetAssessmentById` every few seconds until the status is `complete` or `failed`. Testing can take several minutes. +7. `v3DownloadReport` to get the results as HTML or JSON. +8. Optional: `v3CreateReportModification` to mark findings as not applicable or change their severity. + +Steps 2, 4 and 5 return as soon as the work has started. The request succeeding does not mean the step has finished; always wait for the next status before making the next call. If any step ends in `failed`, the assessment cannot continue: delete it and start again. + +Create, start monitoring, stop monitoring, run tests, and delete require the instance to be powered on. Get, list, update status, download, and the report-modification calls do not. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment_id_status import AssessmentIdStatus +from corellium.models.create_assessment_input import CreateAssessmentInput +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + create_assessment_input = corellium.CreateAssessmentInput() # CreateAssessmentInput | + + try: + # Create an assessment. + api_response = api_instance.v3_create_assessment(instance_id, create_assessment_input) + print("The response of AssessmentsApi->v3_create_assessment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_create_assessment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **create_assessment_input** | [**CreateAssessmentInput**](CreateAssessmentInput.md)| | + +### Return type + +[**AssessmentIdStatus**](AssessmentIdStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The created assessment identifier and status. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_create_report_modification** +> List[ReportModificationResult] v3_create_report_modification(instance_id, assessment_id, report_modification_input) + +Create report modifications. + +Adjusts findings in a finished report, for example to record that a failure does not apply to your app. The assessment must have status `complete`. Your changes are stored separately from the original report. Saving them immediately recalculates the assessment's `results` counts and score. The HTML download shows the adjusted findings; the JSON download contains the original report plus a `modifications` array. + +Send an array. Each item names a check with `checkId` (as shown in the report) and one `property` to change: +- `outcome`: set `value` to `na` to mark the check "not applicable", or `fail` to undo that. +- `severity`: set `value` to a different severity level for the check. +- `evidence_` (for example `evidence_0`): set `suppressed` to `true` to hide the n-th piece of evidence for the check, or `false` to show it again. Do not send `value`. + +The response has one entry per item, saying whether it was applied or why it was ignored. To undo a change, use `v3DeleteReportModification`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.report_modification_input import ReportModificationInput +from corellium.models.report_modification_result import ReportModificationResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + report_modification_input = [corellium.ReportModificationInput()] # List[ReportModificationInput] | + + try: + # Create report modifications. + api_response = api_instance.v3_create_report_modification(instance_id, assessment_id, report_modification_input) + print("The response of AssessmentsApi->v3_create_report_modification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_create_report_modification: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **report_modification_input** | [**List[ReportModificationInput]**](ReportModificationInput.md)| | + +### Return type + +[**List[ReportModificationResult]**](ReportModificationResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The result of each requested modification. | - | +**400** | The assessment is not complete, so its report cannot be modified. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_assessment** +> v3_delete_assessment(instance_id, assessment_id) + +Delete an assessment. + +Permanently deletes an assessment and the data that belongs to it: +- the assessment record, +- the generated report, +- the wordlist file it used (if any), +- the monitoring data MATRIX recorded for this app, +- temporary MATRIX files on the device. + +The Frida script file, if one was used, is **not** deleted; remove it yourself with `DELETE /v3/images/{imageId}` if you no longer need it. + +The instance must be powered on, because MATRIX removes its files from the device. Delete a `failed` assessment before creating a new one for the same instance. Unlike most v3 delete endpoints, an unknown `assessmentId` returns 404 rather than 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + + try: + # Delete an assessment. + api_instance.v3_delete_assessment(instance_id, assessment_id) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_delete_assessment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The assessment was deleted. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_report_modification** +> List[ReportModificationResult] v3_delete_report_modification(instance_id, assessment_id, delete_modification_input) + +Delete report modifications. + +Undoes report changes made with `v3CreateReportModification`, so the affected findings return to their original values. The assessment must have status `complete`. Send an array of `{ checkId, property }` items that identify the changes to remove. The response has one entry per item saying whether it was removed. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.delete_modification_input import DeleteModificationInput +from corellium.models.report_modification_result import ReportModificationResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + delete_modification_input = [corellium.DeleteModificationInput()] # List[DeleteModificationInput] | + + try: + # Delete report modifications. + api_response = api_instance.v3_delete_report_modification(instance_id, assessment_id, delete_modification_input) + print("The response of AssessmentsApi->v3_delete_report_modification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_delete_report_modification: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **delete_modification_input** | [**List[DeleteModificationInput]**](DeleteModificationInput.md)| | + +### Return type + +[**List[ReportModificationResult]**](ReportModificationResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The result of each requested modification removal. | - | +**400** | The assessment is not complete, so its report modifications cannot be removed. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_download_report** +> str v3_download_report(instance_id, assessment_id, format=format) + +Download an assessment report. + +Downloads the full report of a finished assessment. The assessment must have status `complete`; otherwise the request fails with 400. + +Choose the format with `format`: +- `html` (default): a single, self-contained HTML page for people to read. Save it with an `.html` extension and open it in a browser. +- `json`: the report data for programs, plus an `activity` array (up to 100 recent events for the assessment) and a `modifications` array listing the changes made with `v3CreateReportModification`. The report data itself is the original, unmodified result; apply the entries in `modifications` yourself if your program needs the adjusted view. + +The HTML report applies your modifications when it is generated, so download again after changing findings. The instance does not need to be powered on. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment_format import AssessmentFormat +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + format = html # AssessmentFormat | Report download format. Defaults to \"html\". (optional) (default to html) + + try: + # Download an assessment report. + api_response = api_instance.v3_download_report(instance_id, assessment_id, format=format) + print("The response of AssessmentsApi->v3_download_report:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_download_report: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **format** | [**AssessmentFormat**](.md)| Report download format. Defaults to \"html\". | [optional] [default to html] + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The rendered report, as HTML or JSON per the requested format. | - | +**400** | The assessment is not complete, so its report cannot be downloaded. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_assessment_by_id** +> Assessment v3_get_assessment_by_id(instance_id, assessment_id) + +Get an assessment by ID. + +Returns everything known about one assessment. Use it to: +- **Wait for a step to finish.** Poll after `v3StartMonitoring`, `v3StopMonitoring` and `v3RunTests`, and check `status` before making the next call. +- **Find out why it failed.** When `status` is `failed`, `error` may contain a short reason. +- **Read a summary of the results.** Once `status` is `complete`, `results` holds the pass/fail counts and the MATRIX score, and `reportId` is set. Use `v3DownloadReport` for the full findings. + +Returns 404 if no assessment has this ID. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment import Assessment +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + + try: + # Get an assessment by ID. + api_response = api_instance.v3_get_assessment_by_id(instance_id, assessment_id) + print("The response of AssessmentsApi->v3_get_assessment_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_get_assessment_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + +### Return type + +[**Assessment**](Assessment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The requested assessment. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_assessments_by_instance_id** +> PaginatedAssessments v3_get_assessments_by_instance_id(instance_id, target_instance_id, limit=limit, offset=offset, sort=sort, name=name, version=version, status=status, created_by=created_by, wordlist=wordlist, frida=frida, corellium_version=corellium_version, created_at=created_at) + +List assessments for an instance. + +Lists the assessments for an instance, one page at a time. Use it to find earlier assessments, check whether one is still running before creating a new one, or build a history view. + +**Paging.** Returns at most `limit` assessments (default 100), skipping the first `offset` (default 0). `total` is the number of assessments that match your filters; keep increasing `offset` by `limit` until `offset` is at least `total`. + +**Sorting and filtering.** Results are newest first unless you set `sort`. Filters such as `status`, `name` and `createdAt` can be combined; only assessments matching all of them are returned. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.paginated_assessments import PaginatedAssessments +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + target_instance_id = 'target_instance_id_example' # str | ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. + limit = 100 # float | Maximum number of assessments to return. Defaults to 100. (optional) (default to 100) + offset = 0 # float | Number of assessments to skip before returning results. Defaults to 0. (optional) (default to 0) + sort = '-createdAt' # str | Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\". (optional) + name = 'name_example' # str | Filter by app name (exact match). (optional) + version = 'version_example' # str | Filter by app version (exact match). (optional) + status = 'status_example' # str | Filter by assessment status. (optional) + created_by = 'created_by_example' # str | Filter by the user ID that created the assessment. (optional) + wordlist = 'wordlist_example' # str | Filter by wordlist name. Use \"None\" to return assessments without a wordlist. (optional) + frida = 'frida_example' # str | Filter by Frida script name. Use \"None\" to return assessments without a Frida script. (optional) + corellium_version = 'corellium_version_example' # str | Filter by Corellium version (exact match). (optional) + created_at = '9/1/2026-9/2/2026' # str | Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC. (optional) + + try: + # List assessments for an instance. + api_response = api_instance.v3_get_assessments_by_instance_id(instance_id, target_instance_id, limit=limit, offset=offset, sort=sort, name=name, version=version, status=status, created_by=created_by, wordlist=wordlist, frida=frida, corellium_version=corellium_version, created_at=created_at) + print("The response of AssessmentsApi->v3_get_assessments_by_instance_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_get_assessments_by_instance_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **target_instance_id** | **str**| ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. | + **limit** | **float**| Maximum number of assessments to return. Defaults to 100. | [optional] [default to 100] + **offset** | **float**| Number of assessments to skip before returning results. Defaults to 0. | [optional] [default to 0] + **sort** | **str**| Comma-separated fields to order by; prefix a field with \"-\" for descending. Allowed fields: createdAt, status, name, version, score, wordlist, frida, corelliumVersion. Defaults to \"-createdAt\". | [optional] + **name** | **str**| Filter by app name (exact match). | [optional] + **version** | **str**| Filter by app version (exact match). | [optional] + **status** | **str**| Filter by assessment status. | [optional] + **created_by** | **str**| Filter by the user ID that created the assessment. | [optional] + **wordlist** | **str**| Filter by wordlist name. Use \"None\" to return assessments without a wordlist. | [optional] + **frida** | **str**| Filter by Frida script name. Use \"None\" to return assessments without a Frida script. | [optional] + **corellium_version** | **str**| Filter by Corellium version (exact match). | [optional] + **created_at** | **str**| Filter by test date. Accepts a single date (MM/DD/YYYY), a range (MM/DD/YYYY-MM/DD/YYYY), or a comma-separated list of dates and ranges. Dates are matched inclusive of the full day in UTC. | [optional] + +### Return type + +[**PaginatedAssessments**](PaginatedAssessments.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A page of assessments for the instance. | - | +**400** | Invalid query parameters. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_assessment** +> Assessment v3_patch_assessment(instance_id, assessment_id, update_assessment_input) + +Update an assessment status. + +Sets the assessment's `status` field directly. **Most clients should never call this.** `v3StartMonitoring`, `v3StopMonitoring` and `v3RunTests` change the status for you and also do the actual work; this call only changes the stored value. + +The server does not check that the new status is a valid next step, and changing it does not start or stop any monitoring or testing. Setting a status by hand can leave an assessment claiming to be in a state it is not really in. Returns the updated assessment, or 404 if no assessment has this ID. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment import Assessment +from corellium.models.update_assessment_input import UpdateAssessmentInput +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + update_assessment_input = corellium.UpdateAssessmentInput() # UpdateAssessmentInput | + + try: + # Update an assessment status. + api_response = api_instance.v3_patch_assessment(instance_id, assessment_id, update_assessment_input) + print("The response of AssessmentsApi->v3_patch_assessment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_patch_assessment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **update_assessment_input** | [**UpdateAssessmentInput**](UpdateAssessmentInput.md)| | + +### Return type + +[**Assessment**](Assessment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated assessment. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_tests** +> AssessmentIdStatus v3_run_tests(instance_id, assessment_id, test_assessment_input=test_assessment_input) + +Run assessment tests. + +Runs the MATRIX security checks (step 5). Call it once the status is `readyForTesting`. The instance must be powered on and must stay on until testing finishes. + +The checks run in the background and can take several minutes. This call returns right away with the status `testing`. Poll `v3GetAssessmentById` until it is `complete` (then call `v3DownloadReport`) or `failed`. + +**Running only some checks.** The request body is optional; with no body every applicable check runs. To narrow it down, set `grep` to text or a regular expression. A check runs if the pattern matches its check ID, its group ID or its category ID. For example `masvs-storage` runs every storage check and `masvs-storage-2-android-8` runs one check. Set `invert` to `true` to run every check except the matching ones. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment_id_status import AssessmentIdStatus +from corellium.models.test_assessment_input import TestAssessmentInput +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + test_assessment_input = corellium.TestAssessmentInput() # TestAssessmentInput | (optional) + + try: + # Run assessment tests. + api_response = api_instance.v3_run_tests(instance_id, assessment_id, test_assessment_input=test_assessment_input) + print("The response of AssessmentsApi->v3_run_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_run_tests: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **test_assessment_input** | [**TestAssessmentInput**](TestAssessmentInput.md)| | [optional] + +### Return type + +[**AssessmentIdStatus**](AssessmentIdStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assessment identifier and its new status. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_monitoring** +> v3_start_monitoring(instance_id, assessment_id) + +Start assessment monitoring. + +Starts recording what the app does (step 2). Call it after `v3CreateAssessment`, when the assessment's status is `new`. The instance must be powered on. + +MATRIX attaches to the app in the background, which can take a while. This call returns 204 as soon as that work has started, with the status set to `startingMonitoring`. Poll `v3GetAssessmentById`: +- `monitoring`: recording has begun. Now use the app on the device. Go through the features you want tested: sign in, open screens, enter and save data, make network requests. MATRIX can only report on behavior it observed. Keep the app open until you stop monitoring. +- `failed`: see `error`. Common causes are too little device RAM and the app failing to launch. + +When you have finished using the app, call `v3StopMonitoring`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + + try: + # Start assessment monitoring. + api_instance.v3_start_monitoring(instance_id, assessment_id) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_start_monitoring: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Monitoring was started. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_stop_monitoring** +> v3_stop_monitoring(instance_id, assessment_id) + +Stop assessment monitoring. + +Stops recording (step 4). Call it once the status is `monitoring` and you have finished using the app. The instance must be powered on. + +MATRIX detaches from the app and saves what it recorded in the background. This call returns 204 as soon as that has started, with the status set to `stoppingMonitoring`. Poll `v3GetAssessmentById` until the status is `readyForTesting`, then call `v3RunTests`. If it becomes `failed`, check `error`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsApi(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + + try: + # Stop assessment monitoring. + api_instance.v3_stop_monitoring(instance_id, assessment_id) + except Exception as e: + print("Exception when calling AssessmentsApi->v3_stop_monitoring: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Monitoring was stopped. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AssessmentsV1Api.md b/docs/AssessmentsV1Api.md new file mode 100644 index 0000000..702e42d --- /dev/null +++ b/docs/AssessmentsV1Api.md @@ -0,0 +1,952 @@ +# corellium.AssessmentsV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_create_assessment**](AssessmentsV1Api.md#v1_create_assessment) | **POST** /v1/services/matrix/{instanceId}/assessments | Create an assessment. +[**v1_create_report_modification**](AssessmentsV1Api.md#v1_create_report_modification) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification | Create report modifications. +[**v1_delete_assessment**](AssessmentsV1Api.md#v1_delete_assessment) | **DELETE** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Delete an assessment. +[**v1_delete_report_modification**](AssessmentsV1Api.md#v1_delete_report_modification) | **DELETE** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/report-modification | Delete report modifications. +[**v1_download_report**](AssessmentsV1Api.md#v1_download_report) | **GET** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/download | Download an assessment report. +[**v1_get_assessment_by_id**](AssessmentsV1Api.md#v1_get_assessment_by_id) | **GET** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Get an assessment by ID. +[**v1_get_assessments_by_instance_id**](AssessmentsV1Api.md#v1_get_assessments_by_instance_id) | **GET** /v1/services/matrix/{instanceId}/instances/{targetInstanceId}/assessments | List assessments for an instance. +[**v1_patch_assessment**](AssessmentsV1Api.md#v1_patch_assessment) | **PATCH** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Update an assessment status. +[**v1_run_tests**](AssessmentsV1Api.md#v1_run_tests) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/test | Run assessment tests. +[**v1_start_monitoring**](AssessmentsV1Api.md#v1_start_monitoring) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/start | Start assessment monitoring. +[**v1_stop_monitoring**](AssessmentsV1Api.md#v1_stop_monitoring) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop | Stop assessment monitoring. + + +# **v1_create_assessment** +> AssessmentIdStatus v1_create_assessment(instance_id, create_assessment_input) + +Create an assessment. + +Creates a new MATRIX assessment for the instance. Existing assessments must be complete or failed and the instance must be powered on. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment_id_status import AssessmentIdStatus +from corellium.models.create_assessment_input import CreateAssessmentInput +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + create_assessment_input = corellium.CreateAssessmentInput() # CreateAssessmentInput | + + try: + # Create an assessment. + api_response = api_instance.v1_create_assessment(instance_id, create_assessment_input) + print("The response of AssessmentsV1Api->v1_create_assessment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_create_assessment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **create_assessment_input** | [**CreateAssessmentInput**](CreateAssessmentInput.md)| | + +### Return type + +[**AssessmentIdStatus**](AssessmentIdStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The created assessment identifier and status. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_create_report_modification** +> List[ReportModificationResult] v1_create_report_modification(instance_id, assessment_id, report_modification_input) + +Create report modifications. + +Applies one or more modifications (outcome, severity, or evidence suppression) to a completed assessment report. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.report_modification_input import ReportModificationInput +from corellium.models.report_modification_result import ReportModificationResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + report_modification_input = [corellium.ReportModificationInput()] # List[ReportModificationInput] | + + try: + # Create report modifications. + api_response = api_instance.v1_create_report_modification(instance_id, assessment_id, report_modification_input) + print("The response of AssessmentsV1Api->v1_create_report_modification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_create_report_modification: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **report_modification_input** | [**List[ReportModificationInput]**](ReportModificationInput.md)| | + +### Return type + +[**List[ReportModificationResult]**](ReportModificationResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The result of each requested modification. | - | +**400** | The assessment is not complete, so its report cannot be modified. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_assessment** +> v1_delete_assessment(instance_id, assessment_id) + +Delete an assessment. + +Deletes an assessment. The instance must be powered on. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + + try: + # Delete an assessment. + api_instance.v1_delete_assessment(instance_id, assessment_id) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_delete_assessment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The assessment was deleted. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_report_modification** +> List[ReportModificationResult] v1_delete_report_modification(instance_id, assessment_id, delete_modification_input) + +Delete report modifications. + +Removes one or more previously applied report modifications from a completed assessment. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.delete_modification_input import DeleteModificationInput +from corellium.models.report_modification_result import ReportModificationResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + delete_modification_input = [corellium.DeleteModificationInput()] # List[DeleteModificationInput] | + + try: + # Delete report modifications. + api_response = api_instance.v1_delete_report_modification(instance_id, assessment_id, delete_modification_input) + print("The response of AssessmentsV1Api->v1_delete_report_modification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_delete_report_modification: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **delete_modification_input** | [**List[DeleteModificationInput]**](DeleteModificationInput.md)| | + +### Return type + +[**List[ReportModificationResult]**](ReportModificationResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The result of each requested modification removal. | - | +**400** | The assessment is not complete, so its report modifications cannot be removed. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_download_report** +> str v1_download_report(instance_id, assessment_id, format=format) + +Download an assessment report. + +Downloads the rendered assessment report. The assessment must be complete and have a generated report. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment_format import AssessmentFormat +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + format = html # AssessmentFormat | Report download format. Defaults to \"html\". (optional) (default to html) + + try: + # Download an assessment report. + api_response = api_instance.v1_download_report(instance_id, assessment_id, format=format) + print("The response of AssessmentsV1Api->v1_download_report:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_download_report: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **format** | [**AssessmentFormat**](.md)| Report download format. Defaults to \"html\". | [optional] [default to html] + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The rendered report, as HTML or JSON per the requested format. | - | +**400** | The assessment is not complete, so its report cannot be downloaded. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_assessment_by_id** +> Assessment v1_get_assessment_by_id(instance_id, assessment_id) + +Get an assessment by ID. + +Returns the full assessment record. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment import Assessment +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + + try: + # Get an assessment by ID. + api_response = api_instance.v1_get_assessment_by_id(instance_id, assessment_id) + print("The response of AssessmentsV1Api->v1_get_assessment_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_get_assessment_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + +### Return type + +[**Assessment**](Assessment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The requested assessment. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_assessments_by_instance_id** +> List[Assessment] v1_get_assessments_by_instance_id(instance_id, target_instance_id) + +List assessments for an instance. + +Returns a list of assessments for the given instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment import Assessment +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + target_instance_id = 'target_instance_id_example' # str | ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. + + try: + # List assessments for an instance. + api_response = api_instance.v1_get_assessments_by_instance_id(instance_id, target_instance_id) + print("The response of AssessmentsV1Api->v1_get_assessments_by_instance_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_get_assessments_by_instance_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **target_instance_id** | **str**| ID of the instance whose assessments you want to list. Set this to the same value as `instanceId`; the path contains the ID twice only because of how the MATRIX service is routed. | + +### Return type + +[**List[Assessment]**](Assessment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A list of assessments for the instance. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_patch_assessment** +> Assessment v1_patch_assessment(instance_id, assessment_id, update_assessment_input) + +Update an assessment status. + +Updates the lifecycle status of an assessment. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment import Assessment +from corellium.models.update_assessment_input import UpdateAssessmentInput +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + update_assessment_input = corellium.UpdateAssessmentInput() # UpdateAssessmentInput | + + try: + # Update an assessment status. + api_response = api_instance.v1_patch_assessment(instance_id, assessment_id, update_assessment_input) + print("The response of AssessmentsV1Api->v1_patch_assessment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_patch_assessment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **update_assessment_input** | [**UpdateAssessmentInput**](UpdateAssessmentInput.md)| | + +### Return type + +[**Assessment**](Assessment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated assessment. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_run_tests** +> AssessmentIdStatus v1_run_tests(instance_id, assessment_id, test_assessment_input=test_assessment_input) + +Run assessment tests. + +Executes the MATRIX checks for an assessment. The assessment must have status "readyForTesting" and the instance must be powered on. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.assessment_id_status import AssessmentIdStatus +from corellium.models.test_assessment_input import TestAssessmentInput +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + test_assessment_input = corellium.TestAssessmentInput() # TestAssessmentInput | (optional) + + try: + # Run assessment tests. + api_response = api_instance.v1_run_tests(instance_id, assessment_id, test_assessment_input=test_assessment_input) + print("The response of AssessmentsV1Api->v1_run_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_run_tests: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + **test_assessment_input** | [**TestAssessmentInput**](TestAssessmentInput.md)| | [optional] + +### Return type + +[**AssessmentIdStatus**](AssessmentIdStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The assessment identifier and its new status. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_start_monitoring** +> v1_start_monitoring(instance_id, assessment_id) + +Start assessment monitoring. + +Begins device monitoring for an assessment. The assessment must have status "new" and the instance must be powered on. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + + try: + # Start assessment monitoring. + api_instance.v1_start_monitoring(instance_id, assessment_id) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_start_monitoring: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Monitoring was started. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_stop_monitoring** +> v1_stop_monitoring(instance_id, assessment_id) + +Stop assessment monitoring. + +Stops device monitoring for an assessment. The assessment must have status "monitoring" and the instance must be powered on. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AssessmentsV1Api(api_client) + instance_id = 'instance_id_example' # str | ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. + assessment_id = 'assessment_id_example' # str | Identifier of the assessment. + + try: + # Stop assessment monitoring. + api_instance.v1_stop_monitoring(instance_id, assessment_id) + except Exception as e: + print("Exception when calling AssessmentsV1Api->v1_stop_monitoring: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| ID of the instance (virtual device) the assessment belongs to. The platform checks that you have access to this instance before the request reaches MATRIX, so use the ID of an instance in one of your projects. | + **assessment_id** | **str**| Identifier of the assessment. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Monitoring was stopped. | - | +**400** | Invalid request — for example the instance is powered off, an existing assessment is still in progress, or the assessment is not in the required state for this action. | - | +**404** | Assessment not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AttachInterfaceBody.md b/docs/AttachInterfaceBody.md new file mode 100644 index 0000000..6972f85 --- /dev/null +++ b/docs/AttachInterfaceBody.md @@ -0,0 +1,30 @@ +# AttachInterfaceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interface_id** | **str** | Which of the device's I/O interfaces to connect, for example `gpio/0`. | +**interconnect_id** | **str** | Interconnect identifier. | + +## Example + +```python +from corellium.models.attach_interface_body import AttachInterfaceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AttachInterfaceBody from a JSON string +attach_interface_body_instance = AttachInterfaceBody.from_json(json) +# print the JSON string representation of the object +print(AttachInterfaceBody.to_json()) + +# convert the object into a dict +attach_interface_body_dict = attach_interface_body_instance.to_dict() +# create an instance of AttachInterfaceBody from a dict +attach_interface_body_from_dict = AttachInterfaceBody.from_dict(attach_interface_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AttachInterfaceRequest.md b/docs/AttachInterfaceRequest.md index 3560527..91455b1 100644 --- a/docs/AttachInterfaceRequest.md +++ b/docs/AttachInterfaceRequest.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interface_id** | **str** | Interface identifier | **interconnect_id** | **str** | Interconnect identifier | +## Example + +```python +from corellium.models.attach_interface_request import AttachInterfaceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AttachInterfaceRequest from a JSON string +attach_interface_request_instance = AttachInterfaceRequest.from_json(json) +# print the JSON string representation of the object +print(AttachInterfaceRequest.to_json()) + +# convert the object into a dict +attach_interface_request_dict = attach_interface_request_instance.to_dict() +# create an instance of AttachInterfaceRequest from a dict +attach_interface_request_from_dict = AttachInterfaceRequest.from_dict(attach_interface_request_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthProvider.md b/docs/AuthProvider.md index 132274a..4a8786e 100644 --- a/docs/AuthProvider.md +++ b/docs/AuthProvider.md @@ -1,20 +1,35 @@ # AuthProvider - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | Provider name for a given provider type | [optional] -**identifier** | **str** | The identifier for the provider | [optional] -**provider_type** | **str** | Provider type | [optional] -**default** | **bool** | Denotes whether it's the default | [optional] -**label** | **str** | Provider label | [optional] -**enabled** | **bool** | Denotes whether they're enabled or not | [optional] -**authorization_url** | **str** | URL for provider auth | [optional] -**id** | **str** | The identifier for the provider | [optional] -**provider** | **str** | Auth provider | [optional] +**identifier** | **str** | Provider identifier. | +**provider_type** | **str** | Provider type (e.g. database, open-id-connect). | +**enabled** | **bool** | Whether the provider is enabled. | +**default** | **bool** | Whether this is the default provider. | +**label** | **str** | Human-readable provider label. | +**name** | **str** | Provider display name. | +**authorization_url** | **str** | Relative authorization URL for the provider. | + +## Example + +```python +from corellium.models.auth_provider import AuthProvider + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthProvider from a JSON string +auth_provider_instance = AuthProvider.from_json(json) +# print the JSON string representation of the object +print(AuthProvider.to_json()) +# convert the object into a dict +auth_provider_dict = auth_provider_instance.to_dict() +# create an instance of AuthProvider from a dict +auth_provider_from_dict = AuthProvider.from_dict(auth_provider_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthProviderType.md b/docs/AuthProviderType.md new file mode 100644 index 0000000..7fce947 --- /dev/null +++ b/docs/AuthProviderType.md @@ -0,0 +1,30 @@ +# AuthProviderType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | Provider type identifier. | +**var_schema** | **Dict[str, Optional[object]]** | JSON Schema describing the provider configuration. | + +## Example + +```python +from corellium.models.auth_provider_type import AuthProviderType + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthProviderType from a JSON string +auth_provider_type_instance = AuthProviderType.from_json(json) +# print the JSON string representation of the object +print(AuthProviderType.to_json()) + +# convert the object into a dict +auth_provider_type_dict = auth_provider_type_instance.to_dict() +# create an instance of AuthProviderType from a dict +auth_provider_type_from_dict = AuthProviderType.from_dict(auth_provider_type_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthProviderTypesListResponse.md b/docs/AuthProviderTypesListResponse.md new file mode 100644 index 0000000..9b70f09 --- /dev/null +++ b/docs/AuthProviderTypesListResponse.md @@ -0,0 +1,34 @@ +# AuthProviderTypesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[AuthProviderType]**](AuthProviderType.md) | Supported authentication provider types. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.auth_provider_types_list_response import AuthProviderTypesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthProviderTypesListResponse from a JSON string +auth_provider_types_list_response_instance = AuthProviderTypesListResponse.from_json(json) +# print the JSON string representation of the object +print(AuthProviderTypesListResponse.to_json()) + +# convert the object into a dict +auth_provider_types_list_response_dict = auth_provider_types_list_response_instance.to_dict() +# create an instance of AuthProviderTypesListResponse from a dict +auth_provider_types_list_response_from_dict = AuthProviderTypesListResponse.from_dict(auth_provider_types_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthProviderV1.md b/docs/AuthProviderV1.md new file mode 100644 index 0000000..9d325d9 --- /dev/null +++ b/docs/AuthProviderV1.md @@ -0,0 +1,38 @@ +# AuthProviderV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Provider name for a given provider type | [optional] +**identifier** | **str** | The identifier for the provider | [optional] +**provider_type** | **str** | Provider type | [optional] +**default** | **bool** | Denotes whether it's the default | [optional] +**label** | **str** | Provider label | [optional] +**enabled** | **bool** | Denotes whether they're enabled or not | [optional] +**authorization_url** | **str** | URL for provider auth | [optional] +**id** | **str** | The identifier for the provider | [optional] +**provider** | **str** | Auth provider | [optional] + +## Example + +```python +from corellium.models.auth_provider_v1 import AuthProviderV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthProviderV1 from a JSON string +auth_provider_v1_instance = AuthProviderV1.from_json(json) +# print the JSON string representation of the object +print(AuthProviderV1.to_json()) + +# convert the object into a dict +auth_provider_v1_dict = auth_provider_v1_instance.to_dict() +# create an instance of AuthProviderV1 from a dict +auth_provider_v1_from_dict = AuthProviderV1.from_dict(auth_provider_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthProvidersListResponse.md b/docs/AuthProvidersListResponse.md new file mode 100644 index 0000000..81b6f4f --- /dev/null +++ b/docs/AuthProvidersListResponse.md @@ -0,0 +1,34 @@ +# AuthProvidersListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[AuthProvider]**](AuthProvider.md) | Configured authentication providers. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.auth_providers_list_response import AuthProvidersListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthProvidersListResponse from a JSON string +auth_providers_list_response_instance = AuthProvidersListResponse.from_json(json) +# print the JSON string representation of the object +print(AuthProvidersListResponse.to_json()) + +# convert the object into a dict +auth_providers_list_response_dict = auth_providers_list_response_instance.to_dict() +# create an instance of AuthProvidersListResponse from a dict +auth_providers_list_response_from_dict = AuthProvidersListResponse.from_dict(auth_providers_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md new file mode 100644 index 0000000..0b87836 --- /dev/null +++ b/docs/AuthenticationApi.md @@ -0,0 +1,852 @@ +# corellium.AuthenticationApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_auth_login**](AuthenticationApi.md#v3_auth_login) | **POST** /v3/auth/login | Log in +[**v3_auth_logout**](AuthenticationApi.md#v3_auth_logout) | **POST** /v3/auth/logout | Log out +[**v3_delete_api_token**](AuthenticationApi.md#v3_delete_api_token) | **DELETE** /v3/auth/apitoken | Delete API token +[**v3_fetch_auth_provider_metadata**](AuthenticationApi.md#v3_fetch_auth_provider_metadata) | **GET** /v3/auth/providers/fetch-metadata | Fetch SAML metadata +[**v3_generate_api_token**](AuthenticationApi.md#v3_generate_api_token) | **POST** /v3/auth/apitoken | Generate API token +[**v3_get_auth_provider_authorization_url**](AuthenticationApi.md#v3_get_auth_provider_authorization_url) | **GET** /v3/auth/providers/{providerId}/authorization_url | Get provider authorization URL +[**v3_get_auth_provider_callback**](AuthenticationApi.md#v3_get_auth_provider_callback) | **GET** /v3/auth/providers/{providerId}/callback | Authentication provider callback (GET) +[**v3_get_auth_provider_sp_metadata**](AuthenticationApi.md#v3_get_auth_provider_sp_metadata) | **GET** /v3/auth/providers/{providerId}/spmetadata | Get service provider metadata +[**v3_list_auth_provider_types**](AuthenticationApi.md#v3_list_auth_provider_types) | **GET** /v3/auth/providers/types | List authentication provider types +[**v3_list_auth_providers**](AuthenticationApi.md#v3_list_auth_providers) | **GET** /v3/auth/providers | List authentication providers +[**v3_post_auth_provider_callback**](AuthenticationApi.md#v3_post_auth_provider_callback) | **POST** /v3/auth/providers/{providerId}/callback | Authentication provider callback (POST) + + +# **v3_auth_login** +> LoginResult v3_auth_login(login_body=login_body) + +Log in + +**Start here.** Almost every other call needs you to prove who you are by sending a token in the `Authorization` header: `Authorization: Bearer `. There are two kinds of token: + +- **API token (best for scripts and automation).** A long-lived key you create once, in the web interface or with `POST /v3/auth/apitoken`. It is shown only once, so store it safely. You can send it directly as the Bearer token on every request, or exchange it here for a session token by sending `apiToken`. +- **Session token.** A short-lived token (a JWT) returned by this call. Send it as the Bearer token until `expiration`, then log in again or renew it by sending it back as `token`. + +Supply one of three credential types; when more than one is present they are resolved in this fixed order of precedence: (1) `username` + `password` (plus `totpToken`, a six-digit code from your authenticator app, when two-factor sign-in is enabled); (2) `token`, an existing session token, renewed for a fresh one; (3) `apiToken`, a persistent API key created by the user, not issued by login. The first credential type present wins and the rest are ignored. For example, sending both username/password and an apiToken authenticates via username/password. On success the response contains a newly-regenerated session token, its `expiration` time, and the session itself: the authenticated user and their domain. The apiToken is never returned. Renewing a Webplayer token instead returns the Webplayer session `identifier` and no `user`. + +A 403 means the credentials were wrong (or a required two-factor code was missing or wrong). + +### Example + + +```python +import corellium +from corellium.models.login_body import LoginBody +from corellium.models.login_result import LoginResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + login_body = corellium.LoginBody() # LoginBody | (optional) + + try: + # Log in + api_response = api_instance.v3_auth_login(login_body=login_body) + print("The response of AuthenticationApi->v3_auth_login:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_auth_login: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **login_body** | [**LoginBody**](LoginBody.md)| | [optional] + +### Return type + +[**LoginResult**](LoginResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Authentication succeeded. | - | +**400** | Missing or invalid credentials in the request body. | - | +**403** | Invalid username or password. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_auth_logout** +> v3_auth_logout() + +Log out + +Ends the current session: the session token you send becomes invalid, so later requests with it fail with 401. For OpenID Connect (single sign-on) users this also ends the session with the identity provider. API tokens are not affected; remove one with `v3DeleteApiToken`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + + try: + # Log out + api_instance.v3_auth_logout() + except Exception as e: + print("Exception when calling AuthenticationApi->v3_auth_logout: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Logout succeeded. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_api_token** +> v3_delete_api_token() + +Delete API token + +Deletes your API token, so it can no longer be used to sign in. Scripts using it will get 401 until you give them a new one from `v3GenerateApiToken`. + +Deletes are idempotent: a request made when no API token is saved is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + + try: + # Delete API token + api_instance.v3_delete_api_token() + except Exception as e: + print("Exception when calling AuthenticationApi->v3_delete_api_token: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The API token was deleted, or no token was saved. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_fetch_auth_provider_metadata** +> str v3_fetch_auth_provider_metadata(url) + +Fetch SAML metadata + +Fetch SAML metadata XML from a trusted provider URL. The URL must be HTTPS and from an allowed domain. + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + url = 'https://sso.okta.com/app/exk1a2b3c4d5e6f7g8h9/sso/saml/metadata' # str | HTTPS URL of the SAML metadata endpoint to fetch. + + try: + # Fetch SAML metadata + api_response = api_instance.v3_fetch_auth_provider_metadata(url) + print("The response of AuthenticationApi->v3_fetch_auth_provider_metadata:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_fetch_auth_provider_metadata: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **url** | **str**| HTTPS URL of the SAML metadata endpoint to fetch. | + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | SAML metadata document. | - | +**400** | Missing or non-HTTPS URL parameter. | - | +**403** | The URL domain is not in the allowed list. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_generate_api_token** +> ApiTokenResult v3_generate_api_token() + +Generate API token + +Creates a new API token for you: a long-lived key for scripts, CI jobs and SDKs, so they do not need your password. The response contains the token; it is shown only this once and cannot be retrieved later, so store it somewhere safe (for example a secrets manager). Each user has one API token at a time: generating a new one replaces the old one, which stops working immediately. Use it as `Authorization: Bearer `, or exchange it for a session token with `v3AuthLogin`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.api_token_result import ApiTokenResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + + try: + # Generate API token + api_response = api_instance.v3_generate_api_token() + print("The response of AuthenticationApi->v3_generate_api_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_generate_api_token: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ApiTokenResult**](ApiTokenResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A freshly generated API token. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_auth_provider_authorization_url** +> v3_get_auth_provider_authorization_url(provider_id, type=type, code=code, email=email, token=token) + +Get provider authorization URL + +Starts single sign-on with the given identity provider by redirecting the caller's browser there (302). Open this URL in a browser, not from a script: after the user signs in at the provider, the provider sends the browser back to the callback route, which finishes signing in. + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + provider_id = 'sso.example.com' # str | Provider identifier. + type = 'type_example' # str | Sign-up flow type. (optional) + code = 'INVITE1234' # str | Sign-up code for subscriber invites and trial requests. (optional) + email = 'jane.doe@example.com' # str | Sign-up email (may differ from SSO email). (optional) + token = '' # str | Sign-up token for a team invite. (optional) + + try: + # Get provider authorization URL + api_instance.v3_get_auth_provider_authorization_url(provider_id, type=type, code=code, email=email, token=token) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_get_auth_provider_authorization_url: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_id** | **str**| Provider identifier. | + **type** | **str**| Sign-up flow type. | [optional] + **code** | **str**| Sign-up code for subscriber invites and trial requests. | [optional] + **email** | **str**| Sign-up email (may differ from SSO email). | [optional] + **token** | **str**| Sign-up token for a team invite. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**302** | Success — redirects the caller to the identity provider's authorization URL. | * Location - URL the client is redirected to.
| +**404** | No provider with the given providerId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_auth_provider_callback** +> v3_get_auth_provider_callback(provider_id, error=error, error_description=error_description) + +Authentication provider callback (GET) + +Handle the final authorization response from an SSO provider and redirect back to the client. + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + provider_id = 'sso.example.com' # str | Provider identifier. + error = 'access_denied' # str | Error code from the provider. (optional) + error_description = 'The user denied the request.' # str | Error description from the provider. (optional) + + try: + # Authentication provider callback (GET) + api_instance.v3_get_auth_provider_callback(provider_id, error=error, error_description=error_description) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_get_auth_provider_callback: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_id** | **str**| Provider identifier. | + **error** | **str**| Error code from the provider. | [optional] + **error_description** | **str**| Error description from the provider. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**302** | Success — redirects the caller back to the application after handling the callback. | * Location - URL the client is redirected to.
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_auth_provider_sp_metadata** +> str v3_get_auth_provider_sp_metadata(provider_id) + +Get service provider metadata + +Return the SAML service provider metadata XML for the given authentication provider. + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + provider_id = 'sso.example.com' # str | Provider identifier. + + try: + # Get service provider metadata + api_response = api_instance.v3_get_auth_provider_sp_metadata(provider_id) + print("The response of AuthenticationApi->v3_get_auth_provider_sp_metadata:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_get_auth_provider_sp_metadata: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_id** | **str**| Provider identifier. | + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Service provider metadata document. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The provider does not expose service provider metadata. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_auth_provider_types** +> AuthProviderTypesListResponse v3_list_auth_provider_types(limit=limit, offset=offset) + +List authentication provider types + +**Required role:** Domain administrator. + +Return schemas describing the supported authentication provider types. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.auth_provider_types_list_response import AuthProviderTypesListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List authentication provider types + api_response = api_instance.v3_list_auth_provider_types(limit=limit, offset=offset) + print("The response of AuthenticationApi->v3_list_auth_provider_types:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_list_auth_provider_types: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**AuthProviderTypesListResponse**](AuthProviderTypesListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of supported authentication provider types. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_auth_providers** +> AuthProvidersListResponse v3_list_auth_providers(limit=limit, offset=offset) + +List authentication providers + +Lists the ways users can sign in to your domain, such as username and password or single sign-on (SSO) through an identity provider like Okta. Needs no sign-in, so a login page can call it to show the right buttons. To sign in with an SSO provider, send the user's browser to its `authorizationUrl`. + +### Example + + +```python +import corellium +from corellium.models.auth_providers_list_response import AuthProvidersListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List authentication providers + api_response = api_instance.v3_list_auth_providers(limit=limit, offset=offset) + print("The response of AuthenticationApi->v3_list_auth_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_list_auth_providers: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**AuthProvidersListResponse**](AuthProvidersListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of configured authentication providers. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_post_auth_provider_callback** +> v3_post_auth_provider_callback(provider_id) + +Authentication provider callback (POST) + +Handle the final authorization response from an SSO provider (POST binding) and redirect back to the client. + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationApi(api_client) + provider_id = 'sso.example.com' # str | Provider identifier. + + try: + # Authentication provider callback (POST) + api_instance.v3_post_auth_provider_callback(provider_id) + except Exception as e: + print("Exception when calling AuthenticationApi->v3_post_auth_provider_callback: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_id** | **str**| Provider identifier. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**302** | Success — redirects the caller back to the application after handling the callback. | * Location - URL the client is redirected to.
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AuthenticationV1Api.md b/docs/AuthenticationV1Api.md new file mode 100644 index 0000000..358bff1 --- /dev/null +++ b/docs/AuthenticationV1Api.md @@ -0,0 +1,260 @@ +# corellium.AuthenticationV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_auth_login**](AuthenticationV1Api.md#v1_auth_login) | **POST** /v1/auth/login | Log In +[**v1_delete_api_token**](AuthenticationV1Api.md#v1_delete_api_token) | **DELETE** /v1/auth/apitoken | Delete API token +[**v1_generate_api_token**](AuthenticationV1Api.md#v1_generate_api_token) | **POST** /v1/auth/apitoken | Generate API token + + +# **v1_auth_login** +> TokenV1 v1_auth_login(body) + +Log In + +Authenticate with username/password or a persistent apiToken. On success returns a freshly-regenerated session token (JWT). + +### Example + + +```python +import corellium +from corellium.models.token_v1 import TokenV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationV1Api(api_client) + body = { + "username": "admin", + "password": "password" +} # object | Authorization data ( Credentials|ApiToken ) + + try: + # Log In + api_response = api_instance.v1_auth_login(body) + print("The response of AuthenticationV1Api->v1_auth_login:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationV1Api->v1_auth_login: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **object**| Authorization data ( Credentials|ApiToken ) | + +### Return type + +[**TokenV1**](TokenV1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User Authorization | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_api_token** +> v1_delete_api_token() + +Delete API token + +Delete the authenticated user's currently saved API token. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationV1Api(api_client) + + try: + # Delete API token + api_instance.v1_delete_api_token() + except Exception as e: + print("Exception when calling AuthenticationV1Api->v1_delete_api_token: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The API token was deleted | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_generate_api_token** +> ApiToken v1_generate_api_token() + +Generate API token + +Generate a new API token for the authenticated user. The token is returned once and replaces any previously issued token. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.api_token import ApiToken +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.AuthenticationV1Api(api_client) + + try: + # Generate API token + api_response = api_instance.v1_generate_api_token() + print("The response of AuthenticationV1Api->v1_generate_api_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationV1Api->v1_generate_api_token: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ApiToken**](ApiToken.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A freshly generated API token | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AvailablePlansListResponse.md b/docs/AvailablePlansListResponse.md new file mode 100644 index 0000000..bff96e3 --- /dev/null +++ b/docs/AvailablePlansListResponse.md @@ -0,0 +1,34 @@ +# AvailablePlansListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Plan]**](Plan.md) | Available plans. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.available_plans_list_response import AvailablePlansListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AvailablePlansListResponse from a JSON string +available_plans_list_response_instance = AvailablePlansListResponse.from_json(json) +# print the JSON string representation of the object +print(AvailablePlansListResponse.to_json()) + +# convert the object into a dict +available_plans_list_response_dict = available_plans_list_response_instance.to_dict() +# create an instance of AvailablePlansListResponse from a dict +available_plans_list_response_from_dict = AvailablePlansListResponse.from_dict(available_plans_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AvailableTrialPlan.md b/docs/AvailableTrialPlan.md new file mode 100644 index 0000000..39f8cb8 --- /dev/null +++ b/docs/AvailableTrialPlan.md @@ -0,0 +1,35 @@ +# AvailableTrialPlan + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_id** | **str** | Stripe product identifier. | +**name** | **str** | Trial plan name. | +**license** | **str** | License type. | +**workspace** | **bool** | Whether the trial includes a workspace. | +**cores** | **float** | Number of cores included. | +**devices** | **float** | Number of devices included. | +**trial_duration** | **float** | Trial duration in days. | + +## Example + +```python +from corellium.models.available_trial_plan import AvailableTrialPlan + +# TODO update the JSON string below +json = "{}" +# create an instance of AvailableTrialPlan from a JSON string +available_trial_plan_instance = AvailableTrialPlan.from_json(json) +# print the JSON string representation of the object +print(AvailableTrialPlan.to_json()) + +# convert the object into a dict +available_trial_plan_dict = available_trial_plan_instance.to_dict() +# create an instance of AvailableTrialPlan from a dict +available_trial_plan_from_dict = AvailableTrialPlan.from_dict(available_trial_plan_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AvailableTrialPlanList.md b/docs/AvailableTrialPlanList.md new file mode 100644 index 0000000..07800c8 --- /dev/null +++ b/docs/AvailableTrialPlanList.md @@ -0,0 +1,34 @@ +# AvailableTrialPlanList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[AvailableTrialPlan]**](AvailableTrialPlan.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.available_trial_plan_list import AvailableTrialPlanList + +# TODO update the JSON string below +json = "{}" +# create an instance of AvailableTrialPlanList from a JSON string +available_trial_plan_list_instance = AvailableTrialPlanList.from_json(json) +# print the JSON string representation of the object +print(AvailableTrialPlanList.to_json()) + +# convert the object into a dict +available_trial_plan_list_dict = available_trial_plan_list_instance.to_dict() +# create an instance of AvailableTrialPlanList from a dict +available_trial_plan_list_from_dict = AvailableTrialPlanList.from_dict(available_trial_plan_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AwsCreateResponse.md b/docs/AwsCreateResponse.md new file mode 100644 index 0000000..4f3bd0a --- /dev/null +++ b/docs/AwsCreateResponse.md @@ -0,0 +1,30 @@ +# AwsCreateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ready** | **bool** | Whether the account is ready. | +**is_authed** | **bool** | Whether the user is authenticated. | + +## Example + +```python +from corellium.models.aws_create_response import AwsCreateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AwsCreateResponse from a JSON string +aws_create_response_instance = AwsCreateResponse.from_json(json) +# print the JSON string representation of the object +print(AwsCreateResponse.to_json()) + +# convert the object into a dict +aws_create_response_dict = aws_create_response_instance.to_dict() +# create an instance of AwsCreateResponse from a dict +aws_create_response_from_dict = AwsCreateResponse.from_dict(aws_create_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingApi.md b/docs/BillingApi.md new file mode 100644 index 0000000..f9036f0 --- /dev/null +++ b/docs/BillingApi.md @@ -0,0 +1,592 @@ +# corellium.BillingApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_cancel_subscription**](BillingApi.md#v3_cancel_subscription) | **POST** /v3/billing/cancel | Cancel a subscription +[**v3_get_billing_summary**](BillingApi.md#v3_get_billing_summary) | **GET** /v3/billing/summary | Get billing summary +[**v3_get_device_usage**](BillingApi.md#v3_get_device_usage) | **GET** /v3/billing/usage | Get device usage +[**v3_get_metered_subscription_usage**](BillingApi.md#v3_get_metered_subscription_usage) | **GET** /v3/billing/subscription/metered/usage | Get metered subscription usage +[**v3_get_subscription**](BillingApi.md#v3_get_subscription) | **GET** /v3/billing/subscription | Get the current subscription +[**v3_subscribe_to_trial**](BillingApi.md#v3_subscribe_to_trial) | **POST** /v3/billing/trials/subscribe | Subscribe to a trial +[**v3_uncancel_subscription**](BillingApi.md#v3_uncancel_subscription) | **POST** /v3/billing/uncancel | Uncancel a subscription + + +# **v3_cancel_subscription** +> v3_cancel_subscription(cancel_subscription_body=cancel_subscription_body) + +Cancel a subscription + +**Required role:** Domain administrator. + +Cancels your domain's subscription. Requires an administrator. By default it acts on your own domain; only a cloud administrator may pass another `domainId`. Set `deleteDomain: true` to also delete the domain and everything in it, which cannot be undone. A cancellation that has not taken effect yet can be reversed with `v3UncancelSubscription`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.cancel_subscription_body import CancelSubscriptionBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.BillingApi(api_client) + cancel_subscription_body = corellium.CancelSubscriptionBody() # CancelSubscriptionBody | (optional) + + try: + # Cancel a subscription + api_instance.v3_cancel_subscription(cancel_subscription_body=cancel_subscription_body) + except Exception as e: + print("Exception when calling BillingApi->v3_cancel_subscription: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cancel_subscription_body** | [**CancelSubscriptionBody**](CancelSubscriptionBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Subscription canceled. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_billing_summary** +> BillingSummary v3_get_billing_summary() + +Get billing summary + +**Required role:** Domain administrator. + +Returns the charges building up for your domain in the current billing period on a usage-based plan: when the period started and ends, the running total, the billing threshold, and a line item per charged activity. Returns `pendingUsageBased: null` if your domain is not on a usage-based plan. Requires a domain administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.billing_summary import BillingSummary +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.BillingApi(api_client) + + try: + # Get billing summary + api_response = api_instance.v3_get_billing_summary() + print("The response of BillingApi->v3_get_billing_summary:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BillingApi->v3_get_billing_summary: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**BillingSummary**](BillingSummary.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Billing summary. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_device_usage** +> DeviceUsage v3_get_device_usage() + +Get device usage + +Returns how much your domain's devices have been used in the current billing period. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.device_usage import DeviceUsage +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.BillingApi(api_client) + + try: + # Get device usage + api_response = api_instance.v3_get_device_usage() + print("The response of BillingApi->v3_get_device_usage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BillingApi->v3_get_device_usage: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**DeviceUsage**](DeviceUsage.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Device usage. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_metered_subscription_usage** +> MeteredSubscriptionUsage v3_get_metered_subscription_usage() + +Get metered subscription usage + +**Required role:** Domain administrator. + +For domains on a metered plan, returns how much has been used in the current billing period: units (hours) included in the plan, units used beyond it, the rate for extra use, and the amounts billed and still outstanding. Amounts are in cents. Requires a domain administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.metered_subscription_usage import MeteredSubscriptionUsage +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.BillingApi(api_client) + + try: + # Get metered subscription usage + api_response = api_instance.v3_get_metered_subscription_usage() + print("The response of BillingApi->v3_get_metered_subscription_usage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BillingApi->v3_get_metered_subscription_usage: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**MeteredSubscriptionUsage**](MeteredSubscriptionUsage.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Metered subscription usage. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_subscription** +> Subscription v3_get_subscription() + +Get the current subscription + +Returns your domain's current subscription: which plan you are on and its status. Use it to check what your account includes or whether a cancellation is scheduled. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.subscription import Subscription +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.BillingApi(api_client) + + try: + # Get the current subscription + api_response = api_instance.v3_get_subscription() + print("The response of BillingApi->v3_get_subscription:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BillingApi->v3_get_subscription: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Subscription**](Subscription.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Subscription detail. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_subscribe_to_trial** +> Dict[str, Optional[object]] v3_subscribe_to_trial(subscribe_to_trial_body=subscribe_to_trial_body) + +Subscribe to a trial + +Creates a new trial domain for someone who has a trial invitation. Needs no sign-in: the invitation details in the body identify the person. Used by the trial sign-up page. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.subscribe_to_trial_body import SubscribeToTrialBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.BillingApi(api_client) + subscribe_to_trial_body = corellium.SubscribeToTrialBody() # SubscribeToTrialBody | (optional) + + try: + # Subscribe to a trial + api_response = api_instance.v3_subscribe_to_trial(subscribe_to_trial_body=subscribe_to_trial_body) + print("The response of BillingApi->v3_subscribe_to_trial:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BillingApi->v3_subscribe_to_trial: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subscribe_to_trial_body** | [**SubscribeToTrialBody**](SubscribeToTrialBody.md)| | [optional] + +### Return type + +**Dict[str, Optional[object]]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Trial subscription result. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_uncancel_subscription** +> v3_uncancel_subscription(uncancel_subscription_body=uncancel_subscription_body) + +Uncancel a subscription + +**Required role:** Domain administrator. + +Reverses a scheduled cancellation, so the subscription continues as before: the pending cancellation is cleared and the scheduled shut-off is removed. Requires an administrator; acts on your own domain unless a cloud administrator passes another `domainId`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.uncancel_subscription_body import UncancelSubscriptionBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.BillingApi(api_client) + uncancel_subscription_body = corellium.UncancelSubscriptionBody() # UncancelSubscriptionBody | (optional) + + try: + # Uncancel a subscription + api_instance.v3_uncancel_subscription(uncancel_subscription_body=uncancel_subscription_body) + except Exception as e: + print("Exception when calling BillingApi->v3_uncancel_subscription: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **uncancel_subscription_body** | [**UncancelSubscriptionBody**](UncancelSubscriptionBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Subscription reactivated. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BillingLineItem.md b/docs/BillingLineItem.md new file mode 100644 index 0000000..b439091 --- /dev/null +++ b/docs/BillingLineItem.md @@ -0,0 +1,34 @@ +# BillingLineItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Usage category name. | +**name** | **str** | Line item name. | +**short_name** | **str** | Short line item name. | +**description** | **str** | Line item description. May be empty. | +**quantity** | **float** | Units used. | +**unit_cost** | **float** | Cost per unit. | + +## Example + +```python +from corellium.models.billing_line_item import BillingLineItem + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingLineItem from a JSON string +billing_line_item_instance = BillingLineItem.from_json(json) +# print the JSON string representation of the object +print(BillingLineItem.to_json()) + +# convert the object into a dict +billing_line_item_dict = billing_line_item_instance.to_dict() +# create an instance of BillingLineItem from a dict +billing_line_item_from_dict = BillingLineItem.from_dict(billing_line_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingSummary.md b/docs/BillingSummary.md new file mode 100644 index 0000000..eddc0e8 --- /dev/null +++ b/docs/BillingSummary.md @@ -0,0 +1,29 @@ +# BillingSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pending_usage_based** | [**BillingSummaryPendingUsageBased**](BillingSummaryPendingUsageBased.md) | | + +## Example + +```python +from corellium.models.billing_summary import BillingSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingSummary from a JSON string +billing_summary_instance = BillingSummary.from_json(json) +# print the JSON string representation of the object +print(BillingSummary.to_json()) + +# convert the object into a dict +billing_summary_dict = billing_summary_instance.to_dict() +# create an instance of BillingSummary from a dict +billing_summary_from_dict = BillingSummary.from_dict(billing_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingSummaryPendingUsageBased.md b/docs/BillingSummaryPendingUsageBased.md new file mode 100644 index 0000000..80bd3ed --- /dev/null +++ b/docs/BillingSummaryPendingUsageBased.md @@ -0,0 +1,34 @@ +# BillingSummaryPendingUsageBased + +Pending usage-based bill report. Null unless the domain bills by usage. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_bill_date** | **float** | Last bill unix timestamp (ms). | +**next_bill_date** | **float** | Next bill unix timestamp (ms). | +**billing_threshold** | **float** | Dollar threshold that triggers a usage bill. | +**total** | **str** | Pending total in dollars, as a fixed two-decimal string. | +**line_items** | [**List[BillingLineItem]**](BillingLineItem.md) | Pending usage line items. May be empty. | + +## Example + +```python +from corellium.models.billing_summary_pending_usage_based import BillingSummaryPendingUsageBased + +# TODO update the JSON string below +json = "{}" +# create an instance of BillingSummaryPendingUsageBased from a JSON string +billing_summary_pending_usage_based_instance = BillingSummaryPendingUsageBased.from_json(json) +# print the JSON string representation of the object +print(BillingSummaryPendingUsageBased.to_json()) + +# convert the object into a dict +billing_summary_pending_usage_based_dict = billing_summary_pending_usage_based_instance.to_dict() +# create an instance of BillingSummaryPendingUsageBased from a dict +billing_summary_pending_usage_based_from_dict = BillingSummaryPendingUsageBased.from_dict(billing_summary_pending_usage_based_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Bit.md b/docs/Bit.md index 83a2692..0ffd468 100644 --- a/docs/Bit.md +++ b/docs/Bit.md @@ -2,9 +2,11 @@ Bit value -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +## Enum + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BtraceEnableOptions.md b/docs/BtraceEnableOptions.md index b343cc0..8c1d9bf 100644 --- a/docs/BtraceEnableOptions.md +++ b/docs/BtraceEnableOptions.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ranges** | **list[list[str]]** | | [optional] +**ranges** | **List[List[str]]** | | [optional] + +## Example + +```python +from corellium.models.btrace_enable_options import BtraceEnableOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of BtraceEnableOptions from a JSON string +btrace_enable_options_instance = BtraceEnableOptions.from_json(json) +# print the JSON string representation of the object +print(BtraceEnableOptions.to_json()) +# convert the object into a dict +btrace_enable_options_dict = btrace_enable_options_instance.to_dict() +# create an instance of BtraceEnableOptions from a dict +btrace_enable_options_from_dict = BtraceEnableOptions.from_dict(btrace_enable_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Button.md b/docs/Button.md index 0d484a0..682c98e 100644 --- a/docs/Button.md +++ b/docs/Button.md @@ -2,9 +2,21 @@ Button definition -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +## Enum + +* `FINGER` (value: `'finger'`) + +* `HOMEBUTTON` (value: `'homeButton'`) + +* `HOLDBUTTON` (value: `'holdButton'`) + +* `VOLUMEUP` (value: `'volumeUp'`) + +* `VOLUMEDOWN` (value: `'volumeDown'`) + +* `BACKBUTTON` (value: `'backButton'`) + +* `OVERVIEWBUTTON` (value: `'overviewButton'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CancelSubscriptionBody.md b/docs/CancelSubscriptionBody.md new file mode 100644 index 0000000..fc7aea8 --- /dev/null +++ b/docs/CancelSubscriptionBody.md @@ -0,0 +1,30 @@ +# CancelSubscriptionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_id** | **str** | Domain to cancel (defaults to the caller domain). | [optional] +**delete_domain** | **bool** | Delete the domain as part of cancellation. | [optional] + +## Example + +```python +from corellium.models.cancel_subscription_body import CancelSubscriptionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CancelSubscriptionBody from a JSON string +cancel_subscription_body_instance = CancelSubscriptionBody.from_json(json) +# print the JSON string representation of the object +print(CancelSubscriptionBody.to_json()) + +# convert the object into a dict +cancel_subscription_body_dict = cancel_subscription_body_instance.to_dict() +# create an instance of CancelSubscriptionBody from a dict +cancel_subscription_body_from_dict = CancelSubscriptionBody.from_dict(cancel_subscription_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChangePasswordBody.md b/docs/ChangePasswordBody.md new file mode 100644 index 0000000..6ae0d6a --- /dev/null +++ b/docs/ChangePasswordBody.md @@ -0,0 +1,31 @@ +# ChangePasswordBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | **str** | User identifier. | +**old_password** | **str** | Current password. | +**new_password** | **str** | New password. | + +## Example + +```python +from corellium.models.change_password_body import ChangePasswordBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ChangePasswordBody from a JSON string +change_password_body_instance = ChangePasswordBody.from_json(json) +# print the JSON string representation of the object +print(ChangePasswordBody.to_json()) + +# convert the object into a dict +change_password_body_dict = change_password_body_instance.to_dict() +# create an instance of ChangePasswordBody from a dict +change_password_body_from_dict = ChangePasswordBody.from_dict(change_password_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CharmTag.md b/docs/CharmTag.md new file mode 100644 index 0000000..07baa28 --- /dev/null +++ b/docs/CharmTag.md @@ -0,0 +1,31 @@ +# CharmTag + +A valid charm boot tag. + +## Enum + +* `KALLOC` (value: `'kalloc'`) + +* `GPU` (value: `'gpu'`) + +* `NO_MINUS_KEYBOARD` (value: `'no-keyboard'`) + +* `NODEVMODE` (value: `'nodevmode'`) + +* `SEP_MINUS_CONS_MINUS_EXT` (value: `'sep-cons-ext'`) + +* `IBOOT_MINUS_JAILBREAK` (value: `'iboot-jailbreak'`) + +* `LLB_MINUS_JAILBREAK` (value: `'llb-jailbreak'`) + +* `ROM_MINUS_JAILBREAK` (value: `'rom-jailbreak'`) + +* `NOAPPASLR` (value: `'noappaslr'`) + +* `NODYLDASLR` (value: `'nodyldaslr'`) + +* `OBJDETECT` (value: `'objdetect'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckSubdomainResponse.md b/docs/CheckSubdomainResponse.md index c6c7db7..337af6b 100644 --- a/docs/CheckSubdomainResponse.md +++ b/docs/CheckSubdomainResponse.md @@ -1,12 +1,29 @@ # CheckSubdomainResponse - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**available** | **bool** | Indicates whether the subdomain is available or not | +**available** | **bool** | Whether the subdomain is available. | + +## Example + +```python +from corellium.models.check_subdomain_response import CheckSubdomainResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckSubdomainResponse from a JSON string +check_subdomain_response_instance = CheckSubdomainResponse.from_json(json) +# print the JSON string representation of the object +print(CheckSubdomainResponse.to_json()) +# convert the object into a dict +check_subdomain_response_dict = check_subdomain_response_instance.to_dict() +# create an instance of CheckSubdomainResponse from a dict +check_subdomain_response_from_dict = CheckSubdomainResponse.from_dict(check_subdomain_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CheckSubdomainResponseV1.md b/docs/CheckSubdomainResponseV1.md new file mode 100644 index 0000000..c235196 --- /dev/null +++ b/docs/CheckSubdomainResponseV1.md @@ -0,0 +1,30 @@ +# CheckSubdomainResponseV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **bool** | Indicates whether the subdomain is available or not | + +## Example + +```python +from corellium.models.check_subdomain_response_v1 import CheckSubdomainResponseV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of CheckSubdomainResponseV1 from a JSON string +check_subdomain_response_v1_instance = CheckSubdomainResponseV1.from_json(json) +# print the JSON string representation of the object +print(CheckSubdomainResponseV1.to_json()) + +# convert the object into a dict +check_subdomain_response_v1_dict = check_subdomain_response_v1_instance.to_dict() +# create an instance of CheckSubdomainResponseV1 from a dict +check_subdomain_response_v1_from_dict = CheckSubdomainResponseV1.from_dict(check_subdomain_response_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CloudNotificationItem.md b/docs/CloudNotificationItem.md new file mode 100644 index 0000000..d9e43ac --- /dev/null +++ b/docs/CloudNotificationItem.md @@ -0,0 +1,38 @@ +# CloudNotificationItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Notification identifier. | +**admin_only** | **bool** | Whether the notification is admin-only. | +**quiet** | **bool** | Whether the notification is quiet. | +**scope** | **str** | Notification scope. | +**level** | **float** | Alert level. | +**title** | **str** | Notification title. | +**message** | **str** | Notification message. | +**metadata** | **Dict[str, Optional[object]]** | Additional metadata. | +**created_at** | **datetime** | ISO timestamp of creation. | +**updated_at** | **datetime** | ISO timestamp of last update. | + +## Example + +```python +from corellium.models.cloud_notification_item import CloudNotificationItem + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudNotificationItem from a JSON string +cloud_notification_item_instance = CloudNotificationItem.from_json(json) +# print the JSON string representation of the object +print(CloudNotificationItem.to_json()) + +# convert the object into a dict +cloud_notification_item_dict = cloud_notification_item_instance.to_dict() +# create an instance of CloudNotificationItem from a dict +cloud_notification_item_from_dict = CloudNotificationItem.from_dict(cloud_notification_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CloudNotificationList.md b/docs/CloudNotificationList.md new file mode 100644 index 0000000..fa70f8e --- /dev/null +++ b/docs/CloudNotificationList.md @@ -0,0 +1,34 @@ +# CloudNotificationList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[CloudNotificationItem]**](CloudNotificationItem.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.cloud_notification_list import CloudNotificationList + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudNotificationList from a JSON string +cloud_notification_list_instance = CloudNotificationList.from_json(json) +# print the JSON string representation of the object +print(CloudNotificationList.to_json()) + +# convert the object into a dict +cloud_notification_list_dict = cloud_notification_list_instance.to_dict() +# create an instance of CloudNotificationList from a dict +cloud_notification_list_from_dict = CloudNotificationList.from_dict(cloud_notification_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterAdministrationConfigApi.md b/docs/ClusterAdministrationConfigApi.md new file mode 100644 index 0000000..8776a59 --- /dev/null +++ b/docs/ClusterAdministrationConfigApi.md @@ -0,0 +1,188 @@ +# corellium.ClusterAdministrationConfigApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_get_cluster_config**](ClusterAdministrationConfigApi.md#v1_get_cluster_config) | **GET** /v1/cluster/config | Get cluster configuration +[**v1_patch_cluster_config**](ClusterAdministrationConfigApi.md#v1_patch_cluster_config) | **PATCH** /v1/cluster/config | Update cluster configuration + + +# **v1_get_cluster_config** +> object v1_get_cluster_config() + +Get cluster configuration + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationConfigApi(api_client) + + try: + # Get cluster configuration + api_response = api_instance.v1_get_cluster_config() + print("The response of ClusterAdministrationConfigApi->v1_get_cluster_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationConfigApi->v1_get_cluster_config: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_patch_cluster_config** +> v1_patch_cluster_config(patch_cluster_config_body) + +Update cluster configuration + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.patch_cluster_config_body import PatchClusterConfigBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationConfigApi(api_client) + patch_cluster_config_body = corellium.PatchClusterConfigBody() # PatchClusterConfigBody | Cluster Configuration Payload + + try: + # Update cluster configuration + api_instance.v1_patch_cluster_config(patch_cluster_config_body) + except Exception as e: + print("Exception when calling ClusterAdministrationConfigApi->v1_patch_cluster_config: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **patch_cluster_config_body** | [**PatchClusterConfigBody**](PatchClusterConfigBody.md)| Cluster Configuration Payload | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ClusterAdministrationFirmwareServiceApi.md b/docs/ClusterAdministrationFirmwareServiceApi.md new file mode 100644 index 0000000..6dd328f --- /dev/null +++ b/docs/ClusterAdministrationFirmwareServiceApi.md @@ -0,0 +1,1251 @@ +# corellium.ClusterAdministrationFirmwareServiceApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_create_assets_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_create_assets_firmware_service) | **POST** /v1/cluster/firmware-service/firmware-assets | Add firmware assets via the firmware service +[**v1_create_image**](ClusterAdministrationFirmwareServiceApi.md#v1_create_image) | **POST** /v1/images | Create a new Image +[**v1_delete_asset_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_delete_asset_firmware_service) | **DELETE** /v1/cluster/firmware-service/firmware-assets/{assetURL} | Delete a firmware asset by its URL +[**v1_delete_firmware_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_delete_firmware_firmware_service) | **DELETE** /v1/cluster/firmware-service/firmwares/{filename} | Delete a firmware by filename from the firmware service +[**v1_get_asset_extended_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_get_asset_extended_firmware_service) | **GET** /v1/cluster/firmware-service/firmware-assets/{assetURL}/extended | Fetch extended firmware-asset details including instances and associated IPSWs +[**v1_get_config_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_get_config_firmware_service) | **GET** /v1/cluster/firmware-service/config | Fetch firmware service configuration +[**v1_get_install_firmware_status**](ClusterAdministrationFirmwareServiceApi.md#v1_get_install_firmware_status) | **GET** /v1/images/install-firmware/{taskId} | Query install firmware request status. +[**v1_install_firmware**](ClusterAdministrationFirmwareServiceApi.md#v1_install_firmware) | **POST** /v1/images/install-firmware | Installs a firmware for cluster-wide use +[**v1_install_firmware_assets**](ClusterAdministrationFirmwareServiceApi.md#v1_install_firmware_assets) | **POST** /v1/images/install-firmware-assets | Installs firmware assets for cluster-wide use +[**v1_list_assets_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_list_assets_firmware_service) | **GET** /v1/cluster/firmware-service/firmware-assets | Fetch firmware assets from the firmware service +[**v1_list_devices_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_list_devices_firmware_service) | **GET** /v1/cluster/firmware-service/devices | Fetch devices from the firmware service +[**v1_list_firmwares_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_list_firmwares_firmware_service) | **GET** /v1/cluster/firmware-service/firmwares | Fetch firmwares from the firmware service +[**v1_patch_config_firmware_service**](ClusterAdministrationFirmwareServiceApi.md#v1_patch_config_firmware_service) | **PATCH** /v1/cluster/firmware-service/config | Update firmware service configuration +[**v1_upload_image_data**](ClusterAdministrationFirmwareServiceApi.md#v1_upload_image_data) | **POST** /v1/images/{imageId} | Upload Image Data + + +# **v1_create_assets_firmware_service** +> str v1_create_assets_firmware_service(body) + +Add firmware assets via the firmware service + +Proxies a request to the firmware service to add firmware assets. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + body = { + "https://wkms-public.apple.com/fcs-keys/0-rpBmpVnBmLtxdIwb97a_jAodE52Gv8Al_CN8DdwzQ=": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0hBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEJHMHdhd0lCQVFRZ1plQ25uTW5CZEx3RkM1K2EKUU9ITGswQ1Z1aGJHWE1kUlBiekJOMTREOWp1aFJBTkNBQVRLT3NyZUc4VG1XbExTeU1KUnBSWTA2N1NudFhmZgpkakhWenQwN1ZZVm1wZ1dGZEJGUERGTFdiQkYrYlpQeGRJVW14dzFMN3NlMEUrdE1DcTk4bkEyMQotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==", + "https://wkms-public.apple.com/fcs-keys/09QNzDMRwGnqUMjbRQcsH7sHx2GJUub-NmLLpIsd8Yc=": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0hBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEJHMHdhd0lCQVFRZ0QyeTRzZE1QNXE2eHZ4NTIKMFNqaCt1S0JkcWVTRlF2T083Rm9PaHg1RHZxaFJBTkNBQVRLbEMvdXhKa3Q4d0FhS1Fzd3paeVJ4WWVTN0pOVAowRlFsS0w3S0hZb1k0U1FWekZWNTBkQkhGeGRVMHVaeGN3Rk9MaW1MTVZZaHBtREQ0enFpZGtPeAotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==" +} # object | Firmware assets payload + + try: + # Add firmware assets via the firmware service + api_response = api_instance.v1_create_assets_firmware_service(body) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_create_assets_firmware_service:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_create_assets_firmware_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **object**| Firmware assets payload | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: text/html, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_create_image** +> ImageV1 v1_create_image(image_creation_options) + +Create a new Image + +Create a new Image. Accepts multipart/form-data (with optional file upload) or application/json (metadata only). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.image_creation_options import ImageCreationOptions +from corellium.models.image_v1 import ImageV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + image_creation_options = { + "name": "test", + "type": "kernel", + "encoding": "plain", + "file": (binary) +} # ImageCreationOptions | Image data + + try: + # Create a new Image + api_response = api_instance.v1_create_image(image_creation_options) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_create_image:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_create_image: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_creation_options** | [**ImageCreationOptions**](ImageCreationOptions.md)| Image data | + +### Return type + +[**ImageV1**](ImageV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**201** | application/json | - | +**404** | application/json | - | +**507** | Insufficient Storage | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_asset_firmware_service** +> v1_delete_asset_firmware_service(asset_url) + +Delete a firmware asset by its URL + +Proxies a request to the firmware service to delete a firmware asset by URL. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + asset_url = 'asset_url_example' # str | The raw firmware asset URL. Percent-encode it once when composing the request path by hand. + + try: + # Delete a firmware asset by its URL + api_instance.v1_delete_asset_firmware_service(asset_url) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_delete_asset_firmware_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset_url** | **str**| The raw firmware asset URL. Percent-encode it once when composing the request path by hand. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_firmware_firmware_service** +> v1_delete_firmware_firmware_service(filename) + +Delete a firmware by filename from the firmware service + +Proxies a request to the firmware service to delete a firmware by filename. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + filename = 'filename_example' # str | The filename of the firmware to delete + + try: + # Delete a firmware by filename from the firmware service + api_instance.v1_delete_firmware_firmware_service(filename) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_delete_firmware_firmware_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filename** | **str**| The filename of the firmware to delete | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**409** | Conflict | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_asset_extended_firmware_service** +> ExtendedFirmwareAssetInfoV1 v1_get_asset_extended_firmware_service(asset_url) + +Fetch extended firmware-asset details including instances and associated IPSWs + +Retrieves extended information about a firmware including all instances using it and associated firmware assets. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extended_firmware_asset_info_v1 import ExtendedFirmwareAssetInfoV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + asset_url = 'asset_url_example' # str | The raw firmware asset URL. Percent-encode it once when composing the request path by hand. + + try: + # Fetch extended firmware-asset details including instances and associated IPSWs + api_response = api_instance.v1_get_asset_extended_firmware_service(asset_url) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_get_asset_extended_firmware_service:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_get_asset_extended_firmware_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset_url** | **str**| The raw firmware asset URL. Percent-encode it once when composing the request path by hand. | + +### Return type + +[**ExtendedFirmwareAssetInfoV1**](ExtendedFirmwareAssetInfoV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_config_firmware_service** +> v1_get_config_firmware_service() + +Fetch firmware service configuration + +Returns a firmware service configuration object + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + + try: + # Fetch firmware service configuration + api_instance.v1_get_config_firmware_service() + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_get_config_firmware_service: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_install_firmware_status** +> InstallFirmwareResponseV1 v1_get_install_firmware_status(task_id) + +Query install firmware request status. + +Returns the status of an install firmware request. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.install_firmware_response_v1 import InstallFirmwareResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + task_id = 'task_id_example' # str | Task ID - uuid + + try: + # Query install firmware request status. + api_response = api_instance.v1_get_install_firmware_status(task_id) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_get_install_firmware_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_get_install_firmware_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task_id** | **str**| Task ID - uuid | + +### Return type + +[**InstallFirmwareResponseV1**](InstallFirmwareResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_install_firmware** +> InstallFirmwareResponseV1 v1_install_firmware(install_firmware_body_v1) + +Installs a firmware for cluster-wide use + +Takes an uploaded firmware image and installs it for cluster-wide use. The firmware is then removed from Images. + +In order to install a firmware, you need to follow a 4-step process. +First, POST /v1/images/ with { name: string, type: 'fw' } using content-type application/json to acquire an imageId. + +Second, upload the firmware file via a multipart/form-data POST to /v1/images/:imageId. + +Third, POST /v1/images/install-firmware with { imageId: string } using content-type application/json to acquire a taskId. + +Fourth, you can poll the state of the installation via GET /v1/images/install-firmware/:taskId. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.install_firmware_body_v1 import InstallFirmwareBodyV1 +from corellium.models.install_firmware_response_v1 import InstallFirmwareResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + install_firmware_body_v1 = corellium.InstallFirmwareBodyV1() # InstallFirmwareBodyV1 | User data + + try: + # Installs a firmware for cluster-wide use + api_response = api_instance.v1_install_firmware(install_firmware_body_v1) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_install_firmware:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_install_firmware: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **install_firmware_body_v1** | [**InstallFirmwareBodyV1**](InstallFirmwareBodyV1.md)| User data | + +### Return type + +[**InstallFirmwareResponseV1**](InstallFirmwareResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | application/json | - | +**400** | Bad Request | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_install_firmware_assets** +> InstallFirmwareAssetsResponseV1 v1_install_firmware_assets(install_firmware_assets_body_v1) + +Installs firmware assets for cluster-wide use + +Takes an uploaded firmware assets blob image and installs it for cluster-wide use. The image is then removed from Images. + +This endpoint is synchronous: it forwards the asset JSON to the firmware service and returns the firmware service's response message directly. There is no task ID and no polling endpoint. + +Installing firmware assets is a 3-step process. +First, POST /v1/images/ with { name: string, type: 'fwasset' } using content-type application/json to acquire an imageId. +name should be something like 'fcs-keys.json' + +Second, upload the firmware assets file via a multipart/form-data POST to /v1/images/:imageId. + +Third, POST /v1/images/install-firmware-assets with { imageId: string; } using content-type application/json. The response body is `{ message: string }` describing what the firmware service did with the assets. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.install_firmware_assets_body_v1 import InstallFirmwareAssetsBodyV1 +from corellium.models.install_firmware_assets_response_v1 import InstallFirmwareAssetsResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + install_firmware_assets_body_v1 = corellium.InstallFirmwareAssetsBodyV1() # InstallFirmwareAssetsBodyV1 | User data + + try: + # Installs firmware assets for cluster-wide use + api_response = api_instance.v1_install_firmware_assets(install_firmware_assets_body_v1) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_install_firmware_assets:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_install_firmware_assets: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **install_firmware_assets_body_v1** | [**InstallFirmwareAssetsBodyV1**](InstallFirmwareAssetsBodyV1.md)| User data | + +### Return type + +[**InstallFirmwareAssetsResponseV1**](InstallFirmwareAssetsResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | application/json | - | +**400** | Bad Request | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_assets_firmware_service** +> List[FirmwareAssetV1] v1_list_assets_firmware_service(limit=limit, offset=offset, order=order, search=search) + +Fetch firmware assets from the firmware service + +Proxies a request to the firmware service to retrieve a list of firmware assets. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_asset_v1 import FirmwareAssetV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + limit = 3.4 # float | Number of results to return (min: 1, max: 10000, default: 100) (optional) + offset = 3.4 # float | Index of the first row to return (default: 0) (optional) + order = 'order_example' # str | Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'url,-domain'). (optional) + search = 'search_example' # str | Case-insensitive partial match across url, domain (optional) + + try: + # Fetch firmware assets from the firmware service + api_response = api_instance.v1_list_assets_firmware_service(limit=limit, offset=offset, order=order, search=search) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_list_assets_firmware_service:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_list_assets_firmware_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Number of results to return (min: 1, max: 10000, default: 100) | [optional] + **offset** | **float**| Index of the first row to return (default: 0) | [optional] + **order** | **str**| Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'url,-domain'). | [optional] + **search** | **str**| Case-insensitive partial match across url, domain | [optional] + +### Return type + +[**List[FirmwareAssetV1]**](FirmwareAssetV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_devices_firmware_service** +> List[Device] v1_list_devices_firmware_service(limit=limit, offset=offset, search=search, order=order, type=type, model=model, name=name, platform=platform) + +Fetch devices from the firmware service + +Proxies a request to the firmware service to retrieve a list of devices. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.device import Device +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + limit = 3.4 # float | Number of results to return (min: 1, max: 10000, default: 100) (optional) + offset = 3.4 # float | Index of the first row to return (default: 0) (optional) + search = 'search_example' # str | Case-insensitive partial match across name, model, platform, and hwmodel fields (optional) + order = 'order_example' # str | Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: (optional) + type = 'type_example' # str | Filter by exact type. Example: coreimg (optional) + model = 'model_example' # str | Filter by exact model. Example: Example: iPhone8,1 (optional) + name = 'name_example' # str | Filter by exact name. Example: iPhone6s (optional) + platform = 'platform_example' # str | Filter by exact platform. Example: s5l8960x (optional) + + try: + # Fetch devices from the firmware service + api_response = api_instance.v1_list_devices_firmware_service(limit=limit, offset=offset, search=search, order=order, type=type, model=model, name=name, platform=platform) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_list_devices_firmware_service:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_list_devices_firmware_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Number of results to return (min: 1, max: 10000, default: 100) | [optional] + **offset** | **float**| Index of the first row to return (default: 0) | [optional] + **search** | **str**| Case-insensitive partial match across name, model, platform, and hwmodel fields | [optional] + **order** | **str**| Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: | [optional] + **type** | **str**| Filter by exact type. Example: coreimg | [optional] + **model** | **str**| Filter by exact model. Example: Example: iPhone8,1 | [optional] + **name** | **str**| Filter by exact name. Example: iPhone6s | [optional] + **platform** | **str**| Filter by exact platform. Example: s5l8960x | [optional] + +### Return type + +[**List[Device]**](Device.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_firmwares_firmware_service** +> List[FirmwareV1] v1_list_firmwares_firmware_service(limit=limit, offset=offset, search=search, order=order, filename=filename, model=model, type=type, version=version, buildid=buildid, firmware_assets=firmware_assets, installed=installed) + +Fetch firmwares from the firmware service + +Proxies a request to the firmware service to retrieve a list of firmwares. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_v1 import FirmwareV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + limit = 3.4 # float | Number of results to return (min: 1, max: 10000, default: 100) (optional) + offset = 3.4 # float | Index of the first row to return (default: 0) (optional) + search = 'search_example' # str | Case-insensitive partial match across filename, model, type, version and buildid fields (optional) + order = 'order_example' # str | Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: (optional) + filename = 'filename_example' # str | Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw (optional) + model = 'model_example' # str | Filter by exact model. Example: iPhone10,4 (optional) + type = 'type_example' # str | Filter by exact type. Example: ipsw (optional) + version = 'version_example' # str | Filter by exact version. Example: 12.1.4 (optional) + buildid = 'buildid_example' # str | Filter by exact buildid. Example: 16D57 (optional) + firmware_assets = 'firmware_assets_example' # str | Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= (optional) + installed = True # bool | Filter by installed status (optional) + + try: + # Fetch firmwares from the firmware service + api_response = api_instance.v1_list_firmwares_firmware_service(limit=limit, offset=offset, search=search, order=order, filename=filename, model=model, type=type, version=version, buildid=buildid, firmware_assets=firmware_assets, installed=installed) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_list_firmwares_firmware_service:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_list_firmwares_firmware_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Number of results to return (min: 1, max: 10000, default: 100) | [optional] + **offset** | **float**| Index of the first row to return (default: 0) | [optional] + **search** | **str**| Case-insensitive partial match across filename, model, type, version and buildid fields | [optional] + **order** | **str**| Comma-separated field names for sorting. Prefix with '-' for descending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: | [optional] + **filename** | **str**| Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw | [optional] + **model** | **str**| Filter by exact model. Example: iPhone10,4 | [optional] + **type** | **str**| Filter by exact type. Example: ipsw | [optional] + **version** | **str**| Filter by exact version. Example: 12.1.4 | [optional] + **buildid** | **str**| Filter by exact buildid. Example: 16D57 | [optional] + **firmware_assets** | **str**| Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= | [optional] + **installed** | **bool**| Filter by installed status | [optional] + +### Return type + +[**List[FirmwareV1]**](FirmwareV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_patch_config_firmware_service** +> v1_patch_config_firmware_service(firmware_service_configuration) + +Update firmware service configuration + +Updates firmware service configuration + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_service_configuration import FirmwareServiceConfiguration +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + firmware_service_configuration = corellium.FirmwareServiceConfiguration() # FirmwareServiceConfiguration | Firmware configuration payload + + try: + # Update firmware service configuration + api_instance.v1_patch_config_firmware_service(firmware_service_configuration) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_patch_config_firmware_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **firmware_service_configuration** | [**FirmwareServiceConfiguration**](FirmwareServiceConfiguration.md)| Firmware configuration payload | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_upload_image_data** +> ImageV1 v1_upload_image_data(image_id, corellium_checksum=corellium_checksum, file=file) + +Upload Image Data + +If the active project has enough remaining quota, updates an Image with the contents of the request body. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.image_v1 import ImageV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationFirmwareServiceApi(api_client) + image_id = 'image_id_example' # str | Image ID - uuid + corellium_checksum = 'corellium_checksum_example' # str | Corellium Checksum of the uploaded firmware (optional) + file = None # bytearray | Optionally the actual file (optional) + + try: + # Upload Image Data + api_response = api_instance.v1_upload_image_data(image_id, corellium_checksum=corellium_checksum, file=file) + print("The response of ClusterAdministrationFirmwareServiceApi->v1_upload_image_data:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationFirmwareServiceApi->v1_upload_image_data: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| Image ID - uuid | + **corellium_checksum** | **str**| Corellium Checksum of the uploaded firmware | [optional] + **file** | **bytearray**| Optionally the actual file | [optional] + +### Return type + +[**ImageV1**](ImageV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**404** | application/json | - | +**409** | Conflict | - | +**507** | Insufficient Storage | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ClusterAdministrationNodesApi.md b/docs/ClusterAdministrationNodesApi.md new file mode 100644 index 0000000..073d2ad --- /dev/null +++ b/docs/ClusterAdministrationNodesApi.md @@ -0,0 +1,275 @@ +# corellium.ClusterAdministrationNodesApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_get_cluster_nodes**](ClusterAdministrationNodesApi.md#v1_get_cluster_nodes) | **GET** /v1/cluster/nodes/{nodeId} | Get node details by ID +[**v1_get_console_cluster_nodes**](ClusterAdministrationNodesApi.md#v1_get_console_cluster_nodes) | **GET** /v1/cluster/nodes/{nodeId}/console | Access node console via SSH +[**v1_list_cluster_nodes**](ClusterAdministrationNodesApi.md#v1_list_cluster_nodes) | **GET** /v1/cluster/nodes | List servers in the cluster + + +# **v1_get_cluster_nodes** +> NodeInformationV1 v1_get_cluster_nodes(node_id) + +Get node details by ID + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.node_information_v1 import NodeInformationV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationNodesApi(api_client) + node_id = 'node_id_example' # str | Node ID + + try: + # Get node details by ID + api_response = api_instance.v1_get_cluster_nodes(node_id) + print("The response of ClusterAdministrationNodesApi->v1_get_cluster_nodes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationNodesApi->v1_get_cluster_nodes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **node_id** | **str**| Node ID | + +### Return type + +[**NodeInformationV1**](NodeInformationV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | +**404** | Node not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_console_cluster_nodes** +> v1_get_console_cluster_nodes(node_id) + +Access node console via SSH + +Access node console via SSH (WebSocket upgrade) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationNodesApi(api_client) + node_id = 'node_id_example' # str | Node ID + + try: + # Access node console via SSH + api_instance.v1_get_console_cluster_nodes(node_id) + except Exception as e: + print("Exception when calling ClusterAdministrationNodesApi->v1_get_console_cluster_nodes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **node_id** | **str**| Node ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**101** | WebSocket connection upgraded | - | +**403** | Forbidden | - | +**404** | Node not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_cluster_nodes** +> List[NodeInformationV1] v1_list_cluster_nodes(limit=limit, offset=offset) + +List servers in the cluster + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.node_information_v1 import NodeInformationV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterAdministrationNodesApi(api_client) + limit = 3.4 # float | limit for pagination results, defaults to 100 (optional) + offset = 3.4 # float | offset for pagination results, defaults to 0 (optional) + + try: + # List servers in the cluster + api_response = api_instance.v1_list_cluster_nodes(limit=limit, offset=offset) + print("The response of ClusterAdministrationNodesApi->v1_list_cluster_nodes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterAdministrationNodesApi->v1_list_cluster_nodes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| limit for pagination results, defaults to 100 | [optional] + **offset** | **float**| offset for pagination results, defaults to 0 | [optional] + +### Return type + +[**List[NodeInformationV1]**](NodeInformationV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ClusterApi.md b/docs/ClusterApi.md new file mode 100644 index 0000000..22b8fac --- /dev/null +++ b/docs/ClusterApi.md @@ -0,0 +1,727 @@ +# corellium.ClusterApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_delete_cluster_snapshot**](ClusterApi.md#v3_delete_cluster_snapshot) | **DELETE** /v3/cluster/snapshots/{snapshotId} | Delete cluster snapshot +[**v3_get_cluster_config**](ClusterApi.md#v3_get_cluster_config) | **GET** /v3/cluster/config | Get cluster configuration +[**v3_get_cluster_node**](ClusterApi.md#v3_get_cluster_node) | **GET** /v3/cluster/nodes/{nodeId} | Get cluster node +[**v3_get_cluster_node_console**](ClusterApi.md#v3_get_cluster_node_console) | **GET** /v3/cluster/nodes/{nodeId}/console | Get node console websocket URL +[**v3_get_cluster_snapshot**](ClusterApi.md#v3_get_cluster_snapshot) | **GET** /v3/cluster/snapshots/{snapshotId} | Get cluster snapshot +[**v3_list_cluster_nodes**](ClusterApi.md#v3_list_cluster_nodes) | **GET** /v3/cluster/nodes | List cluster nodes +[**v3_list_cluster_snapshots**](ClusterApi.md#v3_list_cluster_snapshots) | **GET** /v3/cluster/snapshots | List cluster snapshots +[**v3_patch_cluster_config**](ClusterApi.md#v3_patch_cluster_config) | **PATCH** /v3/cluster/config | Update cluster configuration + + +# **v3_delete_cluster_snapshot** +> v3_delete_cluster_snapshot(snapshot_id) + +Delete cluster snapshot + +**Required role:** Cluster administrator. + +Deletes a snapshot from the cluster, for example to free storage. Snapshots that are in use, still being created, or were just restored cannot be deleted (400). Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). + +Deletes are idempotent: an unknown `snapshotId`, or a snapshot that was already deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterApi(api_client) + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + + try: + # Delete cluster snapshot + api_instance.v3_delete_cluster_snapshot(snapshot_id) + except Exception as e: + print("Exception when calling ClusterApi->v3_delete_cluster_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Snapshot deleted. | - | +**400** | Snapshot cannot be deleted (in use, still creating, or freshly restored). | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. The clusterSnapshotMgmt feature must be enabled. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_cluster_config** +> ClusterConfig v3_get_cluster_config() + +Get cluster configuration + +**Required role:** Cluster administrator. + +Returns the settings that apply to the whole cluster. Requires a cluster administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.cluster_config import ClusterConfig +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterApi(api_client) + + try: + # Get cluster configuration + api_response = api_instance.v3_get_cluster_config() + print("The response of ClusterApi->v3_get_cluster_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterApi->v3_get_cluster_config: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ClusterConfig**](ClusterConfig.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cluster configuration object. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_cluster_node** +> NodeInformation v3_get_cluster_node(node_id) + +Get cluster node + +**Required role:** Cluster administrator. + +Returns details for one server (node) in the cluster, identified by the ID from `v3ListClusterNodes`. Requires a cluster administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.node_information import NodeInformation +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterApi(api_client) + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s' # str | Node identifier. + + try: + # Get cluster node + api_response = api_instance.v3_get_cluster_node(node_id) + print("The response of ClusterApi->v3_get_cluster_node:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterApi->v3_get_cluster_node: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **node_id** | **str**| Node identifier. | + +### Return type + +[**NodeInformation**](NodeInformation.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Node details. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Node not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_cluster_node_console** +> NodeConsoleEndpoint v3_get_cluster_node_console(node_id) + +Get node console websocket URL + +**Required role:** Cluster administrator. + +Returns a WebSocket URL for a terminal session on one cluster server (node), for maintenance and troubleshooting. Open the URL with a WebSocket client to get the console stream. Requires a cluster administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.node_console_endpoint import NodeConsoleEndpoint +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterApi(api_client) + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s' # str | Node identifier. + + try: + # Get node console websocket URL + api_response = api_instance.v3_get_cluster_node_console(node_id) + print("The response of ClusterApi->v3_get_cluster_node_console:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterApi->v3_get_cluster_node_console: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **node_id** | **str**| Node identifier. | + +### Return type + +[**NodeConsoleEndpoint**](NodeConsoleEndpoint.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Console WebSocket URL. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Node not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_cluster_snapshot** +> ClusterSnapshot v3_get_cluster_snapshot(snapshot_id) + +Get cluster snapshot + +**Required role:** Cluster administrator. + +Returns one snapshot from the cluster-wide list. Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.cluster_snapshot import ClusterSnapshot +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterApi(api_client) + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + + try: + # Get cluster snapshot + api_response = api_instance.v3_get_cluster_snapshot(snapshot_id) + print("The response of ClusterApi->v3_get_cluster_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterApi->v3_get_cluster_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot identifier. | + +### Return type + +[**ClusterSnapshot**](ClusterSnapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Cluster snapshot details. | - | +**400** | Invalid snapshot ID. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. The clusterSnapshotMgmt feature must be enabled. | - | +**404** | Snapshot not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_cluster_nodes** +> NodeList v3_list_cluster_nodes(limit=limit, offset=offset) + +List cluster nodes + +**Required role:** Cluster administrator. + +Lists the servers (nodes) that make up this Corellium cluster, with their status and resources. Use it to check cluster health or find a node before opening its console. Requires a cluster administrator. Results are paginated. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.node_list import NodeList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List cluster nodes + api_response = api_instance.v3_list_cluster_nodes(limit=limit, offset=offset) + print("The response of ClusterApi->v3_list_cluster_nodes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterApi->v3_list_cluster_nodes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**NodeList**](NodeList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of cluster nodes. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_cluster_snapshots** +> ClusterSnapshotList v3_list_cluster_snapshots(limit=limit, offset=offset, springboard=springboard, live=live, fresh=fresh, device_name=device_name, task=task, search=search, to=to, var_from=var_from, order_by=order_by) + +List cluster snapshots + +**Required role:** Cluster administrator. + +Lists device snapshots across the whole cluster, for administrators managing storage. Requires a cluster administrator and the cluster snapshot management feature (`clusterSnapshotMgmt`). Results are paginated. For one device's snapshots, use `GET /v3/instances/{instanceId}/snapshots` instead. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.cluster_snapshot_list import ClusterSnapshotList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterApi(api_client) + limit = 100 # float | Number of entries to return. (optional) (default to 100) + offset = 0 # float | Number of rows to skip. (optional) (default to 0) + springboard = 'true' # str | Filter by springboard snapshot flag. (optional) + live = 'true' # str | Filter by live snapshot flag. (optional) + fresh = 'false' # str | Filter by fresh snapshot flag. (optional) + device_name = 'iPhone 13 Pro' # str | Filter by device name. (optional) + task = 'creating' # str | Filter by task being executed on the snapshot. (optional) + search = 'pre-update' # str | Fuzzy search on snapshot and instance name or ID. (optional) + to = '2026-05-22T13:58:34Z' # datetime | Filter to this date (based on createdAt). (optional) + var_from = '2026-05-22T00:00Z' # datetime | Filter from this date (based on createdAt). (optional) + order_by = -createdAt # str | Sort field and direction. (optional) (default to -createdAt) + + try: + # List cluster snapshots + api_response = api_instance.v3_list_cluster_snapshots(limit=limit, offset=offset, springboard=springboard, live=live, fresh=fresh, device_name=device_name, task=task, search=search, to=to, var_from=var_from, order_by=order_by) + print("The response of ClusterApi->v3_list_cluster_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterApi->v3_list_cluster_snapshots: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Number of entries to return. | [optional] [default to 100] + **offset** | **float**| Number of rows to skip. | [optional] [default to 0] + **springboard** | **str**| Filter by springboard snapshot flag. | [optional] + **live** | **str**| Filter by live snapshot flag. | [optional] + **fresh** | **str**| Filter by fresh snapshot flag. | [optional] + **device_name** | **str**| Filter by device name. | [optional] + **task** | **str**| Filter by task being executed on the snapshot. | [optional] + **search** | **str**| Fuzzy search on snapshot and instance name or ID. | [optional] + **to** | **datetime**| Filter to this date (based on createdAt). | [optional] + **var_from** | **datetime**| Filter from this date (based on createdAt). | [optional] + **order_by** | **str**| Sort field and direction. | [optional] [default to -createdAt] + +### Return type + +[**ClusterSnapshotList**](ClusterSnapshotList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of cluster snapshots. | - | +**400** | Invalid query parameter(s). | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. The clusterSnapshotMgmt feature must be enabled. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_cluster_config** +> v3_patch_cluster_config(patch_cluster_config_body=patch_cluster_config_body) + +Update cluster configuration + +**Required role:** Cluster administrator. + +Changes cluster-wide settings and applies them on every controller node. Send only the settings you want to change. Requires a cluster administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.patch_cluster_config_body import PatchClusterConfigBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterApi(api_client) + patch_cluster_config_body = corellium.PatchClusterConfigBody() # PatchClusterConfigBody | (optional) + + try: + # Update cluster configuration + api_instance.v3_patch_cluster_config(patch_cluster_config_body=patch_cluster_config_body) + except Exception as e: + print("Exception when calling ClusterApi->v3_patch_cluster_config: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **patch_cluster_config_body** | [**PatchClusterConfigBody**](PatchClusterConfigBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Configuration updated successfully. | - | +**400** | Invalid request body. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**500** | Configuration update failed on one or more nodes. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ClusterConfig.md b/docs/ClusterConfig.md new file mode 100644 index 0000000..509e158 --- /dev/null +++ b/docs/ClusterConfig.md @@ -0,0 +1,99 @@ +# ClusterConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**last_config_keys** | **List[str]** | | +**local_ip** | **str** | | +**ip_block_netmask** | **str** | | +**instance_gateway** | **str** | | +**instance_dns_servers** | **List[str]** | | [optional] +**coordinator** | **str** | | [optional] +**on_site** | **bool** | | [optional] +**cloud_provider** | **str** | | +**network_types** | **List[str]** | | +**network_type** | **str** | | [optional] +**show_domain_settings** | **bool** | | [optional] +**version** | **str** | | [optional] +**ipsw_url** | **str** | | [optional] +**coreimg_url** | **str** | | [optional] +**fw_service_url** | **str** | | [optional] +**service_password** | **str** | | [optional] +**invalid_build** | **bool** | | [optional] +**sep_sim** | **bool** | | [optional] +**installer_available** | **bool** | | [optional] +**stripe** | [**ClusterConfigStripe**](ClusterConfigStripe.md) | | [optional] +**intercom_id** | **str** | | [optional] +**aux_webhook** | **str** | | [optional] +**gtm_id** | **str** | | [optional] +**zapier_feedback_webhook** | **str** | | [optional] +**zapier_bugs_webhook** | **str** | | [optional] +**billing_backend** | **str** | | [optional] +**maintenance** | [**ClusterConfigMaintenance**](ClusterConfigMaintenance.md) | | [optional] +**cloud_domain** | **str** | | [optional] +**development** | **bool** | | [optional] +**billing_domain** | **str** | | [optional] +**app_domain** | **str** | | [optional] +**enable_firmware_image_upload** | **bool** | | [optional] +**net_mon_ca** | [**ClusterConfigNetMonCA**](ClusterConfigNetMonCA.md) | | [optional] +**snapshot_limit** | **float** | | [optional] +**max_kernel_size** | **float** | | +**max_ramdisk_size** | **float** | | +**charm_sdk** | **bool** | | [optional] +**sentry_url** | **str** | | [optional] +**remote_gpu** | **bool** | | [optional] +**rate_limit** | **bool** | | [optional] +**cert_file_data** | **str** | | [optional] +**ca_cert_file_src** | **str** | | +**vstrm_on_compute_nodes** | **bool** | | [optional] +**charm** | **Dict[str, Optional[object]]** | | [optional] +**c3po_path_prefix** | **str** | | [optional] +**branding** | **str** | | +**open_g_apps_binary** | **str** | | +**airgapped** | **bool** | | +**node_stale_timeout** | **float** | | [optional] +**report_interval** | **float** | | [optional] +**coordinator_config** | [**ClusterConfigCoordinatorConfig**](ClusterConfigCoordinatorConfig.md) | | [optional] +**setup_config** | [**ClusterConfigSetupConfig**](ClusterConfigSetupConfig.md) | | [optional] +**node_specific_config** | [**ClusterConfigNodeSpecificConfig**](ClusterConfigNodeSpecificConfig.md) | | [optional] +**package_config** | [**ClusterConfigPackageConfig**](ClusterConfigPackageConfig.md) | | [optional] +**monitor_interval** | **float** | | [optional] +**csp** | **bool** | | [optional] +**cdk** | **bool** | | [optional] +**charm_extension_paths** | **List[str]** | | [optional] +**firmware_cache** | **str** | | [optional] +**vstrm** | **str** | | [optional] +**console** | **str** | | [optional] +**fetch_firmware_assets** | **bool** | | [optional] +**cluster_firmware_assets** | **bool** | | [optional] +**auth_providers** | [**List[ClusterConfigCoordinatorConfigAuthProvidersInner]**](ClusterConfigCoordinatorConfigAuthProvidersInner.md) | | [optional] +**domain** | **str** | | [optional] +**service_domain** | **str** | | [optional] +**service_user** | **str** | | [optional] +**domain_image_upload_quota** | **float** | | [optional] +**ipsw_filters** | [**List[ClusterConfigIpswFiltersInner]**](ClusterConfigIpswFiltersInner.md) | | [optional] +**firmware_service_config** | [**ClusterConfigFirmwareServiceConfig**](ClusterConfigFirmwareServiceConfig.md) | | [optional] +**ai_tools_config** | [**AiToolsConfig**](AiToolsConfig.md) | | + +## Example + +```python +from corellium.models.cluster_config import ClusterConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfig from a JSON string +cluster_config_instance = ClusterConfig.from_json(json) +# print the JSON string representation of the object +print(ClusterConfig.to_json()) + +# convert the object into a dict +cluster_config_dict = cluster_config_instance.to_dict() +# create an instance of ClusterConfig from a dict +cluster_config_from_dict = ClusterConfig.from_dict(cluster_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfig.md b/docs/ClusterConfigCoordinatorConfig.md new file mode 100644 index 0000000..5209238 --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfig.md @@ -0,0 +1,70 @@ +# ClusterConfigCoordinatorConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bind_host** | **str** | | +**bind_port** | **float** | | +**db_database** | **str** | | +**db_host** | **str** | | +**db_port** | **float** | | +**db_password** | **str** | | +**db_user** | **str** | | +**db_logging_enabled** | **bool** | | +**config_db_host** | **str** | | [optional] +**config_db_port** | **float** | | [optional] +**config_db_user** | **str** | | [optional] +**config_db_password** | **str** | | [optional] +**config_db_name** | **str** | | [optional] +**ip_block** | **str** | | +**local_ip** | **str** | | +**ip_block_netmask** | **str** | | +**instance_dns_servers** | **List[str]** | | [optional] +**on_site** | **bool** | | +**private_headers** | **List[str]** | | +**trial** | [**ClusterConfigCoordinatorConfigTrial**](ClusterConfigCoordinatorConfigTrial.md) | | [optional] +**trial_survey_id** | **str** | | +**auth_providers** | [**List[ClusterConfigCoordinatorConfigAuthProvidersInner]**](ClusterConfigCoordinatorConfigAuthProvidersInner.md) | | [optional] +**per_project_storage_quota** | **float** | | [optional] +**image_data_path** | **str** | | [optional] +**ensure_domain** | [**ClusterConfigCoordinatorConfigEnsureDomain**](ClusterConfigCoordinatorConfigEnsureDomain.md) | | [optional] +**hubspot** | [**ClusterConfigCoordinatorConfigHubspot**](ClusterConfigCoordinatorConfigHubspot.md) | | [optional] +**nexus_url** | **str** | | [optional] +**billing_trade_credit_days** | **float** | | [optional] +**jwt_token_expiration** | **float** | | [optional] +**hypertune** | [**ClusterConfigCoordinatorConfigHypertune**](ClusterConfigCoordinatorConfigHypertune.md) | | [optional] +**aws_marketplace** | [**ClusterConfigCoordinatorConfigAwsMarketplace**](ClusterConfigCoordinatorConfigAwsMarketplace.md) | | [optional] +**pipedrive** | [**ClusterConfigCoordinatorConfigPipedrive**](ClusterConfigCoordinatorConfigPipedrive.md) | | [optional] +**webplayer** | [**ClusterConfigCoordinatorConfigWebplayer**](ClusterConfigCoordinatorConfigWebplayer.md) | | [optional] +**postmark_server_token** | **str** | | [optional] +**postmark_email_from** | **str** | | [optional] +**postmark_email_template** | **str** | | [optional] +**s3** | **Dict[str, str]** | | [optional] +**ofac_api_key** | **str** | | [optional] +**usb_media_queue_dir** | **str** | | [optional] +**usb_media_access_enabled** | **bool** | | [optional] +**intercom_id_verify_secret** | **str** | | [optional] +**fvp_secret** | **str** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_coordinator_config import ClusterConfigCoordinatorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfig from a JSON string +cluster_config_coordinator_config_instance = ClusterConfigCoordinatorConfig.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfig.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_dict = cluster_config_coordinator_config_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfig from a dict +cluster_config_coordinator_config_from_dict = ClusterConfigCoordinatorConfig.from_dict(cluster_config_coordinator_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigAuthProvidersInner.md b/docs/ClusterConfigCoordinatorConfigAuthProvidersInner.md new file mode 100644 index 0000000..e43e7e9 --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigAuthProvidersInner.md @@ -0,0 +1,34 @@ +# ClusterConfigCoordinatorConfigAuthProvidersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | **str** | | +**discovery_url** | **str** | | +**client_id** | **str** | | +**client_secret** | **str** | | +**label** | **str** | | +**invited_only** | **bool** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_auth_providers_inner import ClusterConfigCoordinatorConfigAuthProvidersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigAuthProvidersInner from a JSON string +cluster_config_coordinator_config_auth_providers_inner_instance = ClusterConfigCoordinatorConfigAuthProvidersInner.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigAuthProvidersInner.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_auth_providers_inner_dict = cluster_config_coordinator_config_auth_providers_inner_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigAuthProvidersInner from a dict +cluster_config_coordinator_config_auth_providers_inner_from_dict = ClusterConfigCoordinatorConfigAuthProvidersInner.from_dict(cluster_config_coordinator_config_auth_providers_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.md b/docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.md new file mode 100644 index 0000000..a6ad629 --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.md @@ -0,0 +1,29 @@ +# ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | **str** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf from a JSON string +cluster_config_coordinator_config_auth_providers_inner_any_of_instance = ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_auth_providers_inner_any_of_dict = cluster_config_coordinator_config_auth_providers_inner_any_of_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf from a dict +cluster_config_coordinator_config_auth_providers_inner_any_of_from_dict = ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf.from_dict(cluster_config_coordinator_config_auth_providers_inner_any_of_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.md b/docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.md new file mode 100644 index 0000000..0104260 --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.md @@ -0,0 +1,34 @@ +# ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider** | **str** | | +**discovery_url** | **str** | | +**client_id** | **str** | | +**client_secret** | **str** | | +**label** | **str** | | +**invited_only** | **bool** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of1 import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 from a JSON string +cluster_config_coordinator_config_auth_providers_inner_any_of1_instance = ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_auth_providers_inner_any_of1_dict = cluster_config_coordinator_config_auth_providers_inner_any_of1_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 from a dict +cluster_config_coordinator_config_auth_providers_inner_any_of1_from_dict = ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1.from_dict(cluster_config_coordinator_config_auth_providers_inner_any_of1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigAwsMarketplace.md b/docs/ClusterConfigCoordinatorConfigAwsMarketplace.md new file mode 100644 index 0000000..49daa58 --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigAwsMarketplace.md @@ -0,0 +1,32 @@ +# ClusterConfigCoordinatorConfigAwsMarketplace + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**suger_token** | **str** | | +**suger_webhook_secret** | **str** | | +**suger_api_client_secret** | **str** | | +**suger_stripe_mapping** | **Dict[str, str]** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_aws_marketplace import ClusterConfigCoordinatorConfigAwsMarketplace + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigAwsMarketplace from a JSON string +cluster_config_coordinator_config_aws_marketplace_instance = ClusterConfigCoordinatorConfigAwsMarketplace.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigAwsMarketplace.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_aws_marketplace_dict = cluster_config_coordinator_config_aws_marketplace_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigAwsMarketplace from a dict +cluster_config_coordinator_config_aws_marketplace_from_dict = ClusterConfigCoordinatorConfigAwsMarketplace.from_dict(cluster_config_coordinator_config_aws_marketplace_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigEnsureDomain.md b/docs/ClusterConfigCoordinatorConfigEnsureDomain.md new file mode 100644 index 0000000..ad37e07 --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigEnsureDomain.md @@ -0,0 +1,35 @@ +# ClusterConfigCoordinatorConfigEnsureDomain + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | +**domain_name** | **str** | | +**quotas** | [**ClusterConfigCoordinatorConfigEnsureDomainQuotas**](ClusterConfigCoordinatorConfigEnsureDomainQuotas.md) | | +**properties** | [**ClusterConfigCoordinatorConfigEnsureDomainProperties**](ClusterConfigCoordinatorConfigEnsureDomainProperties.md) | | +**admin_password_hash** | **str** | | +**admin_user_cloud_administrator** | **bool** | | +**is_individual_aggregate** | **bool** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_ensure_domain import ClusterConfigCoordinatorConfigEnsureDomain + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigEnsureDomain from a JSON string +cluster_config_coordinator_config_ensure_domain_instance = ClusterConfigCoordinatorConfigEnsureDomain.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigEnsureDomain.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_ensure_domain_dict = cluster_config_coordinator_config_ensure_domain_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigEnsureDomain from a dict +cluster_config_coordinator_config_ensure_domain_from_dict = ClusterConfigCoordinatorConfigEnsureDomain.from_dict(cluster_config_coordinator_config_ensure_domain_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigEnsureDomainProperties.md b/docs/ClusterConfigCoordinatorConfigEnsureDomainProperties.md new file mode 100644 index 0000000..6591bd1 --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigEnsureDomainProperties.md @@ -0,0 +1,31 @@ +# ClusterConfigCoordinatorConfigEnsureDomainProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**license_type** | **str** | | +**android** | **bool** | | +**no_ios** | **bool** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_ensure_domain_properties import ClusterConfigCoordinatorConfigEnsureDomainProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigEnsureDomainProperties from a JSON string +cluster_config_coordinator_config_ensure_domain_properties_instance = ClusterConfigCoordinatorConfigEnsureDomainProperties.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigEnsureDomainProperties.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_ensure_domain_properties_dict = cluster_config_coordinator_config_ensure_domain_properties_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigEnsureDomainProperties from a dict +cluster_config_coordinator_config_ensure_domain_properties_from_dict = ClusterConfigCoordinatorConfigEnsureDomainProperties.from_dict(cluster_config_coordinator_config_ensure_domain_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigEnsureDomainQuotas.md b/docs/ClusterConfigCoordinatorConfigEnsureDomainQuotas.md new file mode 100644 index 0000000..9d5cd3c --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigEnsureDomainQuotas.md @@ -0,0 +1,29 @@ +# ClusterConfigCoordinatorConfigEnsureDomainQuotas + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_ensure_domain_quotas import ClusterConfigCoordinatorConfigEnsureDomainQuotas + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigEnsureDomainQuotas from a JSON string +cluster_config_coordinator_config_ensure_domain_quotas_instance = ClusterConfigCoordinatorConfigEnsureDomainQuotas.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigEnsureDomainQuotas.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_ensure_domain_quotas_dict = cluster_config_coordinator_config_ensure_domain_quotas_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigEnsureDomainQuotas from a dict +cluster_config_coordinator_config_ensure_domain_quotas_from_dict = ClusterConfigCoordinatorConfigEnsureDomainQuotas.from_dict(cluster_config_coordinator_config_ensure_domain_quotas_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigHubspot.md b/docs/ClusterConfigCoordinatorConfigHubspot.md new file mode 100644 index 0000000..0f6af4c --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigHubspot.md @@ -0,0 +1,30 @@ +# ClusterConfigCoordinatorConfigHubspot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | | +**hubspot_contact_link** | **str** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_hubspot import ClusterConfigCoordinatorConfigHubspot + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigHubspot from a JSON string +cluster_config_coordinator_config_hubspot_instance = ClusterConfigCoordinatorConfigHubspot.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigHubspot.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_hubspot_dict = cluster_config_coordinator_config_hubspot_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigHubspot from a dict +cluster_config_coordinator_config_hubspot_from_dict = ClusterConfigCoordinatorConfigHubspot.from_dict(cluster_config_coordinator_config_hubspot_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigHypertune.md b/docs/ClusterConfigCoordinatorConfigHypertune.md new file mode 100644 index 0000000..ce3a37c --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigHypertune.md @@ -0,0 +1,31 @@ +# ClusterConfigCoordinatorConfigHypertune + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | +**branch_name** | **str** | | [optional] +**init_data_path** | **str** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_hypertune import ClusterConfigCoordinatorConfigHypertune + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigHypertune from a JSON string +cluster_config_coordinator_config_hypertune_instance = ClusterConfigCoordinatorConfigHypertune.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigHypertune.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_hypertune_dict = cluster_config_coordinator_config_hypertune_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigHypertune from a dict +cluster_config_coordinator_config_hypertune_from_dict = ClusterConfigCoordinatorConfigHypertune.from_dict(cluster_config_coordinator_config_hypertune_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigPipedrive.md b/docs/ClusterConfigCoordinatorConfigPipedrive.md new file mode 100644 index 0000000..2b08545 --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigPipedrive.md @@ -0,0 +1,29 @@ +# ClusterConfigCoordinatorConfigPipedrive + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_pipedrive import ClusterConfigCoordinatorConfigPipedrive + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigPipedrive from a JSON string +cluster_config_coordinator_config_pipedrive_instance = ClusterConfigCoordinatorConfigPipedrive.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigPipedrive.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_pipedrive_dict = cluster_config_coordinator_config_pipedrive_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigPipedrive from a dict +cluster_config_coordinator_config_pipedrive_from_dict = ClusterConfigCoordinatorConfigPipedrive.from_dict(cluster_config_coordinator_config_pipedrive_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigTrial.md b/docs/ClusterConfigCoordinatorConfigTrial.md new file mode 100644 index 0000000..4c6e20e --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigTrial.md @@ -0,0 +1,32 @@ +# ClusterConfigCoordinatorConfigTrial + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_duration** | **float** | | +**default_hours** | **float** | | +**default_devices** | **float** | | +**default_cores** | **float** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_trial import ClusterConfigCoordinatorConfigTrial + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigTrial from a JSON string +cluster_config_coordinator_config_trial_instance = ClusterConfigCoordinatorConfigTrial.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigTrial.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_trial_dict = cluster_config_coordinator_config_trial_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigTrial from a dict +cluster_config_coordinator_config_trial_from_dict = ClusterConfigCoordinatorConfigTrial.from_dict(cluster_config_coordinator_config_trial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigCoordinatorConfigWebplayer.md b/docs/ClusterConfigCoordinatorConfigWebplayer.md new file mode 100644 index 0000000..986630d --- /dev/null +++ b/docs/ClusterConfigCoordinatorConfigWebplayer.md @@ -0,0 +1,30 @@ +# ClusterConfigCoordinatorConfigWebplayer + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inactivity_delete_timeout** | **float** | | +**inactivity_shutdown_timeout** | **float** | | + +## Example + +```python +from corellium.models.cluster_config_coordinator_config_webplayer import ClusterConfigCoordinatorConfigWebplayer + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigCoordinatorConfigWebplayer from a JSON string +cluster_config_coordinator_config_webplayer_instance = ClusterConfigCoordinatorConfigWebplayer.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigCoordinatorConfigWebplayer.to_json()) + +# convert the object into a dict +cluster_config_coordinator_config_webplayer_dict = cluster_config_coordinator_config_webplayer_instance.to_dict() +# create an instance of ClusterConfigCoordinatorConfigWebplayer from a dict +cluster_config_coordinator_config_webplayer_from_dict = ClusterConfigCoordinatorConfigWebplayer.from_dict(cluster_config_coordinator_config_webplayer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigFirmwareServiceConfig.md b/docs/ClusterConfigFirmwareServiceConfig.md new file mode 100644 index 0000000..ec558db --- /dev/null +++ b/docs/ClusterConfigFirmwareServiceConfig.md @@ -0,0 +1,33 @@ +# ClusterConfigFirmwareServiceConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fetch_firmware_assets** | **bool** | | [optional] +**cluster_firmware_assets** | **bool** | | [optional] +**cache_firmware** | **bool** | | [optional] +**should_download** | **bool** | | [optional] +**fallback_original_url** | **bool** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_firmware_service_config import ClusterConfigFirmwareServiceConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigFirmwareServiceConfig from a JSON string +cluster_config_firmware_service_config_instance = ClusterConfigFirmwareServiceConfig.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigFirmwareServiceConfig.to_json()) + +# convert the object into a dict +cluster_config_firmware_service_config_dict = cluster_config_firmware_service_config_instance.to_dict() +# create an instance of ClusterConfigFirmwareServiceConfig from a dict +cluster_config_firmware_service_config_from_dict = ClusterConfigFirmwareServiceConfig.from_dict(cluster_config_firmware_service_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigIpswFiltersInner.md b/docs/ClusterConfigIpswFiltersInner.md new file mode 100644 index 0000000..10f49b0 --- /dev/null +++ b/docs/ClusterConfigIpswFiltersInner.md @@ -0,0 +1,32 @@ +# ClusterConfigIpswFiltersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device** | [**ClusterConfigIpswFiltersInnerDevice**](ClusterConfigIpswFiltersInnerDevice.md) | | [optional] +**version** | [**ClusterConfigIpswFiltersInnerVersion**](ClusterConfigIpswFiltersInnerVersion.md) | | [optional] +**include** | **bool** | | [optional] +**exclude** | **bool** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_ipsw_filters_inner import ClusterConfigIpswFiltersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigIpswFiltersInner from a JSON string +cluster_config_ipsw_filters_inner_instance = ClusterConfigIpswFiltersInner.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigIpswFiltersInner.to_json()) + +# convert the object into a dict +cluster_config_ipsw_filters_inner_dict = cluster_config_ipsw_filters_inner_instance.to_dict() +# create an instance of ClusterConfigIpswFiltersInner from a dict +cluster_config_ipsw_filters_inner_from_dict = ClusterConfigIpswFiltersInner.from_dict(cluster_config_ipsw_filters_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigIpswFiltersInnerDevice.md b/docs/ClusterConfigIpswFiltersInnerDevice.md new file mode 100644 index 0000000..7e8f6f8 --- /dev/null +++ b/docs/ClusterConfigIpswFiltersInnerDevice.md @@ -0,0 +1,29 @@ +# ClusterConfigIpswFiltersInnerDevice + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | **str** | | + +## Example + +```python +from corellium.models.cluster_config_ipsw_filters_inner_device import ClusterConfigIpswFiltersInnerDevice + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigIpswFiltersInnerDevice from a JSON string +cluster_config_ipsw_filters_inner_device_instance = ClusterConfigIpswFiltersInnerDevice.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigIpswFiltersInnerDevice.to_json()) + +# convert the object into a dict +cluster_config_ipsw_filters_inner_device_dict = cluster_config_ipsw_filters_inner_device_instance.to_dict() +# create an instance of ClusterConfigIpswFiltersInnerDevice from a dict +cluster_config_ipsw_filters_inner_device_from_dict = ClusterConfigIpswFiltersInnerDevice.from_dict(cluster_config_ipsw_filters_inner_device_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigIpswFiltersInnerVersion.md b/docs/ClusterConfigIpswFiltersInnerVersion.md new file mode 100644 index 0000000..9350203 --- /dev/null +++ b/docs/ClusterConfigIpswFiltersInnerVersion.md @@ -0,0 +1,33 @@ +# ClusterConfigIpswFiltersInnerVersion + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lt** | **str** | | [optional] +**gt** | **str** | | [optional] +**le** | **str** | | [optional] +**ge** | **str** | | [optional] +**eq** | **str** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_ipsw_filters_inner_version import ClusterConfigIpswFiltersInnerVersion + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigIpswFiltersInnerVersion from a JSON string +cluster_config_ipsw_filters_inner_version_instance = ClusterConfigIpswFiltersInnerVersion.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigIpswFiltersInnerVersion.to_json()) + +# convert the object into a dict +cluster_config_ipsw_filters_inner_version_dict = cluster_config_ipsw_filters_inner_version_instance.to_dict() +# create an instance of ClusterConfigIpswFiltersInnerVersion from a dict +cluster_config_ipsw_filters_inner_version_from_dict = ClusterConfigIpswFiltersInnerVersion.from_dict(cluster_config_ipsw_filters_inner_version_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigMaintenance.md b/docs/ClusterConfigMaintenance.md new file mode 100644 index 0000000..184e501 --- /dev/null +++ b/docs/ClusterConfigMaintenance.md @@ -0,0 +1,30 @@ +# ClusterConfigMaintenance + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**header** | **str** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_maintenance import ClusterConfigMaintenance + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigMaintenance from a JSON string +cluster_config_maintenance_instance = ClusterConfigMaintenance.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigMaintenance.to_json()) + +# convert the object into a dict +cluster_config_maintenance_dict = cluster_config_maintenance_instance.to_dict() +# create an instance of ClusterConfigMaintenance from a dict +cluster_config_maintenance_from_dict = ClusterConfigMaintenance.from_dict(cluster_config_maintenance_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigNetMonCA.md b/docs/ClusterConfigNetMonCA.md new file mode 100644 index 0000000..31b0ae0 --- /dev/null +++ b/docs/ClusterConfigNetMonCA.md @@ -0,0 +1,31 @@ +# ClusterConfigNetMonCA + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**certificate** | **str** | | +**key** | **str** | | +**subject_hash2** | **str** | | + +## Example + +```python +from corellium.models.cluster_config_net_mon_ca import ClusterConfigNetMonCA + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigNetMonCA from a JSON string +cluster_config_net_mon_ca_instance = ClusterConfigNetMonCA.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigNetMonCA.to_json()) + +# convert the object into a dict +cluster_config_net_mon_ca_dict = cluster_config_net_mon_ca_instance.to_dict() +# create an instance of ClusterConfigNetMonCA from a dict +cluster_config_net_mon_ca_from_dict = ClusterConfigNetMonCA.from_dict(cluster_config_net_mon_ca_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigNodeSpecificConfig.md b/docs/ClusterConfigNodeSpecificConfig.md new file mode 100644 index 0000000..c758869 --- /dev/null +++ b/docs/ClusterConfigNodeSpecificConfig.md @@ -0,0 +1,31 @@ +# ClusterConfigNodeSpecificConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**az** | **str** | | [optional] +**external_ip** | **str** | | [optional] +**node_id** | **str** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_node_specific_config import ClusterConfigNodeSpecificConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigNodeSpecificConfig from a JSON string +cluster_config_node_specific_config_instance = ClusterConfigNodeSpecificConfig.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigNodeSpecificConfig.to_json()) + +# convert the object into a dict +cluster_config_node_specific_config_dict = cluster_config_node_specific_config_instance.to_dict() +# create an instance of ClusterConfigNodeSpecificConfig from a dict +cluster_config_node_specific_config_from_dict = ClusterConfigNodeSpecificConfig.from_dict(cluster_config_node_specific_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigPackageConfig.md b/docs/ClusterConfigPackageConfig.md new file mode 100644 index 0000000..3146d2d --- /dev/null +++ b/docs/ClusterConfigPackageConfig.md @@ -0,0 +1,54 @@ +# ClusterConfigPackageConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**license_type** | **str** | | [optional] +**cluster_id** | **str** | | [optional] +**network_type** | **str** | | [optional] +**physical_interfaces** | **Dict[str, str]** | | [optional] +**features** | [**ClusterConfigPackageConfigFeatures**](ClusterConfigPackageConfigFeatures.md) | | [optional] +**components** | [**ClusterConfigPackageConfigComponents**](ClusterConfigPackageConfigComponents.md) | | [optional] +**terms_of_service** | **str** | | [optional] +**domain_authentication_providers** | **bool** | | [optional] +**max_network_monitor_file_size** | **str** | | [optional] +**combined** | **bool** | | [optional] +**flavor_filters** | [**List[ClusterConfigPackageConfigFlavorFiltersInner]**](ClusterConfigPackageConfigFlavorFiltersInner.md) | | +**charm_sdk** | **bool** | | [optional] +**highly_available** | **bool** | | [optional] +**node_version** | **str** | | [optional] +**invalid_build** | **bool** | | [optional] +**sep_sim** | **bool** | | [optional] +**kernel_gdb** | **bool** | | [optional] +**android** | **bool** | | [optional] +**no_ios** | **bool** | | [optional] +**ios_betas** | **bool** | | [optional] +**charm_modules** | **bool** | | [optional] +**btrace** | **bool** | | [optional] +**strace** | **bool** | | [optional] +**game_streaming** | **bool** | | [optional] +**container_template_generation** | **str** | | [optional] +**s3_supported** | **bool** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_package_config import ClusterConfigPackageConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigPackageConfig from a JSON string +cluster_config_package_config_instance = ClusterConfigPackageConfig.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigPackageConfig.to_json()) + +# convert the object into a dict +cluster_config_package_config_dict = cluster_config_package_config_instance.to_dict() +# create an instance of ClusterConfigPackageConfig from a dict +cluster_config_package_config_from_dict = ClusterConfigPackageConfig.from_dict(cluster_config_package_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigPackageConfigComponents.md b/docs/ClusterConfigPackageConfigComponents.md new file mode 100644 index 0000000..c4db3e1 --- /dev/null +++ b/docs/ClusterConfigPackageConfigComponents.md @@ -0,0 +1,29 @@ +# ClusterConfigPackageConfigComponents + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cellebrite_device_image** | **bool** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_package_config_components import ClusterConfigPackageConfigComponents + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigPackageConfigComponents from a JSON string +cluster_config_package_config_components_instance = ClusterConfigPackageConfigComponents.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigPackageConfigComponents.to_json()) + +# convert the object into a dict +cluster_config_package_config_components_dict = cluster_config_package_config_components_instance.to_dict() +# create an instance of ClusterConfigPackageConfigComponents from a dict +cluster_config_package_config_components_from_dict = ClusterConfigPackageConfigComponents.from_dict(cluster_config_package_config_components_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigPackageConfigFeatures.md b/docs/ClusterConfigPackageConfigFeatures.md new file mode 100644 index 0000000..d069fac --- /dev/null +++ b/docs/ClusterConfigPackageConfigFeatures.md @@ -0,0 +1,51 @@ +# ClusterConfigPackageConfigFeatures + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**net_mon_proc_map** | **bool** | | [optional] +**cellebrite_device_image** | **bool** | | [optional] +**custom_ramdisk** | **bool** | | [optional] +**injected_cdhashes** | **bool** | | [optional] +**custom_kernel** | **bool** | | [optional] +**custom_ramdom_seed** | **bool** | | [optional] +**disable_snapshot_mount** | **bool** | | [optional] +**tracing_tools** | **bool** | | [optional] +**sep_sim** | **bool** | | [optional] +**custom_boot_args** | **bool** | | [optional] +**netdump** | **bool** | | [optional] +**pac** | **bool** | | [optional] +**vstrm_on_compute_nodes** | **bool** | | [optional] +**aprr** | **bool** | | [optional] +**kernel_gdb** | **bool** | | [optional] +**kalloc_tracing** | **bool** | | [optional] +**track_project_instance_usage** | **bool** | | [optional] +**custom_device_tree** | **bool** | | [optional] +**custom_kernel_patches** | **bool** | | [optional] +**mast** | **bool** | | [optional] +**charm_modules** | **bool** | | [optional] +**sep** | **bool** | | [optional] +**custom_boot_loader** | **bool** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_package_config_features import ClusterConfigPackageConfigFeatures + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigPackageConfigFeatures from a JSON string +cluster_config_package_config_features_instance = ClusterConfigPackageConfigFeatures.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigPackageConfigFeatures.to_json()) + +# convert the object into a dict +cluster_config_package_config_features_dict = cluster_config_package_config_features_instance.to_dict() +# create an instance of ClusterConfigPackageConfigFeatures from a dict +cluster_config_package_config_features_from_dict = ClusterConfigPackageConfigFeatures.from_dict(cluster_config_package_config_features_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigPackageConfigFlavorFiltersInner.md b/docs/ClusterConfigPackageConfigFlavorFiltersInner.md new file mode 100644 index 0000000..101eac1 --- /dev/null +++ b/docs/ClusterConfigPackageConfigFlavorFiltersInner.md @@ -0,0 +1,30 @@ +# ClusterConfigPackageConfigFlavorFiltersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**ClusterConfigPackageConfigFlavorFiltersInnerFilter**](ClusterConfigPackageConfigFlavorFiltersInnerFilter.md) | | [optional] +**apply** | [**ClusterConfigPackageConfigFlavorFiltersInnerApply**](ClusterConfigPackageConfigFlavorFiltersInnerApply.md) | | [optional] + +## Example + +```python +from corellium.models.cluster_config_package_config_flavor_filters_inner import ClusterConfigPackageConfigFlavorFiltersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigPackageConfigFlavorFiltersInner from a JSON string +cluster_config_package_config_flavor_filters_inner_instance = ClusterConfigPackageConfigFlavorFiltersInner.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigPackageConfigFlavorFiltersInner.to_json()) + +# convert the object into a dict +cluster_config_package_config_flavor_filters_inner_dict = cluster_config_package_config_flavor_filters_inner_instance.to_dict() +# create an instance of ClusterConfigPackageConfigFlavorFiltersInner from a dict +cluster_config_package_config_flavor_filters_inner_from_dict = ClusterConfigPackageConfigFlavorFiltersInner.from_dict(cluster_config_package_config_flavor_filters_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigPackageConfigFlavorFiltersInnerApply.md b/docs/ClusterConfigPackageConfigFlavorFiltersInnerApply.md new file mode 100644 index 0000000..23e8256 --- /dev/null +++ b/docs/ClusterConfigPackageConfigFlavorFiltersInnerApply.md @@ -0,0 +1,35 @@ +# ClusterConfigPackageConfigFlavorFiltersInnerApply + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**supports_core_trace** | **bool** | | [optional] +**supports_port_frida** | **bool** | | [optional] +**supports_custom_firmware** | **bool** | | [optional] +**supports_custom_kernel** | **bool** | | [optional] +**supports_gdb** | **bool** | | [optional] +**supports_custom_devicetree** | **bool** | | [optional] +**supports_network_monitor** | **bool** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_package_config_flavor_filters_inner_apply import ClusterConfigPackageConfigFlavorFiltersInnerApply + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigPackageConfigFlavorFiltersInnerApply from a JSON string +cluster_config_package_config_flavor_filters_inner_apply_instance = ClusterConfigPackageConfigFlavorFiltersInnerApply.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigPackageConfigFlavorFiltersInnerApply.to_json()) + +# convert the object into a dict +cluster_config_package_config_flavor_filters_inner_apply_dict = cluster_config_package_config_flavor_filters_inner_apply_instance.to_dict() +# create an instance of ClusterConfigPackageConfigFlavorFiltersInnerApply from a dict +cluster_config_package_config_flavor_filters_inner_apply_from_dict = ClusterConfigPackageConfigFlavorFiltersInnerApply.from_dict(cluster_config_package_config_flavor_filters_inner_apply_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigPackageConfigFlavorFiltersInnerFilter.md b/docs/ClusterConfigPackageConfigFlavorFiltersInnerFilter.md new file mode 100644 index 0000000..45dc91c --- /dev/null +++ b/docs/ClusterConfigPackageConfigFlavorFiltersInnerFilter.md @@ -0,0 +1,30 @@ +# ClusterConfigPackageConfigFlavorFiltersInnerFilter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**license** | **str** | | [optional] +**type** | **str** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_package_config_flavor_filters_inner_filter import ClusterConfigPackageConfigFlavorFiltersInnerFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigPackageConfigFlavorFiltersInnerFilter from a JSON string +cluster_config_package_config_flavor_filters_inner_filter_instance = ClusterConfigPackageConfigFlavorFiltersInnerFilter.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigPackageConfigFlavorFiltersInnerFilter.to_json()) + +# convert the object into a dict +cluster_config_package_config_flavor_filters_inner_filter_dict = cluster_config_package_config_flavor_filters_inner_filter_instance.to_dict() +# create an instance of ClusterConfigPackageConfigFlavorFiltersInnerFilter from a dict +cluster_config_package_config_flavor_filters_inner_filter_from_dict = ClusterConfigPackageConfigFlavorFiltersInnerFilter.from_dict(cluster_config_package_config_flavor_filters_inner_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigSetupConfig.md b/docs/ClusterConfigSetupConfig.md new file mode 100644 index 0000000..5fca313 --- /dev/null +++ b/docs/ClusterConfigSetupConfig.md @@ -0,0 +1,52 @@ +# ClusterConfigSetupConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**on_site** | **bool** | | +**artifacts_volume_size** | **float** | | [optional] +**network_monitor_interval** | **float** | | +**max_network_monitor_file_size** | **str** | | +**ca_cert_file_src** | **str** | | +**local_ip** | **str** | | +**instance_ip_block_netmask** | **str** | | +**instance_gateway** | **str** | | +**instance_dns_servers** | **List[str]** | | [optional] +**report_interval** | **float** | | +**cert_key_file_data** | **str** | | [optional] +**default_ssid** | **str** | | [optional] +**enable_experimental_devices** | **bool** | | [optional] +**controller_nodes** | **List[str]** | | [optional] +**domain** | **str** | | [optional] +**interface** | **str** | | +**virtual_device_interface** | **str** | | [optional] +**auto_approve_trials** | **str** | | [optional] +**snapshot_limit** | **float** | | [optional] +**max_download_agents_per_device** | **float** | | [optional] +**client_cert_file** | **str** | | [optional] +**docker_host_ip** | **str** | | [optional] +**domain_name** | **str** | | [optional] +**vpn_client_ip** | **str** | | [optional] + +## Example + +```python +from corellium.models.cluster_config_setup_config import ClusterConfigSetupConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigSetupConfig from a JSON string +cluster_config_setup_config_instance = ClusterConfigSetupConfig.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigSetupConfig.to_json()) + +# convert the object into a dict +cluster_config_setup_config_dict = cluster_config_setup_config_instance.to_dict() +# create an instance of ClusterConfigSetupConfig from a dict +cluster_config_setup_config_from_dict = ClusterConfigSetupConfig.from_dict(cluster_config_setup_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigStripe.md b/docs/ClusterConfigStripe.md new file mode 100644 index 0000000..3aeba51 --- /dev/null +++ b/docs/ClusterConfigStripe.md @@ -0,0 +1,31 @@ +# ClusterConfigStripe + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**public_key** | **str** | | +**private_key** | **str** | | +**webhook_key** | **str** | | + +## Example + +```python +from corellium.models.cluster_config_stripe import ClusterConfigStripe + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigStripe from a JSON string +cluster_config_stripe_instance = ClusterConfigStripe.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigStripe.to_json()) + +# convert the object into a dict +cluster_config_stripe_dict = cluster_config_stripe_instance.to_dict() +# create an instance of ClusterConfigStripe from a dict +cluster_config_stripe_from_dict = ClusterConfigStripe.from_dict(cluster_config_stripe_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigUpdateError.md b/docs/ClusterConfigUpdateError.md new file mode 100644 index 0000000..d04a218 --- /dev/null +++ b/docs/ClusterConfigUpdateError.md @@ -0,0 +1,30 @@ +# ClusterConfigUpdateError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Human-readable instruction to retry or resolve manually. | +**nodes** | [**List[NodeInformation]**](NodeInformation.md) | Nodes that failed to receive the configuration update. | [optional] + +## Example + +```python +from corellium.models.cluster_config_update_error import ClusterConfigUpdateError + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigUpdateError from a JSON string +cluster_config_update_error_instance = ClusterConfigUpdateError.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigUpdateError.to_json()) + +# convert the object into a dict +cluster_config_update_error_dict = cluster_config_update_error_instance.to_dict() +# create an instance of ClusterConfigUpdateError from a dict +cluster_config_update_error_from_dict = ClusterConfigUpdateError.from_dict(cluster_config_update_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterConfigurationPayload.md b/docs/ClusterConfigurationPayload.md new file mode 100644 index 0000000..a4d0af8 --- /dev/null +++ b/docs/ClusterConfigurationPayload.md @@ -0,0 +1,32 @@ +# ClusterConfigurationPayload + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshot_limit** | **float** | Designates the maximum number of snapshots that can be taken in a cluster | [optional] +**coordinator_config** | [**CoordinatorConfigV1**](CoordinatorConfigV1.md) | | [optional] +**ai_tools_config** | [**AiToolsConfigV1**](AiToolsConfigV1.md) | | [optional] + +## Example + +```python +from corellium.models.cluster_configuration_payload import ClusterConfigurationPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterConfigurationPayload from a JSON string +cluster_configuration_payload_instance = ClusterConfigurationPayload.from_json(json) +# print the JSON string representation of the object +print(ClusterConfigurationPayload.to_json()) + +# convert the object into a dict +cluster_configuration_payload_dict = cluster_configuration_payload_instance.to_dict() +# create an instance of ClusterConfigurationPayload from a dict +cluster_configuration_payload_from_dict = ClusterConfigurationPayload.from_dict(cluster_configuration_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNode.md b/docs/ClusterNode.md new file mode 100644 index 0000000..61cbb35 --- /dev/null +++ b/docs/ClusterNode.md @@ -0,0 +1,34 @@ +# ClusterNode + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reserved** | [**ClusterNodeReserved**](ClusterNodeReserved.md) | | +**total** | [**ClusterNodeTotal**](ClusterNodeTotal.md) | | +**available** | [**ClusterNodeAvailable**](ClusterNodeAvailable.md) | | +**hostname** | **str** | Node hostname. | +**address** | **str** | Node address (host:port). | +**last_seen** | **datetime** | ISO timestamp of last heartbeat. | + +## Example + +```python +from corellium.models.cluster_node import ClusterNode + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNode from a JSON string +cluster_node_instance = ClusterNode.from_json(json) +# print the JSON string representation of the object +print(ClusterNode.to_json()) + +# convert the object into a dict +cluster_node_dict = cluster_node_instance.to_dict() +# create an instance of ClusterNode from a dict +cluster_node_from_dict = ClusterNode.from_dict(cluster_node_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNodeAvailable.md b/docs/ClusterNodeAvailable.md new file mode 100644 index 0000000..8eedee0 --- /dev/null +++ b/docs/ClusterNodeAvailable.md @@ -0,0 +1,34 @@ +# ClusterNodeAvailable + +Resources currently available. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Number of CPU cores. | +**ram** | **float** | RAM in MiB. | +**disk** | **float** | Disk in GiB. | +**slot** | **float** | Number of device slots. | +**gpu** | **float** | Number of GPUs. | + +## Example + +```python +from corellium.models.cluster_node_available import ClusterNodeAvailable + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNodeAvailable from a JSON string +cluster_node_available_instance = ClusterNodeAvailable.from_json(json) +# print the JSON string representation of the object +print(ClusterNodeAvailable.to_json()) + +# convert the object into a dict +cluster_node_available_dict = cluster_node_available_instance.to_dict() +# create an instance of ClusterNodeAvailable from a dict +cluster_node_available_from_dict = ClusterNodeAvailable.from_dict(cluster_node_available_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNodeReserved.md b/docs/ClusterNodeReserved.md new file mode 100644 index 0000000..72f4432 --- /dev/null +++ b/docs/ClusterNodeReserved.md @@ -0,0 +1,34 @@ +# ClusterNodeReserved + +Resources currently reserved. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Number of CPU cores. | +**ram** | **float** | RAM in MiB. | +**disk** | **float** | Disk in GiB. | +**slot** | **float** | Number of device slots. | +**gpu** | **float** | Number of GPUs. | + +## Example + +```python +from corellium.models.cluster_node_reserved import ClusterNodeReserved + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNodeReserved from a JSON string +cluster_node_reserved_instance = ClusterNodeReserved.from_json(json) +# print the JSON string representation of the object +print(ClusterNodeReserved.to_json()) + +# convert the object into a dict +cluster_node_reserved_dict = cluster_node_reserved_instance.to_dict() +# create an instance of ClusterNodeReserved from a dict +cluster_node_reserved_from_dict = ClusterNodeReserved.from_dict(cluster_node_reserved_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNodeStatus.md b/docs/ClusterNodeStatus.md new file mode 100644 index 0000000..d4815a2 --- /dev/null +++ b/docs/ClusterNodeStatus.md @@ -0,0 +1,30 @@ +# ClusterNodeStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cluster_totals** | [**ClusterNodeStatusClusterTotals**](ClusterNodeStatusClusterTotals.md) | | +**nodes** | [**List[ClusterNode]**](ClusterNode.md) | Individual node statuses. | + +## Example + +```python +from corellium.models.cluster_node_status import ClusterNodeStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNodeStatus from a JSON string +cluster_node_status_instance = ClusterNodeStatus.from_json(json) +# print the JSON string representation of the object +print(ClusterNodeStatus.to_json()) + +# convert the object into a dict +cluster_node_status_dict = cluster_node_status_instance.to_dict() +# create an instance of ClusterNodeStatus from a dict +cluster_node_status_from_dict = ClusterNodeStatus.from_dict(cluster_node_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNodeStatusClusterTotals.md b/docs/ClusterNodeStatusClusterTotals.md new file mode 100644 index 0000000..dfcc20c --- /dev/null +++ b/docs/ClusterNodeStatusClusterTotals.md @@ -0,0 +1,32 @@ +# ClusterNodeStatusClusterTotals + +Aggregate cluster resource totals. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reserved** | [**ClusterNodeStatusClusterTotalsReserved**](ClusterNodeStatusClusterTotalsReserved.md) | | +**total** | [**ClusterNodeStatusClusterTotalsTotal**](ClusterNodeStatusClusterTotalsTotal.md) | | +**available** | [**ClusterNodeStatusClusterTotalsAvailable**](ClusterNodeStatusClusterTotalsAvailable.md) | | + +## Example + +```python +from corellium.models.cluster_node_status_cluster_totals import ClusterNodeStatusClusterTotals + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNodeStatusClusterTotals from a JSON string +cluster_node_status_cluster_totals_instance = ClusterNodeStatusClusterTotals.from_json(json) +# print the JSON string representation of the object +print(ClusterNodeStatusClusterTotals.to_json()) + +# convert the object into a dict +cluster_node_status_cluster_totals_dict = cluster_node_status_cluster_totals_instance.to_dict() +# create an instance of ClusterNodeStatusClusterTotals from a dict +cluster_node_status_cluster_totals_from_dict = ClusterNodeStatusClusterTotals.from_dict(cluster_node_status_cluster_totals_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNodeStatusClusterTotalsAvailable.md b/docs/ClusterNodeStatusClusterTotalsAvailable.md new file mode 100644 index 0000000..b50adb6 --- /dev/null +++ b/docs/ClusterNodeStatusClusterTotalsAvailable.md @@ -0,0 +1,34 @@ +# ClusterNodeStatusClusterTotalsAvailable + +Total available across cluster. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Number of CPU cores. | +**ram** | **float** | RAM in MiB. | +**disk** | **float** | Disk in GiB. | +**slot** | **float** | Number of device slots. | +**gpu** | **float** | Number of GPUs. | + +## Example + +```python +from corellium.models.cluster_node_status_cluster_totals_available import ClusterNodeStatusClusterTotalsAvailable + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNodeStatusClusterTotalsAvailable from a JSON string +cluster_node_status_cluster_totals_available_instance = ClusterNodeStatusClusterTotalsAvailable.from_json(json) +# print the JSON string representation of the object +print(ClusterNodeStatusClusterTotalsAvailable.to_json()) + +# convert the object into a dict +cluster_node_status_cluster_totals_available_dict = cluster_node_status_cluster_totals_available_instance.to_dict() +# create an instance of ClusterNodeStatusClusterTotalsAvailable from a dict +cluster_node_status_cluster_totals_available_from_dict = ClusterNodeStatusClusterTotalsAvailable.from_dict(cluster_node_status_cluster_totals_available_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNodeStatusClusterTotalsReserved.md b/docs/ClusterNodeStatusClusterTotalsReserved.md new file mode 100644 index 0000000..857d60e --- /dev/null +++ b/docs/ClusterNodeStatusClusterTotalsReserved.md @@ -0,0 +1,34 @@ +# ClusterNodeStatusClusterTotalsReserved + +Total reserved across cluster. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Number of CPU cores. | +**ram** | **float** | RAM in MiB. | +**disk** | **float** | Disk in GiB. | +**slot** | **float** | Number of device slots. | +**gpu** | **float** | Number of GPUs. | + +## Example + +```python +from corellium.models.cluster_node_status_cluster_totals_reserved import ClusterNodeStatusClusterTotalsReserved + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNodeStatusClusterTotalsReserved from a JSON string +cluster_node_status_cluster_totals_reserved_instance = ClusterNodeStatusClusterTotalsReserved.from_json(json) +# print the JSON string representation of the object +print(ClusterNodeStatusClusterTotalsReserved.to_json()) + +# convert the object into a dict +cluster_node_status_cluster_totals_reserved_dict = cluster_node_status_cluster_totals_reserved_instance.to_dict() +# create an instance of ClusterNodeStatusClusterTotalsReserved from a dict +cluster_node_status_cluster_totals_reserved_from_dict = ClusterNodeStatusClusterTotalsReserved.from_dict(cluster_node_status_cluster_totals_reserved_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNodeStatusClusterTotalsTotal.md b/docs/ClusterNodeStatusClusterTotalsTotal.md new file mode 100644 index 0000000..90d590f --- /dev/null +++ b/docs/ClusterNodeStatusClusterTotalsTotal.md @@ -0,0 +1,34 @@ +# ClusterNodeStatusClusterTotalsTotal + +Total resources across cluster. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Number of CPU cores. | +**ram** | **float** | RAM in MiB. | +**disk** | **float** | Disk in GiB. | +**slot** | **float** | Number of device slots. | +**gpu** | **float** | Number of GPUs. | + +## Example + +```python +from corellium.models.cluster_node_status_cluster_totals_total import ClusterNodeStatusClusterTotalsTotal + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNodeStatusClusterTotalsTotal from a JSON string +cluster_node_status_cluster_totals_total_instance = ClusterNodeStatusClusterTotalsTotal.from_json(json) +# print the JSON string representation of the object +print(ClusterNodeStatusClusterTotalsTotal.to_json()) + +# convert the object into a dict +cluster_node_status_cluster_totals_total_dict = cluster_node_status_cluster_totals_total_instance.to_dict() +# create an instance of ClusterNodeStatusClusterTotalsTotal from a dict +cluster_node_status_cluster_totals_total_from_dict = ClusterNodeStatusClusterTotalsTotal.from_dict(cluster_node_status_cluster_totals_total_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterNodeTotal.md b/docs/ClusterNodeTotal.md new file mode 100644 index 0000000..f135203 --- /dev/null +++ b/docs/ClusterNodeTotal.md @@ -0,0 +1,34 @@ +# ClusterNodeTotal + +Total available resources. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Number of CPU cores. | +**ram** | **float** | RAM in MiB. | +**disk** | **float** | Disk in GiB. | +**slot** | **float** | Number of device slots. | +**gpu** | **float** | Number of GPUs. | + +## Example + +```python +from corellium.models.cluster_node_total import ClusterNodeTotal + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterNodeTotal from a JSON string +cluster_node_total_instance = ClusterNodeTotal.from_json(json) +# print the JSON string representation of the object +print(ClusterNodeTotal.to_json()) + +# convert the object into a dict +cluster_node_total_dict = cluster_node_total_instance.to_dict() +# create an instance of ClusterNodeTotal from a dict +cluster_node_total_from_dict = ClusterNodeTotal.from_dict(cluster_node_total_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterSnapshot.md b/docs/ClusterSnapshot.md new file mode 100644 index 0000000..f86d463 --- /dev/null +++ b/docs/ClusterSnapshot.md @@ -0,0 +1,38 @@ +# ClusterSnapshot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for the snapshot. | +**name** | **str** | Snapshot name. | [optional] +**volume** | **str** | Identifier of the volume this snapshot was taken from. | +**instance** | **str** | Identifier of the instance this snapshot is associated with. | +**status** | [**ClusterSnapshotStatus**](ClusterSnapshotStatus.md) | | +**type** | **str** | Storage backend type. | +**compute_node** | **str** | Address of the compute node that owns this snapshot. | [optional] +**metadata** | [**ClusterSnapshotMetadata**](ClusterSnapshotMetadata.md) | | +**created_at** | **datetime** | Timestamp when the snapshot was created. | +**updated_at** | **datetime** | Timestamp when the snapshot was last updated. | + +## Example + +```python +from corellium.models.cluster_snapshot import ClusterSnapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterSnapshot from a JSON string +cluster_snapshot_instance = ClusterSnapshot.from_json(json) +# print the JSON string representation of the object +print(ClusterSnapshot.to_json()) + +# convert the object into a dict +cluster_snapshot_dict = cluster_snapshot_instance.to_dict() +# create an instance of ClusterSnapshot from a dict +cluster_snapshot_from_dict = ClusterSnapshot.from_dict(cluster_snapshot_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterSnapshotList.md b/docs/ClusterSnapshotList.md new file mode 100644 index 0000000..73cbb33 --- /dev/null +++ b/docs/ClusterSnapshotList.md @@ -0,0 +1,34 @@ +# ClusterSnapshotList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ClusterSnapshot]**](ClusterSnapshot.md) | List of cluster snapshots. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.cluster_snapshot_list import ClusterSnapshotList + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterSnapshotList from a JSON string +cluster_snapshot_list_instance = ClusterSnapshotList.from_json(json) +# print the JSON string representation of the object +print(ClusterSnapshotList.to_json()) + +# convert the object into a dict +cluster_snapshot_list_dict = cluster_snapshot_list_instance.to_dict() +# create an instance of ClusterSnapshotList from a dict +cluster_snapshot_list_from_dict = ClusterSnapshotList.from_dict(cluster_snapshot_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterSnapshotMetadata.md b/docs/ClusterSnapshotMetadata.md new file mode 100644 index 0000000..e2e0eae --- /dev/null +++ b/docs/ClusterSnapshotMetadata.md @@ -0,0 +1,40 @@ +# ClusterSnapshotMetadata + +Snapshot metadata. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**live** | **bool** | Whether this was a live snapshot. | [optional] +**fresh** | **bool** | Whether the snapshot was created immediately after device restore. | [optional] +**hw_pac** | **float** | Hardware PAC value. | [optional] +**springboard** | **bool** | Whether this is a springboard snapshot. | [optional] +**boot_options** | [**InstanceBootOptions**](InstanceBootOptions.md) | Boot options. | [optional] +**device** | **Dict[str, Optional[object]]** | Device metadata. | [optional] +**flavor** | **str** | Device flavor. | [optional] +**os_version** | **str** | OS version. | [optional] +**os_build** | **str** | OS build identifier. | [optional] +**patches** | **str** | Patches applied. | [optional] +**cpid** | **float** | Chip ID. | [optional] + +## Example + +```python +from corellium.models.cluster_snapshot_metadata import ClusterSnapshotMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterSnapshotMetadata from a JSON string +cluster_snapshot_metadata_instance = ClusterSnapshotMetadata.from_json(json) +# print the JSON string representation of the object +print(ClusterSnapshotMetadata.to_json()) + +# convert the object into a dict +cluster_snapshot_metadata_dict = cluster_snapshot_metadata_instance.to_dict() +# create an instance of ClusterSnapshotMetadata from a dict +cluster_snapshot_metadata_from_dict = ClusterSnapshotMetadata.from_dict(cluster_snapshot_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterSnapshotStatus.md b/docs/ClusterSnapshotStatus.md new file mode 100644 index 0000000..91721fb --- /dev/null +++ b/docs/ClusterSnapshotStatus.md @@ -0,0 +1,31 @@ +# ClusterSnapshotStatus + +Current status of the snapshot. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task** | **str** | Current task being performed on the snapshot. | [optional] +**created** | **bool** | Whether the snapshot has been successfully created. | [optional] + +## Example + +```python +from corellium.models.cluster_snapshot_status import ClusterSnapshotStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterSnapshotStatus from a JSON string +cluster_snapshot_status_instance = ClusterSnapshotStatus.from_json(json) +# print the JSON string representation of the object +print(ClusterSnapshotStatus.to_json()) + +# convert the object into a dict +cluster_snapshot_status_dict = cluster_snapshot_status_instance.to_dict() +# create an instance of ClusterSnapshotStatus from a dict +cluster_snapshot_status_from_dict = ClusterSnapshotStatus.from_dict(cluster_snapshot_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterSnapshotV1.md b/docs/ClusterSnapshotV1.md new file mode 100644 index 0000000..1417f84 --- /dev/null +++ b/docs/ClusterSnapshotV1.md @@ -0,0 +1,30 @@ +# ClusterSnapshotV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Unique identifier for the snapshot | [optional] + +## Example + +```python +from corellium.models.cluster_snapshot_v1 import ClusterSnapshotV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterSnapshotV1 from a JSON string +cluster_snapshot_v1_instance = ClusterSnapshotV1.from_json(json) +# print the JSON string representation of the object +print(ClusterSnapshotV1.to_json()) + +# convert the object into a dict +cluster_snapshot_v1_dict = cluster_snapshot_v1_instance.to_dict() +# create an instance of ClusterSnapshotV1 from a dict +cluster_snapshot_v1_from_dict = ClusterSnapshotV1.from_dict(cluster_snapshot_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterSnapshotsApi.md b/docs/ClusterSnapshotsApi.md new file mode 100644 index 0000000..451641e --- /dev/null +++ b/docs/ClusterSnapshotsApi.md @@ -0,0 +1,273 @@ +# corellium.ClusterSnapshotsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_delete_cluster_snapshot**](ClusterSnapshotsApi.md#v1_delete_cluster_snapshot) | **DELETE** /v1/cluster/snapshots/{snapshotId} | Delete a Cluster Snapshot +[**v1_get_cluster_snapshot**](ClusterSnapshotsApi.md#v1_get_cluster_snapshot) | **GET** /v1/cluster/snapshots/{snapshotId} | Get Cluster Snapshot +[**v1_get_cluster_snapshots**](ClusterSnapshotsApi.md#v1_get_cluster_snapshots) | **GET** /v1/cluster/snapshots | Get Cluster Snapshots + + +# **v1_delete_cluster_snapshot** +> v1_delete_cluster_snapshot(snapshot_id) + +Delete a Cluster Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterSnapshotsApi(api_client) + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + + try: + # Delete a Cluster Snapshot + api_instance.v1_delete_cluster_snapshot(snapshot_id) + except Exception as e: + print("Exception when calling ClusterSnapshotsApi->v1_delete_cluster_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_cluster_snapshot** +> ClusterSnapshotV1 v1_get_cluster_snapshot(snapshot_id) + +Get Cluster Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.cluster_snapshot_v1 import ClusterSnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterSnapshotsApi(api_client) + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + + try: + # Get Cluster Snapshot + api_response = api_instance.v1_get_cluster_snapshot(snapshot_id) + print("The response of ClusterSnapshotsApi->v1_get_cluster_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterSnapshotsApi->v1_get_cluster_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot ID - uuid | + +### Return type + +[**ClusterSnapshotV1**](ClusterSnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_cluster_snapshots** +> SnapshotList v1_get_cluster_snapshots(request=request) + +Get Cluster Snapshots + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_list import SnapshotList +from corellium.models.snapshot_request import SnapshotRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ClusterSnapshotsApi(api_client) + request = corellium.SnapshotRequest() # SnapshotRequest | (optional) + + try: + # Get Cluster Snapshots + api_response = api_instance.v1_get_cluster_snapshots(request=request) + print("The response of ClusterSnapshotsApi->v1_get_cluster_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ClusterSnapshotsApi->v1_get_cluster_snapshots: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request** | [**SnapshotRequest**](.md)| | [optional] + +### Return type + +[**SnapshotList**](SnapshotList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ComputeNodeFile.md b/docs/ComputeNodeFile.md new file mode 100644 index 0000000..e224a69 --- /dev/null +++ b/docs/ComputeNodeFile.md @@ -0,0 +1,31 @@ +# ComputeNodeFile + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | Absolute path to the file on the compute node. | +**size** | **float** | Size of the file in bytes. | +**mtime** | **datetime** | Time the file was last modified. | + +## Example + +```python +from corellium.models.compute_node_file import ComputeNodeFile + +# TODO update the JSON string below +json = "{}" +# create an instance of ComputeNodeFile from a JSON string +compute_node_file_instance = ComputeNodeFile.from_json(json) +# print the JSON string representation of the object +print(ComputeNodeFile.to_json()) + +# convert the object into a dict +compute_node_file_dict = compute_node_file_instance.to_dict() +# create an instance of ComputeNodeFile from a dict +compute_node_file_from_dict = ComputeNodeFile.from_dict(compute_node_file_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ComputeNodeFileList.md b/docs/ComputeNodeFileList.md new file mode 100644 index 0000000..e8489e6 --- /dev/null +++ b/docs/ComputeNodeFileList.md @@ -0,0 +1,29 @@ +# ComputeNodeFileList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**files** | [**List[ComputeNodeFile]**](ComputeNodeFile.md) | Files that exist on disk, oldest first. Empty when there is nothing to read. | + +## Example + +```python +from corellium.models.compute_node_file_list import ComputeNodeFileList + +# TODO update the JSON string below +json = "{}" +# create an instance of ComputeNodeFileList from a JSON string +compute_node_file_list_instance = ComputeNodeFileList.from_json(json) +# print the JSON string representation of the object +print(ComputeNodeFileList.to_json()) + +# convert the object into a dict +compute_node_file_list_dict = compute_node_file_list_instance.to_dict() +# create an instance of ComputeNodeFileList from a dict +compute_node_file_list_from_dict = ComputeNodeFileList.from_dict(compute_node_file_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConfigApi.md b/docs/ConfigApi.md new file mode 100644 index 0000000..6f0e44f --- /dev/null +++ b/docs/ConfigApi.md @@ -0,0 +1,179 @@ +# corellium.ConfigApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_get_config**](ConfigApi.md#v3_get_config) | **GET** /v3/config | Get deployment configuration +[**v3_get_version**](ConfigApi.md#v3_get_version) | **GET** /v3/version | Get the platform version + + +# **v3_get_config** +> ConfigResponse v3_get_config() + +Get deployment configuration + +Returns how this Corellium deployment is set up: its version, whether it is on-site or cloud, whether it is air-gapped, the sign-in providers offered, limits such as the per-device snapshot limit (`snapshotLimit`) and the maximum kernel and ramdisk upload sizes, and which optional features are turned on. Needs no sign-in, so a client can call it first to adapt to the deployment before the user signs in. Build-time feature flags may add further boolean properties beyond those listed. + +### Example + + +```python +import corellium +from corellium.models.config_response import ConfigResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ConfigApi(api_client) + + try: + # Get deployment configuration + api_response = api_instance.v3_get_config() + print("The response of ConfigApi->v3_get_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConfigApi->v3_get_config: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ConfigResponse**](ConfigResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_version** +> DeploymentVersion v3_get_version() + +Get the platform version + +Returns which version of the Corellium platform you are talking to: the product version (for example `7.4.0-28212`), plus the build it came from. Include it when reporting a problem to support, or check it to see whether a feature you need is available on this deployment. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.deployment_version import DeploymentVersion +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ConfigApi(api_client) + + try: + # Get the platform version + api_response = api_instance.v3_get_version() + print("The response of ConfigApi->v3_get_version:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConfigApi->v3_get_version: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**DeploymentVersion**](DeploymentVersion.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Version and build identity of the running deployment. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ConfigAuthProvider.md b/docs/ConfigAuthProvider.md new file mode 100644 index 0000000..3509782 --- /dev/null +++ b/docs/ConfigAuthProvider.md @@ -0,0 +1,36 @@ +# ConfigAuthProvider + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Provider name for a given provider type. | +**provider_type** | **str** | Provider type. | +**default** | **bool** | Denotes whether or not this is the default auth provider. | +**label** | **str** | Provider label. | +**enabled** | **bool** | Denotes whether they're enabled or not. | +**authorization_url** | **str** | URL for provider auth. | +**identifier** | **str** | Provider identifier. | +**provider** | **str** | Auth provider. | + +## Example + +```python +from corellium.models.config_auth_provider import ConfigAuthProvider + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfigAuthProvider from a JSON string +config_auth_provider_instance = ConfigAuthProvider.from_json(json) +# print the JSON string representation of the object +print(ConfigAuthProvider.to_json()) + +# convert the object into a dict +config_auth_provider_dict = config_auth_provider_instance.to_dict() +# create an instance of ConfigAuthProvider from a dict +config_auth_provider_from_dict = ConfigAuthProvider.from_dict(config_auth_provider_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConfigResponse.md b/docs/ConfigResponse.md index cb3624d..c88d634 100644 --- a/docs/ConfigResponse.md +++ b/docs/ConfigResponse.md @@ -1,45 +1,66 @@ # ConfigResponse - +Cluster configuration. Build-time feature flags may add further boolean properties beyond those listed. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**on_site** | **bool** | Denotes whether it's an on-site install | [optional] -**network_types** | **list[str]** | Valid network types (e.g. \"nat\", \"bridged\", \"routed\") | [optional] -**network_type** | **str** | Current network type setting | [optional] -**show_domain_settings** | **bool** | Denotes whether to show domain settings | [optional] -**version** | **str** | Denotes the version | [optional] -**invalid_build** | **bool** | Denotes whether the build is invalid | [optional] -**sep_sim** | **bool** | Denotes whether sepSim is enabled | [optional] -**installer_available** | **bool** | Denotes whether installer is available | [optional] -**invoiced_publishable_key** | **str** | API publishable key to use for Invoiced | [optional] -**stripe_public_key** | **str** | Stripe public key | [optional] -**intercom_id** | **str** | Intercom app ID, also known as workspace ID | [optional] -**aux_webhook** | **str** | Webhook URL for aux | [optional] -**gtm_id** | **str** | Google Tag Manager | [optional] -**zapier_feedback_webhook** | **str** | Webhook URL to send feedback into Productboard automatically | [optional] -**zapier_bugs_webhook** | **str** | Webhook URL to send frontend errors to Jira automatically | [optional] -**billing_backend** | **str** | Default backend billing api name for new subscriptions (e.g. \"stripe\") | [optional] +**on_site** | **bool** | Denotes whether it's an on-site install. | +**network_types** | **List[str]** | Valid network types (e.g. \"nat\", \"bridged\", \"routed\"). | +**network_type** | **str** | Current network type setting. | +**show_domain_settings** | **bool** | Denotes whether to show domain settings. | +**version** | **str** | Denotes the version. | +**invalid_build** | **bool** | Denotes whether the build is invalid. | [optional] +**sep_sim** | **bool** | Denotes whether sepSim is enabled. | +**installer_available** | **bool** | Denotes whether installer is available. | +**stripe_public_key** | **str** | Stripe public key. | [optional] +**intercom_id** | **str** | Intercom app ID, also known as workspace ID. | [optional] +**gtm_id** | **str** | Google Tag Manager ID. | [optional] +**billing_backend** | **str** | Default backend billing API name for new subscriptions (e.g. \"stripe\"). | [optional] **maintenance** | [**ConfigResponseMaintenance**](ConfigResponseMaintenance.md) | | [optional] **logging** | [**Logging**](Logging.md) | | [optional] -**cloud_admin** | **str** | URL for cloud admin login | [optional] -**files_admin** | **str** | URL for files admin login | [optional] -**cloud_domain** | **str** | Cloud domain name (usually corellium.com or staging.corellium.com) | [optional] -**billing_domain** | **str** | Billing domain name | [optional] -**app_domain** | **str** | App domain name (usually app.corellium.com or app.staging.corellium.com) | [optional] -**max_network_monitor_file_size** | **str** | Maximum network monitor file size | [optional] -**enable_firmware_image_upload** | **bool** | Denotes whether users can upload firmware images | [optional] -**auth_providers** | [**list[AuthProvider]**](AuthProvider.md) | Auth providers | [optional] -**snapshot_limit** | **float** | Maximum number of snapshots to allow | [optional] -**max_kernel_size** | **float** | The maximum size, in bytes, (default: 100 MB) that an uploaded kernel should be | [optional] -**max_ramdisk_size** | **float** | The maximum size, in bytes, (default: 500 MB) that an uploaded ramdisk should be | [optional] -**charm_sdk** | **str** | Denotes whether charmSDK is enabled | [optional] -**trial** | [**Trial**](Trial.md) | | [optional] -**sentry_url** | **str** | Sentry URL | [optional] -**domain_authentication_providers** | **bool** | If enabled, adds the default providers in their current configuration | [optional] -**default_ssid** | **str** | The configured Default SSID from /etc/corellium/setup.json | [optional] +**cloud_admin** | **str** | URL for cloud admin login. | +**files_admin** | **str** | URL for files admin login. | +**cloud_domain** | **str** | Cloud domain name (usually corellium.com or staging.corellium.com). | [optional] +**billing_domain** | **str** | Billing domain name. | [optional] +**app_domain** | **str** | App domain name (usually app.corellium.com or app.staging.corellium.com). | [optional] +**max_network_monitor_file_size** | **str** | Maximum network monitor file size. | +**enable_firmware_image_upload** | **bool** | Denotes whether users can upload firmware images. | +**auth_providers** | [**List[ConfigAuthProvider]**](ConfigAuthProvider.md) | Auth providers. | +**welcome_message** | **str** | Domain welcome message, when enabled. | [optional] +**snapshot_limit** | **float** | Maximum number of snapshots to allow. | +**max_kernel_size** | **float** | The maximum size, in bytes, (default: 100 MiB) that an uploaded kernel should be. | +**max_ramdisk_size** | **float** | The maximum size, in bytes, (default: 500 MiB) that an uploaded ramdisk should be. | +**charm_sdk** | **bool** | Denotes whether charmSDK is enabled. | [optional] +**trial** | [**Trial**](Trial.md) | | +**sentry_url** | **str** | Sentry URL. | [optional] +**domain_authentication_providers** | **bool** | If enabled, adds the default providers in their current configuration. | [optional] +**remote_gpu** | **bool** | Whether remote GPU is enabled. | [optional] +**default_ssid** | **str** | The configured default SSID from /etc/corellium/setup.json. | +**aws_marketplace** | **bool** | Whether this is an AWS Marketplace deployment. | [optional] +**open_g_apps_binary** | **str** | OpenGApps binary location. | [optional] +**air_gapped** | **bool** | Whether the deployment is airgapped. | [optional] +**coordinator_config** | [**CoordinatorConfig**](CoordinatorConfig.md) | Partial coordinator configuration. | +**ai_tools_config** | [**ConfigResponseAiToolsConfig**](ConfigResponseAiToolsConfig.md) | | [optional] + +## Example + +```python +from corellium.models.config_response import ConfigResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfigResponse from a JSON string +config_response_instance = ConfigResponse.from_json(json) +# print the JSON string representation of the object +print(ConfigResponse.to_json()) +# convert the object into a dict +config_response_dict = config_response_instance.to_dict() +# create an instance of ConfigResponse from a dict +config_response_from_dict = ConfigResponse.from_dict(config_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConfigResponseAiToolsConfig.md b/docs/ConfigResponseAiToolsConfig.md new file mode 100644 index 0000000..5a6d394 --- /dev/null +++ b/docs/ConfigResponseAiToolsConfig.md @@ -0,0 +1,30 @@ +# ConfigResponseAiToolsConfig + +Configuration for all cluster-hosted AI tools. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ai_enabled** | **bool** | Whether cluster-hosted AI tools are enabled. | [optional] + +## Example + +```python +from corellium.models.config_response_ai_tools_config import ConfigResponseAiToolsConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfigResponseAiToolsConfig from a JSON string +config_response_ai_tools_config_instance = ConfigResponseAiToolsConfig.from_json(json) +# print the JSON string representation of the object +print(ConfigResponseAiToolsConfig.to_json()) + +# convert the object into a dict +config_response_ai_tools_config_dict = config_response_ai_tools_config_instance.to_dict() +# create an instance of ConfigResponseAiToolsConfig from a dict +config_response_ai_tools_config_from_dict = ConfigResponseAiToolsConfig.from_dict(config_response_ai_tools_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConfigResponseMaintenance.md b/docs/ConfigResponseMaintenance.md index db3ef06..826a39e 100644 --- a/docs/ConfigResponseMaintenance.md +++ b/docs/ConfigResponseMaintenance.md @@ -1,13 +1,31 @@ # ConfigResponseMaintenance -Denotes whether the server is undergoing maintenance +Maintenance details when the server is undergoing maintenance; null/absent otherwise. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **str** | Maintenance message | [optional] -**header** | **str** | Maintenance header | [optional] +**message** | **str** | Maintenance message. | +**header** | **str** | Maintenance header. | + +## Example + +```python +from corellium.models.config_response_maintenance import ConfigResponseMaintenance + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfigResponseMaintenance from a JSON string +config_response_maintenance_instance = ConfigResponseMaintenance.from_json(json) +# print the JSON string representation of the object +print(ConfigResponseMaintenance.to_json()) +# convert the object into a dict +config_response_maintenance_dict = config_response_maintenance_instance.to_dict() +# create an instance of ConfigResponseMaintenance from a dict +config_response_maintenance_from_dict = ConfigResponseMaintenance.from_dict(config_response_maintenance_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConfigResponseV1.md b/docs/ConfigResponseV1.md new file mode 100644 index 0000000..4c6c135 --- /dev/null +++ b/docs/ConfigResponseV1.md @@ -0,0 +1,61 @@ +# ConfigResponseV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**on_site** | **bool** | Denotes whether it's an on-site install | [optional] +**network_types** | **List[str]** | Valid network types (e.g. \"nat\", \"bridged\", \"routed\") | [optional] +**network_type** | **str** | Current network type setting | [optional] +**show_domain_settings** | **bool** | Denotes whether to show domain settings | [optional] +**version** | **str** | Denotes the version | [optional] +**invalid_build** | **bool** | Denotes whether the build is invalid | [optional] +**sep_sim** | **bool** | Denotes whether sepSim is enabled | [optional] +**installer_available** | **bool** | Denotes whether installer is available | [optional] +**invoiced_publishable_key** | **str** | API publishable key to use for Invoiced | [optional] +**stripe_public_key** | **str** | Stripe public key | [optional] +**intercom_id** | **str** | Intercom app ID, also known as workspace ID | [optional] +**gtm_id** | **str** | Google Tag Manager | [optional] +**billing_backend** | **str** | Default backend billing api name for new subscriptions (e.g. \"stripe\") | [optional] +**maintenance** | **object** | Denotes whether the server is undergoing maintenance (legacy v1 shape; v3 returns Maintenance|null) | [optional] +**logging** | [**LoggingV1**](LoggingV1.md) | | [optional] +**cloud_admin** | **str** | URL for cloud admin login | [optional] +**files_admin** | **str** | URL for files admin login | [optional] +**cloud_domain** | **str** | Cloud domain name (usually corellium.com or staging.corellium.com) | [optional] +**billing_domain** | **str** | Billing domain name | [optional] +**app_domain** | **str** | App domain name (usually app.corellium.com or app.staging.corellium.com) | [optional] +**max_network_monitor_file_size** | **str** | Maximum network monitor file size | [optional] +**enable_firmware_image_upload** | **bool** | Denotes whether users can upload firmware images | [optional] +**auth_providers** | [**List[AuthProviderV1]**](AuthProviderV1.md) | Auth providers | [optional] +**snapshot_limit** | **float** | Maximum number of snapshots to allow | [optional] +**max_kernel_size** | **float** | The maximum size, in bytes, (default: 100 MiB) that an uploaded kernel should be | [optional] +**max_ramdisk_size** | **float** | The maximum size, in bytes, (default: 500 MiB) that an uploaded ramdisk should be | [optional] +**charm_sdk** | **bool** | Denotes whether charmSDK is enabled | [optional] +**trial** | [**TrialV1**](TrialV1.md) | | [optional] +**sentry_url** | **str** | Sentry URL | [optional] +**domain_authentication_providers** | **bool** | If enabled, adds the default providers in their current configuration | [optional] +**default_ssid** | **str** | The configured Default SSID from /etc/corellium/setup.json | [optional] +**coordinator_config** | [**CoordinatorConfigV1**](CoordinatorConfigV1.md) | | [optional] + +## Example + +```python +from corellium.models.config_response_v1 import ConfigResponseV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ConfigResponseV1 from a JSON string +config_response_v1_instance = ConfigResponseV1.from_json(json) +# print the JSON string representation of the object +print(ConfigResponseV1.to_json()) + +# convert the object into a dict +config_response_v1_dict = config_response_v1_instance.to_dict() +# create an instance of ConfigResponseV1 from a dict +config_response_v1_from_dict = ConfigResponseV1.from_dict(config_response_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConfigV1Api.md b/docs/ConfigV1Api.md new file mode 100644 index 0000000..e607c95 --- /dev/null +++ b/docs/ConfigV1Api.md @@ -0,0 +1,101 @@ +# corellium.ConfigV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_get_config**](ConfigV1Api.md#v1_get_config) | **GET** /v1/config | Get all configs + + +# **v1_get_config** +> ConfigResponseV1 v1_get_config() + +Get all configs + +### Example + + +```python +import corellium +from corellium.models.config_response_v1 import ConfigResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ConfigV1Api(api_client) + + try: + # Get all configs + api_response = api_instance.v1_get_config() + print("The response of ConfigV1Api->v1_get_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ConfigV1Api->v1_get_config: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ConfigResponseV1**](ConfigResponseV1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CoordinatorConfig.md b/docs/CoordinatorConfig.md new file mode 100644 index 0000000..ca20da8 --- /dev/null +++ b/docs/CoordinatorConfig.md @@ -0,0 +1,30 @@ +# CoordinatorConfig + +Partial coordinator configuration to update. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**usb_media_access_enabled** | **bool** | Whether read-only access to removable USB media is enabled. | [optional] + +## Example + +```python +from corellium.models.coordinator_config import CoordinatorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of CoordinatorConfig from a JSON string +coordinator_config_instance = CoordinatorConfig.from_json(json) +# print the JSON string representation of the object +print(CoordinatorConfig.to_json()) + +# convert the object into a dict +coordinator_config_dict = coordinator_config_instance.to_dict() +# create an instance of CoordinatorConfig from a dict +coordinator_config_from_dict = CoordinatorConfig.from_dict(coordinator_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CoordinatorConfigV1.md b/docs/CoordinatorConfigV1.md new file mode 100644 index 0000000..4ee9394 --- /dev/null +++ b/docs/CoordinatorConfigV1.md @@ -0,0 +1,30 @@ +# CoordinatorConfigV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**usb_media_access_enabled** | **bool** | Designates whether read-only access to removable USB media is enabled | [optional] + +## Example + +```python +from corellium.models.coordinator_config_v1 import CoordinatorConfigV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of CoordinatorConfigV1 from a JSON string +coordinator_config_v1_instance = CoordinatorConfigV1.from_json(json) +# print the JSON string representation of the object +print(CoordinatorConfigV1.to_json()) + +# convert the object into a dict +coordinator_config_v1_dict = coordinator_config_v1_instance.to_dict() +# create an instance of CoordinatorConfigV1 from a dict +coordinator_config_v1_from_dict = CoordinatorConfigV1.from_dict(coordinator_config_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CoreTraceApi.md b/docs/CoreTraceApi.md new file mode 100644 index 0000000..82f4885 --- /dev/null +++ b/docs/CoreTraceApi.md @@ -0,0 +1,447 @@ +# corellium.CoreTraceApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_clear_core_trace**](CoreTraceApi.md#v3_clear_core_trace) | **DELETE** /v3/instances/{instanceId}/strace | Clear CoreTrace output +[**v3_list_threads**](CoreTraceApi.md#v3_list_threads) | **GET** /v3/instances/{instanceId}/strace/thread-list | List running processes (CoreTrace) +[**v3_start_core_trace**](CoreTraceApi.md#v3_start_core_trace) | **POST** /v3/instances/{instanceId}/strace/enable | Start CoreTrace +[**v3_stop_core_trace**](CoreTraceApi.md#v3_stop_core_trace) | **POST** /v3/instances/{instanceId}/strace/disable | Stop CoreTrace +[**v3_strace_preauthorize**](CoreTraceApi.md#v3_strace_preauthorize) | **GET** /v3/instances/{instanceId}/strace-authorize | Get a CoreTrace download token + + +# **v3_clear_core_trace** +> v3_clear_core_trace(instance_id) + +Clear CoreTrace output + +Deletes the CoreTrace (system call trace) output recorded so far on this device, so the next download contains only new activity. Tracing keeps running if it is on. Requires the CoreTrace license feature (403 otherwise). An unknown `instanceId` is a successful no-op that returns 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Clear CoreTrace output + api_instance.v3_clear_core_trace(instance_id) + except Exception as e: + print("Exception when calling CoreTraceApi->v3_clear_core_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_threads** +> List[KernelTask] v3_list_threads(instance_id) + +List running processes (CoreTrace) + +Lists the processes running on the device with their threads, including each process's `processId` and name and each thread's `taskId`. Use it to pick which processes to trace with CoreTrace (set `straceFilter` on `v3PatchInstance`). The device must be running. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.kernel_task import KernelTask +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # List running processes (CoreTrace) + api_response = api_instance.v3_list_threads(instance_id) + print("The response of CoreTraceApi->v3_list_threads:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CoreTraceApi->v3_list_threads: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**List[KernelTask]**](KernelTask.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Threads. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_core_trace** +> v3_start_core_trace(instance_id) + +Start CoreTrace + +Starts CoreTrace on a running device. CoreTrace records the system calls made by processes on the device, so you can see what an app does at the operating-system level (files opened, network connections, processes started). + +**Workflow:** +1. `v3StartCoreTrace` (this call). +2. Use the device or app you want to observe. Optionally list running processes with `v3ListThreads`, and limit tracing to some of them with `straceFilter` on `v3PatchInstance`. +3. `v3StopCoreTrace`. +4. `v3StracePreauthorize` to get a download token, then download the trace. +5. `v3ClearCoreTrace` to discard it before the next run. + +Returns 400 if this device does not support CoreTrace, and 403 if your license does not include it. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Start CoreTrace + api_instance.v3_start_core_trace(instance_id) + except Exception as e: + print("Exception when calling CoreTraceApi->v3_start_core_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_stop_core_trace** +> v3_stop_core_trace(instance_id) + +Stop CoreTrace + +Stops CoreTrace on this device. The trace recorded so far is kept, so you can download it with `v3StracePreauthorize`. Requires the CoreTrace license feature. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Stop CoreTrace + api_instance.v3_stop_core_trace(instance_id) + except Exception as e: + print("Exception when calling CoreTraceApi->v3_stop_core_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_strace_preauthorize** +> Token v3_strace_preauthorize(instance_id) + +Get a CoreTrace download token + +Returns a short-lived token that authorizes downloading this device's CoreTrace output without an `Authorization` header. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's trace and expires when your current session token expires. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.token import Token +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get a CoreTrace download token + api_response = api_instance.v3_strace_preauthorize(instance_id) + print("The response of CoreTraceApi->v3_strace_preauthorize:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CoreTraceApi->v3_strace_preauthorize: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**Token**](Token.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CoreTraceV1Api.md b/docs/CoreTraceV1Api.md new file mode 100644 index 0000000..23aceae --- /dev/null +++ b/docs/CoreTraceV1Api.md @@ -0,0 +1,344 @@ +# corellium.CoreTraceV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_clear_core_trace**](CoreTraceV1Api.md#v1_clear_core_trace) | **DELETE** /v1/instances/{instanceId}/strace | Clear CoreTrace logs +[**v1_list_threads**](CoreTraceV1Api.md#v1_list_threads) | **GET** /v1/instances/{instanceId}/strace/thread-list | Get Running Threads (CoreTrace) +[**v1_start_core_trace**](CoreTraceV1Api.md#v1_start_core_trace) | **POST** /v1/instances/{instanceId}/strace/enable | Start CoreTrace on an instance +[**v1_stop_core_trace**](CoreTraceV1Api.md#v1_stop_core_trace) | **POST** /v1/instances/{instanceId}/strace/disable | Stop CoreTrace on an instance. + + +# **v1_clear_core_trace** +> v1_clear_core_trace(instance_id) + +Clear CoreTrace logs + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Clear CoreTrace logs + api_instance.v1_clear_core_trace(instance_id) + except Exception as e: + print("Exception when calling CoreTraceV1Api->v1_clear_core_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_threads** +> List[KernelTaskV1] v1_list_threads(instance_id) + +Get Running Threads (CoreTrace) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.kernel_task_v1 import KernelTaskV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get Running Threads (CoreTrace) + api_response = api_instance.v1_list_threads(instance_id) + print("The response of CoreTraceV1Api->v1_list_threads:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CoreTraceV1Api->v1_list_threads: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**List[KernelTaskV1]**](KernelTaskV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Threads | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_start_core_trace** +> v1_start_core_trace(instance_id) + +Start CoreTrace on an instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Start CoreTrace on an instance + api_instance.v1_start_core_trace(instance_id) + except Exception as e: + print("Exception when calling CoreTraceV1Api->v1_start_core_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_stop_core_trace** +> v1_stop_core_trace(instance_id) + +Stop CoreTrace on an instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.CoreTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Stop CoreTrace on an instance. + api_instance.v1_stop_core_trace(instance_id) + except Exception as e: + print("Exception when calling CoreTraceV1Api->v1_stop_core_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CorelliumApi.md b/docs/CorelliumApi.md deleted file mode 100644 index f1520c2..0000000 --- a/docs/CorelliumApi.md +++ /dev/null @@ -1,14839 +0,0 @@ -# corellium_api.CorelliumApi - -All URIs are relative to *https://app.corellium.com/api* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**api_v1_cluster_nodes_node_id_console_get**](CorelliumApi.md#api_v1_cluster_nodes_node_id_console_get) | **GET** /api/v1/cluster/nodes/:nodeId/console | Access node console via SSH -[**api_v1_interconnects_get**](CorelliumApi.md#api_v1_interconnects_get) | **GET** /api/v1/interconnects | Get all I/O Interconnects -[**api_v1_interconnects_interconnect_id_delete**](CorelliumApi.md#api_v1_interconnects_interconnect_id_delete) | **DELETE** /api/v1/interconnects/:interconnectId | Delete I/O Interconnect -[**api_v1_interconnects_interconnect_id_get**](CorelliumApi.md#api_v1_interconnects_interconnect_id_get) | **GET** /api/v1/interconnects/:interconnectId | Get Interconnect -[**api_v1_interconnects_interconnect_id_patch**](CorelliumApi.md#api_v1_interconnects_interconnect_id_patch) | **PATCH** /api/v1/interconnects/:interconnectId | Partial Update Interconnect -[**api_v1_interconnects_interconnect_id_put**](CorelliumApi.md#api_v1_interconnects_interconnect_id_put) | **PUT** /api/v1/interconnects/:interconnectId | Update Interconnect -[**api_v1_interconnects_post**](CorelliumApi.md#api_v1_interconnects_post) | **POST** /api/v1/interconnects | Create I/O Interconnect -[**create_assessment**](CorelliumApi.md#create_assessment) | **POST** /v1/services/matrix/{instanceId}/assessments | Create assessment -[**delete_assessment**](CorelliumApi.md#delete_assessment) | **DELETE** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Delete assessment -[**download_report**](CorelliumApi.md#download_report) | **GET** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/download | Download report -[**get_assessment_by_id**](CorelliumApi.md#get_assessment_by_id) | **GET** /v1/services/matrix/{instanceId}/assessments/{assessmentId} | Get assessment by ID -[**get_assessments_by_instance_id**](CorelliumApi.md#get_assessments_by_instance_id) | **GET** /v1/services/matrix/{instanceId}/instances/{instanceId}/assessments | Get assessments by instanceId -[**run_tests**](CorelliumApi.md#run_tests) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/test | Update assessment state and execute MATRIX tests -[**start_monitoring**](CorelliumApi.md#start_monitoring) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/start | Update assessment state and begin device monitoring -[**stop_monitoring**](CorelliumApi.md#stop_monitoring) | **POST** /v1/services/matrix/{instanceId}/assessments/{assessmentId}/stop | Update assessment state and stop device monitoring -[**v1_accept_shared_snapshot**](CorelliumApi.md#v1_accept_shared_snapshot) | **POST** /v1/snapshots/accept | Accept a snapshot shared with you -[**v1_activity_export**](CorelliumApi.md#v1_activity_export) | **POST** /v1/activity/export | Start activity export -[**v1_activity_list**](CorelliumApi.md#v1_activity_list) | **GET** /v1/activity | Get resource activities -[**v1_add_project_key**](CorelliumApi.md#v1_add_project_key) | **POST** /v1/projects/{projectId}/keys | Add Project Authorized Key -[**v1_add_team_role_to_project**](CorelliumApi.md#v1_add_team_role_to_project) | **PUT** /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Add team role to project -[**v1_add_user_role_to_project**](CorelliumApi.md#v1_add_user_role_to_project) | **PUT** /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Add user role to project -[**v1_add_user_to_team**](CorelliumApi.md#v1_add_user_to_team) | **PUT** /v1/teams/{teamId}/users/{userId} | Add user to team -[**v1_agent_app_ready**](CorelliumApi.md#v1_agent_app_ready) | **GET** /v1/instances/{instanceId}/agent/v1/app/ready | Check if App subsystem is ready -[**v1_agent_delete_file**](CorelliumApi.md#v1_agent_delete_file) | **DELETE** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Delete a File on VM -[**v1_agent_get_file**](CorelliumApi.md#v1_agent_get_file) | **GET** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Download a File from VM -[**v1_agent_get_temp_filename**](CorelliumApi.md#v1_agent_get_temp_filename) | **POST** /v1/instances/{instanceId}/agent/v1/file/temp | Get the path for a new temp file -[**v1_agent_install_app**](CorelliumApi.md#v1_agent_install_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/install | Install App at path -[**v1_agent_install_profile**](CorelliumApi.md#v1_agent_install_profile) | **POST** /v1/instances/{instanceId}/agent/v1/profile/install | Install a Profile to VM -[**v1_agent_kill_app**](CorelliumApi.md#v1_agent_kill_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/kill | Kill an App -[**v1_agent_list_app_icons**](CorelliumApi.md#v1_agent_list_app_icons) | **GET** /v1/instances/{instanceId}/agent/v1/app/icons | List App Icons -[**v1_agent_list_apps**](CorelliumApi.md#v1_agent_list_apps) | **GET** /v1/instances/{instanceId}/agent/v1/app/apps | List Apps -[**v1_agent_list_apps_status**](CorelliumApi.md#v1_agent_list_apps_status) | **GET** /v1/instances/{instanceId}/agent/v1/app/apps/update | List Apps Status -[**v1_agent_list_profiles**](CorelliumApi.md#v1_agent_list_profiles) | **GET** /v1/instances/{instanceId}/agent/v1/profile/profiles | List Profiles -[**v1_agent_run_app**](CorelliumApi.md#v1_agent_run_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/run | Run an App -[**v1_agent_set_file_attributes**](CorelliumApi.md#v1_agent_set_file_attributes) | **PATCH** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Change Attrs of a File on VM -[**v1_agent_system_get_adb_auth**](CorelliumApi.md#v1_agent_system_get_adb_auth) | **GET** /v1/instances/{instanceId}/agent/v1/system/adbauth | Get ADB Auth Setting (AOSP only) -[**v1_agent_system_get_network**](CorelliumApi.md#v1_agent_system_get_network) | **GET** /v1/instances/{instanceId}/agent/v1/system/network | Get IP of eth0 (AOSP only) -[**v1_agent_system_get_prop**](CorelliumApi.md#v1_agent_system_get_prop) | **POST** /v1/instances/{instanceId}/agent/v1/system/getprop | Get System Property (AOSP only) -[**v1_agent_system_install_open_g_apps**](CorelliumApi.md#v1_agent_system_install_open_g_apps) | **POST** /v1/instances/{instanceId}/agent/v1/system/install-opengapps | Install OpenGApps (AOSP only) -[**v1_agent_system_lock**](CorelliumApi.md#v1_agent_system_lock) | **POST** /v1/instances/{instanceId}/agent/v1/system/lock | Lock Device (iOS Only) -[**v1_agent_system_set_adb_auth**](CorelliumApi.md#v1_agent_system_set_adb_auth) | **PUT** /v1/instances/{instanceId}/agent/v1/system/adbauth | Set ADB Auth Setting (AOSP only) -[**v1_agent_system_set_hostname**](CorelliumApi.md#v1_agent_system_set_hostname) | **POST** /v1/instances/{instanceId}/agent/v1/system/setHostname | Set Hostname of instance -[**v1_agent_system_shutdown**](CorelliumApi.md#v1_agent_system_shutdown) | **POST** /v1/instances/{instanceId}/agent/v1/system/shutdown | Instruct VM to halt -[**v1_agent_system_unlock**](CorelliumApi.md#v1_agent_system_unlock) | **POST** /v1/instances/{instanceId}/agent/v1/system/unlock | Unlock Device (iOS Only) -[**v1_agent_uninstall_app**](CorelliumApi.md#v1_agent_uninstall_app) | **POST** /v1/instances/{instanceId}/agent/v1/app/apps/{bundleId}/uninstall | Uninstall an App -[**v1_agent_uninstall_profile**](CorelliumApi.md#v1_agent_uninstall_profile) | **DELETE** /v1/instances/{instanceId}/agent/v1/profile/profiles/{profileId} | Uninstall a Profile from VM -[**v1_agent_upload_file**](CorelliumApi.md#v1_agent_upload_file) | **PUT** /v1/instances/{instanceId}/agent/v1/file/device/{filePath} | Upload a file to VM -[**v1_attach_instance_interface**](CorelliumApi.md#v1_attach_instance_interface) | **POST** /v1/instances/{instanceId}/interfaces | Attach I/O Interface -[**v1_auth_login**](CorelliumApi.md#v1_auth_login) | **POST** /v1/auth/login | Log In -[**v1_btrace_preauthorize**](CorelliumApi.md#v1_btrace_preauthorize) | **GET** /v1/instances/{instanceId}/btrace-authorize | Pre-authorize an btrace download -[**v1_clear_core_trace**](CorelliumApi.md#v1_clear_core_trace) | **DELETE** /v1/instances/{instanceId}/strace | Clear CoreTrace logs -[**v1_clear_hyper_trace**](CorelliumApi.md#v1_clear_hyper_trace) | **DELETE** /v1/instances/{instanceId}/btrace | Clear HyperTrace logs -[**v1_clear_hyper_trace_hooks**](CorelliumApi.md#v1_clear_hyper_trace_hooks) | **POST** /v1/instances/{instanceId}/hooks/clear | Clear Hooks on an instance -[**v1_clear_instance_panics**](CorelliumApi.md#v1_clear_instance_panics) | **DELETE** /v1/instances/{instanceId}/panics | Clear Panics -[**v1_cluster_firmware_service_devices_get**](CorelliumApi.md#v1_cluster_firmware_service_devices_get) | **GET** /v1/cluster/firmware-service/devices | Fetch devices from the firmware service -[**v1_cluster_firmware_service_firmware_assets_asset_url_delete**](CorelliumApi.md#v1_cluster_firmware_service_firmware_assets_asset_url_delete) | **DELETE** /v1/cluster/firmware-service/firmware-assets/{assetURL} | Delete a firmware asset by its URL -[**v1_cluster_firmware_service_firmware_assets_asset_url_extended_get**](CorelliumApi.md#v1_cluster_firmware_service_firmware_assets_asset_url_extended_get) | **GET** /v1/cluster/firmware-service/firmware-assets/{assetURL}/extended | Fetch extended firmware-asset details including instances and associated IPSWs -[**v1_cluster_firmware_service_firmware_assets_get**](CorelliumApi.md#v1_cluster_firmware_service_firmware_assets_get) | **GET** /v1/cluster/firmware-service/firmware-assets | Fetch firmware assets from the firmware service -[**v1_cluster_firmware_service_firmware_assets_post**](CorelliumApi.md#v1_cluster_firmware_service_firmware_assets_post) | **POST** /v1/cluster/firmware-service/firmware-assets | Add firmware assets via the firmware service -[**v1_cluster_firmware_service_firmwares_filename_delete**](CorelliumApi.md#v1_cluster_firmware_service_firmwares_filename_delete) | **DELETE** /v1/cluster/firmware-service/firmwares/{filename} | Delete a firmware by filename from the firmware service -[**v1_cluster_firmware_service_firmwares_get**](CorelliumApi.md#v1_cluster_firmware_service_firmwares_get) | **GET** /v1/cluster/firmware-service/firmwares | Fetch firmwares from the firmware service -[**v1_cluster_nodes_get**](CorelliumApi.md#v1_cluster_nodes_get) | **GET** /v1/cluster/nodes | List servers in the cluster -[**v1_cluster_nodes_node_id_get**](CorelliumApi.md#v1_cluster_nodes_node_id_get) | **GET** /v1/cluster/nodes/:nodeId | Get node details by ID -[**v1_create_domain_auth_provider**](CorelliumApi.md#v1_create_domain_auth_provider) | **POST** /v1/domain/{domainId}/auth | Create a new auth provider for a domain -[**v1_create_hook**](CorelliumApi.md#v1_create_hook) | **POST** /v1/instances/{instanceId}/hooks | Create hypervisor hook for Instance -[**v1_create_image**](CorelliumApi.md#v1_create_image) | **POST** /v1/images | Create a new Image -[**v1_create_instance**](CorelliumApi.md#v1_create_instance) | **POST** /v1/instances | Create Instance -[**v1_create_network_connection**](CorelliumApi.md#v1_create_network_connection) | **POST** /v1/network/connections | Create a new Network Connection -[**v1_create_project**](CorelliumApi.md#v1_create_project) | **POST** /v1/projects | Create a Project -[**v1_create_snapshot**](CorelliumApi.md#v1_create_snapshot) | **POST** /v1/instances/{instanceId}/snapshots | Create Instance Snapshot -[**v1_create_user**](CorelliumApi.md#v1_create_user) | **POST** /v1/users | Create User -[**v1_delete_domain_auth_provider**](CorelliumApi.md#v1_delete_domain_auth_provider) | **DELETE** /v1/domain/{domainId}/auth/{providerId} | Delete an auth provider from a domain -[**v1_delete_extension**](CorelliumApi.md#v1_delete_extension) | **DELETE** /v1/extensions/{extensionId} | Delete an existing extension -[**v1_delete_hook**](CorelliumApi.md#v1_delete_hook) | **DELETE** /v1/hooks/{hookId} | Delete an existing hypervisor hook -[**v1_delete_image**](CorelliumApi.md#v1_delete_image) | **DELETE** /v2/images/{imageId} | Delete Image -[**v1_delete_instance**](CorelliumApi.md#v1_delete_instance) | **DELETE** /v1/instances/{instanceId} | Remove Instance -[**v1_delete_instance_snapshot**](CorelliumApi.md#v1_delete_instance_snapshot) | **DELETE** /v1/instances/{instanceId}/snapshots/{snapshotId} | Delete an Instance Snapshot -[**v1_delete_network_connection**](CorelliumApi.md#v1_delete_network_connection) | **DELETE** /v1/network/connections/{id} | Delete an existing Network Connection -[**v1_delete_project**](CorelliumApi.md#v1_delete_project) | **DELETE** /v1/projects/{projectId} | Delete a Project -[**v1_delete_snapshot**](CorelliumApi.md#v1_delete_snapshot) | **DELETE** /v1/snapshots/{snapshotId} | Delete a Snapshot -[**v1_delete_snapshot_permissions**](CorelliumApi.md#v1_delete_snapshot_permissions) | **DELETE** /v1/snapshots/{snapshotId}/permissions | Delete member(s) -[**v1_delete_user**](CorelliumApi.md#v1_delete_user) | **DELETE** /v1/users/{userId} | Delete User -[**v1_detach_instance_interface**](CorelliumApi.md#v1_detach_instance_interface) | **DELETE** /v1/instances/{instanceId}/interfaces/{interfaceId} | Detach I/O Interface -[**v1_disable_expose_port**](CorelliumApi.md#v1_disable_expose_port) | **POST** /v1/instances/{instanceId}/exposeport/disable | Disable an exposed port on an instance for device access. -[**v1_download_activity**](CorelliumApi.md#v1_download_activity) | **GET** /v1/activity/export/{taskId}/download | Download activity -[**v1_enable_expose_port**](CorelliumApi.md#v1_enable_expose_port) | **POST** /v1/instances/{instanceId}/exposeport/enable | Enable an exposed port on an instance for device access. -[**v1_execute_hyper_trace_hooks**](CorelliumApi.md#v1_execute_hyper_trace_hooks) | **POST** /v1/instances/{instanceId}/hooks/execute | Execute Hooks on an instance -[**v1_get_activity_export_status**](CorelliumApi.md#v1_get_activity_export_status) | **GET** /v1/activity/export/{taskId} | Get export task status -[**v1_get_activity_export_tasks**](CorelliumApi.md#v1_get_activity_export_tasks) | **GET** /v1/activity/export | Get all export tasks for user -[**v1_get_config**](CorelliumApi.md#v1_get_config) | **GET** /v1/config | Get all configs -[**v1_get_domain_auth_providers**](CorelliumApi.md#v1_get_domain_auth_providers) | **GET** /v1/domain/{domainId}/auth | Return all configured auth providers for a domain (including globally configured providers) -[**v1_get_extension_by_id**](CorelliumApi.md#v1_get_extension_by_id) | **GET** /v1/extensions/{extensionId} | Get extension by id -[**v1_get_extensions**](CorelliumApi.md#v1_get_extensions) | **GET** /v1/extensions | Get all extensions -[**v1_get_hook_by_id**](CorelliumApi.md#v1_get_hook_by_id) | **GET** /v1/hooks/{hookId} | Get hypervisor hook by id -[**v1_get_hooks**](CorelliumApi.md#v1_get_hooks) | **GET** /v1/instances/{instanceId}/hooks | Get all hypervisor hooks for Instance -[**v1_get_image**](CorelliumApi.md#v1_get_image) | **GET** /v1/images/{imageId} | Get Image Metadata -[**v1_get_images**](CorelliumApi.md#v1_get_images) | **GET** /v1/images | Get all Images Metadata -[**v1_get_install_firmware_status**](CorelliumApi.md#v1_get_install_firmware_status) | **GET** /v1/images/install-firmware/:taskId | Query install firmware request status. -[**v1_get_instance**](CorelliumApi.md#v1_get_instance) | **GET** /v1/instances/{instanceId} | Get Instance -[**v1_get_instance_console**](CorelliumApi.md#v1_get_instance_console) | **GET** /v1/instances/{instanceId}/console | Get console websocket URL -[**v1_get_instance_console_log**](CorelliumApi.md#v1_get_instance_console_log) | **GET** /v1/instances/{instanceId}/consoleLog | Get Console Log -[**v1_get_instance_gpios**](CorelliumApi.md#v1_get_instance_gpios) | **GET** /v1/instances/{instanceId}/gpios | Get Instance GPIOs -[**v1_get_instance_panics**](CorelliumApi.md#v1_get_instance_panics) | **GET** /v1/instances/{instanceId}/panics | Get Panics -[**v1_get_instance_peripherals**](CorelliumApi.md#v1_get_instance_peripherals) | **GET** /v1/instances/{instanceId}/peripherals | Get Instance Peripherals -[**v1_get_instance_screenshot**](CorelliumApi.md#v1_get_instance_screenshot) | **GET** /v1/instances/{instanceId}/screenshot.{format} | Get Instance Screenshot -[**v1_get_instance_snapshot**](CorelliumApi.md#v1_get_instance_snapshot) | **GET** /v1/instances/{instanceId}/snapshots/{snapshotId} | Get Instance Snapshot -[**v1_get_instance_snapshots**](CorelliumApi.md#v1_get_instance_snapshots) | **GET** /v1/instances/{instanceId}/snapshots | Get Instance Snapshots -[**v1_get_instances**](CorelliumApi.md#v1_get_instances) | **GET** /v1/instances | Get Instances -[**v1_get_model_software**](CorelliumApi.md#v1_get_model_software) | **GET** /v1/models/{model}/software | Get Software for Model -[**v1_get_models**](CorelliumApi.md#v1_get_models) | **GET** /v1/models | Get Supported Models -[**v1_get_network_connection**](CorelliumApi.md#v1_get_network_connection) | **GET** /v1/network/connections/{id} | Return the configuration and per project statuses for a single network provider. -[**v1_get_project**](CorelliumApi.md#v1_get_project) | **GET** /v1/projects/{projectId} | Get a Project -[**v1_get_project_instances**](CorelliumApi.md#v1_get_project_instances) | **GET** /v1/projects/{projectId}/instances | Get Instances in Project -[**v1_get_project_keys**](CorelliumApi.md#v1_get_project_keys) | **GET** /v1/projects/{projectId}/keys | Get Project Authorized Keys -[**v1_get_project_network_log**](CorelliumApi.md#v1_get_project_network_log) | **GET** /v1/projects/{projectId}/network/log | Retrieve the network connection log for a project -[**v1_get_project_network_status**](CorelliumApi.md#v1_get_project_network_status) | **GET** /v1/projects/{projectId}/network/status | Retrieve the network connection status for a project -[**v1_get_project_vpn_config**](CorelliumApi.md#v1_get_project_vpn_config) | **GET** /v1/projects/{projectId}/vpnconfig/{format} | Get Project VPN Configuration -[**v1_get_projects**](CorelliumApi.md#v1_get_projects) | **GET** /v1/projects | Get Projects -[**v1_get_reset_link_info**](CorelliumApi.md#v1_get_reset_link_info) | **GET** /v1/users/reset-link-info | Send Password Reset Link Info -[**v1_get_shared_snapshots**](CorelliumApi.md#v1_get_shared_snapshots) | **GET** /v1/snapshots/shared | Fetch shared snapshots -[**v1_get_snapshot**](CorelliumApi.md#v1_get_snapshot) | **GET** /v1/snapshots/{snapshotId} | Get Snapshot -[**v1_install_firmware**](CorelliumApi.md#v1_install_firmware) | **POST** /v1/images/install-firmware | Installs a firmware for cluster-wide use -[**v1_instances_instance_id_message_post**](CorelliumApi.md#v1_instances_instance_id_message_post) | **POST** /v1/instances/{instanceId}/message | Inject a message into an iOS VM -[**v1_instances_instance_id_netdump_pcap_get**](CorelliumApi.md#v1_instances_instance_id_netdump_pcap_get) | **GET** /v1/instances/{instanceId}/netdump.pcap | Download a netdump pcap file -[**v1_instances_instance_id_network_monitor_pcap_get**](CorelliumApi.md#v1_instances_instance_id_network_monitor_pcap_get) | **GET** /v1/instances/{instanceId}/networkMonitor.pcap | Download a Network Monitor pcap file -[**v1_kcrange**](CorelliumApi.md#v1_kcrange) | **GET** /v1/instances/{instanceId}/btrace-kcrange | Get Kernel extension ranges -[**v1_list_network_connections**](CorelliumApi.md#v1_list_network_connections) | **GET** /v1/network/connections | List available network connections -[**v1_list_network_interfaces**](CorelliumApi.md#v1_list_network_interfaces) | **GET** /v1/network/interfaces | List available physical network interfaces -[**v1_list_network_providers**](CorelliumApi.md#v1_list_network_providers) | **GET** /v1/network/providers | List available network providers -[**v1_list_threads**](CorelliumApi.md#v1_list_threads) | **GET** /v1/instances/{instanceId}/strace/thread-list | Get Running Threads (CoreTrace) -[**v1_load_extension**](CorelliumApi.md#v1_load_extension) | **POST** /v1/extensions | Load an extension -[**v1_media_play**](CorelliumApi.md#v1_media_play) | **POST** /v1/instances/{instanceId}/media/play | Start playing media -[**v1_media_stop**](CorelliumApi.md#v1_media_stop) | **POST** /v1/instances/{instanceId}/media/stop | Stop playing media -[**v1_parse_extension_json**](CorelliumApi.md#v1_parse_extension_json) | **POST** /v1/extensions/parse/extension.json | Validates extension.json -[**v1_partial_update_network_connection**](CorelliumApi.md#v1_partial_update_network_connection) | **PATCH** /v1/network/connections/{id} | Update Network Connection (partial) -[**v1_patch_instance**](CorelliumApi.md#v1_patch_instance) | **PATCH** /v1/instances/{instanceId} | Update Instance -[**v1_patch_instance_read_only**](CorelliumApi.md#v1_patch_instance_read_only) | **PATCH** /v1/instances/{instanceId}/read-only | Update Instance Read Only -[**v1_pause_instance**](CorelliumApi.md#v1_pause_instance) | **POST** /v1/instances/{instanceId}/pause | Pause an Instance -[**v1_post_instance_input**](CorelliumApi.md#v1_post_instance_input) | **POST** /v1/instances/{instanceId}/input | Provide Instance Input -[**v1_ready**](CorelliumApi.md#v1_ready) | **GET** /v1/ready | API Status -[**v1_reboot_instance**](CorelliumApi.md#v1_reboot_instance) | **POST** /v1/instances/{instanceId}/reboot | Reboot an Instance -[**v1_remove_project_key**](CorelliumApi.md#v1_remove_project_key) | **DELETE** /v1/projects/{projectId}/keys/{keyId} | Delete Project Authorized Key -[**v1_remove_team_role_from_project**](CorelliumApi.md#v1_remove_team_role_from_project) | **DELETE** /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Remove team role from project -[**v1_remove_user_from_team**](CorelliumApi.md#v1_remove_user_from_team) | **DELETE** /v1/teams/{teamId}/users/{userId} | Remove user from team -[**v1_remove_user_role_from_project**](CorelliumApi.md#v1_remove_user_role_from_project) | **DELETE** /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Remove user role from project -[**v1_rename_instance_snapshot**](CorelliumApi.md#v1_rename_instance_snapshot) | **PATCH** /v1/instances/{instanceId}/snapshots/{snapshotId} | Rename an Instance Snapshot -[**v1_reset_user_password**](CorelliumApi.md#v1_reset_user_password) | **POST** /v1/users/reset-password | Reset User Password -[**v1_restore_backup**](CorelliumApi.md#v1_restore_backup) | **POST** /v1/instances/{instanceId}/restoreBackup | Restore backup -[**v1_restore_instance_snapshot**](CorelliumApi.md#v1_restore_instance_snapshot) | **POST** /v1/instances/{instanceId}/snapshots/{snapshotId}/restore | Restore an Instance Snapshot -[**v1_roles**](CorelliumApi.md#v1_roles) | **GET** /v1/roles | Get all roles -[**v1_rotate_instance**](CorelliumApi.md#v1_rotate_instance) | **POST** /v1/instances/{instanceId}/rotate | Rotate device to specified orientation -[**v1_send_user_reset_link**](CorelliumApi.md#v1_send_user_reset_link) | **POST** /v1/users/send-reset-link | Send Password Reset Link -[**v1_set_instance_gpios**](CorelliumApi.md#v1_set_instance_gpios) | **PUT** /v1/instances/{instanceId}/gpios | Set Instance GPIOs -[**v1_set_instance_peripherals**](CorelliumApi.md#v1_set_instance_peripherals) | **PUT** /v1/instances/{instanceId}/peripherals | Set Instance Peripherals -[**v1_set_instance_state**](CorelliumApi.md#v1_set_instance_state) | **PUT** /v1/instances/{instanceId}/state | Set state of Instance -[**v1_set_snapshot_permissions**](CorelliumApi.md#v1_set_snapshot_permissions) | **POST** /v1/snapshots/{snapshotId}/permissions | Set member list -[**v1_share_snapshot**](CorelliumApi.md#v1_share_snapshot) | **POST** /v1/snapshots/{snapshotId}/share | Share snapshot -[**v1_snapshot_rename**](CorelliumApi.md#v1_snapshot_rename) | **PATCH** /v1/snapshots/{snapshotId} | Rename a Snapshot -[**v1_start_core_trace**](CorelliumApi.md#v1_start_core_trace) | **POST** /v1/instances/{instanceId}/strace/enable | Start CoreTrace on an instance -[**v1_start_hyper_trace**](CorelliumApi.md#v1_start_hyper_trace) | **POST** /v1/instances/{instanceId}/btrace/enable | Start HyperTrace on an instance -[**v1_start_instance**](CorelliumApi.md#v1_start_instance) | **POST** /v1/instances/{instanceId}/start | Start an Instance -[**v1_start_netdump**](CorelliumApi.md#v1_start_netdump) | **POST** /v1/instances/{instanceId}/netdump/enable | Start Enhanced Network Monitor on an instance. -[**v1_start_network_monitor**](CorelliumApi.md#v1_start_network_monitor) | **POST** /v1/instances/{instanceId}/sslsplit/enable | Start Network Monitor on an instance. -[**v1_stop_core_trace**](CorelliumApi.md#v1_stop_core_trace) | **POST** /v1/instances/{instanceId}/strace/disable | Stop CoreTrace on an instance. -[**v1_stop_hyper_trace**](CorelliumApi.md#v1_stop_hyper_trace) | **POST** /v1/instances/{instanceId}/btrace/disable | Stop HyperTrace on an instance. -[**v1_stop_instance**](CorelliumApi.md#v1_stop_instance) | **POST** /v1/instances/{instanceId}/stop | Stop an Instance -[**v1_stop_netdump**](CorelliumApi.md#v1_stop_netdump) | **POST** /v1/instances/{instanceId}/netdump/disable | Stop Enhanced Network Monitor on an instance. -[**v1_stop_network_monitor**](CorelliumApi.md#v1_stop_network_monitor) | **POST** /v1/instances/{instanceId}/sslsplit/disable | Stop Network Monitor on an instance. -[**v1_team_change**](CorelliumApi.md#v1_team_change) | **PATCH** /v1/teams/{teamId} | Update team -[**v1_team_create**](CorelliumApi.md#v1_team_create) | **POST** /v1/teams | Create team -[**v1_team_delete**](CorelliumApi.md#v1_team_delete) | **DELETE** /v1/teams/{teamId} | Delete team -[**v1_teams**](CorelliumApi.md#v1_teams) | **GET** /v1/teams | Get teams -[**v1_unpause_instance**](CorelliumApi.md#v1_unpause_instance) | **POST** /v1/instances/{instanceId}/unpause | Unpause an Instance -[**v1_update_domain_auth_provider**](CorelliumApi.md#v1_update_domain_auth_provider) | **PUT** /v1/domain/{domainId}/auth/{providerId} | Update an auth provider for a domain -[**v1_update_extension**](CorelliumApi.md#v1_update_extension) | **PUT** /v1/extensions/{extensionId} | Update an existing extension -[**v1_update_hook**](CorelliumApi.md#v1_update_hook) | **PUT** /v1/hooks/{hookId} | Update an existing hypervisor hook -[**v1_update_network_connection**](CorelliumApi.md#v1_update_network_connection) | **PUT** /v1/network/connections/{id} | Update Network Connection -[**v1_update_project**](CorelliumApi.md#v1_update_project) | **PATCH** /v1/projects/{projectId} | Update a Project -[**v1_update_project_settings**](CorelliumApi.md#v1_update_project_settings) | **PATCH** /v1/projects/{projectId}/settings | Change Project Settings -[**v1_update_user**](CorelliumApi.md#v1_update_user) | **PATCH** /v1/users/{userId} | Update User -[**v1_upgrade_instance**](CorelliumApi.md#v1_upgrade_instance) | **POST** /v1/instances/{instanceId}/upgrade | Upgrade iOS version -[**v1_upload_image_data**](CorelliumApi.md#v1_upload_image_data) | **POST** /v1/images/{imageId} | Upload Image Data -[**v1_user_agree_terms**](CorelliumApi.md#v1_user_agree_terms) | **POST** /v1/users/agree | Consent to the current terms and conditions -[**v1_users_change_password_post**](CorelliumApi.md#v1_users_change_password_post) | **POST** /v1/users/change-password | Change User Password -[**v1_users_login**](CorelliumApi.md#v1_users_login) | **POST** /v1/users/login | Log In -[**v1_web_player_allowed_domains**](CorelliumApi.md#v1_web_player_allowed_domains) | **GET** /v1/webplayer/allowedDomains | Retrieve the list of allowed domains for all Webplayer sessions -[**v1_web_player_create_session**](CorelliumApi.md#v1_web_player_create_session) | **POST** /v1/webplayer | Create a new Webplayer Session -[**v1_web_player_destroy_session**](CorelliumApi.md#v1_web_player_destroy_session) | **DELETE** /v1/webplayer/{sessionId} | Tear down a Webplayer Session -[**v1_web_player_list_sessions**](CorelliumApi.md#v1_web_player_list_sessions) | **GET** /v1/webplayer | List all Webplayer sessions -[**v1_web_player_session_info**](CorelliumApi.md#v1_web_player_session_info) | **GET** /v1/webplayer/{sessionId} | Retrieve Webplayer Session Information -[**v2_get_instance_quick_connect_command**](CorelliumApi.md#v2_get_instance_quick_connect_command) | **GET** /v2/instances/{instanceId}/quickConnectCommand | Recommended SSH Command for Quick Connect -[**v2_get_instance_state**](CorelliumApi.md#v2_get_instance_state) | **GET** /v2/instances/{instanceId}/state | Get state of Instance - - -# **api_v1_cluster_nodes_node_id_console_get** -> api_v1_cluster_nodes_node_id_console_get(node_id) - -Access node console via SSH - -Access node console via SSH (WebSocket upgrade) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - node_id = 'node_id_example' # str | Node ID - - try: - # Access node console via SSH - api_instance.api_v1_cluster_nodes_node_id_console_get(node_id) - except ApiException as e: - print("Exception when calling CorelliumApi->api_v1_cluster_nodes_node_id_console_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **node_id** | **str**| Node ID | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**101** | WebSocket connection upgraded | - | -**403** | Forbidden | - | -**404** | Node not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **api_v1_interconnects_get** -> GetInterconnectsResponse api_v1_interconnects_get(limit=limit, offset=offset, name=name, protocol=protocol, type=type, status=status, project=project, sort=sort) - -Get all I/O Interconnects - -Get all I/O Interconnects - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - limit = 3.4 # float | Maximum number of results to return (1-1000, default: 100) (optional) -offset = 3.4 # float | Number of results to skip (default: 0) (optional) -name = 'name_example' # str | Filter by interconnect name (case insensitive) (optional) -protocol = 'protocol_example' # str | Filter by protocol (comma separated) (optional) -type = 'type_example' # str | Filter by type (comma separated) (optional) -status = 'status_example' # str | Filter by status (comma separated) (optional) -project = 'project_example' # str | Filter by project ID (comma separated) (optional) -sort = 'sort_example' # str | Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) (optional) - - try: - # Get all I/O Interconnects - api_response = await api_instance.api_v1_interconnects_get(limit=limit, offset=offset, name=name, protocol=protocol, type=type, status=status, project=project, sort=sort) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->api_v1_interconnects_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **float**| Maximum number of results to return (1-1000, default: 100) | [optional] - **offset** | **float**| Number of results to skip (default: 0) | [optional] - **name** | **str**| Filter by interconnect name (case insensitive) | [optional] - **protocol** | **str**| Filter by protocol (comma separated) | [optional] - **type** | **str**| Filter by type (comma separated) | [optional] - **status** | **str**| Filter by status (comma separated) | [optional] - **project** | **str**| Filter by project ID (comma separated) | [optional] - **sort** | **str**| Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) | [optional] - -### Return type - -[**GetInterconnectsResponse**](GetInterconnectsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved interconnects | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **api_v1_interconnects_interconnect_id_delete** -> api_v1_interconnects_interconnect_id_delete(interconnect_id) - -Delete I/O Interconnect - -Delete I/O Interconnect - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - interconnect_id = 'interconnect_id_example' # str | The interconnect identifier - - try: - # Delete I/O Interconnect - api_instance.api_v1_interconnects_interconnect_id_delete(interconnect_id) - except ApiException as e: - print("Exception when calling CorelliumApi->api_v1_interconnects_interconnect_id_delete: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **interconnect_id** | **str**| The interconnect identifier | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Successfully deleted interconnect | - | -**401** | Unauthorized | - | -**404** | Not found | - | -**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **api_v1_interconnects_interconnect_id_get** -> InterconnectResponse api_v1_interconnects_interconnect_id_get(interconnect_id) - -Get Interconnect - -Get Interconnect - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - interconnect_id = 'interconnect_id_example' # str | The interconnect identifier - - try: - # Get Interconnect - api_response = await api_instance.api_v1_interconnects_interconnect_id_get(interconnect_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->api_v1_interconnects_interconnect_id_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **interconnect_id** | **str**| The interconnect identifier | - -### Return type - -[**InterconnectResponse**](InterconnectResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully retrieved interconnect details | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **api_v1_interconnects_interconnect_id_patch** -> InterconnectResponse api_v1_interconnects_interconnect_id_patch(interconnect_id, partial_update_interconnect_request) - -Partial Update Interconnect - -Update some interconnect details for the specified interconnect identifier. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - interconnect_id = 'interconnect_id_example' # str | The interconnect identifier -partial_update_interconnect_request = { - "name": "My Can Bus 2 is new to you" -} # PartialUpdateInterconnectRequest | The interconnect details to update - - try: - # Partial Update Interconnect - api_response = await api_instance.api_v1_interconnects_interconnect_id_patch(interconnect_id, partial_update_interconnect_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->api_v1_interconnects_interconnect_id_patch: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **interconnect_id** | **str**| The interconnect identifier | - **partial_update_interconnect_request** | [**PartialUpdateInterconnectRequest**](PartialUpdateInterconnectRequest.md)| The interconnect details to update | - -### Return type - -[**InterconnectResponse**](InterconnectResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully updated interconnect | - | -**400** | Bad request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **api_v1_interconnects_interconnect_id_put** -> InterconnectResponse api_v1_interconnects_interconnect_id_put(interconnect_id, update_interconnect_request) - -Update Interconnect - -Update interconnect details for the specified interconnect identifier. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - interconnect_id = 'interconnect_id_example' # str | The interconnect identifier -update_interconnect_request = { - "name": "My Can Bus 2", - "interfaces": [ - { - "deviceId": "fa783ebb-b020-47fb-af74-6898ed59b068", - "interfaceId": "can1:0" - }, - { - "deviceId": "58db550e-bb96-403a-bcf0-86ff33e5e61d", - "interfaceId": "can1:0" - }, - { - "deviceId": "bd576aca-9e31-4c6a-817e-f2a38122536e", - "interfaceId": "can1:0" - } - ] -} # UpdateInterconnectRequest | The interconnect details to update - - try: - # Update Interconnect - api_response = await api_instance.api_v1_interconnects_interconnect_id_put(interconnect_id, update_interconnect_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->api_v1_interconnects_interconnect_id_put: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **interconnect_id** | **str**| The interconnect identifier | - **update_interconnect_request** | [**UpdateInterconnectRequest**](UpdateInterconnectRequest.md)| The interconnect details to update | - -### Return type - -[**InterconnectResponse**](InterconnectResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully updated interconnect | - | -**400** | Bad request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **api_v1_interconnects_post** -> InterconnectResponse api_v1_interconnects_post(create_interconnect_request) - -Create I/O Interconnect - -Create an I/O Interconnect for the specified project and attach virtual device interfaces. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - create_interconnect_request = { - "name": "My Interconnect", - "protocol": "TCP", - "type": "hub", - "project": "123e4567-e89b-12d3-a456-426614174000", - "interfaces": [{ - "deviceId": "2b331aaa-de76-4169-8442-9910e9c436fb", - "interfaceId": "gpio:7" - }] -} # CreateInterconnectRequest | The interconnect details - - try: - # Create I/O Interconnect - api_response = await api_instance.api_v1_interconnects_post(create_interconnect_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->api_v1_interconnects_post: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_interconnect_request** | [**CreateInterconnectRequest**](CreateInterconnectRequest.md)| The interconnect details | - -### Return type - -[**InterconnectResponse**](InterconnectResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successfully created interconnect | - | -**400** | Bad request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**500** | Internal server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_assessment** -> AssessmentIdStatus create_assessment(instance_id, create_assessment_dto) - -Create assessment - -Create assessment - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | ID of instance -create_assessment_dto = corellium_api.CreateAssessmentDto() # CreateAssessmentDto | Create a new assessment - - try: - # Create assessment - api_response = await api_instance.create_assessment(instance_id, create_assessment_dto) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->create_assessment: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| ID of instance | - **create_assessment_dto** | [**CreateAssessmentDto**](CreateAssessmentDto.md)| Create a new assessment | - -### Return type - -[**AssessmentIdStatus**](AssessmentIdStatus.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful operation | - | -**400** | Invalid body | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_assessment** -> delete_assessment(instance_id, assessment_id) - -Delete assessment - -Delete assessment - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | ID of instance -assessment_id = 'assessment_id_example' # str | ID of assessment - - try: - # Delete assessment - api_instance.delete_assessment(instance_id, assessment_id) - except ApiException as e: - print("Exception when calling CorelliumApi->delete_assessment: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| ID of instance | - **assessment_id** | **str**| ID of assessment | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Successful operation | - | -**404** | Assessment not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **download_report** -> str download_report(instance_id, assessment_id, format) - -Download report - -Download report - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | ID of instance -assessment_id = 'assessment_id_example' # str | ID of assessment -format = 'html' # str | Assessment report download format (default to 'html') - - try: - # Download report - api_response = await api_instance.download_report(instance_id, assessment_id, format) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->download_report: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| ID of instance | - **assessment_id** | **str**| ID of assessment | - **format** | **str**| Assessment report download format | [default to 'html'] - -### Return type - -**str** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: text/html, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Returns the HTML file of the report | - | -**400** | Assessment status invalid | - | -**404** | Assessment not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_assessment_by_id** -> Assessment get_assessment_by_id(instance_id, assessment_id) - -Get assessment by ID - -Get assessment by ID - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | ID of instance -assessment_id = 'assessment_id_example' # str | ID of assessment - - try: - # Get assessment by ID - api_response = await api_instance.get_assessment_by_id(instance_id, assessment_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->get_assessment_by_id: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| ID of instance | - **assessment_id** | **str**| ID of assessment | - -### Return type - -[**Assessment**](Assessment.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful operation | - | -**404** | Assessment not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_assessments_by_instance_id** -> list[Assessment] get_assessments_by_instance_id(instance_id) - -Get assessments by instanceId - -Get assessments by instanceId - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | ID of instance - - try: - # Get assessments by instanceId - api_response = await api_instance.get_assessments_by_instance_id(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->get_assessments_by_instance_id: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| ID of instance | - -### Return type - -[**list[Assessment]**](Assessment.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Returns array of assessments | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **run_tests** -> AssessmentIdStatus run_tests(instance_id, assessment_id, test_assessment_dto=test_assessment_dto) - -Update assessment state and execute MATRIX tests - -Update assessment state and execute MATRIX tests - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | ID of instance -assessment_id = 'assessment_id_example' # str | ID of assessment -test_assessment_dto = corellium_api.TestAssessmentDto() # TestAssessmentDto | Execute MATRIX tests (optional) - - try: - # Update assessment state and execute MATRIX tests - api_response = await api_instance.run_tests(instance_id, assessment_id, test_assessment_dto=test_assessment_dto) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->run_tests: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| ID of instance | - **assessment_id** | **str**| ID of assessment | - **test_assessment_dto** | [**TestAssessmentDto**](TestAssessmentDto.md)| Execute MATRIX tests | [optional] - -### Return type - -[**AssessmentIdStatus**](AssessmentIdStatus.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful operation | - | -**400** | Assessment status invalid | - | -**404** | Assessment not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **start_monitoring** -> start_monitoring(instance_id, assessment_id) - -Update assessment state and begin device monitoring - -Update assessment state and begin device monitoring - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | ID of instance -assessment_id = 'assessment_id_example' # str | ID of assessment - - try: - # Update assessment state and begin device monitoring - api_instance.start_monitoring(instance_id, assessment_id) - except ApiException as e: - print("Exception when calling CorelliumApi->start_monitoring: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| ID of instance | - **assessment_id** | **str**| ID of assessment | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Successful operation | - | -**404** | Assessment not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **stop_monitoring** -> stop_monitoring(instance_id, assessment_id) - -Update assessment state and stop device monitoring - -Update assessment state and stop device monitoring - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | ID of instance -assessment_id = 'assessment_id_example' # str | ID of assessment - - try: - # Update assessment state and stop device monitoring - api_instance.stop_monitoring(instance_id, assessment_id) - except ApiException as e: - print("Exception when calling CorelliumApi->stop_monitoring: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| ID of instance | - **assessment_id** | **str**| ID of assessment | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Successful operation | - | -**404** | Assessment not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_accept_shared_snapshot** -> Snapshot v1_accept_shared_snapshot(post_share_snapshot_request_payload) - -Accept a snapshot shared with you - -Accept a snapshot shared with you - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - post_share_snapshot_request_payload = { - "accessCode": "1S33IA5G71YJ5", - "password": "password" -} # PostShareSnapshotRequestPayload | - - try: - # Accept a snapshot shared with you - api_response = await api_instance.v1_accept_shared_snapshot(post_share_snapshot_request_payload) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_accept_shared_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **post_share_snapshot_request_payload** | [**PostShareSnapshotRequestPayload**](PostShareSnapshotRequestPayload.md)| | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_activity_export** -> ActivityExportResponse v1_activity_export(activity_export_dto) - -Start activity export - -Start activity export - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - activity_export_dto = corellium_api.ActivityExportDto() # ActivityExportDto | - - try: - # Start activity export - api_response = await api_instance.v1_activity_export(activity_export_dto) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_activity_export: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **activity_export_dto** | [**ActivityExportDto**](ActivityExportDto.md)| | - -### Return type - -[**ActivityExportResponse**](ActivityExportResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_activity_list** -> ActivityList v1_activity_list(request=request) - -Get resource activities - -Get resource activities - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - request = {'key': corellium_api.ActivityRequest()} # ActivityRequest | (optional) - - try: - # Get resource activities - api_response = await api_instance.v1_activity_list(request=request) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_activity_list: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request** | [**ActivityRequest**](.md)| | [optional] - -### Return type - -[**ActivityList**](ActivityList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_add_project_key** -> ProjectKey v1_add_project_key(project_id, project_key) - -Add Project Authorized Key - -Add Project Authorized Key - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -project_key = { - "kind": "ssh", - "label": "My New Key", - "key": "ssh-ed25519 " -} # ProjectKey | Key to add - - try: - # Add Project Authorized Key - api_response = await api_instance.v1_add_project_key(project_id, project_key) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_add_project_key: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **project_key** | [**ProjectKey**](ProjectKey.md)| Key to add | - -### Return type - -[**ProjectKey**](ProjectKey.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Authorized Key | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_add_team_role_to_project** -> v1_add_team_role_to_project(project_id, team_id, role_id) - -Add team role to project - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -team_id = 'team_id_example' # str | Team ID - uuid -role_id = 'role_id_example' # str | Role ID - - try: - # Add team role to project - api_instance.v1_add_team_role_to_project(project_id, team_id, role_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_add_team_role_to_project: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **team_id** | **str**| Team ID - uuid | - **role_id** | **str**| Role ID | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_add_user_role_to_project** -> v1_add_user_role_to_project(project_id, user_id, role_id) - -Add user role to project - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -user_id = 'user_id_example' # str | User ID - uuid -role_id = 'role_id_example' # str | Role ID - - try: - # Add user role to project - api_instance.v1_add_user_role_to_project(project_id, user_id, role_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_add_user_role_to_project: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **user_id** | **str**| User ID - uuid | - **role_id** | **str**| Role ID | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_add_user_to_team** -> v1_add_user_to_team(team_id, user_id) - -Add user to team - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - team_id = 'team_id_example' # str | Team ID - uuid -user_id = 'user_id_example' # str | User ID - uuid - - try: - # Add user to team - api_instance.v1_add_user_to_team(team_id, user_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_add_user_to_team: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **team_id** | **str**| Team ID - uuid | - **user_id** | **str**| User ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**403** | Forbidden | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_app_ready** -> AgentAppReadyResponse v1_agent_app_ready(instance_id) - -Check if App subsystem is ready - -Check if App subsystem is ready - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Check if App subsystem is ready - api_response = await api_instance.v1_agent_app_ready(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_app_ready: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**AgentAppReadyResponse**](AgentAppReadyResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | App Agent State | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_delete_file** -> v1_agent_delete_file(instance_id, file_path) - -Delete a File on VM - -Delete a File on VM - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -file_path = 'file_path_example' # str | File Path on VM - - try: - # Delete a File on VM - api_instance.v1_agent_delete_file(instance_id, file_path) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_delete_file: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **file_path** | **str**| File Path on VM | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_get_file** -> file v1_agent_get_file(instance_id, file_path) - -Download a File from VM - -Download a File from VM - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -file_path = 'file_path_example' # str | File Path on VM - - try: - # Download a File from VM - api_response = await api_instance.v1_agent_get_file(instance_id, file_path) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_get_file: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **file_path** | **str**| File Path on VM | - -### Return type - -**file** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | File Contents | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_get_temp_filename** -> str v1_agent_get_temp_filename(instance_id) - -Get the path for a new temp file - -Returns a temporary random filename that is guranteed to be unique on the VMs filesystem at the time of invocation of this method. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get the path for a new temp file - api_response = await api_instance.v1_agent_get_temp_filename(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_get_temp_filename: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -**str** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The temp file path | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_install_app** -> v1_agent_install_app(instance_id, agent_install_body) - -Install App at path - -Installs the app located at path which must be present on the VM filesystem - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -agent_install_body = { - "path": "/tmp/test.ipa" -} # AgentInstallBody | App parameters - - try: - # Install App at path - api_instance.v1_agent_install_app(instance_id, agent_install_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_install_app: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **agent_install_body** | [**AgentInstallBody**](AgentInstallBody.md)| App parameters | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_install_profile** -> v1_agent_install_profile(instance_id, body) - -Install a Profile to VM - -Install a Profile to VM - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -body = '/path/to/file' # file | Profile to Install - - try: - # Install a Profile to VM - api_instance.v1_agent_install_profile(instance_id, body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_install_profile: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **body** | **file**| Profile to Install | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/octet-stream - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_kill_app** -> object v1_agent_kill_app(instance_id, bundle_id) - -Kill an App - -Kill an App - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -bundle_id = 'bundle_id_example' # str | App Bundle ID - - try: - # Kill an App - api_response = await api_instance.v1_agent_kill_app(instance_id, bundle_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_kill_app: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **bundle_id** | **str**| App Bundle ID | - -### Return type - -**object** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_list_app_icons** -> list[AgentIcons] v1_agent_list_app_icons(instance_id, bundle_id) - -List App Icons - -List App Icons as base64 data - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -bundle_id = ['bundle_id_example'] # list[str] | App Bundle ID - - try: - # List App Icons - api_response = await api_instance.v1_agent_list_app_icons(instance_id, bundle_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_list_app_icons: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **bundle_id** | [**list[str]**](str.md)| App Bundle ID | - -### Return type - -[**list[AgentIcons]**](AgentIcons.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Installed Apps Icons | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_list_apps** -> AgentAppsList v1_agent_list_apps(instance_id) - -List Apps - -List Apps - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # List Apps - api_response = await api_instance.v1_agent_list_apps(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_list_apps: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**AgentAppsList**](AgentAppsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Installed Apps Info | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_list_apps_status** -> AgentAppsList v1_agent_list_apps_status(instance_id) - -List Apps Status - -List Apps Status - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # List Apps Status - api_response = await api_instance.v1_agent_list_apps_status(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_list_apps_status: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**AgentAppsList**](AgentAppsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Installed Apps Status Info | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_list_profiles** -> AgentProfilesReturn v1_agent_list_profiles(instance_id) - -List Profiles - -List Profiles - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # List Profiles - api_response = await api_instance.v1_agent_list_profiles(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_list_profiles: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**AgentProfilesReturn**](AgentProfilesReturn.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Installed Profiles | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_run_app** -> object v1_agent_run_app(instance_id, bundle_id) - -Run an App - -Run an App - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -bundle_id = 'bundle_id_example' # str | App Bundle ID - - try: - # Run an App - api_response = await api_instance.v1_agent_run_app(instance_id, bundle_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_run_app: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **bundle_id** | **str**| App Bundle ID | - -### Return type - -**object** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_set_file_attributes** -> v1_agent_set_file_attributes(instance_id, file_path, file_changes) - -Change Attrs of a File on VM - -Change Attrs of a File on VM - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -file_path = 'file_path_example' # str | File Path on VM -file_changes = corellium_api.FileChanges() # FileChanges | New attrs - - try: - # Change Attrs of a File on VM - api_instance.v1_agent_set_file_attributes(instance_id, file_path, file_changes) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_set_file_attributes: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **file_path** | **str**| File Path on VM | - **file_changes** | [**FileChanges**](FileChanges.md)| New attrs | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_get_adb_auth** -> AgentSystemAdbAuth v1_agent_system_get_adb_auth(instance_id) - -Get ADB Auth Setting (AOSP only) - -Get ADB Auth Setting (AOSP only) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get ADB Auth Setting (AOSP only) - api_response = await api_instance.v1_agent_system_get_adb_auth(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_get_adb_auth: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**AgentSystemAdbAuth**](AgentSystemAdbAuth.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Current ADB Auth setting | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_get_network** -> AgentValueReturn v1_agent_system_get_network(instance_id) - -Get IP of eth0 (AOSP only) - -Get IP of eth0 (AOSP only) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get IP of eth0 (AOSP only) - api_response = await api_instance.v1_agent_system_get_network(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_get_network: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**AgentValueReturn**](AgentValueReturn.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | IP Address of eth0 | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_get_prop** -> AgentValueReturn v1_agent_system_get_prop(instance_id, agent_system_get_prop_body) - -Get System Property (AOSP only) - -Get System Property (AOSP only) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -agent_system_get_prop_body = { - "property": "corellium.opengapps" -} # AgentSystemGetPropBody | Parameters - - try: - # Get System Property (AOSP only) - api_response = await api_instance.v1_agent_system_get_prop(instance_id, agent_system_get_prop_body) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_get_prop: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **agent_system_get_prop_body** | [**AgentSystemGetPropBody**](AgentSystemGetPropBody.md)| Parameters | - -### Return type - -[**AgentValueReturn**](AgentValueReturn.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Value of requested property | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_install_open_g_apps** -> v1_agent_system_install_open_g_apps(instance_id, body) - -Install OpenGApps (AOSP only) - -Install OpenGApps (AOSP only) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -body = { - "url": "http://downloads.sourceforge.net/project/opengapps/arm64/20220119/open_gapps-arm64-11.0-pico-20220119.zip?r=&ts=1653516572&use_mirror=gigenet", - "hash": "58398bf7628f38ef07eaeb3abe26f3ebf0474f4d5ecdac0852bd5de3c15cc828", - "fingerprint": "google/flame/flame:11/RP1A.200720.009/6720564:user/release-keys__2020-09-05" -} # object | Installation parameters - - try: - # Install OpenGApps (AOSP only) - api_instance.v1_agent_system_install_open_g_apps(instance_id, body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_install_open_g_apps: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **body** | **object**| Installation parameters | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_lock** -> v1_agent_system_lock(instance_id) - -Lock Device (iOS Only) - -Lock Device (iOS Only) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Lock Device (iOS Only) - api_instance.v1_agent_system_lock(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_lock: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_set_adb_auth** -> v1_agent_system_set_adb_auth(instance_id, agent_system_adb_auth) - -Set ADB Auth Setting (AOSP only) - -Set ADB Auth Setting (AOSP only) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -agent_system_adb_auth = { - "enabled": true -} # AgentSystemAdbAuth | Desired ADB Auth Setting - - try: - # Set ADB Auth Setting (AOSP only) - api_instance.v1_agent_system_set_adb_auth(instance_id, agent_system_adb_auth) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_set_adb_auth: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **agent_system_adb_auth** | [**AgentSystemAdbAuth**](AgentSystemAdbAuth.md)| Desired ADB Auth Setting | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_set_hostname** -> v1_agent_system_set_hostname(instance_id, agent_system_set_hostname_body) - -Set Hostname of instance - -Set Hostname of instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -agent_system_set_hostname_body = corellium_api.AgentSystemSetHostnameBody() # AgentSystemSetHostnameBody | New hostname - - try: - # Set Hostname of instance - api_instance.v1_agent_system_set_hostname(instance_id, agent_system_set_hostname_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_set_hostname: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **agent_system_set_hostname_body** | [**AgentSystemSetHostnameBody**](AgentSystemSetHostnameBody.md)| New hostname | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_shutdown** -> v1_agent_system_shutdown(instance_id) - -Instruct VM to halt - -Instruct VM to halt - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Instruct VM to halt - api_instance.v1_agent_system_shutdown(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_shutdown: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_system_unlock** -> v1_agent_system_unlock(instance_id) - -Unlock Device (iOS Only) - -Unlock Device (iOS Only) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Unlock Device (iOS Only) - api_instance.v1_agent_system_unlock(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_system_unlock: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_uninstall_app** -> object v1_agent_uninstall_app(instance_id, bundle_id) - -Uninstall an App - -Uninstall an App - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -bundle_id = 'bundle_id_example' # str | App Bundle ID - - try: - # Uninstall an App - api_response = await api_instance.v1_agent_uninstall_app(instance_id, bundle_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_uninstall_app: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **bundle_id** | **str**| App Bundle ID | - -### Return type - -**object** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_uninstall_profile** -> v1_agent_uninstall_profile(instance_id, profile_id) - -Uninstall a Profile from VM - -Uninstall a Profile from VM - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -profile_id = 'profile_id_example' # str | Instance ID - uuid - - try: - # Uninstall a Profile from VM - api_instance.v1_agent_uninstall_profile(instance_id, profile_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_uninstall_profile: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **profile_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Agent Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_agent_upload_file** -> v1_agent_upload_file(instance_id, file_path, body) - -Upload a file to VM - -Upload a file to VM - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -file_path = 'file_path_example' # str | File Path on VM to write to -body = '/path/to/file' # file | Uploaded File Contents - - try: - # Upload a file to VM - api_instance.v1_agent_upload_file(instance_id, file_path, body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_agent_upload_file: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **file_path** | **str**| File Path on VM to write to | - **body** | **file**| Uploaded File Contents | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/octet-stream - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No content | - | -**400** | Agent Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_attach_instance_interface** -> v1_attach_instance_interface(instance_id, attach_interface_request) - -Attach I/O Interface - -Attach an I/O interface to an I/O interconnect for the specified instance identifier. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -attach_interface_request = corellium_api.AttachInterfaceRequest() # AttachInterfaceRequest | Interface attachment request - - try: - # Attach I/O Interface - api_instance.v1_attach_instance_interface(instance_id, attach_interface_request) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_attach_instance_interface: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **attach_interface_request** | [**AttachInterfaceRequest**](AttachInterfaceRequest.md)| Interface attachment request | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_auth_login** -> Token v1_auth_login(body) - -Log In - -Log In - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - body = { - "username": "admin", - "password": "password" -} # object | Authorization data ( Credentials|ApiToken ) - - try: - # Log In - api_response = await api_instance.v1_auth_login(body) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_auth_login: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **object**| Authorization data ( Credentials|ApiToken ) | - -### Return type - -[**Token**](Token.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | User Authorization | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_btrace_preauthorize** -> Token v1_btrace_preauthorize(instance_id) - -Pre-authorize an btrace download - -Pre-authorize an btrace download - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Pre-authorize an btrace download - api_response = await api_instance.v1_btrace_preauthorize(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_btrace_preauthorize: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**Token**](Token.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Token | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_clear_core_trace** -> v1_clear_core_trace(instance_id) - -Clear CoreTrace logs - -Clear CoreTrace logs - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Clear CoreTrace logs - api_instance.v1_clear_core_trace(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_clear_core_trace: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_clear_hyper_trace** -> v1_clear_hyper_trace(instance_id) - -Clear HyperTrace logs - -Clear HyperTrace logs - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Clear HyperTrace logs - api_instance.v1_clear_hyper_trace(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_clear_hyper_trace: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_clear_hyper_trace_hooks** -> v1_clear_hyper_trace_hooks(instance_id) - -Clear Hooks on an instance - -Clear Hooks on an instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Clear Hooks on an instance - api_instance.v1_clear_hyper_trace_hooks(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_clear_hyper_trace_hooks: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_clear_instance_panics** -> v1_clear_instance_panics(instance_id) - -Clear Panics - -Clear Panics - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Clear Panics - api_instance.v1_clear_instance_panics(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_clear_instance_panics: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_firmware_service_devices_get** -> list[Device] v1_cluster_firmware_service_devices_get(limit=limit, offset=offset, search=search, order=order, type=type, model=model, name=name, platform=platform) - -Fetch devices from the firmware service - -Proxies a request to the firmware service to retrieve a list of devices. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - limit = 3.4 # float | Number of results to return (min: 1, max: 10000, default: 100) (optional) -offset = 3.4 # float | Index of the first row to return (default: 0) (optional) -search = 'search_example' # str | Case-insensitive partial match across name, model, platform, and hwmodel fields (optional) -order = 'order_example' # str | Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: (optional) -type = 'type_example' # str | Filter by exact type. Example: coreimg (optional) -model = 'model_example' # str | Filter by exact model. Example: Example: iPhone8,1 (optional) -name = 'name_example' # str | Filter by exact name. Example: iPhone6s (optional) -platform = 'platform_example' # str | Filter by exact platform. Example: s5l8960x (optional) - - try: - # Fetch devices from the firmware service - api_response = await api_instance.v1_cluster_firmware_service_devices_get(limit=limit, offset=offset, search=search, order=order, type=type, model=model, name=name, platform=platform) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_firmware_service_devices_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **float**| Number of results to return (min: 1, max: 10000, default: 100) | [optional] - **offset** | **float**| Index of the first row to return (default: 0) | [optional] - **search** | **str**| Case-insensitive partial match across name, model, platform, and hwmodel fields | [optional] - **order** | **str**| Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'name,-platform'). Allowed fields: name, model, type, platform, hwmodel Filtering options: | [optional] - **type** | **str**| Filter by exact type. Example: coreimg | [optional] - **model** | **str**| Filter by exact model. Example: Example: iPhone8,1 | [optional] - **name** | **str**| Filter by exact name. Example: iPhone6s | [optional] - **platform** | **str**| Filter by exact platform. Example: s5l8960x | [optional] - -### Return type - -[**list[Device]**](Device.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_firmware_service_firmware_assets_asset_url_delete** -> v1_cluster_firmware_service_firmware_assets_asset_url_delete(asset_url) - -Delete a firmware asset by its URL - -Proxies a request to the firmware service to delete a firmware asset by URL. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - asset_url = 'asset_url_example' # str | The URL-encoded firmware asset URL to delete - format:uri - pattern:^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]+$ - - try: - # Delete a firmware asset by its URL - api_instance.v1_cluster_firmware_service_firmware_assets_asset_url_delete(asset_url) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_firmware_service_firmware_assets_asset_url_delete: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **asset_url** | **str**| The URL-encoded firmware asset URL to delete - format:uri - pattern:^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]+$ | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_firmware_service_firmware_assets_asset_url_extended_get** -> ExtendedFirmwareAssetInfo v1_cluster_firmware_service_firmware_assets_asset_url_extended_get(asset_url) - -Fetch extended firmware-asset details including instances and associated IPSWs - -Retrieves extended information about a firmware including all instances using it and associated firmware assets. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - asset_url = 'asset_url_example' # str | The URL-encoded firmware asset to delete. Example: H4RUO0MX-Fz0ka2Q2vCfvP-27ElNZw5bWJEfyF04AxA= - - try: - # Fetch extended firmware-asset details including instances and associated IPSWs - api_response = await api_instance.v1_cluster_firmware_service_firmware_assets_asset_url_extended_get(asset_url) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_firmware_service_firmware_assets_asset_url_extended_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **asset_url** | **str**| The URL-encoded firmware asset to delete. Example: H4RUO0MX-Fz0ka2Q2vCfvP-27ElNZw5bWJEfyF04AxA= | - -### Return type - -[**ExtendedFirmwareAssetInfo**](ExtendedFirmwareAssetInfo.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_firmware_service_firmware_assets_get** -> list[FirmwareAsset] v1_cluster_firmware_service_firmware_assets_get(limit=limit, offset=offset, order=order, search=search) - -Fetch firmware assets from the firmware service - -Proxies a request to the firmware service to retrieve a list of firmware assets. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - limit = 3.4 # float | Number of results to return (min: 1, max: 10000, default: 100) (optional) -offset = 3.4 # float | Index of the first row to return (default: 0) (optional) -order = 'order_example' # str | Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'url,-domain'). Allowed fields: url, domain (optional) -search = 'search_example' # str | Case-insensitive partial match across url, domain (optional) - - try: - # Fetch firmware assets from the firmware service - api_response = await api_instance.v1_cluster_firmware_service_firmware_assets_get(limit=limit, offset=offset, order=order, search=search) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_firmware_service_firmware_assets_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **float**| Number of results to return (min: 1, max: 10000, default: 100) | [optional] - **offset** | **float**| Index of the first row to return (default: 0) | [optional] - **order** | **str**| Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'url,-domain'). Allowed fields: url, domain | [optional] - **search** | **str**| Case-insensitive partial match across url, domain | [optional] - -### Return type - -[**list[FirmwareAsset]**](FirmwareAsset.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_firmware_service_firmware_assets_post** -> str v1_cluster_firmware_service_firmware_assets_post(body) - -Add firmware assets via the firmware service - -Proxies a request to the firmware service to add firmware assets. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - body = { - "https://wkms-public.apple.com/fcs-keys/0-rpBmpVnBmLtxdIwb97a_jAodE52Gv8Al_CN8DdwzQ=": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0hBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEJHMHdhd0lCQVFRZ1plQ25uTW5CZEx3RkM1K2EKUU9ITGswQ1Z1aGJHWE1kUlBiekJOMTREOWp1aFJBTkNBQVRLT3NyZUc4VG1XbExTeU1KUnBSWTA2N1NudFhmZgpkakhWenQwN1ZZVm1wZ1dGZEJGUERGTFdiQkYrYlpQeGRJVW14dzFMN3NlMEUrdE1DcTk4bkEyMQotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==", - "https://wkms-public.apple.com/fcs-keys/09QNzDMRwGnqUMjbRQcsH7sHx2GJUub-NmLLpIsd8Yc=": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0hBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEJHMHdhd0lCQVFRZ0QyeTRzZE1QNXE2eHZ4NTIKMFNqaCt1S0JkcWVTRlF2T083Rm9PaHg1RHZxaFJBTkNBQVRLbEMvdXhKa3Q4d0FhS1Fzd3paeVJ4WWVTN0pOVAowRlFsS0w3S0hZb1k0U1FWekZWNTBkQkhGeGRVMHVaeGN3Rk9MaW1MTVZZaHBtREQ0enFpZGtPeAotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==" -} # object | Firmware assets payload - - try: - # Add firmware assets via the firmware service - api_response = await api_instance.v1_cluster_firmware_service_firmware_assets_post(body) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_firmware_service_firmware_assets_post: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **object**| Firmware assets payload | - -### Return type - -**str** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/html, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_firmware_service_firmwares_filename_delete** -> v1_cluster_firmware_service_firmwares_filename_delete(filename) - -Delete a firmware by filename from the firmware service - -Proxies a request to the firmware service to delete a firmware by filename. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - filename = 'filename_example' # str | The filename of the firmware to delete - - try: - # Delete a firmware by filename from the firmware service - api_instance.v1_cluster_firmware_service_firmwares_filename_delete(filename) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_firmware_service_firmwares_filename_delete: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **filename** | **str**| The filename of the firmware to delete | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not found | - | -**409** | Conflict | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_firmware_service_firmwares_get** -> list[Firmware] v1_cluster_firmware_service_firmwares_get(limit=limit, offset=offset, search=search, order=order, filename=filename, model=model, type=type, version=version, buildid=buildid, firmware_assets=firmware_assets) - -Fetch firmwares from the firmware service - -Proxies a request to the firmware service to retrieve a list of firmwares. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - limit = 3.4 # float | Number of results to return (min: 1, max: 10000, default: 100) (optional) -offset = 3.4 # float | Index of the first row to return (default: 0) (optional) -search = 'search_example' # str | Case-insensitive partial match across filename, model, type, version and buildid fields (optional) -order = 'order_example' # str | Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: (optional) -filename = 'filename_example' # str | Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw (optional) -model = 'model_example' # str | Filter by exact model. Example: iPhone10,4 (optional) -type = 'type_example' # str | Filter by exact type. Example: ipsw (optional) -version = 'version_example' # str | Filter by exact version. Example: 12.1.4 (optional) -buildid = 'buildid_example' # str | Filter by exact buildid. Example: 16D57 (optional) -firmware_assets = 'firmware_assets_example' # str | Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= (optional) - - try: - # Fetch firmwares from the firmware service - api_response = await api_instance.v1_cluster_firmware_service_firmwares_get(limit=limit, offset=offset, search=search, order=order, filename=filename, model=model, type=type, version=version, buildid=buildid, firmware_assets=firmware_assets) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_firmware_service_firmwares_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **float**| Number of results to return (min: 1, max: 10000, default: 100) | [optional] - **offset** | **float**| Index of the first row to return (default: 0) | [optional] - **search** | **str**| Case-insensitive partial match across filename, model, type, version and buildid fields | [optional] - **order** | **str**| Comma-separated field names for sorting. Prefix with '-' for ascending order (e.g., 'name,-platform'). Allowed fields: filename, model, type, version, buildid Filtering options: | [optional] - **filename** | **str**| Filter by exact filename. Example: iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw | [optional] - **model** | **str**| Filter by exact model. Example: iPhone10,4 | [optional] - **type** | **str**| Filter by exact type. Example: ipsw | [optional] - **version** | **str**| Filter by exact version. Example: 12.1.4 | [optional] - **buildid** | **str**| Filter by exact buildid. Example: 16D57 | [optional] - **firmware_assets** | **str**| Filter by exact asset URL/ID. Example: https://wkms-public.apple.com/fcs-keys/rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= -OR- rl_td3o_0EtXT8t6HvVJoeWXnoBuzumHyUTD8-MUaF8= | [optional] - -### Return type - -[**list[Firmware]**](Firmware.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_nodes_get** -> list[NodeInformation] v1_cluster_nodes_get(limit=limit, offset=offset) - -List servers in the cluster - -List servers in the cluster - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - limit = 3.4 # float | limit for pagination results, defaults to 100 (optional) -offset = 3.4 # float | offset for pagination results, defaults to 0 (optional) - - try: - # List servers in the cluster - api_response = await api_instance.v1_cluster_nodes_get(limit=limit, offset=offset) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_nodes_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **float**| limit for pagination results, defaults to 100 | [optional] - **offset** | **float**| offset for pagination results, defaults to 0 | [optional] - -### Return type - -[**list[NodeInformation]**](NodeInformation.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_cluster_nodes_node_id_get** -> NodeInformation v1_cluster_nodes_node_id_get(node_id) - -Get node details by ID - -Get node details by ID - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - node_id = 'node_id_example' # str | Node ID - - try: - # Get node details by ID - api_response = await api_instance.v1_cluster_nodes_node_id_get(node_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_cluster_nodes_node_id_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **node_id** | **str**| Node ID | - -### Return type - -[**NodeInformation**](NodeInformation.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Node not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_create_domain_auth_provider** -> DomainAuthProviderResponse v1_create_domain_auth_provider(domain_id, domain_auth_provider_request) - -Create a new auth provider for a domain - -Create a new auth provider for a domain - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - domain_id = 'domain_id_example' # str | Domain ID - uuid -domain_auth_provider_request = { - "enabled": true, - "providerType": "open-id-connect", - "label": "Login with Custom Auth0", - "config": { - "discoveryUrl": "http://localhost:8080/realms/Corellium/.well-known/openid-configuration", - "clientId": "B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4", - "clientSecret": "itsasecret", - "invitedOnly": false - } -} # DomainAuthProviderRequest | Request Data - - try: - # Create a new auth provider for a domain - api_response = await api_instance.v1_create_domain_auth_provider(domain_id, domain_auth_provider_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_create_domain_auth_provider: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **domain_id** | **str**| Domain ID - uuid | - **domain_auth_provider_request** | [**DomainAuthProviderRequest**](DomainAuthProviderRequest.md)| Request Data | - -### Return type - -[**DomainAuthProviderResponse**](DomainAuthProviderResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_create_hook** -> Hook v1_create_hook(instance_id, v1_create_hook_parameters) - -Create hypervisor hook for Instance - -Create hypervisor hook for Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -v1_create_hook_parameters = corellium_api.V1CreateHookParameters() # V1CreateHookParameters | application/json - - try: - # Create hypervisor hook for Instance - api_response = await api_instance.v1_create_hook(instance_id, v1_create_hook_parameters) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_create_hook: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **v1_create_hook_parameters** | [**V1CreateHookParameters**](V1CreateHookParameters.md)| application/json | - -### Return type - -[**Hook**](Hook.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Hook | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_create_image** -> Image v1_create_image(type, encoding, encapsulated=encapsulated, name=name, project=project, instance=instance, file=file) - -Create a new Image - -Create a new Image - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - type = 'type_example' # str | Image type -encoding = 'encoding_example' # str | How the file is stored -encapsulated = True # bool | set to false if the uploaded file is not encapsulated inside an outer zipfile (optional) -name = 'name_example' # str | Image name (optional) -project = 'project_example' # str | Project ID (optional) -instance = 'instance_example' # str | Instance ID (optional) -file = '/path/to/file' # file | Optionally the actual file (optional) - - try: - # Create a new Image - api_response = await api_instance.v1_create_image(type, encoding, encapsulated=encapsulated, name=name, project=project, instance=instance, file=file) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_create_image: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type** | **str**| Image type | - **encoding** | **str**| How the file is stored | - **encapsulated** | **bool**| set to false if the uploaded file is not encapsulated inside an outer zipfile | [optional] - **name** | **str**| Image name | [optional] - **project** | **str**| Project ID | [optional] - **instance** | **str**| Instance ID | [optional] - **file** | **file**| Optionally the actual file | [optional] - -### Return type - -[**Image**](Image.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**201** | application/json | - | -**404** | application/json | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_create_instance** -> InstanceReturn v1_create_instance(instance_create_options) - -Create Instance - -Create Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_create_options = { - "project": "", - "name": "rpi4b Created via API", - "flavor": "rpi4b", - "os": "11.2.0" -} # InstanceCreateOptions | The vm definition to create - - try: - # Create Instance - api_response = await api_instance.v1_create_instance(instance_create_options) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_create_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_create_options** | [**InstanceCreateOptions**](InstanceCreateOptions.md)| The vm definition to create | - -### Return type - -[**InstanceReturn**](InstanceReturn.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Accepted | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_create_network_connection** -> NetworkConnection v1_create_network_connection(create_network_connection_options) - -Create a new Network Connection - -You must have the domain administrator role to create a network connection. VLAN networks are only supported in bridged networking mode. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - create_network_connection_options = { - "provider": "openvpn", - "name": "My OpenVPN Connection", - "config": { - "config": "client\ndev tun\nproto tcp\nremote my-server-1 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nremote-cert-tls server\ntls-auth ta.key 1\ncipher AES-256-CBC\nverb 3\n" - } -} # CreateNetworkConnectionOptions | Network Connection Options - - try: - # Create a new Network Connection - api_response = await api_instance.v1_create_network_connection(create_network_connection_options) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_create_network_connection: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_network_connection_options** | [**CreateNetworkConnectionOptions**](CreateNetworkConnectionOptions.md)| Network Connection Options | - -### Return type - -[**NetworkConnection**](NetworkConnection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_create_project** -> Project v1_create_project(project) - -Create a Project - -Create a Project - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project = { - "name": "New Project", - "settings": { - "internet-access": true - }, - "quotas": { - "cores": 8, - "instances": 2, - "ram": 16384 - } -} # Project | Project - - try: - # Create a Project - api_response = await api_instance.v1_create_project(project) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_create_project: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project** | [**Project**](Project.md)| Project | - -### Return type - -[**Project**](Project.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_create_snapshot** -> Snapshot v1_create_snapshot(instance_id, snapshot_creation_options) - -Create Instance Snapshot - -Create Instance Snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -snapshot_creation_options = corellium_api.SnapshotCreationOptions() # SnapshotCreationOptions | - - try: - # Create Instance Snapshot - api_response = await api_instance.v1_create_snapshot(instance_id, snapshot_creation_options) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_create_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **snapshot_creation_options** | [**SnapshotCreationOptions**](SnapshotCreationOptions.md)| | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_create_user** -> UserCreateReturn v1_create_user(user_create) - -Create User - -Create User - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - user_create = { - "name": "test", - "label": "Project Admin", -} # UserCreate | User data - - try: - # Create User - api_response = await api_instance.v1_create_user(user_create) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_create_user: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_create** | [**UserCreate**](UserCreate.md)| User data | - -### Return type - -[**UserCreateReturn**](UserCreateReturn.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | User | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_domain_auth_provider** -> v1_delete_domain_auth_provider(domain_id, provider_id) - -Delete an auth provider from a domain - -Delete an auth provider from a domain - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - domain_id = 'domain_id_example' # str | Domain ID - uuid -provider_id = 'provider_id_example' # str | Provider ID - uuid - - try: - # Delete an auth provider from a domain - api_instance.v1_delete_domain_auth_provider(domain_id, provider_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_domain_auth_provider: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **domain_id** | **str**| Domain ID - uuid | - **provider_id** | **str**| Provider ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_extension** -> v1_delete_extension(extension_id) - -Delete an existing extension - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - extension_id = 'extension_id_example' # str | Extension ID - - try: - # Delete an existing extension - api_instance.v1_delete_extension(extension_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_extension: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **extension_id** | **str**| Extension ID | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_hook** -> v1_delete_hook(hook_id) - -Delete an existing hypervisor hook - -Delete an existing hypervisor hook - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - hook_id = 'hook_id_example' # str | Hook ID - - try: - # Delete an existing hypervisor hook - api_instance.v1_delete_hook(hook_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_hook: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hook_id** | **str**| Hook ID | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Accepted | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_image** -> v1_delete_image(image_id) - -Delete Image - -Delete Image - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - image_id = 'image_id_example' # str | Image ID - uuid - - try: - # Delete Image - api_instance.v1_delete_image(image_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_image: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **image_id** | **str**| Image ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_instance** -> v1_delete_instance(instance_id) - -Remove Instance - -Remove Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - - try: - # Remove Instance - api_instance.v1_delete_instance(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_instance_snapshot** -> v1_delete_instance_snapshot(instance_id, snapshot_id) - -Delete an Instance Snapshot - -Delete an Instance Snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid - - try: - # Delete an Instance Snapshot - api_instance.v1_delete_instance_snapshot(instance_id, snapshot_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_instance_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **snapshot_id** | **str**| Snapshot ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_network_connection** -> v1_delete_network_connection(id, force=force) - -Delete an existing Network Connection - -You must have the domain administrator role to delete a network connection. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - id = 'id_example' # str | Network Connection Identifier - uuid -force = True # bool | Force deletion (true only or not present) (optional) - - try: - # Delete an existing Network Connection - api_instance.v1_delete_network_connection(id, force=force) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_network_connection: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| Network Connection Identifier - uuid | - **force** | **bool**| Force deletion (true only or not present) | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_project** -> v1_delete_project(project_id) - -Delete a Project - -Delete a Project - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid - - try: - # Delete a Project - api_instance.v1_delete_project(project_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_project: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_snapshot** -> v1_delete_snapshot(snapshot_id) - -Delete a Snapshot - -Delete a Snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid - - try: - # Delete a Snapshot - api_instance.v1_delete_snapshot(snapshot_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **snapshot_id** | **str**| Snapshot ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_snapshot_permissions** -> Snapshot v1_delete_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload) - -Delete member(s) - -Deletes one or more members from the list of members who have access to the snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid -snapshot_permissions_request_payload = { - "members": [ - "newuser1@domain.com", - "newuser2@domain.com" - ] -} # SnapshotPermissionsRequestPayload | - - try: - # Delete member(s) - api_response = await api_instance.v1_delete_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_snapshot_permissions: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **snapshot_id** | **str**| Snapshot ID - uuid | - **snapshot_permissions_request_payload** | [**SnapshotPermissionsRequestPayload**](SnapshotPermissionsRequestPayload.md)| | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_delete_user** -> v1_delete_user(user_id) - -Delete User - -Delete User - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - user_id = 'user_id_example' # str | userId - uuid - - try: - # Delete User - api_instance.v1_delete_user(user_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_delete_user: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| userId - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_detach_instance_interface** -> v1_detach_instance_interface(instance_id, interface_id, detach_interface_request) - -Detach I/O Interface - -Detach an I/O interface from an I/O interconnect for the specified instance identifier. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -interface_id = 'interface_id_example' # str | Interface ID -detach_interface_request = corellium_api.DetachInterfaceRequest() # DetachInterfaceRequest | Interface detachment request - - try: - # Detach I/O Interface - api_instance.v1_detach_instance_interface(instance_id, interface_id, detach_interface_request) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_detach_instance_interface: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **interface_id** | **str**| Interface ID | - **detach_interface_request** | [**DetachInterfaceRequest**](DetachInterfaceRequest.md)| Interface detachment request | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_disable_expose_port** -> v1_disable_expose_port(instance_id) - -Disable an exposed port on an instance for device access. - -Disable an exposed port on an instance for device access. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Disable an exposed port on an instance for device access. - api_instance.v1_disable_expose_port(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_disable_expose_port: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_download_activity** -> ActivityList v1_download_activity(task_id) - -Download activity - -Download activity for a given task - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - task_id = 'task_id_example' # str | Export ID - - try: - # Download activity - api_response = await api_instance.v1_download_activity(task_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_download_activity: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **task_id** | **str**| Export ID | - -### Return type - -[**ActivityList**](ActivityList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_enable_expose_port** -> v1_enable_expose_port(instance_id) - -Enable an exposed port on an instance for device access. - -Enable an exposed port on an instance for device access. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Enable an exposed port on an instance for device access. - api_instance.v1_enable_expose_port(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_enable_expose_port: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_execute_hyper_trace_hooks** -> v1_execute_hyper_trace_hooks(instance_id) - -Execute Hooks on an instance - -Execute Hooks on an instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Execute Hooks on an instance - api_instance.v1_execute_hyper_trace_hooks(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_execute_hyper_trace_hooks: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_activity_export_status** -> ActivityList v1_get_activity_export_status(task_id) - -Get export task status - -Get export task status - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - task_id = 'task_id_example' # str | Export ID - - try: - # Get export task status - api_response = await api_instance.v1_get_activity_export_status(task_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_activity_export_status: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **task_id** | **str**| Export ID | - -### Return type - -[**ActivityList**](ActivityList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_activity_export_tasks** -> ActivityList v1_get_activity_export_tasks() - -Get all export tasks for user - -Get all export tasks for user - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # Get all export tasks for user - api_response = await api_instance.v1_get_activity_export_tasks() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_activity_export_tasks: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ActivityList**](ActivityList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_config** -> ConfigResponse v1_get_config() - -Get all configs - -Get all configs - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # Get all configs - api_response = await api_instance.v1_get_config() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_config: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**ConfigResponse**](ConfigResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_domain_auth_providers** -> list[DomainAuthProviderResponse] v1_get_domain_auth_providers(domain_id) - -Return all configured auth providers for a domain (including globally configured providers) - -Return all configured auth providers for a domain (including globally configured providers) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - domain_id = 'domain_id_example' # str | Domain ID - uuid - - try: - # Return all configured auth providers for a domain (including globally configured providers) - api_response = await api_instance.v1_get_domain_auth_providers(domain_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_domain_auth_providers: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **domain_id** | **str**| Domain ID - uuid | - -### Return type - -[**list[DomainAuthProviderResponse]**](DomainAuthProviderResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_extension_by_id** -> Extension v1_get_extension_by_id(extension_id) - -Get extension by id - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - extension_id = 'extension_id_example' # str | Extension Id - - try: - # Get extension by id - api_response = await api_instance.v1_get_extension_by_id(extension_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_extension_by_id: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **extension_id** | **str**| Extension Id | - -### Return type - -[**Extension**](Extension.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Extension | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_extensions** -> list[Extension] v1_get_extensions(limit=limit, offset=offset, if_none_match=if_none_match) - -Get all extensions - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - limit = 3.4 # float | limit for pagination results, defaults to 20 (optional) -offset = 3.4 # float | offset for pagination results, defaults to 0 (optional) -if_none_match = 'if_none_match_example' # str | sha256sum of the last response with the same parameters (optional) (optional) - - try: - # Get all extensions - api_response = await api_instance.v1_get_extensions(limit=limit, offset=offset, if_none_match=if_none_match) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_extensions: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **float**| limit for pagination results, defaults to 20 | [optional] - **offset** | **float**| offset for pagination results, defaults to 0 | [optional] - **if_none_match** | **str**| sha256sum of the last response with the same parameters (optional) | [optional] - -### Return type - -[**list[Extension]**](Extension.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Extensions | - | -**304** | No changes | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_hook_by_id** -> Hook v1_get_hook_by_id(hook_id) - -Get hypervisor hook by id - -Get hypervisor hook by id - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - hook_id = 'hook_id_example' # str | Hook Id - - try: - # Get hypervisor hook by id - api_response = await api_instance.v1_get_hook_by_id(hook_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_hook_by_id: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hook_id** | **str**| Hook Id | - -### Return type - -[**Hook**](Hook.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Hook | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_hooks** -> list[Hook] v1_get_hooks(instance_id, limit=limit, offset=offset, sort=sort) - -Get all hypervisor hooks for Instance - -Get all hypervisor hooks for Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -limit = 3.4 # float | limit for pagination results, defaults to 20 (optional) -offset = 3.4 # float | offset for pagination results, defaults to 0 (optional) -sort = 'sort_example' # str | sort ASC or DESC, defaults to DESC (optional) - - try: - # Get all hypervisor hooks for Instance - api_response = await api_instance.v1_get_hooks(instance_id, limit=limit, offset=offset, sort=sort) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_hooks: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **limit** | **float**| limit for pagination results, defaults to 20 | [optional] - **offset** | **float**| offset for pagination results, defaults to 0 | [optional] - **sort** | **str**| sort ASC or DESC, defaults to DESC | [optional] - -### Return type - -[**list[Hook]**](Hook.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Hooks | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_image** -> Image v1_get_image(image_id) - -Get Image Metadata - -Get Image Metadata - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - image_id = 'image_id_example' # str | Image ID - uuid - - try: - # Get Image Metadata - api_response = await api_instance.v1_get_image(image_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_image: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **image_id** | **str**| Image ID - uuid | - -### Return type - -[**Image**](Image.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**404** | application/json | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_images** -> list[Image] v1_get_images(project=project) - -Get all Images Metadata - -Get all Images Metadata - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project = 'project_example' # str | Optionally filter by project - uuid (optional) - - try: - # Get all Images Metadata - api_response = await api_instance.v1_get_images(project=project) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_images: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project** | **str**| Optionally filter by project - uuid | [optional] - -### Return type - -[**list[Image]**](Image.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_install_firmware_status** -> InstallFirmwareResponse v1_get_install_firmware_status(task_id) - -Query install firmware request status. - -Returns the status of an install firmware request. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - task_id = 'task_id_example' # str | Task ID - uuid - - try: - # Query install firmware request status. - api_response = await api_instance.v1_get_install_firmware_status(task_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_install_firmware_status: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **task_id** | **str**| Task ID - uuid | - -### Return type - -[**InstallFirmwareResponse**](InstallFirmwareResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**400** | Bad Request | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance** -> Instance v1_get_instance(instance_id, return_attr=return_attr) - -Get Instance - -Get Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID -return_attr = ['return_attr_example'] # list[str] | Attributes to include in instance return (optional) - - try: - # Get Instance - api_response = await api_instance.v1_get_instance(instance_id, return_attr=return_attr) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID | - **return_attr** | [**list[str]**](str.md)| Attributes to include in instance return | [optional] - -### Return type - -[**Instance**](Instance.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance_console** -> InstanceConsoleEndpoint v1_get_instance_console(instance_id) - -Get console websocket URL - -Get console websocket URL - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get console websocket URL - api_response = await api_instance.v1_get_instance_console(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance_console: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**InstanceConsoleEndpoint**](InstanceConsoleEndpoint.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance_console_log** -> str v1_get_instance_console_log(instance_id) - -Get Console Log - -Get Console Log - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get Console Log - api_response = await api_instance.v1_get_instance_console_log(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance_console_log: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -**str** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: text/plain, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Current console log | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance_gpios** -> GpiosState v1_get_instance_gpios(instance_id) - -Get Instance GPIOs - -Get Instance GPIOs - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get Instance GPIOs - api_response = await api_instance.v1_get_instance_gpios(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance_gpios: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**GpiosState**](GpiosState.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Current GPIO State | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance_panics** -> list[object] v1_get_instance_panics(instance_id) - -Get Panics - -Get Panics - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get Panics - api_response = await api_instance.v1_get_instance_panics(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance_panics: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -**list[object]** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Array of panics | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance_peripherals** -> PeripheralsData v1_get_instance_peripherals(instance_id) - -Get Instance Peripherals - -Get Instance Peripherals - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get Instance Peripherals - api_response = await api_instance.v1_get_instance_peripherals(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance_peripherals: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**PeripheralsData**](PeripheralsData.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Current Peripherals State | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance_screenshot** -> file v1_get_instance_screenshot(instance_id, format, scale=scale) - -Get Instance Screenshot - -Get Instance Screenshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -format = 'format_example' # str | New peripherals state -scale = 3.4 # float | Screenshot scale 1:N (optional) - - try: - # Get Instance Screenshot - api_response = await api_instance.v1_get_instance_screenshot(instance_id, format, scale=scale) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance_screenshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **format** | **str**| New peripherals state | - **scale** | **float**| Screenshot scale 1:N | [optional] - -### Return type - -**file** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: image/png, image/jpeg, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Screenshot | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance_snapshot** -> Snapshot v1_get_instance_snapshot(instance_id, snapshot_id) - -Get Instance Snapshot - -Get Instance Snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid - - try: - # Get Instance Snapshot - api_response = await api_instance.v1_get_instance_snapshot(instance_id, snapshot_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **snapshot_id** | **str**| Snapshot ID - uuid | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instance_snapshots** -> list[Snapshot] v1_get_instance_snapshots(instance_id) - -Get Instance Snapshots - -Get Instance Snapshots - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get Instance Snapshots - api_response = await api_instance.v1_get_instance_snapshots(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instance_snapshots: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**list[Snapshot]**](Snapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_instances** -> list[Instance] v1_get_instances(name=name, return_attr=return_attr) - -Get Instances - -Get Instances - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - name = 'name_example' # str | Optionally filter by instance name (optional) -return_attr = ['return_attr_example'] # list[str] | Attributes to include in instance return (optional) - - try: - # Get Instances - api_response = await api_instance.v1_get_instances(name=name, return_attr=return_attr) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_instances: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| Optionally filter by instance name | [optional] - **return_attr** | [**list[str]**](str.md)| Attributes to include in instance return | [optional] - -### Return type - -[**list[Instance]**](Instance.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_model_software** -> list[Firmware] v1_get_model_software(model) - -Get Software for Model - -Get Software for Model - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - model = 'model_example' # str | Model to list available software for - - try: - # Get Software for Model - api_response = await api_instance.v1_get_model_software(model) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_model_software: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **model** | **str**| Model to list available software for | - -### Return type - -[**list[Firmware]**](Firmware.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Supported software loads for this model | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_models** -> list[Model] v1_get_models() - -Get Supported Models - -Get Supported Models - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # Get Supported Models - api_response = await api_instance.v1_get_models() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_models: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[Model]**](Model.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Supported device configurations | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_network_connection** -> NetworkConnection v1_get_network_connection(id) - -Return the configuration and per project statuses for a single network provider. - -You must have the domain administrator or project administrator role to fetch a network connection. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - id = 'id_example' # str | Network Connection Identifier - uuid - - try: - # Return the configuration and per project statuses for a single network provider. - api_response = await api_instance.v1_get_network_connection(id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_network_connection: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| Network Connection Identifier - uuid | - -### Return type - -[**NetworkConnection**](NetworkConnection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_project** -> Project v1_get_project(project_id) - -Get a Project - -Get a Project - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid - - try: - # Get a Project - api_response = await api_instance.v1_get_project(project_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_project: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - -### Return type - -[**Project**](Project.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_project_instances** -> list[Instance] v1_get_project_instances(project_id, name=name, return_attr=return_attr) - -Get Instances in Project - -Get Instances in Project - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -name = 'name_example' # str | Filter by project name (optional) -return_attr = ['return_attr_example'] # list[str] | Attributes to include in instance return (optional) - - try: - # Get Instances in Project - api_response = await api_instance.v1_get_project_instances(project_id, name=name, return_attr=return_attr) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_project_instances: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **name** | **str**| Filter by project name | [optional] - **return_attr** | [**list[str]**](str.md)| Attributes to include in instance return | [optional] - -### Return type - -[**list[Instance]**](Instance.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_project_keys** -> list[ProjectKey] v1_get_project_keys(project_id) - -Get Project Authorized Keys - -Get Project Authorized Keys - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid - - try: - # Get Project Authorized Keys - api_response = await api_instance.v1_get_project_keys(project_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_project_keys: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - -### Return type - -[**list[ProjectKey]**](ProjectKey.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Authorized Keys | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_project_network_log** -> str v1_get_project_network_log(project_id) - -Retrieve the network connection log for a project - -Retrieve the network connection log for a project - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID (must be a valid UUID) - - try: - # Retrieve the network connection log for a project - api_response = await api_instance.v1_get_project_network_log(project_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_project_network_log: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID (must be a valid UUID) | - -### Return type - -**str** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**503** | Service Unavailable | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_project_network_status** -> NetworkStatusResponse v1_get_project_network_status(project_id) - -Retrieve the network connection status for a project - -Retrieve the network connection status for a project - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid - - try: - # Retrieve the network connection status for a project - api_response = await api_instance.v1_get_project_network_status(project_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_project_network_status: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - -### Return type - -[**NetworkStatusResponse**](NetworkStatusResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_project_vpn_config** -> str v1_get_project_vpn_config(project_id, format) - -Get Project VPN Configuration - -A Project VPN allows connection _into_ virtual devices in the project (e.g., connecting a researcher's computer as a VPN client to a virtual device within the project). If a Project VPN has been defined, this will return the configuration. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -format = 'format_example' # str | VPN Config format - - try: - # Get Project VPN Configuration - api_response = await api_instance.v1_get_project_vpn_config(project_id, format) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_project_vpn_config: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **format** | **str**| VPN Config format | - -### Return type - -**str** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OpenVPN Configuration | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_projects** -> list[Project] v1_get_projects(name=name, ids_only=ids_only) - -Get Projects - -Get Projects - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - name = 'name_example' # str | Filter by project name (optional) -ids_only = True # bool | Only include id of project in results (optional) - - try: - # Get Projects - api_response = await api_instance.v1_get_projects(name=name, ids_only=ids_only) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_projects: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| Filter by project name | [optional] - **ids_only** | **bool**| Only include id of project in results | [optional] - -### Return type - -[**list[Project]**](Project.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Projects | - | -**403** | Forbidden | - | -**404** | No Projects Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_reset_link_info** -> ResetLinkInfoReturn v1_get_reset_link_info(token) - -Send Password Reset Link Info - -Send Password Reset Link Info - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - token = 'token_example' # str | Reset token - - try: - # Send Password Reset Link Info - api_response = await api_instance.v1_get_reset_link_info(token) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_reset_link_info: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **str**| Reset token | - -### Return type - -[**ResetLinkInfoReturn**](ResetLinkInfoReturn.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Reset Link Info | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_shared_snapshots** -> UserSnapshots v1_get_shared_snapshots() - -Fetch shared snapshots - -Fetch snapshots shared with and shared by the requesting user - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # Fetch shared snapshots - api_response = await api_instance.v1_get_shared_snapshots() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_shared_snapshots: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**UserSnapshots**](UserSnapshots.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_get_snapshot** -> Snapshot v1_get_snapshot(snapshot_id) - -Get Snapshot - -Get Snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid - - try: - # Get Snapshot - api_response = await api_instance.v1_get_snapshot(snapshot_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_get_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **snapshot_id** | **str**| Snapshot ID - uuid | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_install_firmware** -> InstallFirmwareResponse v1_install_firmware(install_firmware_request) - -Installs a firmware for cluster-wide use - -Takes an uploaded firmware image and installs it for cluster-wide use. The firmware is then removed from Images. In order to install a firmware, you need to follow a 4-step process. First, POST /v1/images/ with { name: string, type: 'fw' } using content-type application/json to acquire an imageId. Second, upload the firmware file via a multipart/form-data POST to /v1/images/:imageId. Third, POST /v1/cluster/firmware-service/firmware with { imageId: string; filename: string } using content-type application/json to acquire a taskId. The 'filename' must be an exact match for the filename in the firmware service that you're uploading this image for. Fourth, you can poll the state of the installation via GET /v1/images/install-firmware/:taskId. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - install_firmware_request = corellium_api.InstallFirmwareRequest() # InstallFirmwareRequest | User data - - try: - # Installs a firmware for cluster-wide use - api_response = await api_instance.v1_install_firmware(install_firmware_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_install_firmware: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **install_firmware_request** | [**InstallFirmwareRequest**](InstallFirmwareRequest.md)| User data | - -### Return type - -[**InstallFirmwareResponse**](InstallFirmwareResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | application/json | - | -**400** | Bad Request | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_instances_instance_id_message_post** -> v1_instances_instance_id_message_post(instance_id, body) - -Inject a message into an iOS VM - -Given a message and source phone number, place this message as an incoming SMS message on the iOS VM. For advanced usage, a raw message of bytes may be sent. In this case, the parameter should provide hex encoded bytes (0x00 0x11 0x22 0x33 in the example below) which are sent verbatim. The user must ensure that the body is the correct format for the underlying device stack. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -body = { - "number": "+19997776666", - "message": "the SMS message body goes here" -} # object | Message data - - try: - # Inject a message into an iOS VM - api_instance.v1_instances_instance_id_message_post(instance_id, body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_instances_instance_id_message_post: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **body** | **object**| Message data | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_instances_instance_id_netdump_pcap_get** -> file v1_instances_instance_id_netdump_pcap_get(instance_id) - -Download a netdump pcap file - -Download a netdump pcap file - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Download a netdump pcap file - api_response = await api_instance.v1_instances_instance_id_netdump_pcap_get(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_instances_instance_id_netdump_pcap_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -**file** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/vnd.tcpdump.pcap, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | pcapng file | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_instances_instance_id_network_monitor_pcap_get** -> file v1_instances_instance_id_network_monitor_pcap_get(instance_id) - -Download a Network Monitor pcap file - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Download a Network Monitor pcap file - api_response = await api_instance.v1_instances_instance_id_network_monitor_pcap_get(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_instances_instance_id_network_monitor_pcap_get: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -**file** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/vnd.tcpdump.pcap, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | pcap file | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_kcrange** -> list[Kcrange] v1_kcrange(instance_id) - -Get Kernel extension ranges - -Get Kernel extension ranges - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get Kernel extension ranges - api_response = await api_instance.v1_kcrange(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_kcrange: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**list[Kcrange]**](Kcrange.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Kcranges | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_list_network_connections** -> NetworkConnectionOffsetPaginationResult v1_list_network_connections(limit=limit, offset=offset) - -List available network connections - -You must have the domain administrator or project administrator role to list network connections. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - limit = 3.4 # float | The maximum number of items to return. (optional) -offset = 3.4 # float | The starting index of the items to return. (optional) - - try: - # List available network connections - api_response = await api_instance.v1_list_network_connections(limit=limit, offset=offset) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_list_network_connections: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **float**| The maximum number of items to return. | [optional] - **offset** | **float**| The starting index of the items to return. | [optional] - -### Return type - -[**NetworkConnectionOffsetPaginationResult**](NetworkConnectionOffsetPaginationResult.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_list_network_interfaces** -> list[str] v1_list_network_interfaces() - -List available physical network interfaces - -Lists available physical network interfaces that can be used for VLAN configuration. You must have the domain administrator role to list network interfaces. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # List available physical network interfaces - api_response = await api_instance.v1_list_network_interfaces() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_list_network_interfaces: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**list[str]** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_list_network_providers** -> NetworkConnectionProviderOffsetPaginationResult v1_list_network_providers() - -List available network providers - -Provides a list of registered network providers to be used when [creating network connections](#post-/v1/network/connections). You must have the domain administrator role to list network providers. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # List available network providers - api_response = await api_instance.v1_list_network_providers() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_list_network_providers: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**NetworkConnectionProviderOffsetPaginationResult**](NetworkConnectionProviderOffsetPaginationResult.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_list_threads** -> list[KernelTask] v1_list_threads(instance_id) - -Get Running Threads (CoreTrace) - -Get Running Threads (CoreTrace) - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Get Running Threads (CoreTrace) - api_response = await api_instance.v1_list_threads(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_list_threads: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -[**list[KernelTask]**](KernelTask.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Threads | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_load_extension** -> Extension v1_load_extension(v1_load_extension_parameters) - -Load an extension - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - v1_load_extension_parameters = corellium_api.V1LoadExtensionParameters() # V1LoadExtensionParameters | application/json - - try: - # Load an extension - api_response = await api_instance.v1_load_extension(v1_load_extension_parameters) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_load_extension: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **v1_load_extension_parameters** | [**V1LoadExtensionParameters**](V1LoadExtensionParameters.md)| application/json | - -### Return type - -[**Extension**](Extension.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Extension | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_media_play** -> v1_media_play(instance_id, media_play_body) - -Start playing media - -Start playing media - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -media_play_body = { - "url": "http://null.to/test.mp4" -} # MediaPlayBody | Request Body - - try: - # Start playing media - api_instance.v1_media_play(instance_id, media_play_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_media_play: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **media_play_body** | [**MediaPlayBody**](MediaPlayBody.md)| Request Body | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success response | - | -**400** | Bad Request | - | -**404** | Not Found | - | -**409** | Conflict | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_media_stop** -> v1_media_stop(instance_id) - -Stop playing media - -Stop playing media - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Stop playing media - api_instance.v1_media_stop(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_media_stop: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success response | - | -**400** | Bad Request | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_parse_extension_json** -> object v1_parse_extension_json(extension) - -Validates extension.json - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - extension = { - "parserVersion": 1, - "version": "1.0.0", - "identifier": "mach-rpi4b", - "definitions": [{ - "type": "iot", - "flavor": "Raspberry Pi 4", - "flavorId": "rpi4b", - "cores": 4, - "bootargs": [], - "volume": { - "allocate": 1 - }, - "ram": 4096, - "supportsGDB": true, - "supportsSerialConsole": true, - "supportsPresetBootOptions": true - }] -} # Extension | extension.json contents - - try: - # Validates extension.json - api_response = await api_instance.v1_parse_extension_json(extension) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_parse_extension_json: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **extension** | [**Extension**](Extension.md)| extension.json contents | - -### Return type - -**object** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_partial_update_network_connection** -> NetworkConnection v1_partial_update_network_connection(id, update_network_connection_options, force=force) - -Update Network Connection (partial) - -Only updates the specified attributes. You must have the domain administrator role to update a network connection. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - id = 'id_example' # str | Network Connection Identifier - uuid -update_network_connection_options = { - "name": "My Renamed OpenVPN Connection" -} # UpdateNetworkConnectionOptions | Network Connection Options -force = True # bool | Force deletion (true only or not present) (optional) - - try: - # Update Network Connection (partial) - api_response = await api_instance.v1_partial_update_network_connection(id, update_network_connection_options, force=force) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_partial_update_network_connection: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| Network Connection Identifier - uuid | - **update_network_connection_options** | [**UpdateNetworkConnectionOptions**](UpdateNetworkConnectionOptions.md)| Network Connection Options | - **force** | **bool**| Force deletion (true only or not present) | [optional] - -### Return type - -[**NetworkConnection**](NetworkConnection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_patch_instance** -> Instance v1_patch_instance(instance_id, patch_instance_options) - -Update Instance - -Update Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID -patch_instance_options = { - "name": "New Name" -} # PatchInstanceOptions | - - try: - # Update Instance - api_response = await api_instance.v1_patch_instance(instance_id, patch_instance_options) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_patch_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID | - **patch_instance_options** | [**PatchInstanceOptions**](PatchInstanceOptions.md)| | - -### Return type - -[**Instance**](Instance.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_patch_instance_read_only** -> Instance v1_patch_instance_read_only(instance_id, patch_instance_read_only) - -Update Instance Read Only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID -patch_instance_read_only = { - "readOnly": "disabled" -} # PatchInstanceReadOnly | - - try: - # Update Instance Read Only - api_response = await api_instance.v1_patch_instance_read_only(instance_id, patch_instance_read_only) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_patch_instance_read_only: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID | - **patch_instance_read_only** | [**PatchInstanceReadOnly**](PatchInstanceReadOnly.md)| | - -### Return type - -[**Instance**](Instance.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_pause_instance** -> v1_pause_instance(instance_id) - -Pause an Instance - -Pause an Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Pause an Instance - api_instance.v1_pause_instance(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_pause_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_post_instance_input** -> InputResponse v1_post_instance_input(instance_id, instance_input) - -Provide Instance Input - -Sends a touch or button event to the VM. - Buttons (or keys) to be held during the input are specified as an array of strings, each string must be either a single ascii character or one of the following keywords: - VM Buttons: finger, homeButton, holdButton, volumeUp, volumeDown, ringerSwitch, backButton, overviewButton - Keyboard Buttons: again, alt, alterase, apostrophe, back, backslash, backspace, bassboost, bookmarks, bsp, calc, camera, cancel, caps, capslock, chat, close, closecd, comma, compose, computer, config, connect, copy, ctrl, cut, cyclewindows, dashboard, del, delete, deletefile, dot, down, edit, eject, ejectclose, email, end, enter, equal, esc, escape, exit, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, fastfwd, file, finance, find, forward, front, grave, hangeul, hanja, help, henkan, home, homepage, hp, hrgn, ins, insert, iso, k102, kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9, kpasterisk, kpcomma, kpdot, kpenter, kpequal, kpjpcomma, kpleftparen, kpminus, kpplus, kpplusminus, kprightparen, kpslash, ktkn, ktknhrgn, left, leftalt, leftbrace, leftctrl, leftmeta, leftshift, linefeed, macro, mail, menu, meta, minus, move, msdos, muhenkan, mute, new, next, numlock, open, pagedown, pageup, paste, pause, pausecd, pgdn, pgup, phone, play, playcd, playpause, power, previous, print, prog1, prog2, prog3, prog4, props, question, record, redo, refresh, return, rewind, right, rightalt, rightbrace, rightctrl, rightmeta, rightshift, ro, rotate, scale, screenlock, scrolldown, scrolllock, scrollup, search, semicolon, sendfile, setup, shift, shop, slash, sleep, sound, space, sport, stop, stopcd, suspend, sysrq, tab, undo, up, voldown, volup, wakeup, www, xfer, yen, zkhk - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -instance_input = [ - { - "buttons": ["finger"], - "position": [ - [300, 600] - ], - "wait": 0 - }, - { - "buttons": [], - "wait": 100 - } -] # list[InstanceInput] | The input to send to the VM - - try: - # Provide Instance Input - api_response = await api_instance.v1_post_instance_input(instance_id, instance_input) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_post_instance_input: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **instance_input** | [**list[InstanceInput]**](InstanceInput.md)| The input to send to the VM | - -### Return type - -[**InputResponse**](InputResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ETA of input completion in milliseconds | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_ready** -> v1_ready() - -API Status - -Check if API is ready for queries - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # API Status - api_instance.v1_ready() - except ApiException as e: - print("Exception when calling CorelliumApi->v1_ready: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | API is ready for queries | - | -**503** | API is not ready | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_reboot_instance** -> v1_reboot_instance(instance_id) - -Reboot an Instance - -Reboot an Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Reboot an Instance - api_instance.v1_reboot_instance(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_reboot_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_remove_project_key** -> v1_remove_project_key(project_id, key_id) - -Delete Project Authorized Key - -Delete Project Authorized Key - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -key_id = 'key_id_example' # str | Key ID - uuid - - try: - # Delete Project Authorized Key - api_instance.v1_remove_project_key(project_id, key_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_remove_project_key: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **key_id** | **str**| Key ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Deleted | - | -**403** | Forbidden | - | -**404** | Not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_remove_team_role_from_project** -> v1_remove_team_role_from_project(project_id, team_id, role_id) - -Remove team role from project - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -team_id = 'team_id_example' # str | Team ID - uuid -role_id = 'role_id_example' # str | Role ID - - try: - # Remove team role from project - api_instance.v1_remove_team_role_from_project(project_id, team_id, role_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_remove_team_role_from_project: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **team_id** | **str**| Team ID - uuid | - **role_id** | **str**| Role ID | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_remove_user_from_team** -> v1_remove_user_from_team(team_id, user_id) - -Remove user from team - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - team_id = 'team_id_example' # str | Team ID - uuid -user_id = 'user_id_example' # str | User ID - uuid - - try: - # Remove user from team - api_instance.v1_remove_user_from_team(team_id, user_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_remove_user_from_team: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **team_id** | **str**| Team ID - uuid | - **user_id** | **str**| User ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**403** | Forbidden | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_remove_user_role_from_project** -> v1_remove_user_role_from_project(project_id, user_id, role_id) - -Remove user role from project - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -user_id = 'user_id_example' # str | User ID - uuid -role_id = 'role_id_example' # str | Role ID - - try: - # Remove user role from project - api_instance.v1_remove_user_role_from_project(project_id, user_id, role_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_remove_user_role_from_project: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **user_id** | **str**| User ID - uuid | - **role_id** | **str**| Role ID | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_rename_instance_snapshot** -> Snapshot v1_rename_instance_snapshot(instance_id, snapshot_id, snapshot_creation_options) - -Rename an Instance Snapshot - -Rename an Instance Snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid -snapshot_creation_options = corellium_api.SnapshotCreationOptions() # SnapshotCreationOptions | - - try: - # Rename an Instance Snapshot - api_response = await api_instance.v1_rename_instance_snapshot(instance_id, snapshot_id, snapshot_creation_options) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_rename_instance_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **snapshot_id** | **str**| Snapshot ID - uuid | - **snapshot_creation_options** | [**SnapshotCreationOptions**](SnapshotCreationOptions.md)| | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_reset_user_password** -> v1_reset_user_password(password_reset_body) - -Reset User Password - -Reset User Password - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - password_reset_body = { - "token": "", - "totpToken": "", - "new-password": "password" -} # PasswordResetBody | application/json - - try: - # Reset User Password - api_instance.v1_reset_user_password(password_reset_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_reset_user_password: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **password_reset_body** | [**PasswordResetBody**](PasswordResetBody.md)| application/json | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_restore_backup** -> v1_restore_backup(instance_id, restore_backup_data=restore_backup_data) - -Restore backup - -Restore backup - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -restore_backup_data = { - "password": "12345678" -} # RestoreBackupData | Restore backup data (optional) - - try: - # Restore backup - api_instance.v1_restore_backup(instance_id, restore_backup_data=restore_backup_data) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_restore_backup: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **restore_backup_data** | [**RestoreBackupData**](RestoreBackupData.md)| Restore backup data | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_restore_instance_snapshot** -> v1_restore_instance_snapshot(instance_id, snapshot_id) - -Restore an Instance Snapshot - -Restore an Instance Snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid - - try: - # Restore an Instance Snapshot - api_instance.v1_restore_instance_snapshot(instance_id, snapshot_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_restore_instance_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **snapshot_id** | **str**| Snapshot ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_roles** -> list[Role] v1_roles() - -Get all roles - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # Get all roles - api_response = await api_instance.v1_roles() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_roles: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[Role]**](Role.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Roles | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_rotate_instance** -> v1_rotate_instance(instance_id, rotate_body) - -Rotate device to specified orientation - -Rotate device to orientation. Accepted orientations: 1. Portrait 2. Portrait vertically inverted (up-side-down) 3. Landscape with top of the device to the left 4. Landscape with top of the device to the right - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | -rotate_body = { - "orientation": 1 -} # RotateBody | - - try: - # Rotate device to specified orientation - api_instance.v1_rotate_instance(instance_id, rotate_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_rotate_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| | - **rotate_body** | [**RotateBody**](RotateBody.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_send_user_reset_link** -> v1_send_user_reset_link(reset_link_body) - -Send Password Reset Link - -Send Password Reset Link - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - reset_link_body = corellium_api.ResetLinkBody() # ResetLinkBody | application/json - - try: - # Send Password Reset Link - api_instance.v1_send_user_reset_link(reset_link_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_send_user_reset_link: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **reset_link_body** | [**ResetLinkBody**](ResetLinkBody.md)| application/json | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_set_instance_gpios** -> GpiosState v1_set_instance_gpios(instance_id, gpios_state) - -Set Instance GPIOs - -Set Instance GPIOs - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -gpios_state = { - "button": { - "bitCount": 2, - "banks": [ - [0,1], - [1,0] - ] - }, - "switch": { - "bitCount": 8, - "banks": [ - [0,1,0,1,0,1,0,1] - ] - } -} # GpiosState | New GPIO state - - try: - # Set Instance GPIOs - api_response = await api_instance.v1_set_instance_gpios(instance_id, gpios_state) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_set_instance_gpios: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **gpios_state** | [**GpiosState**](GpiosState.md)| New GPIO state | - -### Return type - -[**GpiosState**](GpiosState.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Current GPIOs State | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_set_instance_peripherals** -> PeripheralsData v1_set_instance_peripherals(instance_id, peripherals_data) - -Set Instance Peripherals - -Set Instance Peripherals - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -peripherals_data = { - "acceleration": [0, 9.81, 0], - "gyroscope": [0, 0, 0], - "magnetic": [0, 45, 0], - "orientation": [0, 0, 0], - "temperature": 25, - "proximity": 50, - "light": 20, - "pressure": 1013.25, - "humidity": 55 -} # PeripheralsData | New peripherals state - - try: - # Set Instance Peripherals - api_response = await api_instance.v1_set_instance_peripherals(instance_id, peripherals_data) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_set_instance_peripherals: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **peripherals_data** | [**PeripheralsData**](PeripheralsData.md)| New peripherals state | - -### Return type - -[**PeripheralsData**](PeripheralsData.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Current Peripherals State | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_set_instance_state** -> v1_set_instance_state(instance_id, v1_set_state_body) - -Set state of Instance - -Set state of Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -v1_set_state_body = corellium_api.V1SetStateBody() # V1SetStateBody | Desired State - - try: - # Set state of Instance - api_instance.v1_set_instance_state(instance_id, v1_set_state_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_set_instance_state: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **v1_set_state_body** | [**V1SetStateBody**](V1SetStateBody.md)| Desired State | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**409** | Conflict | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_set_snapshot_permissions** -> Snapshot v1_set_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload) - -Set member list - -Sets the list of members who have access to the snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid -snapshot_permissions_request_payload = { - "members": [ - "newuser1@domain.com", - "newuser2@domain.com" - ] -} # SnapshotPermissionsRequestPayload | - - try: - # Set member list - api_response = await api_instance.v1_set_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_set_snapshot_permissions: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **snapshot_id** | **str**| Snapshot ID - uuid | - **snapshot_permissions_request_payload** | [**SnapshotPermissionsRequestPayload**](SnapshotPermissionsRequestPayload.md)| | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_share_snapshot** -> Snapshot v1_share_snapshot(snapshot_id, post_share_snapshot_request_payload) - -Share snapshot - -Share a snapshot - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid -post_share_snapshot_request_payload = { - "sharingType": "passwordPublicLink", - "password": "password" -} # PostShareSnapshotRequestPayload | - - try: - # Share snapshot - api_response = await api_instance.v1_share_snapshot(snapshot_id, post_share_snapshot_request_payload) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_share_snapshot: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **snapshot_id** | **str**| Snapshot ID - uuid | - **post_share_snapshot_request_payload** | [**PostShareSnapshotRequestPayload**](PostShareSnapshotRequestPayload.md)| | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_snapshot_rename** -> Snapshot v1_snapshot_rename(snapshot_id, snapshot_creation_options) - -Rename a Snapshot - -Rename a Snapshot - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid -snapshot_creation_options = corellium_api.SnapshotCreationOptions() # SnapshotCreationOptions | - - try: - # Rename a Snapshot - api_response = await api_instance.v1_snapshot_rename(snapshot_id, snapshot_creation_options) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_snapshot_rename: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **snapshot_id** | **str**| Snapshot ID - uuid | - **snapshot_creation_options** | [**SnapshotCreationOptions**](SnapshotCreationOptions.md)| | - -### Return type - -[**Snapshot**](Snapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_start_core_trace** -> v1_start_core_trace(instance_id) - -Start CoreTrace on an instance - -Start CoreTrace on an instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Start CoreTrace on an instance - api_instance.v1_start_core_trace(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_start_core_trace: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_start_hyper_trace** -> v1_start_hyper_trace(instance_id, btrace_enable_options) - -Start HyperTrace on an instance - -Start HyperTrace on an instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -btrace_enable_options = corellium_api.BtraceEnableOptions() # BtraceEnableOptions | - - try: - # Start HyperTrace on an instance - api_instance.v1_start_hyper_trace(instance_id, btrace_enable_options) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_start_hyper_trace: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **btrace_enable_options** | [**BtraceEnableOptions**](BtraceEnableOptions.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_start_instance** -> v1_start_instance(instance_id, instance_start_options=instance_start_options) - -Start an Instance - -Start an Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -instance_start_options = corellium_api.InstanceStartOptions() # InstanceStartOptions | Start options (optional) - - try: - # Start an Instance - api_instance.v1_start_instance(instance_id, instance_start_options=instance_start_options) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_start_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **instance_start_options** | [**InstanceStartOptions**](InstanceStartOptions.md)| Start options | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**409** | Conflict | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_start_netdump** -> v1_start_netdump(instance_id, netdump_filter=netdump_filter) - -Start Enhanced Network Monitor on an instance. - -Start Enhanced Network Monitor on an instance. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -netdump_filter = { } # NetdumpFilter | (optional) - - try: - # Start Enhanced Network Monitor on an instance. - api_instance.v1_start_netdump(instance_id, netdump_filter=netdump_filter) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_start_netdump: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **netdump_filter** | [**NetdumpFilter**](NetdumpFilter.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_start_network_monitor** -> v1_start_network_monitor(instance_id, sslsplit_filter=sslsplit_filter) - -Start Network Monitor on an instance. - -Start Network Monitor on an instance. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -sslsplit_filter = corellium_api.SslsplitFilter() # SslsplitFilter | (optional) - - try: - # Start Network Monitor on an instance. - api_instance.v1_start_network_monitor(instance_id, sslsplit_filter=sslsplit_filter) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_start_network_monitor: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **sslsplit_filter** | [**SslsplitFilter**](SslsplitFilter.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_stop_core_trace** -> v1_stop_core_trace(instance_id) - -Stop CoreTrace on an instance. - -Stop CoreTrace on an instance. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Stop CoreTrace on an instance. - api_instance.v1_stop_core_trace(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_stop_core_trace: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_stop_hyper_trace** -> v1_stop_hyper_trace(instance_id) - -Stop HyperTrace on an instance. - -Stop HyperTrace on an instance. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Stop HyperTrace on an instance. - api_instance.v1_stop_hyper_trace(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_stop_hyper_trace: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_stop_instance** -> v1_stop_instance(instance_id, instance_stop_options=instance_stop_options) - -Stop an Instance - -Stop an Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -instance_stop_options = corellium_api.InstanceStopOptions() # InstanceStopOptions | Stop options (optional) - - try: - # Stop an Instance - api_instance.v1_stop_instance(instance_id, instance_stop_options=instance_stop_options) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_stop_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **instance_stop_options** | [**InstanceStopOptions**](InstanceStopOptions.md)| Stop options | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**409** | Conflict | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_stop_netdump** -> v1_stop_netdump(instance_id) - -Stop Enhanced Network Monitor on an instance. - -Stop Enhanced Network Monitor on an instance. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Stop Enhanced Network Monitor on an instance. - api_instance.v1_stop_netdump(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_stop_netdump: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_stop_network_monitor** -> v1_stop_network_monitor(instance_id) - -Stop Network Monitor on an instance. - -Stop Network Monitor on an instance. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Stop Network Monitor on an instance. - api_instance.v1_stop_network_monitor(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_stop_network_monitor: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | No Content | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_team_change** -> v1_team_change(team_id, create_team) - -Update team - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - team_id = 'team_id_example' # str | Team ID - uuid -create_team = { "name": "Test Team"} # CreateTeam | - - try: - # Update team - api_instance.v1_team_change(team_id, create_team) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_team_change: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **team_id** | **str**| Team ID - uuid | - **create_team** | [**CreateTeam**](CreateTeam.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_team_create** -> TeamCreate v1_team_create(create_team) - -Create team - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - create_team = { "name": "Test Team"} # CreateTeam | - - try: - # Create team - api_response = await api_instance.v1_team_create(create_team) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_team_create: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_team** | [**CreateTeam**](CreateTeam.md)| | - -### Return type - -[**TeamCreate**](TeamCreate.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | User | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_team_delete** -> v1_team_delete(team_id) - -Delete team - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - team_id = 'team_id_example' # str | Team ID - uuid - - try: - # Delete team - api_instance.v1_team_delete(team_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_team_delete: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **team_id** | **str**| Team ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**403** | Forbidden | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_teams** -> list[Team] v1_teams() - -Get teams - -This endpoint is available for Enterprise accounts only - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # Get teams - api_response = await api_instance.v1_teams() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_teams: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[Team]**](Team.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Teams | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_unpause_instance** -> v1_unpause_instance(instance_id) - -Unpause an Instance - -Unpause an Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Unpause an Instance - api_instance.v1_unpause_instance(instance_id) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_unpause_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_update_domain_auth_provider** -> DomainAuthProviderResponse v1_update_domain_auth_provider(domain_id, provider_id, domain_auth_provider_request) - -Update an auth provider for a domain - -Update an auth provider for a domain - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - domain_id = 'domain_id_example' # str | Domain ID - uuid -provider_id = 'provider_id_example' # str | Provider ID - uuid -domain_auth_provider_request = { - "enabled": false, - "providerType": "open-id-connect", - "label": "Login with Custom Auth0", - "config": { - "discoveryUrl": "http://localhost:8080/realms/Corellium/.well-known/openid-configuration", - "clientId": "B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4", - "clientSecret": "itsasecret", - "invitedOnly": true - } -} # DomainAuthProviderRequest | Request Data - - try: - # Update an auth provider for a domain - api_response = await api_instance.v1_update_domain_auth_provider(domain_id, provider_id, domain_auth_provider_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_update_domain_auth_provider: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **domain_id** | **str**| Domain ID - uuid | - **provider_id** | **str**| Provider ID - uuid | - **domain_auth_provider_request** | [**DomainAuthProviderRequest**](DomainAuthProviderRequest.md)| Request Data | - -### Return type - -[**DomainAuthProviderResponse**](DomainAuthProviderResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_update_extension** -> v1_update_extension(extension_id, update_extension) - -Update an existing extension - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - extension_id = 'extension_id_example' # str | Extension ID -update_extension = { "enabled": false} # UpdateExtension | application/json - - try: - # Update an existing extension - api_instance.v1_update_extension(extension_id, update_extension) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_update_extension: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **extension_id** | **str**| Extension ID | - **update_extension** | [**UpdateExtension**](UpdateExtension.md)| application/json | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_update_hook** -> Hook v1_update_hook(hook_id, v1_update_hook_parameters) - -Update an existing hypervisor hook - -Update an existing hypervisor hook - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - hook_id = 'hook_id_example' # str | Hook ID -v1_update_hook_parameters = { "enabled": false} # V1UpdateHookParameters | application/json - - try: - # Update an existing hypervisor hook - api_response = await api_instance.v1_update_hook(hook_id, v1_update_hook_parameters) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_update_hook: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hook_id** | **str**| Hook ID | - **v1_update_hook_parameters** | [**V1UpdateHookParameters**](V1UpdateHookParameters.md)| application/json | - -### Return type - -[**Hook**](Hook.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Hook | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_update_network_connection** -> NetworkConnection v1_update_network_connection(id, update_network_connection_options, force=force) - -Update Network Connection - -You must have the domain administrator role to update a network connection. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - id = 'id_example' # str | Network Connection Identifier - uuid -update_network_connection_options = { - "type": "openvpn", - "name": "My Renamed OpenVPN Connection", - "config": { - "config": "client\ndev tun\nproto tcp\nremote my-server-1 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nremote-cert-tls server\ntls-auth ta.key 1\ncipher AES-256-CBC\nverb 3\n" - } -} # UpdateNetworkConnectionOptions | Network Connection Options -force = True # bool | Force deletion (true only or not present) (optional) - - try: - # Update Network Connection - api_response = await api_instance.v1_update_network_connection(id, update_network_connection_options, force=force) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_update_network_connection: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| Network Connection Identifier - uuid | - **update_network_connection_options** | [**UpdateNetworkConnectionOptions**](UpdateNetworkConnectionOptions.md)| Network Connection Options | - **force** | **bool**| Force deletion (true only or not present) | [optional] - -### Return type - -[**NetworkConnection**](NetworkConnection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_update_project** -> Project v1_update_project(project_id, project) - -Update a Project - -Update a Project - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -project = corellium_api.Project() # Project | Updated Project Settings - - try: - # Update a Project - api_response = await api_instance.v1_update_project(project_id, project) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_update_project: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **project** | [**Project**](Project.md)| Updated Project Settings | - -### Return type - -[**Project**](Project.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_update_project_settings** -> v1_update_project_settings(project_id, project_settings) - -Change Project Settings - -Change Project Settings - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - project_id = 'project_id_example' # str | Project ID - uuid -project_settings = corellium_api.ProjectSettings() # ProjectSettings | New settings - - try: - # Change Project Settings - api_instance.v1_update_project_settings(project_id, project_settings) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_update_project_settings: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **project_id** | **str**| Project ID - uuid | - **project_settings** | [**ProjectSettings**](ProjectSettings.md)| New settings | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Success | - | -**400** | Validation Error | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_update_user** -> v1_update_user(user_id, user_update) - -Update User - -Update a user. Fields such as `name`, `label`, `password`, and `clusterAdministrator` can be updated. Only users with the Cluster Administrator role can set or modify the `clusterAdministrator` flag. - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - user_id = 'user_id_example' # str | userId - uuid -user_update = { - "name": "test", - "label": "Project Admin", - "password": "new-password", - "clusterAdministrator": true -} # UserUpdate | User data - - try: - # Update User - api_instance.v1_update_user(user_id, user_update) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_update_user: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user_id** | **str**| userId - uuid | - **user_update** | [**UserUpdate**](UserUpdate.md)| User data | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_upgrade_instance** -> v1_upgrade_instance(instance_id, instance_upgrade_body) - -Upgrade iOS version - -Upgrade iOS version - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | -instance_upgrade_body = { - "os":"16.1", - "osbuild":"20B79" -} # InstanceUpgradeBody | - - try: - # Upgrade iOS version - api_instance.v1_upgrade_instance(instance_id, instance_upgrade_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_upgrade_instance: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| | - **instance_upgrade_body** | [**InstanceUpgradeBody**](InstanceUpgradeBody.md)| | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**202** | Accepted | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_upload_image_data** -> v1_upload_image_data(image_id, body) - -Upload Image Data - -If the active project has enough remaining quota, updates an Image with the contents of the request body. - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - image_id = 'image_id_example' # str | Image ID - uuid -body = 'body_example' # str | Uploaded Image - - try: - # Upload Image Data - api_instance.v1_upload_image_data(image_id, body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_upload_image_data: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **image_id** | **str**| Image ID - uuid | - **body** | **str**| Uploaded Image | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: binary - - **Accept**: Not defined - - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_user_agree_terms** -> AgreedAck v1_user_agree_terms() - -Consent to the current terms and conditions - -Consent to the current terms and conditions - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # Consent to the current terms and conditions - api_response = await api_instance.v1_user_agree_terms() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_user_agree_terms: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**AgreedAck**](AgreedAck.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | application/json | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_users_change_password_post** -> v1_users_change_password_post(password_change_body) - -Change User Password - -Authenticated solely by the old-password. - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - password_change_body = { - "user": "", - "old-password": "Password1", - "new-password": "Password2" -} # PasswordChangeBody | - - try: - # Change User Password - api_instance.v1_users_change_password_post(password_change_body) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_users_change_password_post: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **password_change_body** | [**PasswordChangeBody**](PasswordChangeBody.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Accepted | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_users_login** -> Token v1_users_login(credentials) - -Log In - -### Example - -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# Defining the host is optional and defaults to https://app.corellium.com/api -# See configuration.py for a list of all supported configuration parameters. -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - credentials = { - "username": "admin", - "password": "password" -} # Credentials | Authorization data - - try: - # Log In - api_response = await api_instance.v1_users_login(credentials) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_users_login: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **credentials** | [**Credentials**](Credentials.md)| Authorization data | - -### Return type - -[**Token**](Token.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | User Authorization | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_web_player_allowed_domains** -> v1_web_player_allowed_domains() - -Retrieve the list of allowed domains for all Webplayer sessions - -Retrieve the list of allowed domains for all Webplayer sessions - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # Retrieve the list of allowed domains for all Webplayer sessions - api_instance.v1_web_player_allowed_domains() - except ApiException as e: - print("Exception when calling CorelliumApi->v1_web_player_allowed_domains: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_web_player_create_session** -> WebPlayerSession v1_web_player_create_session(web_player_create_session_request) - -Create a new Webplayer Session - -Create a new Webplayer Session - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - web_player_create_session_request = { - "projectId": "0fc719fc-335d-458c-a424-51a550a73d12", - "instanceId": "fbd94550-3f74-4d46-a6ed-c26cbfb23340", - "expiresIn": 18000, - "features": { - "apps": true, - "files": true - } -} # WebPlayerCreateSessionRequest | Request Data - - try: - # Create a new Webplayer Session - api_response = await api_instance.v1_web_player_create_session(web_player_create_session_request) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_web_player_create_session: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **web_player_create_session_request** | [**WebPlayerCreateSessionRequest**](WebPlayerCreateSessionRequest.md)| Request Data | - -### Return type - -[**WebPlayerSession**](WebPlayerSession.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_web_player_destroy_session** -> list[str] v1_web_player_destroy_session(session_id) - -Tear down a Webplayer Session - -Tear down a Webplayer Session - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - session_id = 'session_id_example' # str | Webplayer Session identifier - - try: - # Tear down a Webplayer Session - api_response = await api_instance.v1_web_player_destroy_session(session_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_web_player_destroy_session: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **session_id** | **str**| Webplayer Session identifier | - -### Return type - -**list[str]** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_web_player_list_sessions** -> list[WebPlayerSession] v1_web_player_list_sessions() - -List all Webplayer sessions - -List all Webplayer sessions - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - - try: - # List all Webplayer sessions - api_response = await api_instance.v1_web_player_list_sessions() - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_web_player_list_sessions: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[WebPlayerSession]**](WebPlayerSession.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v1_web_player_session_info** -> WebPlayerSession v1_web_player_session_info(session_id) - -Retrieve Webplayer Session Information - -Retrieve Webplayer Session Information - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - session_id = 'session_id_example' # str | Webplayer Session identifier - - try: - # Retrieve Webplayer Session Information - api_response = await api_instance.v1_web_player_session_info(session_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v1_web_player_session_info: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **session_id** | **str**| Webplayer Session identifier | - -### Return type - -[**WebPlayerSession**](WebPlayerSession.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v2_get_instance_quick_connect_command** -> str v2_get_instance_quick_connect_command(instance_id) - -Recommended SSH Command for Quick Connect - -Recommended SSH Command for Quick Connect - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid - - try: - # Recommended SSH Command for Quick Connect - api_response = await api_instance.v2_get_instance_quick_connect_command(instance_id) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v2_get_instance_quick_connect_command: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - -### Return type - -**str** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Quick Connect Command | - | -**400** | Bad Request | - | -**403** | Forbidden | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v2_get_instance_state** -> InstanceState v2_get_instance_state(instance_id, return_attr=return_attr) - -Get state of Instance - -Get state of Instance - -### Example - -* Bearer (ApiToken or JWT) Authentication (BearerAuth): -```python -from __future__ import print_function -import time -import asyncio -import corellium_api -from corellium_api.rest import ApiException -from pprint import pprint -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ApiToken or JWT): BearerAuth -configuration = corellium_api.Configuration( - host = "https://app.corellium.com/api" -) -configuration.access_token = 'YOUR_ACCESS_TOKEN' - - -async def main(): - # Enter a context with an instance of the API client - async with corellium_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = corellium_api.CorelliumApi(api_client) - instance_id = 'instance_id_example' # str | Instance ID - uuid -return_attr = ['return_attr_example'] # list[str] | The attributes to return. (optional) - - try: - # Get state of Instance - api_response = await api_instance.v2_get_instance_state(instance_id, return_attr=return_attr) - pprint(api_response) - except ApiException as e: - print("Exception when calling CorelliumApi->v2_get_instance_state: %s\n" % e) - -if __name__ == "__main__": - asyncio.run(main()) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instance_id** | **str**| Instance ID - uuid | - **return_attr** | [**list[str]**](str.md)| The attributes to return. | [optional] - -### Return type - -[**InstanceState**](InstanceState.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Current Instance State | - | -**403** | Forbidden | - | -**404** | Not Found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/CouponOptions.md b/docs/CouponOptions.md index 3e2fe35..4e58f60 100644 --- a/docs/CouponOptions.md +++ b/docs/CouponOptions.md @@ -3,12 +3,30 @@ Coupon options ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | **amount** | **float** | Amount | **used** | **bool** | Is Used. If true, this coupon has been used and cannot be used again | +## Example + +```python +from corellium.models.coupon_options import CouponOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of CouponOptions from a JSON string +coupon_options_instance = CouponOptions.from_json(json) +# print the JSON string representation of the object +print(CouponOptions.to_json()) + +# convert the object into a dict +coupon_options_dict = coupon_options_instance.to_dict() +# create an instance of CouponOptions from a dict +coupon_options_from_dict = CouponOptions.from_dict(coupon_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateActivityExportBody.md b/docs/CreateActivityExportBody.md new file mode 100644 index 0000000..eebcdb6 --- /dev/null +++ b/docs/CreateActivityExportBody.md @@ -0,0 +1,37 @@ +# CreateActivityExportBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource** | **object** | Resource equality or LHS prefix filter. Examples: `resource=value`, `resource[startsWith]=value`, and `resource[!startsWith]=value`. | [optional] +**offset** | **float** | Number of results to skip. | [optional] [default to 0] +**order_by** | **str** | Field to sort by, for example `createdAt`. Prefix with `-` for newest or largest first. Defaults to `-createdAt` (newest first). | [optional] [default to '-createdAt'] +**instance_id** | **str** | Only activity about this device. | [optional] +**project_id** | **str** | Only activity in this project. | [optional] +**actor** | **str** | Only activity performed by this user (user ID). | [optional] +**search** | **str** | Free-text search. Applied last, as a loose match on the results that pass the other filters. | [optional] +**to** | **datetime** | Only activity at or before this time (ISO 8601). | [optional] +**var_from** | **datetime** | Only activity at or after this time (ISO 8601). | [optional] + +## Example + +```python +from corellium.models.create_activity_export_body import CreateActivityExportBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateActivityExportBody from a JSON string +create_activity_export_body_instance = CreateActivityExportBody.from_json(json) +# print the JSON string representation of the object +print(CreateActivityExportBody.to_json()) + +# convert the object into a dict +create_activity_export_body_dict = create_activity_export_body_instance.to_dict() +# create an instance of CreateActivityExportBody from a dict +create_activity_export_body_from_dict = CreateActivityExportBody.from_dict(create_activity_export_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateActivityExportResponse.md b/docs/CreateActivityExportResponse.md new file mode 100644 index 0000000..54567cd --- /dev/null +++ b/docs/CreateActivityExportResponse.md @@ -0,0 +1,29 @@ +# CreateActivityExportResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Export task ID, in the form `activity-export/<UUID>`. Pass only the `<UUID>` part to `v3GetActivityExportStatus` and `v3DownloadActivity`. | + +## Example + +```python +from corellium.models.create_activity_export_response import CreateActivityExportResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateActivityExportResponse from a JSON string +create_activity_export_response_instance = CreateActivityExportResponse.from_json(json) +# print the JSON string representation of the object +print(CreateActivityExportResponse.to_json()) + +# convert the object into a dict +create_activity_export_response_dict = create_activity_export_response_instance.to_dict() +# create an instance of CreateActivityExportResponse from a dict +create_activity_export_response_from_dict = CreateActivityExportResponse.from_dict(create_activity_export_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAssessmentDto.md b/docs/CreateAssessmentDto.md deleted file mode 100644 index c137850..0000000 --- a/docs/CreateAssessmentDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateAssessmentDto - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**instance_id** | **str** | | -**bundle_id** | **str** | | -**wordlist_id** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateAssessmentInput.md b/docs/CreateAssessmentInput.md new file mode 100644 index 0000000..42b9d49 --- /dev/null +++ b/docs/CreateAssessmentInput.md @@ -0,0 +1,33 @@ +# CreateAssessmentInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instance_id** | **str** | Identifier of the instance to assess. | +**bundle_id** | **str** | Bundle identifier of the application to assess. | +**wordlist_id** | **str** | ID of a wordlist: a plain-text file listing sensitive values (one per line), such as test passwords or account numbers, that MATRIX then looks for while testing the app. Upload the file first with `POST /v3/images` with `instanceId` set to this instance (use `type: \"mast-wordlist\"`), then pass the returned image ID here. The server only checks that an image with this ID exists on the instance, not its type, so make sure you pass the right file. The request fails if the image cannot be found. Deleting the assessment also deletes this file. | [optional] +**frida_script_id** | **str** | ID of your own Frida script (JavaScript) to load into the app while it is being monitored, for example to bypass certificate pinning or reach code paths that are hard to trigger. Upload it first with `POST /v3/images` with `instanceId` set to this instance (use `type: \"mast-frida\"`). The server only checks that an image with this ID exists on the instance, not its type. The request fails if the image cannot be found. The script is not deleted when the assessment is. | [optional] +**created_by** | **str** | Identifier of the user creating the assessment. Assigned server-side from the auth context; client-supplied values are ignored. | [optional] + +## Example + +```python +from corellium.models.create_assessment_input import CreateAssessmentInput + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateAssessmentInput from a JSON string +create_assessment_input_instance = CreateAssessmentInput.from_json(json) +# print the JSON string representation of the object +print(CreateAssessmentInput.to_json()) + +# convert the object into a dict +create_assessment_input_dict = create_assessment_input_instance.to_dict() +# create an instance of CreateAssessmentInput from a dict +create_assessment_input_from_dict = CreateAssessmentInput.from_dict(create_assessment_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateCloudAdminTrialRequestBody.md b/docs/CreateCloudAdminTrialRequestBody.md new file mode 100644 index 0000000..4d91217 --- /dev/null +++ b/docs/CreateCloudAdminTrialRequestBody.md @@ -0,0 +1,42 @@ +# CreateCloudAdminTrialRequestBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Contact email address. | +**name** | **str** | Contact name. | +**phone** | **str** | Contact phone number. | +**country** | **str** | Country code. | +**company** | **str** | Company name. | +**industry** | **str** | Industry. | +**role** | **str** | Job role. | +**solution** | **str** | Solution of interest. | [optional] +**product_id** | **str** | Stripe product identifier for the trial. | +**granted** | **bool** | Whether the trial is pre-granted. | [optional] +**number_of_apps** | **float** | Number of apps. | [optional] +**team_size** | **float** | Team size. | [optional] +**send_email** | **bool** | Whether to send the trial-granted email. | [optional] +**duration** | **float** | Override trial duration in days. | [optional] + +## Example + +```python +from corellium.models.create_cloud_admin_trial_request_body import CreateCloudAdminTrialRequestBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCloudAdminTrialRequestBody from a JSON string +create_cloud_admin_trial_request_body_instance = CreateCloudAdminTrialRequestBody.from_json(json) +# print the JSON string representation of the object +print(CreateCloudAdminTrialRequestBody.to_json()) + +# convert the object into a dict +create_cloud_admin_trial_request_body_dict = create_cloud_admin_trial_request_body_instance.to_dict() +# create an instance of CreateCloudAdminTrialRequestBody from a dict +create_cloud_admin_trial_request_body_from_dict = CreateCloudAdminTrialRequestBody.from_dict(create_cloud_admin_trial_request_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateDomainAuthProviderBody.md b/docs/CreateDomainAuthProviderBody.md new file mode 100644 index 0000000..40d236e --- /dev/null +++ b/docs/CreateDomainAuthProviderBody.md @@ -0,0 +1,32 @@ +# CreateDomainAuthProviderBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | Provider type. | +**enabled** | **bool** | Whether the provider is enabled. | +**label** | **str** | Login button text. | [optional] +**config** | [**DomainAuthProviderConfig**](DomainAuthProviderConfig.md) | | [optional] + +## Example + +```python +from corellium.models.create_domain_auth_provider_body import CreateDomainAuthProviderBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateDomainAuthProviderBody from a JSON string +create_domain_auth_provider_body_instance = CreateDomainAuthProviderBody.from_json(json) +# print the JSON string representation of the object +print(CreateDomainAuthProviderBody.to_json()) + +# convert the object into a dict +create_domain_auth_provider_body_dict = create_domain_auth_provider_body_instance.to_dict() +# create an instance of CreateDomainAuthProviderBody from a dict +create_domain_auth_provider_body_from_dict = CreateDomainAuthProviderBody.from_dict(create_domain_auth_provider_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateDomainAuthProviderResponse.md b/docs/CreateDomainAuthProviderResponse.md new file mode 100644 index 0000000..e2380af --- /dev/null +++ b/docs/CreateDomainAuthProviderResponse.md @@ -0,0 +1,37 @@ +# CreateDomainAuthProviderResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Provider identifier. | +**config** | [**CreateDomainAuthProviderResponseConfig**](CreateDomainAuthProviderResponseConfig.md) | | [optional] +**provider_type** | **str** | Provider type. | +**label** | **str** | Login button text. | +**enabled** | **bool** | Enabled/Disabled. | +**created_by** | **str** | Optional User ID of creator. | [optional] +**default** | **bool** | True: configured in coordinator.json, False: custom domain provider. | +**created_at** | **datetime** | Created date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z. | [optional] +**updated_at** | **datetime** | Updated date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z. | [optional] + +## Example + +```python +from corellium.models.create_domain_auth_provider_response import CreateDomainAuthProviderResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateDomainAuthProviderResponse from a JSON string +create_domain_auth_provider_response_instance = CreateDomainAuthProviderResponse.from_json(json) +# print the JSON string representation of the object +print(CreateDomainAuthProviderResponse.to_json()) + +# convert the object into a dict +create_domain_auth_provider_response_dict = create_domain_auth_provider_response_instance.to_dict() +# create an instance of CreateDomainAuthProviderResponse from a dict +create_domain_auth_provider_response_from_dict = CreateDomainAuthProviderResponse.from_dict(create_domain_auth_provider_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateDomainAuthProviderResponseConfig.md b/docs/CreateDomainAuthProviderResponseConfig.md new file mode 100644 index 0000000..cddda4b --- /dev/null +++ b/docs/CreateDomainAuthProviderResponseConfig.md @@ -0,0 +1,41 @@ +# CreateDomainAuthProviderResponseConfig + +Optional configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity_provider_config** | [**SamlIdentityProviderConfig**](SamlIdentityProviderConfig.md) | | +**service_provider_config** | [**SamlServiceProviderConfig**](SamlServiceProviderConfig.md) | | [optional] +**user_attribute_mapping** | [**LdapUserAttributeMapping**](LdapUserAttributeMapping.md) | | [optional] +**group_mapping** | [**List[SamlGroupMapping]**](SamlGroupMapping.md) | | [optional] +**discovery_url** | **str** | Service Discovery URL. | +**client_id** | **str** | Service Client ID. | +**client_secret** | **str** | Service Client Secret. | +**invited_only** | **bool** | Only accept individuals with invitations. | [optional] +**server_connection_details** | [**LdapServerConnectionDetails**](LdapServerConnectionDetails.md) | | +**authentication_credentials** | [**LdapAuthenticationCredentials**](LdapAuthenticationCredentials.md) | | +**user_search_configuration** | [**LdapUserSearchConfiguration**](LdapUserSearchConfiguration.md) | | +**group_search_configuration** | [**List[LdapGroupSearchConfiguration]**](LdapGroupSearchConfiguration.md) | | [optional] + +## Example + +```python +from corellium.models.create_domain_auth_provider_response_config import CreateDomainAuthProviderResponseConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateDomainAuthProviderResponseConfig from a JSON string +create_domain_auth_provider_response_config_instance = CreateDomainAuthProviderResponseConfig.from_json(json) +# print the JSON string representation of the object +print(CreateDomainAuthProviderResponseConfig.to_json()) + +# convert the object into a dict +create_domain_auth_provider_response_config_dict = create_domain_auth_provider_response_config_instance.to_dict() +# create an instance of CreateDomainAuthProviderResponseConfig from a dict +create_domain_auth_provider_response_config_from_dict = CreateDomainAuthProviderResponseConfig.from_dict(create_domain_auth_provider_response_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateDomainWelcomeMessageBody.md b/docs/CreateDomainWelcomeMessageBody.md new file mode 100644 index 0000000..ee69bd7 --- /dev/null +++ b/docs/CreateDomainWelcomeMessageBody.md @@ -0,0 +1,31 @@ +# CreateDomainWelcomeMessageBody + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | The welcome message text (HTML allowed, will be sanitized) | +**enabled** | **bool** | | [optional] + +## Example + +```python +from corellium.models.create_domain_welcome_message_body import CreateDomainWelcomeMessageBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateDomainWelcomeMessageBody from a JSON string +create_domain_welcome_message_body_instance = CreateDomainWelcomeMessageBody.from_json(json) +# print the JSON string representation of the object +print(CreateDomainWelcomeMessageBody.to_json()) + +# convert the object into a dict +create_domain_welcome_message_body_dict = create_domain_welcome_message_body_instance.to_dict() +# create an instance of CreateDomainWelcomeMessageBody from a dict +create_domain_welcome_message_body_from_dict = CreateDomainWelcomeMessageBody.from_dict(create_domain_welcome_message_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateHookBody.md b/docs/CreateHookBody.md new file mode 100644 index 0000000..dfe3919 --- /dev/null +++ b/docs/CreateHookBody.md @@ -0,0 +1,33 @@ +# CreateHookBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Hook label. | +**address** | **str** | Memory address to hook. | +**patch** | **str** | Patch code to execute. | +**patch_type** | [**HookPatchType**](HookPatchType.md) | | +**enabled** | **bool** | Whether the hook is active. | [optional] [default to True] + +## Example + +```python +from corellium.models.create_hook_body import CreateHookBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateHookBody from a JSON string +create_hook_body_instance = CreateHookBody.from_json(json) +# print the JSON string representation of the object +print(CreateHookBody.to_json()) + +# convert the object into a dict +create_hook_body_dict = create_hook_body_instance.to_dict() +# create an instance of CreateHookBody from a dict +create_hook_body_from_dict = CreateHookBody.from_dict(create_hook_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateImageBody.md b/docs/CreateImageBody.md new file mode 100644 index 0000000..b448016 --- /dev/null +++ b/docs/CreateImageBody.md @@ -0,0 +1,36 @@ +# CreateImageBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**ImageType**](ImageType.md) | | +**encoding** | [**ImageEncoding**](ImageEncoding.md) | | +**encapsulated** | **bool** | Whether the uploaded file is a ZIP wrapper the server should unzip. Leave this unset or false when you upload a file directly (a one-shot multipart create defaults it to false); only browser-style wrapped uploads set it to true. | [optional] +**name** | **str** | Name for the image. In a multipart upload it defaults to the filename of the uploaded file; in a JSON request you must supply it. Names do not have to be unique. For `partition` images this must be the name of the partition to replace. | [optional] +**full_path** | **str** | Not for normal API use. Registers a file that already exists on the server instead of uploading one; it is used by cluster installation tools. Leave it unset. | [optional] +**project_id** | **str** | Optional. Puts the image in this project. You must have access to the project (otherwise 403). Project images count against the project's storage quota. **Lifetime.** The image is deleted automatically when the project is deleted, which makes a scratch project a simple way to clean up test uploads. **Booting from it.** Project firmware images do not appear in `GET /v3/models/{model}/software`. To create a device from one, pass the image `id` as `fwPackage` to `POST /v3/instances`; no install step is needed. Also pass `osVersion` or `osBuild`; if you do not know them, read them from the file first with `POST /v3/images/{imageId}/fwinfo`. Models whose `supportsCustomFirmwareImage` is false reject an image ID in `fwPackage`. Side effect: if the project already holds 5 or more images that are not attached to an instance, the oldest of them is deleted to make room. Ignored when `instanceId` is set: the image then belongs to that instance's project. Leave both unset to create a domain-level image. | [optional] +**instance_id** | **str** | Optional. Attaches the image to this instance (device). The instance must exist (otherwise 404), and the image is placed in the instance's project. The instance can be running, paused or off. **Lifetime.** The image is deleted automatically when the instance is deleted. Side effect: any image of the same `type` already attached to the instance is deleted first, so each instance keeps at most one image per type. For `partition` images only the one with the same `name` is replaced. MATRIX types (`mast-*`) are never deleted this way, so a device can keep a history of MATRIX files. | [optional] +**file** | **bytearray** | Multipart requests only: the file contents. Send the `type` and other fields before this part. Omit it (or use a JSON request) to create the record now and upload the contents later. | [optional] + +## Example + +```python +from corellium.models.create_image_body import CreateImageBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateImageBody from a JSON string +create_image_body_instance = CreateImageBody.from_json(json) +# print the JSON string representation of the object +print(CreateImageBody.to_json()) + +# convert the object into a dict +create_image_body_dict = create_image_body_instance.to_dict() +# create an instance of CreateImageBody from a dict +create_image_body_from_dict = CreateImageBody.from_dict(create_image_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInstanceBody.md b/docs/CreateInstanceBody.md new file mode 100644 index 0000000..6a3bc29 --- /dev/null +++ b/docs/CreateInstanceBody.md @@ -0,0 +1,47 @@ +# CreateInstanceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shared_snapshot** | **str** | Identifier of the snapshot that was shared. | [optional] +**shared_snapshot_password** | **str** | Password of the shared snapshot named by sharedSnapshot, as set when it was shared. Required when that snapshot was shared with sharing type passwordPublicLink. This is the same value passed as password to POST /v3/snapshots/accept. | [optional] +**name** | **str** | The name of the device. | [optional] +**key** | **str** | Key used to encrypt the instance (hex). | [optional] +**flavor** | **str** | Which device model to create. Use a `flavor` value from `GET /v3/models`. | [optional] +**project_id** | **str** | Project the device is created in. The device uses that project's quota (cores, memory, device count). Get IDs from `GET /v3/projects`. | +**os_version** | **str** | Operating-system version to install, as listed in `osVersion` by `GET /v3/models/{model}/software`. If you give only `osVersion`, the newest build of that version is used. | [optional] +**os_build** | **str** | Exact build to install, as listed in `osBuild` by `GET /v3/models/{model}/software`. Give it together with `osVersion` to pin one build. You must give at least one of `osVersion` and `osBuild`. | [optional] +**patches** | **List[str]** | List of patches to apply. | [optional] +**fw_package** | **str** | Optional. Boots a specific firmware file instead of choosing one from the model's software list. Either the `id` of an uploaded `fw` image (for example one in your project, see `POST /v3/images`) or an http(s) URL. When set, it wins over the software list; still pass `osVersion` or `osBuild`. A domain-level image is copied into your project first. Models whose `supportsCustomFirmwareImage` is false reject an image ID here. | [optional] +**original_firmware_package_url** | **str** | URL that the firmware package is available at. | [optional] +**encrypt** | **bool** | Whether to encrypt the instance. | [optional] +**wifi_mac** | **str** | WiFi MAC address to assign to the instance. | [optional] +**wan_access** | **bool** | Manages internet access. | [optional] +**volume** | [**VolumeOptions**](VolumeOptions.md) | | [optional] +**snapshot** | **str** | Snapshot ID for this instance to be cloned from if defined. | [optional] +**boot_options** | [**InstanceBootOptions**](InstanceBootOptions.md) | | [optional] +**sbs** | **bool** | Should attempt to create springboard snapshot. | [optional] +**charm_boot_args** | **List[Dict[str, object]]** | Optional charm boot args. | [optional] + +## Example + +```python +from corellium.models.create_instance_body import CreateInstanceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInstanceBody from a JSON string +create_instance_body_instance = CreateInstanceBody.from_json(json) +# print the JSON string representation of the object +print(CreateInstanceBody.to_json()) + +# convert the object into a dict +create_instance_body_dict = create_instance_body_instance.to_dict() +# create an instance of CreateInstanceBody from a dict +create_instance_body_from_dict = CreateInstanceBody.from_dict(create_instance_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInstanceResponse.md b/docs/CreateInstanceResponse.md new file mode 100644 index 0000000..a720024 --- /dev/null +++ b/docs/CreateInstanceResponse.md @@ -0,0 +1,30 @@ +# CreateInstanceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Instance ID. | +**state** | **str** | Instance state. Always \"creating\" for a freshly created instance. | + +## Example + +```python +from corellium.models.create_instance_response import CreateInstanceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInstanceResponse from a JSON string +create_instance_response_instance = CreateInstanceResponse.from_json(json) +# print the JSON string representation of the object +print(CreateInstanceResponse.to_json()) + +# convert the object into a dict +create_instance_response_dict = create_instance_response_instance.to_dict() +# create an instance of CreateInstanceResponse from a dict +create_instance_response_from_dict = CreateInstanceResponse.from_dict(create_instance_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInterconnectBody.md b/docs/CreateInterconnectBody.md new file mode 100644 index 0000000..83e9247 --- /dev/null +++ b/docs/CreateInterconnectBody.md @@ -0,0 +1,34 @@ +# CreateInterconnectBody + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the interconnect | +**protocol** | **str** | The protocol used by the interconnect | +**type** | **str** | The type of interconnect | +**project** | **str** | The UUID of the project | +**interfaces** | **List[str]** | Array of instance identifiers | + +## Example + +```python +from corellium.models.create_interconnect_body import CreateInterconnectBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInterconnectBody from a JSON string +create_interconnect_body_instance = CreateInterconnectBody.from_json(json) +# print the JSON string representation of the object +print(CreateInterconnectBody.to_json()) + +# convert the object into a dict +create_interconnect_body_dict = create_interconnect_body_instance.to_dict() +# create an instance of CreateInterconnectBody from a dict +create_interconnect_body_from_dict = CreateInterconnectBody.from_dict(create_interconnect_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInterconnectRequest.md b/docs/CreateInterconnectRequest.md deleted file mode 100644 index 38f762e..0000000 --- a/docs/CreateInterconnectRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateInterconnectRequest - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | The name of the interconnect | [optional] -**protocol** | **str** | The protocol used by the interconnect | [optional] -**type** | **str** | The type of interconnect | [optional] -**project** | **str** | The UUID of the project | [optional] -**interfaces** | **list[str]** | Array of instance identifiers | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateInterconnectV3Body.md b/docs/CreateInterconnectV3Body.md new file mode 100644 index 0000000..d42bb36 --- /dev/null +++ b/docs/CreateInterconnectV3Body.md @@ -0,0 +1,33 @@ +# CreateInterconnectV3Body + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A name to recognise the interconnect by. | +**type** | **str** | How the interconnect behaves: `hub` passes every signal to every connected interface; `switch` routes traffic between endpoints. | +**interfaces** | [**List[InterfacesSchemaInner]**](InterfacesSchemaInner.md) | | +**project_id** | **str** | Project the interconnect belongs to. Every device listed in `interfaces` must be in this project, otherwise the request fails with 400. Cannot be changed later. | +**protocol** | [**InterconnectProtocol**](InterconnectProtocol.md) | | + +## Example + +```python +from corellium.models.create_interconnect_v3_body import CreateInterconnectV3Body + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInterconnectV3Body from a JSON string +create_interconnect_v3_body_instance = CreateInterconnectV3Body.from_json(json) +# print the JSON string representation of the object +print(CreateInterconnectV3Body.to_json()) + +# convert the object into a dict +create_interconnect_v3_body_dict = create_interconnect_v3_body_instance.to_dict() +# create an instance of CreateInterconnectV3Body from a dict +create_interconnect_v3_body_from_dict = CreateInterconnectV3Body.from_dict(create_interconnect_v3_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateInvitesBody.md b/docs/CreateInvitesBody.md new file mode 100644 index 0000000..ae6059c --- /dev/null +++ b/docs/CreateInvitesBody.md @@ -0,0 +1,31 @@ +# CreateInvitesBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **List[str]** | Emails to invite. | +**resend** | **bool** | Resend the invite if it already exists. | [optional] +**settings** | [**InviteSettings**](InviteSettings.md) | Settings applied to the created invites. | [optional] + +## Example + +```python +from corellium.models.create_invites_body import CreateInvitesBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateInvitesBody from a JSON string +create_invites_body_instance = CreateInvitesBody.from_json(json) +# print the JSON string representation of the object +print(CreateInvitesBody.to_json()) + +# convert the object into a dict +create_invites_body_dict = create_invites_body_instance.to_dict() +# create an instance of CreateInvitesBody from a dict +create_invites_body_from_dict = CreateInvitesBody.from_dict(create_invites_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateNetworkConnectionBody.md b/docs/CreateNetworkConnectionBody.md new file mode 100644 index 0000000..cdce196 --- /dev/null +++ b/docs/CreateNetworkConnectionBody.md @@ -0,0 +1,31 @@ +# CreateNetworkConnectionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**VLANConfig**](VLANConfig.md) | | + +## Example + +```python +from corellium.models.create_network_connection_body import CreateNetworkConnectionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateNetworkConnectionBody from a JSON string +create_network_connection_body_instance = CreateNetworkConnectionBody.from_json(json) +# print the JSON string representation of the object +print(CreateNetworkConnectionBody.to_json()) + +# convert the object into a dict +create_network_connection_body_dict = create_network_connection_body_instance.to_dict() +# create an instance of CreateNetworkConnectionBody from a dict +create_network_connection_body_from_dict = CreateNetworkConnectionBody.from_dict(create_network_connection_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateNetworkConnectionOptions.md b/docs/CreateNetworkConnectionOptions.md index 5218d6d..1721c4a 100644 --- a/docs/CreateNetworkConnectionOptions.md +++ b/docs/CreateNetworkConnectionOptions.md @@ -1,15 +1,32 @@ # CreateNetworkConnectionOptions - +Provider-discriminated create body for a network connection. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identifier** | **str** | UUIDv4 | -**name** | **str** | User specified name for this network connection. e.g. My Network Connection | -**provider** | **str** | One of the registered [network provider types](#get-/v1/network/providers) | -**config** | **object** | An object containing network connection configuration data. Will vary based on network provider type. See examples. | [optional] +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**VLANConfigV1**](VLANConfigV1.md) | | + +## Example + +```python +from corellium.models.create_network_connection_options import CreateNetworkConnectionOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateNetworkConnectionOptions from a JSON string +create_network_connection_options_instance = CreateNetworkConnectionOptions.from_json(json) +# print the JSON string representation of the object +print(CreateNetworkConnectionOptions.to_json()) +# convert the object into a dict +create_network_connection_options_dict = create_network_connection_options_instance.to_dict() +# create an instance of CreateNetworkConnectionOptions from a dict +create_network_connection_options_from_dict = CreateNetworkConnectionOptions.from_dict(create_network_connection_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOpenVPNNetworkConnectionBody.md b/docs/CreateOpenVPNNetworkConnectionBody.md new file mode 100644 index 0000000..1a9f953 --- /dev/null +++ b/docs/CreateOpenVPNNetworkConnectionBody.md @@ -0,0 +1,31 @@ +# CreateOpenVPNNetworkConnectionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**OpenVPNConfig**](OpenVPNConfig.md) | | + +## Example + +```python +from corellium.models.create_open_vpn_network_connection_body import CreateOpenVPNNetworkConnectionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOpenVPNNetworkConnectionBody from a JSON string +create_open_vpn_network_connection_body_instance = CreateOpenVPNNetworkConnectionBody.from_json(json) +# print the JSON string representation of the object +print(CreateOpenVPNNetworkConnectionBody.to_json()) + +# convert the object into a dict +create_open_vpn_network_connection_body_dict = create_open_vpn_network_connection_body_instance.to_dict() +# create an instance of CreateOpenVPNNetworkConnectionBody from a dict +create_open_vpn_network_connection_body_from_dict = CreateOpenVPNNetworkConnectionBody.from_dict(create_open_vpn_network_connection_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateOpenVPNNetworkConnectionBodyV1.md b/docs/CreateOpenVPNNetworkConnectionBodyV1.md new file mode 100644 index 0000000..e881f25 --- /dev/null +++ b/docs/CreateOpenVPNNetworkConnectionBodyV1.md @@ -0,0 +1,32 @@ +# CreateOpenVPNNetworkConnectionBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**OpenVPNConfigV1**](OpenVPNConfigV1.md) | | + +## Example + +```python +from corellium.models.create_open_vpn_network_connection_body_v1 import CreateOpenVPNNetworkConnectionBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOpenVPNNetworkConnectionBodyV1 from a JSON string +create_open_vpn_network_connection_body_v1_instance = CreateOpenVPNNetworkConnectionBodyV1.from_json(json) +# print the JSON string representation of the object +print(CreateOpenVPNNetworkConnectionBodyV1.to_json()) + +# convert the object into a dict +create_open_vpn_network_connection_body_v1_dict = create_open_vpn_network_connection_body_v1_instance.to_dict() +# create an instance of CreateOpenVPNNetworkConnectionBodyV1 from a dict +create_open_vpn_network_connection_body_v1_from_dict = CreateOpenVPNNetworkConnectionBodyV1.from_dict(create_open_vpn_network_connection_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateProjectBody.md b/docs/CreateProjectBody.md new file mode 100644 index 0000000..9fd27bf --- /dev/null +++ b/docs/CreateProjectBody.md @@ -0,0 +1,32 @@ +# CreateProjectBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Project name. | +**color** | **float** | Project display color. | [optional] +**settings** | [**ProjectSettings**](ProjectSettings.md) | Initial project settings. | [optional] +**quotas** | [**ProjectQuotaInput**](ProjectQuotaInput.md) | | [optional] + +## Example + +```python +from corellium.models.create_project_body import CreateProjectBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateProjectBody from a JSON string +create_project_body_instance = CreateProjectBody.from_json(json) +# print the JSON string representation of the object +print(CreateProjectBody.to_json()) + +# convert the object into a dict +create_project_body_dict = create_project_body_instance.to_dict() +# create an instance of CreateProjectBody from a dict +create_project_body_from_dict = CreateProjectBody.from_dict(create_project_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateProjectKeyBody.md b/docs/CreateProjectKeyBody.md new file mode 100644 index 0000000..e6c8008 --- /dev/null +++ b/docs/CreateProjectKeyBody.md @@ -0,0 +1,31 @@ +# CreateProjectKeyBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kind** | **str** | Kind of authorized key: an SSH key for SSH-based devices or an ADB key for Android. | +**label** | **str** | Descriptive label for the key. | [optional] +**key** | **str** | The public key authorized to access devices in the project, in OpenSSH authorized_keys format. | + +## Example + +```python +from corellium.models.create_project_key_body import CreateProjectKeyBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateProjectKeyBody from a JSON string +create_project_key_body_instance = CreateProjectKeyBody.from_json(json) +# print the JSON string representation of the object +print(CreateProjectKeyBody.to_json()) + +# convert the object into a dict +create_project_key_body_dict = create_project_key_body_instance.to_dict() +# create an instance of CreateProjectKeyBody from a dict +create_project_key_body_from_dict = CreateProjectKeyBody.from_dict(create_project_key_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateSnapshotBody.md b/docs/CreateSnapshotBody.md new file mode 100644 index 0000000..2b77bc1 --- /dev/null +++ b/docs/CreateSnapshotBody.md @@ -0,0 +1,29 @@ +# CreateSnapshotBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A name to recognise the snapshot by later, for example what state the device was in. | + +## Example + +```python +from corellium.models.create_snapshot_body import CreateSnapshotBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSnapshotBody from a JSON string +create_snapshot_body_instance = CreateSnapshotBody.from_json(json) +# print the JSON string representation of the object +print(CreateSnapshotBody.to_json()) + +# convert the object into a dict +create_snapshot_body_dict = create_snapshot_body_instance.to_dict() +# create an instance of CreateSnapshotBody from a dict +create_snapshot_body_from_dict = CreateSnapshotBody.from_dict(create_snapshot_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTeam.md b/docs/CreateTeam.md index 4265390..02b094b 100644 --- a/docs/CreateTeam.md +++ b/docs/CreateTeam.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Team name | +## Example + +```python +from corellium.models.create_team import CreateTeam + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTeam from a JSON string +create_team_instance = CreateTeam.from_json(json) +# print the JSON string representation of the object +print(CreateTeam.to_json()) + +# convert the object into a dict +create_team_dict = create_team_instance.to_dict() +# create an instance of CreateTeam from a dict +create_team_from_dict = CreateTeam.from_dict(create_team_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateTeamBody.md b/docs/CreateTeamBody.md new file mode 100644 index 0000000..e2f96d0 --- /dev/null +++ b/docs/CreateTeamBody.md @@ -0,0 +1,29 @@ +# CreateTeamBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Team name. | + +## Example + +```python +from corellium.models.create_team_body import CreateTeamBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTeamBody from a JSON string +create_team_body_instance = CreateTeamBody.from_json(json) +# print the JSON string representation of the object +print(CreateTeamBody.to_json()) + +# convert the object into a dict +create_team_body_dict = create_team_body_instance.to_dict() +# create an instance of CreateTeamBody from a dict +create_team_body_from_dict = CreateTeamBody.from_dict(create_team_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTrialRequestBody.md b/docs/CreateTrialRequestBody.md new file mode 100644 index 0000000..f6c490c --- /dev/null +++ b/docs/CreateTrialRequestBody.md @@ -0,0 +1,38 @@ +# CreateTrialRequestBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Requester email. | +**name** | **str** | Requester full name. | +**phone** | **str** | Requester phone number. | +**country** | **str** | Requester country. | +**type** | **str** | Trial request type. | +**company** | **str** | Company name. | +**industry** | **str** | Industry. | +**role** | **str** | Requester role. | +**solution** | **str** | Solution of interest. | +**product_id** | **str** | Trial product identifier. | + +## Example + +```python +from corellium.models.create_trial_request_body import CreateTrialRequestBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTrialRequestBody from a JSON string +create_trial_request_body_instance = CreateTrialRequestBody.from_json(json) +# print the JSON string representation of the object +print(CreateTrialRequestBody.to_json()) + +# convert the object into a dict +create_trial_request_body_dict = create_trial_request_body_instance.to_dict() +# create an instance of CreateTrialRequestBody from a dict +create_trial_request_body_from_dict = CreateTrialRequestBody.from_dict(create_trial_request_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTrialRequestResponse.md b/docs/CreateTrialRequestResponse.md new file mode 100644 index 0000000..8e9bb12 --- /dev/null +++ b/docs/CreateTrialRequestResponse.md @@ -0,0 +1,29 @@ +# CreateTrialRequestResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trial_request** | [**CreateTrialRequestResponseTrialRequest**](CreateTrialRequestResponseTrialRequest.md) | | + +## Example + +```python +from corellium.models.create_trial_request_response import CreateTrialRequestResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTrialRequestResponse from a JSON string +create_trial_request_response_instance = CreateTrialRequestResponse.from_json(json) +# print the JSON string representation of the object +print(CreateTrialRequestResponse.to_json()) + +# convert the object into a dict +create_trial_request_response_dict = create_trial_request_response_instance.to_dict() +# create an instance of CreateTrialRequestResponse from a dict +create_trial_request_response_from_dict = CreateTrialRequestResponse.from_dict(create_trial_request_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateTrialRequestResponseTrialRequest.md b/docs/CreateTrialRequestResponseTrialRequest.md new file mode 100644 index 0000000..0c625bf --- /dev/null +++ b/docs/CreateTrialRequestResponseTrialRequest.md @@ -0,0 +1,32 @@ +# CreateTrialRequestResponseTrialRequest + +Created trial request info. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Trial request identifier. | +**email** | **str** | Contact email. | +**name** | **str** | Contact name. | + +## Example + +```python +from corellium.models.create_trial_request_response_trial_request import CreateTrialRequestResponseTrialRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateTrialRequestResponseTrialRequest from a JSON string +create_trial_request_response_trial_request_instance = CreateTrialRequestResponseTrialRequest.from_json(json) +# print the JSON string representation of the object +print(CreateTrialRequestResponseTrialRequest.to_json()) + +# convert the object into a dict +create_trial_request_response_trial_request_dict = create_trial_request_response_trial_request_instance.to_dict() +# create an instance of CreateTrialRequestResponseTrialRequest from a dict +create_trial_request_response_trial_request_from_dict = CreateTrialRequestResponseTrialRequest.from_dict(create_trial_request_response_trial_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUserBody.md b/docs/CreateUserBody.md new file mode 100644 index 0000000..cd943ac --- /dev/null +++ b/docs/CreateUserBody.md @@ -0,0 +1,34 @@ +# CreateUserBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password (optional when using SSO). | [optional] +**administrator** | **bool** | Whether the user is a domain administrator (domain admins only). | [optional] +**name** | **str** | Username. | +**label** | **str** | User label (e.g. \"Domain Administrator\"). | +**email** | **str** | User email. | [optional] +**cluster_administrator** | **bool** | Whether the user is a cluster administrator (cluster admins only). | [optional] + +## Example + +```python +from corellium.models.create_user_body import CreateUserBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateUserBody from a JSON string +create_user_body_instance = CreateUserBody.from_json(json) +# print the JSON string representation of the object +print(CreateUserBody.to_json()) + +# convert the object into a dict +create_user_body_dict = create_user_body_instance.to_dict() +# create an instance of CreateUserBody from a dict +create_user_body_from_dict = CreateUserBody.from_dict(create_user_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateVLANNetworkConnectionBody.md b/docs/CreateVLANNetworkConnectionBody.md new file mode 100644 index 0000000..5c6c195 --- /dev/null +++ b/docs/CreateVLANNetworkConnectionBody.md @@ -0,0 +1,31 @@ +# CreateVLANNetworkConnectionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**VLANConfig**](VLANConfig.md) | | + +## Example + +```python +from corellium.models.create_vlan_network_connection_body import CreateVLANNetworkConnectionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVLANNetworkConnectionBody from a JSON string +create_vlan_network_connection_body_instance = CreateVLANNetworkConnectionBody.from_json(json) +# print the JSON string representation of the object +print(CreateVLANNetworkConnectionBody.to_json()) + +# convert the object into a dict +create_vlan_network_connection_body_dict = create_vlan_network_connection_body_instance.to_dict() +# create an instance of CreateVLANNetworkConnectionBody from a dict +create_vlan_network_connection_body_from_dict = CreateVLANNetworkConnectionBody.from_dict(create_vlan_network_connection_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateVLANNetworkConnectionBodyV1.md b/docs/CreateVLANNetworkConnectionBodyV1.md new file mode 100644 index 0000000..a5b65a2 --- /dev/null +++ b/docs/CreateVLANNetworkConnectionBodyV1.md @@ -0,0 +1,32 @@ +# CreateVLANNetworkConnectionBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**VLANConfigV1**](VLANConfigV1.md) | | + +## Example + +```python +from corellium.models.create_vlan_network_connection_body_v1 import CreateVLANNetworkConnectionBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateVLANNetworkConnectionBodyV1 from a JSON string +create_vlan_network_connection_body_v1_instance = CreateVLANNetworkConnectionBodyV1.from_json(json) +# print the JSON string representation of the object +print(CreateVLANNetworkConnectionBodyV1.to_json()) + +# convert the object into a dict +create_vlan_network_connection_body_v1_dict = create_vlan_network_connection_body_v1_instance.to_dict() +# create an instance of CreateVLANNetworkConnectionBodyV1 from a dict +create_vlan_network_connection_body_v1_from_dict = CreateVLANNetworkConnectionBodyV1.from_dict(create_vlan_network_connection_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateWebPlayerSessionBody.md b/docs/CreateWebPlayerSessionBody.md new file mode 100644 index 0000000..287d4cb --- /dev/null +++ b/docs/CreateWebPlayerSessionBody.md @@ -0,0 +1,33 @@ +# CreateWebPlayerSessionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | Project the device is in. | +**instance_id** | **str** | The device (instance) the viewer will see and control. | +**expires_in** | **float** | How long the session token stays valid, in seconds. At least 1800 (30 minutes). Renewing the token keeps the same length. | +**features** | [**WebPlayerFeatures**](WebPlayerFeatures.md) | | +**client_id** | **str** | Optional client-supplied tracking string. | [optional] + +## Example + +```python +from corellium.models.create_web_player_session_body import CreateWebPlayerSessionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateWebPlayerSessionBody from a JSON string +create_web_player_session_body_instance = CreateWebPlayerSessionBody.from_json(json) +# print the JSON string representation of the object +print(CreateWebPlayerSessionBody.to_json()) + +# convert the object into a dict +create_web_player_session_body_dict = create_web_player_session_body_instance.to_dict() +# create an instance of CreateWebPlayerSessionBody from a dict +create_web_player_session_body_from_dict = CreateWebPlayerSessionBody.from_dict(create_web_player_session_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatedBy.md b/docs/CreatedBy.md index 36113b2..f3b1271 100644 --- a/docs/CreatedBy.md +++ b/docs/CreatedBy.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | User Identifier | [optional] @@ -10,6 +11,23 @@ Name | Type | Description | Notes **label** | **str** | User Label | [optional] **deleted** | **bool** | Indicates if user was deleted | [optional] +## Example + +```python +from corellium.models.created_by import CreatedBy + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatedBy from a JSON string +created_by_instance = CreatedBy.from_json(json) +# print the JSON string representation of the object +print(CreatedBy.to_json()) + +# convert the object into a dict +created_by_dict = created_by_instance.to_dict() +# create an instance of CreatedBy from a dict +created_by_from_dict = CreatedBy.from_dict(created_by_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Credentials.md b/docs/Credentials.md index bf66e92..9163333 100644 --- a/docs/Credentials.md +++ b/docs/Credentials.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**username** | **str** | Authentication Username | -**password** | **str** | Authentication Password | +**username** | **str** | Account username. Send together with password. | +**password** | **str** | Account password. Send together with username. | + +## Example + +```python +from corellium.models.credentials import Credentials + +# TODO update the JSON string below +json = "{}" +# create an instance of Credentials from a JSON string +credentials_instance = Credentials.from_json(json) +# print the JSON string representation of the object +print(Credentials.to_json()) +# convert the object into a dict +credentials_dict = credentials_instance.to_dict() +# create an instance of Credentials from a dict +credentials_from_dict = Credentials.from_dict(credentials_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteModificationInput.md b/docs/DeleteModificationInput.md new file mode 100644 index 0000000..7745df9 --- /dev/null +++ b/docs/DeleteModificationInput.md @@ -0,0 +1,30 @@ +# DeleteModificationInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**check_id** | **str** | Identifier of the check whose modification is removed. | +**var_property** | **str** | Property of the check whose modification is removed: \"outcome\", \"severity\", or \"evidence_<index>\". | + +## Example + +```python +from corellium.models.delete_modification_input import DeleteModificationInput + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteModificationInput from a JSON string +delete_modification_input_instance = DeleteModificationInput.from_json(json) +# print the JSON string representation of the object +print(DeleteModificationInput.to_json()) + +# convert the object into a dict +delete_modification_input_dict = delete_modification_input_instance.to_dict() +# create an instance of DeleteModificationInput from a dict +delete_modification_input_from_dict = DeleteModificationInput.from_dict(delete_modification_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteNetworkConnectionOptions.md b/docs/DeleteNetworkConnectionOptions.md new file mode 100644 index 0000000..4e63a96 --- /dev/null +++ b/docs/DeleteNetworkConnectionOptions.md @@ -0,0 +1,30 @@ +# DeleteNetworkConnectionOptions + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**force** | **bool** | Force the deletion through constraint checks (e.g. stopping active instances). Defaults to false. | [optional] + +## Example + +```python +from corellium.models.delete_network_connection_options import DeleteNetworkConnectionOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteNetworkConnectionOptions from a JSON string +delete_network_connection_options_instance = DeleteNetworkConnectionOptions.from_json(json) +# print the JSON string representation of the object +print(DeleteNetworkConnectionOptions.to_json()) + +# convert the object into a dict +delete_network_connection_options_dict = delete_network_connection_options_instance.to_dict() +# create an instance of DeleteNetworkConnectionOptions from a dict +delete_network_connection_options_from_dict = DeleteNetworkConnectionOptions.from_dict(delete_network_connection_options_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeploymentVersion.md b/docs/DeploymentVersion.md new file mode 100644 index 0000000..696c965 --- /dev/null +++ b/docs/DeploymentVersion.md @@ -0,0 +1,33 @@ +# DeploymentVersion + +Version and build identity of the running deployment. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product_version** | **str** | Deployed Corellium product version. | +**coordinator_version** | **str** | Coordinator artifact version. | +**build_commit** | **str** | Full coordinator source commit SHA. | +**build_date** | **datetime** | Coordinator artifact build time in RFC 3339 UTC format. | + +## Example + +```python +from corellium.models.deployment_version import DeploymentVersion + +# TODO update the JSON string below +json = "{}" +# create an instance of DeploymentVersion from a JSON string +deployment_version_instance = DeploymentVersion.from_json(json) +# print the JSON string representation of the object +print(DeploymentVersion.to_json()) + +# convert the object into a dict +deployment_version_dict = deployment_version_instance.to_dict() +# create an instance of DeploymentVersion from a dict +deployment_version_from_dict = DeploymentVersion.from_dict(deployment_version_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DetachInterfaceBody.md b/docs/DetachInterfaceBody.md new file mode 100644 index 0000000..fcd50fb --- /dev/null +++ b/docs/DetachInterfaceBody.md @@ -0,0 +1,29 @@ +# DetachInterfaceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interconnect_id** | **str** | Interconnect identifier. | + +## Example + +```python +from corellium.models.detach_interface_body import DetachInterfaceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of DetachInterfaceBody from a JSON string +detach_interface_body_instance = DetachInterfaceBody.from_json(json) +# print the JSON string representation of the object +print(DetachInterfaceBody.to_json()) + +# convert the object into a dict +detach_interface_body_dict = detach_interface_body_instance.to_dict() +# create an instance of DetachInterfaceBody from a dict +detach_interface_body_from_dict = DetachInterfaceBody.from_dict(detach_interface_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DetachInterfaceRequest.md b/docs/DetachInterfaceRequest.md index b0e8650..10e04cd 100644 --- a/docs/DetachInterfaceRequest.md +++ b/docs/DetachInterfaceRequest.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interconnect_id** | **str** | Interconnect identifier | +## Example + +```python +from corellium.models.detach_interface_request import DetachInterfaceRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DetachInterfaceRequest from a JSON string +detach_interface_request_instance = DetachInterfaceRequest.from_json(json) +# print the JSON string representation of the object +print(DetachInterfaceRequest.to_json()) + +# convert the object into a dict +detach_interface_request_dict = detach_interface_request_instance.to_dict() +# create an instance of DetachInterfaceRequest from a dict +detach_interface_request_from_dict = DetachInterfaceRequest.from_dict(detach_interface_request_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Device.md b/docs/Device.md index 1661778..023326d 100644 --- a/docs/Device.md +++ b/docs/Device.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -15,6 +16,23 @@ Name | Type | Description | Notes **created_at** | **str** | | [optional] **updated_at** | **str** | | [optional] +## Example + +```python +from corellium.models.device import Device + +# TODO update the JSON string below +json = "{}" +# create an instance of Device from a JSON string +device_instance = Device.from_json(json) +# print the JSON string representation of the object +print(Device.to_json()) + +# convert the object into a dict +device_dict = device_instance.to_dict() +# create an instance of Device from a dict +device_from_dict = Device.from_dict(device_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceAutoShutdownSchema.md b/docs/DeviceAutoShutdownSchema.md new file mode 100644 index 0000000..3586a0a --- /dev/null +++ b/docs/DeviceAutoShutdownSchema.md @@ -0,0 +1,30 @@ +# DeviceAutoShutdownSchema + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether devices in this domain are turned off automatically after running for `threshold` hours. Turning a device back on restarts its timer. | [optional] +**threshold** | **float** | Hours a device may run, counted from when it was last started, before it is turned off automatically. This is running time, not idle time: a device in active use is still stopped when the time is up. Whole number greater than 0. Defaults to 10 when not set. | [optional] + +## Example + +```python +from corellium.models.device_auto_shutdown_schema import DeviceAutoShutdownSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceAutoShutdownSchema from a JSON string +device_auto_shutdown_schema_instance = DeviceAutoShutdownSchema.from_json(json) +# print the JSON string representation of the object +print(DeviceAutoShutdownSchema.to_json()) + +# convert the object into a dict +device_auto_shutdown_schema_dict = device_auto_shutdown_schema_instance.to_dict() +# create an instance of DeviceAutoShutdownSchema from a dict +device_auto_shutdown_schema_from_dict = DeviceAutoShutdownSchema.from_dict(device_auto_shutdown_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeviceUsage.md b/docs/DeviceUsage.md new file mode 100644 index 0000000..3aa2114 --- /dev/null +++ b/docs/DeviceUsage.md @@ -0,0 +1,30 @@ +# DeviceUsage + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hours_used** | **float** | Device hours used. | +**hours_max** | **float** | Device hours allowed. | + +## Example + +```python +from corellium.models.device_usage import DeviceUsage + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceUsage from a JSON string +device_usage_instance = DeviceUsage.from_json(json) +# print the JSON string representation of the object +print(DeviceUsage.to_json()) + +# convert the object into a dict +device_usage_dict = device_usage_instance.to_dict() +# create an instance of DeviceUsage from a dict +device_usage_from_dict = DeviceUsage.from_dict(device_usage_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainApi.md b/docs/DomainApi.md new file mode 100644 index 0000000..2b6ad87 --- /dev/null +++ b/docs/DomainApi.md @@ -0,0 +1,658 @@ +# corellium.DomainApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_domain_welcome_message**](DomainApi.md#v3_create_domain_welcome_message) | **POST** /v3/domain/welcome | Create a welcome message for a domain +[**v3_delete_domain_welcome_message**](DomainApi.md#v3_delete_domain_welcome_message) | **DELETE** /v3/domain/welcome | Delete the welcome message for the authenticated user's domain +[**v3_get_domain_image_upload**](DomainApi.md#v3_get_domain_image_upload) | **GET** /v3/domain/image-upload/{type}/{imageId}/{name} | Get image upload status +[**v3_get_domain_welcome_message**](DomainApi.md#v3_get_domain_welcome_message) | **GET** /v3/domain/welcome | Get the welcome message for the authenticated user's domain +[**v3_list_domain_software**](DomainApi.md#v3_list_domain_software) | **GET** /v3/domain/software | List domain-level firmware images +[**v3_patch_domain_welcome_message**](DomainApi.md#v3_patch_domain_welcome_message) | **PATCH** /v3/domain/welcome | Update a welcome message for a domain +[**v3_put_domain_image_upload**](DomainApi.md#v3_put_domain_image_upload) | **PUT** /v3/domain/image-upload/{type}/{imageId}/{name} | Upload image chunk + + +# **v3_create_domain_welcome_message** +> DomainWelcomeMessageResponse v3_create_domain_welcome_message(set_domain_welcome_message_body) + +Create a welcome message for a domain + +**Required role:** Domain administrator. + +Creates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_welcome_message_response import DomainWelcomeMessageResponse +from corellium.models.set_domain_welcome_message_body import SetDomainWelcomeMessageBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainApi(api_client) + set_domain_welcome_message_body = corellium.SetDomainWelcomeMessageBody() # SetDomainWelcomeMessageBody | + + try: + # Create a welcome message for a domain + api_response = api_instance.v3_create_domain_welcome_message(set_domain_welcome_message_body) + print("The response of DomainApi->v3_create_domain_welcome_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainApi->v3_create_domain_welcome_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_domain_welcome_message_body** | [**SetDomainWelcomeMessageBody**](SetDomainWelcomeMessageBody.md)| | + +### Return type + +[**DomainWelcomeMessageResponse**](DomainWelcomeMessageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Welcome message created. | - | +**400** | Validation error (e.g. empty message). | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_domain_welcome_message** +> v3_delete_domain_welcome_message() + +Delete the welcome message for the authenticated user's domain + +**Required role:** Domain administrator. + +Delete the welcome message for the authenticated user's domain. + +Deletes are idempotent: a domain with no welcome message is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainApi(api_client) + + try: + # Delete the welcome message for the authenticated user's domain + api_instance.v3_delete_domain_welcome_message() + except Exception as e: + print("Exception when calling DomainApi->v3_delete_domain_welcome_message: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Welcome message deleted. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_domain_image_upload** +> bytearray v3_get_domain_image_upload(type, image_id, name, resumable_chunk_number=resumable_chunk_number) + +Get image upload status + +**Required role:** Domain administrator on on-site deployments; cloud administrator on cloud deployments. + +Checks the progress of a chunked upload made with `v3PutDomainImageUpload`, or downloads the finished file. With chunk parameters (`resumableChunkNumber` and friends) it returns 200 if that chunk is already stored and 204 if it still needs to be sent; without them it downloads the image file. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainApi(api_client) + type = 'type_example' # str | What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. + image_id = 'image_id_example' # str | An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. + name = 'name_example' # str | The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. + resumable_chunk_number = 3.4 # float | Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. (optional) + + try: + # Get image upload status + api_response = api_instance.v3_get_domain_image_upload(type, image_id, name, resumable_chunk_number=resumable_chunk_number) + print("The response of DomainApi->v3_get_domain_image_upload:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainApi->v3_get_domain_image_upload: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. | + **image_id** | **str**| An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. | + **name** | **str**| The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. | + **resumable_chunk_number** | **float**| Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. | [optional] + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An empty JSON object when a probed chunk is already stored, the image bytes when the file is stored locally, or the image metadata when no file has been stored yet. | - | +**204** | The probed chunk is not stored yet and still needs to be uploaded. | - | +**302** | The image is stored in S3; follow the Location header to download it. | * Location - URL the client is redirected to.
| +**400** | The image identifier is invalid or the image record is missing. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required on on-site deployments; cloud administrator permissions required on cloud deployments. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No image with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_domain_welcome_message** +> DomainWelcomeMessageResponse v3_get_domain_welcome_message() + +Get the welcome message for the authenticated user's domain + +Retrieves the welcome message for the domain. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_welcome_message_response import DomainWelcomeMessageResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainApi(api_client) + + try: + # Get the welcome message for the authenticated user's domain + api_response = api_instance.v3_get_domain_welcome_message() + print("The response of DomainApi->v3_get_domain_welcome_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainApi->v3_get_domain_welcome_message: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**DomainWelcomeMessageResponse**](DomainWelcomeMessageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Domain welcome message. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No welcome message exists for this domain. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_domain_software** +> DomainSoftwareList v3_list_domain_software(limit=limit, offset=offset) + +List domain-level firmware images + +**Required role:** Domain administrator. + +Lists the firmware images uploaded at domain level (not in a project or instance), one entry per device model. Requires a domain administrator. Use it to find the `imageId` of a domain firmware upload, for example to delete it with `DELETE /v3/images/{imageId}`. These images also appear in `GET /v3/models/{model}/software` for the matching model. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_software_list import DomainSoftwareList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List domain-level firmware images + api_response = api_instance.v3_list_domain_software(limit=limit, offset=offset) + print("The response of DomainApi->v3_list_domain_software:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainApi->v3_list_domain_software: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**DomainSoftwareList**](DomainSoftwareList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of domain firmware uploads. | - | +**400** | Invalid limit or offset. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_domain_welcome_message** +> DomainWelcomeMessageResponse v3_patch_domain_welcome_message(patch_domain_welcome_message_body=patch_domain_welcome_message_body) + +Update a welcome message for a domain + +**Required role:** Domain administrator. + +Updates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_welcome_message_response import DomainWelcomeMessageResponse +from corellium.models.patch_domain_welcome_message_body import PatchDomainWelcomeMessageBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainApi(api_client) + patch_domain_welcome_message_body = corellium.PatchDomainWelcomeMessageBody() # PatchDomainWelcomeMessageBody | (optional) + + try: + # Update a welcome message for a domain + api_response = api_instance.v3_patch_domain_welcome_message(patch_domain_welcome_message_body=patch_domain_welcome_message_body) + print("The response of DomainApi->v3_patch_domain_welcome_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainApi->v3_patch_domain_welcome_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **patch_domain_welcome_message_body** | [**PatchDomainWelcomeMessageBody**](PatchDomainWelcomeMessageBody.md)| | [optional] + +### Return type + +[**DomainWelcomeMessageResponse**](DomainWelcomeMessageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated welcome message. | - | +**400** | Validation error (e.g. empty message or no fields provided). | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No welcome message exists for this domain. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_put_domain_image_upload** +> Dict[str, Optional[object]] v3_put_domain_image_upload(type, image_id, name, body, resumable_chunk_number=resumable_chunk_number, resumable_chunk_size=resumable_chunk_size, resumable_current_chunk_size=resumable_current_chunk_size, resumable_total_size=resumable_total_size, resumable_total_chunks=resumable_total_chunks, corellium_checksum=corellium_checksum, flavor=flavor, x_corellium_image_encoding=x_corellium_image_encoding, x_corellium_image_encapsulated=x_corellium_image_encapsulated, x_corellium_total_file_size=x_corellium_total_file_size, x_corellium_image_password=x_corellium_image_password) + +Upload image chunk + +**Required role:** Domain administrator on on-site deployments; cloud administrator on cloud deployments. + +Uploads one chunk of a file as a domain-level image: one that belongs to no project or instance and is available across your domain. Requires a domain administrator (on-site) or cloud administrator. Works like `v3PutProjectImageUpload`: you choose the image ID (a new random UUID), the record is created on the first chunk, and `type` and `name` in the path set the image type and name. A domain-level `fw` image is offered as a choice when anyone in the domain creates a device of the matching model, without an install step. The result is the same as `POST /v3/images` with no `projectId` or `instanceId` followed by `PUT /v3/images/{imageId}/file`, which applies the same administrator rule to chunk uploads. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainApi(api_client) + type = 'type_example' # str | What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. + image_id = 'image_id_example' # str | An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. + name = 'name_example' # str | The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. + body = None # bytearray | + resumable_chunk_number = 3.4 # float | Which chunk this is, counting from 1. (optional) + resumable_chunk_size = 3.4 # float | The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. (optional) + resumable_current_chunk_size = 3.4 # float | Actual size in bytes of this chunk's body. (optional) + resumable_total_size = 3.4 # float | Size of the whole file in bytes. (optional) + resumable_total_chunks = 3.4 # float | How many chunks the whole file is split into. The upload completes when the last one arrives. (optional) + corellium_checksum = 'corellium_checksum_example' # str | Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. (optional) + flavor = 'flavor_example' # str | Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. (optional) + x_corellium_image_encoding = 'x_corellium_image_encoding_example' # str | How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. (optional) + x_corellium_image_encapsulated = True # bool | Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. (optional) + x_corellium_total_file_size = 3.4 # float | Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. (optional) + x_corellium_image_password = 'x_corellium_image_password_example' # str | Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. (optional) + + try: + # Upload image chunk + api_response = api_instance.v3_put_domain_image_upload(type, image_id, name, body, resumable_chunk_number=resumable_chunk_number, resumable_chunk_size=resumable_chunk_size, resumable_current_chunk_size=resumable_current_chunk_size, resumable_total_size=resumable_total_size, resumable_total_chunks=resumable_total_chunks, corellium_checksum=corellium_checksum, flavor=flavor, x_corellium_image_encoding=x_corellium_image_encoding, x_corellium_image_encapsulated=x_corellium_image_encapsulated, x_corellium_total_file_size=x_corellium_total_file_size, x_corellium_image_password=x_corellium_image_password) + print("The response of DomainApi->v3_put_domain_image_upload:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainApi->v3_put_domain_image_upload: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **str**| What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. | + **image_id** | **str**| An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. | + **name** | **str**| The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. | + **body** | **bytearray**| | + **resumable_chunk_number** | **float**| Which chunk this is, counting from 1. | [optional] + **resumable_chunk_size** | **float**| The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. | [optional] + **resumable_current_chunk_size** | **float**| Actual size in bytes of this chunk's body. | [optional] + **resumable_total_size** | **float**| Size of the whole file in bytes. | [optional] + **resumable_total_chunks** | **float**| How many chunks the whole file is split into. The upload completes when the last one arrives. | [optional] + **corellium_checksum** | **str**| Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. | [optional] + **flavor** | **str**| Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. | [optional] + **x_corellium_image_encoding** | **str**| How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. | [optional] + **x_corellium_image_encapsulated** | **bool**| Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. | [optional] + **x_corellium_total_file_size** | **float**| Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. | [optional] + **x_corellium_image_password** | **str**| Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. | [optional] + +### Return type + +**Dict[str, Optional[object]]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Chunk stored. The body is an empty JSON object. Send the next chunk; the image is finished when the last chunk arrives. | - | +**400** | Invalid chunk or upload parameters, unreadable body, or a missing/mismatched corelliumChecksum for a firmware upload. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required on on-site deployments; cloud administrator permissions required on cloud deployments. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No image with the given identifier. | - | +**507** | The image pool does not have enough space for this upload. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DomainAuthProviderApi.md b/docs/DomainAuthProviderApi.md new file mode 100644 index 0000000..9bc6eec --- /dev/null +++ b/docs/DomainAuthProviderApi.md @@ -0,0 +1,377 @@ +# corellium.DomainAuthProviderApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_create_domain_auth_provider**](DomainAuthProviderApi.md#v1_create_domain_auth_provider) | **POST** /v1/domain/{domainId}/auth | Create a new auth provider for a domain +[**v1_delete_domain_auth_provider**](DomainAuthProviderApi.md#v1_delete_domain_auth_provider) | **DELETE** /v1/domain/{domainId}/auth/{providerId} | Delete an auth provider from a domain +[**v1_get_domain_auth_providers**](DomainAuthProviderApi.md#v1_get_domain_auth_providers) | **GET** /v1/domain/{domainId}/auth | Return all configured auth providers for a domain (including globally configured providers) +[**v1_update_domain_auth_provider**](DomainAuthProviderApi.md#v1_update_domain_auth_provider) | **PUT** /v1/domain/{domainId}/auth/{providerId} | Update an auth provider for a domain + + +# **v1_create_domain_auth_provider** +> DomainAuthProviderResponseV1 v1_create_domain_auth_provider(domain_id, domain_auth_provider_request) + +Create a new auth provider for a domain + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_auth_provider_request import DomainAuthProviderRequest +from corellium.models.domain_auth_provider_response_v1 import DomainAuthProviderResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProviderApi(api_client) + domain_id = 'domain_id_example' # str | Domain ID - uuid + domain_auth_provider_request = { + "enabled": true, + "providerType": "open-id-connect", + "label": "Login with Custom Auth0", + "config": { + "discoveryUrl": "http://localhost:8080/realms/Corellium/.well-known/openid-configuration", + "clientId": "B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4", + "clientSecret": "itsasecret", + "invitedOnly": false + } +} # DomainAuthProviderRequest | Request Data + + try: + # Create a new auth provider for a domain + api_response = api_instance.v1_create_domain_auth_provider(domain_id, domain_auth_provider_request) + print("The response of DomainAuthProviderApi->v1_create_domain_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainAuthProviderApi->v1_create_domain_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain ID - uuid | + **domain_auth_provider_request** | [**DomainAuthProviderRequest**](DomainAuthProviderRequest.md)| Request Data | + +### Return type + +[**DomainAuthProviderResponseV1**](DomainAuthProviderResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_domain_auth_provider** +> v1_delete_domain_auth_provider(domain_id, provider_id) + +Delete an auth provider from a domain + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProviderApi(api_client) + domain_id = 'domain_id_example' # str | Domain ID - uuid + provider_id = 'provider_id_example' # str | Provider ID - uuid + + try: + # Delete an auth provider from a domain + api_instance.v1_delete_domain_auth_provider(domain_id, provider_id) + except Exception as e: + print("Exception when calling DomainAuthProviderApi->v1_delete_domain_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain ID - uuid | + **provider_id** | **str**| Provider ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_domain_auth_providers** +> List[DomainAuthProviderResponseV1] v1_get_domain_auth_providers(domain_id) + +Return all configured auth providers for a domain (including globally configured providers) + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_auth_provider_response_v1 import DomainAuthProviderResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProviderApi(api_client) + domain_id = 'domain_id_example' # str | Domain ID - uuid + + try: + # Return all configured auth providers for a domain (including globally configured providers) + api_response = api_instance.v1_get_domain_auth_providers(domain_id) + print("The response of DomainAuthProviderApi->v1_get_domain_auth_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainAuthProviderApi->v1_get_domain_auth_providers: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain ID - uuid | + +### Return type + +[**List[DomainAuthProviderResponseV1]**](DomainAuthProviderResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_domain_auth_provider** +> DomainAuthProviderResponseV1 v1_update_domain_auth_provider(domain_id, provider_id, domain_auth_provider_request) + +Update an auth provider for a domain + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_auth_provider_request import DomainAuthProviderRequest +from corellium.models.domain_auth_provider_response_v1 import DomainAuthProviderResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProviderApi(api_client) + domain_id = 'domain_id_example' # str | Domain ID - uuid + provider_id = 'provider_id_example' # str | Provider ID - uuid + domain_auth_provider_request = { + "enabled": false, + "providerType": "open-id-connect", + "label": "Login with Custom Auth0", + "config": { + "discoveryUrl": "http://localhost:8080/realms/Corellium/.well-known/openid-configuration", + "clientId": "B5GhRzrVn19adO1a1vJ6aZRYdNY9jSP4", + "clientSecret": "itsasecret", + "invitedOnly": true + } +} # DomainAuthProviderRequest | Request Data + + try: + # Update an auth provider for a domain + api_response = api_instance.v1_update_domain_auth_provider(domain_id, provider_id, domain_auth_provider_request) + print("The response of DomainAuthProviderApi->v1_update_domain_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainAuthProviderApi->v1_update_domain_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain ID - uuid | + **provider_id** | **str**| Provider ID - uuid | + **domain_auth_provider_request** | [**DomainAuthProviderRequest**](DomainAuthProviderRequest.md)| Request Data | + +### Return type + +[**DomainAuthProviderResponseV1**](DomainAuthProviderResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DomainAuthProviderConfig.md b/docs/DomainAuthProviderConfig.md new file mode 100644 index 0000000..d52118f --- /dev/null +++ b/docs/DomainAuthProviderConfig.md @@ -0,0 +1,41 @@ +# DomainAuthProviderConfig + +Optional configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity_provider_config** | [**SamlIdentityProviderConfig**](SamlIdentityProviderConfig.md) | | +**service_provider_config** | [**SamlServiceProviderConfig**](SamlServiceProviderConfig.md) | | [optional] +**user_attribute_mapping** | [**LdapUserAttributeMapping**](LdapUserAttributeMapping.md) | | [optional] +**group_mapping** | [**List[SamlGroupMapping]**](SamlGroupMapping.md) | | [optional] +**discovery_url** | **str** | Service Discovery URL. | +**client_id** | **str** | Service Client ID. | +**client_secret** | **str** | Service Client Secret. | +**invited_only** | **bool** | Only accept individuals with invitations. | [optional] +**server_connection_details** | [**LdapServerConnectionDetails**](LdapServerConnectionDetails.md) | | +**authentication_credentials** | [**LdapAuthenticationCredentials**](LdapAuthenticationCredentials.md) | | +**user_search_configuration** | [**LdapUserSearchConfiguration**](LdapUserSearchConfiguration.md) | | +**group_search_configuration** | [**List[LdapGroupSearchConfiguration]**](LdapGroupSearchConfiguration.md) | | [optional] + +## Example + +```python +from corellium.models.domain_auth_provider_config import DomainAuthProviderConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuthProviderConfig from a JSON string +domain_auth_provider_config_instance = DomainAuthProviderConfig.from_json(json) +# print the JSON string representation of the object +print(DomainAuthProviderConfig.to_json()) + +# convert the object into a dict +domain_auth_provider_config_dict = domain_auth_provider_config_instance.to_dict() +# create an instance of DomainAuthProviderConfig from a dict +domain_auth_provider_config_from_dict = DomainAuthProviderConfig.from_dict(domain_auth_provider_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainAuthProviderRequest.md b/docs/DomainAuthProviderRequest.md index e89094a..8bc0002 100644 --- a/docs/DomainAuthProviderRequest.md +++ b/docs/DomainAuthProviderRequest.md @@ -3,13 +3,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **provider_type** | **str** | Provider Type | **enabled** | **bool** | Enabled/Disabled | **label** | **str** | Login Button Text | [optional] -**config** | [**OpenIDConfig**](OpenIDConfig.md) | | [optional] +**config** | [**OpenIDConfigV1**](OpenIDConfigV1.md) | | [optional] + +## Example + +```python +from corellium.models.domain_auth_provider_request import DomainAuthProviderRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuthProviderRequest from a JSON string +domain_auth_provider_request_instance = DomainAuthProviderRequest.from_json(json) +# print the JSON string representation of the object +print(DomainAuthProviderRequest.to_json()) +# convert the object into a dict +domain_auth_provider_request_dict = domain_auth_provider_request_instance.to_dict() +# create an instance of DomainAuthProviderRequest from a dict +domain_auth_provider_request_from_dict = DomainAuthProviderRequest.from_dict(domain_auth_provider_request_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DomainAuthProviderResponse.md b/docs/DomainAuthProviderResponse.md index 0c05cce..412cea1 100644 --- a/docs/DomainAuthProviderResponse.md +++ b/docs/DomainAuthProviderResponse.md @@ -1,24 +1,39 @@ # DomainAuthProviderResponse - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identifier** | **str** | Provider ID | -**id** | **str** | Provider ID for backward compatibility with frontend | [optional] -**provider_type** | **str** | Provider Type | -**provider** | **str** | Provider Type for backward compatibility with frontend | [optional] -**label** | **str** | Login Button Text | -**name** | **str** | Title Text for the Frontend's Provider Configuration Form | [optional] -**authorization_url** | **str** | Coordinator endpoint for Authorizing with this provider | [optional] -**default** | **bool** | True: Configured in coordinator.json, False: Custom Domain Provider | -**enabled** | **bool** | Enabled/Disabled | -**config** | [**OpenIDConfig**](OpenIDConfig.md) | | [optional] -**created_by** | **str** | Optional User ID of creator | [optional] -**created_at** | **str** | Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | -**updated_at** | **str** | Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | +**identifier** | **str** | Provider identifier. | +**config** | [**CreateDomainAuthProviderResponseConfig**](CreateDomainAuthProviderResponseConfig.md) | | [optional] +**provider_type** | **str** | Provider type. | +**label** | **str** | Login button text. | +**enabled** | **bool** | Enabled/Disabled. | +**created_by** | **str** | Optional User ID of creator. | [optional] +**default** | **bool** | True: configured in coordinator.json, False: custom domain provider. | +**authorization_url** | **str** | Coordinator endpoint for Authorizing with this provider. | [optional] +**name** | **str** | Provider name for a given provider type. | [optional] +**created_at** | **datetime** | Created date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z. | [optional] +**updated_at** | **datetime** | Updated date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z. | [optional] + +## Example + +```python +from corellium.models.domain_auth_provider_response import DomainAuthProviderResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuthProviderResponse from a JSON string +domain_auth_provider_response_instance = DomainAuthProviderResponse.from_json(json) +# print the JSON string representation of the object +print(DomainAuthProviderResponse.to_json()) +# convert the object into a dict +domain_auth_provider_response_dict = domain_auth_provider_response_instance.to_dict() +# create an instance of DomainAuthProviderResponse from a dict +domain_auth_provider_response_from_dict = DomainAuthProviderResponse.from_dict(domain_auth_provider_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DomainAuthProviderResponseV1.md b/docs/DomainAuthProviderResponseV1.md new file mode 100644 index 0000000..2fb7605 --- /dev/null +++ b/docs/DomainAuthProviderResponseV1.md @@ -0,0 +1,42 @@ +# DomainAuthProviderResponseV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Provider ID | +**id** | **str** | Provider ID for backward compatibility with frontend | [optional] +**provider_type** | **str** | Provider Type | +**provider** | **str** | Provider Type for backward compatibility with frontend | [optional] +**label** | **str** | Login Button Text | +**name** | **str** | Title Text for the Frontend's Provider Configuration Form | [optional] +**authorization_url** | **str** | Coordinator endpoint for Authorizing with this provider | [optional] +**default** | **bool** | True: Configured in coordinator.json, False: Custom Domain Provider | +**enabled** | **bool** | Enabled/Disabled | +**config** | [**OpenIDConfigV1**](OpenIDConfigV1.md) | | [optional] +**created_by** | **str** | Optional User ID of creator | [optional] +**created_at** | **str** | Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | +**updated_at** | **str** | Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | + +## Example + +```python +from corellium.models.domain_auth_provider_response_v1 import DomainAuthProviderResponseV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuthProviderResponseV1 from a JSON string +domain_auth_provider_response_v1_instance = DomainAuthProviderResponseV1.from_json(json) +# print the JSON string representation of the object +print(DomainAuthProviderResponseV1.to_json()) + +# convert the object into a dict +domain_auth_provider_response_v1_dict = domain_auth_provider_response_v1_instance.to_dict() +# create an instance of DomainAuthProviderResponseV1 from a dict +domain_auth_provider_response_v1_from_dict = DomainAuthProviderResponseV1.from_dict(domain_auth_provider_response_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainAuthProvidersApi.md b/docs/DomainAuthProvidersApi.md new file mode 100644 index 0000000..a3df98c --- /dev/null +++ b/docs/DomainAuthProvidersApi.md @@ -0,0 +1,474 @@ +# corellium.DomainAuthProvidersApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_domain_auth_provider**](DomainAuthProvidersApi.md#v3_create_domain_auth_provider) | **POST** /v3/domain/{domainId}/auth | Create a new auth provider for a domain +[**v3_delete_domain_auth_provider**](DomainAuthProvidersApi.md#v3_delete_domain_auth_provider) | **DELETE** /v3/domain/{domainId}/auth/{providerId} | Delete an auth provider from a domain +[**v3_list_domain_auth_providers**](DomainAuthProvidersApi.md#v3_list_domain_auth_providers) | **GET** /v3/domain/{domainId}/auth | Return all configured auth providers for a domain (including globally configured providers) +[**v3_patch_domain_auth_provider**](DomainAuthProvidersApi.md#v3_patch_domain_auth_provider) | **PATCH** /v3/domain/{domainId}/auth/{providerId} | Partially update an auth provider for a domain +[**v3_update_domain_auth_provider**](DomainAuthProvidersApi.md#v3_update_domain_auth_provider) | **PUT** /v3/domain/{domainId}/auth/{providerId} | Update an auth provider for a domain + + +# **v3_create_domain_auth_provider** +> CreateDomainAuthProviderResponse v3_create_domain_auth_provider(domain_id, create_domain_auth_provider_body) + +Create a new auth provider for a domain + +**Required role:** Domain administrator. + +Create a new auth provider for a domain. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_domain_auth_provider_body import CreateDomainAuthProviderBody +from corellium.models.create_domain_auth_provider_response import CreateDomainAuthProviderResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProvidersApi(api_client) + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba' # str | Domain identifier. + create_domain_auth_provider_body = corellium.CreateDomainAuthProviderBody() # CreateDomainAuthProviderBody | + + try: + # Create a new auth provider for a domain + api_response = api_instance.v3_create_domain_auth_provider(domain_id, create_domain_auth_provider_body) + print("The response of DomainAuthProvidersApi->v3_create_domain_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainAuthProvidersApi->v3_create_domain_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain identifier. | + **create_domain_auth_provider_body** | [**CreateDomainAuthProviderBody**](CreateDomainAuthProviderBody.md)| | + +### Return type + +[**CreateDomainAuthProviderResponse**](CreateDomainAuthProviderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Auth provider created. | - | +**400** | Invalid request body. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_domain_auth_provider** +> v3_delete_domain_auth_provider(domain_id, provider_id) + +Delete an auth provider from a domain + +**Required role:** Domain administrator. + +Delete an auth provider from a domain. + +Deletes are idempotent: a `providerId` that is not attached to the domain, or an unknown `domainId`, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. +The underlying provider record is only removed when no other domain still references it, and default +providers are never removed. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProvidersApi(api_client) + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba' # str | Domain identifier. + provider_id = 'sso.example.com' # str | Provider identifier. + + try: + # Delete an auth provider from a domain + api_instance.v3_delete_domain_auth_provider(domain_id, provider_id) + except Exception as e: + print("Exception when calling DomainAuthProvidersApi->v3_delete_domain_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain identifier. | + **provider_id** | **str**| Provider identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted auth provider. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_domain_auth_providers** +> DomainAuthProvidersList v3_list_domain_auth_providers(domain_id, limit=limit, offset=offset) + +Return all configured auth providers for a domain (including globally configured providers) + +**Required role:** Domain administrator. + +Return all configured auth providers for a domain (including globally configured providers). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_auth_providers_list import DomainAuthProvidersList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProvidersApi(api_client) + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba' # str | Domain identifier. + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # Return all configured auth providers for a domain (including globally configured providers) + api_response = api_instance.v3_list_domain_auth_providers(domain_id, limit=limit, offset=offset) + print("The response of DomainAuthProvidersApi->v3_list_domain_auth_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainAuthProvidersApi->v3_list_domain_auth_providers: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain identifier. | + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**DomainAuthProvidersList**](DomainAuthProvidersList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of auth providers. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_domain_auth_provider** +> DomainAuthProviderResponse v3_patch_domain_auth_provider(domain_id, provider_id, patch_domain_auth_provider_body=patch_domain_auth_provider_body) + +Partially update an auth provider for a domain + +**Required role:** Domain administrator. + +Partially update an auth provider for a domain. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_auth_provider_response import DomainAuthProviderResponse +from corellium.models.patch_domain_auth_provider_body import PatchDomainAuthProviderBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProvidersApi(api_client) + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba' # str | Domain identifier. + provider_id = 'sso.example.com' # str | Provider identifier. + patch_domain_auth_provider_body = corellium.PatchDomainAuthProviderBody() # PatchDomainAuthProviderBody | (optional) + + try: + # Partially update an auth provider for a domain + api_response = api_instance.v3_patch_domain_auth_provider(domain_id, provider_id, patch_domain_auth_provider_body=patch_domain_auth_provider_body) + print("The response of DomainAuthProvidersApi->v3_patch_domain_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainAuthProvidersApi->v3_patch_domain_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain identifier. | + **provider_id** | **str**| Provider identifier. | + **patch_domain_auth_provider_body** | [**PatchDomainAuthProviderBody**](PatchDomainAuthProviderBody.md)| | [optional] + +### Return type + +[**DomainAuthProviderResponse**](DomainAuthProviderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated auth provider. | - | +**400** | Invalid request body. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_update_domain_auth_provider** +> DomainAuthProviderResponse v3_update_domain_auth_provider(domain_id, provider_id, create_domain_auth_provider_body) + +Update an auth provider for a domain + +**Required role:** Domain administrator. + +Update an auth provider for a domain. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_domain_auth_provider_body import CreateDomainAuthProviderBody +from corellium.models.domain_auth_provider_response import DomainAuthProviderResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainAuthProvidersApi(api_client) + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba' # str | Domain identifier. + provider_id = 'sso.example.com' # str | Provider identifier. + create_domain_auth_provider_body = corellium.CreateDomainAuthProviderBody() # CreateDomainAuthProviderBody | + + try: + # Update an auth provider for a domain + api_response = api_instance.v3_update_domain_auth_provider(domain_id, provider_id, create_domain_auth_provider_body) + print("The response of DomainAuthProvidersApi->v3_update_domain_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainAuthProvidersApi->v3_update_domain_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **domain_id** | **str**| Domain identifier. | + **provider_id** | **str**| Provider identifier. | + **create_domain_auth_provider_body** | [**CreateDomainAuthProviderBody**](CreateDomainAuthProviderBody.md)| | + +### Return type + +[**DomainAuthProviderResponse**](DomainAuthProviderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated auth provider. | - | +**400** | Invalid request body. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DomainAuthProvidersList.md b/docs/DomainAuthProvidersList.md new file mode 100644 index 0000000..cc82a3e --- /dev/null +++ b/docs/DomainAuthProvidersList.md @@ -0,0 +1,34 @@ +# DomainAuthProvidersList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[DomainAuthProviderResponse]**](DomainAuthProviderResponse.md) | List of auth providers for domain. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.domain_auth_providers_list import DomainAuthProvidersList + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAuthProvidersList from a JSON string +domain_auth_providers_list_instance = DomainAuthProvidersList.from_json(json) +# print the JSON string representation of the object +print(DomainAuthProvidersList.to_json()) + +# convert the object into a dict +domain_auth_providers_list_dict = domain_auth_providers_list_instance.to_dict() +# create an instance of DomainAuthProvidersList from a dict +domain_auth_providers_list_from_dict = DomainAuthProvidersList.from_dict(domain_auth_providers_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfig.md b/docs/DomainConfig.md new file mode 100644 index 0000000..2f936c7 --- /dev/null +++ b/docs/DomainConfig.md @@ -0,0 +1,43 @@ +# DomainConfig + +Domain configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**android** | **bool** | Whether Android devices are enabled. | [optional] +**billing** | **bool** | Whether billing is enabled. | [optional] +**license_type** | **str** | License type identifier. | [optional] +**signup_email** | **str** | Email used for domain signup. | [optional] +**trial** | [**DomainConfigTrial**](DomainConfigTrial.md) | | [optional] +**usage_based** | **bool** | Whether usage-based billing is enabled. | [optional] +**enable_netgear_devices** | **bool** | Whether Netgear devices are enabled. | [optional] +**no_ios** | **bool** | Whether iOS devices are disabled. | [optional] +**enable_amazon_devices** | **bool** | Whether Amazon devices are enabled. | [optional] +**device_dhcp_server** | **bool** | Whether device DHCP server is enabled. | [optional] +**enable_arm_devices** | **bool** | Whether ARM devices are enabled. | [optional] +**enable_devices** | **bool** | Whether devices are enabled. | [optional] +**webplayer** | [**DomainConfigWebplayer**](DomainConfigWebplayer.md) | | [optional] +**snapshot_sharing_permissions** | [**DomainConfigSnapshotSharingPermissions**](DomainConfigSnapshotSharingPermissions.md) | | [optional] + +## Example + +```python +from corellium.models.domain_config import DomainConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfig from a JSON string +domain_config_instance = DomainConfig.from_json(json) +# print the JSON string representation of the object +print(DomainConfig.to_json()) + +# convert the object into a dict +domain_config_dict = domain_config_instance.to_dict() +# create an instance of DomainConfig from a dict +domain_config_from_dict = DomainConfig.from_dict(domain_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigInput.md b/docs/DomainConfigInput.md new file mode 100644 index 0000000..028c744 --- /dev/null +++ b/docs/DomainConfigInput.md @@ -0,0 +1,48 @@ +# DomainConfigInput + +Domain configuration input (allows additional vendor device flags). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**android** | **bool** | Whether Android devices are enabled. | [optional] +**billing** | **bool** | Whether billing is enabled. | [optional] +**organization_name** | **str** | Organization name. | [optional] +**license_type** | **str** | License type identifier. | [optional] +**signup_email** | **str** | Email used for domain signup. | [optional] +**coupon_code** | **str** | Coupon code. | [optional] +**trial** | [**DomainConfigInputTrial**](DomainConfigInputTrial.md) | | [optional] +**no_ios** | **bool** | Whether iOS devices are disabled. | [optional] +**device_dhcp_server** | **bool** | Whether the device DHCP server is enabled. | [optional] +**files** | **bool** | Whether the files feature is enabled. | [optional] +**files_only** | **bool** | Whether the domain is in files-only mode. | [optional] +**remote_gpu** | **bool** | Whether remote GPU nodes are used. | [optional] +**prioritized_nodes** | **List[str]** | Node addresses (host:port) to prefer when placing devices. | [optional] +**enable_netgear_devices** | **bool** | Whether Netgear devices are enabled. | [optional] +**enable_amazon_devices** | **bool** | Whether Amazon devices are enabled. | [optional] +**enable_arm_devices** | **bool** | Whether ARM devices are enabled. | [optional] +**enable_devices** | **bool** | Whether devices are enabled. | [optional] +**webplayer** | [**DomainConfigInputWebplayer**](DomainConfigInputWebplayer.md) | | [optional] +**snapshot_sharing_permissions** | [**DomainConfigInputSnapshotSharingPermissions**](DomainConfigInputSnapshotSharingPermissions.md) | | [optional] + +## Example + +```python +from corellium.models.domain_config_input import DomainConfigInput + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigInput from a JSON string +domain_config_input_instance = DomainConfigInput.from_json(json) +# print the JSON string representation of the object +print(DomainConfigInput.to_json()) + +# convert the object into a dict +domain_config_input_dict = domain_config_input_instance.to_dict() +# create an instance of DomainConfigInput from a dict +domain_config_input_from_dict = DomainConfigInput.from_dict(domain_config_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigInputSnapshotSharingPermissions.md b/docs/DomainConfigInputSnapshotSharingPermissions.md new file mode 100644 index 0000000..37d75c9 --- /dev/null +++ b/docs/DomainConfigInputSnapshotSharingPermissions.md @@ -0,0 +1,34 @@ +# DomainConfigInputSnapshotSharingPermissions + +Snapshot sharing permissions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether cloud sharing is enabled (mapped to cloudEnabled). | [optional] +**public_link** | **bool** | Whether public link sharing is enabled. | [optional] +**domain_restricted_link** | **bool** | Whether domain-restricted links are enabled. | [optional] +**password_public_link** | **bool** | Whether password-protected public links are enabled. | [optional] +**email_invite** | **bool** | Whether email invites are enabled. | [optional] + +## Example + +```python +from corellium.models.domain_config_input_snapshot_sharing_permissions import DomainConfigInputSnapshotSharingPermissions + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigInputSnapshotSharingPermissions from a JSON string +domain_config_input_snapshot_sharing_permissions_instance = DomainConfigInputSnapshotSharingPermissions.from_json(json) +# print the JSON string representation of the object +print(DomainConfigInputSnapshotSharingPermissions.to_json()) + +# convert the object into a dict +domain_config_input_snapshot_sharing_permissions_dict = domain_config_input_snapshot_sharing_permissions_instance.to_dict() +# create an instance of DomainConfigInputSnapshotSharingPermissions from a dict +domain_config_input_snapshot_sharing_permissions_from_dict = DomainConfigInputSnapshotSharingPermissions.from_dict(domain_config_input_snapshot_sharing_permissions_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigInputTrial.md b/docs/DomainConfigInputTrial.md new file mode 100644 index 0000000..bbde5c2 --- /dev/null +++ b/docs/DomainConfigInputTrial.md @@ -0,0 +1,31 @@ +# DomainConfigInputTrial + +Trial configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start** | **float** | Trial start unix timestamp (ms). | +**end** | **float** | Trial end unix timestamp (ms). | + +## Example + +```python +from corellium.models.domain_config_input_trial import DomainConfigInputTrial + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigInputTrial from a JSON string +domain_config_input_trial_instance = DomainConfigInputTrial.from_json(json) +# print the JSON string representation of the object +print(DomainConfigInputTrial.to_json()) + +# convert the object into a dict +domain_config_input_trial_dict = domain_config_input_trial_instance.to_dict() +# create an instance of DomainConfigInputTrial from a dict +domain_config_input_trial_from_dict = DomainConfigInputTrial.from_dict(domain_config_input_trial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigInputWebplayer.md b/docs/DomainConfigInputWebplayer.md new file mode 100644 index 0000000..0be98dd --- /dev/null +++ b/docs/DomainConfigInputWebplayer.md @@ -0,0 +1,31 @@ +# DomainConfigInputWebplayer + +Webplayer configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether webplayer is enabled. | [optional] +**allowed_domains** | **List[str]** | Allowed domains for webplayer. | [optional] + +## Example + +```python +from corellium.models.domain_config_input_webplayer import DomainConfigInputWebplayer + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigInputWebplayer from a JSON string +domain_config_input_webplayer_instance = DomainConfigInputWebplayer.from_json(json) +# print the JSON string representation of the object +print(DomainConfigInputWebplayer.to_json()) + +# convert the object into a dict +domain_config_input_webplayer_dict = domain_config_input_webplayer_instance.to_dict() +# create an instance of DomainConfigInputWebplayer from a dict +domain_config_input_webplayer_from_dict = DomainConfigInputWebplayer.from_dict(domain_config_input_webplayer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigSnapshotSharingPermissions.md b/docs/DomainConfigSnapshotSharingPermissions.md new file mode 100644 index 0000000..d906a51 --- /dev/null +++ b/docs/DomainConfigSnapshotSharingPermissions.md @@ -0,0 +1,35 @@ +# DomainConfigSnapshotSharingPermissions + +Snapshot sharing permissions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cloud_enabled** | **bool** | Whether cloud sharing is enabled. | [optional] +**domain_enabled** | **bool** | Whether domain sharing is enabled. | [optional] +**public_link** | **bool** | Whether public link sharing is enabled. | [optional] +**domain_restricted_link** | **bool** | Whether domain-restricted links are enabled. | [optional] +**password_public_link** | **bool** | Whether password-protected public links are enabled. | [optional] +**email_invite** | **bool** | Whether email invites are enabled. | [optional] + +## Example + +```python +from corellium.models.domain_config_snapshot_sharing_permissions import DomainConfigSnapshotSharingPermissions + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigSnapshotSharingPermissions from a JSON string +domain_config_snapshot_sharing_permissions_instance = DomainConfigSnapshotSharingPermissions.from_json(json) +# print the JSON string representation of the object +print(DomainConfigSnapshotSharingPermissions.to_json()) + +# convert the object into a dict +domain_config_snapshot_sharing_permissions_dict = domain_config_snapshot_sharing_permissions_instance.to_dict() +# create an instance of DomainConfigSnapshotSharingPermissions from a dict +domain_config_snapshot_sharing_permissions_from_dict = DomainConfigSnapshotSharingPermissions.from_dict(domain_config_snapshot_sharing_permissions_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigTrial.md b/docs/DomainConfigTrial.md new file mode 100644 index 0000000..d32e9ae --- /dev/null +++ b/docs/DomainConfigTrial.md @@ -0,0 +1,34 @@ +# DomainConfigTrial + +Trial configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start** | **float** | Trial start unix timestamp (ms). | [optional] +**end** | **float** | Trial end unix timestamp (ms). | [optional] +**end_action** | [**DomainConfigTrialEndAction**](DomainConfigTrialEndAction.md) | | [optional] +**subscribe_action** | [**DomainConfigTrialSubscribeAction**](DomainConfigTrialSubscribeAction.md) | | [optional] +**extension** | [**TrialExtension**](TrialExtension.md) | Requested trial extension. | [optional] + +## Example + +```python +from corellium.models.domain_config_trial import DomainConfigTrial + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigTrial from a JSON string +domain_config_trial_instance = DomainConfigTrial.from_json(json) +# print the JSON string representation of the object +print(DomainConfigTrial.to_json()) + +# convert the object into a dict +domain_config_trial_dict = domain_config_trial_instance.to_dict() +# create an instance of DomainConfigTrial from a dict +domain_config_trial_from_dict = DomainConfigTrial.from_dict(domain_config_trial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigTrialEndAction.md b/docs/DomainConfigTrialEndAction.md new file mode 100644 index 0000000..515a26b --- /dev/null +++ b/docs/DomainConfigTrialEndAction.md @@ -0,0 +1,30 @@ +# DomainConfigTrialEndAction + +What happens when the trial ends. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | Action taken when the trial ends. | + +## Example + +```python +from corellium.models.domain_config_trial_end_action import DomainConfigTrialEndAction + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigTrialEndAction from a JSON string +domain_config_trial_end_action_instance = DomainConfigTrialEndAction.from_json(json) +# print the JSON string representation of the object +print(DomainConfigTrialEndAction.to_json()) + +# convert the object into a dict +domain_config_trial_end_action_dict = domain_config_trial_end_action_instance.to_dict() +# create an instance of DomainConfigTrialEndAction from a dict +domain_config_trial_end_action_from_dict = DomainConfigTrialEndAction.from_dict(domain_config_trial_end_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigTrialSubscribeAction.md b/docs/DomainConfigTrialSubscribeAction.md new file mode 100644 index 0000000..fa9882b --- /dev/null +++ b/docs/DomainConfigTrialSubscribeAction.md @@ -0,0 +1,30 @@ +# DomainConfigTrialSubscribeAction + +How the trial converts to a subscription. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | Action taken when the trial converts. | + +## Example + +```python +from corellium.models.domain_config_trial_subscribe_action import DomainConfigTrialSubscribeAction + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigTrialSubscribeAction from a JSON string +domain_config_trial_subscribe_action_instance = DomainConfigTrialSubscribeAction.from_json(json) +# print the JSON string representation of the object +print(DomainConfigTrialSubscribeAction.to_json()) + +# convert the object into a dict +domain_config_trial_subscribe_action_dict = domain_config_trial_subscribe_action_instance.to_dict() +# create an instance of DomainConfigTrialSubscribeAction from a dict +domain_config_trial_subscribe_action_from_dict = DomainConfigTrialSubscribeAction.from_dict(domain_config_trial_subscribe_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainConfigWebplayer.md b/docs/DomainConfigWebplayer.md new file mode 100644 index 0000000..3254f78 --- /dev/null +++ b/docs/DomainConfigWebplayer.md @@ -0,0 +1,31 @@ +# DomainConfigWebplayer + +Webplayer configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether webplayer is enabled. | +**allowed_domains** | **List[str]** | Allowed domains for webplayer. | [optional] + +## Example + +```python +from corellium.models.domain_config_webplayer import DomainConfigWebplayer + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainConfigWebplayer from a JSON string +domain_config_webplayer_instance = DomainConfigWebplayer.from_json(json) +# print the JSON string representation of the object +print(DomainConfigWebplayer.to_json()) + +# convert the object into a dict +domain_config_webplayer_dict = domain_config_webplayer_instance.to_dict() +# create an instance of DomainConfigWebplayer from a dict +domain_config_webplayer_from_dict = DomainConfigWebplayer.from_dict(domain_config_webplayer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainInfo.md b/docs/DomainInfo.md new file mode 100644 index 0000000..43e26ef --- /dev/null +++ b/docs/DomainInfo.md @@ -0,0 +1,29 @@ +# DomainInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_info** | [**DomainListItem**](DomainListItem.md) | Domain information. | + +## Example + +```python +from corellium.models.domain_info import DomainInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainInfo from a JSON string +domain_info_instance = DomainInfo.from_json(json) +# print the JSON string representation of the object +print(DomainInfo.to_json()) + +# convert the object into a dict +domain_info_dict = domain_info_instance.to_dict() +# create an instance of DomainInfo from a dict +domain_info_from_dict = DomainInfo.from_dict(domain_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainList.md b/docs/DomainList.md new file mode 100644 index 0000000..c13b511 --- /dev/null +++ b/docs/DomainList.md @@ -0,0 +1,33 @@ +# DomainList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **float** | Total number of domains. | +**page** | **float** | Current page number. | +**per_page** | **float** | Items per page. | +**items** | [**List[DomainListItem]**](DomainListItem.md) | Domain items. | +**usage** | [**DomainListUsage**](DomainListUsage.md) | | + +## Example + +```python +from corellium.models.domain_list import DomainList + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainList from a JSON string +domain_list_instance = DomainList.from_json(json) +# print the JSON string representation of the object +print(DomainList.to_json()) + +# convert the object into a dict +domain_list_dict = domain_list_instance.to_dict() +# create an instance of DomainList from a dict +domain_list_from_dict = DomainList.from_dict(domain_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItem.md b/docs/DomainListItem.md new file mode 100644 index 0000000..831c68c --- /dev/null +++ b/docs/DomainListItem.md @@ -0,0 +1,44 @@ +# DomainListItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Domain identifier. | +**user_id** | **str** | Owner user identifier. | +**domain_usage** | [**List[DomainListItemDomainUsageInner]**](DomainListItemDomainUsageInner.md) | Monthly usage entries. | +**user_count** | **float** | Number of users in the domain. | +**users_info** | [**List[DomainListItemUsersInfoInner]**](DomainListItemUsersInfoInner.md) | Users in the domain. | +**domain** | **str** | Fully qualified domain name. | +**domain_name** | **str** | Domain name. | +**disabled** | [**DomainListItemDisabled**](DomainListItemDisabled.md) | | +**config** | [**DomainConfig**](DomainConfig.md) | | +**quotas** | [**DomainListItemQuotas**](DomainListItemQuotas.md) | | +**usage** | [**DomainListItemUsage**](DomainListItemUsage.md) | | +**created_at** | **float** | Domain creation timestamp (epoch ms). | +**subscription** | [**DomainListItemSubscription**](DomainListItemSubscription.md) | | +**subscription_history** | [**List[DomainListItemSubscriptionHistoryInner]**](DomainListItemSubscriptionHistoryInner.md) | Subscription history. | [optional] +**plan_name** | **str** | Current plan name. | [optional] +**projects** | [**List[DomainListItemProjectsInner]**](DomainListItemProjectsInner.md) | Projects in the domain. | + +## Example + +```python +from corellium.models.domain_list_item import DomainListItem + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItem from a JSON string +domain_list_item_instance = DomainListItem.from_json(json) +# print the JSON string representation of the object +print(DomainListItem.to_json()) + +# convert the object into a dict +domain_list_item_dict = domain_list_item_instance.to_dict() +# create an instance of DomainListItem from a dict +domain_list_item_from_dict = DomainListItem.from_dict(domain_list_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemDisabled.md b/docs/DomainListItemDisabled.md new file mode 100644 index 0000000..f96f060 --- /dev/null +++ b/docs/DomainListItemDisabled.md @@ -0,0 +1,30 @@ +# DomainListItemDisabled + +Disabled state (null if domain is active). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Reason the domain is disabled. | + +## Example + +```python +from corellium.models.domain_list_item_disabled import DomainListItemDisabled + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemDisabled from a JSON string +domain_list_item_disabled_instance = DomainListItemDisabled.from_json(json) +# print the JSON string representation of the object +print(DomainListItemDisabled.to_json()) + +# convert the object into a dict +domain_list_item_disabled_dict = domain_list_item_disabled_instance.to_dict() +# create an instance of DomainListItemDisabled from a dict +domain_list_item_disabled_from_dict = DomainListItemDisabled.from_dict(domain_list_item_disabled_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemDomainUsageInner.md b/docs/DomainListItemDomainUsageInner.md new file mode 100644 index 0000000..54b6ce0 --- /dev/null +++ b/docs/DomainListItemDomainUsageInner.md @@ -0,0 +1,31 @@ +# DomainListItemDomainUsageInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | Domain identifier. | +**month** | **date** | Month (YYYY-MM-DD format). | +**hours** | **float** | Usage hours for the month. | + +## Example + +```python +from corellium.models.domain_list_item_domain_usage_inner import DomainListItemDomainUsageInner + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemDomainUsageInner from a JSON string +domain_list_item_domain_usage_inner_instance = DomainListItemDomainUsageInner.from_json(json) +# print the JSON string representation of the object +print(DomainListItemDomainUsageInner.to_json()) + +# convert the object into a dict +domain_list_item_domain_usage_inner_dict = domain_list_item_domain_usage_inner_instance.to_dict() +# create an instance of DomainListItemDomainUsageInner from a dict +domain_list_item_domain_usage_inner_from_dict = DomainListItemDomainUsageInner.from_dict(domain_list_item_domain_usage_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemProjectsInner.md b/docs/DomainListItemProjectsInner.md new file mode 100644 index 0000000..042d7e8 --- /dev/null +++ b/docs/DomainListItemProjectsInner.md @@ -0,0 +1,34 @@ +# DomainListItemProjectsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Project identifier. | +**name** | **str** | Project name. | +**quotas** | [**DomainListItemProjectsInnerQuotas**](DomainListItemProjectsInnerQuotas.md) | | +**usage** | [**DomainListItemProjectsInnerUsage**](DomainListItemProjectsInnerUsage.md) | | +**instances** | [**List[DomainListItemProjectsInnerInstancesInner]**](DomainListItemProjectsInnerInstancesInner.md) | Instances in the project. | +**images** | [**List[DomainListItemProjectsInnerInstancesInnerImagesInner]**](DomainListItemProjectsInnerInstancesInnerImagesInner.md) | Images in the project. | [optional] + +## Example + +```python +from corellium.models.domain_list_item_projects_inner import DomainListItemProjectsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemProjectsInner from a JSON string +domain_list_item_projects_inner_instance = DomainListItemProjectsInner.from_json(json) +# print the JSON string representation of the object +print(DomainListItemProjectsInner.to_json()) + +# convert the object into a dict +domain_list_item_projects_inner_dict = domain_list_item_projects_inner_instance.to_dict() +# create an instance of DomainListItemProjectsInner from a dict +domain_list_item_projects_inner_from_dict = DomainListItemProjectsInner.from_dict(domain_list_item_projects_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemProjectsInnerInstancesInner.md b/docs/DomainListItemProjectsInnerInstancesInner.md new file mode 100644 index 0000000..7786dca --- /dev/null +++ b/docs/DomainListItemProjectsInnerInstancesInner.md @@ -0,0 +1,43 @@ +# DomainListItemProjectsInnerInstancesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Instance identifier. | +**name** | **str** | Instance name. | [optional] +**status** | **str** | Instance status (ACTIVE, SHUTOFF, etc.). | +**error** | **str** | Error message if any. | +**task_state** | **str** | Current task state. | +**user_task** | **str** | User-initiated task. | +**os_version** | **str** | OS version. | +**os_build** | **str** | OS build identifier. | +**flavor_id** | **str** | Device flavor identifier. | +**flavor** | **str** | Friendly device flavor name. | [optional] +**compute_node** | **str** | Compute node address. | +**service_ip** | **str** | Service IP address. | +**wifi_ip** | **str** | WiFi IP address. | +**images** | [**List[DomainListItemProjectsInnerInstancesInnerImagesInner]**](DomainListItemProjectsInnerInstancesInnerImagesInner.md) | List of images. | +**usage** | [**DomainListItemProjectsInnerInstancesInnerUsage**](DomainListItemProjectsInnerInstancesInnerUsage.md) | | + +## Example + +```python +from corellium.models.domain_list_item_projects_inner_instances_inner import DomainListItemProjectsInnerInstancesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemProjectsInnerInstancesInner from a JSON string +domain_list_item_projects_inner_instances_inner_instance = DomainListItemProjectsInnerInstancesInner.from_json(json) +# print the JSON string representation of the object +print(DomainListItemProjectsInnerInstancesInner.to_json()) + +# convert the object into a dict +domain_list_item_projects_inner_instances_inner_dict = domain_list_item_projects_inner_instances_inner_instance.to_dict() +# create an instance of DomainListItemProjectsInnerInstancesInner from a dict +domain_list_item_projects_inner_instances_inner_from_dict = DomainListItemProjectsInnerInstancesInner.from_dict(domain_list_item_projects_inner_instances_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemProjectsInnerInstancesInnerImagesInner.md b/docs/DomainListItemProjectsInnerInstancesInnerImagesInner.md new file mode 100644 index 0000000..6e325f1 --- /dev/null +++ b/docs/DomainListItemProjectsInnerInstancesInnerImagesInner.md @@ -0,0 +1,32 @@ +# DomainListItemProjectsInnerInstancesInnerImagesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Image identifier. | +**type** | **str** | Image type (fw, kernel, etc.). | +**name** | **str** | Image filename. | +**size** | **float** | Image size in bytes. | + +## Example + +```python +from corellium.models.domain_list_item_projects_inner_instances_inner_images_inner import DomainListItemProjectsInnerInstancesInnerImagesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemProjectsInnerInstancesInnerImagesInner from a JSON string +domain_list_item_projects_inner_instances_inner_images_inner_instance = DomainListItemProjectsInnerInstancesInnerImagesInner.from_json(json) +# print the JSON string representation of the object +print(DomainListItemProjectsInnerInstancesInnerImagesInner.to_json()) + +# convert the object into a dict +domain_list_item_projects_inner_instances_inner_images_inner_dict = domain_list_item_projects_inner_instances_inner_images_inner_instance.to_dict() +# create an instance of DomainListItemProjectsInnerInstancesInnerImagesInner from a dict +domain_list_item_projects_inner_instances_inner_images_inner_from_dict = DomainListItemProjectsInnerInstancesInnerImagesInner.from_dict(domain_list_item_projects_inner_instances_inner_images_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemProjectsInnerInstancesInnerUsage.md b/docs/DomainListItemProjectsInnerInstancesInnerUsage.md new file mode 100644 index 0000000..7ed3433 --- /dev/null +++ b/docs/DomainListItemProjectsInnerInstancesInnerUsage.md @@ -0,0 +1,30 @@ +# DomainListItemProjectsInnerInstancesInnerUsage + +Instance usage. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_bytes** | **float** | Image bytes used. | + +## Example + +```python +from corellium.models.domain_list_item_projects_inner_instances_inner_usage import DomainListItemProjectsInnerInstancesInnerUsage + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemProjectsInnerInstancesInnerUsage from a JSON string +domain_list_item_projects_inner_instances_inner_usage_instance = DomainListItemProjectsInnerInstancesInnerUsage.from_json(json) +# print the JSON string representation of the object +print(DomainListItemProjectsInnerInstancesInnerUsage.to_json()) + +# convert the object into a dict +domain_list_item_projects_inner_instances_inner_usage_dict = domain_list_item_projects_inner_instances_inner_usage_instance.to_dict() +# create an instance of DomainListItemProjectsInnerInstancesInnerUsage from a dict +domain_list_item_projects_inner_instances_inner_usage_from_dict = DomainListItemProjectsInnerInstancesInnerUsage.from_dict(domain_list_item_projects_inner_instances_inner_usage_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemProjectsInnerQuotas.md b/docs/DomainListItemProjectsInnerQuotas.md new file mode 100644 index 0000000..bf44fda --- /dev/null +++ b/docs/DomainListItemProjectsInnerQuotas.md @@ -0,0 +1,32 @@ +# DomainListItemProjectsInnerQuotas + +Project quotas. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Core quota. | +**instances** | **float** | Instance quota. | +**ram** | **float** | RAM quota in MiB. | + +## Example + +```python +from corellium.models.domain_list_item_projects_inner_quotas import DomainListItemProjectsInnerQuotas + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemProjectsInnerQuotas from a JSON string +domain_list_item_projects_inner_quotas_instance = DomainListItemProjectsInnerQuotas.from_json(json) +# print the JSON string representation of the object +print(DomainListItemProjectsInnerQuotas.to_json()) + +# convert the object into a dict +domain_list_item_projects_inner_quotas_dict = domain_list_item_projects_inner_quotas_instance.to_dict() +# create an instance of DomainListItemProjectsInnerQuotas from a dict +domain_list_item_projects_inner_quotas_from_dict = DomainListItemProjectsInnerQuotas.from_dict(domain_list_item_projects_inner_quotas_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemProjectsInnerUsage.md b/docs/DomainListItemProjectsInnerUsage.md new file mode 100644 index 0000000..2950e53 --- /dev/null +++ b/docs/DomainListItemProjectsInnerUsage.md @@ -0,0 +1,36 @@ +# DomainListItemProjectsInnerUsage + +Project usage. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_instances** | **float** | Number of active instances. | +**image_bytes** | **float** | Image storage used in bytes. | +**cores** | **float** | Cores in use. | +**instances** | **float** | Total instances. | +**ram** | **float** | RAM in use in MiB. | +**gpu** | **float** | GPUs in use. | +**reserved_cores** | **float** | Reserved cores. | [optional] + +## Example + +```python +from corellium.models.domain_list_item_projects_inner_usage import DomainListItemProjectsInnerUsage + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemProjectsInnerUsage from a JSON string +domain_list_item_projects_inner_usage_instance = DomainListItemProjectsInnerUsage.from_json(json) +# print the JSON string representation of the object +print(DomainListItemProjectsInnerUsage.to_json()) + +# convert the object into a dict +domain_list_item_projects_inner_usage_dict = domain_list_item_projects_inner_usage_instance.to_dict() +# create an instance of DomainListItemProjectsInnerUsage from a dict +domain_list_item_projects_inner_usage_from_dict = DomainListItemProjectsInnerUsage.from_dict(domain_list_item_projects_inner_usage_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemQuotas.md b/docs/DomainListItemQuotas.md new file mode 100644 index 0000000..9b01250 --- /dev/null +++ b/docs/DomainListItemQuotas.md @@ -0,0 +1,32 @@ +# DomainListItemQuotas + +Domain quotas. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Core quota. | +**instances** | **float** | Instance quota. | +**ram** | **float** | RAM quota in MiB. | + +## Example + +```python +from corellium.models.domain_list_item_quotas import DomainListItemQuotas + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemQuotas from a JSON string +domain_list_item_quotas_instance = DomainListItemQuotas.from_json(json) +# print the JSON string representation of the object +print(DomainListItemQuotas.to_json()) + +# convert the object into a dict +domain_list_item_quotas_dict = domain_list_item_quotas_instance.to_dict() +# create an instance of DomainListItemQuotas from a dict +domain_list_item_quotas_from_dict = DomainListItemQuotas.from_dict(domain_list_item_quotas_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemSubscription.md b/docs/DomainListItemSubscription.md new file mode 100644 index 0000000..2b3aabc --- /dev/null +++ b/docs/DomainListItemSubscription.md @@ -0,0 +1,45 @@ +# DomainListItemSubscription + +Subscription info. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**renew_action** | **Dict[str, Optional[object]]** | Renewal action configuration (varies by billing backend). | +**domain** | **str** | Domain identifier. | +**billing_type** | **str** | Billing type. | +**billing_backend** | **str** | Billing backend (stripe, etc.). | +**billing_id** | **str** | External billing identifier. | +**next_bill** | **datetime** | ISO timestamp of next billing date. | +**usage_based** | **bool** | Whether billing is usage-based. | +**last_usage_bill** | **datetime** | ISO timestamp of last usage bill. | +**last_payment_amount** | **float** | Last payment amount, in cents. | +**usage_bill_interval_days** | **float** | Interval in days between usage bills. | +**usage_billing_threshold_dollars** | **float** | Dollar threshold that triggers a usage bill. | +**past_due** | **bool** | Whether the subscription is past due. | +**payment_attempts** | **float** | Number of payment attempts. | +**last_payment_attempt** | **datetime** | ISO timestamp of last payment attempt. | +**created_at** | **datetime** | ISO timestamp of subscription creation. | +**updated_at** | **datetime** | ISO timestamp of last subscription update. | + +## Example + +```python +from corellium.models.domain_list_item_subscription import DomainListItemSubscription + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemSubscription from a JSON string +domain_list_item_subscription_instance = DomainListItemSubscription.from_json(json) +# print the JSON string representation of the object +print(DomainListItemSubscription.to_json()) + +# convert the object into a dict +domain_list_item_subscription_dict = domain_list_item_subscription_instance.to_dict() +# create an instance of DomainListItemSubscription from a dict +domain_list_item_subscription_from_dict = DomainListItemSubscription.from_dict(domain_list_item_subscription_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemSubscriptionHistoryInner.md b/docs/DomainListItemSubscriptionHistoryInner.md new file mode 100644 index 0000000..e313263 --- /dev/null +++ b/docs/DomainListItemSubscriptionHistoryInner.md @@ -0,0 +1,34 @@ +# DomainListItemSubscriptionHistoryInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_name** | **str** | Name of the subscription plan. | +**plan_start** | **datetime** | Plan start date. | +**plan_end** | **datetime** | Plan end date (null if still active). | +**status** | **str** | Display status (e.g. Active, Ended, Past Due). | +**administrator** | [**DomainListItemSubscriptionHistoryInnerAdministrator**](DomainListItemSubscriptionHistoryInnerAdministrator.md) | | +**stripe_link** | **str** | Link to Stripe subscription. | + +## Example + +```python +from corellium.models.domain_list_item_subscription_history_inner import DomainListItemSubscriptionHistoryInner + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemSubscriptionHistoryInner from a JSON string +domain_list_item_subscription_history_inner_instance = DomainListItemSubscriptionHistoryInner.from_json(json) +# print the JSON string representation of the object +print(DomainListItemSubscriptionHistoryInner.to_json()) + +# convert the object into a dict +domain_list_item_subscription_history_inner_dict = domain_list_item_subscription_history_inner_instance.to_dict() +# create an instance of DomainListItemSubscriptionHistoryInner from a dict +domain_list_item_subscription_history_inner_from_dict = DomainListItemSubscriptionHistoryInner.from_dict(domain_list_item_subscription_history_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemSubscriptionHistoryInnerAdministrator.md b/docs/DomainListItemSubscriptionHistoryInnerAdministrator.md new file mode 100644 index 0000000..8d2138e --- /dev/null +++ b/docs/DomainListItemSubscriptionHistoryInnerAdministrator.md @@ -0,0 +1,31 @@ +# DomainListItemSubscriptionHistoryInnerAdministrator + +Administrator who manages this subscription. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Administrator name. | +**email** | **str** | Administrator email. | + +## Example + +```python +from corellium.models.domain_list_item_subscription_history_inner_administrator import DomainListItemSubscriptionHistoryInnerAdministrator + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemSubscriptionHistoryInnerAdministrator from a JSON string +domain_list_item_subscription_history_inner_administrator_instance = DomainListItemSubscriptionHistoryInnerAdministrator.from_json(json) +# print the JSON string representation of the object +print(DomainListItemSubscriptionHistoryInnerAdministrator.to_json()) + +# convert the object into a dict +domain_list_item_subscription_history_inner_administrator_dict = domain_list_item_subscription_history_inner_administrator_instance.to_dict() +# create an instance of DomainListItemSubscriptionHistoryInnerAdministrator from a dict +domain_list_item_subscription_history_inner_administrator_from_dict = DomainListItemSubscriptionHistoryInnerAdministrator.from_dict(domain_list_item_subscription_history_inner_administrator_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemUsage.md b/docs/DomainListItemUsage.md new file mode 100644 index 0000000..cb68d4e --- /dev/null +++ b/docs/DomainListItemUsage.md @@ -0,0 +1,36 @@ +# DomainListItemUsage + +Domain usage totals. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_instances** | **float** | Number of active instances. | +**image_bytes** | **float** | Image storage used in bytes. | +**cores** | **float** | Cores in use. | +**instances** | **float** | Total instances. | +**ram** | **float** | RAM in use in MiB. | +**gpu** | **float** | GPUs in use. | +**reserved_cores** | **float** | Reserved cores. | [optional] + +## Example + +```python +from corellium.models.domain_list_item_usage import DomainListItemUsage + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemUsage from a JSON string +domain_list_item_usage_instance = DomainListItemUsage.from_json(json) +# print the JSON string representation of the object +print(DomainListItemUsage.to_json()) + +# convert the object into a dict +domain_list_item_usage_dict = domain_list_item_usage_instance.to_dict() +# create an instance of DomainListItemUsage from a dict +domain_list_item_usage_from_dict = DomainListItemUsage.from_dict(domain_list_item_usage_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListItemUsersInfoInner.md b/docs/DomainListItemUsersInfoInner.md new file mode 100644 index 0000000..fae3620 --- /dev/null +++ b/docs/DomainListItemUsersInfoInner.md @@ -0,0 +1,36 @@ +# DomainListItemUsersInfoInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | User identifier. | +**label** | **str** | User label. | +**name** | **str** | Username. | +**email** | **str** | User email. | +**administrator** | **bool** | Whether the user is a domain administrator. | +**cluster_administrator** | **bool** | Whether the user is a cluster administrator. | +**last_login** | **datetime** | ISO timestamp of last login. | +**teams** | **float** | Number of teams the user belongs to. | + +## Example + +```python +from corellium.models.domain_list_item_users_info_inner import DomainListItemUsersInfoInner + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListItemUsersInfoInner from a JSON string +domain_list_item_users_info_inner_instance = DomainListItemUsersInfoInner.from_json(json) +# print the JSON string representation of the object +print(DomainListItemUsersInfoInner.to_json()) + +# convert the object into a dict +domain_list_item_users_info_inner_dict = domain_list_item_users_info_inner_instance.to_dict() +# create an instance of DomainListItemUsersInfoInner from a dict +domain_list_item_users_info_inner_from_dict = DomainListItemUsersInfoInner.from_dict(domain_list_item_users_info_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainListUsage.md b/docs/DomainListUsage.md new file mode 100644 index 0000000..39ddf36 --- /dev/null +++ b/docs/DomainListUsage.md @@ -0,0 +1,36 @@ +# DomainListUsage + +Aggregate usage across all domains. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active_instances** | **float** | Number of active instances. | +**image_bytes** | **float** | Image storage used in bytes. | +**cores** | **float** | Cores in use. | +**instances** | **float** | Total instances. | +**ram** | **float** | RAM in use in MiB. | +**gpu** | **float** | GPUs in use. | +**reserved_cores** | **float** | Reserved cores. | [optional] + +## Example + +```python +from corellium.models.domain_list_usage import DomainListUsage + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainListUsage from a JSON string +domain_list_usage_instance = DomainListUsage.from_json(json) +# print the JSON string representation of the object +print(DomainListUsage.to_json()) + +# convert the object into a dict +domain_list_usage_dict = domain_list_usage_instance.to_dict() +# create an instance of DomainListUsage from a dict +domain_list_usage_from_dict = DomainListUsage.from_dict(domain_list_usage_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainOptions.md b/docs/DomainOptions.md index 224ecf7..c815fd5 100644 --- a/docs/DomainOptions.md +++ b/docs/DomainOptions.md @@ -3,12 +3,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totp_required** | **bool** | if true, totp is required | [optional] -**trial_extension** | [**TrialExtension**](TrialExtension.md) | | [optional] +**trial_extension** | [**TrialExtensionV1**](TrialExtensionV1.md) | | [optional] **snapshot_sharing_permissions** | [**SnapshotSharingPermissions**](SnapshotSharingPermissions.md) | | [optional] +## Example + +```python +from corellium.models.domain_options import DomainOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainOptions from a JSON string +domain_options_instance = DomainOptions.from_json(json) +# print the JSON string representation of the object +print(DomainOptions.to_json()) + +# convert the object into a dict +domain_options_dict = domain_options_instance.to_dict() +# create an instance of DomainOptions from a dict +domain_options_from_dict = DomainOptions.from_dict(domain_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DomainSoftware.md b/docs/DomainSoftware.md new file mode 100644 index 0000000..90326a4 --- /dev/null +++ b/docs/DomainSoftware.md @@ -0,0 +1,41 @@ +# DomainSoftware + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_id** | **str** | Identifier of the uploaded image. Pass to `deleteImage` to remove the upload. | +**flavor** | **str** | Flavor the firmware applies to. | +**description** | **str** | Human-readable device name. | +**model** | **str** | Device product identifier. | +**platform** | **str** | Device platform, when known. | +**has_product_image** | **bool** | Whether a product image is available for this flavor. | +**os_version** | **str** | OS version. | +**os_build** | **str** | OS build. | +**filename** | **str** | Uploaded filename. | +**size** | **float** | Firmware size in bytes. | +**release_date** | **datetime** | Release date. | +**upload_date** | **datetime** | Date the firmware was uploaded. | +**download_url** | **str** | Signed link the firmware can be downloaded from. | + +## Example + +```python +from corellium.models.domain_software import DomainSoftware + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainSoftware from a JSON string +domain_software_instance = DomainSoftware.from_json(json) +# print the JSON string representation of the object +print(DomainSoftware.to_json()) + +# convert the object into a dict +domain_software_dict = domain_software_instance.to_dict() +# create an instance of DomainSoftware from a dict +domain_software_from_dict = DomainSoftware.from_dict(domain_software_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainSoftwareList.md b/docs/DomainSoftwareList.md new file mode 100644 index 0000000..b44106e --- /dev/null +++ b/docs/DomainSoftwareList.md @@ -0,0 +1,34 @@ +# DomainSoftwareList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[DomainSoftware]**](DomainSoftware.md) | Domain-level firmware images: uploads not scoped to a project or instance. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.domain_software_list import DomainSoftwareList + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainSoftwareList from a JSON string +domain_software_list_instance = DomainSoftwareList.from_json(json) +# print the JSON string representation of the object +print(DomainSoftwareList.to_json()) + +# convert the object into a dict +domain_software_list_dict = domain_software_list_instance.to_dict() +# create an instance of DomainSoftwareList from a dict +domain_software_list_from_dict = DomainSoftwareList.from_dict(domain_software_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainV1Api.md b/docs/DomainV1Api.md new file mode 100644 index 0000000..97486ae --- /dev/null +++ b/docs/DomainV1Api.md @@ -0,0 +1,335 @@ +# corellium.DomainV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_create_domain_welcome_message**](DomainV1Api.md#v1_create_domain_welcome_message) | **POST** /v1/domain/welcome | Create a welcome message for a domain +[**v1_delete_domain_welcome_message**](DomainV1Api.md#v1_delete_domain_welcome_message) | **DELETE** /v1/domain/welcome | Delete the welcome message for the authenticated user's domain +[**v1_get_domain_welcome_message**](DomainV1Api.md#v1_get_domain_welcome_message) | **GET** /v1/domain/welcome | Get the welcome message for the authenticated user's domain +[**v1_update_domain_welcome_message**](DomainV1Api.md#v1_update_domain_welcome_message) | **PATCH** /v1/domain/welcome | Update a welcome message for a domain + + +# **v1_create_domain_welcome_message** +> DomainWelcomeMessageResponseV1 v1_create_domain_welcome_message(create_domain_welcome_message_body) + +Create a welcome message for a domain + +Creates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_domain_welcome_message_body import CreateDomainWelcomeMessageBody +from corellium.models.domain_welcome_message_response_v1 import DomainWelcomeMessageResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainV1Api(api_client) + create_domain_welcome_message_body = corellium.CreateDomainWelcomeMessageBody() # CreateDomainWelcomeMessageBody | application/json + + try: + # Create a welcome message for a domain + api_response = api_instance.v1_create_domain_welcome_message(create_domain_welcome_message_body) + print("The response of DomainV1Api->v1_create_domain_welcome_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainV1Api->v1_create_domain_welcome_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_domain_welcome_message_body** | [**CreateDomainWelcomeMessageBody**](CreateDomainWelcomeMessageBody.md)| application/json | + +### Return type + +[**DomainWelcomeMessageResponseV1**](DomainWelcomeMessageResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_domain_welcome_message** +> v1_delete_domain_welcome_message() + +Delete the welcome message for the authenticated user's domain + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainV1Api(api_client) + + try: + # Delete the welcome message for the authenticated user's domain + api_instance.v1_delete_domain_welcome_message() + except Exception as e: + print("Exception when calling DomainV1Api->v1_delete_domain_welcome_message: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**401** | Unauthorized | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_domain_welcome_message** +> DomainWelcomeMessageResponseV1 v1_get_domain_welcome_message() + +Get the welcome message for the authenticated user's domain + +Retrieves the welcome message for the domain. + +### Example + + +```python +import corellium +from corellium.models.domain_welcome_message_response_v1 import DomainWelcomeMessageResponseV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainV1Api(api_client) + + try: + # Get the welcome message for the authenticated user's domain + api_response = api_instance.v1_get_domain_welcome_message() + print("The response of DomainV1Api->v1_get_domain_welcome_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainV1Api->v1_get_domain_welcome_message: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**DomainWelcomeMessageResponseV1**](DomainWelcomeMessageResponseV1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_domain_welcome_message** +> DomainWelcomeMessageResponseV1 v1_update_domain_welcome_message(update_domain_welcome_message_request) + +Update a welcome message for a domain + +Updates a new welcome message for the authenticated user's domain admin, or updates the existing one. The message is sanitized to prevent XSS. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.domain_welcome_message_response_v1 import DomainWelcomeMessageResponseV1 +from corellium.models.update_domain_welcome_message_request import UpdateDomainWelcomeMessageRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.DomainV1Api(api_client) + update_domain_welcome_message_request = corellium.UpdateDomainWelcomeMessageRequest() # UpdateDomainWelcomeMessageRequest | application/json + + try: + # Update a welcome message for a domain + api_response = api_instance.v1_update_domain_welcome_message(update_domain_welcome_message_request) + print("The response of DomainV1Api->v1_update_domain_welcome_message:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DomainV1Api->v1_update_domain_welcome_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_domain_welcome_message_request** | [**UpdateDomainWelcomeMessageRequest**](UpdateDomainWelcomeMessageRequest.md)| application/json | + +### Return type + +[**DomainWelcomeMessageResponseV1**](DomainWelcomeMessageResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Validation Error | - | +**401** | Unauthorized | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DomainWelcomeMessageResponse.md b/docs/DomainWelcomeMessageResponse.md new file mode 100644 index 0000000..e6eb16c --- /dev/null +++ b/docs/DomainWelcomeMessageResponse.md @@ -0,0 +1,34 @@ +# DomainWelcomeMessageResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Unique identifier for the welcome message. | +**domain** | **str** | Domain identifier. | +**message** | **str** | Sanitized welcome message text. | +**enabled** | **bool** | Whether the welcome message is shown to users. | +**created_at** | **datetime** | Creation timestamp (ISO 8601). | +**updated_at** | **datetime** | Last update timestamp (ISO 8601). | + +## Example + +```python +from corellium.models.domain_welcome_message_response import DomainWelcomeMessageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainWelcomeMessageResponse from a JSON string +domain_welcome_message_response_instance = DomainWelcomeMessageResponse.from_json(json) +# print the JSON string representation of the object +print(DomainWelcomeMessageResponse.to_json()) + +# convert the object into a dict +domain_welcome_message_response_dict = domain_welcome_message_response_instance.to_dict() +# create an instance of DomainWelcomeMessageResponse from a dict +domain_welcome_message_response_from_dict = DomainWelcomeMessageResponse.from_dict(domain_welcome_message_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainWelcomeMessageResponseV1.md b/docs/DomainWelcomeMessageResponseV1.md new file mode 100644 index 0000000..2fa9f8f --- /dev/null +++ b/docs/DomainWelcomeMessageResponseV1.md @@ -0,0 +1,34 @@ +# DomainWelcomeMessageResponseV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Unique identifier for the welcome message (UUID) | +**domain** | **str** | Domain identifier (UUID) | +**message** | **str** | Sanitized welcome message text | +**created_at** | **str** | Creation timestamp (ISO 8601) | +**updated_at** | **str** | Last update timestamp (ISO 8601) | + +## Example + +```python +from corellium.models.domain_welcome_message_response_v1 import DomainWelcomeMessageResponseV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainWelcomeMessageResponseV1 from a JSON string +domain_welcome_message_response_v1_instance = DomainWelcomeMessageResponseV1.from_json(json) +# print the JSON string representation of the object +print(DomainWelcomeMessageResponseV1.to_json()) + +# convert the object into a dict +domain_welcome_message_response_v1_dict = domain_welcome_message_response_v1_instance.to_dict() +# create an instance of DomainWelcomeMessageResponseV1 from a dict +domain_welcome_message_response_v1_from_dict = DomainWelcomeMessageResponseV1.from_dict(domain_welcome_message_response_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditInvitesBody.md b/docs/EditInvitesBody.md new file mode 100644 index 0000000..edac0ac --- /dev/null +++ b/docs/EditInvitesBody.md @@ -0,0 +1,30 @@ +# EditInvitesBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **List[str]** | Invite IDs to operate on. | +**changes** | [**EditInvitesBodyChanges**](EditInvitesBodyChanges.md) | | + +## Example + +```python +from corellium.models.edit_invites_body import EditInvitesBody + +# TODO update the JSON string below +json = "{}" +# create an instance of EditInvitesBody from a JSON string +edit_invites_body_instance = EditInvitesBody.from_json(json) +# print the JSON string representation of the object +print(EditInvitesBody.to_json()) + +# convert the object into a dict +edit_invites_body_dict = edit_invites_body_instance.to_dict() +# create an instance of EditInvitesBody from a dict +edit_invites_body_from_dict = EditInvitesBody.from_dict(edit_invites_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditInvitesBodyChanges.md b/docs/EditInvitesBodyChanges.md new file mode 100644 index 0000000..537cd60 --- /dev/null +++ b/docs/EditInvitesBodyChanges.md @@ -0,0 +1,30 @@ +# EditInvitesBodyChanges + +Changes to apply to the invites. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**settings** | [**InviteSettings**](InviteSettings.md) | | [optional] + +## Example + +```python +from corellium.models.edit_invites_body_changes import EditInvitesBodyChanges + +# TODO update the JSON string below +json = "{}" +# create an instance of EditInvitesBodyChanges from a JSON string +edit_invites_body_changes_instance = EditInvitesBodyChanges.from_json(json) +# print the JSON string representation of the object +print(EditInvitesBodyChanges.to_json()) + +# convert the object into a dict +edit_invites_body_changes_dict = edit_invites_body_changes_instance.to_dict() +# create an instance of EditInvitesBodyChanges from a dict +edit_invites_body_changes_from_dict = EditInvitesBodyChanges.from_dict(edit_invites_body_changes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnableBtraceBody.md b/docs/EnableBtraceBody.md new file mode 100644 index 0000000..010a5b8 --- /dev/null +++ b/docs/EnableBtraceBody.md @@ -0,0 +1,29 @@ +# EnableBtraceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ranges** | **List[List[str]]** | Kernel address ranges to trace, each a `[start, end]` pair of hexadecimal addresses. To trace one kernel extension, use its `range` from `v3GetInstanceKcrange`. | [optional] + +## Example + +```python +from corellium.models.enable_btrace_body import EnableBtraceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of EnableBtraceBody from a JSON string +enable_btrace_body_instance = EnableBtraceBody.from_json(json) +# print the JSON string representation of the object +print(EnableBtraceBody.to_json()) + +# convert the object into a dict +enable_btrace_body_dict = enable_btrace_body_instance.to_dict() +# create an instance of EnableBtraceBody from a dict +enable_btrace_body_from_dict = EnableBtraceBody.from_dict(enable_btrace_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnableNetdumpBody.md b/docs/EnableNetdumpBody.md new file mode 100644 index 0000000..96a73ea --- /dev/null +++ b/docs/EnableNetdumpBody.md @@ -0,0 +1,35 @@ +# EnableNetdumpBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**port_ranges** | **List[str]** | Optional. Capture only traffic on ports in these ranges, each written `low-high`. | [optional] +**src_ports** | **List[str]** | Source ports to capture. | [optional] +**dst_ports** | **List[str]** | Destination ports to capture. | [optional] +**ports** | **List[str]** | Ports to capture. | [optional] +**protocols** | **List[str]** | Protocols to capture. | [optional] +**processes** | **List[str]** | Optional. Capture only traffic sent or received by processes with these names. | [optional] +**hosts** | **List[str]** | Host IP addresses to capture. | [optional] + +## Example + +```python +from corellium.models.enable_netdump_body import EnableNetdumpBody + +# TODO update the JSON string below +json = "{}" +# create an instance of EnableNetdumpBody from a JSON string +enable_netdump_body_instance = EnableNetdumpBody.from_json(json) +# print the JSON string representation of the object +print(EnableNetdumpBody.to_json()) + +# convert the object into a dict +enable_netdump_body_dict = enable_netdump_body_instance.to_dict() +# create an instance of EnableNetdumpBody from a dict +enable_netdump_body_from_dict = EnableNetdumpBody.from_dict(enable_netdump_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnableSslsplitBody.md b/docs/EnableSslsplitBody.md new file mode 100644 index 0000000..482fcaa --- /dev/null +++ b/docs/EnableSslsplitBody.md @@ -0,0 +1,29 @@ +# EnableSslsplitBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**truncate_pcap** | **bool** | Whether to truncate the Network Monitor capture file. | [optional] + +## Example + +```python +from corellium.models.enable_sslsplit_body import EnableSslsplitBody + +# TODO update the JSON string below +json = "{}" +# create an instance of EnableSslsplitBody from a JSON string +enable_sslsplit_body_instance = EnableSslsplitBody.from_json(json) +# print the JSON string representation of the object +print(EnableSslsplitBody.to_json()) + +# convert the object into a dict +enable_sslsplit_body_dict = enable_sslsplit_body_instance.to_dict() +# create an instance of EnableSslsplitBody from a dict +enable_sslsplit_body_from_dict = EnableSslsplitBody.from_dict(enable_sslsplit_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnsureDomainSettingsBody.md b/docs/EnsureDomainSettingsBody.md new file mode 100644 index 0000000..30f75bd --- /dev/null +++ b/docs/EnsureDomainSettingsBody.md @@ -0,0 +1,35 @@ +# EnsureDomainSettingsBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fqdn** | **str** | Fully qualified domain name. | [optional] +**name** | **str** | Domain name. | [optional] +**cores** | **float** | Core quota. | [optional] +**password** | **str** | Admin user password. | [optional] +**password_if_empty** | **str** | Admin password (only applied if no password is currently set). | [optional] +**config** | [**DomainConfigInput**](DomainConfigInput.md) | | [optional] +**admin_user** | [**EnsureDomainSettingsBodyAdminUser**](EnsureDomainSettingsBodyAdminUser.md) | | [optional] + +## Example + +```python +from corellium.models.ensure_domain_settings_body import EnsureDomainSettingsBody + +# TODO update the JSON string below +json = "{}" +# create an instance of EnsureDomainSettingsBody from a JSON string +ensure_domain_settings_body_instance = EnsureDomainSettingsBody.from_json(json) +# print the JSON string representation of the object +print(EnsureDomainSettingsBody.to_json()) + +# convert the object into a dict +ensure_domain_settings_body_dict = ensure_domain_settings_body_instance.to_dict() +# create an instance of EnsureDomainSettingsBody from a dict +ensure_domain_settings_body_from_dict = EnsureDomainSettingsBody.from_dict(ensure_domain_settings_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnsureDomainSettingsBodyAdminUser.md b/docs/EnsureDomainSettingsBodyAdminUser.md new file mode 100644 index 0000000..7417f44 --- /dev/null +++ b/docs/EnsureDomainSettingsBodyAdminUser.md @@ -0,0 +1,33 @@ +# EnsureDomainSettingsBodyAdminUser + +Admin user info. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | Admin username. | [optional] +**email** | **str** | Admin email. | [optional] +**label** | **str** | Admin display label. | [optional] +**billing_url** | **str** | Billing portal URL. | [optional] + +## Example + +```python +from corellium.models.ensure_domain_settings_body_admin_user import EnsureDomainSettingsBodyAdminUser + +# TODO update the JSON string below +json = "{}" +# create an instance of EnsureDomainSettingsBodyAdminUser from a JSON string +ensure_domain_settings_body_admin_user_instance = EnsureDomainSettingsBodyAdminUser.from_json(json) +# print the JSON string representation of the object +print(EnsureDomainSettingsBodyAdminUser.to_json()) + +# convert the object into a dict +ensure_domain_settings_body_admin_user_dict = ensure_domain_settings_body_admin_user_instance.to_dict() +# create an instance of EnsureDomainSettingsBodyAdminUser from a dict +ensure_domain_settings_body_admin_user_from_dict = EnsureDomainSettingsBodyAdminUser.from_dict(ensure_domain_settings_body_admin_user_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnsureDomainSettingsResponse.md b/docs/EnsureDomainSettingsResponse.md new file mode 100644 index 0000000..00c57e1 --- /dev/null +++ b/docs/EnsureDomainSettingsResponse.md @@ -0,0 +1,31 @@ +# EnsureDomainSettingsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **bool** | Whether the domain was newly created. | +**identifier** | **str** | Domain identifier. | +**user** | [**EnsureDomainSettingsResponseUser**](EnsureDomainSettingsResponseUser.md) | | + +## Example + +```python +from corellium.models.ensure_domain_settings_response import EnsureDomainSettingsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of EnsureDomainSettingsResponse from a JSON string +ensure_domain_settings_response_instance = EnsureDomainSettingsResponse.from_json(json) +# print the JSON string representation of the object +print(EnsureDomainSettingsResponse.to_json()) + +# convert the object into a dict +ensure_domain_settings_response_dict = ensure_domain_settings_response_instance.to_dict() +# create an instance of EnsureDomainSettingsResponse from a dict +ensure_domain_settings_response_from_dict = EnsureDomainSettingsResponse.from_dict(ensure_domain_settings_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnsureDomainSettingsResponseUser.md b/docs/EnsureDomainSettingsResponseUser.md new file mode 100644 index 0000000..a37836b --- /dev/null +++ b/docs/EnsureDomainSettingsResponseUser.md @@ -0,0 +1,31 @@ +# EnsureDomainSettingsResponseUser + +Admin user info. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Admin user identifier. | +**created** | **bool** | Whether the user was newly created. | + +## Example + +```python +from corellium.models.ensure_domain_settings_response_user import EnsureDomainSettingsResponseUser + +# TODO update the JSON string below +json = "{}" +# create an instance of EnsureDomainSettingsResponseUser from a JSON string +ensure_domain_settings_response_user_instance = EnsureDomainSettingsResponseUser.from_json(json) +# print the JSON string representation of the object +print(EnsureDomainSettingsResponseUser.to_json()) + +# convert the object into a dict +ensure_domain_settings_response_user_dict = ensure_domain_settings_response_user_instance.to_dict() +# create an instance of EnsureDomainSettingsResponseUser from a dict +ensure_domain_settings_response_user_from_dict = EnsureDomainSettingsResponseUser.from_dict(ensure_domain_settings_response_user_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtendedFirmwareAssetInfo.md b/docs/ExtendedFirmwareAssetInfo.md index d20d164..ab264da 100644 --- a/docs/ExtendedFirmwareAssetInfo.md +++ b/docs/ExtendedFirmwareAssetInfo.md @@ -1,13 +1,30 @@ # ExtendedFirmwareAssetInfo - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**firmwares** | **list[str]** | Firmware Records from FW Service | -**instances** | **list[str]** | Instances using one of the firmwares, and thus the asset | +**firmwares** | **List[str]** | Firmware filenames using this asset. | +**instances** | **List[str]** | Instance identifiers using one of the firmwares. | + +## Example + +```python +from corellium.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtendedFirmwareAssetInfo from a JSON string +extended_firmware_asset_info_instance = ExtendedFirmwareAssetInfo.from_json(json) +# print the JSON string representation of the object +print(ExtendedFirmwareAssetInfo.to_json()) +# convert the object into a dict +extended_firmware_asset_info_dict = extended_firmware_asset_info_instance.to_dict() +# create an instance of ExtendedFirmwareAssetInfo from a dict +extended_firmware_asset_info_from_dict = ExtendedFirmwareAssetInfo.from_dict(extended_firmware_asset_info_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExtendedFirmwareAssetInfoV1.md b/docs/ExtendedFirmwareAssetInfoV1.md new file mode 100644 index 0000000..c22743d --- /dev/null +++ b/docs/ExtendedFirmwareAssetInfoV1.md @@ -0,0 +1,31 @@ +# ExtendedFirmwareAssetInfoV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firmwares** | **List[str]** | Firmware Records from FW Service | +**instances** | **List[str]** | Instances using one of the firmwares, and thus the asset | + +## Example + +```python +from corellium.models.extended_firmware_asset_info_v1 import ExtendedFirmwareAssetInfoV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtendedFirmwareAssetInfoV1 from a JSON string +extended_firmware_asset_info_v1_instance = ExtendedFirmwareAssetInfoV1.from_json(json) +# print the JSON string representation of the object +print(ExtendedFirmwareAssetInfoV1.to_json()) + +# convert the object into a dict +extended_firmware_asset_info_v1_dict = extended_firmware_asset_info_v1_instance.to_dict() +# create an instance of ExtendedFirmwareAssetInfoV1 from a dict +extended_firmware_asset_info_v1_from_dict = ExtendedFirmwareAssetInfoV1.from_dict(extended_firmware_asset_info_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Extension.md b/docs/Extension.md index 304152c..79de1f9 100644 --- a/docs/Extension.md +++ b/docs/Extension.md @@ -1,18 +1,35 @@ # Extension - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identifier** | **str** | Identifier | [optional] -**enabled** | **bool** | If true, instances requiring this extension can be created or started | [optional] -**created_at** | **str** | Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | [optional] -**updated_at** | **str** | Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | [optional] -**image_id** | **str** | Image Id | [optional] -**state** | **str** | State | [optional] -**flavors** | **list[object]** | Array of Flavor definitions | [optional] +**id** | **str** | Extension identifier. | +**enabled** | **bool** | If true, instances requiring this extension can be created or started. | +**created_at** | **datetime** | Created date (ISO-8601). | +**updated_at** | **datetime** | Updated date (ISO-8601). | +**image_id** | **str** | Image ID. | +**state** | **str** | State. | +**flavors** | [**List[ExtensionFlavor]**](ExtensionFlavor.md) | Array of flavor definitions. | + +## Example + +```python +from corellium.models.extension import Extension + +# TODO update the JSON string below +json = "{}" +# create an instance of Extension from a JSON string +extension_instance = Extension.from_json(json) +# print the JSON string representation of the object +print(Extension.to_json()) +# convert the object into a dict +extension_dict = extension_instance.to_dict() +# create an instance of Extension from a dict +extension_from_dict = Extension.from_dict(extension_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExtensionFlavor.md b/docs/ExtensionFlavor.md new file mode 100644 index 0000000..7b2f5ed --- /dev/null +++ b/docs/ExtensionFlavor.md @@ -0,0 +1,37 @@ +# ExtensionFlavor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Device type. | [optional] +**flavor** | **str** | Human-readable flavor name. | [optional] +**flavor_id** | **str** | Flavor identifier. | [optional] +**product** | **str** | Product identifier. | [optional] +**cores** | **float** | Number of cores. | [optional] +**ram** | **float** | RAM in MiB. | [optional] +**supports_gdb** | **bool** | Whether GDB is supported. | [optional] +**supports_serial_console** | **bool** | Whether a serial console is supported. | [optional] +**supports_preset_boot_options** | **bool** | Whether preset boot options are supported. | [optional] + +## Example + +```python +from corellium.models.extension_flavor import ExtensionFlavor + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtensionFlavor from a JSON string +extension_flavor_instance = ExtensionFlavor.from_json(json) +# print the JSON string representation of the object +print(ExtensionFlavor.to_json()) + +# convert the object into a dict +extension_flavor_dict = extension_flavor_instance.to_dict() +# create an instance of ExtensionFlavor from a dict +extension_flavor_from_dict = ExtensionFlavor.from_dict(extension_flavor_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtensionList.md b/docs/ExtensionList.md new file mode 100644 index 0000000..fbb1d0f --- /dev/null +++ b/docs/ExtensionList.md @@ -0,0 +1,34 @@ +# ExtensionList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Extension]**](Extension.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.extension_list import ExtensionList + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtensionList from a JSON string +extension_list_instance = ExtensionList.from_json(json) +# print the JSON string representation of the object +print(ExtensionList.to_json()) + +# convert the object into a dict +extension_list_dict = extension_list_instance.to_dict() +# create an instance of ExtensionList from a dict +extension_list_from_dict = ExtensionList.from_dict(extension_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtensionV1.md b/docs/ExtensionV1.md new file mode 100644 index 0000000..f25ca61 --- /dev/null +++ b/docs/ExtensionV1.md @@ -0,0 +1,36 @@ +# ExtensionV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Identifier | [optional] +**enabled** | **bool** | If true, instances requiring this extension can be created or started | [optional] +**created_at** | **str** | Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | [optional] +**updated_at** | **str** | Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | [optional] +**image_id** | **str** | Image Id | [optional] +**state** | **str** | State | [optional] +**flavors** | **List[object]** | Array of Flavor definitions | [optional] + +## Example + +```python +from corellium.models.extension_v1 import ExtensionV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtensionV1 from a JSON string +extension_v1_instance = ExtensionV1.from_json(json) +# print the JSON string representation of the object +print(ExtensionV1.to_json()) + +# convert the object into a dict +extension_v1_dict = extension_v1_instance.to_dict() +# create an instance of ExtensionV1 from a dict +extension_v1_from_dict = ExtensionV1.from_dict(extension_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExtensionsApi.md b/docs/ExtensionsApi.md new file mode 100644 index 0000000..b73dffb --- /dev/null +++ b/docs/ExtensionsApi.md @@ -0,0 +1,557 @@ +# corellium.ExtensionsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_delete_extension**](ExtensionsApi.md#v3_delete_extension) | **DELETE** /v3/extensions/{extensionId} | Delete an existing extension +[**v3_get_extension_by_id**](ExtensionsApi.md#v3_get_extension_by_id) | **GET** /v3/extensions/{extensionId} | Get extension by ID +[**v3_list_extensions**](ExtensionsApi.md#v3_list_extensions) | **GET** /v3/extensions | List all extensions +[**v3_load_extension**](ExtensionsApi.md#v3_load_extension) | **POST** /v3/extensions | Load an extension +[**v3_parse_extension_json**](ExtensionsApi.md#v3_parse_extension_json) | **POST** /v3/extensions/parse/extension.json | Validates extension.json +[**v3_update_extension**](ExtensionsApi.md#v3_update_extension) | **PUT** /v3/extensions/{extensionId} | Update an existing extension + + +# **v3_delete_extension** +> v3_delete_extension(extension_id) + +Delete an existing extension + +**Required role:** Domain administrator. + +Deletes the extension identified by the given extension ID. +Available on on-site deployments only. Deletion is asynchronous: the extension is marked `deleting` and the +call returns 204 before removal completes. + +Deletes are idempotent: an unknown extension ID, or an extension that was already deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. +A repeat therefore returns 204 both while the record is still present in the `deleting` state and after it +has disappeared. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsApi(api_client) + extension_id = 'rpi4b' # str | Extension ID. + + try: + # Delete an existing extension + api_instance.v3_delete_extension(extension_id) + except Exception as e: + print("Exception when calling ExtensionsApi->v3_delete_extension: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **extension_id** | **str**| Extension ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_extension_by_id** +> Extension v3_get_extension_by_id(extension_id) + +Get extension by ID + +**Required role:** Domain administrator. + +Returns one installed extension, including whether it is enabled and the device models (flavors) it adds. Requires a domain administrator. Available on on-site deployments only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extension import Extension +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsApi(api_client) + extension_id = 'rpi4b' # str | Extension ID. + + try: + # Get extension by ID + api_response = api_instance.v3_get_extension_by_id(extension_id) + print("The response of ExtensionsApi->v3_get_extension_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsApi->v3_get_extension_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **extension_id** | **str**| Extension ID. | + +### Return type + +[**Extension**](Extension.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Extension. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No extension with the given extension ID. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_extensions** +> ExtensionList v3_list_extensions(limit=limit, offset=offset, if_none_match=if_none_match) + +List all extensions + +**Required role:** Domain administrator. + +Lists the extensions installed on this deployment. An extension adds new device models (for example an IoT board such as a Raspberry Pi 4) that you can then create devices from; each one is defined by an `extension.json` file listing its models, CPU cores, memory and boot options. Requires a domain administrator. Available on on-site deployments only. The response carries an ETag; send it back as `If-None-Match` to get 304 when nothing changed. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extension_list import ExtensionList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + if_none_match = '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08' # str | SHA-256 sum of the last response with the same parameters. (optional) + + try: + # List all extensions + api_response = api_instance.v3_list_extensions(limit=limit, offset=offset, if_none_match=if_none_match) + print("The response of ExtensionsApi->v3_list_extensions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsApi->v3_list_extensions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **if_none_match** | **str**| SHA-256 sum of the last response with the same parameters. | [optional] + +### Return type + +[**ExtensionList**](ExtensionList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of extensions. | - | +**304** | Not modified. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_load_extension** +> Extension v3_load_extension(load_extension_body) + +Load an extension + +**Required role:** Domain administrator. + +Installs an extension so its device models become available. **Steps:** (1) optionally check your `extension.json` with `v3ParseExtensionJson`; (2) upload the extension file with `POST /v3/images` using `type: "extension"`; (3) call this with the returned `imageId`. The definition is read from the uploaded file, so only the image ID is sent. The new models then appear in `GET /v3/models`. Requires a domain administrator. Available on on-site deployments only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extension import Extension +from corellium.models.load_extension_body import LoadExtensionBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsApi(api_client) + load_extension_body = corellium.LoadExtensionBody() # LoadExtensionBody | + + try: + # Load an extension + api_response = api_instance.v3_load_extension(load_extension_body) + print("The response of ExtensionsApi->v3_load_extension:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsApi->v3_load_extension: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **load_extension_body** | [**LoadExtensionBody**](LoadExtensionBody.md)| | + +### Return type + +[**Extension**](Extension.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Extension. | - | +**400** | Invalid extension or image. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_parse_extension_json** +> Dict[str, Optional[object]] v3_parse_extension_json(request_body) + +Validates extension.json + +**Required role:** Domain administrator. + +Checks an `extension.json` document before you upload it, and returns the normalised definition the platform would use (with defaults filled in). Returns 400 with the problem if the document is invalid. Nothing is installed. Requires a domain administrator. Available on on-site deployments only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsApi(api_client) + request_body = None # Dict[str, Optional[object]] | Contents of the extension.json file. + + try: + # Validates extension.json + api_response = api_instance.v3_parse_extension_json(request_body) + print("The response of ExtensionsApi->v3_parse_extension_json:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsApi->v3_parse_extension_json: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_body** | [**Dict[str, Optional[object]]**](object.md)| Contents of the extension.json file. | + +### Return type + +**Dict[str, Optional[object]]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid extension.json. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_update_extension** +> Extension v3_update_extension(extension_id, update_extension_body) + +Update an existing extension + +**Required role:** Domain administrator. + +Turns an installed extension on or off with `enabled`. While it is off, devices that use its models cannot be created or started. Requires a domain administrator. Available on on-site deployments only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extension import Extension +from corellium.models.update_extension_body import UpdateExtensionBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsApi(api_client) + extension_id = 'rpi4b' # str | Extension ID. + update_extension_body = corellium.UpdateExtensionBody() # UpdateExtensionBody | + + try: + # Update an existing extension + api_response = api_instance.v3_update_extension(extension_id, update_extension_body) + print("The response of ExtensionsApi->v3_update_extension:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsApi->v3_update_extension: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **extension_id** | **str**| Extension ID. | + **update_extension_body** | [**UpdateExtensionBody**](UpdateExtensionBody.md)| | + +### Return type + +[**Extension**](Extension.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated extension. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No extension with the given extension ID. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ExtensionsV1Api.md b/docs/ExtensionsV1Api.md new file mode 100644 index 0000000..3d5b3e9 --- /dev/null +++ b/docs/ExtensionsV1Api.md @@ -0,0 +1,532 @@ +# corellium.ExtensionsV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_delete_extension**](ExtensionsV1Api.md#v1_delete_extension) | **DELETE** /v1/extensions/{extensionId} | Delete an existing extension +[**v1_get_extension_by_id**](ExtensionsV1Api.md#v1_get_extension_by_id) | **GET** /v1/extensions/{extensionId} | Get extension by id +[**v1_get_extensions**](ExtensionsV1Api.md#v1_get_extensions) | **GET** /v1/extensions | Get all extensions +[**v1_load_extension**](ExtensionsV1Api.md#v1_load_extension) | **POST** /v1/extensions | Load an extension +[**v1_parse_extension_json**](ExtensionsV1Api.md#v1_parse_extension_json) | **POST** /v1/extensions/parse/extension.json | Validates extension.json +[**v1_update_extension**](ExtensionsV1Api.md#v1_update_extension) | **PUT** /v1/extensions/{extensionId} | Update an existing extension + + +# **v1_delete_extension** +> v1_delete_extension(extension_id) + +Delete an existing extension + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsV1Api(api_client) + extension_id = 'extension_id_example' # str | Extension ID + + try: + # Delete an existing extension + api_instance.v1_delete_extension(extension_id) + except Exception as e: + print("Exception when calling ExtensionsV1Api->v1_delete_extension: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **extension_id** | **str**| Extension ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_extension_by_id** +> ExtensionV1 v1_get_extension_by_id(extension_id) + +Get extension by id + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extension_v1 import ExtensionV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsV1Api(api_client) + extension_id = 'extension_id_example' # str | Extension Id + + try: + # Get extension by id + api_response = api_instance.v1_get_extension_by_id(extension_id) + print("The response of ExtensionsV1Api->v1_get_extension_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsV1Api->v1_get_extension_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **extension_id** | **str**| Extension Id | + +### Return type + +[**ExtensionV1**](ExtensionV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Extension | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_extensions** +> List[ExtensionV1] v1_get_extensions(limit=limit, offset=offset, if_none_match=if_none_match) + +Get all extensions + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extension_v1 import ExtensionV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsV1Api(api_client) + limit = 3.4 # float | limit for pagination results, defaults to 20 (optional) + offset = 3.4 # float | offset for pagination results, defaults to 0 (optional) + if_none_match = 'if_none_match_example' # str | sha256sum of the last response with the same parameters (optional) (optional) + + try: + # Get all extensions + api_response = api_instance.v1_get_extensions(limit=limit, offset=offset, if_none_match=if_none_match) + print("The response of ExtensionsV1Api->v1_get_extensions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsV1Api->v1_get_extensions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| limit for pagination results, defaults to 20 | [optional] + **offset** | **float**| offset for pagination results, defaults to 0 | [optional] + **if_none_match** | **str**| sha256sum of the last response with the same parameters (optional) | [optional] + +### Return type + +[**List[ExtensionV1]**](ExtensionV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Extensions | - | +**304** | No changes | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_load_extension** +> ExtensionV1 v1_load_extension(v1_load_extension_parameters) + +Load an extension + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extension_v1 import ExtensionV1 +from corellium.models.v1_load_extension_parameters import V1LoadExtensionParameters +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsV1Api(api_client) + v1_load_extension_parameters = corellium.V1LoadExtensionParameters() # V1LoadExtensionParameters | application/json + + try: + # Load an extension + api_response = api_instance.v1_load_extension(v1_load_extension_parameters) + print("The response of ExtensionsV1Api->v1_load_extension:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsV1Api->v1_load_extension: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **v1_load_extension_parameters** | [**V1LoadExtensionParameters**](V1LoadExtensionParameters.md)| application/json | + +### Return type + +[**ExtensionV1**](ExtensionV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Extension | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_parse_extension_json** +> object v1_parse_extension_json(extension_v1) + +Validates extension.json + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extension_v1 import ExtensionV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsV1Api(api_client) + extension_v1 = { + "parserVersion": 1, + "version": "1.0.0", + "identifier": "mach-rpi4b", + "definitions": [{ + "type": "iot", + "flavor": "Raspberry Pi 4", + "flavorId": "rpi4b", + "cores": 4, + "bootargs": [], + "volume": { + "allocate": 1 + }, + "ram": 4096, + "supportsGDB": true, + "supportsSerialConsole": true, + "supportsPresetBootOptions": true + }] +} # ExtensionV1 | extension.json contents + + try: + # Validates extension.json + api_response = api_instance.v1_parse_extension_json(extension_v1) + print("The response of ExtensionsV1Api->v1_parse_extension_json:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExtensionsV1Api->v1_parse_extension_json: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **extension_v1** | [**ExtensionV1**](ExtensionV1.md)| extension.json contents | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_extension** +> v1_update_extension(extension_id, update_extension) + +Update an existing extension + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.update_extension import UpdateExtension +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExtensionsV1Api(api_client) + extension_id = 'extension_id_example' # str | Extension ID + update_extension = { "enabled": false} # UpdateExtension | application/json + + try: + # Update an existing extension + api_instance.v1_update_extension(extension_id, update_extension) + except Exception as e: + print("Exception when calling ExtensionsV1Api->v1_update_extension: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **extension_id** | **str**| Extension ID | + **update_extension** | [**UpdateExtension**](UpdateExtension.md)| application/json | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ExternalServicesApi.md b/docs/ExternalServicesApi.md new file mode 100644 index 0000000..2744972 --- /dev/null +++ b/docs/ExternalServicesApi.md @@ -0,0 +1,453 @@ +# corellium.ExternalServicesApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_external_service**](ExternalServicesApi.md#delete_external_service) | **DELETE** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a DELETE request to an external service +[**get_external_service**](ExternalServicesApi.md#get_external_service) | **GET** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a GET request to an external service +[**patch_external_service**](ExternalServicesApi.md#patch_external_service) | **PATCH** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a PATCH request to an external service +[**post_external_service**](ExternalServicesApi.md#post_external_service) | **POST** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a POST request to an external service +[**put_external_service**](ExternalServicesApi.md#put_external_service) | **PUT** /{apiVersion}/external-services/{serviceName}/{path} | Proxy a PUT request to an external service + + +# **delete_external_service** +> delete_external_service(api_version, service_name, path) + +Proxy a DELETE request to an external service + +Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExternalServicesApi(api_client) + api_version = 'v1' # str | API version (e.g. v1, v3). + service_name = 'apps' # str | Target service name. + path = 'apps/12345/download' # str | The path to call on the external service. Slashes are kept as path separators. + + try: + # Proxy a DELETE request to an external service + api_instance.delete_external_service(api_version, service_name, path) + except Exception as e: + print("Exception when calling ExternalServicesApi->delete_external_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_version** | **str**| API version (e.g. v1, v3). | + **service_name** | **str**| Target service name. | + **path** | **str**| The path to call on the external service. Slashes are kept as path separators. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response proxied from the external service. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**503** | External service not found, cluster token not set, or the upstream service is unreachable. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_external_service** +> get_external_service(api_version, service_name, path) + +Proxy a GET request to an external service + +Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExternalServicesApi(api_client) + api_version = 'v1' # str | API version (e.g. v1, v3). + service_name = 'apps' # str | Target service name. + path = 'apps/12345/download' # str | The path to call on the external service. Slashes are kept as path separators. + + try: + # Proxy a GET request to an external service + api_instance.get_external_service(api_version, service_name, path) + except Exception as e: + print("Exception when calling ExternalServicesApi->get_external_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_version** | **str**| API version (e.g. v1, v3). | + **service_name** | **str**| Target service name. | + **path** | **str**| The path to call on the external service. Slashes are kept as path separators. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response proxied from the external service. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**503** | External service not found, cluster token not set, or the upstream service is unreachable. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **patch_external_service** +> patch_external_service(api_version, service_name, path) + +Proxy a PATCH request to an external service + +Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExternalServicesApi(api_client) + api_version = 'v1' # str | API version (e.g. v1, v3). + service_name = 'apps' # str | Target service name. + path = 'apps/12345/download' # str | The path to call on the external service. Slashes are kept as path separators. + + try: + # Proxy a PATCH request to an external service + api_instance.patch_external_service(api_version, service_name, path) + except Exception as e: + print("Exception when calling ExternalServicesApi->patch_external_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_version** | **str**| API version (e.g. v1, v3). | + **service_name** | **str**| Target service name. | + **path** | **str**| The path to call on the external service. Slashes are kept as path separators. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response proxied from the external service. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**503** | External service not found, cluster token not set, or the upstream service is unreachable. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **post_external_service** +> post_external_service(api_version, service_name, path) + +Proxy a POST request to an external service + +Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExternalServicesApi(api_client) + api_version = 'v1' # str | API version (e.g. v1, v3). + service_name = 'apps' # str | Target service name. + path = 'apps/12345/download' # str | The path to call on the external service. Slashes are kept as path separators. + + try: + # Proxy a POST request to an external service + api_instance.post_external_service(api_version, service_name, path) + except Exception as e: + print("Exception when calling ExternalServicesApi->post_external_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_version** | **str**| API version (e.g. v1, v3). | + **service_name** | **str**| Target service name. | + **path** | **str**| The path to call on the external service. Slashes are kept as path separators. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response proxied from the external service. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**503** | External service not found, cluster token not set, or the upstream service is unreachable. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **put_external_service** +> put_external_service(api_version, service_name, path) + +Proxy a PUT request to an external service + +Forwards this request to an optional external service connected to the platform (named by `serviceName`, for example `apps`), passing along the rest of the path, and returns that service's response unchanged. What each path does is defined by the external service, not by this API. Returns 503 if the service is not available on this deployment or cannot be reached. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ExternalServicesApi(api_client) + api_version = 'v1' # str | API version (e.g. v1, v3). + service_name = 'apps' # str | Target service name. + path = 'apps/12345/download' # str | The path to call on the external service. Slashes are kept as path separators. + + try: + # Proxy a PUT request to an external service + api_instance.put_external_service(api_version, service_name, path) + except Exception as e: + print("Exception when calling ExternalServicesApi->put_external_service: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_version** | **str**| API version (e.g. v1, v3). | + **service_name** | **str**| Target service name. | + **path** | **str**| The path to call on the external service. Slashes are kept as path separators. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Response proxied from the external service. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**503** | External service not found, cluster token not set, or the upstream service is unreachable. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Features.md b/docs/Features.md index 5de1671..5366684 100644 --- a/docs/Features.md +++ b/docs/Features.md @@ -3,12 +3,13 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **apps** | **bool** | | [optional] **connect** | **bool** | | [optional] **console** | **bool** | | [optional] -**coretrace** | **bool** | | [optional] +**core_trace** | **bool** | | [optional] **device_control** | **bool** | | [optional] **device_delete** | **bool** | | [optional] **files** | **bool** | | [optional] @@ -26,6 +27,23 @@ Name | Type | Description | Notes **strace** | **bool** | | [optional] **system** | **bool** | | [optional] +## Example + +```python +from corellium.models.features import Features + +# TODO update the JSON string below +json = "{}" +# create an instance of Features from a JSON string +features_instance = Features.from_json(json) +# print the JSON string representation of the object +print(Features.to_json()) + +# convert the object into a dict +features_dict = features_instance.to_dict() +# create an instance of Features from a dict +features_from_dict = Features.from_dict(features_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FetchFirmwareAssetsBody.md b/docs/FetchFirmwareAssetsBody.md new file mode 100644 index 0000000..97dc755 --- /dev/null +++ b/docs/FetchFirmwareAssetsBody.md @@ -0,0 +1,29 @@ +# FetchFirmwareAssetsBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asset_urls** | **List[str]** | Firmware asset URLs to fetch server-side (1–100 per request). | + +## Example + +```python +from corellium.models.fetch_firmware_assets_body import FetchFirmwareAssetsBody + +# TODO update the JSON string below +json = "{}" +# create an instance of FetchFirmwareAssetsBody from a JSON string +fetch_firmware_assets_body_instance = FetchFirmwareAssetsBody.from_json(json) +# print the JSON string representation of the object +print(FetchFirmwareAssetsBody.to_json()) + +# convert the object into a dict +fetch_firmware_assets_body_dict = fetch_firmware_assets_body_instance.to_dict() +# create an instance of FetchFirmwareAssetsBody from a dict +fetch_firmware_assets_body_from_dict = FetchFirmwareAssetsBody.from_dict(fetch_firmware_assets_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FetchFirmwareAssetsResponse.md b/docs/FetchFirmwareAssetsResponse.md new file mode 100644 index 0000000..8effc6e --- /dev/null +++ b/docs/FetchFirmwareAssetsResponse.md @@ -0,0 +1,31 @@ +# FetchFirmwareAssetsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**added** | **List[str]** | Asset URLs newly fetched and stored. | +**existing** | **List[str]** | Asset URLs already present. | +**failed** | [**List[FetchFirmwareAssetsResponseFailedInner]**](FetchFirmwareAssetsResponseFailedInner.md) | Assets that could not be fetched. | + +## Example + +```python +from corellium.models.fetch_firmware_assets_response import FetchFirmwareAssetsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FetchFirmwareAssetsResponse from a JSON string +fetch_firmware_assets_response_instance = FetchFirmwareAssetsResponse.from_json(json) +# print the JSON string representation of the object +print(FetchFirmwareAssetsResponse.to_json()) + +# convert the object into a dict +fetch_firmware_assets_response_dict = fetch_firmware_assets_response_instance.to_dict() +# create an instance of FetchFirmwareAssetsResponse from a dict +fetch_firmware_assets_response_from_dict = FetchFirmwareAssetsResponse.from_dict(fetch_firmware_assets_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FetchFirmwareAssetsResponseFailedInner.md b/docs/FetchFirmwareAssetsResponseFailedInner.md new file mode 100644 index 0000000..5afd6f6 --- /dev/null +++ b/docs/FetchFirmwareAssetsResponseFailedInner.md @@ -0,0 +1,30 @@ +# FetchFirmwareAssetsResponseFailedInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Asset URL that could not be fetched. | +**error** | **str** | Reason the fetch failed. | + +## Example + +```python +from corellium.models.fetch_firmware_assets_response_failed_inner import FetchFirmwareAssetsResponseFailedInner + +# TODO update the JSON string below +json = "{}" +# create an instance of FetchFirmwareAssetsResponseFailedInner from a JSON string +fetch_firmware_assets_response_failed_inner_instance = FetchFirmwareAssetsResponseFailedInner.from_json(json) +# print the JSON string representation of the object +print(FetchFirmwareAssetsResponseFailedInner.to_json()) + +# convert the object into a dict +fetch_firmware_assets_response_failed_inner_dict = fetch_firmware_assets_response_failed_inner_instance.to_dict() +# create an instance of FetchFirmwareAssetsResponseFailedInner from a dict +fetch_firmware_assets_response_failed_inner_from_dict = FetchFirmwareAssetsResponseFailedInner.from_dict(fetch_firmware_assets_response_failed_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FileChanges.md b/docs/FileChanges.md index 312fbc7..28e3597 100644 --- a/docs/FileChanges.md +++ b/docs/FileChanges.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **path** | **str** | Optional New path | [optional] @@ -10,6 +11,23 @@ Name | Type | Description | Notes **uid** | **float** | Optional New Owner UID | [optional] **gid** | **float** | Optional New Group GID | [optional] +## Example + +```python +from corellium.models.file_changes import FileChanges + +# TODO update the JSON string below +json = "{}" +# create an instance of FileChanges from a JSON string +file_changes_instance = FileChanges.from_json(json) +# print the JSON string representation of the object +print(FileChanges.to_json()) + +# convert the object into a dict +file_changes_dict = file_changes_instance.to_dict() +# create an instance of FileChanges from a dict +file_changes_from_dict = FileChanges.from_dict(file_changes_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Firmware.md b/docs/Firmware.md index a34a3d0..49e359b 100644 --- a/docs/Firmware.md +++ b/docs/Firmware.md @@ -1,26 +1,50 @@ # Firmware - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**version** | **str** | | [optional] -**buildid** | **str** | | [optional] -**android_flavor** | **str** | Android only flavor | [optional] -**api_version** | **str** | Android only API version | [optional] -**sha256sum** | **str** | | [optional] -**sha1sum** | **str** | | [optional] -**md5sum** | **str** | | [optional] -**size** | **float** | | [optional] -**unique_id** | **str** | | [optional] -**metadata** | **object** | Firmware metadata | [optional] -**releasedate** | **datetime** | Release Date | [optional] -**uploaddate** | **datetime** | Date uploaded | [optional] -**url** | **str** | URL firmware is available at | [optional] -**orig_url** | **str** | URL firmware is available at from vendor | [optional] -**filename** | **str** | | [optional] +**model** | **List[str]** | Device models the firmware supports. | +**firmware_assets** | **List[str]** | Associated firmware asset URLs; null when assets have not been checked for yet. | [optional] +**filename** | **str** | Firmware filename. | +**type** | **str** | Firmware type. | [optional] +**size** | **float** | Firmware size in bytes. | +**url** | **str** | Firmware download URL. | [optional] +**version** | **str** | Firmware version. | +**build_id** | **str** | Firmware build ID. | [optional] +**md5sum** | **str** | MD5 checksum. | [optional] +**sha1sum** | **str** | SHA-1 checksum. | [optional] +**sha256sum** | **str** | SHA-256 checksum. | [optional] +**corellium_checksum** | **str** | Corellium chunked checksum (<algo>$<chunkSize>$<hash>); used for upload preflight. | [optional] +**release_date** | **str** | Release date; may be an empty string. | [optional] +**upload_date** | **str** | Upload date; may be an empty string. | [optional] +**metadata** | **Dict[str, Optional[object]]** | Firmware metadata. | [optional] +**unique_id** | **str** | Customer-provided identifier; an arbitrary string, not a UUID. | [optional] +**android_flavor** | **str** | Android device flavor; only present for coreimg firmwares. | [optional] +**api_version** | **str** | Android API version; only present for coreimg firmwares. | [optional] +**rooted** | **bool** | Whether a device created from this firmware is rooted. Android publishes a `<rev> user` (not rooted) and a `<rev> userdebug` (rooted) build per version. Null on iOS, where rooting is not a property of the firmware. | [optional] +**installed** | **bool** | Whether the firmware is installed. | [optional] +**created_at** | **datetime** | When the record was created. | [optional] +**updated_at** | **datetime** | When the record was last updated. | [optional] + +## Example + +```python +from corellium.models.firmware import Firmware + +# TODO update the JSON string below +json = "{}" +# create an instance of Firmware from a JSON string +firmware_instance = Firmware.from_json(json) +# print the JSON string representation of the object +print(Firmware.to_json()) +# convert the object into a dict +firmware_dict = firmware_instance.to_dict() +# create an instance of Firmware from a dict +firmware_from_dict = Firmware.from_dict(firmware_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FirmwareAsset.md b/docs/FirmwareAsset.md index f61c504..677acc5 100644 --- a/docs/FirmwareAsset.md +++ b/docs/FirmwareAsset.md @@ -1,21 +1,38 @@ # FirmwareAsset - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**domain** | **str** | | -**url** | **str** | | -**payload** | **str** | | -**size** | **float** | | -**md5sum** | **str** | | [optional] -**sha1sum** | **str** | | [optional] -**sha256sum** | **str** | | [optional] -**uploaddate** | **str** | | [optional] -**created_at** | **str** | | [optional] -**updated_at** | **str** | | [optional] +**domain** | **str** | Owning domain identifier. | +**url** | **str** | Asset URL. | +**payload** | **str** | Base64-encoded asset payload. | +**size** | **float** | Asset size in bytes. | +**md5sum** | **str** | MD5 checksum. | [optional] +**sha1sum** | **str** | SHA-1 checksum. | [optional] +**sha256sum** | **str** | SHA-256 checksum. | [optional] +**upload_date** | **str** | Upload date; may be an empty string. | [optional] +**created_at** | **datetime** | When the record was created. | [optional] +**updated_at** | **datetime** | When the record was last updated. | [optional] + +## Example + +```python +from corellium.models.firmware_asset import FirmwareAsset + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareAsset from a JSON string +firmware_asset_instance = FirmwareAsset.from_json(json) +# print the JSON string representation of the object +print(FirmwareAsset.to_json()) +# convert the object into a dict +firmware_asset_dict = firmware_asset_instance.to_dict() +# create an instance of FirmwareAsset from a dict +firmware_asset_from_dict = FirmwareAsset.from_dict(firmware_asset_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FirmwareAssetFilter.md b/docs/FirmwareAssetFilter.md new file mode 100644 index 0000000..86c59f5 --- /dev/null +++ b/docs/FirmwareAssetFilter.md @@ -0,0 +1,31 @@ +# FirmwareAssetFilter + +Exact-match filters (filter[url], filter[domain]). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Filter by exact URL. | [optional] +**domain** | **str** | Filter by exact domain. | [optional] + +## Example + +```python +from corellium.models.firmware_asset_filter import FirmwareAssetFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareAssetFilter from a JSON string +firmware_asset_filter_instance = FirmwareAssetFilter.from_json(json) +# print the JSON string representation of the object +print(FirmwareAssetFilter.to_json()) + +# convert the object into a dict +firmware_asset_filter_dict = firmware_asset_filter_instance.to_dict() +# create an instance of FirmwareAssetFilter from a dict +firmware_asset_filter_from_dict = FirmwareAssetFilter.from_dict(firmware_asset_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareAssetList.md b/docs/FirmwareAssetList.md new file mode 100644 index 0000000..64e7487 --- /dev/null +++ b/docs/FirmwareAssetList.md @@ -0,0 +1,34 @@ +# FirmwareAssetList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[FirmwareAsset]**](FirmwareAsset.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.firmware_asset_list import FirmwareAssetList + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareAssetList from a JSON string +firmware_asset_list_instance = FirmwareAssetList.from_json(json) +# print the JSON string representation of the object +print(FirmwareAssetList.to_json()) + +# convert the object into a dict +firmware_asset_list_dict = firmware_asset_list_instance.to_dict() +# create an instance of FirmwareAssetList from a dict +firmware_asset_list_from_dict = FirmwareAssetList.from_dict(firmware_asset_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareAssetV1.md b/docs/FirmwareAssetV1.md new file mode 100644 index 0000000..9526b78 --- /dev/null +++ b/docs/FirmwareAssetV1.md @@ -0,0 +1,39 @@ +# FirmwareAssetV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | +**url** | **str** | | +**payload** | **str** | | +**size** | **float** | | +**md5sum** | **str** | | [optional] +**sha1sum** | **str** | | [optional] +**sha256sum** | **str** | | [optional] +**uploaddate** | **str** | | [optional] +**created_at** | **str** | | [optional] +**updated_at** | **str** | | [optional] + +## Example + +```python +from corellium.models.firmware_asset_v1 import FirmwareAssetV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareAssetV1 from a JSON string +firmware_asset_v1_instance = FirmwareAssetV1.from_json(json) +# print the JSON string representation of the object +print(FirmwareAssetV1.to_json()) + +# convert the object into a dict +firmware_asset_v1_dict = firmware_asset_v1_instance.to_dict() +# create an instance of FirmwareAssetV1 from a dict +firmware_asset_v1_from_dict = FirmwareAssetV1.from_dict(firmware_asset_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareDevice.md b/docs/FirmwareDevice.md new file mode 100644 index 0000000..ca19840 --- /dev/null +++ b/docs/FirmwareDevice.md @@ -0,0 +1,37 @@ +# FirmwareDevice + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Device type. | [optional] +**model** | **str** | Device model. | +**name** | **str** | Device name. | +**platform** | **str** | Device platform. | [optional] +**hw_model** | **str** | Hardware model. | [optional] +**bdid** | **str** | Board ID. | [optional] +**cpid** | **str** | Chip ID. | [optional] +**created_at** | **datetime** | Creation timestamp. | [optional] +**updated_at** | **datetime** | Last update timestamp. | [optional] + +## Example + +```python +from corellium.models.firmware_device import FirmwareDevice + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareDevice from a JSON string +firmware_device_instance = FirmwareDevice.from_json(json) +# print the JSON string representation of the object +print(FirmwareDevice.to_json()) + +# convert the object into a dict +firmware_device_dict = firmware_device_instance.to_dict() +# create an instance of FirmwareDevice from a dict +firmware_device_from_dict = FirmwareDevice.from_dict(firmware_device_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareDeviceList.md b/docs/FirmwareDeviceList.md new file mode 100644 index 0000000..29ff356 --- /dev/null +++ b/docs/FirmwareDeviceList.md @@ -0,0 +1,34 @@ +# FirmwareDeviceList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[FirmwareDevice]**](FirmwareDevice.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.firmware_device_list import FirmwareDeviceList + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareDeviceList from a JSON string +firmware_device_list_instance = FirmwareDeviceList.from_json(json) +# print the JSON string representation of the object +print(FirmwareDeviceList.to_json()) + +# convert the object into a dict +firmware_device_list_dict = firmware_device_list_instance.to_dict() +# create an instance of FirmwareDeviceList from a dict +firmware_device_list_from_dict = FirmwareDeviceList.from_dict(firmware_device_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareInfoDevice.md b/docs/FirmwareInfoDevice.md new file mode 100644 index 0000000..c26e584 --- /dev/null +++ b/docs/FirmwareInfoDevice.md @@ -0,0 +1,31 @@ +# FirmwareInfoDevice + +Matched supported device; only present when extended info was requested. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**flavor** | **str** | Matched device flavor. | [optional] +**firmwares** | [**List[FirmwareInfoDeviceFirmwaresInner]**](FirmwareInfoDeviceFirmwaresInner.md) | Supported firmwares matching the version and build ID of this image. | [optional] + +## Example + +```python +from corellium.models.firmware_info_device import FirmwareInfoDevice + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareInfoDevice from a JSON string +firmware_info_device_instance = FirmwareInfoDevice.from_json(json) +# print the JSON string representation of the object +print(FirmwareInfoDevice.to_json()) + +# convert the object into a dict +firmware_info_device_dict = firmware_info_device_instance.to_dict() +# create an instance of FirmwareInfoDevice from a dict +firmware_info_device_from_dict = FirmwareInfoDevice.from_dict(firmware_info_device_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareInfoDeviceFirmwaresInner.md b/docs/FirmwareInfoDeviceFirmwaresInner.md new file mode 100644 index 0000000..167cc30 --- /dev/null +++ b/docs/FirmwareInfoDeviceFirmwaresInner.md @@ -0,0 +1,33 @@ +# FirmwareInfoDeviceFirmwaresInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **str** | Firmware filename. | [optional] +**version** | **str** | Firmware version. | [optional] +**build_id** | **str** | Firmware build ID. | [optional] +**url** | **str** | Firmware download URL. | [optional] +**orig_url** | **str** | Original vendor firmware URL. | [optional] + +## Example + +```python +from corellium.models.firmware_info_device_firmwares_inner import FirmwareInfoDeviceFirmwaresInner + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareInfoDeviceFirmwaresInner from a JSON string +firmware_info_device_firmwares_inner_instance = FirmwareInfoDeviceFirmwaresInner.from_json(json) +# print the JSON string representation of the object +print(FirmwareInfoDeviceFirmwaresInner.to_json()) + +# convert the object into a dict +firmware_info_device_firmwares_inner_dict = firmware_info_device_firmwares_inner_instance.to_dict() +# create an instance of FirmwareInfoDeviceFirmwaresInner from a dict +firmware_info_device_firmwares_inner_from_dict = FirmwareInfoDeviceFirmwaresInner.from_dict(firmware_info_device_firmwares_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareList.md b/docs/FirmwareList.md new file mode 100644 index 0000000..0fe5dc5 --- /dev/null +++ b/docs/FirmwareList.md @@ -0,0 +1,34 @@ +# FirmwareList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Firmware]**](Firmware.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.firmware_list import FirmwareList + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareList from a JSON string +firmware_list_instance = FirmwareList.from_json(json) +# print the JSON string representation of the object +print(FirmwareList.to_json()) + +# convert the object into a dict +firmware_list_dict = firmware_list_instance.to_dict() +# create an instance of FirmwareList from a dict +firmware_list_from_dict = FirmwareList.from_dict(firmware_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareServiceApi.md b/docs/FirmwareServiceApi.md new file mode 100644 index 0000000..28187d2 --- /dev/null +++ b/docs/FirmwareServiceApi.md @@ -0,0 +1,836 @@ +# corellium.FirmwareServiceApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_firmware_assets**](FirmwareServiceApi.md#v3_create_firmware_assets) | **POST** /v3/cluster/firmware-service/firmware-assets | Add firmware assets +[**v3_delete_firmware**](FirmwareServiceApi.md#v3_delete_firmware) | **DELETE** /v3/cluster/firmware-service/firmwares/{filename} | Delete a firmware +[**v3_delete_firmware_asset**](FirmwareServiceApi.md#v3_delete_firmware_asset) | **DELETE** /v3/cluster/firmware-service/firmware-assets/{assetUrl} | Delete a firmware asset +[**v3_get_firmware_asset_extended**](FirmwareServiceApi.md#v3_get_firmware_asset_extended) | **GET** /v3/cluster/firmware-service/firmware-assets/{assetUrl}/extended | Get extended firmware asset info +[**v3_get_firmware_service_config**](FirmwareServiceApi.md#v3_get_firmware_service_config) | **GET** /v3/cluster/firmware-service/config | Get firmware service configuration +[**v3_list_firmware_assets**](FirmwareServiceApi.md#v3_list_firmware_assets) | **GET** /v3/cluster/firmware-service/firmware-assets | List firmware assets +[**v3_list_firmware_devices**](FirmwareServiceApi.md#v3_list_firmware_devices) | **GET** /v3/cluster/firmware-service/devices | List firmware service devices +[**v3_list_firmwares**](FirmwareServiceApi.md#v3_list_firmwares) | **GET** /v3/cluster/firmware-service/firmwares | List firmwares +[**v3_patch_firmware_service_config**](FirmwareServiceApi.md#v3_patch_firmware_service_config) | **PATCH** /v3/cluster/firmware-service/config | Update firmware service configuration + + +# **v3_create_firmware_assets** +> str v3_create_firmware_assets(request_body=request_body) + +Add firmware assets + +**Required role:** Cluster administrator. + +Adds firmware assets to the cluster, so firmware that needs them can boot. Returns 201 with the firmware service's response message. Requires a cluster administrator. For a single project, `POST /v3/projects/{projectId}/firmware-assets` fetches missing assets by URL; on air-gapped deployments, upload them and use `POST /v3/images/install-firmware-assets`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + request_body = {'key': 'request_body_example'} # Dict[str, str] | (optional) + + try: + # Add firmware assets + api_response = api_instance.v3_create_firmware_assets(request_body=request_body) + print("The response of FirmwareServiceApi->v3_create_firmware_assets:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_create_firmware_assets: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_body** | [**Dict[str, str]**](str.md)| | [optional] + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Firmware assets added. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_firmware** +> v3_delete_firmware(filename) + +Delete a firmware + +**Required role:** Cluster administrator. + +Removes a firmware build from the cluster firmware catalog, so it can no longer be chosen when creating devices. Identify it by its filename from `v3ListFirmwares`. Requires a cluster administrator. + +This endpoint proxies the request to the firmware service. A filename the service no longer has is a +successful no-op: both a successful upstream delete and an upstream "not there" answer 204, and repeated +calls return 204 as well. A firmware-service outage or refusal is still reported as a failure. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + filename = 'firmware.ipsw' # str | Firmware filename. + + try: + # Delete a firmware + api_instance.v3_delete_firmware(filename) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_delete_firmware: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filename** | **str**| Firmware filename. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Firmware deleted. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**409** | The request conflicts with the current state of the resource. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_firmware_asset** +> v3_delete_firmware_asset(asset_url) + +Delete a firmware asset + +**Required role:** Cluster administrator. + +Removes a firmware asset from the cluster. Firmware that needs it can no longer boot until it is added again. Requires a cluster administrator. + +This endpoint proxies the request to the firmware service. An asset the service no longer has is a +successful no-op: both a successful upstream delete and an upstream "not there" answer 204, and repeated +calls return 204 as well. A firmware-service outage or refusal is still reported as a failure. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + asset_url = 'https://example.com/firmware-assets/asset.bin' # str | Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. + + try: + # Delete a firmware asset + api_instance.v3_delete_firmware_asset(asset_url) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_delete_firmware_asset: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset_url** | **str**| Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Firmware asset deleted. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_firmware_asset_extended** +> ExtendedFirmwareAssetInfo v3_get_firmware_asset_extended(asset_url) + +Get extended firmware asset info + +**Required role:** Cluster administrator. + +Shows where a firmware asset is used: the firmware builds that need it and the devices using those builds. Check this before deleting an asset. Requires a cluster administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + asset_url = 'https://example.com/firmware-assets/asset.bin' # str | Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. + + try: + # Get extended firmware asset info + api_response = api_instance.v3_get_firmware_asset_extended(asset_url) + print("The response of FirmwareServiceApi->v3_get_firmware_asset_extended:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_get_firmware_asset_extended: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset_url** | **str**| Firmware asset URL, passed as the raw (un-encoded) value. Generated SDK clients percent-encode it into the request path automatically; only when composing the HTTP request path by hand (e.g. curl) does the caller percent-encode it, once, like any path segment. | + +### Return type + +[**ExtendedFirmwareAssetInfo**](ExtendedFirmwareAssetInfo.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Extended firmware asset info. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_firmware_service_config** +> FirmwareServiceConfig v3_get_firmware_service_config() + +Get firmware service configuration + +**Required role:** Cluster administrator. + +Returns the settings of the cluster firmware service: the cluster-wide catalog of operating-system builds that devices can be created from (what `GET /v3/models/{model}/software` lists). Settings control things such as whether firmware is downloaded and cached. Requires a cluster administrator. Change them with `v3PatchFirmwareServiceConfig`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_service_config import FirmwareServiceConfig +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + + try: + # Get firmware service configuration + api_response = api_instance.v3_get_firmware_service_config() + print("The response of FirmwareServiceApi->v3_get_firmware_service_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_get_firmware_service_config: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FirmwareServiceConfig**](FirmwareServiceConfig.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Firmware service configuration. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_firmware_assets** +> FirmwareAssetList v3_list_firmware_assets(limit=limit, offset=offset, search=search, order=order, filter=filter) + +List firmware assets + +**Required role:** Cluster administrator. + +Lists the firmware assets stored in the cluster: side files some firmware needs in order to boot, such as Apple decryption keys. A firmware build lists the asset URLs it needs; device creation fails if one is missing. Requires a cluster administrator. Results are paginated. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_asset_filter import FirmwareAssetFilter +from corellium.models.firmware_asset_list import FirmwareAssetList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + limit = 100 # float | Number of results to return. (optional) (default to 100) + offset = 0 # float | Index of the first row to return. (optional) (default to 0) + search = 'iPhone13' # str | Case-insensitive partial match across key fields. (optional) + order = '-createdAt' # str | Comma-separated sort fields; prefix with \"-\" for descending order. (optional) + filter = corellium.FirmwareAssetFilter() # FirmwareAssetFilter | Exact-match filters (filter[url], filter[domain]). (optional) + + try: + # List firmware assets + api_response = api_instance.v3_list_firmware_assets(limit=limit, offset=offset, search=search, order=order, filter=filter) + print("The response of FirmwareServiceApi->v3_list_firmware_assets:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_list_firmware_assets: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Number of results to return. | [optional] [default to 100] + **offset** | **float**| Index of the first row to return. | [optional] [default to 0] + **search** | **str**| Case-insensitive partial match across key fields. | [optional] + **order** | **str**| Comma-separated sort fields; prefix with \"-\" for descending order. | [optional] + **filter** | [**FirmwareAssetFilter**](.md)| Exact-match filters (filter[url], filter[domain]). | [optional] + +### Return type + +[**FirmwareAssetList**](FirmwareAssetList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of firmware assets. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_firmware_devices** +> FirmwareDeviceList v3_list_firmware_devices(limit=limit, offset=offset, search=search, order=order, type=type, model=model, name=name, platform=platform, hw_model=hw_model) + +List firmware service devices + +**Required role:** Cluster administrator. + +Lists the device models the firmware service has firmware records for. Requires a cluster administrator. Results are paginated. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_device_list import FirmwareDeviceList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + limit = 100 # float | Number of results to return. (optional) (default to 100) + offset = 0 # float | Index of the first row to return. (optional) (default to 0) + search = 'iPhone13' # str | Case-insensitive partial match across key fields. (optional) + order = '-createdAt' # str | Comma-separated sort fields; prefix with \"-\" for descending order. (optional) + type = 'ios' # str | Filter by exact type. (optional) + model = 'iPhone13,2' # str | Filter by exact model. (optional) + name = 'iPhone 12' # str | Filter by exact name. (optional) + platform = 't8101' # str | Filter by exact platform. (optional) + hw_model = 'd53gap' # str | Filter by exact hardware model. (optional) + + try: + # List firmware service devices + api_response = api_instance.v3_list_firmware_devices(limit=limit, offset=offset, search=search, order=order, type=type, model=model, name=name, platform=platform, hw_model=hw_model) + print("The response of FirmwareServiceApi->v3_list_firmware_devices:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_list_firmware_devices: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Number of results to return. | [optional] [default to 100] + **offset** | **float**| Index of the first row to return. | [optional] [default to 0] + **search** | **str**| Case-insensitive partial match across key fields. | [optional] + **order** | **str**| Comma-separated sort fields; prefix with \"-\" for descending order. | [optional] + **type** | **str**| Filter by exact type. | [optional] + **model** | **str**| Filter by exact model. | [optional] + **name** | **str**| Filter by exact name. | [optional] + **platform** | **str**| Filter by exact platform. | [optional] + **hw_model** | **str**| Filter by exact hardware model. | [optional] + +### Return type + +[**FirmwareDeviceList**](FirmwareDeviceList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of devices. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_firmwares** +> FirmwareList v3_list_firmwares(limit=limit, offset=offset, search=search, order=order, filename=filename, model=model, type=type, version=version, build_id=build_id, firmware_assets=firmware_assets, corellium_checksum=corellium_checksum, installed=installed) + +List firmwares + +**Required role:** Cluster administrator. + +Lists the firmware builds in the cluster firmware catalog, including builds installed with `POST /v3/images/install-firmware`. Requires a cluster administrator. Results are paginated. Users see the builds for one model with `GET /v3/models/{model}/software`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_list import FirmwareList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + limit = 100 # float | Number of results to return. (optional) (default to 100) + offset = 0 # float | Index of the first row to return. (optional) (default to 0) + search = 'iPhone13' # str | Case-insensitive partial match across key fields. (optional) + order = '-createdAt' # str | Comma-separated sort fields; prefix with \"-\" for descending order. (optional) + filename = 'firmware.ipsw' # str | Filter by exact filename. (optional) + model = 'iPhone13,2' # str | Filter by exact model. (optional) + type = 'ios' # str | Filter by exact type. (optional) + version = '17.5' # str | Filter by exact version. (optional) + build_id = '21F79' # str | Filter by exact build ID. (optional) + firmware_assets = 'https://example.com/firmware-assets/asset.bin' # str | Filter by exact asset URL/ID. (optional) + corellium_checksum = 'sha256$1048576$2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824' # str | Filter by exact Corellium checksum (upload preflight). (optional) + installed = true # bool | Filter by installed status. (optional) + + try: + # List firmwares + api_response = api_instance.v3_list_firmwares(limit=limit, offset=offset, search=search, order=order, filename=filename, model=model, type=type, version=version, build_id=build_id, firmware_assets=firmware_assets, corellium_checksum=corellium_checksum, installed=installed) + print("The response of FirmwareServiceApi->v3_list_firmwares:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_list_firmwares: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Number of results to return. | [optional] [default to 100] + **offset** | **float**| Index of the first row to return. | [optional] [default to 0] + **search** | **str**| Case-insensitive partial match across key fields. | [optional] + **order** | **str**| Comma-separated sort fields; prefix with \"-\" for descending order. | [optional] + **filename** | **str**| Filter by exact filename. | [optional] + **model** | **str**| Filter by exact model. | [optional] + **type** | **str**| Filter by exact type. | [optional] + **version** | **str**| Filter by exact version. | [optional] + **build_id** | **str**| Filter by exact build ID. | [optional] + **firmware_assets** | **str**| Filter by exact asset URL/ID. | [optional] + **corellium_checksum** | **str**| Filter by exact Corellium checksum (upload preflight). | [optional] + **installed** | **bool**| Filter by installed status. | [optional] + +### Return type + +[**FirmwareList**](FirmwareList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of firmwares. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_firmware_service_config** +> FirmwareServiceSettings v3_patch_firmware_service_config(patch_firmware_service_config_body=patch_firmware_service_config_body) + +Update firmware service configuration + +**Required role:** Cluster administrator. + +Changes firmware service settings. Send only the settings you want to change; they are merged into the current settings, and the full result is returned. Requires a cluster administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_service_settings import FirmwareServiceSettings +from corellium.models.patch_firmware_service_config_body import PatchFirmwareServiceConfigBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FirmwareServiceApi(api_client) + patch_firmware_service_config_body = corellium.PatchFirmwareServiceConfigBody() # PatchFirmwareServiceConfigBody | (optional) + + try: + # Update firmware service configuration + api_response = api_instance.v3_patch_firmware_service_config(patch_firmware_service_config_body=patch_firmware_service_config_body) + print("The response of FirmwareServiceApi->v3_patch_firmware_service_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirmwareServiceApi->v3_patch_firmware_service_config: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **patch_firmware_service_config_body** | [**PatchFirmwareServiceConfigBody**](PatchFirmwareServiceConfigBody.md)| | [optional] + +### Return type + +[**FirmwareServiceSettings**](FirmwareServiceSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The full merged settings after the update. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Cluster administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/FirmwareServiceConfig.md b/docs/FirmwareServiceConfig.md new file mode 100644 index 0000000..a391024 --- /dev/null +++ b/docs/FirmwareServiceConfig.md @@ -0,0 +1,34 @@ +# FirmwareServiceConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cache_firmware** | [**FirmwareServiceConfigCacheFirmware**](FirmwareServiceConfigCacheFirmware.md) | | +**cluster_firmware_assets** | [**FirmwareServiceConfigCacheFirmware**](FirmwareServiceConfigCacheFirmware.md) | | +**fallback_original_url** | [**FirmwareServiceConfigCacheFirmware**](FirmwareServiceConfigCacheFirmware.md) | | +**fetch_firmware_assets** | [**FirmwareServiceConfigCacheFirmware**](FirmwareServiceConfigCacheFirmware.md) | | +**should_download** | [**FirmwareServiceConfigCacheFirmware**](FirmwareServiceConfigCacheFirmware.md) | | +**download_ipsw_filters** | [**FirmwareServiceConfigDownloadIpswFilters**](FirmwareServiceConfigDownloadIpswFilters.md) | | + +## Example + +```python +from corellium.models.firmware_service_config import FirmwareServiceConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareServiceConfig from a JSON string +firmware_service_config_instance = FirmwareServiceConfig.from_json(json) +# print the JSON string representation of the object +print(FirmwareServiceConfig.to_json()) + +# convert the object into a dict +firmware_service_config_dict = firmware_service_config_instance.to_dict() +# create an instance of FirmwareServiceConfig from a dict +firmware_service_config_from_dict = FirmwareServiceConfig.from_dict(firmware_service_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareServiceConfigCacheFirmware.md b/docs/FirmwareServiceConfigCacheFirmware.md new file mode 100644 index 0000000..d3f0a87 --- /dev/null +++ b/docs/FirmwareServiceConfigCacheFirmware.md @@ -0,0 +1,33 @@ +# FirmwareServiceConfigCacheFirmware + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **bool** | Current setting value. | +**component** | **str** | UI component hint. | [optional] +**title** | **str** | Human-readable title. | [optional] +**description** | **str** | Setting description. | [optional] +**type** | **str** | Value type. | [optional] + +## Example + +```python +from corellium.models.firmware_service_config_cache_firmware import FirmwareServiceConfigCacheFirmware + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareServiceConfigCacheFirmware from a JSON string +firmware_service_config_cache_firmware_instance = FirmwareServiceConfigCacheFirmware.from_json(json) +# print the JSON string representation of the object +print(FirmwareServiceConfigCacheFirmware.to_json()) + +# convert the object into a dict +firmware_service_config_cache_firmware_dict = firmware_service_config_cache_firmware_instance.to_dict() +# create an instance of FirmwareServiceConfigCacheFirmware from a dict +firmware_service_config_cache_firmware_from_dict = FirmwareServiceConfigCacheFirmware.from_dict(firmware_service_config_cache_firmware_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareServiceConfigDownloadIpswFilters.md b/docs/FirmwareServiceConfigDownloadIpswFilters.md new file mode 100644 index 0000000..daca358 --- /dev/null +++ b/docs/FirmwareServiceConfigDownloadIpswFilters.md @@ -0,0 +1,33 @@ +# FirmwareServiceConfigDownloadIpswFilters + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**List[IpswFilterV3]**](IpswFilterV3.md) | Current setting value. | +**component** | **str** | UI component hint. | [optional] +**title** | **str** | Human-readable title. | [optional] +**description** | **str** | Setting description. | [optional] +**type** | **str** | Value type. | [optional] + +## Example + +```python +from corellium.models.firmware_service_config_download_ipsw_filters import FirmwareServiceConfigDownloadIpswFilters + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareServiceConfigDownloadIpswFilters from a JSON string +firmware_service_config_download_ipsw_filters_instance = FirmwareServiceConfigDownloadIpswFilters.from_json(json) +# print the JSON string representation of the object +print(FirmwareServiceConfigDownloadIpswFilters.to_json()) + +# convert the object into a dict +firmware_service_config_download_ipsw_filters_dict = firmware_service_config_download_ipsw_filters_instance.to_dict() +# create an instance of FirmwareServiceConfigDownloadIpswFilters from a dict +firmware_service_config_download_ipsw_filters_from_dict = FirmwareServiceConfigDownloadIpswFilters.from_dict(firmware_service_config_download_ipsw_filters_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareServiceConfigValue.md b/docs/FirmwareServiceConfigValue.md new file mode 100644 index 0000000..ebf463f --- /dev/null +++ b/docs/FirmwareServiceConfigValue.md @@ -0,0 +1,33 @@ +# FirmwareServiceConfigValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **object** | Current setting value. | [optional] +**component** | **str** | UI component hint. | [optional] +**title** | **str** | Human-readable title. | [optional] +**description** | **str** | Setting description. | [optional] +**type** | **str** | Value type. | [optional] + +## Example + +```python +from corellium.models.firmware_service_config_value import FirmwareServiceConfigValue + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareServiceConfigValue from a JSON string +firmware_service_config_value_instance = FirmwareServiceConfigValue.from_json(json) +# print the JSON string representation of the object +print(FirmwareServiceConfigValue.to_json()) + +# convert the object into a dict +firmware_service_config_value_dict = firmware_service_config_value_instance.to_dict() +# create an instance of FirmwareServiceConfigValue from a dict +firmware_service_config_value_from_dict = FirmwareServiceConfigValue.from_dict(firmware_service_config_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareServiceConfiguration.md b/docs/FirmwareServiceConfiguration.md new file mode 100644 index 0000000..385fad9 --- /dev/null +++ b/docs/FirmwareServiceConfiguration.md @@ -0,0 +1,35 @@ +# FirmwareServiceConfiguration + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cache_firmware** | **bool** | Cache Firmwares in /var/ipsw | [optional] +**cluster_firmware_assets** | **bool** | Assets are cluster-wide | [optional] +**fallback_original_url** | **bool** | Use original URL to fetch firmware | [optional] +**fetch_firmware_assets** | **bool** | Automatically fetch assets | [optional] +**should_download** | **bool** | Download firmwares | [optional] +**download_ipsw_filters** | [**List[IpswFilter]**](IpswFilter.md) | Filters that control which IPSW builds are downloaded | [optional] + +## Example + +```python +from corellium.models.firmware_service_configuration import FirmwareServiceConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareServiceConfiguration from a JSON string +firmware_service_configuration_instance = FirmwareServiceConfiguration.from_json(json) +# print the JSON string representation of the object +print(FirmwareServiceConfiguration.to_json()) + +# convert the object into a dict +firmware_service_configuration_dict = firmware_service_configuration_instance.to_dict() +# create an instance of FirmwareServiceConfiguration from a dict +firmware_service_configuration_from_dict = FirmwareServiceConfiguration.from_dict(firmware_service_configuration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareServiceSettings.md b/docs/FirmwareServiceSettings.md new file mode 100644 index 0000000..711f90f --- /dev/null +++ b/docs/FirmwareServiceSettings.md @@ -0,0 +1,34 @@ +# FirmwareServiceSettings + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cache_firmware** | **bool** | Cache firmwares in /var/ipsw. | +**cluster_firmware_assets** | **bool** | Assets are cluster-wide. | +**fallback_original_url** | **bool** | Use original URL to fetch firmware. | +**fetch_firmware_assets** | **bool** | Automatically fetch assets. | +**should_download** | **bool** | Download firmwares. | +**download_ipsw_filters** | [**List[IpswFilterV3]**](IpswFilterV3.md) | Filters controlling which IPSW builds are downloaded. | + +## Example + +```python +from corellium.models.firmware_service_settings import FirmwareServiceSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareServiceSettings from a JSON string +firmware_service_settings_instance = FirmwareServiceSettings.from_json(json) +# print the JSON string representation of the object +print(FirmwareServiceSettings.to_json()) + +# convert the object into a dict +firmware_service_settings_dict = firmware_service_settings_instance.to_dict() +# create an instance of FirmwareServiceSettings from a dict +firmware_service_settings_from_dict = FirmwareServiceSettings.from_dict(firmware_service_settings_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirmwareV1.md b/docs/FirmwareV1.md new file mode 100644 index 0000000..b2b4069 --- /dev/null +++ b/docs/FirmwareV1.md @@ -0,0 +1,44 @@ +# FirmwareV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] +**buildid** | **str** | | [optional] +**android_flavor** | **str** | Android only flavor | [optional] +**api_version** | **str** | Android only API version | [optional] +**sha256sum** | **str** | | [optional] +**sha1sum** | **str** | | [optional] +**md5sum** | **str** | | [optional] +**size** | **float** | | [optional] +**unique_id** | **str** | | [optional] +**metadata** | **object** | Firmware metadata | [optional] +**releasedate** | **datetime** | Release Date | [optional] +**uploaddate** | **datetime** | Date uploaded | [optional] +**url** | **str** | URL firmware is available at | [optional] +**orig_url** | **str** | URL firmware is available at from vendor | [optional] +**filename** | **str** | | [optional] + +## Example + +```python +from corellium.models.firmware_v1 import FirmwareV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of FirmwareV1 from a JSON string +firmware_v1_instance = FirmwareV1.from_json(json) +# print the JSON string representation of the object +print(FirmwareV1.to_json()) + +# convert the object into a dict +firmware_v1_dict = firmware_v1_instance.to_dict() +# create an instance of FirmwareV1 from a dict +firmware_v1_from_dict = FirmwareV1.from_dict(firmware_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorFrame.md b/docs/FlavorFrame.md new file mode 100644 index 0000000..65d9837 --- /dev/null +++ b/docs/FlavorFrame.md @@ -0,0 +1,36 @@ +# FlavorFrame + +Frame geometry and metadata for the flavor. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Relative URL to the frame image asset. | +**width** | **float** | Frame image width in points. | +**height** | **float** | Frame image height in points. | +**inner** | [**FlavorFrameInner**](FlavorFrameInner.md) | | +**home** | [**FlavorFrameHome**](FlavorFrameHome.md) | | +**dimensions** | [**FlavorFrameDimensions**](FlavorFrameDimensions.md) | | +**scale** | **float** | Display scale factor. | + +## Example + +```python +from corellium.models.flavor_frame import FlavorFrame + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorFrame from a JSON string +flavor_frame_instance = FlavorFrame.from_json(json) +# print the JSON string representation of the object +print(FlavorFrame.to_json()) + +# convert the object into a dict +flavor_frame_dict = flavor_frame_instance.to_dict() +# create an instance of FlavorFrame from a dict +flavor_frame_from_dict = FlavorFrame.from_dict(flavor_frame_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorFrameDimensions.md b/docs/FlavorFrameDimensions.md new file mode 100644 index 0000000..235fc85 --- /dev/null +++ b/docs/FlavorFrameDimensions.md @@ -0,0 +1,31 @@ +# FlavorFrameDimensions + +Native display resolution. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**width** | **float** | Native display width in pixels. | +**height** | **float** | Native display height in pixels. | + +## Example + +```python +from corellium.models.flavor_frame_dimensions import FlavorFrameDimensions + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorFrameDimensions from a JSON string +flavor_frame_dimensions_instance = FlavorFrameDimensions.from_json(json) +# print the JSON string representation of the object +print(FlavorFrameDimensions.to_json()) + +# convert the object into a dict +flavor_frame_dimensions_dict = flavor_frame_dimensions_instance.to_dict() +# create an instance of FlavorFrameDimensions from a dict +flavor_frame_dimensions_from_dict = FlavorFrameDimensions.from_dict(flavor_frame_dimensions_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorFrameHome.md b/docs/FlavorFrameHome.md new file mode 100644 index 0000000..3c72c58 --- /dev/null +++ b/docs/FlavorFrameHome.md @@ -0,0 +1,33 @@ +# FlavorFrameHome + +Home button hit area within the frame. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**top** | **float** | Top offset in points. | +**left** | **float** | Left offset in points. | +**width** | **float** | Width in points. | +**height** | **float** | Height in points. | + +## Example + +```python +from corellium.models.flavor_frame_home import FlavorFrameHome + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorFrameHome from a JSON string +flavor_frame_home_instance = FlavorFrameHome.from_json(json) +# print the JSON string representation of the object +print(FlavorFrameHome.to_json()) + +# convert the object into a dict +flavor_frame_home_dict = flavor_frame_home_instance.to_dict() +# create an instance of FlavorFrameHome from a dict +flavor_frame_home_from_dict = FlavorFrameHome.from_dict(flavor_frame_home_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorFrameInner.md b/docs/FlavorFrameInner.md new file mode 100644 index 0000000..04359ad --- /dev/null +++ b/docs/FlavorFrameInner.md @@ -0,0 +1,33 @@ +# FlavorFrameInner + +Inner screen area within the frame. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**top** | **float** | Top offset in points. | +**left** | **float** | Left offset in points. | +**width** | **float** | Width in points. | +**height** | **float** | Height in points. | + +## Example + +```python +from corellium.models.flavor_frame_inner import FlavorFrameInner + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorFrameInner from a JSON string +flavor_frame_inner_instance = FlavorFrameInner.from_json(json) +# print the JSON string representation of the object +print(FlavorFrameInner.to_json()) + +# convert the object into a dict +flavor_frame_inner_dict = flavor_frame_inner_instance.to_dict() +# create an instance of FlavorFrameInner from a dict +flavor_frame_inner_from_dict = FlavorFrameInner.from_dict(flavor_frame_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorsApi.md b/docs/FlavorsApi.md new file mode 100644 index 0000000..e3f75de --- /dev/null +++ b/docs/FlavorsApi.md @@ -0,0 +1,276 @@ +# corellium.FlavorsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_get_frame**](FlavorsApi.md#v3_get_frame) | **GET** /v3/flavors/{flavorId} | Get the device frame layout for a model +[**v3_get_frame_image**](FlavorsApi.md#v3_get_frame_image) | **GET** /v3/flavors/{flavorId}/image | Get the device frame image for a model +[**v3_get_product_image**](FlavorsApi.md#v3_get_product_image) | **GET** /v3/flavors/{flavorId}/productimage | Get the product image for a model + + +# **v3_get_frame** +> FlavorFrame v3_get_frame(flavor_id) + +Get the device frame layout for a model + +Returns the layout of the on-screen device frame (the picture of the phone drawn around the screen) for a model: its size, where the screen sits inside it, and where the home button is. Use it to draw a device image around a screenshot or live display. `flavorId` is a model `flavor` from `GET /v3/models`. Returns 404 if the model has no frame. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.flavor_frame import FlavorFrame +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FlavorsApi(api_client) + flavor_id = 'iphone8' # str | Flavor ID. + + try: + # Get the device frame layout for a model + api_response = api_instance.v3_get_frame(flavor_id) + print("The response of FlavorsApi->v3_get_frame:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FlavorsApi->v3_get_frame: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flavor_id** | **str**| Flavor ID. | + +### Return type + +[**FlavorFrame**](FlavorFrame.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Frame for the flavor. | - | +**404** | No frame found for the given flavor ID. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_frame_image** +> bytearray v3_get_frame_image(flavor_id) + +Get the device frame image for a model + +Downloads the picture of the device frame (the phone body drawn around the screen) for a model, to combine with the layout from `v3GetFrame`. Returns 404 if the model has no frame image. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FlavorsApi(api_client) + flavor_id = 'iphone8' # str | Flavor ID. + + try: + # Get the device frame image for a model + api_response = api_instance.v3_get_frame_image(flavor_id) + print("The response of FlavorsApi->v3_get_frame_image:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FlavorsApi->v3_get_frame_image: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flavor_id** | **str**| Flavor ID. | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Frame image file. | - | +**404** | No frame image found for the given flavor ID. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_product_image** +> bytearray v3_get_product_image(flavor_id) + +Get the product image for a model + +Downloads a product picture of the device model, for example to show in a model picker. Returns 404 if the model has no product image. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.FlavorsApi(api_client) + flavor_id = 'iphone8' # str | Flavor ID. + + try: + # Get the product image for a model + api_response = api_instance.v3_get_product_image(flavor_id) + print("The response of FlavorsApi->v3_get_product_image:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FlavorsApi->v3_get_product_image: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **flavor_id** | **str**| Flavor ID. | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Product image file. | - | +**404** | No product image found for the given flavor ID. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/GetAssessmentsByInstanceId500Response.md b/docs/GetAssessmentsByInstanceId500Response.md deleted file mode 100644 index 7c18acd..0000000 --- a/docs/GetAssessmentsByInstanceId500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAssessmentsByInstanceId500Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetFirmwareInfoBody.md b/docs/GetFirmwareInfoBody.md new file mode 100644 index 0000000..b9c2fa8 --- /dev/null +++ b/docs/GetFirmwareInfoBody.md @@ -0,0 +1,30 @@ +# GetFirmwareInfoBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password to decrypt an encrypted firmware file. | [optional] +**extended** | **bool** | Include extended info such as board config, bdid, cpid, platform, and the matched device. | [optional] + +## Example + +```python +from corellium.models.get_firmware_info_body import GetFirmwareInfoBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetFirmwareInfoBody from a JSON string +get_firmware_info_body_instance = GetFirmwareInfoBody.from_json(json) +# print the JSON string representation of the object +print(GetFirmwareInfoBody.to_json()) + +# convert the object into a dict +get_firmware_info_body_dict = get_firmware_info_body_instance.to_dict() +# create an instance of GetFirmwareInfoBody from a dict +get_firmware_info_body_from_dict = GetFirmwareInfoBody.from_dict(get_firmware_info_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetInterconnectsResponse.md b/docs/GetInterconnectsResponse.md index 4b09300..0fb935e 100644 --- a/docs/GetInterconnectsResponse.md +++ b/docs/GetInterconnectsResponse.md @@ -3,14 +3,32 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**results** | [**list[InterconnectResponse]**](InterconnectResponse.md) | Array of interconnects | [optional] +**results** | [**List[InterconnectResponse]**](InterconnectResponse.md) | Array of interconnects | [optional] **count** | **float** | Number of interconnects in this response | [optional] **total** | **float** | Total number of interconnects | [optional] **limit** | **float** | Limit used for pagination | [optional] **offset** | **float** | Offset used for pagination | [optional] +## Example + +```python +from corellium.models.get_interconnects_response import GetInterconnectsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetInterconnectsResponse from a JSON string +get_interconnects_response_instance = GetInterconnectsResponse.from_json(json) +# print the JSON string representation of the object +print(GetInterconnectsResponse.to_json()) + +# convert the object into a dict +get_interconnects_response_dict = get_interconnects_response_instance.to_dict() +# create an instance of GetInterconnectsResponse from a dict +get_interconnects_response_from_dict = GetInterconnectsResponse.from_dict(get_interconnects_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetInviteByTokenBody.md b/docs/GetInviteByTokenBody.md new file mode 100644 index 0000000..86f7f60 --- /dev/null +++ b/docs/GetInviteByTokenBody.md @@ -0,0 +1,29 @@ +# GetInviteByTokenBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Invite token. | + +## Example + +```python +from corellium.models.get_invite_by_token_body import GetInviteByTokenBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetInviteByTokenBody from a JSON string +get_invite_by_token_body_instance = GetInviteByTokenBody.from_json(json) +# print the JSON string representation of the object +print(GetInviteByTokenBody.to_json()) + +# convert the object into a dict +get_invite_by_token_body_dict = get_invite_by_token_body_instance.to_dict() +# create an instance of GetInviteByTokenBody from a dict +get_invite_by_token_body_from_dict = GetInviteByTokenBody.from_dict(get_invite_by_token_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetResetLinkInfoBody.md b/docs/GetResetLinkInfoBody.md new file mode 100644 index 0000000..195bb12 --- /dev/null +++ b/docs/GetResetLinkInfoBody.md @@ -0,0 +1,29 @@ +# GetResetLinkInfoBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Password reset token. | + +## Example + +```python +from corellium.models.get_reset_link_info_body import GetResetLinkInfoBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetResetLinkInfoBody from a JSON string +get_reset_link_info_body_instance = GetResetLinkInfoBody.from_json(json) +# print the JSON string representation of the object +print(GetResetLinkInfoBody.to_json()) + +# convert the object into a dict +get_reset_link_info_body_dict = get_reset_link_info_body_instance.to_dict() +# create an instance of GetResetLinkInfoBody from a dict +get_reset_link_info_body_from_dict = GetResetLinkInfoBody.from_dict(get_reset_link_info_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetStorageResponse.md b/docs/GetStorageResponse.md new file mode 100644 index 0000000..e4e5b1f --- /dev/null +++ b/docs/GetStorageResponse.md @@ -0,0 +1,34 @@ +# GetStorageResponse + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[MediaStoreV1]**](MediaStoreV1.md) | Array of storage devices | [optional] +**count** | **float** | Number of storage devices in this response | [optional] +**total** | **float** | Total number of storage devices | [optional] +**limit** | **float** | Limit used for pagination | [optional] +**offset** | **float** | Offset used for pagination | [optional] + +## Example + +```python +from corellium.models.get_storage_response import GetStorageResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetStorageResponse from a JSON string +get_storage_response_instance = GetStorageResponse.from_json(json) +# print the JSON string representation of the object +print(GetStorageResponse.to_json()) + +# convert the object into a dict +get_storage_response_dict = get_storage_response_instance.to_dict() +# create an instance of GetStorageResponse from a dict +get_storage_response_from_dict = GetStorageResponse.from_dict(get_storage_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GpioStateDefinition.md b/docs/GpioStateDefinition.md index 74f5d9a..fba1258 100644 --- a/docs/GpioStateDefinition.md +++ b/docs/GpioStateDefinition.md @@ -1,13 +1,30 @@ # GpioStateDefinition - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bit_count** | **float** | count of bits in members of this bank | -**banks** | **list[list[Bit]]** | bits for each bank of this name as an array of arrays | +**bit_count** | **float** | Count of bits in members of this bank. | +**banks** | **List[List[GpioStateDefinitionBanksInnerInner]]** | Bits for each bank of this name as an array of arrays. | + +## Example + +```python +from corellium.models.gpio_state_definition import GpioStateDefinition + +# TODO update the JSON string below +json = "{}" +# create an instance of GpioStateDefinition from a JSON string +gpio_state_definition_instance = GpioStateDefinition.from_json(json) +# print the JSON string representation of the object +print(GpioStateDefinition.to_json()) +# convert the object into a dict +gpio_state_definition_dict = gpio_state_definition_instance.to_dict() +# create an instance of GpioStateDefinition from a dict +gpio_state_definition_from_dict = GpioStateDefinition.from_dict(gpio_state_definition_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GpioStateDefinitionBanksInnerInner.md b/docs/GpioStateDefinitionBanksInnerInner.md new file mode 100644 index 0000000..7c770f5 --- /dev/null +++ b/docs/GpioStateDefinitionBanksInnerInner.md @@ -0,0 +1,28 @@ +# GpioStateDefinitionBanksInnerInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```python +from corellium.models.gpio_state_definition_banks_inner_inner import GpioStateDefinitionBanksInnerInner + +# TODO update the JSON string below +json = "{}" +# create an instance of GpioStateDefinitionBanksInnerInner from a JSON string +gpio_state_definition_banks_inner_inner_instance = GpioStateDefinitionBanksInnerInner.from_json(json) +# print the JSON string representation of the object +print(GpioStateDefinitionBanksInnerInner.to_json()) + +# convert the object into a dict +gpio_state_definition_banks_inner_inner_dict = gpio_state_definition_banks_inner_inner_instance.to_dict() +# create an instance of GpioStateDefinitionBanksInnerInner from a dict +gpio_state_definition_banks_inner_inner_from_dict = GpioStateDefinitionBanksInnerInner.from_dict(gpio_state_definition_banks_inner_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GpioStateDefinitionV1.md b/docs/GpioStateDefinitionV1.md new file mode 100644 index 0000000..7fdf506 --- /dev/null +++ b/docs/GpioStateDefinitionV1.md @@ -0,0 +1,31 @@ +# GpioStateDefinitionV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bit_count** | **float** | count of bits in members of this bank | +**banks** | **List[List[Bit]]** | bits for each bank of this name as an array of arrays | + +## Example + +```python +from corellium.models.gpio_state_definition_v1 import GpioStateDefinitionV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of GpioStateDefinitionV1 from a JSON string +gpio_state_definition_v1_instance = GpioStateDefinitionV1.from_json(json) +# print the JSON string representation of the object +print(GpioStateDefinitionV1.to_json()) + +# convert the object into a dict +gpio_state_definition_v1_dict = gpio_state_definition_v1_instance.to_dict() +# create an instance of GpioStateDefinitionV1 from a dict +gpio_state_definition_v1_from_dict = GpioStateDefinitionV1.from_dict(gpio_state_definition_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GpiosState.md b/docs/GpiosState.md index 7f1bb74..39392ca 100644 --- a/docs/GpiosState.md +++ b/docs/GpiosState.md @@ -1,14 +1,32 @@ # GpiosState -Current state of GPIOs +State of the simulated LEDs, buttons and switches on an IoT or embedded board model. Each group (`led`, `button`, `switch`) has one or more banks, and each bank is a list of bits: 1 is on (pressed, lit), 0 is off. Only board models that wire these up report them; phones (iOS and Android) do not. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **led** | [**GpioStateDefinition**](GpioStateDefinition.md) | | [optional] **button** | [**GpioStateDefinition**](GpioStateDefinition.md) | | [optional] **switch** | [**GpioStateDefinition**](GpioStateDefinition.md) | | [optional] +## Example + +```python +from corellium.models.gpios_state import GpiosState + +# TODO update the JSON string below +json = "{}" +# create an instance of GpiosState from a JSON string +gpios_state_instance = GpiosState.from_json(json) +# print the JSON string representation of the object +print(GpiosState.to_json()) + +# convert the object into a dict +gpios_state_dict = gpios_state_instance.to_dict() +# create an instance of GpiosState from a dict +gpios_state_from_dict = GpiosState.from_dict(gpios_state_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GpiosStateV1.md b/docs/GpiosStateV1.md new file mode 100644 index 0000000..4dd5d8d --- /dev/null +++ b/docs/GpiosStateV1.md @@ -0,0 +1,32 @@ +# GpiosStateV1 + +Current state of GPIOs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**led** | [**GpioStateDefinitionV1**](GpioStateDefinitionV1.md) | | [optional] +**button** | [**GpioStateDefinitionV1**](GpioStateDefinitionV1.md) | | [optional] +**switch** | [**GpioStateDefinitionV1**](GpioStateDefinitionV1.md) | | [optional] + +## Example + +```python +from corellium.models.gpios_state_v1 import GpiosStateV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of GpiosStateV1 from a JSON string +gpios_state_v1_instance = GpiosStateV1.from_json(json) +# print the JSON string representation of the object +print(GpiosStateV1.to_json()) + +# convert the object into a dict +gpios_state_v1_dict = gpios_state_v1_instance.to_dict() +# create an instance of GpiosStateV1 from a dict +gpios_state_v1_from_dict = GpiosStateV1.from_dict(gpios_state_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GrantTrialRequestResponse.md b/docs/GrantTrialRequestResponse.md deleted file mode 100644 index 67f1d66..0000000 --- a/docs/GrantTrialRequestResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GrantTrialRequestResponse - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **str** | Trial request code | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Hook.md b/docs/Hook.md index ad9b410..56089f1 100644 --- a/docs/Hook.md +++ b/docs/Hook.md @@ -1,20 +1,37 @@ # Hook - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identifier** | **str** | Identifier | [optional] -**label** | **str** | Label | [optional] -**address** | **str** | Address | [optional] -**patch** | **str** | Patch | [optional] -**patch_type** | **str** | Patch Type | [optional] -**enabled** | **bool** | If true, instances can call required hooks | [optional] -**created_at** | **str** | Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | [optional] -**updated_at** | **str** | Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | [optional] -**instance_id** | **str** | Instance Id | [optional] +**identifier** | **str** | Hook identifier. | +**label** | **str** | Hook label. | +**address** | **str** | EL1/kernel virtual address, in hexadecimal, where the hook fires: the patch runs each time the device executes the instruction at this address. If a slide is applied at runtime, do not include it. | +**patch** | **str** | The code to run when the hook fires, in the language given by `patchType`. | +**patch_type** | [**HookPatchType**](HookPatchType.md) | | +**enabled** | **bool** | Whether the hook runs. Disabled hooks are kept but skipped. | +**instance_id** | **str** | Owning instance identifier. | +**created_at** | **datetime** | Creation timestamp. | +**updated_at** | **datetime** | Last update timestamp. | + +## Example + +```python +from corellium.models.hook import Hook + +# TODO update the JSON string below +json = "{}" +# create an instance of Hook from a JSON string +hook_instance = Hook.from_json(json) +# print the JSON string representation of the object +print(Hook.to_json()) +# convert the object into a dict +hook_dict = hook_instance.to_dict() +# create an instance of Hook from a dict +hook_from_dict = Hook.from_dict(hook_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/HookList.md b/docs/HookList.md new file mode 100644 index 0000000..dc05eaa --- /dev/null +++ b/docs/HookList.md @@ -0,0 +1,34 @@ +# HookList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Hook]**](Hook.md) | List of hypervisor hooks. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.hook_list import HookList + +# TODO update the JSON string below +json = "{}" +# create an instance of HookList from a JSON string +hook_list_instance = HookList.from_json(json) +# print the JSON string representation of the object +print(HookList.to_json()) + +# convert the object into a dict +hook_list_dict = hook_list_instance.to_dict() +# create an instance of HookList from a dict +hook_list_from_dict = HookList.from_dict(hook_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HookPatchType.md b/docs/HookPatchType.md new file mode 100644 index 0000000..f7c3aa3 --- /dev/null +++ b/docs/HookPatchType.md @@ -0,0 +1,13 @@ +# HookPatchType + +Language the `patch` is written in: `csmfcc` for a C-like language, or `csmfvm` for an assembly-like language. + +## Enum + +* `CSMFCC` (value: `'csmfcc'`) + +* `CSMFVM` (value: `'csmfvm'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HookV1.md b/docs/HookV1.md new file mode 100644 index 0000000..c515767 --- /dev/null +++ b/docs/HookV1.md @@ -0,0 +1,38 @@ +# HookV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Identifier | [optional] +**label** | **str** | Label | [optional] +**address** | **str** | Address | [optional] +**patch** | **str** | Patch | [optional] +**patch_type** | **str** | Patch Type | [optional] +**enabled** | **bool** | If true, instances can call required hooks | [optional] +**created_at** | **str** | Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | [optional] +**updated_at** | **str** | Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | [optional] +**instance_id** | **str** | Instance Id | [optional] + +## Example + +```python +from corellium.models.hook_v1 import HookV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of HookV1 from a JSON string +hook_v1_instance = HookV1.from_json(json) +# print the JSON string representation of the object +print(HookV1.to_json()) + +# convert the object into a dict +hook_v1_dict = hook_v1_instance.to_dict() +# create an instance of HookV1 from a dict +hook_v1_from_dict = HookV1.from_dict(hook_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HyperTraceApi.md b/docs/HyperTraceApi.md new file mode 100644 index 0000000..a5be67e --- /dev/null +++ b/docs/HyperTraceApi.md @@ -0,0 +1,444 @@ +# corellium.HyperTraceApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_btrace_preauthorize**](HyperTraceApi.md#v3_btrace_preauthorize) | **GET** /v3/instances/{instanceId}/btrace-authorize | Get a HyperTrace download token +[**v3_clear_hyper_trace**](HyperTraceApi.md#v3_clear_hyper_trace) | **DELETE** /v3/instances/{instanceId}/btrace | Clear HyperTrace output +[**v3_get_instance_kcrange**](HyperTraceApi.md#v3_get_instance_kcrange) | **GET** /v3/instances/{instanceId}/btrace-kcrange | List kernel extension address ranges +[**v3_start_hyper_trace**](HyperTraceApi.md#v3_start_hyper_trace) | **POST** /v3/instances/{instanceId}/btrace/enable | Start HyperTrace +[**v3_stop_hyper_trace**](HyperTraceApi.md#v3_stop_hyper_trace) | **POST** /v3/instances/{instanceId}/btrace/disable | Stop HyperTrace + + +# **v3_btrace_preauthorize** +> Token v3_btrace_preauthorize(instance_id) + +Get a HyperTrace download token + +Returns a short-lived token that authorizes downloading this device's HyperTrace output without an `Authorization` header. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's trace and expires when your current session token expires. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.token import Token +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get a HyperTrace download token + api_response = api_instance.v3_btrace_preauthorize(instance_id) + print("The response of HyperTraceApi->v3_btrace_preauthorize:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HyperTraceApi->v3_btrace_preauthorize: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**Token**](Token.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_clear_hyper_trace** +> v3_clear_hyper_trace(instance_id) + +Clear HyperTrace output + +Deletes the HyperTrace output recorded so far on this device. An unknown `instanceId` is a successful no-op that returns 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Clear HyperTrace output + api_instance.v3_clear_hyper_trace(instance_id) + except Exception as e: + print("Exception when calling HyperTraceApi->v3_clear_hyper_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_kcrange** +> List[Kcrange] v3_get_instance_kcrange(instance_id) + +List kernel extension address ranges + +Lists the kernel extensions loaded on the device with the memory address range each occupies. Pass a `range` to `v3StartHyperTrace` to trace code in just that extension. The device must be running. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.kcrange import Kcrange +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # List kernel extension address ranges + api_response = api_instance.v3_get_instance_kcrange(instance_id) + print("The response of HyperTraceApi->v3_get_instance_kcrange:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HyperTraceApi->v3_get_instance_kcrange: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**List[Kcrange]**](Kcrange.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Kcranges. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_hyper_trace** +> v3_start_hyper_trace(instance_id, enable_btrace_body) + +Start HyperTrace + +Starts HyperTrace on a running device. HyperTrace records which kernel code runs inside the address ranges you choose, without changing the device's software, so you can measure kernel code coverage. + +**Workflow:** list kernel extensions with `v3GetInstanceKcrange`, start tracing with the `ranges` you want (this call), exercise the device, stop with `v3StopHyperTrace`, then download with `v3BtracePreauthorize`. Clear old output with `v3ClearHyperTrace`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.enable_btrace_body import EnableBtraceBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + enable_btrace_body = corellium.EnableBtraceBody() # EnableBtraceBody | + + try: + # Start HyperTrace + api_instance.v3_start_hyper_trace(instance_id, enable_btrace_body) + except Exception as e: + print("Exception when calling HyperTraceApi->v3_start_hyper_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **enable_btrace_body** | [**EnableBtraceBody**](EnableBtraceBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_stop_hyper_trace** +> v3_stop_hyper_trace(instance_id) + +Stop HyperTrace + +Stops HyperTrace on this device. The trace recorded so far is kept for download with `v3BtracePreauthorize`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Stop HyperTrace + api_instance.v3_stop_hyper_trace(instance_id) + except Exception as e: + print("Exception when calling HyperTraceApi->v3_stop_hyper_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/HyperTraceV1Api.md b/docs/HyperTraceV1Api.md new file mode 100644 index 0000000..612555d --- /dev/null +++ b/docs/HyperTraceV1Api.md @@ -0,0 +1,426 @@ +# corellium.HyperTraceV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_btrace_preauthorize**](HyperTraceV1Api.md#v1_btrace_preauthorize) | **GET** /v1/instances/{instanceId}/btrace-authorize | Pre-authorize an btrace download +[**v1_clear_hyper_trace**](HyperTraceV1Api.md#v1_clear_hyper_trace) | **DELETE** /v1/instances/{instanceId}/btrace | Clear HyperTrace logs +[**v1_kcrange**](HyperTraceV1Api.md#v1_kcrange) | **GET** /v1/instances/{instanceId}/btrace-kcrange | Get Kernel extension ranges +[**v1_start_hyper_trace**](HyperTraceV1Api.md#v1_start_hyper_trace) | **POST** /v1/instances/{instanceId}/btrace/enable | Start HyperTrace on an instance +[**v1_stop_hyper_trace**](HyperTraceV1Api.md#v1_stop_hyper_trace) | **POST** /v1/instances/{instanceId}/btrace/disable | Stop HyperTrace on an instance. + + +# **v1_btrace_preauthorize** +> TokenV1 v1_btrace_preauthorize(instance_id) + +Pre-authorize an btrace download + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.token_v1 import TokenV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Pre-authorize an btrace download + api_response = api_instance.v1_btrace_preauthorize(instance_id) + print("The response of HyperTraceV1Api->v1_btrace_preauthorize:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HyperTraceV1Api->v1_btrace_preauthorize: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**TokenV1**](TokenV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_clear_hyper_trace** +> v1_clear_hyper_trace(instance_id) + +Clear HyperTrace logs + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Clear HyperTrace logs + api_instance.v1_clear_hyper_trace(instance_id) + except Exception as e: + print("Exception when calling HyperTraceV1Api->v1_clear_hyper_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_kcrange** +> List[KcrangeV1] v1_kcrange(instance_id) + +Get Kernel extension ranges + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.kcrange_v1 import KcrangeV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get Kernel extension ranges + api_response = api_instance.v1_kcrange(instance_id) + print("The response of HyperTraceV1Api->v1_kcrange:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HyperTraceV1Api->v1_kcrange: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**List[KcrangeV1]**](KcrangeV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Kcranges | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_start_hyper_trace** +> v1_start_hyper_trace(instance_id, btrace_enable_options) + +Start HyperTrace on an instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.btrace_enable_options import BtraceEnableOptions +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + btrace_enable_options = corellium.BtraceEnableOptions() # BtraceEnableOptions | + + try: + # Start HyperTrace on an instance + api_instance.v1_start_hyper_trace(instance_id, btrace_enable_options) + except Exception as e: + print("Exception when calling HyperTraceV1Api->v1_start_hyper_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **btrace_enable_options** | [**BtraceEnableOptions**](BtraceEnableOptions.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_stop_hyper_trace** +> v1_stop_hyper_trace(instance_id) + +Stop HyperTrace on an instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HyperTraceV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Stop HyperTrace on an instance. + api_instance.v1_stop_hyper_trace(instance_id) + except Exception as e: + print("Exception when calling HyperTraceV1Api->v1_stop_hyper_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/HypertuneApi.md b/docs/HypertuneApi.md new file mode 100644 index 0000000..20ec294 --- /dev/null +++ b/docs/HypertuneApi.md @@ -0,0 +1,204 @@ +# corellium.HypertuneApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_hypertune_hash**](HypertuneApi.md#v3_hypertune_hash) | **GET** /v3/hypertune/hash | Get Hypertune state hash +[**v3_hypertune_init**](HypertuneApi.md#v3_hypertune_init) | **GET** /v3/hypertune/init | Get Hypertune initialization data + + +# **v3_hypertune_hash** +> HypertuneHashResponse v3_hypertune_hash(token=token, branch=branch, body=body) + +Get Hypertune state hash + +Returns a short fingerprint of the current feature-flag settings for this cluster. The web interface compares it with its cached copy and downloads the full settings with `v3HypertuneInit` only when it changes. Most API clients do not need this. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hypertune_hash_response import HypertuneHashResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypertuneApi(api_client) + token = 'token_example' # str | Hypertune access token. (optional) + branch = 'branch_example' # str | Hypertune branch name. (optional) + body = 'body_example' # str | URL-encoded Hypertune SDK request body. (optional) + + try: + # Get Hypertune state hash + api_response = api_instance.v3_hypertune_hash(token=token, branch=branch, body=body) + print("The response of HypertuneApi->v3_hypertune_hash:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypertuneApi->v3_hypertune_hash: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| Hypertune access token. | [optional] + **branch** | **str**| Hypertune branch name. | [optional] + **body** | **str**| URL-encoded Hypertune SDK request body. | [optional] + +### Return type + +[**HypertuneHashResponse**](HypertuneHashResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Hypertune state hash. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_hypertune_init** +> HypertuneInitResponse v3_hypertune_init(token=token, branch=branch, body=body) + +Get Hypertune initialization data + +Returns the full feature-flag settings for this cluster, which the web interface uses to decide which features to show. Most API clients do not need this; use `GET /v3/config` to learn what a deployment supports. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hypertune_init_response import HypertuneInitResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypertuneApi(api_client) + token = 'token_example' # str | Hypertune access token. (optional) + branch = 'branch_example' # str | Hypertune branch name. (optional) + body = 'body_example' # str | URL-encoded Hypertune SDK request body. (optional) + + try: + # Get Hypertune initialization data + api_response = api_instance.v3_hypertune_init(token=token, branch=branch, body=body) + print("The response of HypertuneApi->v3_hypertune_init:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypertuneApi->v3_hypertune_init: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| Hypertune access token. | [optional] + **branch** | **str**| Hypertune branch name. | [optional] + **body** | **str**| URL-encoded Hypertune SDK request body. | [optional] + +### Return type + +[**HypertuneInitResponse**](HypertuneInitResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Hypertune initialization data. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/HypertuneHashResponse.md b/docs/HypertuneHashResponse.md new file mode 100644 index 0000000..098e8d1 --- /dev/null +++ b/docs/HypertuneHashResponse.md @@ -0,0 +1,29 @@ +# HypertuneHashResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hash** | **str** | Current Hypertune state hash. | + +## Example + +```python +from corellium.models.hypertune_hash_response import HypertuneHashResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HypertuneHashResponse from a JSON string +hypertune_hash_response_instance = HypertuneHashResponse.from_json(json) +# print the JSON string representation of the object +print(HypertuneHashResponse.to_json()) + +# convert the object into a dict +hypertune_hash_response_dict = hypertune_hash_response_instance.to_dict() +# create an instance of HypertuneHashResponse from a dict +hypertune_hash_response_from_dict = HypertuneHashResponse.from_dict(hypertune_hash_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HypertuneInitResponse.md b/docs/HypertuneInitResponse.md new file mode 100644 index 0000000..a0944e0 --- /dev/null +++ b/docs/HypertuneInitResponse.md @@ -0,0 +1,33 @@ +# HypertuneInitResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit_id** | **float** | Hypertune configuration commit ID. | [optional] +**hash** | **str** | Hypertune configuration state hash. | [optional] +**reduced_expression** | **Dict[str, Optional[object]]** | Reduced Hypertune evaluation expression. | [optional] +**splits** | **Dict[str, Optional[object]]** | Hypertune split configuration. | [optional] +**commit_config** | **Dict[str, Optional[object]]** | Hypertune commit configuration. | [optional] + +## Example + +```python +from corellium.models.hypertune_init_response import HypertuneInitResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of HypertuneInitResponse from a JSON string +hypertune_init_response_instance = HypertuneInitResponse.from_json(json) +# print the JSON string representation of the object +print(HypertuneInitResponse.to_json()) + +# convert the object into a dict +hypertune_init_response_dict = hypertune_init_response_instance.to_dict() +# create an instance of HypertuneInitResponse from a dict +hypertune_init_response_from_dict = HypertuneInitResponse.from_dict(hypertune_init_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HypervisorHooksApi.md b/docs/HypervisorHooksApi.md new file mode 100644 index 0000000..a30e35a --- /dev/null +++ b/docs/HypervisorHooksApi.md @@ -0,0 +1,614 @@ +# corellium.HypervisorHooksApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_clear_hyper_trace_hooks**](HypervisorHooksApi.md#v3_clear_hyper_trace_hooks) | **POST** /v3/instances/{instanceId}/hooks/clear | Stop hypervisor hooks +[**v3_create_hook**](HypervisorHooksApi.md#v3_create_hook) | **POST** /v3/instances/{instanceId}/hooks | Create a hypervisor hook for an instance +[**v3_delete_hook**](HypervisorHooksApi.md#v3_delete_hook) | **DELETE** /v3/hooks/{hookId} | Delete a hypervisor hook +[**v3_execute_hyper_trace_hooks**](HypervisorHooksApi.md#v3_execute_hyper_trace_hooks) | **POST** /v3/instances/{instanceId}/hooks/execute | Run hypervisor hooks +[**v3_get_hook**](HypervisorHooksApi.md#v3_get_hook) | **GET** /v3/hooks/{hookId} | Get a hypervisor hook by ID +[**v3_list_hooks**](HypervisorHooksApi.md#v3_list_hooks) | **GET** /v3/instances/{instanceId}/hooks | List hypervisor hooks for an instance +[**v3_update_hook**](HypervisorHooksApi.md#v3_update_hook) | **PUT** /v3/hooks/{hookId} | Update a hypervisor hook + + +# **v3_clear_hyper_trace_hooks** +> v3_clear_hyper_trace_hooks(instance_id) + +Stop hypervisor hooks + +Deactivates the hypervisor hooks on this device, so they stop running. The hook definitions are kept and can be activated again with `v3ExecuteHyperTraceHooks`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Stop hypervisor hooks + api_instance.v3_clear_hyper_trace_hooks(instance_id) + except Exception as e: + print("Exception when calling HypervisorHooksApi->v3_clear_hyper_trace_hooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_create_hook** +> Hook v3_create_hook(instance_id, create_hook_body) + +Create a hypervisor hook for an instance + +Adds a hypervisor hook to a device: the `patch` code runs each time the device executes `address`. Hooks are enabled by default. Activate the device's hooks with `POST /v3/instances/{instanceId}/hooks/execute` and deactivate them with `.../hooks/clear`. Returns 201 with the new hook. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_hook_body import CreateHookBody +from corellium.models.hook import Hook +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance identifier. + create_hook_body = corellium.CreateHookBody() # CreateHookBody | + + try: + # Create a hypervisor hook for an instance + api_response = api_instance.v3_create_hook(instance_id, create_hook_body) + print("The response of HypervisorHooksApi->v3_create_hook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypervisorHooksApi->v3_create_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance identifier. | + **create_hook_body** | [**CreateHookBody**](CreateHookBody.md)| | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Hook created. | - | +**400** | Invalid request body. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_hook** +> v3_delete_hook(hook_id) + +Delete a hypervisor hook + +Deletes a hypervisor hook from its device. + +Deletes are idempotent: an unknown `hookId`, or a hook that was already deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksApi(api_client) + hook_id = '2a1192e8-c7de-4981-bc11-c87fd1f12d13' # str | Hook identifier. + + try: + # Delete a hypervisor hook + api_instance.v3_delete_hook(hook_id) + except Exception as e: + print("Exception when calling HypervisorHooksApi->v3_delete_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hook_id** | **str**| Hook identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Hook deleted. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_execute_hyper_trace_hooks** +> v3_execute_hyper_trace_hooks(instance_id) + +Run hypervisor hooks + +Activates the hypervisor hooks configured for this device. A hook is a small patch, written in a C-like (`csmfcc`) or assembly-like (`csmfvm`) language, that runs whenever the device executes a chosen memory address; create and manage hooks with the Hypervisor Hooks endpoints (`POST /v3/instances/{instanceId}/hooks`). Only hooks marked `enabled` run. Does nothing if no hooks are configured. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Run hypervisor hooks + api_instance.v3_execute_hyper_trace_hooks(instance_id) + except Exception as e: + print("Exception when calling HypervisorHooksApi->v3_execute_hyper_trace_hooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_hook** +> Hook v3_get_hook(hook_id) + +Get a hypervisor hook by ID + +Returns one hypervisor hook, including its address, patch code and whether it is enabled. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hook import Hook +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksApi(api_client) + hook_id = '2a1192e8-c7de-4981-bc11-c87fd1f12d13' # str | Hook identifier. + + try: + # Get a hypervisor hook by ID + api_response = api_instance.v3_get_hook(hook_id) + print("The response of HypervisorHooksApi->v3_get_hook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypervisorHooksApi->v3_get_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hook_id** | **str**| Hook identifier. | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Hook. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No hook with the given hookId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_hooks** +> HookList v3_list_hooks(instance_id, limit=limit, offset=offset, sort=sort) + +List hypervisor hooks for an instance + +Lists the hypervisor hooks set up on a device. A hook is a small piece of code, written in a C-like or assembly-like language, that the hypervisor runs whenever the device executes a chosen memory address, without changing the software on the device. Use hooks to log values, change behavior, or bypass checks while testing. Results are paginated; `sort` orders them by creation date. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hook_list import HookList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance identifier. + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + sort = DESC # str | Sort order by creation date. (optional) (default to DESC) + + try: + # List hypervisor hooks for an instance + api_response = api_instance.v3_list_hooks(instance_id, limit=limit, offset=offset, sort=sort) + print("The response of HypervisorHooksApi->v3_list_hooks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypervisorHooksApi->v3_list_hooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance identifier. | + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **sort** | **str**| Sort order by creation date. | [optional] [default to DESC] + +### Return type + +[**HookList**](HookList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of hypervisor hooks. | - | +**400** | Invalid query parameters. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_update_hook** +> Hook v3_update_hook(hook_id, update_hook_body=update_hook_body) + +Update a hypervisor hook + +Changes a hypervisor hook. Send only the fields you want to change, for example `enabled: false` to switch it off without deleting it. Returns the updated hook. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hook import Hook +from corellium.models.update_hook_body import UpdateHookBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksApi(api_client) + hook_id = '2a1192e8-c7de-4981-bc11-c87fd1f12d13' # str | Hook identifier. + update_hook_body = corellium.UpdateHookBody() # UpdateHookBody | (optional) + + try: + # Update a hypervisor hook + api_response = api_instance.v3_update_hook(hook_id, update_hook_body=update_hook_body) + print("The response of HypervisorHooksApi->v3_update_hook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypervisorHooksApi->v3_update_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hook_id** | **str**| Hook identifier. | + **update_hook_body** | [**UpdateHookBody**](UpdateHookBody.md)| | [optional] + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated hook. | - | +**400** | Invalid request body. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No hook with the given hookId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/HypervisorHooksV1Api.md b/docs/HypervisorHooksV1Api.md new file mode 100644 index 0000000..70bef6f --- /dev/null +++ b/docs/HypervisorHooksV1Api.md @@ -0,0 +1,594 @@ +# corellium.HypervisorHooksV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_clear_hyper_trace_hooks**](HypervisorHooksV1Api.md#v1_clear_hyper_trace_hooks) | **POST** /v1/instances/{instanceId}/hooks/clear | Clear Hooks on an instance +[**v1_create_hook**](HypervisorHooksV1Api.md#v1_create_hook) | **POST** /v1/instances/{instanceId}/hooks | Create hypervisor hook for Instance +[**v1_delete_hook**](HypervisorHooksV1Api.md#v1_delete_hook) | **DELETE** /v1/hooks/{hookId} | Delete an existing hypervisor hook +[**v1_execute_hyper_trace_hooks**](HypervisorHooksV1Api.md#v1_execute_hyper_trace_hooks) | **POST** /v1/instances/{instanceId}/hooks/execute | Execute Hooks on an instance +[**v1_get_hook_by_id**](HypervisorHooksV1Api.md#v1_get_hook_by_id) | **GET** /v1/hooks/{hookId} | Get hypervisor hook by id +[**v1_get_hooks**](HypervisorHooksV1Api.md#v1_get_hooks) | **GET** /v1/instances/{instanceId}/hooks | Get all hypervisor hooks for Instance +[**v1_update_hook**](HypervisorHooksV1Api.md#v1_update_hook) | **PUT** /v1/hooks/{hookId} | Update an existing hypervisor hook + + +# **v1_clear_hyper_trace_hooks** +> v1_clear_hyper_trace_hooks(instance_id) + +Clear Hooks on an instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Clear Hooks on an instance + api_instance.v1_clear_hyper_trace_hooks(instance_id) + except Exception as e: + print("Exception when calling HypervisorHooksV1Api->v1_clear_hyper_trace_hooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_create_hook** +> HookV1 v1_create_hook(instance_id, v1_create_hook_parameters) + +Create hypervisor hook for Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hook_v1 import HookV1 +from corellium.models.v1_create_hook_parameters import V1CreateHookParameters +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + v1_create_hook_parameters = corellium.V1CreateHookParameters() # V1CreateHookParameters | application/json + + try: + # Create hypervisor hook for Instance + api_response = api_instance.v1_create_hook(instance_id, v1_create_hook_parameters) + print("The response of HypervisorHooksV1Api->v1_create_hook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypervisorHooksV1Api->v1_create_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **v1_create_hook_parameters** | [**V1CreateHookParameters**](V1CreateHookParameters.md)| application/json | + +### Return type + +[**HookV1**](HookV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Hook | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_hook** +> v1_delete_hook(hook_id) + +Delete an existing hypervisor hook + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksV1Api(api_client) + hook_id = 'hook_id_example' # str | Hook ID + + try: + # Delete an existing hypervisor hook + api_instance.v1_delete_hook(hook_id) + except Exception as e: + print("Exception when calling HypervisorHooksV1Api->v1_delete_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hook_id** | **str**| Hook ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_execute_hyper_trace_hooks** +> v1_execute_hyper_trace_hooks(instance_id) + +Execute Hooks on an instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Execute Hooks on an instance + api_instance.v1_execute_hyper_trace_hooks(instance_id) + except Exception as e: + print("Exception when calling HypervisorHooksV1Api->v1_execute_hyper_trace_hooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_hook_by_id** +> HookV1 v1_get_hook_by_id(hook_id) + +Get hypervisor hook by id + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hook_v1 import HookV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksV1Api(api_client) + hook_id = 'hook_id_example' # str | Hook Id + + try: + # Get hypervisor hook by id + api_response = api_instance.v1_get_hook_by_id(hook_id) + print("The response of HypervisorHooksV1Api->v1_get_hook_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypervisorHooksV1Api->v1_get_hook_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hook_id** | **str**| Hook Id | + +### Return type + +[**HookV1**](HookV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Hook | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_hooks** +> List[HookV1] v1_get_hooks(instance_id, limit=limit, offset=offset, sort=sort) + +Get all hypervisor hooks for Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hook_v1 import HookV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + limit = 3.4 # float | limit for pagination results, defaults to 20 (optional) + offset = 3.4 # float | offset for pagination results, defaults to 0 (optional) + sort = 'sort_example' # str | sort ASC or DESC, defaults to DESC (optional) + + try: + # Get all hypervisor hooks for Instance + api_response = api_instance.v1_get_hooks(instance_id, limit=limit, offset=offset, sort=sort) + print("The response of HypervisorHooksV1Api->v1_get_hooks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypervisorHooksV1Api->v1_get_hooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **limit** | **float**| limit for pagination results, defaults to 20 | [optional] + **offset** | **float**| offset for pagination results, defaults to 0 | [optional] + **sort** | **str**| sort ASC or DESC, defaults to DESC | [optional] + +### Return type + +[**List[HookV1]**](HookV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Hooks | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_hook** +> HookV1 v1_update_hook(hook_id, v1_update_hook_parameters) + +Update an existing hypervisor hook + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.hook_v1 import HookV1 +from corellium.models.v1_update_hook_parameters import V1UpdateHookParameters +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.HypervisorHooksV1Api(api_client) + hook_id = 'hook_id_example' # str | Hook ID + v1_update_hook_parameters = { "enabled": false} # V1UpdateHookParameters | application/json + + try: + # Update an existing hypervisor hook + api_response = api_instance.v1_update_hook(hook_id, v1_update_hook_parameters) + print("The response of HypervisorHooksV1Api->v1_update_hook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HypervisorHooksV1Api->v1_update_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hook_id** | **str**| Hook ID | + **v1_update_hook_parameters** | [**V1UpdateHookParameters**](V1UpdateHookParameters.md)| application/json | + +### Return type + +[**HookV1**](HookV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Hook | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Image.md b/docs/Image.md index 568d119..193dce9 100644 --- a/docs/Image.md +++ b/docs/Image.md @@ -1,21 +1,40 @@ # Image - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **str** | | -**id** | **str** | Image ID | [optional] -**name** | **str** | | [optional] -**type** | **str** | Type of image | [optional] -**filename** | **str** | | [optional] -**uniqueid** | **str** | | [optional] -**size** | **float** | | [optional] -**project** | **str** | project ID | [optional] -**created_at** | **datetime** | When Image was created | [optional] -**updated_at** | **datetime** | When Image was last updated | [optional] +**status** | **str** | Image status. | +**id** | **str** | Image ID. | +**name** | **str** | Name of the image, usually the original filename. Names are not unique: several images can share a name. | +**type** | [**ImageType**](ImageType.md) | | +**size** | **float** | Size in bytes; null until upload completes. | [optional] +**checksum** | **str** | MD5 checksum; null until upload completes. | [optional] +**corellium_checksum** | **str** | Corellium checksum of the image; null until upload completes. | [optional] +**encoding** | [**ImageEncoding**](ImageEncoding.md) | | [optional] +**project** | **str** | ID of the project the image belongs to. Null for a domain-level image, which is available across your domain rather than to one project. | [optional] +**instance** | **str** | ID of the instance (device) the image is attached to, or null if it is not attached to one. | [optional] +**created_at** | **datetime** | When Image was created. | [optional] +**updated_at** | **datetime** | When Image was last updated. | [optional] + +## Example + +```python +from corellium.models.image import Image + +# TODO update the JSON string below +json = "{}" +# create an instance of Image from a JSON string +image_instance = Image.from_json(json) +# print the JSON string representation of the object +print(Image.to_json()) +# convert the object into a dict +image_dict = image_instance.to_dict() +# create an instance of Image from a dict +image_from_dict = Image.from_dict(image_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ImageCreationOptions.md b/docs/ImageCreationOptions.md new file mode 100644 index 0000000..41de6b5 --- /dev/null +++ b/docs/ImageCreationOptions.md @@ -0,0 +1,37 @@ +# ImageCreationOptions + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Image type | +**encoding** | **str** | How the file is stored | +**encapsulated** | **bool** | set to false if the uploaded file is not encapsulated inside an outer zipfile | [optional] +**name** | **str** | Image name | [optional] +**full_path** | **str** | Full local path to image file. When specified, this file MUST exist! | [optional] +**project** | **str** | Project ID | [optional] +**instance** | **str** | Instance ID | [optional] +**file** | **bytearray** | Optionally the actual file | [optional] + +## Example + +```python +from corellium.models.image_creation_options import ImageCreationOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageCreationOptions from a JSON string +image_creation_options_instance = ImageCreationOptions.from_json(json) +# print the JSON string representation of the object +print(ImageCreationOptions.to_json()) + +# convert the object into a dict +image_creation_options_dict = image_creation_options_instance.to_dict() +# create an instance of ImageCreationOptions from a dict +image_creation_options_from_dict = ImageCreationOptions.from_dict(image_creation_options_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageEncoding.md b/docs/ImageEncoding.md new file mode 100644 index 0000000..6108240 --- /dev/null +++ b/docs/ImageEncoding.md @@ -0,0 +1,13 @@ +# ImageEncoding + +How the file is stored. + +## Enum + +* `PLAIN` (value: `'plain'`) + +* `ENCRYPTED` (value: `'encrypted'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageExtended.md b/docs/ImageExtended.md new file mode 100644 index 0000000..b9ccb74 --- /dev/null +++ b/docs/ImageExtended.md @@ -0,0 +1,35 @@ +# ImageExtended + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | OS type | [optional] +**version** | **str** | OS version | [optional] +**buildid** | **str** | Build ID | [optional] +**device_ids** | **List[str]** | List of device identifiers | [optional] +**board_config** | **str** | Board configuration identifier | [optional] +**device** | [**ImageExtendedDevice**](ImageExtendedDevice.md) | | [optional] + +## Example + +```python +from corellium.models.image_extended import ImageExtended + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageExtended from a JSON string +image_extended_instance = ImageExtended.from_json(json) +# print the JSON string representation of the object +print(ImageExtended.to_json()) + +# convert the object into a dict +image_extended_dict = image_extended_instance.to_dict() +# create an instance of ImageExtended from a dict +image_extended_from_dict = ImageExtended.from_dict(image_extended_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageExtendedDevice.md b/docs/ImageExtendedDevice.md new file mode 100644 index 0000000..f13a192 --- /dev/null +++ b/docs/ImageExtendedDevice.md @@ -0,0 +1,31 @@ +# ImageExtendedDevice + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**flavor** | **str** | Device flavor/model name | [optional] +**firmwares** | [**List[ImageFirmware]**](ImageFirmware.md) | List of associated firmware entries | [optional] + +## Example + +```python +from corellium.models.image_extended_device import ImageExtendedDevice + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageExtendedDevice from a JSON string +image_extended_device_instance = ImageExtendedDevice.from_json(json) +# print the JSON string representation of the object +print(ImageExtendedDevice.to_json()) + +# convert the object into a dict +image_extended_device_dict = image_extended_device_instance.to_dict() +# create an instance of ImageExtendedDevice from a dict +image_extended_device_from_dict = ImageExtendedDevice.from_dict(image_extended_device_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageFirmware.md b/docs/ImageFirmware.md new file mode 100644 index 0000000..c77cca3 --- /dev/null +++ b/docs/ImageFirmware.md @@ -0,0 +1,34 @@ +# ImageFirmware + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **str** | Firmware filename | [optional] +**version** | **str** | Firmware version | [optional] +**buildid** | **str** | Build ID | [optional] +**url** | **str** | Download URL or image UUID | [optional] +**orig_url** | **str** | Original source URL | [optional] + +## Example + +```python +from corellium.models.image_firmware import ImageFirmware + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageFirmware from a JSON string +image_firmware_instance = ImageFirmware.from_json(json) +# print the JSON string representation of the object +print(ImageFirmware.to_json()) + +# convert the object into a dict +image_firmware_dict = image_firmware_instance.to_dict() +# create an instance of ImageFirmware from a dict +image_firmware_from_dict = ImageFirmware.from_dict(image_firmware_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageFirmwareInfo.md b/docs/ImageFirmwareInfo.md new file mode 100644 index 0000000..3c2e467 --- /dev/null +++ b/docs/ImageFirmwareInfo.md @@ -0,0 +1,39 @@ +# ImageFirmwareInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Firmware type, e.g. 'ios'. | [optional] +**version** | **str** | OS version. | [optional] +**build_id** | **str** | OS build ID. | [optional] +**device_ids** | **List[str]** | Device identifiers this firmware supports. | [optional] +**board_config** | **str** | Board configuration. | [optional] +**bdid** | **float** | Board ID. | [optional] +**cpid** | **float** | Chip ID. | [optional] +**platform** | **str** | Chip platform. | [optional] +**boot_args** | [**ImageFirmwareInfoBootArgs**](ImageFirmwareInfoBootArgs.md) | | [optional] +**variants** | **List[str]** | Firmware variants. | [optional] +**device** | [**FirmwareInfoDevice**](FirmwareInfoDevice.md) | | [optional] + +## Example + +```python +from corellium.models.image_firmware_info import ImageFirmwareInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageFirmwareInfo from a JSON string +image_firmware_info_instance = ImageFirmwareInfo.from_json(json) +# print the JSON string representation of the object +print(ImageFirmwareInfo.to_json()) + +# convert the object into a dict +image_firmware_info_dict = image_firmware_info_instance.to_dict() +# create an instance of ImageFirmwareInfo from a dict +image_firmware_info_from_dict = ImageFirmwareInfo.from_dict(image_firmware_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageFirmwareInfoBootArgs.md b/docs/ImageFirmwareInfoBootArgs.md new file mode 100644 index 0000000..82129b1 --- /dev/null +++ b/docs/ImageFirmwareInfoBootArgs.md @@ -0,0 +1,31 @@ +# ImageFirmwareInfoBootArgs + +Embedded boot arguments. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**normal** | **str** | Boot arguments for normal boot. | [optional] +**restore** | **str** | Boot arguments for restore boot. | [optional] + +## Example + +```python +from corellium.models.image_firmware_info_boot_args import ImageFirmwareInfoBootArgs + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageFirmwareInfoBootArgs from a JSON string +image_firmware_info_boot_args_instance = ImageFirmwareInfoBootArgs.from_json(json) +# print the JSON string representation of the object +print(ImageFirmwareInfoBootArgs.to_json()) + +# convert the object into a dict +image_firmware_info_boot_args_dict = image_firmware_info_boot_args_instance.to_dict() +# create an instance of ImageFirmwareInfoBootArgs from a dict +image_firmware_info_boot_args_from_dict = ImageFirmwareInfoBootArgs.from_dict(image_firmware_info_boot_args_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageList.md b/docs/ImageList.md new file mode 100644 index 0000000..080a527 --- /dev/null +++ b/docs/ImageList.md @@ -0,0 +1,34 @@ +# ImageList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Image]**](Image.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.image_list import ImageList + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageList from a JSON string +image_list_instance = ImageList.from_json(json) +# print the JSON string representation of the object +print(ImageList.to_json()) + +# convert the object into a dict +image_list_dict = image_list_instance.to_dict() +# create an instance of ImageList from a dict +image_list_from_dict = ImageList.from_dict(image_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageType.md b/docs/ImageType.md new file mode 100644 index 0000000..73fb599 --- /dev/null +++ b/docs/ImageType.md @@ -0,0 +1,63 @@ +# ImageType + +What kind of file the image holds. The type decides what the platform does with the file, so choose it carefully. **Firmware (whole operating-system images):** - `fw`: a complete firmware bundle for creating devices, such as an iOS IPSW or a Corellium `.coreimg` package. Install it cluster-wide with `installFirmware`, or upload it at domain level (no `projectId` or `instanceId`) so device creation can find it. - `fwpackage`: another name for `fw`. It is stored as `fw`, and v3 responses report `fw` images as `fwpackage`. - `iotfirmware`: firmware for IoT and embedded device models, such as an ELF executable, a raw binary, or a ZIP with a `LOAD.TXT` load map. - `fwbinary`: another name for `iotfirmware`. v3 responses report `iotfirmware` images as `fwbinary`. - `fwasset`: a JSON file of firmware assets (for example decryption keys), not firmware itself. Install it with `installFirmwareAssets`. - `clbi`: a Cellebrite firmware image. Like `fw`, a Cellebrite firmware image uploaded at domain level (no `projectId` or `instanceId`) is offered as a choice when you create a device. **Files for a specific device:** - `partition`: replacement contents for one storage partition of a device. The platform needs a device model to check it against: attach it to a device with `instanceId`, or pass `flavor` on the image-upload routes. `name` must be a partition that model lets users upload. - Other types such as `kernel`, `devicetree`, `ramdisk`, `media` and `extension` name the kind of file; the endpoint that uses each one describes it. **MATRIX files** (always attached to an instance, and never replaced by later uploads): - `mast-wordlist`: a text file of sensitive values for a MATRIX assessment to search for. - `mast-frida`: a Frida script to load during a MATRIX assessment. - `mast-report`: a report generated by MATRIX. Created by the platform, not uploaded. Some types require a license feature. Using one your license does not include fails with 403. + +## Enum + +* `FWBINARY` (value: `'fwbinary'`) + +* `FWPACKAGE` (value: `'fwpackage'`) + +* `IOTFIRMWARE` (value: `'iotfirmware'`) + +* `KERNEL` (value: `'kernel'`) + +* `DEVICETREE` (value: `'devicetree'`) + +* `RAMDISK` (value: `'ramdisk'`) + +* `LOADERFILE` (value: `'loaderfile'`) + +* `MEDIA` (value: `'media'`) + +* `SEPFW` (value: `'sepfw'`) + +* `SEPROM` (value: `'seprom'`) + +* `BOOTROM` (value: `'bootrom'`) + +* `LLB` (value: `'llb'`) + +* `IBOOT` (value: `'iboot'`) + +* `IBOOTDATA` (value: `'ibootdata'`) + +* `FW` (value: `'fw'`) + +* `FWASSET` (value: `'fwasset'`) + +* `PARTITION` (value: `'partition'`) + +* `EXTENSION` (value: `'extension'`) + +* `VMFILE` (value: `'vmfile'`) + +* `BACKUP` (value: `'backup'`) + +* `ACTIVITY_MINUS_EXPORT` (value: `'activity-export'`) + +* `UFD` (value: `'ufd'`) + +* `CLBI` (value: `'clbi'`) + +* `PONGO` (value: `'pongo'`) + +* `MAST_MINUS_REPORT` (value: `'mast-report'`) + +* `MAST_MINUS_FRIDA` (value: `'mast-frida'`) + +* `MAST_MINUS_WORDLIST` (value: `'mast-wordlist'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageV1.md b/docs/ImageV1.md new file mode 100644 index 0000000..412035b --- /dev/null +++ b/docs/ImageV1.md @@ -0,0 +1,45 @@ +# ImageV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Image status | [optional] +**id** | **str** | Image ID | [optional] +**identifier** | **str** | Image ID | [optional] +**name** | **str** | | [optional] +**type** | **str** | Type of image | [optional] +**size** | **float** | | [optional] +**checksum** | **str** | MD5 checksum of the image | [optional] +**corellium_checksum** | **str** | Corellium checksum of the image (format: algorithm$blocksize$hash) | [optional] +**encoding** | **str** | Encoding type of the image | [optional] +**filename** | **str** | | [optional] +**uniqueid** | **str** | | [optional] +**project** | **str** | Project ID | [optional] +**instance** | **str** | Instance ID | [optional] +**created_at** | **datetime** | When Image was created | [optional] +**updated_at** | **datetime** | When Image was last updated | [optional] +**extended** | [**ImageExtended**](ImageExtended.md) | | [optional] + +## Example + +```python +from corellium.models.image_v1 import ImageV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageV1 from a JSON string +image_v1_instance = ImageV1.from_json(json) +# print the JSON string representation of the object +print(ImageV1.to_json()) + +# convert the object into a dict +image_v1_dict = image_v1_instance.to_dict() +# create an instance of ImageV1 from a dict +image_v1_from_dict = ImageV1.from_dict(image_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImagesApi.md b/docs/ImagesApi.md new file mode 100644 index 0000000..2e9fd17 --- /dev/null +++ b/docs/ImagesApi.md @@ -0,0 +1,1065 @@ +# corellium.ImagesApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_image**](ImagesApi.md#v3_create_image) | **POST** /v3/images | Create an image +[**v3_delete_image**](ImagesApi.md#v3_delete_image) | **DELETE** /v3/images/{imageId} | Delete an image +[**v3_get_image**](ImagesApi.md#v3_get_image) | **GET** /v3/images/{imageId} | Get image metadata +[**v3_get_image_chunk**](ImagesApi.md#v3_get_image_chunk) | **GET** /v3/images/{imageId}/file | Check whether an image chunk was already uploaded +[**v3_get_image_firmware_info**](ImagesApi.md#v3_get_image_firmware_info) | **POST** /v3/images/{imageId}/fwinfo | Get firmware info embedded in an image +[**v3_get_install_firmware_status**](ImagesApi.md#v3_get_install_firmware_status) | **GET** /v3/images/install-firmware/{taskId} | Get install-firmware task status +[**v3_install_firmware**](ImagesApi.md#v3_install_firmware) | **POST** /v3/images/install-firmware | Install firmware cluster-wide +[**v3_install_firmware_assets**](ImagesApi.md#v3_install_firmware_assets) | **POST** /v3/images/install-firmware-assets | Install firmware assets cluster-wide +[**v3_list_images**](ImagesApi.md#v3_list_images) | **GET** /v3/images | List image metadata +[**v3_upload_image_chunk**](ImagesApi.md#v3_upload_image_chunk) | **PUT** /v3/images/{imageId}/file | Upload one chunk of an image file +[**v3_upload_image_data**](ImagesApi.md#v3_upload_image_data) | **POST** /v3/images/{imageId} | Upload image file contents + + +# **v3_create_image** +> Image v3_create_image(create_image_body) + +Create an image + +Creates an image: a stored file such as firmware, a kernel, a partition, or a MATRIX wordlist. Every upload starts here. The response is the new image, including its `id`. + +**Choosing how to upload the file:** + - **Two steps (recommended).** Send this request as `application/json` without a file; it returns **201**. Then upload the contents with [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) (one request) or [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file) (in pieces, resumable, best for large files). This is the only way to have the server verify the file against a `corelliumChecksum`. + - **One step.** Send this request as `multipart/form-data` with the file in a `file` part; it returns **200** once the file is stored. Put the `type` field before the `file` part. Convenient for small files, but no checksum verification. + +The response body is the same image in both cases; the status code (201 or 200) tells you whether the file was included. + +**Where the image lives** depends on the optional IDs: + - `instanceId` set: attached to that device. Replaces the device's existing image of the same type. + - `projectId` set: stored in that project and counted against its quota. + - Neither: a domain-level image. Domain-level `fw` and `clbi` images are also offered when you create a device, in addition to installed firmware. +See the `projectId` and `instanceId` fields for side effects. + +Other upload endpoints (`PUT /v3/projects/{projectId}/image-upload/...`, `PUT /v3/instances/{instanceId}/image-upload/...`, `PUT /v3/domain/image-upload/...`) use the same chunked protocol but create the image on the first chunk instead of requiring this call. They exist mainly for the web interface; new code should use this endpoint followed by [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). + +`name` is not unique; sending the same request twice creates two images. For firmware, continue with [`installFirmware`](#tag/images/POST/v3/images/install-firmware) or [`installFirmwareAssets`](#tag/images/POST/v3/images/install-firmware-assets). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_image_body import CreateImageBody +from corellium.models.image import Image +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + create_image_body = corellium.CreateImageBody() # CreateImageBody | + + try: + # Create an image + api_response = api_instance.v3_create_image(create_image_body) + print("The response of ImagesApi->v3_create_image:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_create_image: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_image_body** | [**CreateImageBody**](CreateImageBody.md)| | + +### Return type + +[**Image**](Image.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Image created with file uploaded (multipart). | - | +**201** | Image metadata created (JSON only); upload separately. | - | +**400** | Missing or invalid image fields. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**404** | The instance named by `instanceId` does not exist. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_image** +> v3_delete_image(image_id) + +Delete an image + +Permanently deletes the image. This action cannot be undone. + +Deletion is synchronous. Deletes are idempotent: an unknown `imageId`, or an image that has already been deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' # str | + + try: + # Delete an image + api_instance.v3_delete_image(image_id) + except Exception as e: + print("Exception when calling ImagesApi->v3_delete_image: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Image deleted; empty body. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_image** +> Image v3_get_image(image_id) + +Get image metadata + +Returns metadata for a single image. File contents are not returned by this endpoint. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.image import Image +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' # str | + + try: + # Get image metadata + api_response = api_instance.v3_get_image(image_id) + print("The response of ImagesApi->v3_get_image:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_get_image: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| | + +### Return type + +[**Image**](Image.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Image metadata. | - | +**404** | No image with the given imageId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_image_chunk** +> object v3_get_image_chunk(image_id, resumable_chunk_number, resumable_chunk_size, resumable_current_chunk_size) + +Check whether an image chunk was already uploaded + +Probes whether a single chunk of a chunked upload is already stored, so an +interrupted upload can resume without re-sending data. Used together with +[`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). + +Returns 200 when the chunk is present and 204 when it still needs to be uploaded. The +chunk is identified exactly as in the upload request, by `resumableChunkNumber`, +`resumableChunkSize` and `resumableCurrentChunkSize`, all of which are required. The image +must already exist; an unknown `imageId` is a 404 rather than a 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' # str | + resumable_chunk_number = 1 # float | Chunk sequence number. + resumable_chunk_size = 1048576 # float | Size of each chunk. + resumable_current_chunk_size = 1048576 # float | Size of the current chunk. + + try: + # Check whether an image chunk was already uploaded + api_response = api_instance.v3_get_image_chunk(image_id, resumable_chunk_number, resumable_chunk_size, resumable_current_chunk_size) + print("The response of ImagesApi->v3_get_image_chunk:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_get_image_chunk: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| | + **resumable_chunk_number** | **float**| Chunk sequence number. | + **resumable_chunk_size** | **float**| Size of each chunk. | + **resumable_current_chunk_size** | **float**| Size of the current chunk. | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The chunk is already stored; empty JSON body. | - | +**204** | The chunk is missing and still needs to be uploaded. | - | +**400** | Invalid or missing chunk parameters. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | No permission for the image's project, or the image is site-wide and the caller is not a domain (on-site) or cloud administrator. | - | +**404** | No image with the given imageId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_image_firmware_info** +> ImageFirmwareInfo v3_get_image_firmware_info(image_id, get_firmware_info_body=get_firmware_info_body) + +Get firmware info embedded in an image + +Reads the version information built into an uploaded firmware file, without installing it or creating a device. Use it to check what a file is before you install it or create a device from it: which operating-system version and build it contains, and which device models it supports. + +Works on these kinds of uploaded files: an Apple iOS firmware file (IPSW), a Corellium firmware package (`.coreimg`), a Cellebrite firmware image, a Cellebrite extraction (UFD), and a Corellium extension. The image must be fully uploaded first; see [`createImage`](#tag/images/POST/v3/images). + +The request body is optional: + - `password`: needed only if the file is encrypted. A wrong password returns 400. + - `extended`: set to `true` to also get chip and board details and the supported device model this firmware matches (`device`). Use the matched model's `flavor` when you create an instance. + +Returns 404 if the image does not exist, or if the file contains no version information that can be read (for example, it is not firmware). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.get_firmware_info_body import GetFirmwareInfoBody +from corellium.models.image_firmware_info import ImageFirmwareInfo +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' # str | + get_firmware_info_body = corellium.GetFirmwareInfoBody() # GetFirmwareInfoBody | Optional decryption password and extended-info flag. (optional) + + try: + # Get firmware info embedded in an image + api_response = api_instance.v3_get_image_firmware_info(image_id, get_firmware_info_body=get_firmware_info_body) + print("The response of ImagesApi->v3_get_image_firmware_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_get_image_firmware_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| | + **get_firmware_info_body** | [**GetFirmwareInfoBody**](GetFirmwareInfoBody.md)| Optional decryption password and extended-info flag. | [optional] + +### Return type + +[**ImageFirmwareInfo**](ImageFirmwareInfo.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Firmware info parsed from the image. | - | +**400** | Invalid request body, or the supplied password is wrong. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | No permission for the image's project. | - | +**404** | No image with the given imageId, no firmware info file inside it, or the info was unparseable. | - | +**409** | The image backing file is not currently accessible. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_install_firmware_status** +> InstallFirmwareStatusResponse v3_get_install_firmware_status(task_id) + +Get install-firmware task status + +Returns the current status of a firmware installation task previously created via +[`installFirmware`](#tag/images/POST/v3/images/install-firmware). Clients should poll this endpoint until +`status` is `complete` or `error`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.install_firmware_status_response import InstallFirmwareStatusResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + task_id = '722cdce5-6f71-4f4a-b2b6-c00f11c015f6' # str | + + try: + # Get install-firmware task status + api_response = api_instance.v3_get_install_firmware_status(task_id) + print("The response of ImagesApi->v3_get_install_firmware_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_get_install_firmware_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **task_id** | **str**| | + +### Return type + +[**InstallFirmwareStatusResponse**](InstallFirmwareStatusResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Task status. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**404** | No install-firmware task with the given taskId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_install_firmware** +> InstallFirmwareResponse v3_install_firmware(install_firmware_body) + +Install firmware cluster-wide + +Makes an uploaded `fw` image available for creating devices across the whole cluster. After it is installed, the firmware appears in `GET /v3/models/{model}/software` for the matching model and can be chosen when creating an instance. + +**Workflow:** + 1. [`createImage`](#tag/images/POST/v3/images) with `{ "name": "...", "type": "fw", "encoding": "plain" }` as JSON. Keep the returned `id`. + 2. Upload the file with [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) or, for large files, [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file). Supplying `corelliumChecksum` there lets the server verify the file. + 3. **`installFirmware`** with `{ "imageId": "" }`. Returns a `taskId`. + 4. Poll [`getInstallFirmwareStatus`](#tag/images/GET/v3/images/install-firmware/{taskId}) with the `taskId` until `status` is `complete` or `error`. + +**What happens.** The server hands the file to the firmware service and returns 201 with a `taskId` as soon as the hand-off succeeds; installation continues in the background and can take a long time (up to 45 minutes for files around 10 GB). The source image is deleted from `/v3/images` at the moment of hand-off, before installation finishes. If installation then fails, upload the file again to retry. + +A 400 can mean the firmware service rejected the image's checksum. Check that the file uploaded completely and, if you supplied `corelliumChecksum`, that it was correct. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.install_firmware_body import InstallFirmwareBody +from corellium.models.install_firmware_response import InstallFirmwareResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + install_firmware_body = corellium.InstallFirmwareBody() # InstallFirmwareBody | + + try: + # Install firmware cluster-wide + api_response = api_instance.v3_install_firmware(install_firmware_body) + print("The response of ImagesApi->v3_install_firmware:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_install_firmware: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **install_firmware_body** | [**InstallFirmwareBody**](InstallFirmwareBody.md)| | + +### Return type + +[**InstallFirmwareResponse**](InstallFirmwareResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Install task accepted. | - | +**400** | Invalid request body, or firmware checksum rejected. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**404** | No firmware-type Image with the given imageId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_install_firmware_assets** +> InstallFirmwareAssetsResponse v3_install_firmware_assets(install_firmware_assets_body) + +Install firmware assets cluster-wide + +Installs an uploaded firmware-assets JSON blob for cluster-wide use. On success +the source Image is deleted from the Images store. The blob is forwarded to the firmware +service, which merges it into the cluster-wide firmware-assets manifest. + +**This is step 3 of the firmware-assets-install workflow:** + 1. [`createImage`](#tag/images/POST/v3/images) with `{ name: 'fcs-keys.json', type: 'fwasset' }` → returns an `imageId`. + 2. [`uploadImageData`](#tag/images/POST/v3/images/{imageId}) with the assets file → uploads contents. + 3. **`installFirmwareAssets`** with `{ imageId }` → installs the assets. + +Unlike [`installFirmware`](#tag/images/POST/v3/images/install-firmware), this endpoint completes synchronously +and returns the firmware service's response message directly; there is no task to poll. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.install_firmware_assets_body import InstallFirmwareAssetsBody +from corellium.models.install_firmware_assets_response import InstallFirmwareAssetsResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + install_firmware_assets_body = corellium.InstallFirmwareAssetsBody() # InstallFirmwareAssetsBody | + + try: + # Install firmware assets cluster-wide + api_response = api_instance.v3_install_firmware_assets(install_firmware_assets_body) + print("The response of ImagesApi->v3_install_firmware_assets:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_install_firmware_assets: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **install_firmware_assets_body** | [**InstallFirmwareAssetsBody**](InstallFirmwareAssetsBody.md)| | + +### Return type + +[**InstallFirmwareAssetsResponse**](InstallFirmwareAssetsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Assets installed (or no-op if assets already present). | - | +**400** | Invalid request body, or image contents are not valid JSON. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**404** | No fwasset-type Image with the given imageId, or image is on a remote coordinator. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_images** +> ImageList v3_list_images(limit=limit, offset=offset, project_id=project_id) + +List image metadata + +Lists the images you can see: images in your projects plus domain-level images. File contents are not included; use the download or upload endpoints for those. + +Set `projectId` to list only one project's images. Results are paginated with `limit` and `offset`. + +Installed firmware is not listed here: once `installFirmware` hands an image off, it disappears from this list and shows up in `GET /v3/models/{model}/software` instead. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.image_list import ImageList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | Filter results to a single project. (optional) + + try: + # List image metadata + api_response = api_instance.v3_list_images(limit=limit, offset=offset, project_id=project_id) + print("The response of ImagesApi->v3_list_images:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_list_images: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **project_id** | **str**| Filter results to a single project. | [optional] + +### Return type + +[**ImageList**](ImageList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of image metadata. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_upload_image_chunk** +> v3_upload_image_chunk(image_id, resumable_chunk_number, resumable_chunk_size, resumable_current_chunk_size, resumable_total_size, resumable_total_chunks, body, resumable_identifier=resumable_identifier, resumable_filename=resumable_filename, resumable_relative_path=resumable_relative_path, resumable_type=resumable_type, corellium_checksum=corellium_checksum, x_corellium_total_file_size=x_corellium_total_file_size) + +Upload one chunk of an image file + +Uploads a single chunk of an Image previously created via +[`createImage`](#tag/images/POST/v3/images), using the resumable upload protocol. This is the +recommended way to upload large images: the transfer survives interruptions, because any +chunk can be re-sent and already-stored chunks can be skipped. + +**Chunked upload workflow:** + 1. [`createImage`](#tag/images/POST/v3/images) with `{ name, type, encoding }` → returns an `imageId`. + 2. Split the file into fixed-size chunks and **`uploadImageChunk`** each one with the + `resumable*` query parameters describing it. Chunks may be uploaded in any order and + concurrently. + 3. Optionally probe a chunk with [`getImageChunk`](#tag/images/GET/v3/images/{imageId}/file) before + (re-)sending it, so an interrupted upload only re-sends what is missing. + +The image is finalized automatically by the request that completes the chunk set, so the +last chunk to arrive also validates `corelliumChecksum` (when supplied) and runs the +firmware post-processing. Re-sending a chunk that was already stored is safe. If the upload +fails for any reason other than a retryable transport error, the partially uploaded image is +deleted, so the client must create a new image record before retrying. + +The image's `encoding` and `encapsulated` settings are fixed when the record is created by +[`createImage`](#tag/images/POST/v3/images) and cannot be changed by a chunk request. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' # str | + resumable_chunk_number = 1 # float | Chunk sequence number. + resumable_chunk_size = 1048576 # float | Size of each chunk. + resumable_current_chunk_size = 1048576 # float | Size of the current chunk. + resumable_total_size = 2147483648 # float | Total file size. + resumable_total_chunks = 2048 # float | Total number of chunks. + body = None # bytearray | + resumable_identifier = '2147483648-customfirmwareipsw' # str | Client-side identifier of the file being uploaded. (optional) + resumable_filename = 'custom-firmware.ipsw' # str | Original filename. (optional) + resumable_relative_path = 'custom-firmware.ipsw' # str | Relative path. (optional) + resumable_type = 'application/octet-stream' # str | MIME type. (optional) + corellium_checksum = 'sha256$1048576$e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' # str | Expected Corellium checksum of the complete file, formatted `algorithm$blockSize$hash`. When supplied, every chunk is re-hashed and the upload is rejected (and the image removed) unless the recomputed checksum matches. The chunk size used for the upload must equal the block size embedded in the checksum. Required for `fw` uploads on airgapped deployments. (optional) + x_corellium_total_file_size = '2147483648' # str | Total size of the whole file in bytes. Send it on every chunk so the image-pool pre-flight check sees the full upload size rather than the size of a single chunk. (optional) + + try: + # Upload one chunk of an image file + api_instance.v3_upload_image_chunk(image_id, resumable_chunk_number, resumable_chunk_size, resumable_current_chunk_size, resumable_total_size, resumable_total_chunks, body, resumable_identifier=resumable_identifier, resumable_filename=resumable_filename, resumable_relative_path=resumable_relative_path, resumable_type=resumable_type, corellium_checksum=corellium_checksum, x_corellium_total_file_size=x_corellium_total_file_size) + except Exception as e: + print("Exception when calling ImagesApi->v3_upload_image_chunk: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| | + **resumable_chunk_number** | **float**| Chunk sequence number. | + **resumable_chunk_size** | **float**| Size of each chunk. | + **resumable_current_chunk_size** | **float**| Size of the current chunk. | + **resumable_total_size** | **float**| Total file size. | + **resumable_total_chunks** | **float**| Total number of chunks. | + **body** | **bytearray**| | + **resumable_identifier** | **str**| Client-side identifier of the file being uploaded. | [optional] + **resumable_filename** | **str**| Original filename. | [optional] + **resumable_relative_path** | **str**| Relative path. | [optional] + **resumable_type** | **str**| MIME type. | [optional] + **corellium_checksum** | **str**| Expected Corellium checksum of the complete file, formatted `algorithm$blockSize$hash`. When supplied, every chunk is re-hashed and the upload is rejected (and the image removed) unless the recomputed checksum matches. The chunk size used for the upload must equal the block size embedded in the checksum. Required for `fw` uploads on airgapped deployments. | [optional] + **x_corellium_total_file_size** | **str**| Total size of the whole file in bytes. Send it on every chunk so the image-pool pre-flight check sees the full upload size rather than the size of a single chunk. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Chunk stored; empty body. | - | +**400** | Invalid chunk parameters, checksum mismatch, chunk size differing from the block size of corelliumChecksum, or a missing corelliumChecksum for an airgapped firmware upload. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | No permission for the image's project, or the image is site-wide and the caller is not a domain (on-site) or cloud administrator. | - | +**404** | No image with the given imageId; create it before uploading chunks. | - | +**413** | The upload exceeds the project's storage quota, or the size limit for this image type (ramdisk, kernel). | - | +**507** | The local image pool does not have enough free space for this upload. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_upload_image_data** +> Image v3_upload_image_data(image_id, file, corellium_checksum=corellium_checksum) + +Upload image file contents + +Uploads the whole file for an image created with [`createImage`](#tag/images/POST/v3/images), in a single `multipart/form-data` request with the file in the `file` part. Returns the updated image, whose `size` and checksums are now filled in. + +Supply `corelliumChecksum` to have the server verify the file: if the uploaded contents do not match, the upload is rejected with 400 and the image is removed. Compute it with the same algorithm and block size you pass in the value (`algorithm$blockSize$hash`). + +The upload counts against the owning project's storage quota. If the connection drops, the whole file must be sent again. For large images (firmware in particular) use [`uploadImageChunk`](#tag/images/PUT/v3/images/{imageId}/file), which can resume. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.image import Image +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesApi(api_client) + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' # str | + file = None # bytearray | + corellium_checksum = 'sha256$1048576$e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' # str | Optional. Expected Corellium checksum of the whole file, formatted `algorithm$blockSize$hash` (for example `sha256$1048576$`). When supplied, the upload is rejected and the image removed if the file does not match. (optional) + + try: + # Upload image file contents + api_response = api_instance.v3_upload_image_data(image_id, file, corellium_checksum=corellium_checksum) + print("The response of ImagesApi->v3_upload_image_data:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesApi->v3_upload_image_data: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| | + **file** | **bytearray**| | + **corellium_checksum** | **str**| Optional. Expected Corellium checksum of the whole file, formatted `algorithm$blockSize$hash` (for example `sha256$1048576$<hex>`). When supplied, the upload is rejected and the image removed if the file does not match. | [optional] + +### Return type + +[**Image**](Image.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Upload accepted; updated image metadata returned. | - | +**400** | Invalid upload or checksum mismatch. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**404** | No image with the given imageId. | - | +**409** | An image with conflicting identity already exists. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ImagesV1Api.md b/docs/ImagesV1Api.md new file mode 100644 index 0000000..609fc5b --- /dev/null +++ b/docs/ImagesV1Api.md @@ -0,0 +1,193 @@ +# corellium.ImagesV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_get_image**](ImagesV1Api.md#v1_get_image) | **GET** /v1/images/{imageId} | Get Image Metadata +[**v1_get_images**](ImagesV1Api.md#v1_get_images) | **GET** /v1/images | Get all Images Metadata + + +# **v1_get_image** +> ImageV1 v1_get_image(image_id) + +Get Image Metadata + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.image_v1 import ImageV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesV1Api(api_client) + image_id = 'image_id_example' # str | Image ID - uuid + + try: + # Get Image Metadata + api_response = api_instance.v1_get_image(image_id) + print("The response of ImagesV1Api->v1_get_image:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesV1Api->v1_get_image: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| Image ID - uuid | + +### Return type + +[**ImageV1**](ImageV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**404** | application/json | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_images** +> List[ImageV1] v1_get_images(project=project) + +Get all Images Metadata + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.image_v1 import ImageV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesV1Api(api_client) + project = 'project_example' # str | Optionally filter by project - uuid (optional) + + try: + # Get all Images Metadata + api_response = api_instance.v1_get_images(project=project) + print("The response of ImagesV1Api->v1_get_images:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ImagesV1Api->v1_get_images: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project** | **str**| Optionally filter by project - uuid | [optional] + +### Return type + +[**List[ImageV1]**](ImageV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ImagesV2Api.md b/docs/ImagesV2Api.md new file mode 100644 index 0000000..49871b4 --- /dev/null +++ b/docs/ImagesV2Api.md @@ -0,0 +1,113 @@ +# corellium.ImagesV2Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_delete_image**](ImagesV2Api.md#v1_delete_image) | **DELETE** /v2/images/{imageId} | Delete Image + + +# **v1_delete_image** +> v1_delete_image(image_id) + +Delete Image + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ImagesV2Api(api_client) + image_id = 'image_id_example' # str | Image ID - uuid + + try: + # Delete Image + api_instance.v1_delete_image(image_id) + except Exception as e: + print("Exception when calling ImagesV2Api->v1_delete_image: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **image_id** | **str**| Image ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InputResponse.md b/docs/InputResponse.md index 9e07439..b2baf0f 100644 --- a/docs/InputResponse.md +++ b/docs/InputResponse.md @@ -1,12 +1,29 @@ # InputResponse - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**eta** | **float** | Expected time to complete | [optional] +**eta** | **float** | Expected time to complete (ms). | + +## Example + +```python +from corellium.models.input_response import InputResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InputResponse from a JSON string +input_response_instance = InputResponse.from_json(json) +# print the JSON string representation of the object +print(InputResponse.to_json()) +# convert the object into a dict +input_response_dict = input_response_instance.to_dict() +# create an instance of InputResponse from a dict +input_response_from_dict = InputResponse.from_dict(input_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InputResponseV1.md b/docs/InputResponseV1.md new file mode 100644 index 0000000..fc9b7f2 --- /dev/null +++ b/docs/InputResponseV1.md @@ -0,0 +1,30 @@ +# InputResponseV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eta** | **float** | Expected time to complete | [optional] + +## Example + +```python +from corellium.models.input_response_v1 import InputResponseV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InputResponseV1 from a JSON string +input_response_v1_instance = InputResponseV1.from_json(json) +# print the JSON string representation of the object +print(InputResponseV1.to_json()) + +# convert the object into a dict +input_response_v1_dict = input_response_v1_instance.to_dict() +# create an instance of InputResponseV1 from a dict +input_response_v1_from_dict = InputResponseV1.from_dict(input_response_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstallFirmwareAssetsBody.md b/docs/InstallFirmwareAssetsBody.md new file mode 100644 index 0000000..761f8cd --- /dev/null +++ b/docs/InstallFirmwareAssetsBody.md @@ -0,0 +1,29 @@ +# InstallFirmwareAssetsBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_id** | **str** | Identifier of a previously uploaded 'fwasset' type Image. | + +## Example + +```python +from corellium.models.install_firmware_assets_body import InstallFirmwareAssetsBody + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareAssetsBody from a JSON string +install_firmware_assets_body_instance = InstallFirmwareAssetsBody.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareAssetsBody.to_json()) + +# convert the object into a dict +install_firmware_assets_body_dict = install_firmware_assets_body_instance.to_dict() +# create an instance of InstallFirmwareAssetsBody from a dict +install_firmware_assets_body_from_dict = InstallFirmwareAssetsBody.from_dict(install_firmware_assets_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstallFirmwareAssetsBodyV1.md b/docs/InstallFirmwareAssetsBodyV1.md new file mode 100644 index 0000000..6471c0f --- /dev/null +++ b/docs/InstallFirmwareAssetsBodyV1.md @@ -0,0 +1,30 @@ +# InstallFirmwareAssetsBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_id** | **str** | Image ID | + +## Example + +```python +from corellium.models.install_firmware_assets_body_v1 import InstallFirmwareAssetsBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareAssetsBodyV1 from a JSON string +install_firmware_assets_body_v1_instance = InstallFirmwareAssetsBodyV1.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareAssetsBodyV1.to_json()) + +# convert the object into a dict +install_firmware_assets_body_v1_dict = install_firmware_assets_body_v1_instance.to_dict() +# create an instance of InstallFirmwareAssetsBodyV1 from a dict +install_firmware_assets_body_v1_from_dict = InstallFirmwareAssetsBodyV1.from_dict(install_firmware_assets_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstallFirmwareAssetsResponse.md b/docs/InstallFirmwareAssetsResponse.md new file mode 100644 index 0000000..ef3a8fe --- /dev/null +++ b/docs/InstallFirmwareAssetsResponse.md @@ -0,0 +1,29 @@ +# InstallFirmwareAssetsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Message returned by the firmware service describing the outcome of the asset upload. | + +## Example + +```python +from corellium.models.install_firmware_assets_response import InstallFirmwareAssetsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareAssetsResponse from a JSON string +install_firmware_assets_response_instance = InstallFirmwareAssetsResponse.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareAssetsResponse.to_json()) + +# convert the object into a dict +install_firmware_assets_response_dict = install_firmware_assets_response_instance.to_dict() +# create an instance of InstallFirmwareAssetsResponse from a dict +install_firmware_assets_response_from_dict = InstallFirmwareAssetsResponse.from_dict(install_firmware_assets_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstallFirmwareAssetsResponseV1.md b/docs/InstallFirmwareAssetsResponseV1.md new file mode 100644 index 0000000..6d31928 --- /dev/null +++ b/docs/InstallFirmwareAssetsResponseV1.md @@ -0,0 +1,30 @@ +# InstallFirmwareAssetsResponseV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Message returned by the firmware service describing the outcome of the asset upload. | [optional] + +## Example + +```python +from corellium.models.install_firmware_assets_response_v1 import InstallFirmwareAssetsResponseV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareAssetsResponseV1 from a JSON string +install_firmware_assets_response_v1_instance = InstallFirmwareAssetsResponseV1.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareAssetsResponseV1.to_json()) + +# convert the object into a dict +install_firmware_assets_response_v1_dict = install_firmware_assets_response_v1_instance.to_dict() +# create an instance of InstallFirmwareAssetsResponseV1 from a dict +install_firmware_assets_response_v1_from_dict = InstallFirmwareAssetsResponseV1.from_dict(install_firmware_assets_response_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstallFirmwareBody.md b/docs/InstallFirmwareBody.md new file mode 100644 index 0000000..8a6660b --- /dev/null +++ b/docs/InstallFirmwareBody.md @@ -0,0 +1,29 @@ +# InstallFirmwareBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_id** | **str** | Identifier of a previously uploaded 'fw' type Image. | + +## Example + +```python +from corellium.models.install_firmware_body import InstallFirmwareBody + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareBody from a JSON string +install_firmware_body_instance = InstallFirmwareBody.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareBody.to_json()) + +# convert the object into a dict +install_firmware_body_dict = install_firmware_body_instance.to_dict() +# create an instance of InstallFirmwareBody from a dict +install_firmware_body_from_dict = InstallFirmwareBody.from_dict(install_firmware_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstallFirmwareBodyV1.md b/docs/InstallFirmwareBodyV1.md new file mode 100644 index 0000000..4c84b88 --- /dev/null +++ b/docs/InstallFirmwareBodyV1.md @@ -0,0 +1,30 @@ +# InstallFirmwareBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_id** | **str** | Image ID | + +## Example + +```python +from corellium.models.install_firmware_body_v1 import InstallFirmwareBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareBodyV1 from a JSON string +install_firmware_body_v1_instance = InstallFirmwareBodyV1.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareBodyV1.to_json()) + +# convert the object into a dict +install_firmware_body_v1_dict = install_firmware_body_v1_instance.to_dict() +# create an instance of InstallFirmwareBodyV1 from a dict +install_firmware_body_v1_from_dict = InstallFirmwareBodyV1.from_dict(install_firmware_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstallFirmwareRequest.md b/docs/InstallFirmwareRequest.md deleted file mode 100644 index ddd6abc..0000000 --- a/docs/InstallFirmwareRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# InstallFirmwareRequest - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**image_id** | **str** | Image ID | -**filename** | **str** | Filename of the firmware | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InstallFirmwareResponse.md b/docs/InstallFirmwareResponse.md index 75afce8..dd19f82 100644 --- a/docs/InstallFirmwareResponse.md +++ b/docs/InstallFirmwareResponse.md @@ -1,13 +1,29 @@ # InstallFirmwareResponse - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**task_id** | **str** | Task ID | [optional] -**installed_firmware_url** | **str** | Installed Firmware URL | [optional] +**task_id** | **str** | Identifier of the asynchronous install task. | + +## Example + +```python +from corellium.models.install_firmware_response import InstallFirmwareResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareResponse from a JSON string +install_firmware_response_instance = InstallFirmwareResponse.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareResponse.to_json()) +# convert the object into a dict +install_firmware_response_dict = install_firmware_response_instance.to_dict() +# create an instance of InstallFirmwareResponse from a dict +install_firmware_response_from_dict = InstallFirmwareResponse.from_dict(install_firmware_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstallFirmwareResponseV1.md b/docs/InstallFirmwareResponseV1.md new file mode 100644 index 0000000..51697b4 --- /dev/null +++ b/docs/InstallFirmwareResponseV1.md @@ -0,0 +1,31 @@ +# InstallFirmwareResponseV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_id** | **str** | Task ID | [optional] +**installed_firmware_url** | **str** | Installed Firmware URL | [optional] + +## Example + +```python +from corellium.models.install_firmware_response_v1 import InstallFirmwareResponseV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareResponseV1 from a JSON string +install_firmware_response_v1_instance = InstallFirmwareResponseV1.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareResponseV1.to_json()) + +# convert the object into a dict +install_firmware_response_v1_dict = install_firmware_response_v1_instance.to_dict() +# create an instance of InstallFirmwareResponseV1 from a dict +install_firmware_response_v1_from_dict = InstallFirmwareResponseV1.from_dict(install_firmware_response_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstallFirmwareStatusResponse.md b/docs/InstallFirmwareStatusResponse.md new file mode 100644 index 0000000..8329f94 --- /dev/null +++ b/docs/InstallFirmwareStatusResponse.md @@ -0,0 +1,30 @@ +# InstallFirmwareStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**TaskStatus**](TaskStatus.md) | | +**installed_firmware_url** | **str** | URL of the installed firmware once status is \"complete\"; null otherwise. | [optional] + +## Example + +```python +from corellium.models.install_firmware_status_response import InstallFirmwareStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InstallFirmwareStatusResponse from a JSON string +install_firmware_status_response_instance = InstallFirmwareStatusResponse.from_json(json) +# print the JSON string representation of the object +print(InstallFirmwareStatusResponse.to_json()) + +# convert the object into a dict +install_firmware_status_response_dict = install_firmware_status_response_instance.to_dict() +# create an instance of InstallFirmwareStatusResponse from a dict +install_firmware_status_response_from_dict = InstallFirmwareStatusResponse.from_dict(install_firmware_status_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Instance.md b/docs/Instance.md index ff6b29c..3c2dc02 100644 --- a/docs/Instance.md +++ b/docs/Instance.md @@ -1,40 +1,82 @@ # Instance - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Instance Identifier | [optional] -**name** | **str** | Instance Name | [optional] -**key** | **str** | Key used to encrypt the Instance | [optional] -**flavor** | **str** | The type of virtual machine this is | [optional] -**type** | **str** | | [optional] -**project** | **str** | The projectId of the project this instance belongs to | [optional] -**state** | [**InstanceState**](InstanceState.md) | | [optional] -**state_changed** | **datetime** | Time the state of the instance last changed | [optional] -**started_at** | **str** | Time the instance was started | [optional] -**user_task** | **str** | Currently executing User Task | [optional] -**task_state** | **str** | Current task state if any | [optional] -**error** | **str** | Current error state if any | [optional] +**id** | **str** | Instance identifier. | +**name** | **str** | Instance name. | +**key** | **str** | Key used to encrypt the instance (hex). | +**flavor** | **str** | The flavor identifier of this instance. | +**flavor_name** | **str** | Human-readable flavor name. | [optional] +**type** | **str** | Device type. | +**project** | **str** | The project ID of the project this instance belongs to. | +**domain_name** | **str** | Domain name associated with this instance's project. | [optional] +**state** | [**InstanceState**](InstanceState.md) | | +**state_changed** | **datetime** | Time the state of the instance last changed; null before the first transition. | +**started_at** | **datetime** | Time the instance was started, NULL if currently SHUTOFF. | +**user_task** | **str** | Currently executing user task. | [optional] +**task_state** | **str** | Current task state if any (e.g. 'none', 'starting', 'stopping', 'pausing', 'unpausing', 'rebooting', 'building'). | [optional] +**error** | **str** | Current error state if any. | [optional] +**restore_status** | [**InstanceRestoreStatus**](InstanceRestoreStatus.md) | | [optional] +**read_only** | [**InstanceReadOnlyStatus**](InstanceReadOnlyStatus.md) | | [optional] **boot_options** | [**InstanceBootOptions**](InstanceBootOptions.md) | | [optional] -**service_ip** | **str** | Services IP Address | [optional] -**wifi_ip** | **str** | LAN IP Address | [optional] -**secondary_ip** | **str** | Secondary Interface LAN IP Address (if supported) | [optional] +**service_ip** | **str** | Services IP address. | [optional] +**wifi_ip** | **str** | LAN IP address. | [optional] +**wifi_mac** | **str** | WiFi MAC address. | [optional] +**secondary_ip** | **str** | Secondary interface LAN IP address (if supported). | [optional] +**port_adb** | **str** | ADB port number. | [optional] +**port_usb** | **str** | USB port number. | [optional] +**port_gdb** | **str** | GDB port number. | [optional] +**port_sep_gdb** | **str** | SEP GDB port number. | [optional] +**port_cons** | **str** | Default console port number. | [optional] +**port_sep_cons** | **str** | SEP console port number. | [optional] +**port_sys_cons** | **str** | System console port number. | [optional] +**port_usbmuxd** | **str** | USBMuxD port number. | [optional] +**port_frida** | **str** | Frida instrumentation port number. | [optional] +**port_sockcap** | **str** | Socket capture port number. | [optional] +**port_model_gw** | **str** | Model gateway port number. | [optional] +**consoles** | [**List[InstanceConsole]**](InstanceConsole.md) | Available console connections. | [optional] +**interfaces** | [**List[InstanceInterfaceStatus]**](InstanceInterfaceStatus.md) | Available configurable interfaces and their attachment status. | [optional] **services** | [**InstanceServices**](InstanceServices.md) | | [optional] -**panicked** | **bool** | | [optional] -**created** | **datetime** | Time instance was created | [optional] -**model** | **str** | Model of virtual machine device | [optional] -**fwpackage** | **str** | URL that package used to create this instance is available at | [optional] -**os** | **str** | | [optional] +**panicked** | **bool** | Whether the instance has panicked. | [optional] +**created** | **datetime** | Time instance was created. | +**model** | **str** | Model of virtual machine device. | [optional] +**fw_package** | **str** | URL that the package used to create this instance is available at. | [optional] +**os_version** | **str** | OS version. | [optional] +**os_build** | **str** | OS build. | [optional] **agent** | [**InstanceAgentState**](InstanceAgentState.md) | | [optional] -**netmon** | [**InstanceNetmonState**](InstanceNetmonState.md) | | [optional] -**netdump** | [**InstanceNetdumpState**](InstanceNetdumpState.md) | | [optional] -**expose_port** | **str** | | [optional] -**fault** | **bool** | | [optional] -**patches** | **list[str]** | | [optional] +**net_mon** | [**InstanceNetmonState**](InstanceNetmonState.md) | | [optional] +**net_dump** | [**InstanceNetdumpState**](InstanceNetdumpState.md) | | [optional] +**core_trace** | [**InstanceTraceState**](InstanceTraceState.md) | | [optional] +**hyper_trace** | [**InstanceHyperTraceState**](InstanceHyperTraceState.md) | | [optional] +**expose_port** | **str** | Currently exposed port, if any. | [optional] +**fault** | **bool** | Whether the instance is in a fault state. | [optional] +**patches** | **List[str]** | Patches applied to the instance. | [optional] **created_by** | [**CreatedBy**](CreatedBy.md) | | [optional] +**uefi_bootloader** | [**InstanceUefiBootloader**](InstanceUefiBootloader.md) | | [optional] +**orientation** | **float** | Device orientation. | [optional] +**mast** | **bool** | Whether MATRIX is enabled. | [optional] +**wan_access** | **bool** | Whether WAN access is enabled. | [optional] + +## Example + +```python +from corellium.models.instance import Instance + +# TODO update the JSON string below +json = "{}" +# create an instance of Instance from a JSON string +instance_instance = Instance.from_json(json) +# print the JSON string representation of the object +print(Instance.to_json()) +# convert the object into a dict +instance_dict = instance_instance.to_dict() +# create an instance of Instance from a dict +instance_from_dict = Instance.from_dict(instance_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceAgentState.md b/docs/InstanceAgentState.md index 01c0b7e..278de41 100644 --- a/docs/InstanceAgentState.md +++ b/docs/InstanceAgentState.md @@ -1,13 +1,30 @@ # InstanceAgentState - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hash** | **str** | | [optional] -**info** | **str** | | [optional] +**hash** | **str** | Hash for agent authentication. | [optional] +**info** | **str** | Encrypted info for agent authentication. | [optional] + +## Example + +```python +from corellium.models.instance_agent_state import InstanceAgentState + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceAgentState from a JSON string +instance_agent_state_instance = InstanceAgentState.from_json(json) +# print the JSON string representation of the object +print(InstanceAgentState.to_json()) +# convert the object into a dict +instance_agent_state_dict = instance_agent_state_instance.to_dict() +# create an instance of InstanceAgentState from a dict +instance_agent_state_from_dict = InstanceAgentState.from_dict(instance_agent_state_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceAgentStateV1.md b/docs/InstanceAgentStateV1.md new file mode 100644 index 0000000..c058a65 --- /dev/null +++ b/docs/InstanceAgentStateV1.md @@ -0,0 +1,31 @@ +# InstanceAgentStateV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hash** | **str** | | [optional] +**info** | **str** | | [optional] + +## Example + +```python +from corellium.models.instance_agent_state_v1 import InstanceAgentStateV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceAgentStateV1 from a JSON string +instance_agent_state_v1_instance = InstanceAgentStateV1.from_json(json) +# print the JSON string representation of the object +print(InstanceAgentStateV1.to_json()) + +# convert the object into a dict +instance_agent_state_v1_dict = instance_agent_state_v1_instance.to_dict() +# create an instance of InstanceAgentStateV1 from a dict +instance_agent_state_v1_from_dict = InstanceAgentStateV1.from_dict(instance_agent_state_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceBootOptions.md b/docs/InstanceBootOptions.md index 4461c99..9005529 100644 --- a/docs/InstanceBootOptions.md +++ b/docs/InstanceBootOptions.md @@ -1,19 +1,58 @@ # InstanceBootOptions - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**boot_args** | **str** | | [optional] -**restore_boot_args** | **str** | | [optional] -**udid** | **str** | Boot udid | [optional] -**ecid** | **str** | Assigned ECID | [optional] -**random_seed** | **str** | Random seed to provide to boot if any | [optional] -**pac** | **bool** | Enable PAC | [optional] -**aprr** | **bool** | Enable APRR | [optional] -**additional_tags** | [**list[InstanceBootOptionsAdditionalTag]**](InstanceBootOptionsAdditionalTag.md) | | [optional] +**boot_args** | **str** | Boot arguments passed to the kernel at normal boot. | [optional] +**restore_boot_args** | **str** | Boot arguments passed to the kernel during restore. | [optional] +**udid** | **str** | Boot UDID. | [optional] +**ecid** | **str** | Assigned ECID (hex). | [optional] +**random_seed** | **str** | Random seed provided to boot, if any. | [optional] +**pac** | **bool** | Enable Pointer Authentication Codes (PAC), the Apple processor feature that signs pointers to block memory-corruption attacks. | [optional] +**aprr** | **bool** | Enable APRR, the Apple processor feature that controls memory page permissions (used by kernel protections). | [optional] +**cores** | **float** | Number of CPU cores for the device. Only models whose `dynamicHardwareChanges` is true in `GET /v3/models` honor this; others always use the model default. The value must be between the model's `coresMin` and `coresMax`; a value outside that range is silently replaced by the model default rather than rejected, so check the device afterwards. | [optional] +**ram** | **float** | Memory for the device, in MiB (1024 MiB = 1 GiB). Only models whose `dynamicHardwareChanges` is true honor this; others always use the model default. The value must be between the model's `ramMin` and `ramMax`, and at most 1 GiB per CPU core; otherwise the request fails with 400. | [optional] +**additional_tags** | [**List[CharmTag]**](CharmTag.md) | Additional boot tags to apply to the instance. Each value must be one of the supported charm boot tags. | [optional] +**kernel** | [**InstanceBootOptionsKernel**](InstanceBootOptionsKernel.md) | | [optional] +**pongo** | [**InstanceBootOptionsPongo**](InstanceBootOptionsPongo.md) | | [optional] +**serial** | **str** | Device serial number. | [optional] +**no_snapshot_mount** | **bool** | Do not mount iOS snapshot (iOS only). | [optional] +**kernel_slide** | **str** | Kernel slide value (iOS only). | [optional] +**cd_hashes** | **List[str]** | Hashes of trusted binaries (iOS only). | [optional] +**imei** | **str** | IMEI. | [optional] +**imsi** | **str** | IMSI. | [optional] +**ssid0** | **str** | WiFi SSID. | [optional] +**ssid1** | **str** | Secondary WiFi SSID. | [optional] +**wifi_mac** | **str** | WiFi MAC address. | [optional] +**model_id** | **str** | Device model identifier. | [optional] +**manufacturer_id** | **str** | Device manufacturer identifier. | [optional] +**kernel_patches** | **str** | Kernel patches to apply. | [optional] +**stop_on_fault** | **bool** | Leaves the VM in the paused state on hypervisor vault if false. | [optional] [default to True] +**boot_addr** | **str** | Boot address. | [optional] +**tzen** | **bool** | Enable TrustZone security. | [optional] +**authorized_keys** | **str** | SSH authorized keys to install on the instance. | [optional] +**v_mmio** | [**List[InstanceBootOptionsVMMIOInner]**](InstanceBootOptionsVMMIOInner.md) | Parameters to export a VM address space range (and IRQ & DMA functionality) over TCP to different models running on different machines or inside a different VM. | [optional] +**fvp** | [**InstanceBootOptionsFvp**](InstanceBootOptionsFvp.md) | | [optional] + +## Example + +```python +from corellium.models.instance_boot_options import InstanceBootOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceBootOptions from a JSON string +instance_boot_options_instance = InstanceBootOptions.from_json(json) +# print the JSON string representation of the object +print(InstanceBootOptions.to_json()) +# convert the object into a dict +instance_boot_options_dict = instance_boot_options_instance.to_dict() +# create an instance of InstanceBootOptions from a dict +instance_boot_options_from_dict = InstanceBootOptions.from_dict(instance_boot_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceBootOptionsAdditionalTag.md b/docs/InstanceBootOptionsAdditionalTag.md index 5297aba..556d10d 100644 --- a/docs/InstanceBootOptionsAdditionalTag.md +++ b/docs/InstanceBootOptionsAdditionalTag.md @@ -2,9 +2,23 @@ ### Instance Boot Option * kalloc: Enable kalloc/kfree trace access via GDB (Enterprise only) * gpu: Enable cloud GPU acceleration (Extra costs incurred, cloud only) * no-keyboard: Enable keyboard passthrough from web interface * nodevmode: Disable developer mode on iOS16 and greater * sep-cons-ext: Patch SEPOS to print debug messages to console * iboot-jailbreak: Patch iBoot to disable signature checks * llb-jailbreak: Patch LLB to disable signature checks * rom-jailbreak: Patch BootROM to disable signature checks -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +## Enum + +* `KALLOC` (value: `'kalloc'`) + +* `GPU` (value: `'gpu'`) + +* `NO_MINUS_KEYBOARD` (value: `'no-keyboard'`) + +* `NODEVMODE` (value: `'nodevmode'`) + +* `SEP_MINUS_CONS_MINUS_EXT` (value: `'sep-cons-ext'`) + +* `IBOOT_MINUS_JAILBREAK` (value: `'iboot-jailbreak'`) + +* `LLB_MINUS_JAILBREAK` (value: `'llb-jailbreak'`) + +* `ROM_MINUS_JAILBREAK` (value: `'rom-jailbreak'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceBootOptionsFvp.md b/docs/InstanceBootOptionsFvp.md new file mode 100644 index 0000000..ad01e6b --- /dev/null +++ b/docs/InstanceBootOptionsFvp.md @@ -0,0 +1,53 @@ +# InstanceBootOptionsFvp + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model_binary** | **str** | FVP model binary path. Populated by the server from the flavor; clients should not set this. | [optional] +**parameters** | **Dict[str, str]** | Key/value map of FVP model parameters. | [optional] +**data** | **List[str]** | Raw data to load at specified addresses (format: \"file@address\"). | [optional] +**breaks** | **List[str]** | Breakpoint addresses to set. | [optional] +**dumps** | **List[str]** | Memory regions to dump (format: \"file@address,size\"). | [optional] +**cadi_log** | **str** | Log all CADI calls into an XML log file. | [optional] +**cadi_server** | **str** | Start CADI server. | [optional] +**iris_server** | **str** | Start Iris server. | [optional] +**iris_log** | **str** | Iris log level. | [optional] +**iris_allow_remote** | **str** | Allow remote connections to the Iris server. | [optional] +**iris_port_range** | **str** | Port range to scan when starting the Iris server (format: \"min:max\"). | [optional] +**iris_port** | **str** | Specific port for the Iris server. | [optional] +**run** | **str** | Run the simulation immediately when a debug server is started. | [optional] +**stat** | **str** | Print run statistics on simulation exit. | [optional] +**quiet** | **str** | Suppress informational output. | [optional] +**start** | **str** | Set initial PC to application start address. | [optional] +**plugin** | **str** | Load plugin. | [optional] +**fast_ram** | **str** | Enable FastRAM and load its configuration from file. | [optional] +**save** | **str** | Save checkpoint to directory on simulation exit. | [optional] +**restore** | **str** | Restore checkpoint from directory on simulation startup. | [optional] +**cpi_file** | **str** | File to set Cycle Per Instruction class. | [optional] +**cycle_limit** | **str** | Number of cycles to run. | [optional] +**cpu_limit** | **str** | Number of host active CPU seconds to run. | [optional] +**time_limit** | **str** | Number of wall-clock seconds to run. | [optional] +**sim_limit** | **str** | Number of seconds to simulate. | [optional] + +## Example + +```python +from corellium.models.instance_boot_options_fvp import InstanceBootOptionsFvp + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceBootOptionsFvp from a JSON string +instance_boot_options_fvp_instance = InstanceBootOptionsFvp.from_json(json) +# print the JSON string representation of the object +print(InstanceBootOptionsFvp.to_json()) + +# convert the object into a dict +instance_boot_options_fvp_dict = instance_boot_options_fvp_instance.to_dict() +# create an instance of InstanceBootOptionsFvp from a dict +instance_boot_options_fvp_from_dict = InstanceBootOptionsFvp.from_dict(instance_boot_options_fvp_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceBootOptionsKernel.md b/docs/InstanceBootOptionsKernel.md new file mode 100644 index 0000000..a2b7990 --- /dev/null +++ b/docs/InstanceBootOptionsKernel.md @@ -0,0 +1,29 @@ +# InstanceBootOptionsKernel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firmware_path** | **str** | Relative path within the firmware to the bundled kernel file. | + +## Example + +```python +from corellium.models.instance_boot_options_kernel import InstanceBootOptionsKernel + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceBootOptionsKernel from a JSON string +instance_boot_options_kernel_instance = InstanceBootOptionsKernel.from_json(json) +# print the JSON string representation of the object +print(InstanceBootOptionsKernel.to_json()) + +# convert the object into a dict +instance_boot_options_kernel_dict = instance_boot_options_kernel_instance.to_dict() +# create an instance of InstanceBootOptionsKernel from a dict +instance_boot_options_kernel_from_dict = InstanceBootOptionsKernel.from_dict(instance_boot_options_kernel_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceBootOptionsKernelV1.md b/docs/InstanceBootOptionsKernelV1.md new file mode 100644 index 0000000..d5c0f1a --- /dev/null +++ b/docs/InstanceBootOptionsKernelV1.md @@ -0,0 +1,30 @@ +# InstanceBootOptionsKernelV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firmware_path** | **str** | The relative path within the firmware to the kernel file that has been bundled up with the selected firmware | [optional] + +## Example + +```python +from corellium.models.instance_boot_options_kernel_v1 import InstanceBootOptionsKernelV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceBootOptionsKernelV1 from a JSON string +instance_boot_options_kernel_v1_instance = InstanceBootOptionsKernelV1.from_json(json) +# print the JSON string representation of the object +print(InstanceBootOptionsKernelV1.to_json()) + +# convert the object into a dict +instance_boot_options_kernel_v1_dict = instance_boot_options_kernel_v1_instance.to_dict() +# create an instance of InstanceBootOptionsKernelV1 from a dict +instance_boot_options_kernel_v1_from_dict = InstanceBootOptionsKernelV1.from_dict(instance_boot_options_kernel_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceBootOptionsPongo.md b/docs/InstanceBootOptionsPongo.md new file mode 100644 index 0000000..5950333 --- /dev/null +++ b/docs/InstanceBootOptionsPongo.md @@ -0,0 +1,31 @@ +# InstanceBootOptionsPongo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Pongo image ID. Uploaded pongo images are keyed by UUID, like other instance images. | +**name** | **str** | File name. | +**size** | **float** | File size. | + +## Example + +```python +from corellium.models.instance_boot_options_pongo import InstanceBootOptionsPongo + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceBootOptionsPongo from a JSON string +instance_boot_options_pongo_instance = InstanceBootOptionsPongo.from_json(json) +# print the JSON string representation of the object +print(InstanceBootOptionsPongo.to_json()) + +# convert the object into a dict +instance_boot_options_pongo_dict = instance_boot_options_pongo_instance.to_dict() +# create an instance of InstanceBootOptionsPongo from a dict +instance_boot_options_pongo_from_dict = InstanceBootOptionsPongo.from_dict(instance_boot_options_pongo_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceBootOptionsPongoV1.md b/docs/InstanceBootOptionsPongoV1.md new file mode 100644 index 0000000..2543591 --- /dev/null +++ b/docs/InstanceBootOptionsPongoV1.md @@ -0,0 +1,32 @@ +# InstanceBootOptionsPongoV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Image Id | [optional] +**name** | **str** | File name | [optional] +**size** | **float** | File size | [optional] + +## Example + +```python +from corellium.models.instance_boot_options_pongo_v1 import InstanceBootOptionsPongoV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceBootOptionsPongoV1 from a JSON string +instance_boot_options_pongo_v1_instance = InstanceBootOptionsPongoV1.from_json(json) +# print the JSON string representation of the object +print(InstanceBootOptionsPongoV1.to_json()) + +# convert the object into a dict +instance_boot_options_pongo_v1_dict = instance_boot_options_pongo_v1_instance.to_dict() +# create an instance of InstanceBootOptionsPongoV1 from a dict +instance_boot_options_pongo_v1_from_dict = InstanceBootOptionsPongoV1.from_dict(instance_boot_options_pongo_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceBootOptionsV1.md b/docs/InstanceBootOptionsV1.md new file mode 100644 index 0000000..8e3594a --- /dev/null +++ b/docs/InstanceBootOptionsV1.md @@ -0,0 +1,39 @@ +# InstanceBootOptionsV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**boot_args** | **str** | | [optional] +**restore_boot_args** | **str** | | [optional] +**udid** | **str** | Boot udid | [optional] +**ecid** | **str** | Assigned ECID | [optional] +**random_seed** | **str** | Random seed to provide to boot if any | [optional] +**pac** | **bool** | Enable PAC | [optional] +**aprr** | **bool** | Enable APRR | [optional] +**additional_tags** | [**List[InstanceBootOptionsAdditionalTag]**](InstanceBootOptionsAdditionalTag.md) | | [optional] +**kernel** | [**InstanceBootOptionsKernelV1**](InstanceBootOptionsKernelV1.md) | | [optional] +**pongo** | [**InstanceBootOptionsPongoV1**](InstanceBootOptionsPongoV1.md) | | [optional] + +## Example + +```python +from corellium.models.instance_boot_options_v1 import InstanceBootOptionsV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceBootOptionsV1 from a JSON string +instance_boot_options_v1_instance = InstanceBootOptionsV1.from_json(json) +# print the JSON string representation of the object +print(InstanceBootOptionsV1.to_json()) + +# convert the object into a dict +instance_boot_options_v1_dict = instance_boot_options_v1_instance.to_dict() +# create an instance of InstanceBootOptionsV1 from a dict +instance_boot_options_v1_from_dict = InstanceBootOptionsV1.from_dict(instance_boot_options_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceBootOptionsVMMIOInner.md b/docs/InstanceBootOptionsVMMIOInner.md new file mode 100644 index 0000000..129f8a1 --- /dev/null +++ b/docs/InstanceBootOptionsVMMIOInner.md @@ -0,0 +1,31 @@ +# InstanceBootOptionsVMMIOInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start** | **str** | Start address for beginning of vMMIO range. | +**size** | **str** | The size of the range to use for vMMIO. | +**irq** | **str** | System IRQs, 1-16 ranges must be specified | + +## Example + +```python +from corellium.models.instance_boot_options_vmmio_inner import InstanceBootOptionsVMMIOInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceBootOptionsVMMIOInner from a JSON string +instance_boot_options_vmmio_inner_instance = InstanceBootOptionsVMMIOInner.from_json(json) +# print the JSON string representation of the object +print(InstanceBootOptionsVMMIOInner.to_json()) + +# convert the object into a dict +instance_boot_options_vmmio_inner_dict = instance_boot_options_vmmio_inner_instance.to_dict() +# create an instance of InstanceBootOptionsVMMIOInner from a dict +instance_boot_options_vmmio_inner_from_dict = InstanceBootOptionsVMMIOInner.from_dict(instance_boot_options_vmmio_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceConsole.md b/docs/InstanceConsole.md new file mode 100644 index 0000000..b215bce --- /dev/null +++ b/docs/InstanceConsole.md @@ -0,0 +1,33 @@ +# InstanceConsole + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Console display name. | +**id** | **str** | Console port identifier (e.g. port-cons). Used to select this console when getting the console websocket URL. | +**port** | **str** | TCP port number. | +**hash** | **str** | Hash for console authentication. | +**info** | **str** | Encrypted info for console authentication. | + +## Example + +```python +from corellium.models.instance_console import InstanceConsole + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceConsole from a JSON string +instance_console_instance = InstanceConsole.from_json(json) +# print the JSON string representation of the object +print(InstanceConsole.to_json()) + +# convert the object into a dict +instance_console_dict = instance_console_instance.to_dict() +# create an instance of InstanceConsole from a dict +instance_console_from_dict = InstanceConsole.from_dict(instance_console_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceConsoleEndpoint.md b/docs/InstanceConsoleEndpoint.md index 37fe8f5..501323e 100644 --- a/docs/InstanceConsoleEndpoint.md +++ b/docs/InstanceConsoleEndpoint.md @@ -1,12 +1,29 @@ # InstanceConsoleEndpoint - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | Console Websocket URL | [optional] +**url** | **str** | Console WebSocket URL. | + +## Example + +```python +from corellium.models.instance_console_endpoint import InstanceConsoleEndpoint + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceConsoleEndpoint from a JSON string +instance_console_endpoint_instance = InstanceConsoleEndpoint.from_json(json) +# print the JSON string representation of the object +print(InstanceConsoleEndpoint.to_json()) +# convert the object into a dict +instance_console_endpoint_dict = instance_console_endpoint_instance.to_dict() +# create an instance of InstanceConsoleEndpoint from a dict +instance_console_endpoint_from_dict = InstanceConsoleEndpoint.from_dict(instance_console_endpoint_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceConsoleEndpointV1.md b/docs/InstanceConsoleEndpointV1.md new file mode 100644 index 0000000..ccefce4 --- /dev/null +++ b/docs/InstanceConsoleEndpointV1.md @@ -0,0 +1,30 @@ +# InstanceConsoleEndpointV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Console Websocket URL | [optional] + +## Example + +```python +from corellium.models.instance_console_endpoint_v1 import InstanceConsoleEndpointV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceConsoleEndpointV1 from a JSON string +instance_console_endpoint_v1_instance = InstanceConsoleEndpointV1.from_json(json) +# print the JSON string representation of the object +print(InstanceConsoleEndpointV1.to_json()) + +# convert the object into a dict +instance_console_endpoint_v1_dict = instance_console_endpoint_v1_instance.to_dict() +# create an instance of InstanceConsoleEndpointV1 from a dict +instance_console_endpoint_v1_from_dict = InstanceConsoleEndpointV1.from_dict(instance_console_endpoint_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceConsoleV1.md b/docs/InstanceConsoleV1.md new file mode 100644 index 0000000..dde7d8b --- /dev/null +++ b/docs/InstanceConsoleV1.md @@ -0,0 +1,34 @@ +# InstanceConsoleV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Console display name | [optional] +**id** | **str** | Console port identifier (e.g. port-cons) | [optional] +**port** | **float** | TCP port number | [optional] +**hash** | **str** | Hash for console authentication | [optional] +**info** | **str** | Encrypted info for console authentication | [optional] + +## Example + +```python +from corellium.models.instance_console_v1 import InstanceConsoleV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceConsoleV1 from a JSON string +instance_console_v1_instance = InstanceConsoleV1.from_json(json) +# print the JSON string representation of the object +print(InstanceConsoleV1.to_json()) + +# convert the object into a dict +instance_console_v1_dict = instance_console_v1_instance.to_dict() +# create an instance of InstanceConsoleV1 from a dict +instance_console_v1_from_dict = InstanceConsoleV1.from_dict(instance_console_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceCreateOptions.md b/docs/InstanceCreateOptions.md index 6307ad4..ced4e6b 100644 --- a/docs/InstanceCreateOptions.md +++ b/docs/InstanceCreateOptions.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shared_snapshot** | **str** | identifier of the snapshot that was shared. | [optional] @@ -13,12 +14,30 @@ Name | Type | Description | Notes **project** | **str** | project UUID | **os** | **str** | OS Version | **osbuild** | **str** | OS Build | [optional] -**patches** | **list[str]** | list of patches to apply | [optional] +**patches** | **List[str]** | list of patches to apply | [optional] **fwpackage** | **str** | URL or image id | [optional] **orig_fw_package_url** | **str** | URL that firmware package used to create this instance is available at | [optional] **encrypt** | **bool** | | [optional] **wifi_mac** | **str** | | [optional] +**wan_access** | **bool** | manages internet access | [optional] + +## Example + +```python +from corellium.models.instance_create_options import InstanceCreateOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceCreateOptions from a JSON string +instance_create_options_instance = InstanceCreateOptions.from_json(json) +# print the JSON string representation of the object +print(InstanceCreateOptions.to_json()) +# convert the object into a dict +instance_create_options_dict = instance_create_options_instance.to_dict() +# create an instance of InstanceCreateOptions from a dict +instance_create_options_from_dict = InstanceCreateOptions.from_dict(instance_create_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceHyperTraceState.md b/docs/InstanceHyperTraceState.md new file mode 100644 index 0000000..057f824 --- /dev/null +++ b/docs/InstanceHyperTraceState.md @@ -0,0 +1,32 @@ +# InstanceHyperTraceState + +Hypervisor (btrace) tracing state. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **str** | HyperTrace (btrace) status. | [optional] +**length** | **float** | Length of trace data. | [optional] +**filter** | [**List[InstanceTraceFilter]**](InstanceTraceFilter.md) | Active trace filters matching traits to values. | [optional] + +## Example + +```python +from corellium.models.instance_hyper_trace_state import InstanceHyperTraceState + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceHyperTraceState from a JSON string +instance_hyper_trace_state_instance = InstanceHyperTraceState.from_json(json) +# print the JSON string representation of the object +print(InstanceHyperTraceState.to_json()) + +# convert the object into a dict +instance_hyper_trace_state_dict = instance_hyper_trace_state_instance.to_dict() +# create an instance of InstanceHyperTraceState from a dict +instance_hyper_trace_state_from_dict = InstanceHyperTraceState.from_dict(instance_hyper_trace_state_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceHyperTraceStateV1.md b/docs/InstanceHyperTraceStateV1.md new file mode 100644 index 0000000..cbf29d6 --- /dev/null +++ b/docs/InstanceHyperTraceStateV1.md @@ -0,0 +1,32 @@ +# InstanceHyperTraceStateV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **str** | HyperTrace (btrace) status | [optional] +**length** | **float** | Length of trace data | [optional] +**filter** | **str** | Trace filter expression | [optional] + +## Example + +```python +from corellium.models.instance_hyper_trace_state_v1 import InstanceHyperTraceStateV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceHyperTraceStateV1 from a JSON string +instance_hyper_trace_state_v1_instance = InstanceHyperTraceStateV1.from_json(json) +# print the JSON string representation of the object +print(InstanceHyperTraceStateV1.to_json()) + +# convert the object into a dict +instance_hyper_trace_state_v1_dict = instance_hyper_trace_state_v1_instance.to_dict() +# create an instance of InstanceHyperTraceStateV1 from a dict +instance_hyper_trace_state_v1_from_dict = InstanceHyperTraceStateV1.from_dict(instance_hyper_trace_state_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceInput.md b/docs/InstanceInput.md deleted file mode 100644 index 16a4ecd..0000000 --- a/docs/InstanceInput.md +++ /dev/null @@ -1,23 +0,0 @@ -# InstanceInput - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**position** | **object** | Finger Positions | -**buttons** | [**list[TouchInputButtonsInner]**](TouchInputButtonsInner.md) | Buttons to be held when this position is reached. Either a Button enum object or an ASCII character. No change if not defined. | [optional] -**normalized** | **bool** | true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) | [optional] -**wait** | **float** | Duration to wait before this input is executed. Instant if not defined. | [optional] -**start** | **object** | Finger Positions | -**end** | **object** | Finger Positions | -**bezier_points** | **list[object]** | array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined. | [optional] -**start_buttons** | [**list[TouchInputButtonsInner]**](TouchInputButtonsInner.md) | Buttons to be held during this curve. | -**end_buttons** | [**list[TouchInputButtonsInner]**](TouchInputButtonsInner.md) | Buttons to be left held after this curve. Same as startButtons if not defined. | [optional] -**duration** | **float** | Duration to execute this curve over. | -**required** | **str** | text to type | -**key_duration** | **float** | How long to take to type each key. 150ms if not defined. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InstanceInputBody.md b/docs/InstanceInputBody.md new file mode 100644 index 0000000..337b0ac --- /dev/null +++ b/docs/InstanceInputBody.md @@ -0,0 +1,40 @@ +# InstanceInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position** | **List[List[float]]** | Array of per-finger [x,y] touch positions, up to 10 depending on model. | [optional] +**buttons** | **List[str]** | Buttons held when this position is reached. Omit to leave unchanged; use an empty array to release. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor. | [optional] +**normalized** | **bool** | Use normalized 0-10000 coordinates. | [optional] +**wait** | **float** | Duration to wait before this input is executed, in milliseconds. | [optional] +**start** | **List[List[float]]** | Array of per-finger [x,y] touch positions, up to 10 depending on model. | +**end** | **List[List[float]]** | Array of per-finger [x,y] touch positions, up to 10 depending on model. | +**bezier_points** | **List[List[List[float]]]** | Per-finger intermediate touch positions. | [optional] +**start_buttons** | **List[str]** | Buttons held during this curve. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor. | +**end_buttons** | **List[str]** | Buttons left held after this curve. Omit to leave unchanged; use an empty array to release. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor. | [optional] +**duration** | **float** | Duration to execute this curve over, in milliseconds. | +**text** | **str** | Text to type. | +**key_duration** | **float** | How long to take to type each key, in milliseconds. Defaults to ~150ms per key downstream when omitted. | [optional] + +## Example + +```python +from corellium.models.instance_input_body import InstanceInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceInputBody from a JSON string +instance_input_body_instance = InstanceInputBody.from_json(json) +# print the JSON string representation of the object +print(InstanceInputBody.to_json()) + +# convert the object into a dict +instance_input_body_dict = instance_input_body_instance.to_dict() +# create an instance of InstanceInputBody from a dict +instance_input_body_from_dict = InstanceInputBody.from_dict(instance_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceInputRequest.md b/docs/InstanceInputRequest.md new file mode 100644 index 0000000..447a508 --- /dev/null +++ b/docs/InstanceInputRequest.md @@ -0,0 +1,41 @@ +# InstanceInputRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position** | **object** | Finger Positions | [optional] +**buttons** | **List[object]** | Buttons to be held when this position is reached. Accepts case-insensitive VM button names, keyboard key names, or single ASCII characters. No change if not defined; an empty array releases all buttons. | [optional] +**normalized** | **bool** | true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) | [optional] +**wait** | **float** | Duration to wait before this input is executed. Instant if not defined. | [optional] +**start** | **object** | Finger Positions | +**end** | **object** | Finger Positions | +**bezier_points** | **List[object]** | array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined. | [optional] +**start_buttons** | **List[object]** | Buttons to be held during this curve. | +**end_buttons** | **List[object]** | Buttons to be left held after this curve. Same as startButtons if not defined. | [optional] +**duration** | **float** | Duration to execute this curve over. | +**required** | **str** | text to type | +**key_duration** | **float** | How long to take to type each key. 150ms if not defined. | [optional] + +## Example + +```python +from corellium.models.instance_input_request import InstanceInputRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceInputRequest from a JSON string +instance_input_request_instance = InstanceInputRequest.from_json(json) +# print the JSON string representation of the object +print(InstanceInputRequest.to_json()) + +# convert the object into a dict +instance_input_request_dict = instance_input_request_instance.to_dict() +# create an instance of InstanceInputRequest from a dict +instance_input_request_from_dict = InstanceInputRequest.from_dict(instance_input_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceInterface.md b/docs/InstanceInterface.md index a07dcb5..5c8273c 100644 --- a/docs/InstanceInterface.md +++ b/docs/InstanceInterface.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **device_id** | **str** | The instance id | [optional] **interface_id** | **str** | The interface id | [optional] +## Example + +```python +from corellium.models.instance_interface import InstanceInterface + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceInterface from a JSON string +instance_interface_instance = InstanceInterface.from_json(json) +# print the JSON string representation of the object +print(InstanceInterface.to_json()) + +# convert the object into a dict +instance_interface_dict = instance_interface_instance.to_dict() +# create an instance of InstanceInterface from a dict +instance_interface_from_dict = InstanceInterface.from_dict(instance_interface_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceInterfaceStatus.md b/docs/InstanceInterfaceStatus.md new file mode 100644 index 0000000..14e4cf1 --- /dev/null +++ b/docs/InstanceInterfaceStatus.md @@ -0,0 +1,31 @@ +# InstanceInterfaceStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interface_id** | **str** | Interface identifier. | +**interconnect_id** | **str** | Interconnect identifier when the interface is attached. | [optional] +**status** | **str** | Current interface attachment status. | + +## Example + +```python +from corellium.models.instance_interface_status import InstanceInterfaceStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceInterfaceStatus from a JSON string +instance_interface_status_instance = InstanceInterfaceStatus.from_json(json) +# print the JSON string representation of the object +print(InstanceInterfaceStatus.to_json()) + +# convert the object into a dict +instance_interface_status_dict = instance_interface_status_instance.to_dict() +# create an instance of InstanceInterfaceStatus from a dict +instance_interface_status_from_dict = InstanceInterfaceStatus.from_dict(instance_interface_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceList.md b/docs/InstanceList.md new file mode 100644 index 0000000..97ee09b --- /dev/null +++ b/docs/InstanceList.md @@ -0,0 +1,34 @@ +# InstanceList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Instance]**](Instance.md) | Results for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.instance_list import InstanceList + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceList from a JSON string +instance_list_instance = InstanceList.from_json(json) +# print the JSON string representation of the object +print(InstanceList.to_json()) + +# convert the object into a dict +instance_list_dict = instance_list_instance.to_dict() +# create an instance of InstanceList from a dict +instance_list_from_dict = InstanceList.from_dict(instance_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceNetdumpState.md b/docs/InstanceNetdumpState.md index 4194e8e..440cf82 100644 --- a/docs/InstanceNetdumpState.md +++ b/docs/InstanceNetdumpState.md @@ -1,14 +1,31 @@ # InstanceNetdumpState - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hash** | **str** | | [optional] -**info** | **str** | | [optional] -**enabled** | **bool** | | [optional] +**hash** | **str** | Hash for netdump authentication. | [optional] +**info** | **str** | Encrypted info for netdump authentication. | [optional] +**enabled** | **bool** | Whether netdump is enabled. | [optional] + +## Example + +```python +from corellium.models.instance_netdump_state import InstanceNetdumpState + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceNetdumpState from a JSON string +instance_netdump_state_instance = InstanceNetdumpState.from_json(json) +# print the JSON string representation of the object +print(InstanceNetdumpState.to_json()) +# convert the object into a dict +instance_netdump_state_dict = instance_netdump_state_instance.to_dict() +# create an instance of InstanceNetdumpState from a dict +instance_netdump_state_from_dict = InstanceNetdumpState.from_dict(instance_netdump_state_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceNetdumpStateV1.md b/docs/InstanceNetdumpStateV1.md new file mode 100644 index 0000000..87d0640 --- /dev/null +++ b/docs/InstanceNetdumpStateV1.md @@ -0,0 +1,32 @@ +# InstanceNetdumpStateV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hash** | **str** | | [optional] +**info** | **str** | | [optional] +**enabled** | **bool** | | [optional] + +## Example + +```python +from corellium.models.instance_netdump_state_v1 import InstanceNetdumpStateV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceNetdumpStateV1 from a JSON string +instance_netdump_state_v1_instance = InstanceNetdumpStateV1.from_json(json) +# print the JSON string representation of the object +print(InstanceNetdumpStateV1.to_json()) + +# convert the object into a dict +instance_netdump_state_v1_dict = instance_netdump_state_v1_instance.to_dict() +# create an instance of InstanceNetdumpStateV1 from a dict +instance_netdump_state_v1_from_dict = InstanceNetdumpStateV1.from_dict(instance_netdump_state_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceNetmonProcMapState.md b/docs/InstanceNetmonProcMapState.md deleted file mode 100644 index 59889f2..0000000 --- a/docs/InstanceNetmonProcMapState.md +++ /dev/null @@ -1,14 +0,0 @@ -# InstanceNetmonProcMapState - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hash** | **str** | | [optional] -**info** | **str** | | [optional] -**enabled** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InstanceNetmonState.md b/docs/InstanceNetmonState.md index ae4544c..53c20c8 100644 --- a/docs/InstanceNetmonState.md +++ b/docs/InstanceNetmonState.md @@ -1,14 +1,31 @@ # InstanceNetmonState - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hash** | **str** | | [optional] -**info** | **str** | | [optional] -**enabled** | **bool** | | [optional] +**hash** | **str** | Hash for network monitor authentication. | [optional] +**info** | **str** | Encrypted info for network monitor authentication. | [optional] +**enabled** | **bool** | Whether network monitoring is enabled. | [optional] + +## Example + +```python +from corellium.models.instance_netmon_state import InstanceNetmonState + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceNetmonState from a JSON string +instance_netmon_state_instance = InstanceNetmonState.from_json(json) +# print the JSON string representation of the object +print(InstanceNetmonState.to_json()) +# convert the object into a dict +instance_netmon_state_dict = instance_netmon_state_instance.to_dict() +# create an instance of InstanceNetmonState from a dict +instance_netmon_state_from_dict = InstanceNetmonState.from_dict(instance_netmon_state_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceNetmonStateV1.md b/docs/InstanceNetmonStateV1.md new file mode 100644 index 0000000..0968312 --- /dev/null +++ b/docs/InstanceNetmonStateV1.md @@ -0,0 +1,32 @@ +# InstanceNetmonStateV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hash** | **str** | | [optional] +**info** | **str** | | [optional] +**enabled** | **bool** | | [optional] + +## Example + +```python +from corellium.models.instance_netmon_state_v1 import InstanceNetmonStateV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceNetmonStateV1 from a JSON string +instance_netmon_state_v1_instance = InstanceNetmonStateV1.from_json(json) +# print the JSON string representation of the object +print(InstanceNetmonStateV1.to_json()) + +# convert the object into a dict +instance_netmon_state_v1_dict = instance_netmon_state_v1_instance.to_dict() +# create an instance of InstanceNetmonStateV1 from a dict +instance_netmon_state_v1_from_dict = InstanceNetmonStateV1.from_dict(instance_netmon_state_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceReadOnlyStatus.md b/docs/InstanceReadOnlyStatus.md new file mode 100644 index 0000000..e85447e --- /dev/null +++ b/docs/InstanceReadOnlyStatus.md @@ -0,0 +1,29 @@ +# InstanceReadOnlyStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**read_only_status** | **str** | Overall progress of flipping read-only state. | + +## Example + +```python +from corellium.models.instance_read_only_status import InstanceReadOnlyStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceReadOnlyStatus from a JSON string +instance_read_only_status_instance = InstanceReadOnlyStatus.from_json(json) +# print the JSON string representation of the object +print(InstanceReadOnlyStatus.to_json()) + +# convert the object into a dict +instance_read_only_status_dict = instance_read_only_status_instance.to_dict() +# create an instance of InstanceReadOnlyStatus from a dict +instance_read_only_status_from_dict = InstanceReadOnlyStatus.from_dict(instance_read_only_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceReadOnlyStatusV1.md b/docs/InstanceReadOnlyStatusV1.md new file mode 100644 index 0000000..637d987 --- /dev/null +++ b/docs/InstanceReadOnlyStatusV1.md @@ -0,0 +1,30 @@ +# InstanceReadOnlyStatusV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**read_only_status** | **str** | Overall progress of flipping read-only state | [optional] + +## Example + +```python +from corellium.models.instance_read_only_status_v1 import InstanceReadOnlyStatusV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceReadOnlyStatusV1 from a JSON string +instance_read_only_status_v1_instance = InstanceReadOnlyStatusV1.from_json(json) +# print the JSON string representation of the object +print(InstanceReadOnlyStatusV1.to_json()) + +# convert the object into a dict +instance_read_only_status_v1_dict = instance_read_only_status_v1_instance.to_dict() +# create an instance of InstanceReadOnlyStatusV1 from a dict +instance_read_only_status_v1_from_dict = InstanceReadOnlyStatusV1.from_dict(instance_read_only_status_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceRestoreStatus.md b/docs/InstanceRestoreStatus.md new file mode 100644 index 0000000..8f5108a --- /dev/null +++ b/docs/InstanceRestoreStatus.md @@ -0,0 +1,34 @@ +# InstanceRestoreStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Restore type: 0=Not Restore, 1=Restore, 2=CloneFromSnapshot. | [optional] +**stage** | **str** | Restore stage. | [optional] +**progress** | **object** | Stage progress (0-100). Serialized as a string when non-zero; emitted as the number 0 at the start of a restore, and absent when no restore is in progress. | [optional] +**total_progress** | **object** | Total restore progress (0-100). Serialized as a string when non-zero; emitted as the number 0 at the start of a restore, and absent when no restore is in progress. | [optional] +**heading** | **str** | Current heading for progress modal. | [optional] +**description** | **str** | Current description for progress modal. | [optional] + +## Example + +```python +from corellium.models.instance_restore_status import InstanceRestoreStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceRestoreStatus from a JSON string +instance_restore_status_instance = InstanceRestoreStatus.from_json(json) +# print the JSON string representation of the object +print(InstanceRestoreStatus.to_json()) + +# convert the object into a dict +instance_restore_status_dict = instance_restore_status_instance.to_dict() +# create an instance of InstanceRestoreStatus from a dict +instance_restore_status_from_dict = InstanceRestoreStatus.from_dict(instance_restore_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceRestoreStatusV1.md b/docs/InstanceRestoreStatusV1.md new file mode 100644 index 0000000..cb1f357 --- /dev/null +++ b/docs/InstanceRestoreStatusV1.md @@ -0,0 +1,35 @@ +# InstanceRestoreStatusV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Restore type: 0=Not Restore, 1=Restore, 2=CloneFromSnapshot | [optional] +**stage** | **str** | Restore stage: download-images, prepare, boot, start, extracting, asr, flashing, done | [optional] +**progress** | **float** | Stage progress (0-100) | [optional] +**total_progress** | **float** | Total restore progress (0-100) | [optional] +**heading** | **str** | Current heading for progress modal | [optional] +**description** | **str** | Current description for progress modal | [optional] + +## Example + +```python +from corellium.models.instance_restore_status_v1 import InstanceRestoreStatusV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceRestoreStatusV1 from a JSON string +instance_restore_status_v1_instance = InstanceRestoreStatusV1.from_json(json) +# print the JSON string representation of the object +print(InstanceRestoreStatusV1.to_json()) + +# convert the object into a dict +instance_restore_status_v1_dict = instance_restore_status_v1_instance.to_dict() +# create an instance of InstanceRestoreStatusV1 from a dict +instance_restore_status_v1_from_dict = InstanceRestoreStatusV1.from_dict(instance_restore_status_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceReturn.md b/docs/InstanceReturn.md index f2f3e9c..73592e7 100644 --- a/docs/InstanceReturn.md +++ b/docs/InstanceReturn.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Instance ID | -**state** | [**InstanceState**](InstanceState.md) | | +**state** | [**InstanceStateV1**](InstanceStateV1.md) | | + +## Example + +```python +from corellium.models.instance_return import InstanceReturn + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceReturn from a JSON string +instance_return_instance = InstanceReturn.from_json(json) +# print the JSON string representation of the object +print(InstanceReturn.to_json()) +# convert the object into a dict +instance_return_dict = instance_return_instance.to_dict() +# create an instance of InstanceReturn from a dict +instance_return_from_dict = InstanceReturn.from_dict(instance_return_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceServices.md b/docs/InstanceServices.md index bfc2234..35a8c6a 100644 --- a/docs/InstanceServices.md +++ b/docs/InstanceServices.md @@ -1,12 +1,29 @@ # InstanceServices - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **vpn** | [**VpnDefinition**](VpnDefinition.md) | | [optional] +## Example + +```python +from corellium.models.instance_services import InstanceServices + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceServices from a JSON string +instance_services_instance = InstanceServices.from_json(json) +# print the JSON string representation of the object +print(InstanceServices.to_json()) + +# convert the object into a dict +instance_services_dict = instance_services_instance.to_dict() +# create an instance of InstanceServices from a dict +instance_services_from_dict = InstanceServices.from_dict(instance_services_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceServicesV1.md b/docs/InstanceServicesV1.md new file mode 100644 index 0000000..720644a --- /dev/null +++ b/docs/InstanceServicesV1.md @@ -0,0 +1,30 @@ +# InstanceServicesV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vpn** | [**VpnDefinitionV1**](VpnDefinitionV1.md) | | [optional] + +## Example + +```python +from corellium.models.instance_services_v1 import InstanceServicesV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceServicesV1 from a JSON string +instance_services_v1_instance = InstanceServicesV1.from_json(json) +# print the JSON string representation of the object +print(InstanceServicesV1.to_json()) + +# convert the object into a dict +instance_services_v1_dict = instance_services_v1_instance.to_dict() +# create an instance of InstanceServicesV1 from a dict +instance_services_v1_from_dict = InstanceServicesV1.from_dict(instance_services_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceSnapshotsList.md b/docs/InstanceSnapshotsList.md new file mode 100644 index 0000000..1fbf75e --- /dev/null +++ b/docs/InstanceSnapshotsList.md @@ -0,0 +1,34 @@ +# InstanceSnapshotsList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Snapshot]**](Snapshot.md) | Instance snapshots. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.instance_snapshots_list import InstanceSnapshotsList + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceSnapshotsList from a JSON string +instance_snapshots_list_instance = InstanceSnapshotsList.from_json(json) +# print the JSON string representation of the object +print(InstanceSnapshotsList.to_json()) + +# convert the object into a dict +instance_snapshots_list_dict = instance_snapshots_list_instance.to_dict() +# create an instance of InstanceSnapshotsList from a dict +instance_snapshots_list_from_dict = InstanceSnapshotsList.from_dict(instance_snapshots_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceStartOptions.md b/docs/InstanceStartOptions.md index dc00755..9cd1251 100644 --- a/docs/InstanceStartOptions.md +++ b/docs/InstanceStartOptions.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **paused** | **bool** | Start device paused | [optional] **sockcap** | **bool** | Start device with Process Network Monitoring enabled | [optional] +## Example + +```python +from corellium.models.instance_start_options import InstanceStartOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceStartOptions from a JSON string +instance_start_options_instance = InstanceStartOptions.from_json(json) +# print the JSON string representation of the object +print(InstanceStartOptions.to_json()) + +# convert the object into a dict +instance_start_options_dict = instance_start_options_instance.to_dict() +# create an instance of InstanceStartOptions from a dict +instance_start_options_from_dict = InstanceStartOptions.from_dict(instance_start_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceState.md b/docs/InstanceState.md index 3f0881e..21fa8d5 100644 --- a/docs/InstanceState.md +++ b/docs/InstanceState.md @@ -1,10 +1,26 @@ # InstanceState -Current Instance State +What the device is doing right now. - `creating`: being built after `v3CreateInstance`. Not usable yet; poll until it changes. - `booting`: starting up. Wait for `on`. - `on`: running and usable. - `paused`: stopped mid-run and held in place; `v3UnpauseInstance` resumes it. - `rebooting`: restarting after `v3RebootInstance`. - `restoring`: being restored from a snapshot or backup. - `off`: shut down. `v3StartInstance` turns it on. - `deleting`: being removed after `v3DeleteInstance`. - `error`: something went wrong. See the instance's `error` field. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +## Enum + +* `ON` (value: `'on'`) + +* `OFF` (value: `'off'`) + +* `BOOTING` (value: `'booting'`) + +* `DELETING` (value: `'deleting'`) + +* `CREATING` (value: `'creating'`) + +* `RESTORING` (value: `'restoring'`) + +* `PAUSED` (value: `'paused'`) + +* `REBOOTING` (value: `'rebooting'`) + +* `ERROR` (value: `'error'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceStateV1.md b/docs/InstanceStateV1.md new file mode 100644 index 0000000..f84c43b --- /dev/null +++ b/docs/InstanceStateV1.md @@ -0,0 +1,27 @@ +# InstanceStateV1 + +Current Instance State + +## Enum + +* `ON` (value: `'on'`) + +* `OFF` (value: `'off'`) + +* `BOOTING` (value: `'booting'`) + +* `DELETING` (value: `'deleting'`) + +* `CREATING` (value: `'creating'`) + +* `RESTORING` (value: `'restoring'`) + +* `PAUSED` (value: `'paused'`) + +* `REBOOTING` (value: `'rebooting'`) + +* `ERROR` (value: `'error'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceStopOptions.md b/docs/InstanceStopOptions.md index 24f3978..120d103 100644 --- a/docs/InstanceStopOptions.md +++ b/docs/InstanceStopOptions.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **soft** | **bool** | Request VM OS power down | [optional] +## Example + +```python +from corellium.models.instance_stop_options import InstanceStopOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceStopOptions from a JSON string +instance_stop_options_instance = InstanceStopOptions.from_json(json) +# print the JSON string representation of the object +print(InstanceStopOptions.to_json()) + +# convert the object into a dict +instance_stop_options_dict = instance_stop_options_instance.to_dict() +# create an instance of InstanceStopOptions from a dict +instance_stop_options_from_dict = InstanceStopOptions.from_dict(instance_stop_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceTraceFilter.md b/docs/InstanceTraceFilter.md new file mode 100644 index 0000000..e1c1814 --- /dev/null +++ b/docs/InstanceTraceFilter.md @@ -0,0 +1,30 @@ +# InstanceTraceFilter + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trait** | **str** | Trait to match, e.g. \"pid\". | +**value** | **str** | Value the trait must equal. | + +## Example + +```python +from corellium.models.instance_trace_filter import InstanceTraceFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceTraceFilter from a JSON string +instance_trace_filter_instance = InstanceTraceFilter.from_json(json) +# print the JSON string representation of the object +print(InstanceTraceFilter.to_json()) + +# convert the object into a dict +instance_trace_filter_dict = instance_trace_filter_instance.to_dict() +# create an instance of InstanceTraceFilter from a dict +instance_trace_filter_from_dict = InstanceTraceFilter.from_dict(instance_trace_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceTraceState.md b/docs/InstanceTraceState.md new file mode 100644 index 0000000..478807c --- /dev/null +++ b/docs/InstanceTraceState.md @@ -0,0 +1,32 @@ +# InstanceTraceState + +System call (strace) tracing state. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether tracing is enabled. | [optional] +**length** | **float** | Length of trace data. | [optional] +**filter** | [**List[InstanceTraceFilter]**](InstanceTraceFilter.md) | Active trace filters matching traits to values. | [optional] + +## Example + +```python +from corellium.models.instance_trace_state import InstanceTraceState + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceTraceState from a JSON string +instance_trace_state_instance = InstanceTraceState.from_json(json) +# print the JSON string representation of the object +print(InstanceTraceState.to_json()) + +# convert the object into a dict +instance_trace_state_dict = instance_trace_state_instance.to_dict() +# create an instance of InstanceTraceState from a dict +instance_trace_state_from_dict = InstanceTraceState.from_dict(instance_trace_state_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceTraceStateV1.md b/docs/InstanceTraceStateV1.md new file mode 100644 index 0000000..4a90586 --- /dev/null +++ b/docs/InstanceTraceStateV1.md @@ -0,0 +1,32 @@ +# InstanceTraceStateV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether tracing is enabled | [optional] +**length** | **float** | Length of trace data | [optional] +**filter** | **str** | Trace filter expression | [optional] + +## Example + +```python +from corellium.models.instance_trace_state_v1 import InstanceTraceStateV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceTraceStateV1 from a JSON string +instance_trace_state_v1_instance = InstanceTraceStateV1.from_json(json) +# print the JSON string representation of the object +print(InstanceTraceStateV1.to_json()) + +# convert the object into a dict +instance_trace_state_v1_dict = instance_trace_state_v1_instance.to_dict() +# create an instance of InstanceTraceStateV1 from a dict +instance_trace_state_v1_from_dict = InstanceTraceStateV1.from_dict(instance_trace_state_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceUefiBootloader.md b/docs/InstanceUefiBootloader.md new file mode 100644 index 0000000..21b19f5 --- /dev/null +++ b/docs/InstanceUefiBootloader.md @@ -0,0 +1,31 @@ +# InstanceUefiBootloader + +UEFI bootloader descriptor, when the device uses one. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Human-readable label for the UEFI boot option. | +**name** | **str** | UEFI bootloader file name. | + +## Example + +```python +from corellium.models.instance_uefi_bootloader import InstanceUefiBootloader + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceUefiBootloader from a JSON string +instance_uefi_bootloader_instance = InstanceUefiBootloader.from_json(json) +# print the JSON string representation of the object +print(InstanceUefiBootloader.to_json()) + +# convert the object into a dict +instance_uefi_bootloader_dict = instance_uefi_bootloader_instance.to_dict() +# create an instance of InstanceUefiBootloader from a dict +instance_uefi_bootloader_from_dict = InstanceUefiBootloader.from_dict(instance_uefi_bootloader_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceUpgradeBody.md b/docs/InstanceUpgradeBody.md index f5a7b67..7979456 100644 --- a/docs/InstanceUpgradeBody.md +++ b/docs/InstanceUpgradeBody.md @@ -1,13 +1,30 @@ # InstanceUpgradeBody - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**os** | **str** | iOS version | -**osbuild** | **str** | (optional) iOS build ID | [optional] +**os_version** | **str** | iOS version to upgrade to, as listed by `GET /v3/models/{model}/software` for this device's model. | +**os_build** | **str** | Optional exact build of that version. Without it, the newest build of `osVersion` is used. | [optional] + +## Example + +```python +from corellium.models.instance_upgrade_body import InstanceUpgradeBody + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceUpgradeBody from a JSON string +instance_upgrade_body_instance = InstanceUpgradeBody.from_json(json) +# print the JSON string representation of the object +print(InstanceUpgradeBody.to_json()) +# convert the object into a dict +instance_upgrade_body_dict = instance_upgrade_body_instance.to_dict() +# create an instance of InstanceUpgradeBody from a dict +instance_upgrade_body_from_dict = InstanceUpgradeBody.from_dict(instance_upgrade_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceUpgradeBodyV1.md b/docs/InstanceUpgradeBodyV1.md new file mode 100644 index 0000000..f70f5c2 --- /dev/null +++ b/docs/InstanceUpgradeBodyV1.md @@ -0,0 +1,31 @@ +# InstanceUpgradeBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**os** | **str** | iOS version | +**osbuild** | **str** | (optional) iOS build ID | [optional] + +## Example + +```python +from corellium.models.instance_upgrade_body_v1 import InstanceUpgradeBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceUpgradeBodyV1 from a JSON string +instance_upgrade_body_v1_instance = InstanceUpgradeBodyV1.from_json(json) +# print the JSON string representation of the object +print(InstanceUpgradeBodyV1.to_json()) + +# convert the object into a dict +instance_upgrade_body_v1_dict = instance_upgrade_body_v1_instance.to_dict() +# create an instance of InstanceUpgradeBodyV1 from a dict +instance_upgrade_body_v1_from_dict = InstanceUpgradeBodyV1.from_dict(instance_upgrade_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceUpgradeResponse.md b/docs/InstanceUpgradeResponse.md new file mode 100644 index 0000000..03daed3 --- /dev/null +++ b/docs/InstanceUpgradeResponse.md @@ -0,0 +1,30 @@ +# InstanceUpgradeResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Instance ID. | +**state** | **str** | Instance state. Always \"updating\" once an upgrade has been accepted. | + +## Example + +```python +from corellium.models.instance_upgrade_response import InstanceUpgradeResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceUpgradeResponse from a JSON string +instance_upgrade_response_instance = InstanceUpgradeResponse.from_json(json) +# print the JSON string representation of the object +print(InstanceUpgradeResponse.to_json()) + +# convert the object into a dict +instance_upgrade_response_dict = instance_upgrade_response_instance.to_dict() +# create an instance of InstanceUpgradeResponse from a dict +instance_upgrade_response_from_dict = InstanceUpgradeResponse.from_dict(instance_upgrade_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceV1.md b/docs/InstanceV1.md new file mode 100644 index 0000000..c401221 --- /dev/null +++ b/docs/InstanceV1.md @@ -0,0 +1,82 @@ +# InstanceV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Instance Identifier | [optional] +**name** | **str** | Instance Name | [optional] +**key** | **str** | Key used to encrypt the Instance | [optional] +**flavor** | **str** | The flavor identifier of this instance | [optional] +**flavor_name** | **str** | Human-readable flavor name | [optional] +**type** | **str** | Device type | [optional] +**project** | **str** | The projectId of the project this instance belongs to | [optional] +**domain_name** | **str** | Domain name associated with this instance's project | [optional] +**state** | [**InstanceStateV1**](InstanceStateV1.md) | | [optional] +**state_changed** | **datetime** | Time the state of the instance last changed | [optional] +**started_at** | **datetime** | Time the instance was started, NULL if currently SHUTOFF | [optional] +**user_task** | **str** | Currently executing User Task | [optional] +**task_state** | **str** | Current task state if any | [optional] +**error** | **str** | Current error state if any | [optional] +**restore_status** | [**InstanceRestoreStatusV1**](InstanceRestoreStatusV1.md) | | [optional] +**read_only** | [**InstanceReadOnlyStatusV1**](InstanceReadOnlyStatusV1.md) | | [optional] +**boot_options** | [**InstanceBootOptionsV1**](InstanceBootOptionsV1.md) | | [optional] +**service_ip** | **str** | Services IP Address | [optional] +**wifi_ip** | **str** | LAN IP Address | [optional] +**wifi_mac** | **str** | WiFi MAC address | [optional] +**secondary_ip** | **str** | Secondary Interface LAN IP Address (if supported) | [optional] +**port_adb** | **float** | ADB (Android Debug Bridge) port number | [optional] +**port_usb** | **float** | USB port number | [optional] +**port_gdb** | **float** | GDB (GNU Debugger) port number | [optional] +**port_sep_gdb** | **float** | SEP GDB port number | [optional] +**port_cons** | **float** | Default console port number | [optional] +**port_sep_cons** | **float** | SEP console port number | [optional] +**port_sys_cons** | **float** | System console port number | [optional] +**port_usbmuxd** | **float** | USBMuxD port number | [optional] +**port_frida** | **float** | Frida instrumentation port number | [optional] +**port_sockcap** | **float** | Socket capture port number | [optional] +**port_model_gw** | **float** | Model gateway port number | [optional] +**consoles** | [**List[InstanceConsoleV1]**](InstanceConsoleV1.md) | Available console connections | [optional] +**services** | [**InstanceServicesV1**](InstanceServicesV1.md) | | [optional] +**panicked** | **bool** | | [optional] +**created** | **datetime** | Time instance was created | [optional] +**model** | **str** | Model of virtual machine device | [optional] +**fwpackage** | **str** | URL that package used to create this instance is available at | [optional] +**os** | **str** | | [optional] +**osbuild** | **str** | | [optional] +**agent** | [**InstanceAgentStateV1**](InstanceAgentStateV1.md) | | [optional] +**netmon** | [**InstanceNetmonStateV1**](InstanceNetmonStateV1.md) | | [optional] +**netdump** | [**InstanceNetdumpStateV1**](InstanceNetdumpStateV1.md) | | [optional] +**core_trace** | [**InstanceTraceStateV1**](InstanceTraceStateV1.md) | | [optional] +**hyper_trace** | [**InstanceHyperTraceStateV1**](InstanceHyperTraceStateV1.md) | | [optional] +**expose_port** | **str** | | [optional] +**fault** | **bool** | | [optional] +**patches** | **List[str]** | | [optional] +**created_by** | [**CreatedBy**](CreatedBy.md) | | [optional] +**uefi_bootloader** | **bool** | Whether UEFI bootloader is in use | [optional] +**orientation** | **float** | Device orientation | [optional] +**mast** | **bool** | Whether the device has a mast | [optional] +**wan_access** | **bool** | Whether WAN access is enabled | [optional] + +## Example + +```python +from corellium.models.instance_v1 import InstanceV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceV1 from a JSON string +instance_v1_instance = InstanceV1.from_json(json) +# print the JSON string representation of the object +print(InstanceV1.to_json()) + +# convert the object into a dict +instance_v1_dict = instance_v1_instance.to_dict() +# create an instance of InstanceV1 from a dict +instance_v1_from_dict = InstanceV1.from_dict(instance_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstancesApi.md b/docs/InstancesApi.md new file mode 100644 index 0000000..530b36a --- /dev/null +++ b/docs/InstancesApi.md @@ -0,0 +1,3693 @@ +# corellium.InstancesApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_attach_instance_interface**](InstancesApi.md#v3_attach_instance_interface) | **POST** /v3/instances/{instanceId}/interfaces | Connect an I/O interface +[**v3_clear_instance_panics**](InstancesApi.md#v3_clear_instance_panics) | **DELETE** /v3/instances/{instanceId}/panics | Clear kernel panics +[**v3_create_instance**](InstancesApi.md#v3_create_instance) | **POST** /v3/instances | Create a device +[**v3_delete_instance**](InstancesApi.md#v3_delete_instance) | **DELETE** /v3/instances/{instanceId} | Remove Instance +[**v3_detach_instance_interface**](InstancesApi.md#v3_detach_instance_interface) | **DELETE** /v3/instances/{instanceId}/interfaces/{interfaceId} | Disconnect an I/O interface +[**v3_disable_expose_port**](InstancesApi.md#v3_disable_expose_port) | **POST** /v3/instances/{instanceId}/exposeport/disable | Stop exposing the device port +[**v3_download_netdump_pcap**](InstancesApi.md#v3_download_netdump_pcap) | **GET** /v3/instances/{instanceId}/netdump.pcap | Download the Enhanced Network Monitor capture +[**v3_download_network_monitor_pcap**](InstancesApi.md#v3_download_network_monitor_pcap) | **GET** /v3/instances/{instanceId}/networkMonitor.pcap | Download the Network Monitor capture +[**v3_enable_expose_port**](InstancesApi.md#v3_enable_expose_port) | **POST** /v3/instances/{instanceId}/exposeport/enable | Expose the device port +[**v3_get_instance**](InstancesApi.md#v3_get_instance) | **GET** /v3/instances/{instanceId} | Get a device +[**v3_get_instance_console**](InstancesApi.md#v3_get_instance_console) | **GET** /v3/instances/{instanceId}/console | Get console websocket URL +[**v3_get_instance_console_log**](InstancesApi.md#v3_get_instance_console_log) | **GET** /v3/instances/{instanceId}/consoleLog | Read the console log +[**v3_get_instance_gpios**](InstancesApi.md#v3_get_instance_gpios) | **GET** /v3/instances/{instanceId}/gpios | Read board LEDs, buttons and switches +[**v3_get_instance_image_upload**](InstancesApi.md#v3_get_instance_image_upload) | **GET** /v3/instances/{instance}/image-upload/{type}/{imageId}/{name} | Get image upload status +[**v3_get_instance_panics**](InstancesApi.md#v3_get_instance_panics) | **GET** /v3/instances/{instanceId}/panics | List kernel panics +[**v3_get_instance_peripherals**](InstancesApi.md#v3_get_instance_peripherals) | **GET** /v3/instances/{instanceId}/peripherals | Read simulated sensors +[**v3_get_instance_quick_connect_command**](InstancesApi.md#v3_get_instance_quick_connect_command) | **GET** /v3/instances/{instanceId}/quickConnectCommand | Get the SSH quick-connect command +[**v3_get_instance_screenshot**](InstancesApi.md#v3_get_instance_screenshot) | **GET** /v3/instances/{instanceId}/screenshot.{format} | Take a screenshot +[**v3_get_instance_state**](InstancesApi.md#v3_get_instance_state) | **GET** /v3/instances/{instanceId}/state | Get a device's state +[**v3_inject_message**](InstancesApi.md#v3_inject_message) | **POST** /v3/instances/{instanceId}/message | Send an SMS message to an iOS device +[**v3_kernel_preauthorize**](InstancesApi.md#v3_kernel_preauthorize) | **GET** /v3/instances/{instanceId}/kernel-authorize | Get a kernel download token +[**v3_list_instances**](InstancesApi.md#v3_list_instances) | **GET** /v3/instances | List Instances +[**v3_media_play**](InstancesApi.md#v3_media_play) | **POST** /v3/instances/{instanceId}/media/play | Play a video or audio file into the device +[**v3_media_stop**](InstancesApi.md#v3_media_stop) | **POST** /v3/instances/{instanceId}/media/stop | Stop playing media +[**v3_patch_instance**](InstancesApi.md#v3_patch_instance) | **PATCH** /v3/instances/{instanceId} | Change device settings +[**v3_patch_instance_read_only**](InstancesApi.md#v3_patch_instance_read_only) | **PATCH** /v3/instances/{instanceId}/read-only | Update Instance Read Only +[**v3_pause_instance**](InstancesApi.md#v3_pause_instance) | **POST** /v3/instances/{instanceId}/pause | Pause a device +[**v3_post_instance_input**](InstancesApi.md#v3_post_instance_input) | **POST** /v3/instances/{instanceId}/input | Provide Instance Input +[**v3_put_instance_image_upload**](InstancesApi.md#v3_put_instance_image_upload) | **PUT** /v3/instances/{instance}/image-upload/{type}/{imageId}/{name} | Upload image chunk +[**v3_reboot_instance**](InstancesApi.md#v3_reboot_instance) | **POST** /v3/instances/{instanceId}/reboot | Restart a device +[**v3_restore_backup**](InstancesApi.md#v3_restore_backup) | **POST** /v3/instances/{instanceId}/restoreBackup | Restore a backup onto a device +[**v3_rotate_instance**](InstancesApi.md#v3_rotate_instance) | **POST** /v3/instances/{instanceId}/rotate | Rotate the device +[**v3_set_instance_gpios**](InstancesApi.md#v3_set_instance_gpios) | **PUT** /v3/instances/{instanceId}/gpios | Press board buttons or flip switches +[**v3_set_instance_peripherals**](InstancesApi.md#v3_set_instance_peripherals) | **PUT** /v3/instances/{instanceId}/peripherals | Change simulated sensors +[**v3_start_instance**](InstancesApi.md#v3_start_instance) | **POST** /v3/instances/{instanceId}/start | Turn a device on +[**v3_start_netdump**](InstancesApi.md#v3_start_netdump) | **POST** /v3/instances/{instanceId}/netdump/enable | Start Enhanced Network Monitor +[**v3_start_network_monitor**](InstancesApi.md#v3_start_network_monitor) | **POST** /v3/instances/{instanceId}/sslsplit/enable | Start Network Monitor +[**v3_stop_instance**](InstancesApi.md#v3_stop_instance) | **POST** /v3/instances/{instanceId}/stop | Turn a device off +[**v3_stop_netdump**](InstancesApi.md#v3_stop_netdump) | **POST** /v3/instances/{instanceId}/netdump/disable | Stop Enhanced Network Monitor +[**v3_stop_network_monitor**](InstancesApi.md#v3_stop_network_monitor) | **POST** /v3/instances/{instanceId}/sslsplit/disable | Stop Network Monitor +[**v3_unpause_instance**](InstancesApi.md#v3_unpause_instance) | **POST** /v3/instances/{instanceId}/unpause | Resume a paused device +[**v3_upgrade_instance**](InstancesApi.md#v3_upgrade_instance) | **POST** /v3/instances/{instanceId}/upgrade | Upgrade the iOS version +[**v3_validate_instance_token**](InstancesApi.md#v3_validate_instance_token) | **POST** /v3/instances/{instanceId}/token/validate | Check a device connection token + + +# **v3_attach_instance_interface** +> v3_attach_instance_interface(instance_id, attach_interface_body) + +Connect an I/O interface + +Connects one of this device's I/O interfaces (for example a GPIO bank, `gpio/0`) to an I/O interconnect, a virtual wire that links interfaces on different devices so they can signal each other. Create the interconnect first with the Interconnects endpoints. Requires the configurable I/O license feature (403 otherwise). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.attach_interface_body import AttachInterfaceBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + attach_interface_body = corellium.AttachInterfaceBody() # AttachInterfaceBody | Interface attachment request. + + try: + # Connect an I/O interface + api_instance.v3_attach_instance_interface(instance_id, attach_interface_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_attach_instance_interface: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **attach_interface_body** | [**AttachInterfaceBody**](AttachInterfaceBody.md)| Interface attachment request. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_clear_instance_panics** +> v3_clear_instance_panics(instance_id) + +Clear kernel panics + +Deletes the recorded kernel panics for this device, so the next `v3GetInstancePanics` shows only new ones. An unknown `instanceId` is a successful no-op that returns 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Clear kernel panics + api_instance.v3_clear_instance_panics(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_clear_instance_panics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_create_instance** +> CreateInstanceResponse v3_create_instance(create_instance_body) + +Create a device + +Creates a new virtual device (instance) in a project. This returns quickly with the new `id` and `state: "creating"`; the device is then built in the background, which can take several minutes. Poll `v3GetInstanceState` (or `v3GetInstance`) until the state is `on` before using it. If it becomes `error`, read the instance's `error` field. + +**Minimum request:** `projectId`, `flavor`, and `osVersion` and/or `osBuild`. + +**Typical steps:** +1. `GET /v3/models`: pick a model and note its `flavor`, allowed cores, and memory. +2. `GET /v3/models/{model}/software`: pick a build and note its `osVersion` and `osBuild`. +3. `POST /v3/instances` with `{ "projectId", "flavor", "osVersion", "osBuild" }`. Add `name` so you can find it later, and `bootOptions` (for example `cores`, `ram`) to change the defaults. +4. Poll the state until `on`. + +**How the operating system is chosen.** With both `osVersion` and `osBuild`, that exact build is used. With only `osBuild`, the build with that ID is used. With only `osVersion`, the newest build of that version is used. To boot your own firmware file instead, set `fwPackage`. + +Some options need license features (for example creating devices from custom firmware, or custom model definitions via `charmBootArgs`); using one your license lacks returns 403. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_instance_body import CreateInstanceBody +from corellium.models.create_instance_response import CreateInstanceResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + create_instance_body = corellium.CreateInstanceBody() # CreateInstanceBody | The VM definition to create. + + try: + # Create a device + api_response = api_instance.v3_create_instance(create_instance_body) + print("The response of InstancesApi->v3_create_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_create_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_instance_body** | [**CreateInstanceBody**](CreateInstanceBody.md)| The VM definition to create. | + +### Return type + +[**CreateInstanceResponse**](CreateInstanceResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid instance definition. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**409** | Instance could not be created due to a conflict. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_instance** +> v3_delete_instance(instance_id) + +Remove Instance + +Removes the instance. Deletion is asynchronous: the call schedules the teardown and returns +204 immediately, while the instance remains visible in a `deleting` state until teardown completes. + +An `instanceId` that does not exist also returns 204. The API cannot tell a call with an invalid ID apart +from a second call made to confirm an earlier delete succeeded, so both succeed. Repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. +A repeat therefore returns 204 both while the record is still present in the `deleting` state and after it +has disappeared. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Remove Instance + api_instance.v3_delete_instance(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_delete_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_detach_instance_interface** +> v3_detach_instance_interface(instance_id, interface_id, detach_interface_body) + +Disconnect an I/O interface + +Disconnects one of this device's I/O interfaces from an I/O interconnect. Requires the configurable I/O license feature. + +Deletes are idempotent: an unknown instance, interconnect or interface, including one that was already detached, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.detach_interface_body import DetachInterfaceBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + interface_id = 'gpio/0' # str | Interface ID. + detach_interface_body = corellium.DetachInterfaceBody() # DetachInterfaceBody | Interface detachment request. + + try: + # Disconnect an I/O interface + api_instance.v3_detach_instance_interface(instance_id, interface_id, detach_interface_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_detach_instance_interface: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **interface_id** | **str**| Interface ID. | + **detach_interface_body** | [**DetachInterfaceBody**](DetachInterfaceBody.md)| Interface detachment request. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_disable_expose_port** +> v3_disable_expose_port(instance_id) + +Stop exposing the device port + +Turns off the exposed port enabled with `v3EnableExposePort`. Runs as a background task on the device; returns 204 once it is scheduled. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Stop exposing the device port + api_instance.v3_disable_expose_port(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_disable_expose_port: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_download_netdump_pcap** +> bytearray v3_download_netdump_pcap(instance_id) + +Download the Enhanced Network Monitor capture + +Downloads the packets recorded by Enhanced Network Monitor (see `v3StartNetdump`) as a pcapng file, which packet analyzers such as Wireshark open directly. Requires the Enhanced Network Monitor feature (403 otherwise). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Download the Enhanced Network Monitor capture + api_response = api_instance.v3_download_netdump_pcap(instance_id) + print("The response of InstancesApi->v3_download_netdump_pcap:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_download_netdump_pcap: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.tcpdump.pcap, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | PCAPNG file. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_download_network_monitor_pcap** +> bytearray v3_download_network_monitor_pcap(instance_id) + +Download the Network Monitor capture + +Downloads the traffic recorded by Network Monitor (see `v3StartNetworkMonitor`) as a pcap file. Save it with a `.pcap` extension and open it in a packet analyzer such as Wireshark. Download while monitoring runs or after stopping it. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Download the Network Monitor capture + api_response = api_instance.v3_download_network_monitor_pcap(instance_id) + print("The response of InstancesApi->v3_download_network_monitor_pcap:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_download_network_monitor_pcap: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.tcpdump.pcap, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | PCAP file. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_enable_expose_port** +> v3_enable_expose_port(instance_id) + +Expose the device port + +Turns on the exposed port for this device, for device access. This runs as a background task on the device; returns 204 once it is scheduled. Undo with `v3DisableExposePort`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Expose the device port + api_instance.v3_enable_expose_port(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_enable_expose_port: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance** +> Instance v3_get_instance(instance_id, return_attr=return_attr) + +Get a device + +Returns everything about one device: its name, model, operating system, state, boot options, network details and consoles. Use `state` to see whether it is ready, and `error` to see why it failed. Pass `returnAttr` to get only some fields. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance import Instance +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + return_attr = ['[\"name\",\"state\"]'] # List[str] | Attributes to include in instance return. (optional) + + try: + # Get a device + api_response = api_instance.v3_get_instance(instance_id, return_attr=return_attr) + print("The response of InstancesApi->v3_get_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **return_attr** | [**List[str]**](str.md)| Attributes to include in instance return. | [optional] + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_console** +> InstanceConsoleEndpoint v3_get_instance_console(instance_id, type=type) + +Get console websocket URL + +Get console WebSocket URL. + +Instances can have more than one console. To connect to a specific console: +1. Call Get Instance and read the `consoles` array. +2. Take the `id` of the console you want and remove the `port-` prefix (e.g. `port-uart7-cons` becomes `uart7-cons`). +3. Pass that value as the `type` query parameter (e.g. `?type=uart7-cons`). + +If `type` is omitted, the default console (`cons`) is used. Some models have no default console and require `type`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_console_endpoint import InstanceConsoleEndpoint +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + type = 'uart7-cons' # str | Console to connect to: a `consoles[].id` from Get Instance with the `port-` prefix removed. Defaults to `cons`. (optional) + + try: + # Get console websocket URL + api_response = api_instance.v3_get_instance_console(instance_id, type=type) + print("The response of InstancesApi->v3_get_instance_console:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_console: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **type** | **str**| Console to connect to: a `consoles[].id` from Get Instance with the `port-` prefix removed. Defaults to `cons`. | [optional] + +### Return type + +[**InstanceConsoleEndpoint**](InstanceConsoleEndpoint.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Invalid console type, or type omitted on a model without a default console. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_console_log** +> str v3_get_instance_console_log(instance_id) + +Read the console log + +Returns the text output of the device's main console (serial output from boot messages, the kernel and system services) as plain text. Useful for seeing why a device will not boot. For a live, interactive console, use `v3GetInstanceConsole` instead. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Read the console log + api_response = api_instance.v3_get_instance_console_log(instance_id) + print("The response of InstancesApi->v3_get_instance_console_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_console_log: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current console log. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_gpios** +> GpiosState v3_get_instance_gpios(instance_id) + +Read board LEDs, buttons and switches + +Returns the current state of the simulated LEDs, buttons and switches (GPIO pins) on an IoT or embedded board model, for example whether an LED your firmware drives is lit. The device must be running. Phone models do not have these, and the request fails for them. See `GpiosState` for the format. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.gpios_state import GpiosState +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Read board LEDs, buttons and switches + api_response = api_instance.v3_get_instance_gpios(instance_id) + print("The response of InstancesApi->v3_get_instance_gpios:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_gpios: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**GpiosState**](GpiosState.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current GPIO state. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_image_upload** +> bytearray v3_get_instance_image_upload(instance, type, image_id, name, resumable_chunk_number=resumable_chunk_number) + +Get image upload status + +Checks the progress of a chunked upload made with `v3PutInstanceImageUpload`, or downloads the finished file. With chunk parameters (`resumableChunkNumber` and friends) it returns 200 if that chunk is already stored and 204 if it still needs to be sent; without them it downloads the image file. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + type = 'type_example' # str | What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. + image_id = 'image_id_example' # str | An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. + name = 'name_example' # str | The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. + resumable_chunk_number = 3.4 # float | Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. (optional) + + try: + # Get image upload status + api_response = api_instance.v3_get_instance_image_upload(instance, type, image_id, name, resumable_chunk_number=resumable_chunk_number) + print("The response of InstancesApi->v3_get_instance_image_upload:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_image_upload: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance** | **str**| Instance ID. | + **type** | **str**| What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. | + **image_id** | **str**| An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. | + **name** | **str**| The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. | + **resumable_chunk_number** | **float**| Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. | [optional] + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An empty JSON object when a probed chunk is already stored, the image bytes when the file is stored locally, or the image metadata when no file has been stored yet. | - | +**204** | The probed chunk is not stored yet and still needs to be uploaded. | - | +**302** | The image is stored in S3; follow the Location header to download it. | * Location - URL the client is redirected to.
| +**400** | The image identifier is invalid or the image record is missing. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No image with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_panics** +> List[Dict[str, Optional[object]]] v3_get_instance_panics(instance_id) + +List kernel panics + +Returns the kernel panics (crashes of the operating system itself) recorded on this device, as a list of panic records. An empty list means none have happened since the last clear. Clear them with `v3ClearInstancePanics`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # List kernel panics + api_response = api_instance.v3_get_instance_panics(instance_id) + print("The response of InstancesApi->v3_get_instance_panics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_panics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +**List[Dict[str, Optional[object]]]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Array of panics. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_peripherals** +> PeripheralsData v3_get_instance_peripherals(instance_id) + +Read simulated sensors + +Returns the current values of the device's simulated sensors and hardware: motion (accelerometer, gyroscope, compass), environment (temperature, light, pressure, humidity, proximity), GPS location, battery, and biometric bypass. Only values the device reports are included; a missing field does not mean zero. See `PeripheralsData`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.peripherals_data import PeripheralsData +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Read simulated sensors + api_response = api_instance.v3_get_instance_peripherals(instance_id) + print("The response of InstancesApi->v3_get_instance_peripherals:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_peripherals: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**PeripheralsData**](PeripheralsData.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current peripherals state. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_quick_connect_command** +> str v3_get_instance_quick_connect_command(instance_id) + +Get the SSH quick-connect command + +Returns a ready-to-paste SSH command for connecting to this device, as a JSON string. Run it in a terminal on a computer that can reach the device, for example one connected with the project VPN (`GET /v3/projects/{projectId}/vpnconfig/{format}`). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get the SSH quick-connect command + api_response = api_instance.v3_get_instance_quick_connect_command(instance_id) + print("The response of InstancesApi->v3_get_instance_quick_connect_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_quick_connect_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Quick connect command. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_screenshot** +> bytearray v3_get_instance_screenshot(instance_id, format, scale=scale) + +Take a screenshot + +Captures what the device's screen shows right now and returns it as an image. Choose the file type in the path: `screenshot.png` or `screenshot.jpeg`. Use `scale` to shrink it: `scale=2` returns half the width and height, `scale=4` a quarter; the default 1 is full size. The device must be running. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + format = 'format_example' # str | Image file type: `png` (lossless, larger) or `jpeg` (smaller). + scale = 2 # float | Shrink factor. The image is 1/N of full size in each direction. Whole number; defaults to 1 (full size). (optional) + + try: + # Take a screenshot + api_response = api_instance.v3_get_instance_screenshot(instance_id, format, scale=scale) + print("The response of InstancesApi->v3_get_instance_screenshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_screenshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **format** | **str**| Image file type: `png` (lossless, larger) or `jpeg` (smaller). | + **scale** | **float**| Shrink factor. The image is 1/N of full size in each direction. Whole number; defaults to 1 (full size). | [optional] + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: image/png, image/jpeg, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Screenshot. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_state** +> InstanceState v3_get_instance_state(instance_id, return_attr=return_attr) + +Get a device's state + +Returns only the device's current state (for example `creating`, `on`, `off`), as a bare JSON string. This is the call to poll while waiting for a device to finish creating, starting, stopping or rebooting. See `InstanceState` for what each value means. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_state import InstanceState +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + return_attr = ['[\"name\",\"state\"]'] # List[str] | The attributes to return. (optional) + + try: + # Get a device's state + api_response = api_instance.v3_get_instance_state(instance_id, return_attr=return_attr) + print("The response of InstancesApi->v3_get_instance_state:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_get_instance_state: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **return_attr** | [**List[str]**](str.md)| The attributes to return. | [optional] + +### Return type + +[**InstanceState**](InstanceState.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current instance state. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | +**409** | The request conflicts with the current state of the resource. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_inject_message** +> v3_inject_message(instance_id, message_body) + +Send an SMS message to an iOS device + +Delivers a text message to an iOS device as if it arrived over the cellular network, so apps see a normal incoming SMS. Useful for testing one-time-password and verification-code flows. Send either `number` (the sender's phone number) and `message` (the text), or `raw` with the message bytes in hexadecimal for low-level testing. The device must be running. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.message_body import MessageBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + message_body = corellium.MessageBody() # MessageBody | Message data. + + try: + # Send an SMS message to an iOS device + api_instance.v3_inject_message(instance_id, message_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_inject_message: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **message_body** | [**MessageBody**](MessageBody.md)| Message data. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_kernel_preauthorize** +> Token v3_kernel_preauthorize(instance_id) + +Get a kernel download token + +Returns a short-lived token that authorizes downloading this device's kernel file without an `Authorization` header, for loading into a disassembler or debugger. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's kernel and expires when your current session token expires. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.token import Token +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get a kernel download token + api_response = api_instance.v3_kernel_preauthorize(instance_id) + print("The response of InstancesApi->v3_kernel_preauthorize:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_kernel_preauthorize: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**Token**](Token.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_instances** +> InstanceList v3_list_instances(limit=limit, offset=offset, name=name, return_attr=return_attr) + +List Instances + +Lists the devices (instances) you can access across your projects. Results are paginated with `limit` and `offset`; use `name` to find a device by name. To list only one project's devices, use `GET /v3/projects/{projectId}/instances`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_list import InstanceList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + name = 'My iPhone 13 Pro' # str | Optionally filter by instance name. (optional) + return_attr = ['[\"name\",\"state\"]'] # List[str] | Attributes to include in instance return. (optional) + + try: + # List Instances + api_response = api_instance.v3_list_instances(limit=limit, offset=offset, name=name, return_attr=return_attr) + print("The response of InstancesApi->v3_list_instances:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_list_instances: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **name** | **str**| Optionally filter by instance name. | [optional] + **return_attr** | [**List[str]**](str.md)| Attributes to include in instance return. | [optional] + +### Return type + +[**InstanceList**](InstanceList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of instances. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_media_play** +> v3_media_play(instance_id, media_play_body) + +Play a video or audio file into the device + +Plays a media file into the device, so apps receive it as if it came from the device's camera (video) and microphone (audio). Use it to test camera or scanning features, for example feeding a QR code video to an app. Open the camera app on the device to see it. + +Give exactly one source: `imageId` of a `media` image you uploaded with `POST /v3/images`, or a `url` the platform can download the file from. Returns 204 once playback starts. Call `v3MediaStop` to stop it. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.media_play_body import MediaPlayBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + media_play_body = corellium.MediaPlayBody() # MediaPlayBody | + + try: + # Play a video or audio file into the device + api_instance.v3_media_play(instance_id, media_play_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_media_play: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **media_play_body** | [**MediaPlayBody**](MediaPlayBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**404** | Instance not found. | - | +**409** | The request conflicts with the current state of the resource. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_media_stop** +> v3_media_stop(instance_id) + +Stop playing media + +Stops media started with `v3MediaPlay`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Stop playing media + api_instance.v3_media_stop(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_media_stop: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_instance** +> Instance v3_patch_instance(instance_id, patch_instance_body) + +Change device settings + +Changes a device's settings. Send only the fields you want to change: `name` (the label shown in lists), `bootOptions` (for example `cores`, `ram`, boot arguments), `proxy` (which device ports are forwarded, and whether they are reachable from outside the project), and `straceFilter` (which processes CoreTrace records, by name, process ID or thread ID; see `v3ListThreads`). Returns the updated device. This call does not turn the device on or off; use `v3StartInstance`, `v3StopInstance`, `v3RebootInstance`, `v3PauseInstance` and `v3UnpauseInstance` for that. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance import Instance +from corellium.models.patch_instance_body import PatchInstanceBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + patch_instance_body = corellium.PatchInstanceBody() # PatchInstanceBody | + + try: + # Change device settings + api_response = api_instance.v3_patch_instance(instance_id, patch_instance_body) + print("The response of InstancesApi->v3_patch_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_patch_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **patch_instance_body** | [**PatchInstanceBody**](PatchInstanceBody.md)| | + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_instance_read_only** +> Instance v3_patch_instance_read_only(instance_id, patch_instance_read_only_body) + +Update Instance Read Only + +Turns read-only mode on or off for the device. Returns the updated device. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance import Instance +from corellium.models.patch_instance_read_only_body import PatchInstanceReadOnlyBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + patch_instance_read_only_body = corellium.PatchInstanceReadOnlyBody() # PatchInstanceReadOnlyBody | + + try: + # Update Instance Read Only + api_response = api_instance.v3_patch_instance_read_only(instance_id, patch_instance_read_only_body) + print("The response of InstancesApi->v3_patch_instance_read_only:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_patch_instance_read_only: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **patch_instance_read_only_body** | [**PatchInstanceReadOnlyBody**](PatchInstanceReadOnlyBody.md)| | + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_pause_instance** +> v3_pause_instance(instance_id) + +Pause a device + +Freezes a running device in place without shutting it down: it stops executing but keeps its memory and state, so `v3UnpauseInstance` resumes it exactly where it stopped. The state becomes `paused`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Pause a device + api_instance.v3_pause_instance(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_pause_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_post_instance_input** +> InputResponse v3_post_instance_input(instance_id, instance_input_body) + +Provide Instance Input + +Sends a touch or button event to the VM. Events in the request array are processed in order. + +Each element of the request array is one of: +- **TouchInputRequest** – holds buttons (or keys) and/or touches at a screen position. + - Set `buttons` to `["finger"]` to press down and `[]` to release all buttons. + - Omit `buttons` to leave the current press state unchanged. + - `position` is an array of per-finger `[x, y]` coordinates. May be omitted for button-only input. +- **TouchCurveInputRequest** – animates a drag/swipe from `start` to `end` over `duration` ms. + - Optional `bezierPoints` shape the path; omit for a straight-line drag. +- **TextInputRequest** – types the given text. + +Buttons (or keys) accepted by `buttons` / `startButtons` / `endButtons` are an array of strings, +each either a single ASCII character or one of the following keywords: +- VM buttons (case-insensitive): `finger`, `homeButton`, `holdButton` (Power/Hold), + `volumeUp`, `volumeDown`, `backButton`, `overviewButton`. `ringerSwitch` is not supported. +- Keyboard key names: `again`, `alt`, `alterase`, `apostrophe`, `back`, `backslash`, `backspace`, + `bassboost`, `bookmarks`, `bsp`, `calc`, `camera`, `cancel`, `caps`, `capslock`, `chat`, `close`, + `closecd`, `comma`, `compose`, `computer`, `config`, `connect`, `copy`, `ctrl`, `cut`, + `cyclewindows`, `dashboard`, `del`, `delete`, `deletefile`, `dot`, `down`, `edit`, `eject`, + `ejectclose`, `email`, `end`, `enter`, `equal`, `esc`, `escape`, `exit`, `f1`–`f24`, `fastfwd`, + `file`, `finance`, `find`, `forward`, `front`, `grave`, `hangeul`, `hanja`, `help`, + `henkan`, `home`, `homepage`, `hp`, `hrgn`, `ins`, `insert`, `iso`, `k102`, `kp0`–`kp9`, + `kpasterisk`, `kpcomma`, `kpdot`, `kpenter`, `kpequal`, `kpjpcomma`, `kpleftparen`, `kpminus`, + `kpplus`, `kpplusminus`, `kprightparen`, `kpslash`, `ktkn`, `ktknhrgn`, `left`, `leftalt`, + `leftbrace`, `leftctrl`, `leftmeta`, `leftshift`, `linefeed`, `macro`, `mail`, `menu`, `meta`, + `minus`, `move`, `msdos`, `muhenkan`, `mute`, `new`, `next`, `numlock`, `open`, `pagedown`, + `pageup`, `paste`, `pause`, `pausecd`, `pgdn`, `pgup`, `phone`, `play`, `playcd`, `playpause`, + `power`, `previous`, `print`, `prog1`–`prog4`, `props`, `question`, `record`, `redo`, `refresh`, + `return`, `rewind`, `right`, `rightalt`, `rightbrace`, `rightctrl`, `rightmeta`, `rightshift`, + `ro`, `rotate`, `scale`, `screenlock`, `scrolldown`, `scrolllock`, `scrollup`, `search`, + `semicolon`, `sendfile`, `setup`, `shift`, `shop`, `slash`, `sleep`, `sound`, `space`, `sport`, + `stop`, `stopcd`, `suspend`, `sysrq`, `tab`, `undo`, `up`, `voldown`, `volup`, `wakeup`, `www`, + `xfer`, `yen`, `zkhk`. + +Use `finger:1` to press the fingerprint sensor (see the `fingerprint` example). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.input_response import InputResponse +from corellium.models.instance_input_body import InstanceInputBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + instance_input_body = [{"buttons":["finger"],"position":[[300,600]],"wait":0},{"buttons":[],"wait":100}] # List[InstanceInputBody] | Array of input events to send to the VM. + + try: + # Provide Instance Input + api_response = api_instance.v3_post_instance_input(instance_id, instance_input_body) + print("The response of InstancesApi->v3_post_instance_input:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_post_instance_input: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **instance_input_body** | [**List[InstanceInputBody]**](InstanceInputBody.md)| Array of input events to send to the VM. | + +### Return type + +[**InputResponse**](InputResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ETA of input completion in milliseconds. | - | +**400** | Invalid input (e.g. unknown button name or malformed position). | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_put_instance_image_upload** +> Dict[str, Optional[object]] v3_put_instance_image_upload(instance, type, image_id, name, body, resumable_chunk_number=resumable_chunk_number, resumable_chunk_size=resumable_chunk_size, resumable_current_chunk_size=resumable_current_chunk_size, resumable_total_size=resumable_total_size, resumable_total_chunks=resumable_total_chunks, corellium_checksum=corellium_checksum, flavor=flavor, x_corellium_image_encoding=x_corellium_image_encoding, x_corellium_image_encapsulated=x_corellium_image_encapsulated, x_corellium_total_file_size=x_corellium_total_file_size, x_corellium_image_password=x_corellium_image_password) + +Upload image chunk + +Uploads one chunk of a file attached to this device, using the same resumable protocol as `PUT /v3/images/{imageId}/file`. You choose the image ID (a new random UUID) and the image record is created on the first chunk; `type` and `name` in the path set the image type and name. Because the image is attached to the device, it replaces any image of the same `type` already attached (for `partition`, only the one with the same `name`), and it is deleted when the device is deleted. The web interface uses this route, for example to replace a kernel. For your own code, `POST /v3/images` with `instanceId` followed by `PUT /v3/images/{imageId}/file` is easier to follow. Returns 200 with an empty object for each stored chunk. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + type = 'type_example' # str | What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. + image_id = 'image_id_example' # str | An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. + name = 'name_example' # str | The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. + body = None # bytearray | + resumable_chunk_number = 3.4 # float | Which chunk this is, counting from 1. (optional) + resumable_chunk_size = 3.4 # float | The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. (optional) + resumable_current_chunk_size = 3.4 # float | Actual size in bytes of this chunk's body. (optional) + resumable_total_size = 3.4 # float | Size of the whole file in bytes. (optional) + resumable_total_chunks = 3.4 # float | How many chunks the whole file is split into. The upload completes when the last one arrives. (optional) + corellium_checksum = 'corellium_checksum_example' # str | Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. (optional) + flavor = 'flavor_example' # str | Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. (optional) + x_corellium_image_encoding = 'x_corellium_image_encoding_example' # str | How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. (optional) + x_corellium_image_encapsulated = True # bool | Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. (optional) + x_corellium_total_file_size = 3.4 # float | Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. (optional) + x_corellium_image_password = 'x_corellium_image_password_example' # str | Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. (optional) + + try: + # Upload image chunk + api_response = api_instance.v3_put_instance_image_upload(instance, type, image_id, name, body, resumable_chunk_number=resumable_chunk_number, resumable_chunk_size=resumable_chunk_size, resumable_current_chunk_size=resumable_current_chunk_size, resumable_total_size=resumable_total_size, resumable_total_chunks=resumable_total_chunks, corellium_checksum=corellium_checksum, flavor=flavor, x_corellium_image_encoding=x_corellium_image_encoding, x_corellium_image_encapsulated=x_corellium_image_encapsulated, x_corellium_total_file_size=x_corellium_total_file_size, x_corellium_image_password=x_corellium_image_password) + print("The response of InstancesApi->v3_put_instance_image_upload:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_put_instance_image_upload: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance** | **str**| Instance ID. | + **type** | **str**| What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. | + **image_id** | **str**| An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. | + **name** | **str**| The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. | + **body** | **bytearray**| | + **resumable_chunk_number** | **float**| Which chunk this is, counting from 1. | [optional] + **resumable_chunk_size** | **float**| The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. | [optional] + **resumable_current_chunk_size** | **float**| Actual size in bytes of this chunk's body. | [optional] + **resumable_total_size** | **float**| Size of the whole file in bytes. | [optional] + **resumable_total_chunks** | **float**| How many chunks the whole file is split into. The upload completes when the last one arrives. | [optional] + **corellium_checksum** | **str**| Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. | [optional] + **flavor** | **str**| Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. | [optional] + **x_corellium_image_encoding** | **str**| How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. | [optional] + **x_corellium_image_encapsulated** | **bool**| Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. | [optional] + **x_corellium_total_file_size** | **float**| Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. | [optional] + **x_corellium_image_password** | **str**| Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. | [optional] + +### Return type + +**Dict[str, Optional[object]]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Chunk stored. The body is an empty JSON object. Send the next chunk; the image is finished when the last chunk arrives. | - | +**400** | Invalid chunk or upload parameters, unreadable body, or a missing/mismatched corelliumChecksum for a firmware upload. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No image with the given identifier. | - | +**507** | The image pool does not have enough space for this upload. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_reboot_instance** +> v3_reboot_instance(instance_id) + +Restart a device + +Restarts a running device. Returns 204 once the reboot is accepted; the state becomes `rebooting` and then `on`. Poll `v3GetInstanceState` to see when it is back. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Restart a device + api_instance.v3_reboot_instance(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_reboot_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_restore_backup** +> v3_restore_backup(instance_id, restore_backup_body=restore_backup_body) + +Restore a backup onto a device + +Restores the backup attached to this device, replacing the device's data with the backup's contents. First attach the backup file by uploading it with `POST /v3/images` using `type: "backup"` and `instanceId` set to this device. Returns 204 once the restore has been scheduled; it runs in the background, so poll `v3GetInstanceState` until the device settles. + +Supply `password` if the backup is encrypted. Fails with 404 if no backup is attached. Requires the backup-restore license feature (403 otherwise). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.restore_backup_body import RestoreBackupBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + restore_backup_body = corellium.RestoreBackupBody() # RestoreBackupBody | Restore backup data. (optional) + + try: + # Restore a backup onto a device + api_instance.v3_restore_backup(instance_id, restore_backup_body=restore_backup_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_restore_backup: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **restore_backup_body** | [**RestoreBackupBody**](RestoreBackupBody.md)| Restore backup data. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_rotate_instance** +> v3_rotate_instance(instance_id, rotate_body) + +Rotate the device + +Turns the device to a new orientation, as if you rotated the phone in your hand; apps receive the rotation event. `orientation` is 1 = portrait, 2 = portrait upside down, 3 = landscape (top of device on the left), 4 = landscape (top of device on the right). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.rotate_body import RotateBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + rotate_body = corellium.RotateBody() # RotateBody | + + try: + # Rotate the device + api_instance.v3_rotate_instance(instance_id, rotate_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_rotate_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **rotate_body** | [**RotateBody**](RotateBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_set_instance_gpios** +> GpiosState v3_set_instance_gpios(instance_id, gpios_state) + +Press board buttons or flip switches + +Sets the state of the simulated buttons and switches (GPIO pins) on an IoT or embedded board model, as if you pressed a button or flipped a switch on real hardware; your firmware sees the change. Send the full bank layout you got from `v3GetInstanceGpios`, with the bits you want changed. Returns the state after the change. The device must be running. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.gpios_state import GpiosState +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + gpios_state = corellium.GpiosState() # GpiosState | New GPIO state. + + try: + # Press board buttons or flip switches + api_response = api_instance.v3_set_instance_gpios(instance_id, gpios_state) + print("The response of InstancesApi->v3_set_instance_gpios:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_set_instance_gpios: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **gpios_state** | [**GpiosState**](GpiosState.md)| New GPIO state. | + +### Return type + +[**GpiosState**](GpiosState.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current GPIOs state. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_set_instance_peripherals** +> PeripheralsData v3_set_instance_peripherals(instance_id, peripherals_data) + +Change simulated sensors + +Changes what the device's simulated sensors report to apps, for example to fake a GPS location, a low battery, or a tilt. Send only the fields you want to change. The new values are saved with the device and then the current readings are returned. + +A field is applied only if its feature is enabled for the device (motion, environment, location, battery, biometric bypass); values for disabled features are ignored silently, so check the response. `biometricPass: 1` makes fingerprint and face checks succeed. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.peripherals_data import PeripheralsData +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + peripherals_data = corellium.PeripheralsData() # PeripheralsData | New peripherals state. + + try: + # Change simulated sensors + api_response = api_instance.v3_set_instance_peripherals(instance_id, peripherals_data) + print("The response of InstancesApi->v3_set_instance_peripherals:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_set_instance_peripherals: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **peripherals_data** | [**PeripheralsData**](PeripheralsData.md)| New peripherals state. | + +### Return type + +[**PeripheralsData**](PeripheralsData.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current peripherals state. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_instance** +> v3_start_instance(instance_id, start_instance_body=start_instance_body) + +Turn a device on + +Turns on a device that is `off`. Returns 204 as soon as the start is accepted; the device then boots in the background. Poll `v3GetInstanceState` until it is `on`. Returns 409 if the device is already on. + +**Starting paused (`paused: true`).** The device is powered on but no code runs until you call `v3UnpauseInstance` or resume it from a debugger. This is the standard way to debug a device from its very first instruction, for example custom or IoT firmware, or code that runs early in boot: +1. Upload your firmware and create the device (or stop an existing one). +2. `v3StartInstance` with `{ "paused": true }`. +3. Connect your debugger (for example GDB) to the device's debug port, shown in the device's connection details. +4. Load symbols from your firmware or kernel file, set breakpoints, or load code into memory. +5. Continue execution from the debugger (`c` in GDB). + +Once a debugger is attached, pause and resume from the debugger rather than with `v3PauseInstance` / `v3UnpauseInstance`: GDB expects to control pausing itself, and pausing through the API can confuse its session. + +**Network monitoring (`sockCap: true`).** Starts the device with process network monitoring enabled, so network activity can be attributed to the processes that made it. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.start_instance_body import StartInstanceBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + start_instance_body = corellium.StartInstanceBody() # StartInstanceBody | Start options. (optional) + + try: + # Turn a device on + api_instance.v3_start_instance(instance_id, start_instance_body=start_instance_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_start_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **start_instance_body** | [**StartInstanceBody**](StartInstanceBody.md)| Start options. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | +**409** | Instance is already started. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_netdump** +> v3_start_netdump(instance_id, enable_netdump_body=enable_netdump_body) + +Start Enhanced Network Monitor + +Starts Enhanced Network Monitor on this device. It captures raw network packets, and every filter in the body is optional: limit the capture to certain ports, protocols, hosts, or process names to keep it small. Download it with `v3DownloadNetdumpPcap`. Requires the Enhanced Network Monitor feature (403 otherwise). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.enable_netdump_body import EnableNetdumpBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + enable_netdump_body = corellium.EnableNetdumpBody() # EnableNetdumpBody | (optional) + + try: + # Start Enhanced Network Monitor + api_instance.v3_start_netdump(instance_id, enable_netdump_body=enable_netdump_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_start_netdump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **enable_netdump_body** | [**EnableNetdumpBody**](EnableNetdumpBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_network_monitor** +> v3_start_network_monitor(instance_id, enable_sslsplit_body=enable_sslsplit_body) + +Start Network Monitor + +Starts Network Monitor on this device. It records the device's network traffic, including HTTPS traffic decrypted by intercepting its encryption, so you can see what apps send and receive. Download the capture as a pcap file (open it with Wireshark) with `v3DownloadNetworkMonitorPcap`. Apps that pin their certificates may refuse the intercepted connections. Requires the Network Monitor license feature (403 otherwise). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.enable_sslsplit_body import EnableSslsplitBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + enable_sslsplit_body = corellium.EnableSslsplitBody() # EnableSslsplitBody | (optional) + + try: + # Start Network Monitor + api_instance.v3_start_network_monitor(instance_id, enable_sslsplit_body=enable_sslsplit_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_start_network_monitor: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **enable_sslsplit_body** | [**EnableSslsplitBody**](EnableSslsplitBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_stop_instance** +> v3_stop_instance(instance_id, stop_instance_body=stop_instance_body) + +Turn a device off + +Turns a running device off. By default (`soft: true`) the operating system is asked to shut down cleanly. Send `{ "soft": false }` to force an immediate stop instead; use it when a clean shutdown does not finish. Returns 204 once the stop is accepted; poll `v3GetInstanceState` until it is `off`. Returns 409 if the device is already off. A stopped device keeps its storage and can be turned on again with `v3StartInstance`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.stop_instance_body import StopInstanceBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + stop_instance_body = corellium.StopInstanceBody() # StopInstanceBody | Stop options. (optional) + + try: + # Turn a device off + api_instance.v3_stop_instance(instance_id, stop_instance_body=stop_instance_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_stop_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **stop_instance_body** | [**StopInstanceBody**](StopInstanceBody.md)| Stop options. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | +**409** | Instance is currently in an off state. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_stop_netdump** +> v3_stop_netdump(instance_id) + +Stop Enhanced Network Monitor + +Stops Enhanced Network Monitor on this device. The capture so far can still be downloaded with `v3DownloadNetdumpPcap`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Stop Enhanced Network Monitor + api_instance.v3_stop_netdump(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_stop_netdump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_stop_network_monitor** +> v3_stop_network_monitor(instance_id) + +Stop Network Monitor + +Stops Network Monitor on this device. The capture so far can still be downloaded with `v3DownloadNetworkMonitorPcap`. Requires the Network Monitor license feature. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Stop Network Monitor + api_instance.v3_stop_network_monitor(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_stop_network_monitor: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_unpause_instance** +> v3_unpause_instance(instance_id) + +Resume a paused device + +Resumes a device that was paused with `v3PauseInstance`, or started with `paused: true`. It continues from exactly where it stopped. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Resume a paused device + api_instance.v3_unpause_instance(instance_id) + except Exception as e: + print("Exception when calling InstancesApi->v3_unpause_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_upgrade_instance** +> InstanceUpgradeResponse v3_upgrade_instance(instance_id, instance_upgrade_body) + +Upgrade the iOS version + +Upgrades an iOS device to a newer iOS version while keeping it as the same device. Returns 202 with `state: "updating"` once accepted; the upgrade runs in the background, so poll `v3GetInstanceState` until it is `on`. Pick the version from `GET /v3/models/{model}/software`. Use `osVersion`; the old `os` field is rejected. Requires the OS update license feature (403 otherwise). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_upgrade_body import InstanceUpgradeBody +from corellium.models.instance_upgrade_response import InstanceUpgradeResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + instance_upgrade_body = corellium.InstanceUpgradeBody() # InstanceUpgradeBody | + + try: + # Upgrade the iOS version + api_response = api_instance.v3_upgrade_instance(instance_id, instance_upgrade_body) + print("The response of InstancesApi->v3_upgrade_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesApi->v3_upgrade_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **instance_upgrade_body** | [**InstanceUpgradeBody**](InstanceUpgradeBody.md)| | + +### Return type + +[**InstanceUpgradeResponse**](InstanceUpgradeResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Upgrade started. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_validate_instance_token** +> v3_validate_instance_token(instance_id, token_validate_body) + +Check a device connection token + +Checks whether a connection token issued for this device is still valid. Returns 204 if it is. This call needs no `Authorization` header; the token in the body is what is checked. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.token_validate_body import TokenValidateBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + token_validate_body = corellium.TokenValidateBody() # TokenValidateBody | + + try: + # Check a device connection token + api_instance.v3_validate_instance_token(instance_id, token_validate_body) + except Exception as e: + print("Exception when calling InstancesApi->v3_validate_instance_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + **token_validate_body** | [**TokenValidateBody**](TokenValidateBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Token is valid. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InstancesV1Api.md b/docs/InstancesV1Api.md new file mode 100644 index 0000000..e70140c --- /dev/null +++ b/docs/InstancesV1Api.md @@ -0,0 +1,3113 @@ +# corellium.InstancesV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_attach_instance_interface**](InstancesV1Api.md#v1_attach_instance_interface) | **POST** /v1/instances/{instanceId}/interfaces | Attach I/O Interface +[**v1_clear_instance_panics**](InstancesV1Api.md#v1_clear_instance_panics) | **DELETE** /v1/instances/{instanceId}/panics | Clear Panics +[**v1_create_instance**](InstancesV1Api.md#v1_create_instance) | **POST** /v1/instances | Create Instance +[**v1_delete_instance**](InstancesV1Api.md#v1_delete_instance) | **DELETE** /v1/instances/{instanceId} | Remove Instance +[**v1_detach_instance_interface**](InstancesV1Api.md#v1_detach_instance_interface) | **DELETE** /v1/instances/{instanceId}/interfaces/{interfaceId} | Detach I/O Interface +[**v1_disable_expose_port**](InstancesV1Api.md#v1_disable_expose_port) | **POST** /v1/instances/{instanceId}/exposeport/disable | Disable an exposed port on an instance for device access. +[**v1_download_netdump_pcap_instances**](InstancesV1Api.md#v1_download_netdump_pcap_instances) | **GET** /v1/instances/{instanceId}/netdump.pcap | Download a netdump pcap file +[**v1_download_network_monitor_pcap_instances**](InstancesV1Api.md#v1_download_network_monitor_pcap_instances) | **GET** /v1/instances/{instanceId}/networkMonitor.pcap | Download a Network Monitor pcap file +[**v1_enable_expose_port**](InstancesV1Api.md#v1_enable_expose_port) | **POST** /v1/instances/{instanceId}/exposeport/enable | Enable an exposed port on an instance for device access. +[**v1_get_instance**](InstancesV1Api.md#v1_get_instance) | **GET** /v1/instances/{instanceId} | Get Instance +[**v1_get_instance_console**](InstancesV1Api.md#v1_get_instance_console) | **GET** /v1/instances/{instanceId}/console | Get console websocket URL +[**v1_get_instance_console_log**](InstancesV1Api.md#v1_get_instance_console_log) | **GET** /v1/instances/{instanceId}/consoleLog | Get Console Log +[**v1_get_instance_gpios**](InstancesV1Api.md#v1_get_instance_gpios) | **GET** /v1/instances/{instanceId}/gpios | Get Instance GPIOs +[**v1_get_instance_panics**](InstancesV1Api.md#v1_get_instance_panics) | **GET** /v1/instances/{instanceId}/panics | Get Panics +[**v1_get_instance_peripherals**](InstancesV1Api.md#v1_get_instance_peripherals) | **GET** /v1/instances/{instanceId}/peripherals | Get Instance Peripherals +[**v1_get_instance_screenshot**](InstancesV1Api.md#v1_get_instance_screenshot) | **GET** /v1/instances/{instanceId}/screenshot.{format} | Get Instance Screenshot +[**v1_get_instances**](InstancesV1Api.md#v1_get_instances) | **GET** /v1/instances | Get Instances +[**v1_inject_message_instances**](InstancesV1Api.md#v1_inject_message_instances) | **POST** /v1/instances/{instanceId}/message | Inject a message into an iOS VM +[**v1_media_play**](InstancesV1Api.md#v1_media_play) | **POST** /v1/instances/{instanceId}/media/play | Start playing media +[**v1_media_stop**](InstancesV1Api.md#v1_media_stop) | **POST** /v1/instances/{instanceId}/media/stop | Stop playing media +[**v1_patch_instance**](InstancesV1Api.md#v1_patch_instance) | **PATCH** /v1/instances/{instanceId} | Update Instance +[**v1_patch_instance_read_only**](InstancesV1Api.md#v1_patch_instance_read_only) | **PATCH** /v1/instances/{instanceId}/read-only | Update Instance Read Only +[**v1_pause_instance**](InstancesV1Api.md#v1_pause_instance) | **POST** /v1/instances/{instanceId}/pause | Pause an Instance +[**v1_post_instance_input**](InstancesV1Api.md#v1_post_instance_input) | **POST** /v1/instances/{instanceId}/input | Provide Instance Input +[**v1_reboot_instance**](InstancesV1Api.md#v1_reboot_instance) | **POST** /v1/instances/{instanceId}/reboot | Reboot an Instance +[**v1_restore_backup**](InstancesV1Api.md#v1_restore_backup) | **POST** /v1/instances/{instanceId}/restoreBackup | Restore backup +[**v1_rotate_instance**](InstancesV1Api.md#v1_rotate_instance) | **POST** /v1/instances/{instanceId}/rotate | Rotate device to specified orientation +[**v1_set_instance_gpios**](InstancesV1Api.md#v1_set_instance_gpios) | **PUT** /v1/instances/{instanceId}/gpios | Set Instance GPIOs +[**v1_set_instance_peripherals**](InstancesV1Api.md#v1_set_instance_peripherals) | **PUT** /v1/instances/{instanceId}/peripherals | Update Instance Peripherals +[**v1_set_instance_state**](InstancesV1Api.md#v1_set_instance_state) | **PUT** /v1/instances/{instanceId}/state | Set state of Instance +[**v1_start_instance**](InstancesV1Api.md#v1_start_instance) | **POST** /v1/instances/{instanceId}/start | Start an Instance +[**v1_start_netdump**](InstancesV1Api.md#v1_start_netdump) | **POST** /v1/instances/{instanceId}/netdump/enable | Start Enhanced Network Monitor on an instance. +[**v1_start_network_monitor**](InstancesV1Api.md#v1_start_network_monitor) | **POST** /v1/instances/{instanceId}/sslsplit/enable | Start Network Monitor on an instance. +[**v1_stop_instance**](InstancesV1Api.md#v1_stop_instance) | **POST** /v1/instances/{instanceId}/stop | Stop an Instance +[**v1_stop_netdump**](InstancesV1Api.md#v1_stop_netdump) | **POST** /v1/instances/{instanceId}/netdump/disable | Stop Enhanced Network Monitor on an instance. +[**v1_stop_network_monitor**](InstancesV1Api.md#v1_stop_network_monitor) | **POST** /v1/instances/{instanceId}/sslsplit/disable | Stop Network Monitor on an instance. +[**v1_unpause_instance**](InstancesV1Api.md#v1_unpause_instance) | **POST** /v1/instances/{instanceId}/unpause | Unpause an Instance +[**v1_upgrade_instance**](InstancesV1Api.md#v1_upgrade_instance) | **POST** /v1/instances/{instanceId}/upgrade | Upgrade iOS version + + +# **v1_attach_instance_interface** +> v1_attach_instance_interface(instance_id, attach_interface_request) + +Attach I/O Interface + +Attach an I/O interface to an I/O interconnect for the specified instance identifier. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.attach_interface_request import AttachInterfaceRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + attach_interface_request = corellium.AttachInterfaceRequest() # AttachInterfaceRequest | Interface attachment request + + try: + # Attach I/O Interface + api_instance.v1_attach_instance_interface(instance_id, attach_interface_request) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_attach_instance_interface: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **attach_interface_request** | [**AttachInterfaceRequest**](AttachInterfaceRequest.md)| Interface attachment request | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_clear_instance_panics** +> v1_clear_instance_panics(instance_id) + +Clear Panics + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Clear Panics + api_instance.v1_clear_instance_panics(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_clear_instance_panics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_create_instance** +> InstanceReturn v1_create_instance(instance_create_options) + +Create Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_create_options import InstanceCreateOptions +from corellium.models.instance_return import InstanceReturn +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_create_options = { + "project": "", + "name": "rpi4b Created via API", + "flavor": "rpi4b", + "os": "11.2.0" +} # InstanceCreateOptions | The vm definition to create + + try: + # Create Instance + api_response = api_instance.v1_create_instance(instance_create_options) + print("The response of InstancesV1Api->v1_create_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_create_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_create_options** | [**InstanceCreateOptions**](InstanceCreateOptions.md)| The vm definition to create | + +### Return type + +[**InstanceReturn**](InstanceReturn.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_instance** +> v1_delete_instance(instance_id) + +Remove Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID + + try: + # Remove Instance + api_instance.v1_delete_instance(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_delete_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_detach_instance_interface** +> v1_detach_instance_interface(instance_id, interface_id, detach_interface_request) + +Detach I/O Interface + +Detach an I/O interface from an I/O interconnect for the specified instance identifier. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.detach_interface_request import DetachInterfaceRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + interface_id = 'interface_id_example' # str | Interface ID + detach_interface_request = corellium.DetachInterfaceRequest() # DetachInterfaceRequest | Interface detachment request + + try: + # Detach I/O Interface + api_instance.v1_detach_instance_interface(instance_id, interface_id, detach_interface_request) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_detach_instance_interface: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **interface_id** | **str**| Interface ID | + **detach_interface_request** | [**DetachInterfaceRequest**](DetachInterfaceRequest.md)| Interface detachment request | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_disable_expose_port** +> v1_disable_expose_port(instance_id) + +Disable an exposed port on an instance for device access. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Disable an exposed port on an instance for device access. + api_instance.v1_disable_expose_port(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_disable_expose_port: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_download_netdump_pcap_instances** +> bytearray v1_download_netdump_pcap_instances(instance_id) + +Download a netdump pcap file + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Download a netdump pcap file + api_response = api_instance.v1_download_netdump_pcap_instances(instance_id) + print("The response of InstancesV1Api->v1_download_netdump_pcap_instances:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_download_netdump_pcap_instances: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.tcpdump.pcap, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | pcapng file | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_download_network_monitor_pcap_instances** +> bytearray v1_download_network_monitor_pcap_instances(instance_id) + +Download a Network Monitor pcap file + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Download a Network Monitor pcap file + api_response = api_instance.v1_download_network_monitor_pcap_instances(instance_id) + print("The response of InstancesV1Api->v1_download_network_monitor_pcap_instances:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_download_network_monitor_pcap_instances: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.tcpdump.pcap, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | pcap file | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_enable_expose_port** +> v1_enable_expose_port(instance_id) + +Enable an exposed port on an instance for device access. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Enable an exposed port on an instance for device access. + api_instance.v1_enable_expose_port(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_enable_expose_port: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance** +> InstanceV1 v1_get_instance(instance_id, return_attr=return_attr) + +Get Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_v1 import InstanceV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID + return_attr = ['return_attr_example'] # List[str] | Attributes to include in instance return (optional) + + try: + # Get Instance + api_response = api_instance.v1_get_instance(instance_id, return_attr=return_attr) + print("The response of InstancesV1Api->v1_get_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_get_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID | + **return_attr** | [**List[str]**](str.md)| Attributes to include in instance return | [optional] + +### Return type + +[**InstanceV1**](InstanceV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance_console** +> InstanceConsoleEndpointV1 v1_get_instance_console(instance_id) + +Get console websocket URL + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_console_endpoint_v1 import InstanceConsoleEndpointV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get console websocket URL + api_response = api_instance.v1_get_instance_console(instance_id) + print("The response of InstancesV1Api->v1_get_instance_console:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_get_instance_console: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**InstanceConsoleEndpointV1**](InstanceConsoleEndpointV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance_console_log** +> str v1_get_instance_console_log(instance_id) + +Get Console Log + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get Console Log + api_response = api_instance.v1_get_instance_console_log(instance_id) + print("The response of InstancesV1Api->v1_get_instance_console_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_get_instance_console_log: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current console log | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance_gpios** +> GpiosStateV1 v1_get_instance_gpios(instance_id) + +Get Instance GPIOs + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.gpios_state_v1 import GpiosStateV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get Instance GPIOs + api_response = api_instance.v1_get_instance_gpios(instance_id) + print("The response of InstancesV1Api->v1_get_instance_gpios:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_get_instance_gpios: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**GpiosStateV1**](GpiosStateV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current GPIO State | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance_panics** +> List[object] v1_get_instance_panics(instance_id) + +Get Panics + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get Panics + api_response = api_instance.v1_get_instance_panics(instance_id) + print("The response of InstancesV1Api->v1_get_instance_panics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_get_instance_panics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +**List[object]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Array of panics | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance_peripherals** +> PeripheralsDataV1 v1_get_instance_peripherals(instance_id) + +Get Instance Peripherals + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.peripherals_data_v1 import PeripheralsDataV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get Instance Peripherals + api_response = api_instance.v1_get_instance_peripherals(instance_id) + print("The response of InstancesV1Api->v1_get_instance_peripherals:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_get_instance_peripherals: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**PeripheralsDataV1**](PeripheralsDataV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current Peripherals State | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance_screenshot** +> bytearray v1_get_instance_screenshot(instance_id, format, scale=scale) + +Get Instance Screenshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + format = 'format_example' # str | New peripherals state + scale = 3.4 # float | Screenshot scale 1:N (optional) + + try: + # Get Instance Screenshot + api_response = api_instance.v1_get_instance_screenshot(instance_id, format, scale=scale) + print("The response of InstancesV1Api->v1_get_instance_screenshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_get_instance_screenshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **format** | **str**| New peripherals state | + **scale** | **float**| Screenshot scale 1:N | [optional] + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: image/png, image/jpeg, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Screenshot | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instances** +> List[InstanceV1] v1_get_instances(name=name, return_attr=return_attr) + +Get Instances + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_v1 import InstanceV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + name = 'name_example' # str | Optionally filter by instance name (optional) + return_attr = ['return_attr_example'] # List[str] | Attributes to include in instance return (optional) + + try: + # Get Instances + api_response = api_instance.v1_get_instances(name=name, return_attr=return_attr) + print("The response of InstancesV1Api->v1_get_instances:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_get_instances: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| Optionally filter by instance name | [optional] + **return_attr** | [**List[str]**](str.md)| Attributes to include in instance return | [optional] + +### Return type + +[**List[InstanceV1]**](InstanceV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_inject_message_instances** +> v1_inject_message_instances(instance_id, body) + +Inject a message into an iOS VM + +Given a message and source phone number, place this message as an incoming SMS message on the iOS VM. +For advanced usage, a raw message of bytes may be sent. In this case, the parameter should provide hex encoded bytes + (0x00 0x11 0x22 0x33 in the example below) which are sent verbatim. + The user must ensure that the body is the correct format for the underlying device stack. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + body = { + "number": "+19997776666", + "message": "the SMS message body goes here" +} # object | Message data + + try: + # Inject a message into an iOS VM + api_instance.v1_inject_message_instances(instance_id, body) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_inject_message_instances: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **body** | **object**| Message data | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_media_play** +> v1_media_play(instance_id, media_play_body_v1) + +Start playing media + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.media_play_body_v1 import MediaPlayBodyV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + media_play_body_v1 = { + "url": "http://null.to/test.mp4" +} # MediaPlayBodyV1 | Request Body + + try: + # Start playing media + api_instance.v1_media_play(instance_id, media_play_body_v1) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_media_play: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **media_play_body_v1** | [**MediaPlayBodyV1**](MediaPlayBodyV1.md)| Request Body | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success response | - | +**400** | Bad Request | - | +**404** | Not Found | - | +**409** | Conflict | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_media_stop** +> v1_media_stop(instance_id) + +Stop playing media + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Stop playing media + api_instance.v1_media_stop(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_media_stop: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success response | - | +**400** | Bad Request | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_patch_instance** +> InstanceV1 v1_patch_instance(instance_id, patch_instance_options) + +Update Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_v1 import InstanceV1 +from corellium.models.patch_instance_options import PatchInstanceOptions +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID + patch_instance_options = { + "name": "New Name" +} # PatchInstanceOptions | + + try: + # Update Instance + api_response = api_instance.v1_patch_instance(instance_id, patch_instance_options) + print("The response of InstancesV1Api->v1_patch_instance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_patch_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID | + **patch_instance_options** | [**PatchInstanceOptions**](PatchInstanceOptions.md)| | + +### Return type + +[**InstanceV1**](InstanceV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_patch_instance_read_only** +> InstanceV1 v1_patch_instance_read_only(instance_id, patch_instance_read_only) + +Update Instance Read Only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_v1 import InstanceV1 +from corellium.models.patch_instance_read_only import PatchInstanceReadOnly +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID + patch_instance_read_only = { + "readOnly": "disabled" +} # PatchInstanceReadOnly | + + try: + # Update Instance Read Only + api_response = api_instance.v1_patch_instance_read_only(instance_id, patch_instance_read_only) + print("The response of InstancesV1Api->v1_patch_instance_read_only:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_patch_instance_read_only: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID | + **patch_instance_read_only** | [**PatchInstanceReadOnly**](PatchInstanceReadOnly.md)| | + +### Return type + +[**InstanceV1**](InstanceV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_pause_instance** +> v1_pause_instance(instance_id) + +Pause an Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Pause an Instance + api_instance.v1_pause_instance(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_pause_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_post_instance_input** +> InputResponseV1 v1_post_instance_input(instance_id, instance_input_request) + +Provide Instance Input + +Sends a touch or button event to the VM. + +- Buttons (or keys) to be held during the input are specified as an array of strings, each string must be either a single ascii character or one of the following keywords: + - VM Buttons (case-insensitive): finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. ringerSwitch is not supported. + - Keyboard Buttons: again, alt, alterase, apostrophe, back, backslash, backspace, bassboost, bookmarks, bsp, calc, camera, cancel, caps, capslock, chat, close, closecd, comma, compose, computer, config, connect, copy, ctrl, cut, cyclewindows, dashboard, del, delete, deletefile, dot, down, edit, eject, ejectclose, email, end, enter, equal, esc, escape, exit, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, fastfwd, file, finance, find, forward, front, grave, hangeul, hanja, help, henkan, home, homepage, hp, hrgn, ins, insert, iso, k102, kp0, kp1, kp2, kp3, kp4, kp5, kp6, kp7, kp8, kp9, kpasterisk, kpcomma, kpdot, kpenter, kpequal, kpjpcomma, kpleftparen, kpminus, kpplus, kpplusminus, kprightparen, kpslash, ktkn, ktknhrgn, left, leftalt, leftbrace, leftctrl, leftmeta, leftshift, linefeed, macro, mail, menu, meta, minus, move, msdos, muhenkan, mute, new, next, numlock, open, pagedown, pageup, paste, pause, pausecd, pgdn, pgup, phone, play, playcd, playpause, power, previous, print, prog1, prog2, prog3, prog4, props, question, record, redo, refresh, return, rewind, right, rightalt, rightbrace, rightctrl, rightmeta, rightshift, ro, rotate, scale, screenlock, scrolldown, scrolllock, scrollup, search, semicolon, sendfile, setup, shift, shop, slash, sleep, sound, space, sport, stop, stopcd, suspend, sysrq, tab, undo, up, voldown, volup, wakeup, www, xfer, yen, zkhk + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.input_response_v1 import InputResponseV1 +from corellium.models.instance_input_request import InstanceInputRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + instance_input_request = [ + { + "buttons": ["finger"], + "position": [ + [300, 600] + ], + "wait": 0 + }, + { + "buttons": [], + "wait": 100 + } +] # List[InstanceInputRequest] | The input to send to the VM + + try: + # Provide Instance Input + api_response = api_instance.v1_post_instance_input(instance_id, instance_input_request) + print("The response of InstancesV1Api->v1_post_instance_input:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_post_instance_input: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **instance_input_request** | [**List[InstanceInputRequest]**](InstanceInputRequest.md)| The input to send to the VM | + +### Return type + +[**InputResponseV1**](InputResponseV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ETA of input completion in milliseconds | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_reboot_instance** +> v1_reboot_instance(instance_id) + +Reboot an Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Reboot an Instance + api_instance.v1_reboot_instance(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_reboot_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_restore_backup** +> v1_restore_backup(instance_id, restore_backup_data=restore_backup_data) + +Restore backup + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.restore_backup_data import RestoreBackupData +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + restore_backup_data = { + "password": "12345678" +} # RestoreBackupData | Restore backup data (optional) + + try: + # Restore backup + api_instance.v1_restore_backup(instance_id, restore_backup_data=restore_backup_data) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_restore_backup: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **restore_backup_data** | [**RestoreBackupData**](RestoreBackupData.md)| Restore backup data | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_rotate_instance** +> v1_rotate_instance(instance_id, rotate_body_v1) + +Rotate device to specified orientation + +Rotate device to orientation. Accepted orientations: +1. Portrait +2. Portrait vertically inverted (up-side-down) +3. Landscape with top of the device to the left +4. Landscape with top of the device to the right + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.rotate_body_v1 import RotateBodyV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | + rotate_body_v1 = { + "orientation": 1 +} # RotateBodyV1 | + + try: + # Rotate device to specified orientation + api_instance.v1_rotate_instance(instance_id, rotate_body_v1) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_rotate_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| | + **rotate_body_v1** | [**RotateBodyV1**](RotateBodyV1.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_set_instance_gpios** +> GpiosStateV1 v1_set_instance_gpios(instance_id, gpios_state_v1) + +Set Instance GPIOs + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.gpios_state_v1 import GpiosStateV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + gpios_state_v1 = { + "button": { + "bitCount": 2, + "banks": [ + [0,1], + [1,0] + ] + }, + "switch": { + "bitCount": 8, + "banks": [ + [0,1,0,1,0,1,0,1] + ] + } +} # GpiosStateV1 | New GPIO state + + try: + # Set Instance GPIOs + api_response = api_instance.v1_set_instance_gpios(instance_id, gpios_state_v1) + print("The response of InstancesV1Api->v1_set_instance_gpios:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_set_instance_gpios: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **gpios_state_v1** | [**GpiosStateV1**](GpiosStateV1.md)| New GPIO state | + +### Return type + +[**GpiosStateV1**](GpiosStateV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current GPIOs State | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_set_instance_peripherals** +> PeripheralsDataV1 v1_set_instance_peripherals(instance_id, peripherals_data_v1) + +Update Instance Peripherals + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.peripherals_data_v1 import PeripheralsDataV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + peripherals_data_v1 = { + "acceleration": [0, 9.81, 0], + "gyroscope": [0, 0, 0], + "magnetic": [0, 45, 0], + "orientation": [0, 0, 0], + "temperature": 25, + "proximity": 50, + "light": 20, + "pressure": 1013.25, + "humidity": 55 +} # PeripheralsDataV1 | New peripherals state + + try: + # Update Instance Peripherals + api_response = api_instance.v1_set_instance_peripherals(instance_id, peripherals_data_v1) + print("The response of InstancesV1Api->v1_set_instance_peripherals:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_set_instance_peripherals: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **peripherals_data_v1** | [**PeripheralsDataV1**](PeripheralsDataV1.md)| New peripherals state | + +### Return type + +[**PeripheralsDataV1**](PeripheralsDataV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current Peripherals State | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_set_instance_state** +> v1_set_instance_state(instance_id, v1_set_state_body) + +Set state of Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.v1_set_state_body import V1SetStateBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + v1_set_state_body = corellium.V1SetStateBody() # V1SetStateBody | Desired State + + try: + # Set state of Instance + api_instance.v1_set_instance_state(instance_id, v1_set_state_body) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_set_instance_state: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **v1_set_state_body** | [**V1SetStateBody**](V1SetStateBody.md)| Desired State | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_start_instance** +> v1_start_instance(instance_id, instance_start_options=instance_start_options) + +Start an Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_start_options import InstanceStartOptions +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + instance_start_options = corellium.InstanceStartOptions() # InstanceStartOptions | Start options (optional) + + try: + # Start an Instance + api_instance.v1_start_instance(instance_id, instance_start_options=instance_start_options) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_start_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **instance_start_options** | [**InstanceStartOptions**](InstanceStartOptions.md)| Start options | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_start_netdump** +> v1_start_netdump(instance_id, netdump_filter=netdump_filter) + +Start Enhanced Network Monitor on an instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.netdump_filter import NetdumpFilter +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + netdump_filter = { } # NetdumpFilter | (optional) + + try: + # Start Enhanced Network Monitor on an instance. + api_instance.v1_start_netdump(instance_id, netdump_filter=netdump_filter) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_start_netdump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **netdump_filter** | [**NetdumpFilter**](NetdumpFilter.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_start_network_monitor** +> v1_start_network_monitor(instance_id, sslsplit_filter=sslsplit_filter) + +Start Network Monitor on an instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.sslsplit_filter import SslsplitFilter +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + sslsplit_filter = corellium.SslsplitFilter() # SslsplitFilter | (optional) + + try: + # Start Network Monitor on an instance. + api_instance.v1_start_network_monitor(instance_id, sslsplit_filter=sslsplit_filter) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_start_network_monitor: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **sslsplit_filter** | [**SslsplitFilter**](SslsplitFilter.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_stop_instance** +> v1_stop_instance(instance_id, instance_stop_options=instance_stop_options) + +Stop an Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_stop_options import InstanceStopOptions +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + instance_stop_options = corellium.InstanceStopOptions() # InstanceStopOptions | Stop options (optional) + + try: + # Stop an Instance + api_instance.v1_stop_instance(instance_id, instance_stop_options=instance_stop_options) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_stop_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **instance_stop_options** | [**InstanceStopOptions**](InstanceStopOptions.md)| Stop options | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_stop_netdump** +> v1_stop_netdump(instance_id) + +Stop Enhanced Network Monitor on an instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Stop Enhanced Network Monitor on an instance. + api_instance.v1_stop_netdump(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_stop_netdump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_stop_network_monitor** +> v1_stop_network_monitor(instance_id) + +Stop Network Monitor on an instance. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Stop Network Monitor on an instance. + api_instance.v1_stop_network_monitor(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_stop_network_monitor: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_unpause_instance** +> v1_unpause_instance(instance_id) + +Unpause an Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Unpause an Instance + api_instance.v1_unpause_instance(instance_id) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_unpause_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_upgrade_instance** +> v1_upgrade_instance(instance_id, instance_upgrade_body_v1) + +Upgrade iOS version + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_upgrade_body_v1 import InstanceUpgradeBodyV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV1Api(api_client) + instance_id = 'instance_id_example' # str | + instance_upgrade_body_v1 = { + "os":"16.1", + "osbuild":"20B79" +} # InstanceUpgradeBodyV1 | + + try: + # Upgrade iOS version + api_instance.v1_upgrade_instance(instance_id, instance_upgrade_body_v1) + except Exception as e: + print("Exception when calling InstancesV1Api->v1_upgrade_instance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| | + **instance_upgrade_body_v1** | [**InstanceUpgradeBodyV1**](InstanceUpgradeBodyV1.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InstancesV2Api.md b/docs/InstancesV2Api.md new file mode 100644 index 0000000..4ed1021 --- /dev/null +++ b/docs/InstancesV2Api.md @@ -0,0 +1,197 @@ +# corellium.InstancesV2Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v2_get_instance_quick_connect_command**](InstancesV2Api.md#v2_get_instance_quick_connect_command) | **GET** /v2/instances/{instanceId}/quickConnectCommand | Recommended SSH Command for Quick Connect +[**v2_get_instance_state**](InstancesV2Api.md#v2_get_instance_state) | **GET** /v2/instances/{instanceId}/state | Get state of Instance + + +# **v2_get_instance_quick_connect_command** +> str v2_get_instance_quick_connect_command(instance_id) + +Recommended SSH Command for Quick Connect + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV2Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Recommended SSH Command for Quick Connect + api_response = api_instance.v2_get_instance_quick_connect_command(instance_id) + print("The response of InstancesV2Api->v2_get_instance_quick_connect_command:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV2Api->v2_get_instance_quick_connect_command: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Quick Connect Command | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v2_get_instance_state** +> InstanceStateV1 v2_get_instance_state(instance_id, return_attr=return_attr) + +Get state of Instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_state_v1 import InstanceStateV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InstancesV2Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + return_attr = ['return_attr_example'] # List[str] | The attributes to return. (optional) + + try: + # Get state of Instance + api_response = api_instance.v2_get_instance_state(instance_id, return_attr=return_attr) + print("The response of InstancesV2Api->v2_get_instance_state:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InstancesV2Api->v2_get_instance_state: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **return_attr** | [**List[str]**](str.md)| The attributes to return. | [optional] + +### Return type + +[**InstanceStateV1**](InstanceStateV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Current Instance State | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InsufficientStorageError.md b/docs/InsufficientStorageError.md new file mode 100644 index 0000000..c8499fb --- /dev/null +++ b/docs/InsufficientStorageError.md @@ -0,0 +1,33 @@ +# InsufficientStorageError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text. | +**error_id** | **str** | Error ID. | +**total** | **float** | Total storage capacity in bytes. | +**available** | **float** | Available storage in bytes. | +**required** | **float** | Storage required for the upload in bytes. | + +## Example + +```python +from corellium.models.insufficient_storage_error import InsufficientStorageError + +# TODO update the JSON string below +json = "{}" +# create an instance of InsufficientStorageError from a JSON string +insufficient_storage_error_instance = InsufficientStorageError.from_json(json) +# print the JSON string representation of the object +print(InsufficientStorageError.to_json()) + +# convert the object into a dict +insufficient_storage_error_dict = insufficient_storage_error_instance.to_dict() +# create an instance of InsufficientStorageError from a dict +insufficient_storage_error_from_dict = InsufficientStorageError.from_dict(insufficient_storage_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InsufficientStorageErrorV1.md b/docs/InsufficientStorageErrorV1.md new file mode 100644 index 0000000..a416334 --- /dev/null +++ b/docs/InsufficientStorageErrorV1.md @@ -0,0 +1,34 @@ +# InsufficientStorageErrorV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error_id** | **str** | Error identifier | [optional] +**error** | **str** | Error message | [optional] +**total** | **float** | Total image pool capacity in bytes | [optional] +**available** | **float** | Currently available image pool space in bytes | [optional] +**required** | **float** | Required space for the upload in bytes (from Content-Length) | + +## Example + +```python +from corellium.models.insufficient_storage_error_v1 import InsufficientStorageErrorV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InsufficientStorageErrorV1 from a JSON string +insufficient_storage_error_v1_instance = InsufficientStorageErrorV1.from_json(json) +# print the JSON string representation of the object +print(InsufficientStorageErrorV1.to_json()) + +# convert the object into a dict +insufficient_storage_error_v1_dict = insufficient_storage_error_v1_instance.to_dict() +# create an instance of InsufficientStorageErrorV1 from a dict +insufficient_storage_error_v1_from_dict = InsufficientStorageErrorV1.from_dict(insufficient_storage_error_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Interconnect.md b/docs/Interconnect.md new file mode 100644 index 0000000..21e1bb2 --- /dev/null +++ b/docs/Interconnect.md @@ -0,0 +1,38 @@ +# Interconnect + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A name to recognise the interconnect by. | +**type** | **str** | How the interconnect behaves: `hub` passes every signal to every connected interface; `switch` routes traffic between endpoints. | +**project_id** | **str** | Project the interconnect belongs to. Every device listed in `interfaces` must be in this project, otherwise the request fails with 400. Cannot be changed later. | +**interfaces** | [**List[InterfacesSchemaInner]**](InterfacesSchemaInner.md) | | +**id** | **str** | The interconnect identifier. | +**protocol** | **str** | The protocol used by the interconnect. | +**status** | **str** | The current status of the interconnect. | +**instance_count** | **float** | Number of unique instances connected to this interconnect. | +**created_at** | **datetime** | Creation timestamp. | +**updated_at** | **datetime** | Last update timestamp. | + +## Example + +```python +from corellium.models.interconnect import Interconnect + +# TODO update the JSON string below +json = "{}" +# create an instance of Interconnect from a JSON string +interconnect_instance = Interconnect.from_json(json) +# print the JSON string representation of the object +print(Interconnect.to_json()) + +# convert the object into a dict +interconnect_dict = interconnect_instance.to_dict() +# create an instance of Interconnect from a dict +interconnect_from_dict = Interconnect.from_dict(interconnect_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InterconnectList.md b/docs/InterconnectList.md new file mode 100644 index 0000000..b12c099 --- /dev/null +++ b/docs/InterconnectList.md @@ -0,0 +1,34 @@ +# InterconnectList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Interconnect]**](Interconnect.md) | Array of interconnects. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.interconnect_list import InterconnectList + +# TODO update the JSON string below +json = "{}" +# create an instance of InterconnectList from a JSON string +interconnect_list_instance = InterconnectList.from_json(json) +# print the JSON string representation of the object +print(InterconnectList.to_json()) + +# convert the object into a dict +interconnect_list_dict = interconnect_list_instance.to_dict() +# create an instance of InterconnectList from a dict +interconnect_list_from_dict = InterconnectList.from_dict(interconnect_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InterconnectProtocol.md b/docs/InterconnectProtocol.md new file mode 100644 index 0000000..86162fe --- /dev/null +++ b/docs/InterconnectProtocol.md @@ -0,0 +1,23 @@ +# InterconnectProtocol + +Kind of signal the interconnect carries, for example `eth` for Ethernet. Choose the protocol that matches the interfaces you connect. Cannot be changed later. + +## Enum + +* `CAN` (value: `'can'`) + +* `UART` (value: `'uart'`) + +* `I2C` (value: `'i2c'`) + +* `SPI` (value: `'spi'`) + +* `GPIO` (value: `'gpio'`) + +* `USBH` (value: `'usbh'`) + +* `ETH` (value: `'eth'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InterconnectResponse.md b/docs/InterconnectResponse.md index 2a3bdae..32565aa 100644 --- a/docs/InterconnectResponse.md +++ b/docs/InterconnectResponse.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The interconnect identifier | [optional] @@ -11,10 +12,27 @@ Name | Type | Description | Notes **type** | **str** | The type of interconnect | [optional] **project** | **str** | The UUID of the project | [optional] **status** | **str** | The current status of the interconnect | [optional] -**interfaces** | [**list[InstanceInterface]**](InstanceInterface.md) | Array of instance interfaces | [optional] +**interfaces** | [**List[InstanceInterface]**](InstanceInterface.md) | Array of instance interfaces | [optional] **created_at** | **str** | Creation timestamp | [optional] **updated_at** | **str** | Last update timestamp | [optional] +## Example + +```python +from corellium.models.interconnect_response import InterconnectResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InterconnectResponse from a JSON string +interconnect_response_instance = InterconnectResponse.from_json(json) +# print the JSON string representation of the object +print(InterconnectResponse.to_json()) + +# convert the object into a dict +interconnect_response_dict = interconnect_response_instance.to_dict() +# create an instance of InterconnectResponse from a dict +interconnect_response_from_dict = InterconnectResponse.from_dict(interconnect_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InterconnectsApi.md b/docs/InterconnectsApi.md new file mode 100644 index 0000000..47f6cc0 --- /dev/null +++ b/docs/InterconnectsApi.md @@ -0,0 +1,559 @@ +# corellium.InterconnectsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_interconnect**](InterconnectsApi.md#v3_create_interconnect) | **POST** /v3/interconnects | Create I/O Interconnect +[**v3_delete_interconnect**](InterconnectsApi.md#v3_delete_interconnect) | **DELETE** /v3/interconnects/{interconnectId} | Delete I/O Interconnect +[**v3_get_interconnect**](InterconnectsApi.md#v3_get_interconnect) | **GET** /v3/interconnects/{interconnectId} | Get Interconnect +[**v3_list_interconnects**](InterconnectsApi.md#v3_list_interconnects) | **GET** /v3/interconnects | List I/O Interconnects +[**v3_patch_interconnect**](InterconnectsApi.md#v3_patch_interconnect) | **PATCH** /v3/interconnects/{interconnectId} | Patch I/O Interconnect +[**v3_update_interconnect**](InterconnectsApi.md#v3_update_interconnect) | **PUT** /v3/interconnects/{interconnectId} | Update I/O Interconnect + + +# **v3_create_interconnect** +> Interconnect v3_create_interconnect(create_interconnect_v3_body) + +Create I/O Interconnect + +Creates an I/O interconnect: a virtual wire, hub or switch that links interfaces on your devices so they can talk to each other, as if you had cabled real hardware together (for example connecting the Ethernet ports of two boards). Give it a `name`, the `projectId`, a `protocol` and `type`, and the device `interfaces` to connect; every device must be in that project. Returns the new interconnect, which starts with status `detached`. + +You can also connect or disconnect one device interface later with `POST /v3/instances/{instanceId}/interfaces` and `DELETE /v3/instances/{instanceId}/interfaces/{interfaceId}`; those device-level calls require the configurable I/O license feature. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_interconnect_v3_body import CreateInterconnectV3Body +from corellium.models.interconnect import Interconnect +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsApi(api_client) + create_interconnect_v3_body = corellium.CreateInterconnectV3Body() # CreateInterconnectV3Body | + + try: + # Create I/O Interconnect + api_response = api_instance.v3_create_interconnect(create_interconnect_v3_body) + print("The response of InterconnectsApi->v3_create_interconnect:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsApi->v3_create_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_interconnect_v3_body** | [**CreateInterconnectV3Body**](CreateInterconnectV3Body.md)| | + +### Return type + +[**Interconnect**](Interconnect.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Created interconnect. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**500** | Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_interconnect** +> v3_delete_interconnect(interconnect_id) + +Delete I/O Interconnect + +Deletes an I/O interconnect, disconnecting every device interface on it. The devices themselves are not affected. + +Deletes are idempotent: an unknown `interconnectId`, or one that is not visible to the caller, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsApi(api_client) + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' # str | The interconnect identifier. + + try: + # Delete I/O Interconnect + api_instance.v3_delete_interconnect(interconnect_id) + except Exception as e: + print("Exception when calling InterconnectsApi->v3_delete_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interconnect_id** | **str**| The interconnect identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted interconnect. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**500** | Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_interconnect** +> Interconnect v3_get_interconnect(interconnect_id) + +Get Interconnect + +Returns one I/O interconnect, including which device interfaces it connects and its current status. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.interconnect import Interconnect +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsApi(api_client) + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' # str | The interconnect identifier. + + try: + # Get Interconnect + api_response = api_instance.v3_get_interconnect(interconnect_id) + print("The response of InterconnectsApi->v3_get_interconnect:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsApi->v3_get_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interconnect_id** | **str**| The interconnect identifier. | + +### Return type + +[**Interconnect**](Interconnect.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved interconnect details. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**500** | Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_interconnects** +> InterconnectList v3_list_interconnects(limit=limit, offset=offset, name=name, protocol=protocol, type=type, status=status, sort=sort, project_id=project_id) + +List I/O Interconnects + +Lists the I/O interconnects in your projects, with their status and how many devices each connects. Filter by name, protocol, type, status or project, sort with `sort`, and page with `limit` and `offset`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.interconnect_list import InterconnectList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + name = 'vpn-gateway' # str | Filter by interconnect name (case insensitive). (optional) + protocol = 'eth' # str | Filter by protocol (comma separated). (optional) + type = 'type_example' # str | Filter by type (comma separated). (optional) + status = 'status_example' # str | Filter by status (comma separated). (optional) + sort = '-name' # str | Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated). (optional) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | Filter by project ID (comma separated). (optional) + + try: + # List I/O Interconnects + api_response = api_instance.v3_list_interconnects(limit=limit, offset=offset, name=name, protocol=protocol, type=type, status=status, sort=sort, project_id=project_id) + print("The response of InterconnectsApi->v3_list_interconnects:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsApi->v3_list_interconnects: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **name** | **str**| Filter by interconnect name (case insensitive). | [optional] + **protocol** | **str**| Filter by protocol (comma separated). | [optional] + **type** | **str**| Filter by type (comma separated). | [optional] + **status** | **str**| Filter by status (comma separated). | [optional] + **sort** | **str**| Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated). | [optional] + **project_id** | **str**| Filter by project ID (comma separated). | [optional] + +### Return type + +[**InterconnectList**](InterconnectList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved interconnects. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**500** | Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_interconnect** +> Interconnect v3_patch_interconnect(interconnect_id, patch_interconnect_body=patch_interconnect_body) + +Patch I/O Interconnect + +Changes only the fields you send: `name` and/or `interfaces`. When you send `interfaces`, it replaces the whole list of connected interfaces. Returns the updated interconnect. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.interconnect import Interconnect +from corellium.models.patch_interconnect_body import PatchInterconnectBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsApi(api_client) + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' # str | The interconnect identifier. + patch_interconnect_body = corellium.PatchInterconnectBody() # PatchInterconnectBody | (optional) + + try: + # Patch I/O Interconnect + api_response = api_instance.v3_patch_interconnect(interconnect_id, patch_interconnect_body=patch_interconnect_body) + print("The response of InterconnectsApi->v3_patch_interconnect:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsApi->v3_patch_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interconnect_id** | **str**| The interconnect identifier. | + **patch_interconnect_body** | [**PatchInterconnectBody**](PatchInterconnectBody.md)| | [optional] + +### Return type + +[**Interconnect**](Interconnect.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully updated interconnect. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**500** | Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_update_interconnect** +> Interconnect v3_update_interconnect(interconnect_id, update_interconnect_v3_body) + +Update I/O Interconnect + +Replaces an interconnect's `name` and full list of connected `interfaces`. Interfaces you leave out are disconnected. `projectId`, `protocol` and `type` cannot be changed; if you send them they must match the current values. To change only some fields, use `v3PatchInterconnect`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.interconnect import Interconnect +from corellium.models.update_interconnect_v3_body import UpdateInterconnectV3Body +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsApi(api_client) + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' # str | The interconnect identifier. + update_interconnect_v3_body = corellium.UpdateInterconnectV3Body() # UpdateInterconnectV3Body | + + try: + # Update I/O Interconnect + api_response = api_instance.v3_update_interconnect(interconnect_id, update_interconnect_v3_body) + print("The response of InterconnectsApi->v3_update_interconnect:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsApi->v3_update_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interconnect_id** | **str**| The interconnect identifier. | + **update_interconnect_v3_body** | [**UpdateInterconnectV3Body**](UpdateInterconnectV3Body.md)| | + +### Return type + +[**Interconnect**](Interconnect.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully updated interconnect. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**500** | Something went wrong on the platform side. Retrying may help; if it keeps failing, contact support with the response body. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InterconnectsV1Api.md b/docs/InterconnectsV1Api.md new file mode 100644 index 0000000..a82e0f4 --- /dev/null +++ b/docs/InterconnectsV1Api.md @@ -0,0 +1,575 @@ +# corellium.InterconnectsV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_create_interconnect**](InterconnectsV1Api.md#v1_create_interconnect) | **POST** /v1/interconnects | Create I/O Interconnect +[**v1_delete_interconnect**](InterconnectsV1Api.md#v1_delete_interconnect) | **DELETE** /v1/interconnects/{interconnectId} | Delete I/O Interconnect +[**v1_get_interconnect**](InterconnectsV1Api.md#v1_get_interconnect) | **GET** /v1/interconnects/{interconnectId} | Get Interconnect +[**v1_list_interconnects**](InterconnectsV1Api.md#v1_list_interconnects) | **GET** /v1/interconnects | Get all I/O Interconnects +[**v1_patch_interconnect**](InterconnectsV1Api.md#v1_patch_interconnect) | **PATCH** /v1/interconnects/{interconnectId} | Partial Update Interconnect +[**v1_update_interconnect**](InterconnectsV1Api.md#v1_update_interconnect) | **PUT** /v1/interconnects/{interconnectId} | Update Interconnect + + +# **v1_create_interconnect** +> InterconnectResponse v1_create_interconnect(create_interconnect_body) + +Create I/O Interconnect + +Create an I/O Interconnect for the specified project and attach virtual device interfaces. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_interconnect_body import CreateInterconnectBody +from corellium.models.interconnect_response import InterconnectResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsV1Api(api_client) + create_interconnect_body = { + "name": "My Interconnect", + "protocol": "TCP", + "type": "hub", + "project": "123e4567-e89b-12d3-a456-426614174000", + "interfaces": [{ + "deviceId": "2b331aaa-de76-4169-8442-9910e9c436fb", + "interfaceId": "gpio/7" + }] +} # CreateInterconnectBody | The interconnect details + + try: + # Create I/O Interconnect + api_response = api_instance.v1_create_interconnect(create_interconnect_body) + print("The response of InterconnectsV1Api->v1_create_interconnect:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsV1Api->v1_create_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_interconnect_body** | [**CreateInterconnectBody**](CreateInterconnectBody.md)| The interconnect details | + +### Return type + +[**InterconnectResponse**](InterconnectResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully created interconnect | - | +**400** | Bad request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_interconnect** +> v1_delete_interconnect(interconnect_id) + +Delete I/O Interconnect + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsV1Api(api_client) + interconnect_id = 'interconnect_id_example' # str | The interconnect identifier + + try: + # Delete I/O Interconnect + api_instance.v1_delete_interconnect(interconnect_id) + except Exception as e: + print("Exception when calling InterconnectsV1Api->v1_delete_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interconnect_id** | **str**| The interconnect identifier | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted interconnect | - | +**401** | Unauthorized | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_interconnect** +> InterconnectResponse v1_get_interconnect(interconnect_id) + +Get Interconnect + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.interconnect_response import InterconnectResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsV1Api(api_client) + interconnect_id = 'interconnect_id_example' # str | The interconnect identifier + + try: + # Get Interconnect + api_response = api_instance.v1_get_interconnect(interconnect_id) + print("The response of InterconnectsV1Api->v1_get_interconnect:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsV1Api->v1_get_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interconnect_id** | **str**| The interconnect identifier | + +### Return type + +[**InterconnectResponse**](InterconnectResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved interconnect details | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_interconnects** +> GetInterconnectsResponse v1_list_interconnects(limit=limit, offset=offset, name=name, protocol=protocol, type=type, status=status, project=project, sort=sort) + +Get all I/O Interconnects + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.get_interconnects_response import GetInterconnectsResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsV1Api(api_client) + limit = 3.4 # float | Maximum number of results to return (1-1000, default: 100) (optional) + offset = 3.4 # float | Number of results to skip (default: 0) (optional) + name = 'name_example' # str | Filter by interconnect name (case insensitive) (optional) + protocol = 'protocol_example' # str | Filter by protocol (comma separated) (optional) + type = 'type_example' # str | Filter by type (comma separated) (optional) + status = 'status_example' # str | Filter by status (comma separated) (optional) + project = 'project_example' # str | Filter by project ID (comma separated) (optional) + sort = 'sort_example' # str | Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) (optional) + + try: + # Get all I/O Interconnects + api_response = api_instance.v1_list_interconnects(limit=limit, offset=offset, name=name, protocol=protocol, type=type, status=status, project=project, sort=sort) + print("The response of InterconnectsV1Api->v1_list_interconnects:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsV1Api->v1_list_interconnects: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Maximum number of results to return (1-1000, default: 100) | [optional] + **offset** | **float**| Number of results to skip (default: 0) | [optional] + **name** | **str**| Filter by interconnect name (case insensitive) | [optional] + **protocol** | **str**| Filter by protocol (comma separated) | [optional] + **type** | **str**| Filter by type (comma separated) | [optional] + **status** | **str**| Filter by status (comma separated) | [optional] + **project** | **str**| Filter by project ID (comma separated) | [optional] + **sort** | **str**| Sort order (e.g. \"name\" for ascending, \"-name\" for descending, comma separated) | [optional] + +### Return type + +[**GetInterconnectsResponse**](GetInterconnectsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved interconnects | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_patch_interconnect** +> InterconnectResponse v1_patch_interconnect(interconnect_id, partial_update_interconnect_request) + +Partial Update Interconnect + +Update some interconnect details for the specified interconnect identifier. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.interconnect_response import InterconnectResponse +from corellium.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsV1Api(api_client) + interconnect_id = 'interconnect_id_example' # str | The interconnect identifier + partial_update_interconnect_request = { + "name": "My Can Bus 2 is new to you" +} # PartialUpdateInterconnectRequest | The interconnect details to update + + try: + # Partial Update Interconnect + api_response = api_instance.v1_patch_interconnect(interconnect_id, partial_update_interconnect_request) + print("The response of InterconnectsV1Api->v1_patch_interconnect:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsV1Api->v1_patch_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interconnect_id** | **str**| The interconnect identifier | + **partial_update_interconnect_request** | [**PartialUpdateInterconnectRequest**](PartialUpdateInterconnectRequest.md)| The interconnect details to update | + +### Return type + +[**InterconnectResponse**](InterconnectResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully updated interconnect | - | +**400** | Bad request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_interconnect** +> InterconnectResponse v1_update_interconnect(interconnect_id, update_interconnect_body) + +Update Interconnect + +Update interconnect details for the specified interconnect identifier. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.interconnect_response import InterconnectResponse +from corellium.models.update_interconnect_body import UpdateInterconnectBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InterconnectsV1Api(api_client) + interconnect_id = 'interconnect_id_example' # str | The interconnect identifier + update_interconnect_body = { + "name": "My Can Bus 2", + "interfaces": [ + { + "deviceId": "fa783ebb-b020-47fb-af74-6898ed59b068", + "interfaceId": "can1/0" + }, + { + "deviceId": "58db550e-bb96-403a-bcf0-86ff33e5e61d", + "interfaceId": "can1/0" + }, + { + "deviceId": "bd576aca-9e31-4c6a-817e-f2a38122536e", + "interfaceId": "can1/0" + } + ] +} # UpdateInterconnectBody | The interconnect details to update + + try: + # Update Interconnect + api_response = api_instance.v1_update_interconnect(interconnect_id, update_interconnect_body) + print("The response of InterconnectsV1Api->v1_update_interconnect:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InterconnectsV1Api->v1_update_interconnect: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interconnect_id** | **str**| The interconnect identifier | + **update_interconnect_body** | [**UpdateInterconnectBody**](UpdateInterconnectBody.md)| The interconnect details to update | + +### Return type + +[**InterconnectResponse**](InterconnectResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully updated interconnect | - | +**400** | Bad request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not found | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InterfacesSchemaInner.md b/docs/InterfacesSchemaInner.md new file mode 100644 index 0000000..9924782 --- /dev/null +++ b/docs/InterfacesSchemaInner.md @@ -0,0 +1,30 @@ +# InterfacesSchemaInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_id** | **str** | ID of the device (instance) whose interface to connect. | +**interface_id** | **str** | Which interface on that device, written `<name>/<number>` (for example `eth0:1/2` or `gpio/0`). The device model decides which interfaces exist. | + +## Example + +```python +from corellium.models.interfaces_schema_inner import InterfacesSchemaInner + +# TODO update the JSON string below +json = "{}" +# create an instance of InterfacesSchemaInner from a JSON string +interfaces_schema_inner_instance = InterfacesSchemaInner.from_json(json) +# print the JSON string representation of the object +print(InterfacesSchemaInner.to_json()) + +# convert the object into a dict +interfaces_schema_inner_dict = interfaces_schema_inner_instance.to_dict() +# create an instance of InterfacesSchemaInner from a dict +interfaces_schema_inner_from_dict = InterfacesSchemaInner.from_dict(interfaces_schema_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InvalidCredentialsError.md b/docs/InvalidCredentialsError.md new file mode 100644 index 0000000..f1bcab8 --- /dev/null +++ b/docs/InvalidCredentialsError.md @@ -0,0 +1,30 @@ +# InvalidCredentialsError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text. | +**error_id** | **str** | Error ID. | + +## Example + +```python +from corellium.models.invalid_credentials_error import InvalidCredentialsError + +# TODO update the JSON string below +json = "{}" +# create an instance of InvalidCredentialsError from a JSON string +invalid_credentials_error_instance = InvalidCredentialsError.from_json(json) +# print the JSON string representation of the object +print(InvalidCredentialsError.to_json()) + +# convert the object into a dict +invalid_credentials_error_dict = invalid_credentials_error_instance.to_dict() +# create an instance of InvalidCredentialsError from a dict +invalid_credentials_error_from_dict = InvalidCredentialsError.from_dict(invalid_credentials_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InvalidTOTPError.md b/docs/InvalidTOTPError.md new file mode 100644 index 0000000..7126751 --- /dev/null +++ b/docs/InvalidTOTPError.md @@ -0,0 +1,30 @@ +# InvalidTOTPError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text. | +**error_id** | **str** | Error ID. | + +## Example + +```python +from corellium.models.invalid_totp_error import InvalidTOTPError + +# TODO update the JSON string below +json = "{}" +# create an instance of InvalidTOTPError from a JSON string +invalid_totp_error_instance = InvalidTOTPError.from_json(json) +# print the JSON string representation of the object +print(InvalidTOTPError.to_json()) + +# convert the object into a dict +invalid_totp_error_dict = invalid_totp_error_instance.to_dict() +# create an instance of InvalidTOTPError from a dict +invalid_totp_error_from_dict = InvalidTOTPError.from_dict(invalid_totp_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Invitation.md b/docs/Invitation.md index 2b48d0b..d3d0f41 100644 --- a/docs/Invitation.md +++ b/docs/Invitation.md @@ -1,14 +1,31 @@ # Invitation - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identifier** | **str** | Invite ID | [optional] -**email** | **str** | Invited email | [optional] -**settings** | **object** | | [optional] +**id** | **str** | Invite ID. | +**email** | **str** | Invited email address. | +**settings** | [**InviteSettings**](InviteSettings.md) | | + +## Example + +```python +from corellium.models.invitation import Invitation + +# TODO update the JSON string below +json = "{}" +# create an instance of Invitation from a JSON string +invitation_instance = Invitation.from_json(json) +# print the JSON string representation of the object +print(Invitation.to_json()) +# convert the object into a dict +invitation_dict = invitation_instance.to_dict() +# create an instance of Invitation from a dict +invitation_from_dict = Invitation.from_dict(invitation_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InvitationByToken.md b/docs/InvitationByToken.md new file mode 100644 index 0000000..49661b0 --- /dev/null +++ b/docs/InvitationByToken.md @@ -0,0 +1,34 @@ +# InvitationByToken + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Invite ID. | +**email** | **str** | Invited email address. | +**domain** | **str** | Domain name. | +**display_name** | **str** | Domain display name. | +**terms_agreement_required** | **bool** | Whether the invitee must agree to terms. | +**settings** | [**InviteSettings**](InviteSettings.md) | | + +## Example + +```python +from corellium.models.invitation_by_token import InvitationByToken + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationByToken from a JSON string +invitation_by_token_instance = InvitationByToken.from_json(json) +# print the JSON string representation of the object +print(InvitationByToken.to_json()) + +# convert the object into a dict +invitation_by_token_dict = invitation_by_token_instance.to_dict() +# create an instance of InvitationByToken from a dict +invitation_by_token_from_dict = InvitationByToken.from_dict(invitation_by_token_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InvitationV1.md b/docs/InvitationV1.md new file mode 100644 index 0000000..716d7e9 --- /dev/null +++ b/docs/InvitationV1.md @@ -0,0 +1,32 @@ +# InvitationV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Invite ID | [optional] +**email** | **str** | Invited email | [optional] +**settings** | **object** | | [optional] + +## Example + +```python +from corellium.models.invitation_v1 import InvitationV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitationV1 from a JSON string +invitation_v1_instance = InvitationV1.from_json(json) +# print the JSON string representation of the object +print(InvitationV1.to_json()) + +# convert the object into a dict +invitation_v1_dict = invitation_v1_instance.to_dict() +# create an instance of InvitationV1 from a dict +invitation_v1_from_dict = InvitationV1.from_dict(invitation_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteCreated.md b/docs/InviteCreated.md new file mode 100644 index 0000000..80bea8e --- /dev/null +++ b/docs/InviteCreated.md @@ -0,0 +1,32 @@ +# InviteCreated + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Invite ID | [optional] +**email** | **str** | Invited email address | [optional] +**settings** | **object** | | [optional] + +## Example + +```python +from corellium.models.invite_created import InviteCreated + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteCreated from a JSON string +invite_created_instance = InviteCreated.from_json(json) +# print the JSON string representation of the object +print(InviteCreated.to_json()) + +# convert the object into a dict +invite_created_dict = invite_created_instance.to_dict() +# create an instance of InviteCreated from a dict +invite_created_from_dict = InviteCreated.from_dict(invite_created_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteCreatedEntry.md b/docs/InviteCreatedEntry.md new file mode 100644 index 0000000..d695a49 --- /dev/null +++ b/docs/InviteCreatedEntry.md @@ -0,0 +1,30 @@ +# InviteCreatedEntry + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite** | [**InviteCreated**](InviteCreated.md) | | [optional] + +## Example + +```python +from corellium.models.invite_created_entry import InviteCreatedEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteCreatedEntry from a JSON string +invite_created_entry_instance = InviteCreatedEntry.from_json(json) +# print the JSON string representation of the object +print(InviteCreatedEntry.to_json()) + +# convert the object into a dict +invite_created_entry_dict = invite_created_entry_instance.to_dict() +# create an instance of InviteCreatedEntry from a dict +invite_created_entry_from_dict = InviteCreatedEntry.from_dict(invite_created_entry_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteResult.md b/docs/InviteResult.md new file mode 100644 index 0000000..720bfbf --- /dev/null +++ b/docs/InviteResult.md @@ -0,0 +1,30 @@ +# InviteResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite** | [**Invitation**](Invitation.md) | The created invite, when successful. | [optional] +**error** | [**InviteResultError**](InviteResultError.md) | | [optional] + +## Example + +```python +from corellium.models.invite_result import InviteResult + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteResult from a JSON string +invite_result_instance = InviteResult.from_json(json) +# print the JSON string representation of the object +print(InviteResult.to_json()) + +# convert the object into a dict +invite_result_dict = invite_result_instance.to_dict() +# create an instance of InviteResult from a dict +invite_result_from_dict = InviteResult.from_dict(invite_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteResultError.md b/docs/InviteResultError.md new file mode 100644 index 0000000..6bf81e2 --- /dev/null +++ b/docs/InviteResultError.md @@ -0,0 +1,30 @@ +# InviteResultError + +Error detail, when the invite failed. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text. | + +## Example + +```python +from corellium.models.invite_result_error import InviteResultError + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteResultError from a JSON string +invite_result_error_instance = InviteResultError.from_json(json) +# print the JSON string representation of the object +print(InviteResultError.to_json()) + +# convert the object into a dict +invite_result_error_dict = invite_result_error_instance.to_dict() +# create an instance of InviteResultError from a dict +invite_result_error_from_dict = InviteResultError.from_dict(invite_result_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteRevokeParams.md b/docs/InviteRevokeParams.md index 956e9ca..ff94315 100644 --- a/docs/InviteRevokeParams.md +++ b/docs/InviteRevokeParams.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ids** | [**InviteRevokeParamsIds**](InviteRevokeParamsIds.md) | | [optional] +**ids** | **List[str]** | Array of invite ids to revoke (a bare string id is also accepted by the server) | [optional] + +## Example + +```python +from corellium.models.invite_revoke_params import InviteRevokeParams + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteRevokeParams from a JSON string +invite_revoke_params_instance = InviteRevokeParams.from_json(json) +# print the JSON string representation of the object +print(InviteRevokeParams.to_json()) +# convert the object into a dict +invite_revoke_params_dict = invite_revoke_params_instance.to_dict() +# create an instance of InviteRevokeParams from a dict +invite_revoke_params_from_dict = InviteRevokeParams.from_dict(invite_revoke_params_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InviteRevokeParamsIds.md b/docs/InviteRevokeParamsIds.md deleted file mode 100644 index f52ca86..0000000 --- a/docs/InviteRevokeParamsIds.md +++ /dev/null @@ -1,11 +0,0 @@ -# InviteRevokeParamsIds - -id or array of ids to revoke - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/InviteSettings.md b/docs/InviteSettings.md new file mode 100644 index 0000000..6770b56 --- /dev/null +++ b/docs/InviteSettings.md @@ -0,0 +1,31 @@ +# InviteSettings + +Invite settings. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**teams** | **List[str]** | Teams the new user is added to when they sign up, by team ID (from `GET /v3/teams`). IDs of teams not in your domain are dropped. | [optional] +**projects** | **List[List[str]]** | Projects the new user gets access to when they sign up, as `[projectId, role]` pairs. IDs of projects not in your domain are dropped. | [optional] + +## Example + +```python +from corellium.models.invite_settings import InviteSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteSettings from a JSON string +invite_settings_instance = InviteSettings.from_json(json) +# print the JSON string representation of the object +print(InviteSettings.to_json()) + +# convert the object into a dict +invite_settings_dict = invite_settings_instance.to_dict() +# create an instance of InviteSettings from a dict +invite_settings_from_dict = InviteSettings.from_dict(invite_settings_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteSignupBody.md b/docs/InviteSignupBody.md new file mode 100644 index 0000000..8436e97 --- /dev/null +++ b/docs/InviteSignupBody.md @@ -0,0 +1,30 @@ +# InviteSignupBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_token** | **str** | Invite token from the invitation email. | +**params** | [**InviteSignupBodyParams**](InviteSignupBodyParams.md) | | + +## Example + +```python +from corellium.models.invite_signup_body import InviteSignupBody + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteSignupBody from a JSON string +invite_signup_body_instance = InviteSignupBody.from_json(json) +# print the JSON string representation of the object +print(InviteSignupBody.to_json()) + +# convert the object into a dict +invite_signup_body_dict = invite_signup_body_instance.to_dict() +# create an instance of InviteSignupBody from a dict +invite_signup_body_from_dict = InviteSignupBody.from_dict(invite_signup_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteSignupBodyParams.md b/docs/InviteSignupBodyParams.md new file mode 100644 index 0000000..fa63acb --- /dev/null +++ b/docs/InviteSignupBodyParams.md @@ -0,0 +1,33 @@ +# InviteSignupBodyParams + +New account parameters. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Account email. | [optional] +**password** | **str** | Account password. | +**label** | **str** | Account label. | +**agreed** | **bool** | Whether the invitee agreed to the terms of service. | + +## Example + +```python +from corellium.models.invite_signup_body_params import InviteSignupBodyParams + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteSignupBodyParams from a JSON string +invite_signup_body_params_instance = InviteSignupBodyParams.from_json(json) +# print the JSON string representation of the object +print(InviteSignupBodyParams.to_json()) + +# convert the object into a dict +invite_signup_body_params_dict = invite_signup_body_params_instance.to_dict() +# create an instance of InviteSignupBodyParams from a dict +invite_signup_body_params_from_dict = InviteSignupBodyParams.from_dict(invite_signup_body_params_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InviteSignupResponse.md b/docs/InviteSignupResponse.md new file mode 100644 index 0000000..6adbb08 --- /dev/null +++ b/docs/InviteSignupResponse.md @@ -0,0 +1,29 @@ +# InviteSignupResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the newly created user. | + +## Example + +```python +from corellium.models.invite_signup_response import InviteSignupResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteSignupResponse from a JSON string +invite_signup_response_instance = InviteSignupResponse.from_json(json) +# print the JSON string representation of the object +print(InviteSignupResponse.to_json()) + +# convert the object into a dict +invite_signup_response_dict = invite_signup_response_instance.to_dict() +# create an instance of InviteSignupResponse from a dict +invite_signup_response_from_dict = InviteSignupResponse.from_dict(invite_signup_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InvitesApi.md b/docs/InvitesApi.md new file mode 100644 index 0000000..9e042de --- /dev/null +++ b/docs/InvitesApi.md @@ -0,0 +1,520 @@ +# corellium.InvitesApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_invites**](InvitesApi.md#v3_create_invites) | **POST** /v3/invites | Create invites +[**v3_edit_invites**](InvitesApi.md#v3_edit_invites) | **POST** /v3/invites/edit | Edit invites +[**v3_get_invite_by_token**](InvitesApi.md#v3_get_invite_by_token) | **POST** /v3/invites-by-token | Get an invite by token +[**v3_list_invites**](InvitesApi.md#v3_list_invites) | **GET** /v3/invites | List invites +[**v3_revoke_invites**](InvitesApi.md#v3_revoke_invites) | **POST** /v3/invites/revoke | Revoke invites +[**v3_signup_from_invite**](InvitesApi.md#v3_signup_from_invite) | **POST** /v3/invites/signup | Sign up from an invite + + +# **v3_create_invites** +> Dict[str, InviteResult] v3_create_invites(create_invites_body) + +Create invites + +**Required role:** Domain administrator or project administrator. + +Invites people by email to create an account in your domain. Requires a domain or project administrator. Each person is emailed a signup link; they create their account with `v3SignupFromInvite`. Use `settings` to add them to teams and give them project access automatically when they sign up. + +The response has one entry per email address: either the created `invite`, or an `error`. An address fails if someone in your domain already uses it, or if it already has a pending invite. To email a pending invite again, send the same address with `resend: true`; this issues a new signup link and the old one stops working. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_invites_body import CreateInvitesBody +from corellium.models.invite_result import InviteResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesApi(api_client) + create_invites_body = corellium.CreateInvitesBody() # CreateInvitesBody | + + try: + # Create invites + api_response = api_instance.v3_create_invites(create_invites_body) + print("The response of InvitesApi->v3_create_invites:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitesApi->v3_create_invites: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_invites_body** | [**CreateInvitesBody**](CreateInvitesBody.md)| | + +### Return type + +[**Dict[str, InviteResult]**](InviteResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Invite results keyed by email. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_edit_invites** +> Invitation v3_edit_invites(edit_invites_body) + +Edit invites + +**Required role:** Domain administrator or project administrator. + +Changes the teams and projects a pending invite will grant when the person signs up. Requires a domain or project administrator. Only the first invite matching the given IDs is changed, so send one ID per request. Team and project IDs not in your domain are dropped. Returns the invite after the change. The person is not emailed again. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.edit_invites_body import EditInvitesBody +from corellium.models.invitation import Invitation +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesApi(api_client) + edit_invites_body = corellium.EditInvitesBody() # EditInvitesBody | + + try: + # Edit invites + api_response = api_instance.v3_edit_invites(edit_invites_body) + print("The response of InvitesApi->v3_edit_invites:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitesApi->v3_edit_invites: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **edit_invites_body** | [**EditInvitesBody**](EditInvitesBody.md)| | + +### Return type + +[**Invitation**](Invitation.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The edited invite. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_invite_by_token** +> InvitationByToken v3_get_invite_by_token(get_invite_by_token_body) + +Get an invite by token + +Looks up an invitation from the token in a signup link, so a signup page can show which domain and email the invite is for before the person creates their account. Needs no sign-in. Returns 403 if the invite has expired, the token does not match, or the domain is disabled, and 404 if no invite has this token. + +### Example + + +```python +import corellium +from corellium.models.get_invite_by_token_body import GetInviteByTokenBody +from corellium.models.invitation_by_token import InvitationByToken +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesApi(api_client) + get_invite_by_token_body = corellium.GetInviteByTokenBody() # GetInviteByTokenBody | + + try: + # Get an invite by token + api_response = api_instance.v3_get_invite_by_token(get_invite_by_token_body) + print("The response of InvitesApi->v3_get_invite_by_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitesApi->v3_get_invite_by_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **get_invite_by_token_body** | [**GetInviteByTokenBody**](GetInviteByTokenBody.md)| | + +### Return type + +[**InvitationByToken**](InvitationByToken.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The invitation. | - | +**400** | Missing or invalid token. | - | +**403** | The invite has expired, its token does not match, or its domain is disabled. | - | +**404** | No invite with the given token. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_invites** +> InvitesListResponse v3_list_invites(limit=limit, offset=offset) + +List invites + +**Required role:** Domain administrator or project administrator. + +Lists invitations that have been sent in your domain but not yet used or revoked, with each invite's email and the teams and projects it will grant. Requires a domain or project administrator. Results are paginated with `limit` and `offset`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.invites_list_response import InvitesListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List invites + api_response = api_instance.v3_list_invites(limit=limit, offset=offset) + print("The response of InvitesApi->v3_list_invites:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitesApi->v3_list_invites: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**InvitesListResponse**](InvitesListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of invitations. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_revoke_invites** +> RevokeInvitesResponse v3_revoke_invites(revoke_invites_body) + +Revoke invites + +**Required role:** Domain administrator or project administrator. + +Cancels pending invites, so their signup links stop working. Requires a domain or project administrator. Returns how many invites were removed; IDs that do not match a pending invite in your domain are ignored. People who already signed up are not affected; remove their accounts with `DELETE /v3/users/{userId}`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.revoke_invites_body import RevokeInvitesBody +from corellium.models.revoke_invites_response import RevokeInvitesResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesApi(api_client) + revoke_invites_body = corellium.RevokeInvitesBody() # RevokeInvitesBody | + + try: + # Revoke invites + api_response = api_instance.v3_revoke_invites(revoke_invites_body) + print("The response of InvitesApi->v3_revoke_invites:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitesApi->v3_revoke_invites: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **revoke_invites_body** | [**RevokeInvitesBody**](RevokeInvitesBody.md)| | + +### Return type + +[**RevokeInvitesResponse**](RevokeInvitesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Number of invites revoked. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_signup_from_invite** +> InviteSignupResponse v3_signup_from_invite(invite_signup_body) + +Sign up from an invite + +Creates a new user account from the token in an invitation email. Needs no sign-in. The account uses the invited email (or `email` from a single sign-on provider, if given) as its username. The teams and project access set on the invite are applied, and the invite is then used up. If your domain requires agreeing to its terms, `agreed` must be true. Returns 403 if the invite has expired or the domain is disabled, and 404 if the token is unknown or already used. + +### Example + + +```python +import corellium +from corellium.models.invite_signup_body import InviteSignupBody +from corellium.models.invite_signup_response import InviteSignupResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesApi(api_client) + invite_signup_body = corellium.InviteSignupBody() # InviteSignupBody | + + try: + # Sign up from an invite + api_response = api_instance.v3_signup_from_invite(invite_signup_body) + print("The response of InvitesApi->v3_signup_from_invite:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitesApi->v3_signup_from_invite: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invite_signup_body** | [**InviteSignupBody**](InviteSignupBody.md)| | + +### Return type + +[**InviteSignupResponse**](InviteSignupResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The created user. | - | +**400** | Invalid signup parameters. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No invite with the given token. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InvitesListResponse.md b/docs/InvitesListResponse.md new file mode 100644 index 0000000..8a13294 --- /dev/null +++ b/docs/InvitesListResponse.md @@ -0,0 +1,34 @@ +# InvitesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Invitation]**](Invitation.md) | Invitations. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.invites_list_response import InvitesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of InvitesListResponse from a JSON string +invites_list_response_instance = InvitesListResponse.from_json(json) +# print the JSON string representation of the object +print(InvitesListResponse.to_json()) + +# convert the object into a dict +invites_list_response_dict = invites_list_response_instance.to_dict() +# create an instance of InvitesListResponse from a dict +invites_list_response_from_dict = InvitesListResponse.from_dict(invites_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InvitesV1Api.md b/docs/InvitesV1Api.md new file mode 100644 index 0000000..1f291f4 --- /dev/null +++ b/docs/InvitesV1Api.md @@ -0,0 +1,460 @@ +# corellium.InvitesV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_create_user_invites**](InvitesV1Api.md#v1_create_user_invites) | **POST** /v1/invites | Create Invite +[**v1_edit_invites**](InvitesV1Api.md#v1_edit_invites) | **POST** /v1/invites/edit | +[**v1_invites**](InvitesV1Api.md#v1_invites) | **GET** /v1/invites | Get Invites +[**v1_invites_by_token**](InvitesV1Api.md#v1_invites_by_token) | **GET** /v1/invites-by-token | +[**v1_revoke_user_invite**](InvitesV1Api.md#v1_revoke_user_invite) | **POST** /v1/invites/revoke | Revoke Invite +[**v1_user_create_from_invite**](InvitesV1Api.md#v1_user_create_from_invite) | **POST** /v1/invites/signup | + + +# **v1_create_user_invites** +> Dict[str, InviteCreatedEntry] v1_create_user_invites() + +Create Invite + +Domain Admin route to invite a new user to create an account + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.invite_created_entry import InviteCreatedEntry +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesV1Api(api_client) + + try: + # Create Invite + api_response = api_instance.v1_create_user_invites() + print("The response of InvitesV1Api->v1_create_user_invites:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitesV1Api->v1_create_user_invites: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Dict[str, InviteCreatedEntry]**](InviteCreatedEntry.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Invite results keyed by email address | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_edit_invites** +> v1_edit_invites() + + + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesV1Api(api_client) + + try: + # + api_instance.v1_edit_invites() + except Exception as e: + print("Exception when calling InvitesV1Api->v1_edit_invites: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_invites** +> List[InvitationV1] v1_invites() + +Get Invites + +Gets all invites for a user's domain + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.invitation_v1 import InvitationV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesV1Api(api_client) + + try: + # Get Invites + api_response = api_instance.v1_invites() + print("The response of InvitesV1Api->v1_invites:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling InvitesV1Api->v1_invites: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[InvitationV1]**](InvitationV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Invitations | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_invites_by_token** +> v1_invites_by_token() + + + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesV1Api(api_client) + + try: + # + api_instance.v1_invites_by_token() + except Exception as e: + print("Exception when calling InvitesV1Api->v1_invites_by_token: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**403** | Forbidden | - | +**404** | application/json Returns { id, email, domain, displayName, termsAgreemeentRequired, settings }. Note: v1 retains the misspelled `termsAgreemeentRequired` key; v3 corrects it to `termsAgreementRequired` (see invitesByTokenHandler / inviteJSON). | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_revoke_user_invite** +> v1_revoke_user_invite(invite_revoke_params) + +Revoke Invite + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.invite_revoke_params import InviteRevokeParams +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesV1Api(api_client) + invite_revoke_params = { + "ids": "1816eddf-95c0-4000-811b-f6dc41aa7401" +} # InviteRevokeParams | Invitations to revoke + + try: + # Revoke Invite + api_instance.v1_revoke_user_invite(invite_revoke_params) + except Exception as e: + print("Exception when calling InvitesV1Api->v1_revoke_user_invite: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **invite_revoke_params** | [**InviteRevokeParams**](InviteRevokeParams.md)| Invitations to revoke | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_user_create_from_invite** +> v1_user_create_from_invite() + + + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.InvitesV1Api(api_client) + + try: + # + api_instance.v1_user_create_from_invite() + except Exception as e: + print("Exception when calling InvitesV1Api->v1_user_create_from_invite: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | application/json | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/IpswDeviceConstraint.md b/docs/IpswDeviceConstraint.md new file mode 100644 index 0000000..e23172c --- /dev/null +++ b/docs/IpswDeviceConstraint.md @@ -0,0 +1,30 @@ +# IpswDeviceConstraint + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | **str** | Device product regex pattern (e.g. \"iPhone16,.*\") | [optional] + +## Example + +```python +from corellium.models.ipsw_device_constraint import IpswDeviceConstraint + +# TODO update the JSON string below +json = "{}" +# create an instance of IpswDeviceConstraint from a JSON string +ipsw_device_constraint_instance = IpswDeviceConstraint.from_json(json) +# print the JSON string representation of the object +print(IpswDeviceConstraint.to_json()) + +# convert the object into a dict +ipsw_device_constraint_dict = ipsw_device_constraint_instance.to_dict() +# create an instance of IpswDeviceConstraint from a dict +ipsw_device_constraint_from_dict = IpswDeviceConstraint.from_dict(ipsw_device_constraint_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IpswFilter.md b/docs/IpswFilter.md new file mode 100644 index 0000000..9143cda --- /dev/null +++ b/docs/IpswFilter.md @@ -0,0 +1,33 @@ +# IpswFilter + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | [**IpswVersionConstraint**](IpswVersionConstraint.md) | | [optional] +**device** | [**IpswDeviceConstraint**](IpswDeviceConstraint.md) | | [optional] +**exclude** | **bool** | Exclude firmware matching this filter | [optional] +**include** | **bool** | Include firmware matching this filter | [optional] + +## Example + +```python +from corellium.models.ipsw_filter import IpswFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of IpswFilter from a JSON string +ipsw_filter_instance = IpswFilter.from_json(json) +# print the JSON string representation of the object +print(IpswFilter.to_json()) + +# convert the object into a dict +ipsw_filter_dict = ipsw_filter_instance.to_dict() +# create an instance of IpswFilter from a dict +ipsw_filter_from_dict = IpswFilter.from_dict(ipsw_filter_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IpswFilterV3.md b/docs/IpswFilterV3.md new file mode 100644 index 0000000..b79c703 --- /dev/null +++ b/docs/IpswFilterV3.md @@ -0,0 +1,32 @@ +# IpswFilterV3 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | [**IpswFilterV3Version**](IpswFilterV3Version.md) | | [optional] +**device** | [**IpswFilterV3Device**](IpswFilterV3Device.md) | | [optional] +**exclude** | **bool** | Exclude firmware matching this filter. | [optional] +**include** | **bool** | Include firmware matching this filter. | [optional] + +## Example + +```python +from corellium.models.ipsw_filter_v3 import IpswFilterV3 + +# TODO update the JSON string below +json = "{}" +# create an instance of IpswFilterV3 from a JSON string +ipsw_filter_v3_instance = IpswFilterV3.from_json(json) +# print the JSON string representation of the object +print(IpswFilterV3.to_json()) + +# convert the object into a dict +ipsw_filter_v3_dict = ipsw_filter_v3_instance.to_dict() +# create an instance of IpswFilterV3 from a dict +ipsw_filter_v3_from_dict = IpswFilterV3.from_dict(ipsw_filter_v3_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IpswFilterV3Device.md b/docs/IpswFilterV3Device.md new file mode 100644 index 0000000..bf8ef3d --- /dev/null +++ b/docs/IpswFilterV3Device.md @@ -0,0 +1,30 @@ +# IpswFilterV3Device + +Device constraint. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | **str** | Device product regex pattern (e.g. \"iPhone16,.*\"). | [optional] + +## Example + +```python +from corellium.models.ipsw_filter_v3_device import IpswFilterV3Device + +# TODO update the JSON string below +json = "{}" +# create an instance of IpswFilterV3Device from a JSON string +ipsw_filter_v3_device_instance = IpswFilterV3Device.from_json(json) +# print the JSON string representation of the object +print(IpswFilterV3Device.to_json()) + +# convert the object into a dict +ipsw_filter_v3_device_dict = ipsw_filter_v3_device_instance.to_dict() +# create an instance of IpswFilterV3Device from a dict +ipsw_filter_v3_device_from_dict = IpswFilterV3Device.from_dict(ipsw_filter_v3_device_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IpswFilterV3Version.md b/docs/IpswFilterV3Version.md new file mode 100644 index 0000000..8cc0a2f --- /dev/null +++ b/docs/IpswFilterV3Version.md @@ -0,0 +1,34 @@ +# IpswFilterV3Version + +Version constraint. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lt** | **str** | Version less-than bound (exclusive). | [optional] +**le** | **str** | Version less-than-or-equal bound (inclusive). | [optional] +**gt** | **str** | Version greater-than bound (exclusive). | [optional] +**ge** | **str** | Version greater-than-or-equal bound (inclusive). | [optional] +**eq** | **str** | Exact version match. | [optional] + +## Example + +```python +from corellium.models.ipsw_filter_v3_version import IpswFilterV3Version + +# TODO update the JSON string below +json = "{}" +# create an instance of IpswFilterV3Version from a JSON string +ipsw_filter_v3_version_instance = IpswFilterV3Version.from_json(json) +# print the JSON string representation of the object +print(IpswFilterV3Version.to_json()) + +# convert the object into a dict +ipsw_filter_v3_version_dict = ipsw_filter_v3_version_instance.to_dict() +# create an instance of IpswFilterV3Version from a dict +ipsw_filter_v3_version_from_dict = IpswFilterV3Version.from_dict(ipsw_filter_v3_version_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IpswVersionConstraint.md b/docs/IpswVersionConstraint.md new file mode 100644 index 0000000..c842b8b --- /dev/null +++ b/docs/IpswVersionConstraint.md @@ -0,0 +1,34 @@ +# IpswVersionConstraint + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lt** | **str** | Version less-than bound (exclusive) | [optional] +**le** | **str** | Version less-than-or-equal bound (inclusive) | [optional] +**gt** | **str** | Version greater-than bound (exclusive) | [optional] +**ge** | **str** | Version greater-than-or-equal bound (inclusive) | [optional] +**eq** | **str** | Exact version match | [optional] + +## Example + +```python +from corellium.models.ipsw_version_constraint import IpswVersionConstraint + +# TODO update the JSON string below +json = "{}" +# create an instance of IpswVersionConstraint from a JSON string +ipsw_version_constraint_instance = IpswVersionConstraint.from_json(json) +# print the JSON string representation of the object +print(IpswVersionConstraint.to_json()) + +# convert the object into a dict +ipsw_version_constraint_dict = ipsw_version_constraint_instance.to_dict() +# create an instance of IpswVersionConstraint from a dict +ipsw_version_constraint_from_dict = IpswVersionConstraint.from_dict(ipsw_version_constraint_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Kcrange.md b/docs/Kcrange.md index e0c5abe..36e0e3a 100644 --- a/docs/Kcrange.md +++ b/docs/Kcrange.md @@ -1,13 +1,30 @@ # Kcrange - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**kext** | **str** | Kernel Extension | [optional] -**range** | **list[str]** | Range | [optional] +**kernel_extension** | **str** | Kernel extension. | +**range** | **List[str]** | Start and end address of the kernel extension range. | + +## Example + +```python +from corellium.models.kcrange import Kcrange + +# TODO update the JSON string below +json = "{}" +# create an instance of Kcrange from a JSON string +kcrange_instance = Kcrange.from_json(json) +# print the JSON string representation of the object +print(Kcrange.to_json()) +# convert the object into a dict +kcrange_dict = kcrange_instance.to_dict() +# create an instance of Kcrange from a dict +kcrange_from_dict = Kcrange.from_dict(kcrange_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KcrangeV1.md b/docs/KcrangeV1.md new file mode 100644 index 0000000..8cfdf61 --- /dev/null +++ b/docs/KcrangeV1.md @@ -0,0 +1,31 @@ +# KcrangeV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kext** | **str** | Kernel Extension | [optional] +**range** | **List[str]** | Range | [optional] + +## Example + +```python +from corellium.models.kcrange_v1 import KcrangeV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of KcrangeV1 from a JSON string +kcrange_v1_instance = KcrangeV1.from_json(json) +# print the JSON string representation of the object +print(KcrangeV1.to_json()) + +# convert the object into a dict +kcrange_v1_dict = kcrange_v1_instance.to_dict() +# create an instance of KcrangeV1 from a dict +kcrange_v1_from_dict = KcrangeV1.from_dict(kcrange_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KernelTask.md b/docs/KernelTask.md index 8910f9d..4e9fa99 100644 --- a/docs/KernelTask.md +++ b/docs/KernelTask.md @@ -1,15 +1,32 @@ # KernelTask - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**kernel_id** | **str** | Kernel Task ID | [optional] -**name** | **str** | Thread name | [optional] -**pid** | **float** | Process ID of task | [optional] -**threads** | [**list[KernelThread]**](KernelThread.md) | | [optional] +**kernel_id** | **str** | Kernel task ID (uint64_t). | +**name** | **str** | Thread name. | +**process_id** | **float** | Process ID of task. | +**threads** | [**List[KernelThread]**](KernelThread.md) | Threads belonging to this task. | + +## Example + +```python +from corellium.models.kernel_task import KernelTask + +# TODO update the JSON string below +json = "{}" +# create an instance of KernelTask from a JSON string +kernel_task_instance = KernelTask.from_json(json) +# print the JSON string representation of the object +print(KernelTask.to_json()) +# convert the object into a dict +kernel_task_dict = kernel_task_instance.to_dict() +# create an instance of KernelTask from a dict +kernel_task_from_dict = KernelTask.from_dict(kernel_task_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KernelTaskV1.md b/docs/KernelTaskV1.md new file mode 100644 index 0000000..5a3a9e3 --- /dev/null +++ b/docs/KernelTaskV1.md @@ -0,0 +1,33 @@ +# KernelTaskV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kernel_id** | **str** | Kernel Task ID | [optional] +**name** | **str** | Thread name | [optional] +**pid** | **float** | Process ID of task | [optional] +**threads** | [**List[KernelThreadV1]**](KernelThreadV1.md) | | [optional] + +## Example + +```python +from corellium.models.kernel_task_v1 import KernelTaskV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of KernelTaskV1 from a JSON string +kernel_task_v1_instance = KernelTaskV1.from_json(json) +# print the JSON string representation of the object +print(KernelTaskV1.to_json()) + +# convert the object into a dict +kernel_task_v1_dict = kernel_task_v1_instance.to_dict() +# create an instance of KernelTaskV1 from a dict +kernel_task_v1_from_dict = KernelTaskV1.from_dict(kernel_task_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KernelThread.md b/docs/KernelThread.md index 21483d0..d1ff273 100644 --- a/docs/KernelThread.md +++ b/docs/KernelThread.md @@ -1,14 +1,31 @@ # KernelThread - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**kernel_id** | **str** | Kernel Thread ID | [optional] -**tid** | **float** | Task ID | [optional] -**stack** | **list[str]** | Array of stack addresses | [optional] +**kernel_id** | **str** | Kernel thread ID (uint64_t). | +**task_id** | **float** | Task ID. | +**stack** | **List[str]** | Array of stack addresses. | + +## Example + +```python +from corellium.models.kernel_thread import KernelThread + +# TODO update the JSON string below +json = "{}" +# create an instance of KernelThread from a JSON string +kernel_thread_instance = KernelThread.from_json(json) +# print the JSON string representation of the object +print(KernelThread.to_json()) +# convert the object into a dict +kernel_thread_dict = kernel_thread_instance.to_dict() +# create an instance of KernelThread from a dict +kernel_thread_from_dict = KernelThread.from_dict(kernel_thread_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KernelThreadV1.md b/docs/KernelThreadV1.md new file mode 100644 index 0000000..52594ed --- /dev/null +++ b/docs/KernelThreadV1.md @@ -0,0 +1,32 @@ +# KernelThreadV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kernel_id** | **str** | Kernel Thread ID | [optional] +**tid** | **float** | Task ID | [optional] +**stack** | **List[str]** | Array of stack addresses | [optional] + +## Example + +```python +from corellium.models.kernel_thread_v1 import KernelThreadV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of KernelThreadV1 from a JSON string +kernel_thread_v1_instance = KernelThreadV1.from_json(json) +# print the JSON string representation of the object +print(KernelThreadV1.to_json()) + +# convert the object into a dict +kernel_thread_v1_dict = kernel_thread_v1_instance.to_dict() +# create an instance of KernelThreadV1 from a dict +kernel_thread_v1_from_dict = KernelThreadV1.from_dict(kernel_thread_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LDAPConfig.md b/docs/LDAPConfig.md new file mode 100644 index 0000000..0c1b10f --- /dev/null +++ b/docs/LDAPConfig.md @@ -0,0 +1,34 @@ +# LDAPConfig + +LDAP provider configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_connection_details** | [**LdapServerConnectionDetails**](LdapServerConnectionDetails.md) | | +**authentication_credentials** | [**LdapAuthenticationCredentials**](LdapAuthenticationCredentials.md) | | +**user_search_configuration** | [**LdapUserSearchConfiguration**](LdapUserSearchConfiguration.md) | | +**user_attribute_mapping** | [**LdapUserAttributeMapping**](LdapUserAttributeMapping.md) | | [optional] +**group_search_configuration** | [**List[LdapGroupSearchConfiguration]**](LdapGroupSearchConfiguration.md) | | [optional] + +## Example + +```python +from corellium.models.ldap_config import LDAPConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of LDAPConfig from a JSON string +ldap_config_instance = LDAPConfig.from_json(json) +# print the JSON string representation of the object +print(LDAPConfig.to_json()) + +# convert the object into a dict +ldap_config_dict = ldap_config_instance.to_dict() +# create an instance of LDAPConfig from a dict +ldap_config_from_dict = LDAPConfig.from_dict(ldap_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LayoutSchema.md b/docs/LayoutSchema.md new file mode 100644 index 0000000..3b5993e --- /dev/null +++ b/docs/LayoutSchema.md @@ -0,0 +1,37 @@ +# LayoutSchema + +Resource layout for this node. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**free_cpus** | **object** | Free CPU list. | [optional] +**free_ram** | **object** | Free RAM. | [optional] +**free_ranges** | **float** | Free address ranges. | [optional] [default to 0] +**numa_nodes** | **float** | Number of NUMA nodes. | [optional] [default to 0] +**ram_cpu** | **str** | RAM per CPU. | [optional] [default to '0'] +**node_map** | **object** | Node map. | [optional] +**free_cores** | **object** | Free cores list. | [optional] +**ram_core** | **float** | RAM per core in MiB. | [optional] [default to 0] + +## Example + +```python +from corellium.models.layout_schema import LayoutSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of LayoutSchema from a JSON string +layout_schema_instance = LayoutSchema.from_json(json) +# print the JSON string representation of the object +print(LayoutSchema.to_json()) + +# convert the object into a dict +layout_schema_dict = layout_schema_instance.to_dict() +# create an instance of LayoutSchema from a dict +layout_schema_from_dict = LayoutSchema.from_dict(layout_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LdapAuthenticationCredentials.md b/docs/LdapAuthenticationCredentials.md new file mode 100644 index 0000000..01617d5 --- /dev/null +++ b/docs/LdapAuthenticationCredentials.md @@ -0,0 +1,30 @@ +# LdapAuthenticationCredentials + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bind_dn** | **str** | Bind DN used to authenticate to the LDAP server. | +**bind_password** | **str** | Bind password. | + +## Example + +```python +from corellium.models.ldap_authentication_credentials import LdapAuthenticationCredentials + +# TODO update the JSON string below +json = "{}" +# create an instance of LdapAuthenticationCredentials from a JSON string +ldap_authentication_credentials_instance = LdapAuthenticationCredentials.from_json(json) +# print the JSON string representation of the object +print(LdapAuthenticationCredentials.to_json()) + +# convert the object into a dict +ldap_authentication_credentials_dict = ldap_authentication_credentials_instance.to_dict() +# create an instance of LdapAuthenticationCredentials from a dict +ldap_authentication_credentials_from_dict = LdapAuthenticationCredentials.from_dict(ldap_authentication_credentials_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LdapGroupSearchConfiguration.md b/docs/LdapGroupSearchConfiguration.md new file mode 100644 index 0000000..2a14598 --- /dev/null +++ b/docs/LdapGroupSearchConfiguration.md @@ -0,0 +1,32 @@ +# LdapGroupSearchConfiguration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_base_dn** | **str** | Base DN for group search. | +**group_search_filter** | **str** | Filter used to locate groups. | [optional] +**team_id** | **str** | Corellium team the group maps to. | +**role** | **str** | Role granted to members of the group. | [optional] + +## Example + +```python +from corellium.models.ldap_group_search_configuration import LdapGroupSearchConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of LdapGroupSearchConfiguration from a JSON string +ldap_group_search_configuration_instance = LdapGroupSearchConfiguration.from_json(json) +# print the JSON string representation of the object +print(LdapGroupSearchConfiguration.to_json()) + +# convert the object into a dict +ldap_group_search_configuration_dict = ldap_group_search_configuration_instance.to_dict() +# create an instance of LdapGroupSearchConfiguration from a dict +ldap_group_search_configuration_from_dict = LdapGroupSearchConfiguration.from_dict(ldap_group_search_configuration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LdapServerConnectionDetails.md b/docs/LdapServerConnectionDetails.md new file mode 100644 index 0000000..6ae8858 --- /dev/null +++ b/docs/LdapServerConnectionDetails.md @@ -0,0 +1,34 @@ +# LdapServerConnectionDetails + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_url** | **str** | LDAP server URL. | +**port** | **str** | LDAP server port. | [optional] +**connection_timeout** | **str** | Connection timeout. | [optional] +**enable_ldaps** | **bool** | Whether to connect over LDAPS. | [optional] +**ca_cert** | **str** | CA certificate for LDAPS. | [optional] +**ca_verify** | **bool** | Whether to verify the server certificate. | [optional] + +## Example + +```python +from corellium.models.ldap_server_connection_details import LdapServerConnectionDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of LdapServerConnectionDetails from a JSON string +ldap_server_connection_details_instance = LdapServerConnectionDetails.from_json(json) +# print the JSON string representation of the object +print(LdapServerConnectionDetails.to_json()) + +# convert the object into a dict +ldap_server_connection_details_dict = ldap_server_connection_details_instance.to_dict() +# create an instance of LdapServerConnectionDetails from a dict +ldap_server_connection_details_from_dict = LdapServerConnectionDetails.from_dict(ldap_server_connection_details_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LdapUserAttributeMapping.md b/docs/LdapUserAttributeMapping.md new file mode 100644 index 0000000..5f5f41b --- /dev/null +++ b/docs/LdapUserAttributeMapping.md @@ -0,0 +1,32 @@ +# LdapUserAttributeMapping + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username_attribute** | **str** | LDAP attribute mapped to username. | [optional] +**email_attribute** | **str** | LDAP attribute mapped to email. | [optional] +**first_name_attribute** | **str** | LDAP attribute mapped to first name. | [optional] +**last_name_attribute** | **str** | LDAP attribute mapped to last name. | [optional] + +## Example + +```python +from corellium.models.ldap_user_attribute_mapping import LdapUserAttributeMapping + +# TODO update the JSON string below +json = "{}" +# create an instance of LdapUserAttributeMapping from a JSON string +ldap_user_attribute_mapping_instance = LdapUserAttributeMapping.from_json(json) +# print the JSON string representation of the object +print(LdapUserAttributeMapping.to_json()) + +# convert the object into a dict +ldap_user_attribute_mapping_dict = ldap_user_attribute_mapping_instance.to_dict() +# create an instance of LdapUserAttributeMapping from a dict +ldap_user_attribute_mapping_from_dict = LdapUserAttributeMapping.from_dict(ldap_user_attribute_mapping_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LdapUserSearchConfiguration.md b/docs/LdapUserSearchConfiguration.md new file mode 100644 index 0000000..24470fd --- /dev/null +++ b/docs/LdapUserSearchConfiguration.md @@ -0,0 +1,31 @@ +# LdapUserSearchConfiguration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_dn** | **str** | Base DN for user search. | +**user_search_base** | **str** | Sub-tree to search for users. | [optional] +**user_search_filter** | **str** | Filter used to locate users. | [optional] + +## Example + +```python +from corellium.models.ldap_user_search_configuration import LdapUserSearchConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of LdapUserSearchConfiguration from a JSON string +ldap_user_search_configuration_instance = LdapUserSearchConfiguration.from_json(json) +# print the JSON string representation of the object +print(LdapUserSearchConfiguration.to_json()) + +# convert the object into a dict +ldap_user_search_configuration_dict = ldap_user_search_configuration_instance.to_dict() +# create an instance of LdapUserSearchConfiguration from a dict +ldap_user_search_configuration_from_dict = LdapUserSearchConfiguration.from_dict(ldap_user_search_configuration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoadExtensionBody.md b/docs/LoadExtensionBody.md new file mode 100644 index 0000000..ba9a2e1 --- /dev/null +++ b/docs/LoadExtensionBody.md @@ -0,0 +1,29 @@ +# LoadExtensionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_id** | **str** | ID of the extension file you uploaded with `POST /v3/images` using `type: \"extension\"`. | + +## Example + +```python +from corellium.models.load_extension_body import LoadExtensionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of LoadExtensionBody from a JSON string +load_extension_body_instance = LoadExtensionBody.from_json(json) +# print the JSON string representation of the object +print(LoadExtensionBody.to_json()) + +# convert the object into a dict +load_extension_body_dict = load_extension_body_instance.to_dict() +# create an instance of LoadExtensionBody from a dict +load_extension_body_from_dict = LoadExtensionBody.from_dict(load_extension_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Logging.md b/docs/Logging.md index 9407feb..f791f13 100644 --- a/docs/Logging.md +++ b/docs/Logging.md @@ -1,13 +1,31 @@ # Logging - +Info for logging. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**development** | **bool** | Denotes whether it's in development | [optional] -**throw_warnings** | **bool** | Denotes whether to throw warnings | [optional] +**development** | **bool** | Denotes whether it's in development. | +**throw_warnings** | **bool** | Denotes whether to throw warnings. | + +## Example + +```python +from corellium.models.logging import Logging + +# TODO update the JSON string below +json = "{}" +# create an instance of Logging from a JSON string +logging_instance = Logging.from_json(json) +# print the JSON string representation of the object +print(Logging.to_json()) +# convert the object into a dict +logging_dict = logging_instance.to_dict() +# create an instance of Logging from a dict +logging_from_dict = Logging.from_dict(logging_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LoggingV1.md b/docs/LoggingV1.md new file mode 100644 index 0000000..77c37d7 --- /dev/null +++ b/docs/LoggingV1.md @@ -0,0 +1,31 @@ +# LoggingV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**development** | **bool** | Denotes whether it's in development | [optional] +**throw_warnings** | **bool** | Denotes whether to throw warnings | [optional] + +## Example + +```python +from corellium.models.logging_v1 import LoggingV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of LoggingV1 from a JSON string +logging_v1_instance = LoggingV1.from_json(json) +# print the JSON string representation of the object +print(LoggingV1.to_json()) + +# convert the object into a dict +logging_v1_dict = logging_v1_instance.to_dict() +# create an instance of LoggingV1 from a dict +logging_v1_from_dict = LoggingV1.from_dict(logging_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginBody.md b/docs/LoginBody.md new file mode 100644 index 0000000..b353551 --- /dev/null +++ b/docs/LoginBody.md @@ -0,0 +1,34 @@ +# LoginBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | Account username. Send together with `password`. | [optional] +**password** | **str** | Account password. Send together with `username`. | [optional] +**totp_token** | **str** | One-time TOTP code. Required only when the account has two-factor authentication enabled, sent alongside `username`/`password`. | [optional] +**api_token** | **str** | Persistent API key, used as an alternative to username/password for programmatic access. Created by the user (in the web UI or via `POST /v3/auth/apitoken`) rather than issued by login, and sent back verbatim as an opaque string. Also accepted directly in the `Authorization: Bearer` header, and is the value the CLI stores as `--token`. Never returned by this endpoint, and distinct from the session `token`. | [optional] +**token** | **str** | An existing session token to renew. This is the signed JWT bearer token previously returned by login. Login always issues a newly-regenerated session token in the response; the supplied token is neither echoed back nor invalidated. Distinct from `apiToken`. | [optional] +**revoke_old** | **bool** | Revoke previously issued tokens on success. | [optional] + +## Example + +```python +from corellium.models.login_body import LoginBody + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginBody from a JSON string +login_body_instance = LoginBody.from_json(json) +# print the JSON string representation of the object +print(LoginBody.to_json()) + +# convert the object into a dict +login_body_dict = login_body_instance.to_dict() +# create an instance of LoginBody from a dict +login_body_from_dict = LoginBody.from_dict(login_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResult.md b/docs/LoginResult.md new file mode 100644 index 0000000..12d5ee4 --- /dev/null +++ b/docs/LoginResult.md @@ -0,0 +1,36 @@ +# LoginResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Signed JWT bearer session token, newly regenerated on every successful login. | +**expiration** | **datetime** | Token expiration timestamp. | +**user** | [**LoginResultUser**](LoginResultUser.md) | | [optional] +**domain** | [**LoginResultDomain**](LoginResultDomain.md) | | [optional] +**time** | **float** | Server time when the session was issued, in milliseconds. | [optional] +**identifier** | **str** | Webplayer session identifier. Present only on a Webplayer token renewal. | [optional] +**disabled** | [**LoginResultDisabled**](LoginResultDisabled.md) | | [optional] +**missing_totp** | **bool** | Present when the domain requires TOTP but the user has not enrolled. | [optional] + +## Example + +```python +from corellium.models.login_result import LoginResult + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResult from a JSON string +login_result_instance = LoginResult.from_json(json) +# print the JSON string representation of the object +print(LoginResult.to_json()) + +# convert the object into a dict +login_result_dict = login_result_instance.to_dict() +# create an instance of LoginResult from a dict +login_result_from_dict = LoginResult.from_dict(login_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResultDisabled.md b/docs/LoginResultDisabled.md new file mode 100644 index 0000000..5103ac9 --- /dev/null +++ b/docs/LoginResultDisabled.md @@ -0,0 +1,33 @@ +# LoginResultDisabled + +Public disable details. Present only when the domain is disabled. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Reason the domain is disabled. | +**disabled_at** | **datetime** | When the domain was disabled. Present for AllocatedHoursExpended. | [optional] +**delete_instances_at** | **datetime** | When the domain's instances will be deleted. | [optional] +**cancel_date** | **datetime** | When the subscription was canceled. Present for SubscriptionCanceled. | [optional] + +## Example + +```python +from corellium.models.login_result_disabled import LoginResultDisabled + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResultDisabled from a JSON string +login_result_disabled_instance = LoginResultDisabled.from_json(json) +# print the JSON string representation of the object +print(LoginResultDisabled.to_json()) + +# convert the object into a dict +login_result_disabled_dict = login_result_disabled_instance.to_dict() +# create an instance of LoginResultDisabled from a dict +login_result_disabled_from_dict = LoginResultDisabled.from_dict(login_result_disabled_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResultDomain.md b/docs/LoginResultDomain.md new file mode 100644 index 0000000..91d6d78 --- /dev/null +++ b/docs/LoginResultDomain.md @@ -0,0 +1,50 @@ +# LoginResultDomain + +The session's domain, including its feature configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Domain name. | +**label** | **str** | Domain description. | +**terms_policy** | **str** | Terms-of-service policy for the domain. | [optional] +**cores** | **float** | Licensed core quota. | +**individual** | **bool** | Whether this is an individual (aggregate member) domain. | +**totp_required** | **bool** | Present when the domain mandates TOTP. | [optional] +**subscription** | **Dict[str, Optional[object]]** | Billing summary for the domain, present when it has a billing record. Carries the billing wire fields renew_action, next_bill, billing_type and billing_backend. | [optional] +**license_type** | **str** | License type identifier. | [optional] +**android** | **bool** | Whether Android devices are enabled. | [optional] +**no_ios** | **bool** | Whether iOS devices are disabled. | [optional] +**files_only** | **bool** | Whether the domain is in files-only mode. | [optional] +**device_dhcp_server** | **bool** | Whether the device DHCP server is enabled. | [optional] +**enable_arm_devices** | **bool** | Whether ARM devices are enabled. | [optional] +**use_device_accounting** | **bool** | Whether the domain is billed by device hours instead of core hours. | [optional] +**single_project** | **bool** | Whether the domain is limited to a single project. | [optional] +**terms_updated** | **str** | When the domain terms were last updated; compared against the user agreement. | [optional] +**trial** | [**LoginResultDomainTrial**](LoginResultDomainTrial.md) | | [optional] +**webplayer** | [**LoginResultDomainWebplayer**](LoginResultDomainWebplayer.md) | | [optional] +**snapshot_sharing_permissions** | [**LoginResultDomainSnapshotSharingPermissions**](LoginResultDomainSnapshotSharingPermissions.md) | | [optional] +**device_auto_shutdown** | [**LoginResultDomainDeviceAutoShutdown**](LoginResultDomainDeviceAutoShutdown.md) | | [optional] +**disabled** | [**LoginResultDomainDisabled**](LoginResultDomainDisabled.md) | | [optional] + +## Example + +```python +from corellium.models.login_result_domain import LoginResultDomain + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResultDomain from a JSON string +login_result_domain_instance = LoginResultDomain.from_json(json) +# print the JSON string representation of the object +print(LoginResultDomain.to_json()) + +# convert the object into a dict +login_result_domain_dict = login_result_domain_instance.to_dict() +# create an instance of LoginResultDomain from a dict +login_result_domain_from_dict = LoginResultDomain.from_dict(login_result_domain_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResultDomainDeviceAutoShutdown.md b/docs/LoginResultDomainDeviceAutoShutdown.md new file mode 100644 index 0000000..9367707 --- /dev/null +++ b/docs/LoginResultDomainDeviceAutoShutdown.md @@ -0,0 +1,31 @@ +# LoginResultDomainDeviceAutoShutdown + +Automatic device shutdown configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether idle devices are shut down. | [optional] +**threshold** | **float** | Hours an instance may run before it is shut down (defaults to 10). | [optional] + +## Example + +```python +from corellium.models.login_result_domain_device_auto_shutdown import LoginResultDomainDeviceAutoShutdown + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResultDomainDeviceAutoShutdown from a JSON string +login_result_domain_device_auto_shutdown_instance = LoginResultDomainDeviceAutoShutdown.from_json(json) +# print the JSON string representation of the object +print(LoginResultDomainDeviceAutoShutdown.to_json()) + +# convert the object into a dict +login_result_domain_device_auto_shutdown_dict = login_result_domain_device_auto_shutdown_instance.to_dict() +# create an instance of LoginResultDomainDeviceAutoShutdown from a dict +login_result_domain_device_auto_shutdown_from_dict = LoginResultDomainDeviceAutoShutdown.from_dict(login_result_domain_device_auto_shutdown_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResultDomainDisabled.md b/docs/LoginResultDomainDisabled.md new file mode 100644 index 0000000..19f74ed --- /dev/null +++ b/docs/LoginResultDomainDisabled.md @@ -0,0 +1,31 @@ +# LoginResultDomainDisabled + +Disable details carried in the domain configuration. See the top-level `disabled` field. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Reason the domain is disabled. | [optional] +**cancel_date** | **datetime** | When the subscription was canceled. | [optional] + +## Example + +```python +from corellium.models.login_result_domain_disabled import LoginResultDomainDisabled + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResultDomainDisabled from a JSON string +login_result_domain_disabled_instance = LoginResultDomainDisabled.from_json(json) +# print the JSON string representation of the object +print(LoginResultDomainDisabled.to_json()) + +# convert the object into a dict +login_result_domain_disabled_dict = login_result_domain_disabled_instance.to_dict() +# create an instance of LoginResultDomainDisabled from a dict +login_result_domain_disabled_from_dict = LoginResultDomainDisabled.from_dict(login_result_domain_disabled_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResultDomainSnapshotSharingPermissions.md b/docs/LoginResultDomainSnapshotSharingPermissions.md new file mode 100644 index 0000000..29a747d --- /dev/null +++ b/docs/LoginResultDomainSnapshotSharingPermissions.md @@ -0,0 +1,35 @@ +# LoginResultDomainSnapshotSharingPermissions + +Snapshot sharing permissions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cloud_enabled** | **bool** | Whether cloud sharing is enabled. | [optional] +**domain_enabled** | **bool** | Whether domain sharing is enabled. | [optional] +**public_link** | **bool** | Whether public link sharing is enabled. | [optional] +**domain_restricted_link** | **bool** | Whether domain-restricted links are enabled. | [optional] +**password_public_link** | **bool** | Whether password-protected public links are enabled. | [optional] +**email_invite** | **bool** | Whether email invites are enabled. | [optional] + +## Example + +```python +from corellium.models.login_result_domain_snapshot_sharing_permissions import LoginResultDomainSnapshotSharingPermissions + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResultDomainSnapshotSharingPermissions from a JSON string +login_result_domain_snapshot_sharing_permissions_instance = LoginResultDomainSnapshotSharingPermissions.from_json(json) +# print the JSON string representation of the object +print(LoginResultDomainSnapshotSharingPermissions.to_json()) + +# convert the object into a dict +login_result_domain_snapshot_sharing_permissions_dict = login_result_domain_snapshot_sharing_permissions_instance.to_dict() +# create an instance of LoginResultDomainSnapshotSharingPermissions from a dict +login_result_domain_snapshot_sharing_permissions_from_dict = LoginResultDomainSnapshotSharingPermissions.from_dict(login_result_domain_snapshot_sharing_permissions_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResultDomainTrial.md b/docs/LoginResultDomainTrial.md new file mode 100644 index 0000000..ecc513e --- /dev/null +++ b/docs/LoginResultDomainTrial.md @@ -0,0 +1,31 @@ +# LoginResultDomainTrial + +Trial configuration, null once the domain is no longer on a trial. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start** | **float** | Trial start unix timestamp (ms). | [optional] +**end** | **float** | Trial end unix timestamp (ms). | [optional] + +## Example + +```python +from corellium.models.login_result_domain_trial import LoginResultDomainTrial + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResultDomainTrial from a JSON string +login_result_domain_trial_instance = LoginResultDomainTrial.from_json(json) +# print the JSON string representation of the object +print(LoginResultDomainTrial.to_json()) + +# convert the object into a dict +login_result_domain_trial_dict = login_result_domain_trial_instance.to_dict() +# create an instance of LoginResultDomainTrial from a dict +login_result_domain_trial_from_dict = LoginResultDomainTrial.from_dict(login_result_domain_trial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResultDomainWebplayer.md b/docs/LoginResultDomainWebplayer.md new file mode 100644 index 0000000..7725686 --- /dev/null +++ b/docs/LoginResultDomainWebplayer.md @@ -0,0 +1,31 @@ +# LoginResultDomainWebplayer + +Webplayer configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether Webplayer is enabled. | [optional] +**allowed_domains** | **List[str]** | Domains allowed to embed Webplayer sessions. | [optional] + +## Example + +```python +from corellium.models.login_result_domain_webplayer import LoginResultDomainWebplayer + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResultDomainWebplayer from a JSON string +login_result_domain_webplayer_instance = LoginResultDomainWebplayer.from_json(json) +# print the JSON string representation of the object +print(LoginResultDomainWebplayer.to_json()) + +# convert the object into a dict +login_result_domain_webplayer_dict = login_result_domain_webplayer_instance.to_dict() +# create an instance of LoginResultDomainWebplayer from a dict +login_result_domain_webplayer_from_dict = LoginResultDomainWebplayer.from_dict(login_result_domain_webplayer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoginResultUser.md b/docs/LoginResultUser.md new file mode 100644 index 0000000..b976def --- /dev/null +++ b/docs/LoginResultUser.md @@ -0,0 +1,38 @@ +# LoginResultUser + +The authenticated user. Absent on a Webplayer token renewal. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | User identifier. | +**name** | **str** | Username. | +**label** | **str** | Display name. | +**email** | **str** | Email address. | +**cluster_administrator** | **bool** | Whether the user is a cluster administrator. | +**agreed_to_terms** | **str** | When the user last agreed to the terms of service. | [optional] +**federated_user_id** | **str** | Subject of the linked SSO credential, if any. | [optional] +**intercom_hmac** | **str** | HMAC used for Intercom identity verification. | +**misc** | **Dict[str, Optional[object]]** | User metadata. API token bookkeeping only — the token itself is never returned. | + +## Example + +```python +from corellium.models.login_result_user import LoginResultUser + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginResultUser from a JSON string +login_result_user_instance = LoginResultUser.from_json(json) +# print the JSON string representation of the object +print(LoginResultUser.to_json()) + +# convert the object into a dict +login_result_user_dict = login_result_user_instance.to_dict() +# create an instance of LoginResultUser from a dict +login_result_user_from_dict = LoginResultUser.from_dict(login_result_user_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Maintenance.md b/docs/Maintenance.md index 6e12fdb..910eb24 100644 --- a/docs/Maintenance.md +++ b/docs/Maintenance.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Maintenance message | [optional] **header** | **str** | Maintenance header | [optional] +## Example + +```python +from corellium.models.maintenance import Maintenance + +# TODO update the JSON string below +json = "{}" +# create an instance of Maintenance from a JSON string +maintenance_instance = Maintenance.from_json(json) +# print the JSON string representation of the object +print(Maintenance.to_json()) + +# convert the object into a dict +maintenance_dict = maintenance_instance.to_dict() +# create an instance of Maintenance from a dict +maintenance_from_dict = Maintenance.from_dict(maintenance_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MatrixError.md b/docs/MatrixError.md new file mode 100644 index 0000000..1b7048f --- /dev/null +++ b/docs/MatrixError.md @@ -0,0 +1,29 @@ +# MatrixError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Human-readable description of what went wrong. | + +## Example + +```python +from corellium.models.matrix_error import MatrixError + +# TODO update the JSON string below +json = "{}" +# create an instance of MatrixError from a JSON string +matrix_error_instance = MatrixError.from_json(json) +# print the JSON string representation of the object +print(MatrixError.to_json()) + +# convert the object into a dict +matrix_error_dict = matrix_error_instance.to_dict() +# create an instance of MatrixError from a dict +matrix_error_from_dict = MatrixError.from_dict(matrix_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaPlayBody.md b/docs/MediaPlayBody.md index b850259..fbd138a 100644 --- a/docs/MediaPlayBody.md +++ b/docs/MediaPlayBody.md @@ -1,13 +1,31 @@ # MediaPlayBody - +Media source. Provide exactly one of imageId or url. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**image_id** | **str** | Image ID | [optional] -**url** | **str** | URL to a media file | [optional] +**image_id** | **str** | Image ID. | +**url** | **str** | URL to a media file. | + +## Example + +```python +from corellium.models.media_play_body import MediaPlayBody + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaPlayBody from a JSON string +media_play_body_instance = MediaPlayBody.from_json(json) +# print the JSON string representation of the object +print(MediaPlayBody.to_json()) +# convert the object into a dict +media_play_body_dict = media_play_body_instance.to_dict() +# create an instance of MediaPlayBody from a dict +media_play_body_from_dict = MediaPlayBody.from_dict(media_play_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MediaPlayBodyV1.md b/docs/MediaPlayBodyV1.md new file mode 100644 index 0000000..99c47de --- /dev/null +++ b/docs/MediaPlayBodyV1.md @@ -0,0 +1,31 @@ +# MediaPlayBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_id** | **str** | Image ID | [optional] +**url** | **str** | URL to a media file | [optional] + +## Example + +```python +from corellium.models.media_play_body_v1 import MediaPlayBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaPlayBodyV1 from a JSON string +media_play_body_v1_instance = MediaPlayBodyV1.from_json(json) +# print the JSON string representation of the object +print(MediaPlayBodyV1.to_json()) + +# convert the object into a dict +media_play_body_v1_dict = media_play_body_v1_instance.to_dict() +# create an instance of MediaPlayBodyV1 from a dict +media_play_body_v1_from_dict = MediaPlayBodyV1.from_dict(media_play_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaPlayByImage.md b/docs/MediaPlayByImage.md new file mode 100644 index 0000000..f4f551c --- /dev/null +++ b/docs/MediaPlayByImage.md @@ -0,0 +1,29 @@ +# MediaPlayByImage + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_id** | **str** | Image ID. | + +## Example + +```python +from corellium.models.media_play_by_image import MediaPlayByImage + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaPlayByImage from a JSON string +media_play_by_image_instance = MediaPlayByImage.from_json(json) +# print the JSON string representation of the object +print(MediaPlayByImage.to_json()) + +# convert the object into a dict +media_play_by_image_dict = media_play_by_image_instance.to_dict() +# create an instance of MediaPlayByImage from a dict +media_play_by_image_from_dict = MediaPlayByImage.from_dict(media_play_by_image_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaPlayByUrl.md b/docs/MediaPlayByUrl.md new file mode 100644 index 0000000..d7605a6 --- /dev/null +++ b/docs/MediaPlayByUrl.md @@ -0,0 +1,29 @@ +# MediaPlayByUrl + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | URL to a media file. | + +## Example + +```python +from corellium.models.media_play_by_url import MediaPlayByUrl + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaPlayByUrl from a JSON string +media_play_by_url_instance = MediaPlayByUrl.from_json(json) +# print the JSON string representation of the object +print(MediaPlayByUrl.to_json()) + +# convert the object into a dict +media_play_by_url_dict = media_play_by_url_instance.to_dict() +# create an instance of MediaPlayByUrl from a dict +media_play_by_url_from_dict = MediaPlayByUrl.from_dict(media_play_by_url_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaStore.md b/docs/MediaStore.md new file mode 100644 index 0000000..6052a76 --- /dev/null +++ b/docs/MediaStore.md @@ -0,0 +1,40 @@ +# MediaStore + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Storage device identifier. | +**device** | **str** | Device name. | +**fs_type** | **str** | Filesystem type. | +**fs_uuid** | **str** | Filesystem UUID. | +**label** | **str** | Volume label. | +**serial** | **str** | Device serial number. | +**vendor** | **str** | Device vendor. | +**model** | **str** | Device model. | +**mount_policy** | **str** | Mount policy (read-only or read-write). | +**status** | **str** | Mount status. | +**created_at** | **datetime** | Creation timestamp. | +**updated_at** | **datetime** | Last update timestamp. | + +## Example + +```python +from corellium.models.media_store import MediaStore + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaStore from a JSON string +media_store_instance = MediaStore.from_json(json) +# print the JSON string representation of the object +print(MediaStore.to_json()) + +# convert the object into a dict +media_store_dict = media_store_instance.to_dict() +# create an instance of MediaStore from a dict +media_store_from_dict = MediaStore.from_dict(media_store_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MediaStoreV1.md b/docs/MediaStoreV1.md new file mode 100644 index 0000000..149b57a --- /dev/null +++ b/docs/MediaStoreV1.md @@ -0,0 +1,40 @@ +# MediaStoreV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | | [optional] +**device** | **str** | | [optional] +**fs_type** | **str** | | [optional] +**fs_uuid** | **str** | | [optional] +**label** | **str** | | [optional] +**serial** | **str** | | [optional] +**vendor** | **str** | | [optional] +**model** | **str** | | [optional] +**mount_policy** | **str** | | [optional] +**created_at** | **str** | | [optional] +**updated_at** | **str** | | [optional] + +## Example + +```python +from corellium.models.media_store_v1 import MediaStoreV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of MediaStoreV1 from a JSON string +media_store_v1_instance = MediaStoreV1.from_json(json) +# print the JSON string representation of the object +print(MediaStoreV1.to_json()) + +# convert the object into a dict +media_store_v1_dict = media_store_v1_instance.to_dict() +# create an instance of MediaStoreV1 from a dict +media_store_v1_from_dict = MediaStoreV1.from_dict(media_store_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageBody.md b/docs/MessageBody.md new file mode 100644 index 0000000..29c1580 --- /dev/null +++ b/docs/MessageBody.md @@ -0,0 +1,31 @@ +# MessageBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **str** | Source phone number. | +**message** | **str** | SMS message body. | +**raw** | **str** | Hex-encoded raw message bytes. | + +## Example + +```python +from corellium.models.message_body import MessageBody + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageBody from a JSON string +message_body_instance = MessageBody.from_json(json) +# print the JSON string representation of the object +print(MessageBody.to_json()) + +# convert the object into a dict +message_body_dict = message_body_instance.to_dict() +# create an instance of MessageBody from a dict +message_body_from_dict = MessageBody.from_dict(message_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageBodyAnyOf.md b/docs/MessageBodyAnyOf.md new file mode 100644 index 0000000..e746141 --- /dev/null +++ b/docs/MessageBodyAnyOf.md @@ -0,0 +1,30 @@ +# MessageBodyAnyOf + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **str** | Source phone number. | +**message** | **str** | SMS message body. | + +## Example + +```python +from corellium.models.message_body_any_of import MessageBodyAnyOf + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageBodyAnyOf from a JSON string +message_body_any_of_instance = MessageBodyAnyOf.from_json(json) +# print the JSON string representation of the object +print(MessageBodyAnyOf.to_json()) + +# convert the object into a dict +message_body_any_of_dict = message_body_any_of_instance.to_dict() +# create an instance of MessageBodyAnyOf from a dict +message_body_any_of_from_dict = MessageBodyAnyOf.from_dict(message_body_any_of_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageBodyAnyOf1.md b/docs/MessageBodyAnyOf1.md new file mode 100644 index 0000000..b4b7dfd --- /dev/null +++ b/docs/MessageBodyAnyOf1.md @@ -0,0 +1,29 @@ +# MessageBodyAnyOf1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**raw** | **str** | Hex-encoded raw message bytes. | + +## Example + +```python +from corellium.models.message_body_any_of1 import MessageBodyAnyOf1 + +# TODO update the JSON string below +json = "{}" +# create an instance of MessageBodyAnyOf1 from a JSON string +message_body_any_of1_instance = MessageBodyAnyOf1.from_json(json) +# print the JSON string representation of the object +print(MessageBodyAnyOf1.to_json()) + +# convert the object into a dict +message_body_any_of1_dict = message_body_any_of1_instance.to_dict() +# create an instance of MessageBodyAnyOf1 from a dict +message_body_any_of1_from_dict = MessageBodyAnyOf1.from_dict(message_body_any_of1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MeteredSubscriptionUsage.md b/docs/MeteredSubscriptionUsage.md index ff6dd67..04f91df 100644 --- a/docs/MeteredSubscriptionUsage.md +++ b/docs/MeteredSubscriptionUsage.md @@ -1,21 +1,37 @@ # MeteredSubscriptionUsage - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**burst_rate** | **float** | Unit price | [optional] -**allocated_hours** | **float** | Allocated hours | [optional] -**plan_billed_amount** | **float** | Plan cost | [optional] -**plan_billed_units** | **float** | Units included in plan | [optional] -**burst_billed_amount** | **float** | Amount billed | [optional] -**burst_billed_units** | **float** | Units billed | [optional] -**burst_outstanding_amount** | **float** | Outstanding amount | [optional] -**burst_outstanding_units** | **float** | Outstanding units | [optional] -**total_usage_amount** | **float** | Total cost in cents for current period | [optional] -**total_used_units** | **float** | Total used units for current period | [optional] +**burst_rate** | **float** | Unit price for burst usage. | +**allocated_hours** | **float** | Allocated hours. | +**plan_billed_amount** | **float** | Plan cost. | +**burst_billed_amount** | **float** | Burst amount billed. | +**burst_billed_units** | **float** | Burst units billed. | +**burst_outstanding_amount** | **float** | Outstanding burst amount. | +**burst_outstanding_units** | **float** | Outstanding burst units. | +**total_usage_amount** | **float** | Total cost in cents for the period. | +**total_used_units** | **float** | Total used units for the period. | + +## Example + +```python +from corellium.models.metered_subscription_usage import MeteredSubscriptionUsage + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteredSubscriptionUsage from a JSON string +metered_subscription_usage_instance = MeteredSubscriptionUsage.from_json(json) +# print the JSON string representation of the object +print(MeteredSubscriptionUsage.to_json()) +# convert the object into a dict +metered_subscription_usage_dict = metered_subscription_usage_instance.to_dict() +# create an instance of MeteredSubscriptionUsage from a dict +metered_subscription_usage_from_dict = MeteredSubscriptionUsage.from_dict(metered_subscription_usage_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MeteredSubscriptionUsageV1.md b/docs/MeteredSubscriptionUsageV1.md new file mode 100644 index 0000000..8a20e44 --- /dev/null +++ b/docs/MeteredSubscriptionUsageV1.md @@ -0,0 +1,39 @@ +# MeteredSubscriptionUsageV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**burst_rate** | **float** | Unit price | [optional] +**allocated_hours** | **float** | Allocated hours | [optional] +**plan_billed_amount** | **float** | Plan cost | [optional] +**plan_billed_units** | **float** | Units included in plan | [optional] +**burst_billed_amount** | **float** | Amount billed | [optional] +**burst_billed_units** | **float** | Units billed | [optional] +**burst_outstanding_amount** | **float** | Outstanding amount | [optional] +**burst_outstanding_units** | **float** | Outstanding units | [optional] +**total_usage_amount** | **float** | Total cost in cents for current period | [optional] +**total_used_units** | **float** | Total used units for current period | [optional] + +## Example + +```python +from corellium.models.metered_subscription_usage_v1 import MeteredSubscriptionUsageV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of MeteredSubscriptionUsageV1 from a JSON string +metered_subscription_usage_v1_instance = MeteredSubscriptionUsageV1.from_json(json) +# print the JSON string representation of the object +print(MeteredSubscriptionUsageV1.to_json()) + +# convert the object into a dict +metered_subscription_usage_v1_dict = metered_subscription_usage_v1_instance.to_dict() +# create an instance of MeteredSubscriptionUsageV1 from a dict +metered_subscription_usage_v1_from_dict = MeteredSubscriptionUsageV1.from_dict(metered_subscription_usage_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model.md b/docs/Model.md index ab73a77..7df68cd 100644 --- a/docs/Model.md +++ b/docs/Model.md @@ -1,21 +1,69 @@ # Model - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | | -**name** | **str** | | -**flavor** | **str** | | -**description** | **str** | | [optional] -**model** | **str** | | -**board_config** | **str** | | [optional] -**platform** | **str** | | [optional] -**cpid** | **float** | | [optional] -**bdid** | **float** | | [optional] -**peripherals** | **bool** | | [optional] +**type** | **str** | Device type, e.g. iOS, Android or IoT. | +**flavor** | **str** | The model's identifier, for example \"iphone17a\". Pass this value as `flavor` when you create an instance, and as `{model}` when you list its software. | +**description** | **str** | Human-readable model name, e.g. \"iPhone Air\". | +**model** | **str** | Marketing model identifier, e.g. \"iPhone18,4\". | +**hardware_model** | **str** | Hardware board model, e.g. \"d23ap\". | +**board_config** | **str** | Board configuration identifier. | +**platform** | **str** | Device platform. | +**cpid** | **float** | Chip ID. | +**bdid** | **float** | Board ID. | +**vendor** | **str** | Vendor gating this model, when it is vendor-restricted. | +**hidden** | **bool** | Whether this model is hidden from device pickers. | +**is_beta** | **bool** | Whether this model is a beta device. | +**peripherals** | **bool** | Whether the device supports peripherals. | +**has_software** | **bool** | Whether any software build is available for this model. | +**supports_rapid_start** | **bool** | Whether at least one software build for this model can start from a snapshot. | +**default_firmware** | **str** | Filename pattern that selects the default build. It ignores case. Null if the model has no default. | +**cores** | **float** | Number of CPU cores a new instance of this model gets if you do not choose one. | +**cores_min** | **float** | Fewest CPU cores you can give an instance of this model. | +**cores_max** | **float** | Most CPU cores you can give an instance of this model. | +**cores_step** | **float** | If present, core counts must go up in steps of this size between `coresMin` and `coresMax`. | [optional] +**cores_allowed** | **List[float]** | If present, the exact core counts you may choose, smallest first. When set, use one of these values. | [optional] +**ram** | **float** | Memory, in MiB (1024 = 1 GiB), that a new instance gets if you do not choose an amount. | +**ram_min** | **float** | Smallest memory amount, in MiB, you can give an instance of this model. | +**ram_max** | **float** | Largest memory amount, in MiB, you can give an instance of this model. | +**dynamic_hardware_changes** | **bool** | Whether cores and memory can be changed while the instance is running. | +**partitions** | [**List[ModelPartition]**](ModelPartition.md) | Storage partitions of this model. | +**frame** | [**ModelFrame**](ModelFrame.md) | | +**product_image** | [**ModelProductImage**](ModelProductImage.md) | | +**has_frame_variant** | **bool** | Whether this model is the bezel-framed variant of its device type. | +**show_options** | **List[str]** | Preset boot options this model offers. | +**string_udid** | **bool** | Whether this model takes its UDID as a free-form string. | +**charm_boot_args** | **List[Dict[str, Optional[object]]]** | Model-specific boot argument field definitions. | [optional] +**requires_preset_boot_options** | **bool** | Whether a preset boot option must be chosen when creating an instance. | +**supports_preset_boot_options** | **bool** | Whether preset boot options are supported. | +**supports_custom_firmware** | **bool** | Whether custom firmware is supported. | +**supports_custom_firmware_image** | **bool** | Whether a user-supplied firmware image can be uploaded for this model. | +**supports_custom_kernel** | **bool** | Whether a custom kernel is supported. | +**supports_custom_devicetree** | **bool** | Whether a custom device tree is supported. | +**supports_custom_mmio** | **bool** | Whether custom MMIO configuration is supported. | +**supports_fvp** | **bool** | Whether this model is an Arm Fixed Virtual Platform. | +**mast** | **bool** | Whether MATRIX security assessments can run on instances of this model. | + +## Example + +```python +from corellium.models.model import Model + +# TODO update the JSON string below +json = "{}" +# create an instance of Model from a JSON string +model_instance = Model.from_json(json) +# print the JSON string representation of the object +print(Model.to_json()) +# convert the object into a dict +model_dict = model_instance.to_dict() +# create an instance of Model from a dict +model_from_dict = Model.from_dict(model_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ModelFirmware.md b/docs/ModelFirmware.md new file mode 100644 index 0000000..84454b5 --- /dev/null +++ b/docs/ModelFirmware.md @@ -0,0 +1,48 @@ +# ModelFirmware + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**os_version** | **str** | Operating-system version of this build. Pass it as `osVersion` when you create an instance. | +**os_build** | **str** | Build identifier of this version. Pass it as `osBuild` (together with `osVersion`) when you create an instance to get exactly this build. If you pass only `osVersion`, the newest build of that version is used. | +**android_flavor** | **str** | Android-only flavor. | [optional] +**api_version** | **str** | Android-only API version. | [optional] +**sha256sum** | **str** | SHA-256 checksum. | [optional] +**sha1sum** | **str** | SHA-1 checksum. | [optional] +**md5sum** | **str** | MD5 checksum. | [optional] +**corellium_checksum** | **str** | Corellium checksum, in the form algorithm$chunkSize$checksum. Absent for a domain upload. | [optional] +**installed** | **bool** | Whether this build is already stored on your Corellium deployment. A build that is not installed can only be used if your deployment is allowed to fetch it from the vendor; an air-gapped deployment can use only installed builds. | [optional] +**size** | **float** | Software size in bytes. | [optional] +**unique_id** | **str** | A label chosen by whoever packaged this firmware. It is not guaranteed to be unique and cannot be used to look up an image or firmware; select a build with `osVersion` and `osBuild` instead. | [optional] +**metadata** | **Dict[str, Optional[object]]** | Software metadata. | [optional] +**release_date** | **datetime** | Release date. | [optional] +**upload_date** | **str** | Date uploaded; may be an empty string when unknown. | [optional] +**url** | **str** | URL the software is available at. | [optional] +**orig_url** | **str** | URL the software is available at from the vendor. | [optional] +**filename** | **str** | Software filename. | [optional] +**rooted** | **bool** | Whether a device from this firmware is rooted. Android has a rooted and a not-rooted build for each version. Null for iOS. | [optional] +**signed** | **bool** | Whether the vendor still signs this build, from the upstream ipsw data. | [optional] +**springboard_snapshot** | [**ModelFirmwareSpringboardSnapshot**](ModelFirmwareSpringboardSnapshot.md) | | [optional] + +## Example + +```python +from corellium.models.model_firmware import ModelFirmware + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelFirmware from a JSON string +model_firmware_instance = ModelFirmware.from_json(json) +# print the JSON string representation of the object +print(ModelFirmware.to_json()) + +# convert the object into a dict +model_firmware_dict = model_firmware_instance.to_dict() +# create an instance of ModelFirmware from a dict +model_firmware_from_dict = ModelFirmware.from_dict(model_firmware_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelFirmwareSpringboardSnapshot.md b/docs/ModelFirmwareSpringboardSnapshot.md new file mode 100644 index 0000000..1023b50 --- /dev/null +++ b/docs/ModelFirmwareSpringboardSnapshot.md @@ -0,0 +1,30 @@ +# ModelFirmwareSpringboardSnapshot + +Rapid-start snapshot for this build, if one exists. Divide a listed size by the partition block size to get the block count. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**volumes** | [**List[ModelFirmwareSpringboardSnapshotVolumesInner]**](ModelFirmwareSpringboardSnapshotVolumesInner.md) | | + +## Example + +```python +from corellium.models.model_firmware_springboard_snapshot import ModelFirmwareSpringboardSnapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelFirmwareSpringboardSnapshot from a JSON string +model_firmware_springboard_snapshot_instance = ModelFirmwareSpringboardSnapshot.from_json(json) +# print the JSON string representation of the object +print(ModelFirmwareSpringboardSnapshot.to_json()) + +# convert the object into a dict +model_firmware_springboard_snapshot_dict = model_firmware_springboard_snapshot_instance.to_dict() +# create an instance of ModelFirmwareSpringboardSnapshot from a dict +model_firmware_springboard_snapshot_from_dict = ModelFirmwareSpringboardSnapshot.from_dict(model_firmware_springboard_snapshot_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelFirmwareSpringboardSnapshotVolumesInner.md b/docs/ModelFirmwareSpringboardSnapshotVolumesInner.md new file mode 100644 index 0000000..1e718c7 --- /dev/null +++ b/docs/ModelFirmwareSpringboardSnapshotVolumesInner.md @@ -0,0 +1,29 @@ +# ModelFirmwareSpringboardSnapshotVolumesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nand** | **float** | Snapshotted NAND size in bytes. | + +## Example + +```python +from corellium.models.model_firmware_springboard_snapshot_volumes_inner import ModelFirmwareSpringboardSnapshotVolumesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelFirmwareSpringboardSnapshotVolumesInner from a JSON string +model_firmware_springboard_snapshot_volumes_inner_instance = ModelFirmwareSpringboardSnapshotVolumesInner.from_json(json) +# print the JSON string representation of the object +print(ModelFirmwareSpringboardSnapshotVolumesInner.to_json()) + +# convert the object into a dict +model_firmware_springboard_snapshot_volumes_inner_dict = model_firmware_springboard_snapshot_volumes_inner_instance.to_dict() +# create an instance of ModelFirmwareSpringboardSnapshotVolumesInner from a dict +model_firmware_springboard_snapshot_volumes_inner_from_dict = ModelFirmwareSpringboardSnapshotVolumesInner.from_dict(model_firmware_springboard_snapshot_volumes_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelFrame.md b/docs/ModelFrame.md new file mode 100644 index 0000000..aeb0e9c --- /dev/null +++ b/docs/ModelFrame.md @@ -0,0 +1,36 @@ +# ModelFrame + +Bezel geometry, or null when this model has no bezel. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**width** | **float** | Bezel image width. | +**height** | **float** | Bezel image height. | +**inner** | [**ModelRect**](ModelRect.md) | | [optional] +**home** | [**ModelRect**](ModelRect.md) | Home button area within the bezel. | [optional] +**dimensions** | [**ModelFrameDimensions**](ModelFrameDimensions.md) | | [optional] +**scale** | **float** | Display scale factor. | [optional] +**has_image** | **bool** | Whether a bezel image is available for this model. | + +## Example + +```python +from corellium.models.model_frame import ModelFrame + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelFrame from a JSON string +model_frame_instance = ModelFrame.from_json(json) +# print the JSON string representation of the object +print(ModelFrame.to_json()) + +# convert the object into a dict +model_frame_dict = model_frame_instance.to_dict() +# create an instance of ModelFrame from a dict +model_frame_from_dict = ModelFrame.from_dict(model_frame_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelFrameDimensions.md b/docs/ModelFrameDimensions.md new file mode 100644 index 0000000..a7243f2 --- /dev/null +++ b/docs/ModelFrameDimensions.md @@ -0,0 +1,31 @@ +# ModelFrameDimensions + +Native display resolution. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**width** | **float** | Native display width in pixels. | +**height** | **float** | Native display height in pixels. | + +## Example + +```python +from corellium.models.model_frame_dimensions import ModelFrameDimensions + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelFrameDimensions from a JSON string +model_frame_dimensions_instance = ModelFrameDimensions.from_json(json) +# print the JSON string representation of the object +print(ModelFrameDimensions.to_json()) + +# convert the object into a dict +model_frame_dimensions_dict = model_frame_dimensions_instance.to_dict() +# create an instance of ModelFrameDimensions from a dict +model_frame_dimensions_from_dict = ModelFrameDimensions.from_dict(model_frame_dimensions_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelPartition.md b/docs/ModelPartition.md new file mode 100644 index 0000000..4e0a4b6 --- /dev/null +++ b/docs/ModelPartition.md @@ -0,0 +1,36 @@ +# ModelPartition + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Partition name. | +**block_size** | **float** | Block size in bytes. | +**blocks** | **float** | Default size in blocks. | [optional] +**blocks_min** | **float** | Minimum size in blocks. | [optional] +**blocks_max** | **float** | Maximum size in blocks. | [optional] +**blocks_step** | **float** | Block increment between selectable sizes. | [optional] +**block_values** | **List[float]** | Discrete selectable sizes in blocks. | [optional] +**user_uploaded** | **bool** | Whether this partition can be replaced by a user-supplied image. | [optional] + +## Example + +```python +from corellium.models.model_partition import ModelPartition + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelPartition from a JSON string +model_partition_instance = ModelPartition.from_json(json) +# print the JSON string representation of the object +print(ModelPartition.to_json()) + +# convert the object into a dict +model_partition_dict = model_partition_instance.to_dict() +# create an instance of ModelPartition from a dict +model_partition_from_dict = ModelPartition.from_dict(model_partition_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelProductImage.md b/docs/ModelProductImage.md new file mode 100644 index 0000000..f267454 --- /dev/null +++ b/docs/ModelProductImage.md @@ -0,0 +1,32 @@ +# ModelProductImage + +Product image geometry, or null when this model has none. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**width** | **float** | Product image width. | +**inner** | [**ModelRect**](ModelRect.md) | Screen area within the product image. | [optional] +**has_image** | **bool** | Whether a product image is available for this model. | + +## Example + +```python +from corellium.models.model_product_image import ModelProductImage + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelProductImage from a JSON string +model_product_image_instance = ModelProductImage.from_json(json) +# print the JSON string representation of the object +print(ModelProductImage.to_json()) + +# convert the object into a dict +model_product_image_dict = model_product_image_instance.to_dict() +# create an instance of ModelProductImage from a dict +model_product_image_from_dict = ModelProductImage.from_dict(model_product_image_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelRect.md b/docs/ModelRect.md new file mode 100644 index 0000000..d7887d0 --- /dev/null +++ b/docs/ModelRect.md @@ -0,0 +1,34 @@ +# ModelRect + +Screen area within the bezel. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**top** | **float** | Offset from the top edge. | +**left** | **float** | Offset from the left edge. | +**width** | **float** | Width. | +**height** | **float** | Height. | +**radius** | **float** | Corner radius, as a fraction of the width. | [optional] + +## Example + +```python +from corellium.models.model_rect import ModelRect + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelRect from a JSON string +model_rect_instance = ModelRect.from_json(json) +# print the JSON string representation of the object +print(ModelRect.to_json()) + +# convert the object into a dict +model_rect_dict = model_rect_instance.to_dict() +# create an instance of ModelRect from a dict +model_rect_from_dict = ModelRect.from_dict(model_rect_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelSoftware.md b/docs/ModelSoftware.md deleted file mode 100644 index 615afad..0000000 --- a/docs/ModelSoftware.md +++ /dev/null @@ -1,17 +0,0 @@ -# ModelSoftware - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**board_config** | **str** | | [optional] -**platform** | **str** | | [optional] -**cpid** | **float** | | [optional] -**bdid** | **float** | | [optional] -**firmwares** | [**list[Firmware]**](Firmware.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ModelSoftwareV1.md b/docs/ModelSoftwareV1.md new file mode 100644 index 0000000..7378e87 --- /dev/null +++ b/docs/ModelSoftwareV1.md @@ -0,0 +1,35 @@ +# ModelSoftwareV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**board_config** | **str** | | [optional] +**platform** | **str** | | [optional] +**cpid** | **float** | | [optional] +**bdid** | **float** | | [optional] +**firmwares** | [**List[FirmwareV1]**](FirmwareV1.md) | | [optional] + +## Example + +```python +from corellium.models.model_software_v1 import ModelSoftwareV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelSoftwareV1 from a JSON string +model_software_v1_instance = ModelSoftwareV1.from_json(json) +# print the JSON string representation of the object +print(ModelSoftwareV1.to_json()) + +# convert the object into a dict +model_software_v1_dict = model_software_v1_instance.to_dict() +# create an instance of ModelSoftwareV1 from a dict +model_software_v1_from_dict = ModelSoftwareV1.from_dict(model_software_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelV1.md b/docs/ModelV1.md new file mode 100644 index 0000000..fe26e15 --- /dev/null +++ b/docs/ModelV1.md @@ -0,0 +1,39 @@ +# ModelV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**name** | **str** | | +**flavor** | **str** | | +**description** | **str** | | [optional] +**model** | **str** | | +**board_config** | **str** | | [optional] +**platform** | **str** | | [optional] +**cpid** | **float** | | [optional] +**bdid** | **float** | | [optional] +**peripherals** | **bool** | | [optional] + +## Example + +```python +from corellium.models.model_v1 import ModelV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ModelV1 from a JSON string +model_v1_instance = ModelV1.from_json(json) +# print the JSON string representation of the object +print(ModelV1.to_json()) + +# convert the object into a dict +model_v1_dict = model_v1_instance.to_dict() +# create an instance of ModelV1 from a dict +model_v1_from_dict = ModelV1.from_dict(model_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ModelsApi.md b/docs/ModelsApi.md new file mode 100644 index 0000000..f89483d --- /dev/null +++ b/docs/ModelsApi.md @@ -0,0 +1,222 @@ +# corellium.ModelsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_get_model_software**](ModelsApi.md#v3_get_model_software) | **GET** /v3/models/{model}/software | List software for a model +[**v3_get_models**](ModelsApi.md#v3_get_models) | **GET** /v3/models | List device models + + +# **v3_get_model_software** +> List[ModelFirmware] v3_get_model_software(model) + +List software for a model + +Lists the operating-system builds you can install on a new instance of one model. Identify the model by its flavor ID (for example `iphone17a`) or its product identifier. Each entry's `osVersion` and `osBuild` are the values to pass to `POST /v3/instances`. + +**Where the list comes from.** It includes vendor builds the platform supports for this model (for example public iOS releases), firmware installed cluster-wide with `POST /v3/images/install-firmware`, and firmware uploaded at domain level with `POST /v3/images` (no `projectId` or `instanceId`). It does **not** include images that belong to a project or instance; to boot one of those, reference it explicitly when creating the instance. + +**Choosing a build.** +- `installed: true` builds are already on your deployment and start fastest. Others are downloaded when first used. +- On Android there are usually two builds per version; `rooted` tells them apart. MATRIX needs the rooted build. +- `springboardSnapshot` present means the build supports rapid start. + +Returns 404 if the model is unknown or has no software. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.model_firmware import ModelFirmware +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ModelsApi(api_client) + model = 'iphone17a' # str | Which model to list software for: a flavor ID (the `flavor` value from `v3GetModels`, for example \"iphone17a\") or a product identifier such as \"iPhone18,4\". Only a flavor ID returns `springboardSnapshot`. + + try: + # List software for a model + api_response = api_instance.v3_get_model_software(model) + print("The response of ModelsApi->v3_get_model_software:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ModelsApi->v3_get_model_software: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **model** | **str**| Which model to list software for: a flavor ID (the `flavor` value from `v3GetModels`, for example \"iphone17a\") or a product identifier such as \"iPhone18,4\". Only a flavor ID returns `springboardSnapshot`. | + +### Return type + +[**List[ModelFirmware]**](ModelFirmware.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Supported software loads for this model. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No software found for the given model. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_models** +> List[Model] v3_get_models(if_none_match=if_none_match) + +List device models + +Lists every device model you can create an instance of. Call it first when creating a device: pick a model, then list its software with `v3GetModelSoftware`, then create the instance with `POST /v3/instances`. + +The list only includes models your account can use. iOS models are left out if iOS is disabled for your domain, models from vendors your domain has not enabled are left out, and beta models appear only on deployments that allow them. + +Each entry tells you what you need to create a valid instance: +- `flavor`: the value to pass as `flavor` when creating the instance. +- `cores`, `coresMin`, `coresMax`, `coresStep`, `coresAllowed`: which CPU core counts are allowed. +- `ram`, `ramMin`, `ramMax`: allowed memory, in MiB. +- `hasSoftware`: false means there is no operating system available for this model yet, so an instance cannot be created from a standard build. +- `mast`: whether MATRIX assessments work on it. + +**Caching.** The response carries an `ETag` header. Send it back as `If-None-Match` on later calls; if nothing has changed you get 304 with no body and can reuse your copy. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.model import Model +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ModelsApi(api_client) + if_none_match = '\"20184446fd197a424d5221fc7bfcd0084414c4b1ba822cac6f8f2221ebc80d06\"' # str | An ETag a previous response carried, quotes included. (optional) + + try: + # List device models + api_response = api_instance.v3_get_models(if_none_match=if_none_match) + print("The response of ModelsApi->v3_get_models:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ModelsApi->v3_get_models: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **if_none_match** | **str**| An ETag a previous response carried, quotes included. | [optional] + +### Return type + +[**List[Model]**](Model.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Supported device configurations. | * ETag - Entity tag for this body. Send it back unchanged as `If-None-Match` to make the next request conditional.
| +**304** | The resource is unchanged since the ETag given in If-None-Match. | * ETag - Entity tag for this body. Send it back unchanged as `If-None-Match` to make the next request conditional.
| +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ModelsV1Api.md b/docs/ModelsV1Api.md new file mode 100644 index 0000000..856038c --- /dev/null +++ b/docs/ModelsV1Api.md @@ -0,0 +1,188 @@ +# corellium.ModelsV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_get_model_software**](ModelsV1Api.md#v1_get_model_software) | **GET** /v1/models/{model}/software | Get Software for Model +[**v1_get_models**](ModelsV1Api.md#v1_get_models) | **GET** /v1/models | Get Supported Models + + +# **v1_get_model_software** +> List[FirmwareV1] v1_get_model_software(model) + +Get Software for Model + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.firmware_v1 import FirmwareV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ModelsV1Api(api_client) + model = 'model_example' # str | Model to list available software for + + try: + # Get Software for Model + api_response = api_instance.v1_get_model_software(model) + print("The response of ModelsV1Api->v1_get_model_software:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ModelsV1Api->v1_get_model_software: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **model** | **str**| Model to list available software for | + +### Return type + +[**List[FirmwareV1]**](FirmwareV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Supported software loads for this model | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_models** +> List[ModelV1] v1_get_models() + +Get Supported Models + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.model_v1 import ModelV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ModelsV1Api(api_client) + + try: + # Get Supported Models + api_response = api_instance.v1_get_models() + print("The response of ModelsV1Api->v1_get_models:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ModelsV1Api->v1_get_models: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[ModelV1]**](ModelV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Supported device configurations | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/NetConnectApi.md b/docs/NetConnectApi.md new file mode 100644 index 0000000..31824ff --- /dev/null +++ b/docs/NetConnectApi.md @@ -0,0 +1,702 @@ +# corellium.NetConnectApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_network_connection**](NetConnectApi.md#v3_create_network_connection) | **POST** /v3/network/connections | Create a new Network Connection +[**v3_delete_network_connection**](NetConnectApi.md#v3_delete_network_connection) | **DELETE** /v3/network/connections/{id} | Delete an existing Network Connection +[**v3_get_network_connection**](NetConnectApi.md#v3_get_network_connection) | **GET** /v3/network/connections/{id} | Fetch an existing Network Connection +[**v3_list_network_connections**](NetConnectApi.md#v3_list_network_connections) | **GET** /v3/network/connections | List available network connections +[**v3_list_network_interfaces**](NetConnectApi.md#v3_list_network_interfaces) | **GET** /v3/network/interfaces | List available physical network interfaces +[**v3_list_network_providers**](NetConnectApi.md#v3_list_network_providers) | **GET** /v3/network/providers | List available network providers +[**v3_partial_update_network_connection**](NetConnectApi.md#v3_partial_update_network_connection) | **PATCH** /v3/network/connections/{id} | Update Network Connection (patch) +[**v3_update_network_connection**](NetConnectApi.md#v3_update_network_connection) | **PUT** /v3/network/connections/{id} | Update Network Connection + + +# **v3_create_network_connection** +> List[ProviderNetworkConnection] v3_create_network_connection(create_network_connection_body) + +Create a new Network Connection + +Creates a network connection that projects can route their outbound device traffic through. Pick a provider type from `v3ListNetworkProviders` and supply its settings; for a VLAN, pick a physical interface from `v3ListNetworkInterfaces`. VLAN networks are only supported in bridged networking mode. Afterwards, attach it to a project by setting the project's `settings.connection`. You must have the domain administrator role to create a network connection. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_network_connection_body import CreateNetworkConnectionBody +from corellium.models.provider_network_connection import ProviderNetworkConnection +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectApi(api_client) + create_network_connection_body = corellium.CreateNetworkConnectionBody() # CreateNetworkConnectionBody | + + try: + # Create a new Network Connection + api_response = api_instance.v3_create_network_connection(create_network_connection_body) + print("The response of NetConnectApi->v3_create_network_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectApi->v3_create_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_network_connection_body** | [**CreateNetworkConnectionBody**](CreateNetworkConnectionBody.md)| | + +### Return type + +[**List[ProviderNetworkConnection]**](ProviderNetworkConnection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_network_connection** +> v3_delete_network_connection(id, v3_delete_network_connection_request=v3_delete_network_connection_request) + +Delete an existing Network Connection + +Delete an existing Network Connection. You must have the domain administrator role to delete a +network connection. + +Deletes are idempotent: an unknown `id`, or a connection that was already deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. +A connection still attached to projects returns 400 unless `force` is set. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.v3_delete_network_connection_request import V3DeleteNetworkConnectionRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectApi(api_client) + id = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' # str | Network Connection Identifier. + v3_delete_network_connection_request = corellium.V3DeleteNetworkConnectionRequest() # V3DeleteNetworkConnectionRequest | (optional) + + try: + # Delete an existing Network Connection + api_instance.v3_delete_network_connection(id, v3_delete_network_connection_request=v3_delete_network_connection_request) + except Exception as e: + print("Exception when calling NetConnectApi->v3_delete_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Network Connection Identifier. | + **v3_delete_network_connection_request** | [**V3DeleteNetworkConnectionRequest**](V3DeleteNetworkConnectionRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The network connection is still in use by one or more projects. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_network_connection** +> ProviderNetworkConnection v3_get_network_connection(id) + +Fetch an existing Network Connection + +Returns one network connection: its settings and, for each project using it, the connection's current state there. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN. You must have the domain administrator or project administrator role to fetch a network connection. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.provider_network_connection import ProviderNetworkConnection +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectApi(api_client) + id = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' # str | Network Connection Identifier. + + try: + # Fetch an existing Network Connection + api_response = api_instance.v3_get_network_connection(id) + print("The response of NetConnectApi->v3_get_network_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectApi->v3_get_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Network Connection Identifier. | + +### Return type + +[**ProviderNetworkConnection**](ProviderNetworkConnection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | The resource does not exist, or you cannot see it. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_network_connections** +> NetworkConnections v3_list_network_connections(limit=limit, offset=offset) + +List available network connections + +Lists the network connections set up in your domain. A network connection routes a project's outbound device traffic through a network you control, such as a VPN or a VLAN; a project uses one when its `settings.connection` is set to the connection's ID (see `PATCH /v3/projects/{projectId}`). You must have the domain administrator or project administrator role to list network connections. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_connections import NetworkConnections +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List available network connections + api_response = api_instance.v3_list_network_connections(limit=limit, offset=offset) + print("The response of NetConnectApi->v3_list_network_connections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectApi->v3_list_network_connections: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**NetworkConnections**](NetworkConnections.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_network_interfaces** +> NetworkInterfaces v3_list_network_interfaces(limit=limit, offset=offset) + +List available physical network interfaces + +Lists the physical network ports on the server that can carry a VLAN network connection. Use one of these names when creating a VLAN connection. You must have the domain administrator role to list network interfaces. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_interfaces import NetworkInterfaces +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List available physical network interfaces + api_response = api_instance.v3_list_network_interfaces(limit=limit, offset=offset) + print("The response of NetConnectApi->v3_list_network_interfaces:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectApi->v3_list_network_interfaces: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**NetworkInterfaces**](NetworkInterfaces.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_network_providers** +> NetworkConnectionProviders v3_list_network_providers(limit=limit, offset=offset) + +List available network providers + +Provides a list of registered network providers to be used when creating network connections via [`createNetworkConnection`](#tag/netconnect/POST/v3/network/connections). You must have the domain administrator role to list network providers. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_connection_providers import NetworkConnectionProviders +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List available network providers + api_response = api_instance.v3_list_network_providers(limit=limit, offset=offset) + print("The response of NetConnectApi->v3_list_network_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectApi->v3_list_network_providers: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**NetworkConnectionProviders**](NetworkConnectionProviders.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_partial_update_network_connection** +> ProviderNetworkConnection v3_partial_update_network_connection(id, partial_update_network_connection_body=partial_update_network_connection_body) + +Update Network Connection (patch) + +Only updates the specified attributes. You must have the domain administrator role to update a network connection. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.partial_update_network_connection_body import PartialUpdateNetworkConnectionBody +from corellium.models.provider_network_connection import ProviderNetworkConnection +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectApi(api_client) + id = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' # str | Network Connection Identifier. + partial_update_network_connection_body = corellium.PartialUpdateNetworkConnectionBody() # PartialUpdateNetworkConnectionBody | (optional) + + try: + # Update Network Connection (patch) + api_response = api_instance.v3_partial_update_network_connection(id, partial_update_network_connection_body=partial_update_network_connection_body) + print("The response of NetConnectApi->v3_partial_update_network_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectApi->v3_partial_update_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Network Connection Identifier. | + **partial_update_network_connection_body** | [**PartialUpdateNetworkConnectionBody**](PartialUpdateNetworkConnectionBody.md)| | [optional] + +### Return type + +[**ProviderNetworkConnection**](ProviderNetworkConnection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_update_network_connection** +> ProviderNetworkConnection v3_update_network_connection(id, update_network_connection_body) + +Update Network Connection + +Replaces all of a network connection's settings. To change only some of them, use `v3PartialUpdateNetworkConnection`. You must have the domain administrator role to update a network connection. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.provider_network_connection import ProviderNetworkConnection +from corellium.models.update_network_connection_body import UpdateNetworkConnectionBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectApi(api_client) + id = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' # str | Network Connection Identifier. + update_network_connection_body = corellium.UpdateNetworkConnectionBody() # UpdateNetworkConnectionBody | + + try: + # Update Network Connection + api_response = api_instance.v3_update_network_connection(id, update_network_connection_body) + print("The response of NetConnectApi->v3_update_network_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectApi->v3_update_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Network Connection Identifier. | + **update_network_connection_body** | [**UpdateNetworkConnectionBody**](UpdateNetworkConnectionBody.md)| | + +### Return type + +[**ProviderNetworkConnection**](ProviderNetworkConnection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/NetConnectV1Api.md b/docs/NetConnectV1Api.md new file mode 100644 index 0000000..534e9a3 --- /dev/null +++ b/docs/NetConnectV1Api.md @@ -0,0 +1,697 @@ +# corellium.NetConnectV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_create_network_connection**](NetConnectV1Api.md#v1_create_network_connection) | **POST** /v1/network/connections | Create a new Network Connection +[**v1_delete_network_connection**](NetConnectV1Api.md#v1_delete_network_connection) | **DELETE** /v1/network/connections/{id} | Delete an existing Network Connection +[**v1_get_network_connection**](NetConnectV1Api.md#v1_get_network_connection) | **GET** /v1/network/connections/{id} | Return the configuration and per project statuses for a single network provider. +[**v1_list_network_connections**](NetConnectV1Api.md#v1_list_network_connections) | **GET** /v1/network/connections | List available network connections +[**v1_list_network_interfaces**](NetConnectV1Api.md#v1_list_network_interfaces) | **GET** /v1/network/interfaces | List available physical network interfaces +[**v1_list_network_providers**](NetConnectV1Api.md#v1_list_network_providers) | **GET** /v1/network/providers | List available network providers +[**v1_partial_update_network_connection**](NetConnectV1Api.md#v1_partial_update_network_connection) | **PATCH** /v1/network/connections/{id} | Update Network Connection (partial) +[**v1_update_network_connection**](NetConnectV1Api.md#v1_update_network_connection) | **PUT** /v1/network/connections/{id} | Update Network Connection + + +# **v1_create_network_connection** +> NetworkConnection v1_create_network_connection(create_network_connection_options) + +Create a new Network Connection + +You must have the domain administrator role to create a network connection. +VLAN networks are only supported in bridged networking mode. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_network_connection_options import CreateNetworkConnectionOptions +from corellium.models.network_connection import NetworkConnection +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectV1Api(api_client) + create_network_connection_options = { + "provider": "openvpn", + "name": "My OpenVPN Connection", + "config": { + "config": "client\ndev tun\nproto tcp\nremote my-server-1 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nremote-cert-tls server\ntls-auth ta.key 1\ncipher AES-256-CBC\nverb 3\n" + } +} # CreateNetworkConnectionOptions | Network Connection Options + + try: + # Create a new Network Connection + api_response = api_instance.v1_create_network_connection(create_network_connection_options) + print("The response of NetConnectV1Api->v1_create_network_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectV1Api->v1_create_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_network_connection_options** | [**CreateNetworkConnectionOptions**](CreateNetworkConnectionOptions.md)| Network Connection Options | + +### Return type + +[**NetworkConnection**](NetworkConnection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_network_connection** +> v1_delete_network_connection(id, delete_network_connection_options=delete_network_connection_options) + +Delete an existing Network Connection + +You must have the domain administrator role to delete a network connection. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.delete_network_connection_options import DeleteNetworkConnectionOptions +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectV1Api(api_client) + id = 'id_example' # str | Network Connection Identifier - uuid + delete_network_connection_options = corellium.DeleteNetworkConnectionOptions() # DeleteNetworkConnectionOptions | Delete options (optional) + + try: + # Delete an existing Network Connection + api_instance.v1_delete_network_connection(id, delete_network_connection_options=delete_network_connection_options) + except Exception as e: + print("Exception when calling NetConnectV1Api->v1_delete_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Network Connection Identifier - uuid | + **delete_network_connection_options** | [**DeleteNetworkConnectionOptions**](DeleteNetworkConnectionOptions.md)| Delete options | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_network_connection** +> NetworkConnection v1_get_network_connection(id) + +Return the configuration and per project statuses for a single network provider. + +You must have the domain administrator or project administrator role to fetch a network connection. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_connection import NetworkConnection +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectV1Api(api_client) + id = 'id_example' # str | Network Connection Identifier - uuid + + try: + # Return the configuration and per project statuses for a single network provider. + api_response = api_instance.v1_get_network_connection(id) + print("The response of NetConnectV1Api->v1_get_network_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectV1Api->v1_get_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Network Connection Identifier - uuid | + +### Return type + +[**NetworkConnection**](NetworkConnection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_network_connections** +> NetworkConnectionPaginationResult v1_list_network_connections(limit=limit, offset=offset) + +List available network connections + +You must have the domain administrator or project administrator role to list network connections. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_connection_pagination_result import NetworkConnectionPaginationResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectV1Api(api_client) + limit = 3.4 # float | The maximum number of items to return. (optional) + offset = 3.4 # float | The starting index of the items to return. (optional) + + try: + # List available network connections + api_response = api_instance.v1_list_network_connections(limit=limit, offset=offset) + print("The response of NetConnectV1Api->v1_list_network_connections:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectV1Api->v1_list_network_connections: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| The maximum number of items to return. | [optional] + **offset** | **float**| The starting index of the items to return. | [optional] + +### Return type + +[**NetworkConnectionPaginationResult**](NetworkConnectionPaginationResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_network_interfaces** +> List[str] v1_list_network_interfaces() + +List available physical network interfaces + +Lists available physical network interfaces that can be used for VLAN configuration. You must have the domain administrator role to list network interfaces. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectV1Api(api_client) + + try: + # List available physical network interfaces + api_response = api_instance.v1_list_network_interfaces() + print("The response of NetConnectV1Api->v1_list_network_interfaces:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectV1Api->v1_list_network_interfaces: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**List[str]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_network_providers** +> NetworkConnectionProviderPaginationResult v1_list_network_providers() + +List available network providers + +Provides a list of registered network providers to be used when [creating network connections](#post-/v1/network/connections). You +must have the domain administrator role to list network providers. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_connection_provider_pagination_result import NetworkConnectionProviderPaginationResult +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectV1Api(api_client) + + try: + # List available network providers + api_response = api_instance.v1_list_network_providers() + print("The response of NetConnectV1Api->v1_list_network_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectV1Api->v1_list_network_providers: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**NetworkConnectionProviderPaginationResult**](NetworkConnectionProviderPaginationResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_partial_update_network_connection** +> NetworkConnection v1_partial_update_network_connection(id, partial_update_network_connection_options) + +Update Network Connection (partial) + +Only updates the specified attributes. You must have the domain administrator role to update a network connection. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_connection import NetworkConnection +from corellium.models.partial_update_network_connection_options import PartialUpdateNetworkConnectionOptions +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectV1Api(api_client) + id = 'id_example' # str | Network Connection Identifier - uuid + partial_update_network_connection_options = { + "name": "My Renamed OpenVPN Connection" +} # PartialUpdateNetworkConnectionOptions | Network Connection Options + + try: + # Update Network Connection (partial) + api_response = api_instance.v1_partial_update_network_connection(id, partial_update_network_connection_options) + print("The response of NetConnectV1Api->v1_partial_update_network_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectV1Api->v1_partial_update_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Network Connection Identifier - uuid | + **partial_update_network_connection_options** | [**PartialUpdateNetworkConnectionOptions**](PartialUpdateNetworkConnectionOptions.md)| Network Connection Options | + +### Return type + +[**NetworkConnection**](NetworkConnection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_network_connection** +> NetworkConnection v1_update_network_connection(id, update_network_connection_options) + +Update Network Connection + +You must have the domain administrator role to update a network connection. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_connection import NetworkConnection +from corellium.models.update_network_connection_options import UpdateNetworkConnectionOptions +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.NetConnectV1Api(api_client) + id = 'id_example' # str | Network Connection Identifier - uuid + update_network_connection_options = { + "type": "openvpn", + "name": "My Renamed OpenVPN Connection", + "config": { + "config": "client\ndev tun\nproto tcp\nremote my-server-1 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nremote-cert-tls server\ntls-auth ta.key 1\ncipher AES-256-CBC\nverb 3\n" + } +} # UpdateNetworkConnectionOptions | Network Connection Options + + try: + # Update Network Connection + api_response = api_instance.v1_update_network_connection(id, update_network_connection_options) + print("The response of NetConnectV1Api->v1_update_network_connection:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetConnectV1Api->v1_update_network_connection: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Network Connection Identifier - uuid | + **update_network_connection_options** | [**UpdateNetworkConnectionOptions**](UpdateNetworkConnectionOptions.md)| Network Connection Options | + +### Return type + +[**NetworkConnection**](NetworkConnection.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/NetMonProcMapFilter.md b/docs/NetMonProcMapFilter.md deleted file mode 100644 index 351422b..0000000 --- a/docs/NetMonProcMapFilter.md +++ /dev/null @@ -1,17 +0,0 @@ -# NetMonProcMapFilter - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**port_ranges** | **list[str]** | | [optional] -**src_ports** | **list[str]** | | [optional] -**dst_ports** | **list[str]** | | [optional] -**ports** | **list[str]** | | [optional] -**protocols** | **list[str]** | | [optional] -**processes** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NetdumpFilter.md b/docs/NetdumpFilter.md index 66f34ca..2061b5d 100644 --- a/docs/NetdumpFilter.md +++ b/docs/NetdumpFilter.md @@ -3,15 +3,34 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**port_ranges** | **list[str]** | | [optional] -**src_ports** | **list[str]** | | [optional] -**dst_ports** | **list[str]** | | [optional] -**ports** | **list[str]** | | [optional] -**protocols** | **list[str]** | | [optional] -**processes** | **list[str]** | | [optional] +**port_ranges** | **List[str]** | | [optional] +**src_ports** | **List[str]** | | [optional] +**dst_ports** | **List[str]** | | [optional] +**ports** | **List[str]** | | [optional] +**protocols** | **List[str]** | | [optional] +**processes** | **List[str]** | | [optional] +**hosts** | **List[str]** | | [optional] + +## Example + +```python +from corellium.models.netdump_filter import NetdumpFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of NetdumpFilter from a JSON string +netdump_filter_instance = NetdumpFilter.from_json(json) +# print the JSON string representation of the object +print(NetdumpFilter.to_json()) +# convert the object into a dict +netdump_filter_dict = netdump_filter_instance.to_dict() +# create an instance of NetdumpFilter from a dict +netdump_filter_from_dict = NetdumpFilter.from_dict(netdump_filter_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NetworkConnection.md b/docs/NetworkConnection.md index a473371..fa5f58d 100644 --- a/docs/NetworkConnection.md +++ b/docs/NetworkConnection.md @@ -1,20 +1,38 @@ # NetworkConnection - +Provider-discriminated network connection response. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **identifier** | **str** | UUIDv4 | -**provider** | **str** | One of the registered [network provider types](#get-/v1/network/providers) | +**provider** | **str** | Type of network connection. | **name** | **str** | User specified name for this network connection. e.g., \"My Network Connection\" | -**config** | **object** | An object containing network connection configuration data. Will vary based on network provider type. | -**projects** | [**list[ProjectNetworkState]**](ProjectNetworkState.md) | An object where the keys are project IDs and the values are {@link ProjectNetworkState} objects representing the state of each project. | [optional] +**config** | [**VLANConfigV1**](VLANConfigV1.md) | | [optional] +**projects** | [**Dict[str, ProjectNetworkState]**](ProjectNetworkState.md) | An object where the keys are project IDs and the values are {@link ProjectNetworkState} objects representing the state of each project. | [optional] **created_at** | **str** | Created Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" | **updated_at** | **str** | Updated Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" | **created_by** | **str** | UUIDv4 of the user who created this record. | **updated_by** | **str** | UUIDv4 of the user who last updated this record. | +## Example + +```python +from corellium.models.network_connection import NetworkConnection + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkConnection from a JSON string +network_connection_instance = NetworkConnection.from_json(json) +# print the JSON string representation of the object +print(NetworkConnection.to_json()) + +# convert the object into a dict +network_connection_dict = network_connection_instance.to_dict() +# create an instance of NetworkConnection from a dict +network_connection_from_dict = NetworkConnection.from_dict(network_connection_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NetworkConnectionConfig.md b/docs/NetworkConnectionConfig.md new file mode 100644 index 0000000..ea9e682 --- /dev/null +++ b/docs/NetworkConnectionConfig.md @@ -0,0 +1,38 @@ +# NetworkConnectionConfig + +Additional network configuration based on selected provider. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | Username for OpenVPN connection. | [optional] +**password** | **str** | Password for OpenVPN connection. | [optional] +**config** | **str** | OpenVPN connection configuration. | +**physical_interface** | **str** | Physical network interface to create VLAN on | +**vlan_id** | **float** | VLAN ID (1-4094) | +**dhcp_mode** | **str** | DHCP server mode | +**gateway** | **str** | Gateway IP address | [optional] +**network** | **str** | Network address | [optional] +**dns_servers** | **List[str]** | List of DNS servers | [optional] + +## Example + +```python +from corellium.models.network_connection_config import NetworkConnectionConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkConnectionConfig from a JSON string +network_connection_config_instance = NetworkConnectionConfig.from_json(json) +# print the JSON string representation of the object +print(NetworkConnectionConfig.to_json()) + +# convert the object into a dict +network_connection_config_dict = network_connection_config_instance.to_dict() +# create an instance of NetworkConnectionConfig from a dict +network_connection_config_from_dict = NetworkConnectionConfig.from_dict(network_connection_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkConnectionOffsetPaginationResult.md b/docs/NetworkConnectionOffsetPaginationResult.md deleted file mode 100644 index 5483ad1..0000000 --- a/docs/NetworkConnectionOffsetPaginationResult.md +++ /dev/null @@ -1,16 +0,0 @@ -# NetworkConnectionOffsetPaginationResult - -Network Connection Offset Pagination Result - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total number of items. | -**count** | **float** | The number of items returned in this result. | -**limit** | **float** | The maximum number of items that could be returned for this result. | -**offset** | **float** | That starting item 0-indexed. | -**results** | [**list[NetworkConnection]**](NetworkConnection.md) | Array of network connections associated with this domain. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NetworkConnectionPaginationResult.md b/docs/NetworkConnectionPaginationResult.md new file mode 100644 index 0000000..63e3b24 --- /dev/null +++ b/docs/NetworkConnectionPaginationResult.md @@ -0,0 +1,35 @@ +# NetworkConnectionPaginationResult + +Network Connection Pagination Result + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total number of items. | +**count** | **float** | The number of items returned in this result. | +**limit** | **float** | The maximum number of items that could be returned for this result. | +**offset** | **float** | That starting item 0-indexed. | +**has_more** | **bool** | Whether or not there are more results to fetch. | +**results** | [**List[NetworkConnection]**](NetworkConnection.md) | Array of network connections associated with this domain. | + +## Example + +```python +from corellium.models.network_connection_pagination_result import NetworkConnectionPaginationResult + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkConnectionPaginationResult from a JSON string +network_connection_pagination_result_instance = NetworkConnectionPaginationResult.from_json(json) +# print the JSON string representation of the object +print(NetworkConnectionPaginationResult.to_json()) + +# convert the object into a dict +network_connection_pagination_result_dict = network_connection_pagination_result_instance.to_dict() +# create an instance of NetworkConnectionPaginationResult from a dict +network_connection_pagination_result_from_dict = NetworkConnectionPaginationResult.from_dict(network_connection_pagination_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkConnectionProvider.md b/docs/NetworkConnectionProvider.md index 1c86bc8..b7455b2 100644 --- a/docs/NetworkConnectionProvider.md +++ b/docs/NetworkConnectionProvider.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Human friendly name for Network Connection Provider. | **type** | **str** | Internal identifier for Network Connection Provider. | +## Example + +```python +from corellium.models.network_connection_provider import NetworkConnectionProvider + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkConnectionProvider from a JSON string +network_connection_provider_instance = NetworkConnectionProvider.from_json(json) +# print the JSON string representation of the object +print(NetworkConnectionProvider.to_json()) + +# convert the object into a dict +network_connection_provider_dict = network_connection_provider_instance.to_dict() +# create an instance of NetworkConnectionProvider from a dict +network_connection_provider_from_dict = NetworkConnectionProvider.from_dict(network_connection_provider_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NetworkConnectionProviderOffsetPaginationResult.md b/docs/NetworkConnectionProviderOffsetPaginationResult.md deleted file mode 100644 index 2132204..0000000 --- a/docs/NetworkConnectionProviderOffsetPaginationResult.md +++ /dev/null @@ -1,16 +0,0 @@ -# NetworkConnectionProviderOffsetPaginationResult - -Network Connection Provider Offset Pagination Result - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | Total number of items. | -**count** | **float** | The number of items returned in this result. | -**limit** | **float** | The maximum number of items that could be returned for this result. | -**offset** | **float** | That starting item 0-indexed. | -**results** | [**list[NetworkConnectionProvider]**](NetworkConnectionProvider.md) | Array of network connection providers. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/NetworkConnectionProviderPaginationResult.md b/docs/NetworkConnectionProviderPaginationResult.md new file mode 100644 index 0000000..6074ec7 --- /dev/null +++ b/docs/NetworkConnectionProviderPaginationResult.md @@ -0,0 +1,34 @@ +# NetworkConnectionProviderPaginationResult + +Network Connection Provider Pagination Result + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total number of items. | +**count** | **float** | The number of items returned in this result. | +**limit** | **float** | The maximum number of items that could be returned for this result. | +**offset** | **float** | That starting item 0-indexed. | +**results** | [**List[NetworkConnectionProvider]**](NetworkConnectionProvider.md) | Array of network connection providers. | + +## Example + +```python +from corellium.models.network_connection_provider_pagination_result import NetworkConnectionProviderPaginationResult + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkConnectionProviderPaginationResult from a JSON string +network_connection_provider_pagination_result_instance = NetworkConnectionProviderPaginationResult.from_json(json) +# print the JSON string representation of the object +print(NetworkConnectionProviderPaginationResult.to_json()) + +# convert the object into a dict +network_connection_provider_pagination_result_dict = network_connection_provider_pagination_result_instance.to_dict() +# create an instance of NetworkConnectionProviderPaginationResult from a dict +network_connection_provider_pagination_result_from_dict = NetworkConnectionProviderPaginationResult.from_dict(network_connection_provider_pagination_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkConnectionProviders.md b/docs/NetworkConnectionProviders.md new file mode 100644 index 0000000..5752034 --- /dev/null +++ b/docs/NetworkConnectionProviders.md @@ -0,0 +1,34 @@ +# NetworkConnectionProviders + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[NetworkConnectionProvidersResultsInner]**](NetworkConnectionProvidersResultsInner.md) | Network providers | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.network_connection_providers import NetworkConnectionProviders + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkConnectionProviders from a JSON string +network_connection_providers_instance = NetworkConnectionProviders.from_json(json) +# print the JSON string representation of the object +print(NetworkConnectionProviders.to_json()) + +# convert the object into a dict +network_connection_providers_dict = network_connection_providers_instance.to_dict() +# create an instance of NetworkConnectionProviders from a dict +network_connection_providers_from_dict = NetworkConnectionProviders.from_dict(network_connection_providers_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkConnectionProvidersResultsInner.md b/docs/NetworkConnectionProvidersResultsInner.md new file mode 100644 index 0000000..230b309 --- /dev/null +++ b/docs/NetworkConnectionProvidersResultsInner.md @@ -0,0 +1,30 @@ +# NetworkConnectionProvidersResultsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**type** | **str** | | + +## Example + +```python +from corellium.models.network_connection_providers_results_inner import NetworkConnectionProvidersResultsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkConnectionProvidersResultsInner from a JSON string +network_connection_providers_results_inner_instance = NetworkConnectionProvidersResultsInner.from_json(json) +# print the JSON string representation of the object +print(NetworkConnectionProvidersResultsInner.to_json()) + +# convert the object into a dict +network_connection_providers_results_inner_dict = network_connection_providers_results_inner_instance.to_dict() +# create an instance of NetworkConnectionProvidersResultsInner from a dict +network_connection_providers_results_inner_from_dict = NetworkConnectionProvidersResultsInner.from_dict(network_connection_providers_results_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkConnections.md b/docs/NetworkConnections.md new file mode 100644 index 0000000..9ed871c --- /dev/null +++ b/docs/NetworkConnections.md @@ -0,0 +1,34 @@ +# NetworkConnections + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ProviderNetworkConnection]**](ProviderNetworkConnection.md) | Network connections | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.network_connections import NetworkConnections + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkConnections from a JSON string +network_connections_instance = NetworkConnections.from_json(json) +# print the JSON string representation of the object +print(NetworkConnections.to_json()) + +# convert the object into a dict +network_connections_dict = network_connections_instance.to_dict() +# create an instance of NetworkConnections from a dict +network_connections_from_dict = NetworkConnections.from_dict(network_connections_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkInterfaces.md b/docs/NetworkInterfaces.md new file mode 100644 index 0000000..fd7381f --- /dev/null +++ b/docs/NetworkInterfaces.md @@ -0,0 +1,34 @@ +# NetworkInterfaces + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | **List[str]** | Network Interfaces | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.network_interfaces import NetworkInterfaces + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkInterfaces from a JSON string +network_interfaces_instance = NetworkInterfaces.from_json(json) +# print the JSON string representation of the object +print(NetworkInterfaces.to_json()) + +# convert the object into a dict +network_interfaces_dict = network_interfaces_instance.to_dict() +# create an instance of NetworkInterfaces from a dict +network_interfaces_from_dict = NetworkInterfaces.from_dict(network_interfaces_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkSchema.md b/docs/NetworkSchema.md new file mode 100644 index 0000000..6e60043 --- /dev/null +++ b/docs/NetworkSchema.md @@ -0,0 +1,31 @@ +# NetworkSchema + +Network configuration for this node. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**physical_interfaces** | **List[str]** | Physical interfaces. | +**vpns** | [**List[VpnSchema]**](VpnSchema.md) | Active VPN connections. | [optional] + +## Example + +```python +from corellium.models.network_schema import NetworkSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkSchema from a JSON string +network_schema_instance = NetworkSchema.from_json(json) +# print the JSON string representation of the object +print(NetworkSchema.to_json()) + +# convert the object into a dict +network_schema_dict = network_schema_instance.to_dict() +# create an instance of NetworkSchema from a dict +network_schema_from_dict = NetworkSchema.from_dict(network_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkStatus.md b/docs/NetworkStatus.md new file mode 100644 index 0000000..eb8425e --- /dev/null +++ b/docs/NetworkStatus.md @@ -0,0 +1,33 @@ +# NetworkStatus + +Egress network connection status for the project. Omitted when the project has none. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Network provider type (e.g. \"openvpn\"). | [optional] +**name** | **str** | User-defined network connection name. | [optional] +**state** | **str** | Current egress network connection state. | +**details** | **Dict[str, Optional[object]]** | Additional state information, such as the last error. | [optional] + +## Example + +```python +from corellium.models.network_status import NetworkStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkStatus from a JSON string +network_status_instance = NetworkStatus.from_json(json) +# print the JSON string representation of the object +print(NetworkStatus.to_json()) + +# convert the object into a dict +network_status_dict = network_status_instance.to_dict() +# create an instance of NetworkStatus from a dict +network_status_from_dict = NetworkStatus.from_dict(network_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NetworkStatusResponse.md b/docs/NetworkStatusResponse.md index 45da6ac..1780f96 100644 --- a/docs/NetworkStatusResponse.md +++ b/docs/NetworkStatusResponse.md @@ -3,13 +3,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | Network Provider | -**name** | **str** | User defined name | +**type** | **str** | Network Provider. Omitted when no egress network is configured | [optional] +**name** | **str** | User defined name. Omitted when no egress network is configured | [optional] **state** | **str** | Current state of the network connection | -**params** | **object** | Additional state information | +**params** | **object** | Additional state information. Omitted when no egress network is configured | [optional] + +## Example + +```python +from corellium.models.network_status_response import NetworkStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkStatusResponse from a JSON string +network_status_response_instance = NetworkStatusResponse.from_json(json) +# print the JSON string representation of the object +print(NetworkStatusResponse.to_json()) +# convert the object into a dict +network_status_response_dict = network_status_response_instance.to_dict() +# create an instance of NetworkStatusResponse from a dict +network_status_response_from_dict = NetworkStatusResponse.from_dict(network_status_response_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NetworkStatusV1.md b/docs/NetworkStatusV1.md new file mode 100644 index 0000000..9bfd1e4 --- /dev/null +++ b/docs/NetworkStatusV1.md @@ -0,0 +1,32 @@ +# NetworkStatusV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] +**name** | **str** | | [optional] +**state** | **str** | Network State | [optional] + +## Example + +```python +from corellium.models.network_status_v1 import NetworkStatusV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkStatusV1 from a JSON string +network_status_v1_instance = NetworkStatusV1.from_json(json) +# print the JSON string representation of the object +print(NetworkStatusV1.to_json()) + +# convert the object into a dict +network_status_v1_dict = network_status_v1_instance.to_dict() +# create an instance of NetworkStatusV1 from a dict +network_status_v1_from_dict = NetworkStatusV1.from_dict(network_status_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NodeConsoleEndpoint.md b/docs/NodeConsoleEndpoint.md new file mode 100644 index 0000000..3409c9b --- /dev/null +++ b/docs/NodeConsoleEndpoint.md @@ -0,0 +1,29 @@ +# NodeConsoleEndpoint + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Console WebSocket URL. | + +## Example + +```python +from corellium.models.node_console_endpoint import NodeConsoleEndpoint + +# TODO update the JSON string below +json = "{}" +# create an instance of NodeConsoleEndpoint from a JSON string +node_console_endpoint_instance = NodeConsoleEndpoint.from_json(json) +# print the JSON string representation of the object +print(NodeConsoleEndpoint.to_json()) + +# convert the object into a dict +node_console_endpoint_dict = node_console_endpoint_instance.to_dict() +# create an instance of NodeConsoleEndpoint from a dict +node_console_endpoint_from_dict = NodeConsoleEndpoint.from_dict(node_console_endpoint_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NodeInformation.md b/docs/NodeInformation.md index 85c92db..4a16fd2 100644 --- a/docs/NodeInformation.md +++ b/docs/NodeInformation.md @@ -1,16 +1,33 @@ # NodeInformation - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**node_id** | **str** | Unique identifier for the node | -**address** | **str** | IP address of the node | -**hostname** | **str** | Hostname of the node | -**ssh_port** | **float** | SSH port for the node | [optional] -**node_types** | **list[str]** | Types of services running on this node [compute,controller,gpu] | +**node_id** | **str** | Unique identifier for the node. | +**address** | **str** | IP address of the node. | +**hostname** | **str** | Hostname of the node. | +**ssh_port** | **float** | SSH port for the node (1-65535), or null if unavailable. | +**node_types** | **List[str]** | Types of services running on this node. | + +## Example + +```python +from corellium.models.node_information import NodeInformation + +# TODO update the JSON string below +json = "{}" +# create an instance of NodeInformation from a JSON string +node_information_instance = NodeInformation.from_json(json) +# print the JSON string representation of the object +print(NodeInformation.to_json()) +# convert the object into a dict +node_information_dict = node_information_instance.to_dict() +# create an instance of NodeInformation from a dict +node_information_from_dict = NodeInformation.from_dict(node_information_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NodeInformationV1.md b/docs/NodeInformationV1.md new file mode 100644 index 0000000..c463068 --- /dev/null +++ b/docs/NodeInformationV1.md @@ -0,0 +1,34 @@ +# NodeInformationV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**node_id** | **str** | Unique identifier for the node | +**address** | **str** | IP address of the node | +**hostname** | **str** | Hostname of the node | +**ssh_port** | **float** | SSH port for the node | [optional] +**node_types** | **List[str]** | Types of services running on this node [compute,controller,gpu] | + +## Example + +```python +from corellium.models.node_information_v1 import NodeInformationV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of NodeInformationV1 from a JSON string +node_information_v1_instance = NodeInformationV1.from_json(json) +# print the JSON string representation of the object +print(NodeInformationV1.to_json()) + +# convert the object into a dict +node_information_v1_dict = node_information_v1_instance.to_dict() +# create an instance of NodeInformationV1 from a dict +node_information_v1_from_dict = NodeInformationV1.from_dict(node_information_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NodeList.md b/docs/NodeList.md new file mode 100644 index 0000000..1bda4e5 --- /dev/null +++ b/docs/NodeList.md @@ -0,0 +1,34 @@ +# NodeList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[NodeInformation]**](NodeInformation.md) | List of cluster nodes. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.node_list import NodeList + +# TODO update the JSON string below +json = "{}" +# create an instance of NodeList from a JSON string +node_list_instance = NodeList.from_json(json) +# print the JSON string representation of the object +print(NodeList.to_json()) + +# convert the object into a dict +node_list_dict = node_list_instance.to_dict() +# create an instance of NodeList from a dict +node_list_from_dict = NodeList.from_dict(node_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NodeUpdatesFailed.md b/docs/NodeUpdatesFailed.md new file mode 100644 index 0000000..0a83147 --- /dev/null +++ b/docs/NodeUpdatesFailed.md @@ -0,0 +1,31 @@ +# NodeUpdatesFailed + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Instructions to try again or resolve manually | [optional] +**nodes** | [**List[NodeInformationV1]**](NodeInformationV1.md) | List of nodes that failed to receive updates. | [optional] + +## Example + +```python +from corellium.models.node_updates_failed import NodeUpdatesFailed + +# TODO update the JSON string below +json = "{}" +# create an instance of NodeUpdatesFailed from a JSON string +node_updates_failed_instance = NodeUpdatesFailed.from_json(json) +# print the JSON string representation of the object +print(NodeUpdatesFailed.to_json()) + +# convert the object into a dict +node_updates_failed_dict = node_updates_failed_instance.to_dict() +# create an instance of NodeUpdatesFailed from a dict +node_updates_failed_from_dict = NodeUpdatesFailed.from_dict(node_updates_failed_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenIDConfig.md b/docs/OpenIDConfig.md index c05e66c..e1dadb5 100644 --- a/docs/OpenIDConfig.md +++ b/docs/OpenIDConfig.md @@ -1,15 +1,32 @@ # OpenIDConfig - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**discovery_url** | **str** | Service Discovery URL | [optional] -**client_id** | **str** | Service Client ID | [optional] -**client_secret** | **str** | Service Client Secret | [optional] -**invited_only** | **bool** | Only accept individuals with invitations | [optional] +**discovery_url** | **str** | Service Discovery URL. | +**client_id** | **str** | Service Client ID. | +**client_secret** | **str** | Service Client Secret. | +**invited_only** | **bool** | Only accept individuals with invitations. | [optional] + +## Example + +```python +from corellium.models.open_id_config import OpenIDConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenIDConfig from a JSON string +open_id_config_instance = OpenIDConfig.from_json(json) +# print the JSON string representation of the object +print(OpenIDConfig.to_json()) +# convert the object into a dict +open_id_config_dict = open_id_config_instance.to_dict() +# create an instance of OpenIDConfig from a dict +open_id_config_from_dict = OpenIDConfig.from_dict(open_id_config_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OpenIDConfigV1.md b/docs/OpenIDConfigV1.md new file mode 100644 index 0000000..6216ea5 --- /dev/null +++ b/docs/OpenIDConfigV1.md @@ -0,0 +1,33 @@ +# OpenIDConfigV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**discovery_url** | **str** | Service Discovery URL | [optional] +**client_id** | **str** | Service Client ID | [optional] +**client_secret** | **str** | Service Client Secret | [optional] +**invited_only** | **bool** | Only accept individuals with invitations | [optional] + +## Example + +```python +from corellium.models.open_id_config_v1 import OpenIDConfigV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenIDConfigV1 from a JSON string +open_id_config_v1_instance = OpenIDConfigV1.from_json(json) +# print the JSON string representation of the object +print(OpenIDConfigV1.to_json()) + +# convert the object into a dict +open_id_config_v1_dict = open_id_config_v1_instance.to_dict() +# create an instance of OpenIDConfigV1 from a dict +open_id_config_v1_from_dict = OpenIDConfigV1.from_dict(open_id_config_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenVPNConfig.md b/docs/OpenVPNConfig.md new file mode 100644 index 0000000..52b6a4d --- /dev/null +++ b/docs/OpenVPNConfig.md @@ -0,0 +1,31 @@ +# OpenVPNConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | Username for OpenVPN connection. | [optional] +**password** | **str** | Password for OpenVPN connection. | [optional] +**config** | **str** | OpenVPN connection configuration. | + +## Example + +```python +from corellium.models.open_vpn_config import OpenVPNConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenVPNConfig from a JSON string +open_vpn_config_instance = OpenVPNConfig.from_json(json) +# print the JSON string representation of the object +print(OpenVPNConfig.to_json()) + +# convert the object into a dict +open_vpn_config_dict = open_vpn_config_instance.to_dict() +# create an instance of OpenVPNConfig from a dict +open_vpn_config_from_dict = OpenVPNConfig.from_dict(open_vpn_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenVPNConfigV1.md b/docs/OpenVPNConfigV1.md new file mode 100644 index 0000000..bbc6b75 --- /dev/null +++ b/docs/OpenVPNConfigV1.md @@ -0,0 +1,32 @@ +# OpenVPNConfigV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | Username for OpenVPN connection. | [optional] +**password** | **str** | Password for OpenVPN connection. | [optional] +**config** | **str** | OpenVPN connection configuration. | + +## Example + +```python +from corellium.models.open_vpn_config_v1 import OpenVPNConfigV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenVPNConfigV1 from a JSON string +open_vpn_config_v1_instance = OpenVPNConfigV1.from_json(json) +# print the JSON string representation of the object +print(OpenVPNConfigV1.to_json()) + +# convert the object into a dict +open_vpn_config_v1_dict = open_vpn_config_v1_instance.to_dict() +# create an instance of OpenVPNConfigV1 from a dict +open_vpn_config_v1_from_dict = OpenVPNConfigV1.from_dict(open_vpn_config_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenVPNNetworkConnection.md b/docs/OpenVPNNetworkConnection.md new file mode 100644 index 0000000..2aefab5 --- /dev/null +++ b/docs/OpenVPNNetworkConnection.md @@ -0,0 +1,37 @@ +# OpenVPNNetworkConnection + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**OpenVPNConfig**](OpenVPNConfig.md) | | [optional] +**identifier** | **str** | Unique identifier for the network connection. | +**projects** | [**Dict[str, OpenVPNNetworkConnectionProjectsValue]**](OpenVPNNetworkConnectionProjectsValue.md) | Network states mapped by project IDs. | [optional] +**created_at** | **datetime** | Timestamp when the network connection was created. | +**updated_at** | **datetime** | Timestamp when the network connection was last updated. | +**created_by** | **str** | User ID of the creator. | +**updated_by** | **str** | User ID of the last updater. | + +## Example + +```python +from corellium.models.open_vpn_network_connection import OpenVPNNetworkConnection + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenVPNNetworkConnection from a JSON string +open_vpn_network_connection_instance = OpenVPNNetworkConnection.from_json(json) +# print the JSON string representation of the object +print(OpenVPNNetworkConnection.to_json()) + +# convert the object into a dict +open_vpn_network_connection_dict = open_vpn_network_connection_instance.to_dict() +# create an instance of OpenVPNNetworkConnection from a dict +open_vpn_network_connection_from_dict = OpenVPNNetworkConnection.from_dict(open_vpn_network_connection_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenVPNNetworkConnectionProjectsValue.md b/docs/OpenVPNNetworkConnectionProjectsValue.md new file mode 100644 index 0000000..375d0b2 --- /dev/null +++ b/docs/OpenVPNNetworkConnectionProjectsValue.md @@ -0,0 +1,30 @@ +# OpenVPNNetworkConnectionProjectsValue + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | State of the project network connection. | +**details** | **Dict[str, Optional[object]]** | Additional parameters for the network state. | [optional] + +## Example + +```python +from corellium.models.open_vpn_network_connection_projects_value import OpenVPNNetworkConnectionProjectsValue + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenVPNNetworkConnectionProjectsValue from a JSON string +open_vpn_network_connection_projects_value_instance = OpenVPNNetworkConnectionProjectsValue.from_json(json) +# print the JSON string representation of the object +print(OpenVPNNetworkConnectionProjectsValue.to_json()) + +# convert the object into a dict +open_vpn_network_connection_projects_value_dict = open_vpn_network_connection_projects_value_instance.to_dict() +# create an instance of OpenVPNNetworkConnectionProjectsValue from a dict +open_vpn_network_connection_projects_value_from_dict = OpenVPNNetworkConnectionProjectsValue.from_dict(open_vpn_network_connection_projects_value_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenVPNNetworkConnectionV1.md b/docs/OpenVPNNetworkConnectionV1.md new file mode 100644 index 0000000..ee90853 --- /dev/null +++ b/docs/OpenVPNNetworkConnectionV1.md @@ -0,0 +1,38 @@ +# OpenVPNNetworkConnectionV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | UUIDv4 | +**provider** | **str** | Type of network connection. | +**name** | **str** | User specified name for this network connection. e.g., \"My Network Connection\" | +**config** | [**OpenVPNConfigV1**](OpenVPNConfigV1.md) | | [optional] +**projects** | [**Dict[str, ProjectNetworkState]**](ProjectNetworkState.md) | An object where the keys are project IDs and the values are {@link ProjectNetworkState} objects representing the state of each project. | [optional] +**created_at** | **str** | Created Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" | +**updated_at** | **str** | Updated Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" | +**created_by** | **str** | UUIDv4 of the user who created this record. | +**updated_by** | **str** | UUIDv4 of the user who last updated this record. | + +## Example + +```python +from corellium.models.open_vpn_network_connection_v1 import OpenVPNNetworkConnectionV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenVPNNetworkConnectionV1 from a JSON string +open_vpn_network_connection_v1_instance = OpenVPNNetworkConnectionV1.from_json(json) +# print the JSON string representation of the object +print(OpenVPNNetworkConnectionV1.to_json()) + +# convert the object into a dict +open_vpn_network_connection_v1_dict = open_vpn_network_connection_v1_instance.to_dict() +# create an instance of OpenVPNNetworkConnectionV1 from a dict +open_vpn_network_connection_v1_from_dict = OpenVPNNetworkConnectionV1.from_dict(open_vpn_network_connection_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PaginatedAssessments.md b/docs/PaginatedAssessments.md new file mode 100644 index 0000000..a9baca0 --- /dev/null +++ b/docs/PaginatedAssessments.md @@ -0,0 +1,33 @@ +# PaginatedAssessments + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **float** | Maximum number of assessments requested. | +**offset** | **float** | Number of assessments skipped before this page. | +**count** | **float** | Number of assessments returned in this page. | +**total** | **float** | Total number of assessments for the instance. | +**results** | [**List[Assessment]**](Assessment.md) | The page of assessments. | + +## Example + +```python +from corellium.models.paginated_assessments import PaginatedAssessments + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginatedAssessments from a JSON string +paginated_assessments_instance = PaginatedAssessments.from_json(json) +# print the JSON string representation of the object +print(PaginatedAssessments.to_json()) + +# convert the object into a dict +paginated_assessments_dict = paginated_assessments_instance.to_dict() +# create an instance of PaginatedAssessments from a dict +paginated_assessments_from_dict = PaginatedAssessments.from_dict(paginated_assessments_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Pagination.md b/docs/Pagination.md index 89c4f86..47c42da 100644 --- a/docs/Pagination.md +++ b/docs/Pagination.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **current_page** | **float** | The current page | [optional] @@ -10,6 +11,23 @@ Name | Type | Description | Notes **total_items** | **float** | The total number of activity entries | [optional] **items_per_page** | **float** | The number of activity entries per page | [optional] +## Example + +```python +from corellium.models.pagination import Pagination + +# TODO update the JSON string below +json = "{}" +# create an instance of Pagination from a JSON string +pagination_instance = Pagination.from_json(json) +# print the JSON string representation of the object +print(Pagination.to_json()) + +# convert the object into a dict +pagination_dict = pagination_instance.to_dict() +# create an instance of Pagination from a dict +pagination_from_dict = Pagination.from_dict(pagination_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartialUpdateInterconnectRequest.md b/docs/PartialUpdateInterconnectRequest.md index 1362277..2f48dbe 100644 --- a/docs/PartialUpdateInterconnectRequest.md +++ b/docs/PartialUpdateInterconnectRequest.md @@ -3,12 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The name of the interconnect (optional) | [optional] -**interfaces** | **list[object]** | Array of interfaces with deviceId and interfaceId (optional) | [optional] -**interfaces** | **str** | The interface identifier | [optional] +**interfaces** | **List[object]** | Array of interfaces with deviceId and interfaceId (optional) | [optional] + +## Example + +```python +from corellium.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PartialUpdateInterconnectRequest from a JSON string +partial_update_interconnect_request_instance = PartialUpdateInterconnectRequest.from_json(json) +# print the JSON string representation of the object +print(PartialUpdateInterconnectRequest.to_json()) +# convert the object into a dict +partial_update_interconnect_request_dict = partial_update_interconnect_request_instance.to_dict() +# create an instance of PartialUpdateInterconnectRequest from a dict +partial_update_interconnect_request_from_dict = PartialUpdateInterconnectRequest.from_dict(partial_update_interconnect_request_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PartialUpdateNetworkConnectionBody.md b/docs/PartialUpdateNetworkConnectionBody.md new file mode 100644 index 0000000..4894bdd --- /dev/null +++ b/docs/PartialUpdateNetworkConnectionBody.md @@ -0,0 +1,31 @@ +# PartialUpdateNetworkConnectionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for Network connection. | [optional] +**config** | [**NetworkConnectionConfig**](NetworkConnectionConfig.md) | | [optional] +**force** | **bool** | Force the operation through constraint checks (e.g. stopping active instances). | [optional] [default to False] + +## Example + +```python +from corellium.models.partial_update_network_connection_body import PartialUpdateNetworkConnectionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PartialUpdateNetworkConnectionBody from a JSON string +partial_update_network_connection_body_instance = PartialUpdateNetworkConnectionBody.from_json(json) +# print the JSON string representation of the object +print(PartialUpdateNetworkConnectionBody.to_json()) + +# convert the object into a dict +partial_update_network_connection_body_dict = partial_update_network_connection_body_instance.to_dict() +# create an instance of PartialUpdateNetworkConnectionBody from a dict +partial_update_network_connection_body_from_dict = PartialUpdateNetworkConnectionBody.from_dict(partial_update_network_connection_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PartialUpdateNetworkConnectionOptions.md b/docs/PartialUpdateNetworkConnectionOptions.md new file mode 100644 index 0000000..61cf631 --- /dev/null +++ b/docs/PartialUpdateNetworkConnectionOptions.md @@ -0,0 +1,32 @@ +# PartialUpdateNetworkConnectionOptions + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User specified name for this network connection. e.g. My Network Connection | [optional] +**config** | [**UpdateNetworkConnectionOptionsConfig**](UpdateNetworkConnectionOptionsConfig.md) | | [optional] +**force** | **bool** | Force the update through constraint checks (e.g. stopping active instances). Defaults to false. | [optional] + +## Example + +```python +from corellium.models.partial_update_network_connection_options import PartialUpdateNetworkConnectionOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of PartialUpdateNetworkConnectionOptions from a JSON string +partial_update_network_connection_options_instance = PartialUpdateNetworkConnectionOptions.from_json(json) +# print the JSON string representation of the object +print(PartialUpdateNetworkConnectionOptions.to_json()) + +# convert the object into a dict +partial_update_network_connection_options_dict = partial_update_network_connection_options_instance.to_dict() +# create an instance of PartialUpdateNetworkConnectionOptions from a dict +partial_update_network_connection_options_from_dict = PartialUpdateNetworkConnectionOptions.from_dict(partial_update_network_connection_options_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PasswordChangeBody.md b/docs/PasswordChangeBody.md index 9f11e91..a07c9bd 100644 --- a/docs/PasswordChangeBody.md +++ b/docs/PasswordChangeBody.md @@ -3,12 +3,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user** | **str** | userId | **old_password** | **str** | old password | **new_password** | **str** | new password | +## Example + +```python +from corellium.models.password_change_body import PasswordChangeBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordChangeBody from a JSON string +password_change_body_instance = PasswordChangeBody.from_json(json) +# print the JSON string representation of the object +print(PasswordChangeBody.to_json()) + +# convert the object into a dict +password_change_body_dict = password_change_body_instance.to_dict() +# create an instance of PasswordChangeBody from a dict +password_change_body_from_dict = PasswordChangeBody.from_dict(password_change_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PasswordResetBody.md b/docs/PasswordResetBody.md index 437ec90..7934752 100644 --- a/docs/PasswordResetBody.md +++ b/docs/PasswordResetBody.md @@ -3,12 +3,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **token** | **str** | Password reset token | **totp_token** | **str** | Password reset totpToken | **new_password** | **str** | new password | +## Example + +```python +from corellium.models.password_reset_body import PasswordResetBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordResetBody from a JSON string +password_reset_body_instance = PasswordResetBody.from_json(json) +# print the JSON string representation of the object +print(PasswordResetBody.to_json()) + +# convert the object into a dict +password_reset_body_dict = password_reset_body_instance.to_dict() +# create an instance of PasswordResetBody from a dict +password_reset_body_from_dict = PasswordResetBody.from_dict(password_reset_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchClusterConfigBody.md b/docs/PatchClusterConfigBody.md new file mode 100644 index 0000000..16dc2e5 --- /dev/null +++ b/docs/PatchClusterConfigBody.md @@ -0,0 +1,32 @@ +# PatchClusterConfigBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshot_limit** | **float** | Maximum number of snapshots that can be taken in the cluster. | [optional] +**coordinator_config** | [**CoordinatorConfig**](CoordinatorConfig.md) | | [optional] +**ai_tools_config** | [**AiToolsConfig**](AiToolsConfig.md) | Partial AI tools configuration to update. | [optional] +**originating_node** | **str** | IP address of the node that originated this config change; prevents re-broadcast. | [optional] + +## Example + +```python +from corellium.models.patch_cluster_config_body import PatchClusterConfigBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchClusterConfigBody from a JSON string +patch_cluster_config_body_instance = PatchClusterConfigBody.from_json(json) +# print the JSON string representation of the object +print(PatchClusterConfigBody.to_json()) + +# convert the object into a dict +patch_cluster_config_body_dict = patch_cluster_config_body_instance.to_dict() +# create an instance of PatchClusterConfigBody from a dict +patch_cluster_config_body_from_dict = PatchClusterConfigBody.from_dict(patch_cluster_config_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchDomainAuthProviderBody.md b/docs/PatchDomainAuthProviderBody.md new file mode 100644 index 0000000..6e546a0 --- /dev/null +++ b/docs/PatchDomainAuthProviderBody.md @@ -0,0 +1,32 @@ +# PatchDomainAuthProviderBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | Provider type. | [optional] +**enabled** | **bool** | Whether the provider is enabled. | [optional] +**label** | **str** | Login button text. | [optional] +**config** | [**DomainAuthProviderConfig**](DomainAuthProviderConfig.md) | | [optional] + +## Example + +```python +from corellium.models.patch_domain_auth_provider_body import PatchDomainAuthProviderBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchDomainAuthProviderBody from a JSON string +patch_domain_auth_provider_body_instance = PatchDomainAuthProviderBody.from_json(json) +# print the JSON string representation of the object +print(PatchDomainAuthProviderBody.to_json()) + +# convert the object into a dict +patch_domain_auth_provider_body_dict = patch_domain_auth_provider_body_instance.to_dict() +# create an instance of PatchDomainAuthProviderBody from a dict +patch_domain_auth_provider_body_from_dict = PatchDomainAuthProviderBody.from_dict(patch_domain_auth_provider_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchDomainBody.md b/docs/PatchDomainBody.md new file mode 100644 index 0000000..e53f304 --- /dev/null +++ b/docs/PatchDomainBody.md @@ -0,0 +1,34 @@ +# PatchDomainBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totp_required** | **bool** | If true, every user in the domain must set up two-factor sign-in with a time-based one-time password (TOTP) authenticator app before they can use the platform. | [optional] +**trial_extension** | [**TrialExtension**](TrialExtension.md) | | [optional] +**device_auto_shutdown** | [**DeviceAutoShutdownSchema**](DeviceAutoShutdownSchema.md) | | [optional] +**allowed_devices_filters** | [**List[AllowedDevicesFilterSchema]**](AllowedDevicesFilterSchema.md) | Device/firmware allowlist filters. | [optional] +**webplayer** | [**PatchDomainBodyWebplayer**](PatchDomainBodyWebplayer.md) | | [optional] +**snapshot_sharing_permissions** | [**SnapshotSharingPermissionsRequestSchema**](SnapshotSharingPermissionsRequestSchema.md) | | [optional] + +## Example + +```python +from corellium.models.patch_domain_body import PatchDomainBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchDomainBody from a JSON string +patch_domain_body_instance = PatchDomainBody.from_json(json) +# print the JSON string representation of the object +print(PatchDomainBody.to_json()) + +# convert the object into a dict +patch_domain_body_dict = patch_domain_body_instance.to_dict() +# create an instance of PatchDomainBody from a dict +patch_domain_body_from_dict = PatchDomainBody.from_dict(patch_domain_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchDomainBodyWebplayer.md b/docs/PatchDomainBodyWebplayer.md new file mode 100644 index 0000000..07bc3c5 --- /dev/null +++ b/docs/PatchDomainBodyWebplayer.md @@ -0,0 +1,30 @@ +# PatchDomainBodyWebplayer + +Web player settings. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_domains** | **List[str]** | Domains permitted to embed the web player. | [optional] + +## Example + +```python +from corellium.models.patch_domain_body_webplayer import PatchDomainBodyWebplayer + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchDomainBodyWebplayer from a JSON string +patch_domain_body_webplayer_instance = PatchDomainBodyWebplayer.from_json(json) +# print the JSON string representation of the object +print(PatchDomainBodyWebplayer.to_json()) + +# convert the object into a dict +patch_domain_body_webplayer_dict = patch_domain_body_webplayer_instance.to_dict() +# create an instance of PatchDomainBodyWebplayer from a dict +patch_domain_body_webplayer_from_dict = PatchDomainBodyWebplayer.from_dict(patch_domain_body_webplayer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchDomainWelcomeMessageBody.md b/docs/PatchDomainWelcomeMessageBody.md new file mode 100644 index 0000000..912c2bd --- /dev/null +++ b/docs/PatchDomainWelcomeMessageBody.md @@ -0,0 +1,30 @@ +# PatchDomainWelcomeMessageBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | The welcome message text (HTML allowed, will be sanitized). | [optional] +**enabled** | **bool** | Whether the welcome message is shown to users. | [optional] + +## Example + +```python +from corellium.models.patch_domain_welcome_message_body import PatchDomainWelcomeMessageBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchDomainWelcomeMessageBody from a JSON string +patch_domain_welcome_message_body_instance = PatchDomainWelcomeMessageBody.from_json(json) +# print the JSON string representation of the object +print(PatchDomainWelcomeMessageBody.to_json()) + +# convert the object into a dict +patch_domain_welcome_message_body_dict = patch_domain_welcome_message_body_instance.to_dict() +# create an instance of PatchDomainWelcomeMessageBody from a dict +patch_domain_welcome_message_body_from_dict = PatchDomainWelcomeMessageBody.from_dict(patch_domain_welcome_message_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchFirmwareServiceConfigBody.md b/docs/PatchFirmwareServiceConfigBody.md new file mode 100644 index 0000000..2dfcdf2 --- /dev/null +++ b/docs/PatchFirmwareServiceConfigBody.md @@ -0,0 +1,34 @@ +# PatchFirmwareServiceConfigBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cache_firmware** | **bool** | Cache firmwares in /var/ipsw. | [optional] +**cluster_firmware_assets** | **bool** | Assets are cluster-wide. | [optional] +**fallback_original_url** | **bool** | Use original URL to fetch firmware. | [optional] +**fetch_firmware_assets** | **bool** | Automatically fetch assets. | [optional] +**should_download** | **bool** | Download firmwares. | [optional] +**download_ipsw_filters** | [**List[IpswFilterV3]**](IpswFilterV3.md) | Filters controlling which IPSW builds are downloaded. | [optional] + +## Example + +```python +from corellium.models.patch_firmware_service_config_body import PatchFirmwareServiceConfigBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchFirmwareServiceConfigBody from a JSON string +patch_firmware_service_config_body_instance = PatchFirmwareServiceConfigBody.from_json(json) +# print the JSON string representation of the object +print(PatchFirmwareServiceConfigBody.to_json()) + +# convert the object into a dict +patch_firmware_service_config_body_dict = patch_firmware_service_config_body_instance.to_dict() +# create an instance of PatchFirmwareServiceConfigBody from a dict +patch_firmware_service_config_body_from_dict = PatchFirmwareServiceConfigBody.from_dict(patch_firmware_service_config_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchInstanceBody.md b/docs/PatchInstanceBody.md new file mode 100644 index 0000000..eff7d40 --- /dev/null +++ b/docs/PatchInstanceBody.md @@ -0,0 +1,32 @@ +# PatchInstanceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the device. | [optional] +**boot_options** | [**InstanceBootOptions**](InstanceBootOptions.md) | The desired boot options. | [optional] +**proxy** | [**List[PatchInstanceBodyProxyInner]**](PatchInstanceBodyProxyInner.md) | Port proxy configurations for the instance. | [optional] +**strace_filter** | [**List[PatchInstanceBodyStraceFilterInner]**](PatchInstanceBodyStraceFilterInner.md) | CoreTrace process filter. | [optional] + +## Example + +```python +from corellium.models.patch_instance_body import PatchInstanceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchInstanceBody from a JSON string +patch_instance_body_instance = PatchInstanceBody.from_json(json) +# print the JSON string representation of the object +print(PatchInstanceBody.to_json()) + +# convert the object into a dict +patch_instance_body_dict = patch_instance_body_instance.to_dict() +# create an instance of PatchInstanceBody from a dict +patch_instance_body_from_dict = PatchInstanceBody.from_dict(patch_instance_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchInstanceBodyProxyInner.md b/docs/PatchInstanceBodyProxyInner.md new file mode 100644 index 0000000..ff8d367 --- /dev/null +++ b/docs/PatchInstanceBodyProxyInner.md @@ -0,0 +1,32 @@ +# PatchInstanceBodyProxyInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_port** | **float** | The device port to use for proxying. | +**first_available** | **bool** | Use the first available port if devicePort is unavailable. | +**expose** | **bool** | Expose the proxy to the external interface. | +**router_port** | **float** | The router port to use for proxying. | + +## Example + +```python +from corellium.models.patch_instance_body_proxy_inner import PatchInstanceBodyProxyInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchInstanceBodyProxyInner from a JSON string +patch_instance_body_proxy_inner_instance = PatchInstanceBodyProxyInner.from_json(json) +# print the JSON string representation of the object +print(PatchInstanceBodyProxyInner.to_json()) + +# convert the object into a dict +patch_instance_body_proxy_inner_dict = patch_instance_body_proxy_inner_instance.to_dict() +# create an instance of PatchInstanceBodyProxyInner from a dict +patch_instance_body_proxy_inner_from_dict = PatchInstanceBodyProxyInner.from_dict(patch_instance_body_proxy_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchInstanceBodyStraceFilterInner.md b/docs/PatchInstanceBodyStraceFilterInner.md new file mode 100644 index 0000000..065f942 --- /dev/null +++ b/docs/PatchInstanceBodyStraceFilterInner.md @@ -0,0 +1,30 @@ +# PatchInstanceBodyStraceFilterInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trait** | **str** | Filter trait. | +**value** | **str** | Value to match. | + +## Example + +```python +from corellium.models.patch_instance_body_strace_filter_inner import PatchInstanceBodyStraceFilterInner + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchInstanceBodyStraceFilterInner from a JSON string +patch_instance_body_strace_filter_inner_instance = PatchInstanceBodyStraceFilterInner.from_json(json) +# print the JSON string representation of the object +print(PatchInstanceBodyStraceFilterInner.to_json()) + +# convert the object into a dict +patch_instance_body_strace_filter_inner_dict = patch_instance_body_strace_filter_inner_instance.to_dict() +# create an instance of PatchInstanceBodyStraceFilterInner from a dict +patch_instance_body_strace_filter_inner_from_dict = PatchInstanceBodyStraceFilterInner.from_dict(patch_instance_body_strace_filter_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchInstanceOptions.md b/docs/PatchInstanceOptions.md index ed206dd..b95c279 100644 --- a/docs/PatchInstanceOptions.md +++ b/docs/PatchInstanceOptions.md @@ -3,13 +3,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | the name of the device | [optional] **state** | **str** | the desired state of the device | [optional] -**boot_options** | [**InstanceBootOptions**](InstanceBootOptions.md) | | [optional] -**proxy** | [**list[ProxyConfig]**](ProxyConfig.md) | | [optional] +**boot_options** | [**InstanceBootOptionsV1**](InstanceBootOptionsV1.md) | | [optional] +**proxy** | [**List[ProxyConfig]**](ProxyConfig.md) | | [optional] + +## Example + +```python +from corellium.models.patch_instance_options import PatchInstanceOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchInstanceOptions from a JSON string +patch_instance_options_instance = PatchInstanceOptions.from_json(json) +# print the JSON string representation of the object +print(PatchInstanceOptions.to_json()) +# convert the object into a dict +patch_instance_options_dict = patch_instance_options_instance.to_dict() +# create an instance of PatchInstanceOptions from a dict +patch_instance_options_from_dict = PatchInstanceOptions.from_dict(patch_instance_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchInstanceReadOnly.md b/docs/PatchInstanceReadOnly.md index b882149..7b1b220 100644 --- a/docs/PatchInstanceReadOnly.md +++ b/docs/PatchInstanceReadOnly.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **read_only** | **str** | The desired state of readOnly. Possible values: 'enabled', 'disabled'. | [optional] +## Example + +```python +from corellium.models.patch_instance_read_only import PatchInstanceReadOnly + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchInstanceReadOnly from a JSON string +patch_instance_read_only_instance = PatchInstanceReadOnly.from_json(json) +# print the JSON string representation of the object +print(PatchInstanceReadOnly.to_json()) + +# convert the object into a dict +patch_instance_read_only_dict = patch_instance_read_only_instance.to_dict() +# create an instance of PatchInstanceReadOnly from a dict +patch_instance_read_only_from_dict = PatchInstanceReadOnly.from_dict(patch_instance_read_only_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PatchInstanceReadOnlyBody.md b/docs/PatchInstanceReadOnlyBody.md new file mode 100644 index 0000000..a417bbd --- /dev/null +++ b/docs/PatchInstanceReadOnlyBody.md @@ -0,0 +1,29 @@ +# PatchInstanceReadOnlyBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**read_only** | **bool** | Desired read-only state, true enables read-only. | + +## Example + +```python +from corellium.models.patch_instance_read_only_body import PatchInstanceReadOnlyBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchInstanceReadOnlyBody from a JSON string +patch_instance_read_only_body_instance = PatchInstanceReadOnlyBody.from_json(json) +# print the JSON string representation of the object +print(PatchInstanceReadOnlyBody.to_json()) + +# convert the object into a dict +patch_instance_read_only_body_dict = patch_instance_read_only_body_instance.to_dict() +# create an instance of PatchInstanceReadOnlyBody from a dict +patch_instance_read_only_body_from_dict = PatchInstanceReadOnlyBody.from_dict(patch_instance_read_only_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchInterconnectBody.md b/docs/PatchInterconnectBody.md new file mode 100644 index 0000000..80d8fba --- /dev/null +++ b/docs/PatchInterconnectBody.md @@ -0,0 +1,30 @@ +# PatchInterconnectBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A name to recognise the interconnect by. | [optional] +**interfaces** | [**List[InterfacesSchemaInner]**](InterfacesSchemaInner.md) | | [optional] + +## Example + +```python +from corellium.models.patch_interconnect_body import PatchInterconnectBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchInterconnectBody from a JSON string +patch_interconnect_body_instance = PatchInterconnectBody.from_json(json) +# print the JSON string representation of the object +print(PatchInterconnectBody.to_json()) + +# convert the object into a dict +patch_interconnect_body_dict = patch_interconnect_body_instance.to_dict() +# create an instance of PatchInterconnectBody from a dict +patch_interconnect_body_from_dict = PatchInterconnectBody.from_dict(patch_interconnect_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchProjectBody.md b/docs/PatchProjectBody.md new file mode 100644 index 0000000..2e56354 --- /dev/null +++ b/docs/PatchProjectBody.md @@ -0,0 +1,31 @@ +# PatchProjectBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | New project name. | [optional] +**settings** | [**ProjectSettings**](ProjectSettings.md) | Project settings to update. Provided fields are merged into the existing settings; omitted fields are preserved. | [optional] +**quotas** | [**ProjectQuotaInput**](ProjectQuotaInput.md) | Updated resource quotas. | [optional] + +## Example + +```python +from corellium.models.patch_project_body import PatchProjectBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchProjectBody from a JSON string +patch_project_body_instance = PatchProjectBody.from_json(json) +# print the JSON string representation of the object +print(PatchProjectBody.to_json()) + +# convert the object into a dict +patch_project_body_dict = patch_project_body_instance.to_dict() +# create an instance of PatchProjectBody from a dict +patch_project_body_from_dict = PatchProjectBody.from_dict(patch_project_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchUserBody.md b/docs/PatchUserBody.md new file mode 100644 index 0000000..6356546 --- /dev/null +++ b/docs/PatchUserBody.md @@ -0,0 +1,37 @@ +# PatchUserBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Username. | [optional] +**label** | **str** | User label (e.g. \"Domain Administrator\"). | [optional] +**email** | **str** | User email. | [optional] +**cluster_administrator** | **bool** | Whether the user is a cluster administrator (cluster admins only). | [optional] +**password** | **str** | Password (optional when using SSO). | [optional] +**misc** | **Dict[str, Optional[object]]** | Opaque metadata. | [optional] +**administrator** | **bool** | Whether the user is a domain administrator (domain admins only). | [optional] +**agreed_to_terms** | **str** | Timestamp the terms were agreed to. | [optional] +**totp_enabled** | **bool** | Whether two-factor authentication is enabled. | [optional] + +## Example + +```python +from corellium.models.patch_user_body import PatchUserBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchUserBody from a JSON string +patch_user_body_instance = PatchUserBody.from_json(json) +# print the JSON string representation of the object +print(PatchUserBody.to_json()) + +# convert the object into a dict +patch_user_body_dict = patch_user_body_instance.to_dict() +# create an instance of PatchUserBody from a dict +patch_user_body_from_dict = PatchUserBody.from_dict(patch_user_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PeripheralsData.md b/docs/PeripheralsData.md index 9b8a247..0703396 100644 --- a/docs/PeripheralsData.md +++ b/docs/PeripheralsData.md @@ -1,20 +1,48 @@ # PeripheralsData - +Peripheral readings and settings. Responses include only fields reported by the compute node; no field is guaranteed to be present. An absent field does not imply a zero or false value. All fields are optional to support partial updates. Writes require the corresponding feature to be enabled; settings for disabled features are ignored: - deviceMotion: acceleration, gyroscope, magnetic, orientation. - deviceEnvironmentControl: temperature, proximity, light, pressure, humidity. - deviceLocation: gpsLat, gpsLon, gpsAlt, gpsToffs. - deviceBattery: acOnline, batteryPresent, batteryStatus, batteryHealth, batteryCapacity. - biometricBypass: biometricPass. These write restrictions do not determine which fields are returned by GET. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**acceleration** | **list[float]** | | [optional] -**gyroscope** | **list[float]** | | [optional] -**magnetic** | **list[float]** | | [optional] -**orientation** | **list[float]** | | [optional] -**temperature** | **float** | | [optional] -**proximity** | **float** | | [optional] -**light** | **float** | | [optional] -**pressure** | **float** | | [optional] -**humidity** | **float** | | [optional] +**acceleration** | **List[float]** | Accelerometer reading as [x, y, z]. | [optional] +**gyroscope** | **List[float]** | Gyroscope reading as [x, y, z]. | [optional] +**magnetic** | **List[float]** | Magnetometer reading as [x, y, z]. | [optional] +**orientation** | **List[float]** | Device orientation vector. | [optional] +**temperature** | **float** | Ambient temperature reading. | [optional] +**proximity** | **float** | Proximity sensor reading. | [optional] +**light** | **float** | Ambient light sensor reading. | [optional] +**pressure** | **float** | Barometric pressure reading. | [optional] +**humidity** | **float** | Relative humidity reading. | [optional] +**gps_lat** | **float** | GPS latitude in decimal degrees. | [optional] +**gps_lon** | **float** | GPS longitude in decimal degrees. | [optional] +**gps_alt** | **float** | GPS altitude in meters. | [optional] +**gps_toffs** | **float** | GPS time offset in seconds. | [optional] +**ac_online** | **float** | AC power connection: 0 = disconnected, 1 = connected. | [optional] +**battery_present** | **float** | Battery presence: 0 = absent, 1 = present. | [optional] +**battery_status** | **str** | Battery charging status. | [optional] +**battery_health** | **str** | Battery health. | [optional] +**battery_capacity** | **float** | Battery charge level as a percentage. | [optional] +**biometric_pass** | **float** | Biometric bypass: 0 = disabled, 1 = enabled. | [optional] + +## Example + +```python +from corellium.models.peripherals_data import PeripheralsData + +# TODO update the JSON string below +json = "{}" +# create an instance of PeripheralsData from a JSON string +peripherals_data_instance = PeripheralsData.from_json(json) +# print the JSON string representation of the object +print(PeripheralsData.to_json()) +# convert the object into a dict +peripherals_data_dict = peripherals_data_instance.to_dict() +# create an instance of PeripheralsData from a dict +peripherals_data_from_dict = PeripheralsData.from_dict(peripherals_data_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PeripheralsDataV1.md b/docs/PeripheralsDataV1.md new file mode 100644 index 0000000..e8cf489 --- /dev/null +++ b/docs/PeripheralsDataV1.md @@ -0,0 +1,48 @@ +# PeripheralsDataV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**acceleration** | **List[float]** | | [optional] +**gyroscope** | **List[float]** | | [optional] +**magnetic** | **List[float]** | | [optional] +**orientation** | **List[float]** | | [optional] +**temperature** | **float** | | [optional] +**proximity** | **float** | | [optional] +**light** | **float** | | [optional] +**pressure** | **float** | | [optional] +**humidity** | **float** | | [optional] +**gps_lat** | **float** | | [optional] +**gps_lon** | **float** | | [optional] +**gps_alt** | **float** | | [optional] +**gps_toffs** | **float** | GPS time offset in seconds. | [optional] +**ac_online** | **float** | Whether the device is on AC power (0 or 1). | [optional] +**battery_present** | **float** | Whether a battery is present (0 or 1). | [optional] +**battery_status** | **str** | Battery charging status | [optional] +**battery_health** | **str** | Battery health | [optional] +**battery_capacity** | **float** | | [optional] +**biometric_pass** | **float** | Whether biometric authentication passes (0 or 1). | [optional] + +## Example + +```python +from corellium.models.peripherals_data_v1 import PeripheralsDataV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PeripheralsDataV1 from a JSON string +peripherals_data_v1_instance = PeripheralsDataV1.from_json(json) +# print the JSON string representation of the object +print(PeripheralsDataV1.to_json()) + +# convert the object into a dict +peripherals_data_v1_dict = peripherals_data_v1_instance.to_dict() +# create an instance of PeripheralsDataV1 from a dict +peripherals_data_v1_from_dict = PeripheralsDataV1.from_dict(peripherals_data_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Plan.md b/docs/Plan.md index 552fed4..5764d44 100644 --- a/docs/Plan.md +++ b/docs/Plan.md @@ -1,13 +1,31 @@ # Plan - +Plan options ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**plan_id** | **str** | Plan ID | [optional] -**name** | **str** | Plan Name | [optional] +**license_type** | **str** | | +**cores** | **float** | Number of CPU cores | + +## Example + +```python +from corellium.models.plan import Plan + +# TODO update the JSON string below +json = "{}" +# create an instance of Plan from a JSON string +plan_instance = Plan.from_json(json) +# print the JSON string representation of the object +print(Plan.to_json()) +# convert the object into a dict +plan_dict = plan_instance.to_dict() +# create an instance of Plan from a dict +plan_from_dict = Plan.from_dict(plan_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlanOptions.md b/docs/PlanOptions.md deleted file mode 100644 index 88ecf8d..0000000 --- a/docs/PlanOptions.md +++ /dev/null @@ -1,13 +0,0 @@ -# PlanOptions - -Plan options - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**license_type** | **str** | | -**cores** | **int** | Number of CPU cores | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PlanV1.md b/docs/PlanV1.md new file mode 100644 index 0000000..ed7535b --- /dev/null +++ b/docs/PlanV1.md @@ -0,0 +1,31 @@ +# PlanV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**plan_id** | **str** | Plan ID | [optional] +**name** | **str** | Plan Name | [optional] + +## Example + +```python +from corellium.models.plan_v1 import PlanV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of PlanV1 from a JSON string +plan_v1_instance = PlanV1.from_json(json) +# print the JSON string representation of the object +print(PlanV1.to_json()) + +# convert the object into a dict +plan_v1_dict = plan_v1_instance.to_dict() +# create an instance of PlanV1 from a dict +plan_v1_from_dict = PlanV1.from_dict(plan_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PoolUsageSchema.md b/docs/PoolUsageSchema.md new file mode 100644 index 0000000..6fb4bd6 --- /dev/null +++ b/docs/PoolUsageSchema.md @@ -0,0 +1,33 @@ +# PoolUsageSchema + +Storage pool usage. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**used** | **float** | Used pool space. | [optional] [default to 0] +**size** | **float** | Total pool size. | [optional] [default to 0] +**free** | **float** | Free pool space. | [optional] [default to 0] +**lv_count** | **float** | Logical volume count. | [optional] [default to 0] + +## Example + +```python +from corellium.models.pool_usage_schema import PoolUsageSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of PoolUsageSchema from a JSON string +pool_usage_schema_instance = PoolUsageSchema.from_json(json) +# print the JSON string representation of the object +print(PoolUsageSchema.to_json()) + +# convert the object into a dict +pool_usage_schema_dict = pool_usage_schema_instance.to_dict() +# create an instance of PoolUsageSchema from a dict +pool_usage_schema_from_dict = PoolUsageSchema.from_dict(pool_usage_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PortalSession.md b/docs/PortalSession.md new file mode 100644 index 0000000..f23a08f --- /dev/null +++ b/docs/PortalSession.md @@ -0,0 +1,29 @@ +# PortalSession + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Stripe customer portal URL. | + +## Example + +```python +from corellium.models.portal_session import PortalSession + +# TODO update the JSON string below +json = "{}" +# create an instance of PortalSession from a JSON string +portal_session_instance = PortalSession.from_json(json) +# print the JSON string representation of the object +print(PortalSession.to_json()) + +# convert the object into a dict +portal_session_dict = portal_session_instance.to_dict() +# create an instance of PortalSession from a dict +portal_session_from_dict = PortalSession.from_dict(portal_session_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostShareSnapshotRequestPayload.md b/docs/PostShareSnapshotRequestPayload.md index 025ed4f..bb21ff6 100644 --- a/docs/PostShareSnapshotRequestPayload.md +++ b/docs/PostShareSnapshotRequestPayload.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sharing_type** | **str** | | -**password** | **str** | Password for passwordPublicLink. | [optional] +**password** | **str** | Password to require from anyone accepting the snapshot. Required when sharingType is passwordPublicLink. | [optional] + +## Example + +```python +from corellium.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of PostShareSnapshotRequestPayload from a JSON string +post_share_snapshot_request_payload_instance = PostShareSnapshotRequestPayload.from_json(json) +# print the JSON string representation of the object +print(PostShareSnapshotRequestPayload.to_json()) +# convert the object into a dict +post_share_snapshot_request_payload_dict = post_share_snapshot_request_payload_instance.to_dict() +# create an instance of PostShareSnapshotRequestPayload from a dict +post_share_snapshot_request_payload_from_dict = PostShareSnapshotRequestPayload.from_dict(post_share_snapshot_request_payload_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Project.md b/docs/Project.md index 5bf406f..3c7cda3 100644 --- a/docs/Project.md +++ b/docs/Project.md @@ -1,16 +1,35 @@ # Project - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Project Identifier | -**name** | **str** | Project Name | [optional] -**settings** | [**ProjectSettings**](ProjectSettings.md) | | [optional] -**quotas** | [**ProjectQuota**](ProjectQuota.md) | | [optional] -**quotas_used** | [**ProjectUsage**](ProjectUsage.md) | | [optional] +**id** | **str** | Project identifier. | +**name** | **str** | Project name. | +**settings** | [**ProjectSettings**](ProjectSettings.md) | | +**quotas** | [**ProjectQuota**](ProjectQuota.md) | | +**quotas_used** | [**ProjectUsage**](ProjectUsage.md) | | +**network_status** | [**NetworkStatus**](NetworkStatus.md) | | [optional] +**config** | [**ProjectConfig**](ProjectConfig.md) | | [optional] + +## Example + +```python +from corellium.models.project import Project + +# TODO update the JSON string below +json = "{}" +# create an instance of Project from a JSON string +project_instance = Project.from_json(json) +# print the JSON string representation of the object +print(Project.to_json()) +# convert the object into a dict +project_dict = project_instance.to_dict() +# create an instance of Project from a dict +project_from_dict = Project.from_dict(project_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectConfig.md b/docs/ProjectConfig.md new file mode 100644 index 0000000..4a0d1ba --- /dev/null +++ b/docs/ProjectConfig.md @@ -0,0 +1,30 @@ +# ProjectConfig + +Project configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **float** | Project display color. | [optional] + +## Example + +```python +from corellium.models.project_config import ProjectConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectConfig from a JSON string +project_config_instance = ProjectConfig.from_json(json) +# print the JSON string representation of the object +print(ProjectConfig.to_json()) + +# convert the object into a dict +project_config_dict = project_config_instance.to_dict() +# create an instance of ProjectConfig from a dict +project_config_from_dict = ProjectConfig.from_dict(project_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectInstanceList.md b/docs/ProjectInstanceList.md new file mode 100644 index 0000000..6e4d849 --- /dev/null +++ b/docs/ProjectInstanceList.md @@ -0,0 +1,34 @@ +# ProjectInstanceList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ProjectInstanceSummary]**](ProjectInstanceSummary.md) | Instances for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.project_instance_list import ProjectInstanceList + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectInstanceList from a JSON string +project_instance_list_instance = ProjectInstanceList.from_json(json) +# print the JSON string representation of the object +print(ProjectInstanceList.to_json()) + +# convert the object into a dict +project_instance_list_dict = project_instance_list_instance.to_dict() +# create an instance of ProjectInstanceList from a dict +project_instance_list_from_dict = ProjectInstanceList.from_dict(project_instance_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectInstanceSummary.md b/docs/ProjectInstanceSummary.md new file mode 100644 index 0000000..37cf077 --- /dev/null +++ b/docs/ProjectInstanceSummary.md @@ -0,0 +1,32 @@ +# ProjectInstanceSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Instance identifier. | +**name** | **str** | Instance name. | +**project** | **str** | Identifier of the project the instance belongs to. | +**state** | **str** | Current instance state. | + +## Example + +```python +from corellium.models.project_instance_summary import ProjectInstanceSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectInstanceSummary from a JSON string +project_instance_summary_instance = ProjectInstanceSummary.from_json(json) +# print the JSON string representation of the object +print(ProjectInstanceSummary.to_json()) + +# convert the object into a dict +project_instance_summary_dict = project_instance_summary_instance.to_dict() +# create an instance of ProjectInstanceSummary from a dict +project_instance_summary_from_dict = ProjectInstanceSummary.from_dict(project_instance_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectKey.md b/docs/ProjectKey.md index 83333d3..502e9f6 100644 --- a/docs/ProjectKey.md +++ b/docs/ProjectKey.md @@ -1,18 +1,36 @@ # ProjectKey - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identifier** | **str** | keyId | [optional] -**kind** | **str** | kind of key | -**project** | **str** | projectId | [optional] -**key** | **str** | The public key | -**fingerprint** | **str** | Key fingerprint | [optional] -**updated_at** | **datetime** | Time of last update | [optional] -**created_at** | **datetime** | Time of creation | [optional] +**kind** | **str** | Kind of authorized key: an SSH key for SSH-based devices or an ADB key for Android. | +**label** | **str** | Descriptive label for the key. | [optional] +**key** | **str** | The public key authorized to access devices in the project, in OpenSSH authorized_keys format. | +**id** | **str** | Project key identifier. | +**project** | **str** | Identifier of the project the key belongs to. | +**fingerprint** | **str** | Public key fingerprint. | +**created_at** | **datetime** | Time the key was created. | +**updated_at** | **datetime** | Time the key was last updated. | + +## Example + +```python +from corellium.models.project_key import ProjectKey + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectKey from a JSON string +project_key_instance = ProjectKey.from_json(json) +# print the JSON string representation of the object +print(ProjectKey.to_json()) +# convert the object into a dict +project_key_dict = project_key_instance.to_dict() +# create an instance of ProjectKey from a dict +project_key_from_dict = ProjectKey.from_dict(project_key_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectKeyList.md b/docs/ProjectKeyList.md new file mode 100644 index 0000000..dc25b36 --- /dev/null +++ b/docs/ProjectKeyList.md @@ -0,0 +1,34 @@ +# ProjectKeyList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ProjectKey]**](ProjectKey.md) | Authorized keys for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.project_key_list import ProjectKeyList + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectKeyList from a JSON string +project_key_list_instance = ProjectKeyList.from_json(json) +# print the JSON string representation of the object +print(ProjectKeyList.to_json()) + +# convert the object into a dict +project_key_list_dict = project_key_list_instance.to_dict() +# create an instance of ProjectKeyList from a dict +project_key_list_from_dict = ProjectKeyList.from_dict(project_key_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectKeyV1.md b/docs/ProjectKeyV1.md new file mode 100644 index 0000000..c96e120 --- /dev/null +++ b/docs/ProjectKeyV1.md @@ -0,0 +1,36 @@ +# ProjectKeyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | keyId | [optional] +**kind** | **str** | kind of key | +**project** | **str** | projectId | [optional] +**key** | **str** | The public key | +**fingerprint** | **str** | Key fingerprint | [optional] +**updated_at** | **datetime** | Time of last update | [optional] +**created_at** | **datetime** | Time of creation | [optional] + +## Example + +```python +from corellium.models.project_key_v1 import ProjectKeyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectKeyV1 from a JSON string +project_key_v1_instance = ProjectKeyV1.from_json(json) +# print the JSON string representation of the object +print(ProjectKeyV1.to_json()) + +# convert the object into a dict +project_key_v1_dict = project_key_v1_instance.to_dict() +# create an instance of ProjectKeyV1 from a dict +project_key_v1_from_dict = ProjectKeyV1.from_dict(project_key_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectList.md b/docs/ProjectList.md new file mode 100644 index 0000000..ef3bc78 --- /dev/null +++ b/docs/ProjectList.md @@ -0,0 +1,34 @@ +# ProjectList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ProjectListItem]**](ProjectListItem.md) | Projects for this page. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.project_list import ProjectList + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectList from a JSON string +project_list_instance = ProjectList.from_json(json) +# print the JSON string representation of the object +print(ProjectList.to_json()) + +# convert the object into a dict +project_list_dict = project_list_instance.to_dict() +# create an instance of ProjectList from a dict +project_list_from_dict = ProjectList.from_dict(project_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectListItem.md b/docs/ProjectListItem.md new file mode 100644 index 0000000..ca303c2 --- /dev/null +++ b/docs/ProjectListItem.md @@ -0,0 +1,36 @@ +# ProjectListItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Project identifier. | +**name** | **str** | Project name. | +**settings** | [**ProjectSettings**](ProjectSettings.md) | | +**quotas** | [**ProjectQuota**](ProjectQuota.md) | | +**quotas_used** | [**ProjectUsage**](ProjectUsage.md) | | +**network_status** | [**NetworkStatus**](NetworkStatus.md) | | [optional] +**config** | [**ProjectConfig**](ProjectConfig.md) | | [optional] +**key_count** | **float** | Number of authorized keys on the project. | + +## Example + +```python +from corellium.models.project_list_item import ProjectListItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectListItem from a JSON string +project_list_item_instance = ProjectListItem.from_json(json) +# print the JSON string representation of the object +print(ProjectListItem.to_json()) + +# convert the object into a dict +project_list_item_dict = project_list_item_instance.to_dict() +# create an instance of ProjectListItem from a dict +project_list_item_from_dict = ProjectListItem.from_dict(project_list_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectNetworkState.md b/docs/ProjectNetworkState.md index 70ee903..273f385 100644 --- a/docs/ProjectNetworkState.md +++ b/docs/ProjectNetworkState.md @@ -3,11 +3,29 @@ ProjectNetworkState ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **state** | **str** | State of the project network connection. One of: disconnected, disconnecting, connecting, connected, error | **details** | **object** | Additional parameters for the network state. | [optional] +## Example + +```python +from corellium.models.project_network_state import ProjectNetworkState + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectNetworkState from a JSON string +project_network_state_instance = ProjectNetworkState.from_json(json) +# print the JSON string representation of the object +print(ProjectNetworkState.to_json()) + +# convert the object into a dict +project_network_state_dict = project_network_state_instance.to_dict() +# create an instance of ProjectNetworkState from a dict +project_network_state_from_dict = ProjectNetworkState.from_dict(project_network_state_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectQuota.md b/docs/ProjectQuota.md index edb202a..0b12cdc 100644 --- a/docs/ProjectQuota.md +++ b/docs/ProjectQuota.md @@ -1,14 +1,32 @@ # ProjectQuota - +Resource quotas allocated to the project. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cores** | **float** | | [optional] -**instances** | **float** | | [optional] -**ram** | **float** | | [optional] +**cores** | **float** | Allocated CPU cores. | [optional] +**instances** | **float** | Allocated instance count. | [optional] +**ram** | **float** | Allocated RAM in mebibytes. | [optional] + +## Example + +```python +from corellium.models.project_quota import ProjectQuota + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectQuota from a JSON string +project_quota_instance = ProjectQuota.from_json(json) +# print the JSON string representation of the object +print(ProjectQuota.to_json()) +# convert the object into a dict +project_quota_dict = project_quota_instance.to_dict() +# create an instance of ProjectQuota from a dict +project_quota_from_dict = ProjectQuota.from_dict(project_quota_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectQuotaInput.md b/docs/ProjectQuotaInput.md new file mode 100644 index 0000000..b10624e --- /dev/null +++ b/docs/ProjectQuotaInput.md @@ -0,0 +1,32 @@ +# ProjectQuotaInput + +Initial resource quotas. When omitted the project is created with ZERO quota and cannot run instances until an administrator allocates quota to it (quotas are reservations against the domain allowance; rebalance from another project if the allowance is fully reserved). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | Allocated CPU cores. | +**instances** | **float** | Allocated instance count. Derived from cores when omitted. | [optional] +**ram** | **float** | Ignored on write: RAM in mebibytes is always recomputed as cores * 6144. | [optional] + +## Example + +```python +from corellium.models.project_quota_input import ProjectQuotaInput + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectQuotaInput from a JSON string +project_quota_input_instance = ProjectQuotaInput.from_json(json) +# print the JSON string representation of the object +print(ProjectQuotaInput.to_json()) + +# convert the object into a dict +project_quota_input_dict = project_quota_input_instance.to_dict() +# create an instance of ProjectQuotaInput from a dict +project_quota_input_from_dict = ProjectQuotaInput.from_dict(project_quota_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectQuotaV1.md b/docs/ProjectQuotaV1.md new file mode 100644 index 0000000..fbacec1 --- /dev/null +++ b/docs/ProjectQuotaV1.md @@ -0,0 +1,32 @@ +# ProjectQuotaV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | | [optional] +**instances** | **float** | | [optional] +**ram** | **float** | | [optional] + +## Example + +```python +from corellium.models.project_quota_v1 import ProjectQuotaV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectQuotaV1 from a JSON string +project_quota_v1_instance = ProjectQuotaV1.from_json(json) +# print the JSON string representation of the object +print(ProjectQuotaV1.to_json()) + +# convert the object into a dict +project_quota_v1_dict = project_quota_v1_instance.to_dict() +# create an instance of ProjectQuotaV1 from a dict +project_quota_v1_from_dict = ProjectQuotaV1.from_dict(project_quota_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectSettings.md b/docs/ProjectSettings.md index 692f280..881a27c 100644 --- a/docs/ProjectSettings.md +++ b/docs/ProjectSettings.md @@ -1,14 +1,33 @@ # ProjectSettings - +Project settings. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**internet_access** | **bool** | | -**connection** | **str** | UUIDv4 network connection identifier or null for no vpn connection | [optional] -**dhcp** | **bool** | | +**version** | **float** | Settings schema version. | [optional] +**internet_access** | **bool** | Whether devices in the project can reach the internet. When false, devices can talk only to each other and to the project VPN. | [optional] +**dhcp** | **bool** | Whether DHCP is enabled for the project network. | [optional] +**connection** | **str** | ID of a network connection that routes the project's outbound traffic through a VPN, or null to use the normal network. Cannot be changed while any device in the project is running. | [optional] + +## Example + +```python +from corellium.models.project_settings import ProjectSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectSettings from a JSON string +project_settings_instance = ProjectSettings.from_json(json) +# print the JSON string representation of the object +print(ProjectSettings.to_json()) +# convert the object into a dict +project_settings_dict = project_settings_instance.to_dict() +# create an instance of ProjectSettings from a dict +project_settings_from_dict = ProjectSettings.from_dict(project_settings_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectSettingsV1.md b/docs/ProjectSettingsV1.md new file mode 100644 index 0000000..24b5c7e --- /dev/null +++ b/docs/ProjectSettingsV1.md @@ -0,0 +1,33 @@ +# ProjectSettingsV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **float** | | [optional] +**internet_access** | **bool** | Omitted when not configured for the project | [optional] +**connection** | **str** | UUIDv4 network connection identifier or null for no vpn connection | [optional] +**dhcp** | **bool** | Omitted when not configured for the project | [optional] + +## Example + +```python +from corellium.models.project_settings_v1 import ProjectSettingsV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectSettingsV1 from a JSON string +project_settings_v1_instance = ProjectSettingsV1.from_json(json) +# print the JSON string representation of the object +print(ProjectSettingsV1.to_json()) + +# convert the object into a dict +project_settings_v1_dict = project_settings_v1_instance.to_dict() +# create an instance of ProjectSettingsV1 from a dict +project_settings_v1_from_dict = ProjectSettingsV1.from_dict(project_settings_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectUsage.md b/docs/ProjectUsage.md index 03a6e1b..a99c66d 100644 --- a/docs/ProjectUsage.md +++ b/docs/ProjectUsage.md @@ -1,15 +1,33 @@ # ProjectUsage - +Resource usage within the project. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cores** | **float** | | [optional] -**instances** | **float** | | [optional] -**ram** | **float** | | [optional] -**gpu** | **float** | | [optional] +**cores** | **float** | CPU cores in use. | [optional] +**instances** | **float** | Instances in use. | [optional] +**ram** | **float** | RAM in use, in mebibytes. | [optional] +**gpu** | **float** | GPU units in use. | [optional] + +## Example + +```python +from corellium.models.project_usage import ProjectUsage + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectUsage from a JSON string +project_usage_instance = ProjectUsage.from_json(json) +# print the JSON string representation of the object +print(ProjectUsage.to_json()) +# convert the object into a dict +project_usage_dict = project_usage_instance.to_dict() +# create an instance of ProjectUsage from a dict +project_usage_from_dict = ProjectUsage.from_dict(project_usage_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProjectUsageV1.md b/docs/ProjectUsageV1.md new file mode 100644 index 0000000..1ba5b79 --- /dev/null +++ b/docs/ProjectUsageV1.md @@ -0,0 +1,33 @@ +# ProjectUsageV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cores** | **float** | | [optional] +**instances** | **float** | | [optional] +**ram** | **float** | | [optional] +**gpu** | **float** | | [optional] + +## Example + +```python +from corellium.models.project_usage_v1 import ProjectUsageV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectUsageV1 from a JSON string +project_usage_v1_instance = ProjectUsageV1.from_json(json) +# print the JSON string representation of the object +print(ProjectUsageV1.to_json()) + +# convert the object into a dict +project_usage_v1_dict = project_usage_v1_instance.to_dict() +# create an instance of ProjectUsageV1 from a dict +project_usage_v1_from_dict = ProjectUsageV1.from_dict(project_usage_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectV1.md b/docs/ProjectV1.md new file mode 100644 index 0000000..867e868 --- /dev/null +++ b/docs/ProjectV1.md @@ -0,0 +1,35 @@ +# ProjectV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Project Identifier | +**name** | **str** | Project Name | [optional] +**settings** | [**ProjectSettingsV1**](ProjectSettingsV1.md) | | [optional] +**quotas** | [**ProjectQuotaV1**](ProjectQuotaV1.md) | | [optional] +**quotas_used** | [**ProjectUsageV1**](ProjectUsageV1.md) | | [optional] +**network_status** | [**NetworkStatusV1**](NetworkStatusV1.md) | | [optional] + +## Example + +```python +from corellium.models.project_v1 import ProjectV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectV1 from a JSON string +project_v1_instance = ProjectV1.from_json(json) +# print the JSON string representation of the object +print(ProjectV1.to_json()) + +# convert the object into a dict +project_v1_dict = project_v1_instance.to_dict() +# create an instance of ProjectV1 from a dict +project_v1_from_dict = ProjectV1.from_dict(project_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectWithKeysV1.md b/docs/ProjectWithKeysV1.md new file mode 100644 index 0000000..5a8b87a --- /dev/null +++ b/docs/ProjectWithKeysV1.md @@ -0,0 +1,36 @@ +# ProjectWithKeysV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Project Identifier | +**name** | **str** | Project Name | [optional] +**settings** | [**ProjectSettingsV1**](ProjectSettingsV1.md) | | [optional] +**quotas** | [**ProjectQuotaV1**](ProjectQuotaV1.md) | | [optional] +**quotas_used** | [**ProjectUsageV1**](ProjectUsageV1.md) | | [optional] +**network_status** | [**NetworkStatusV1**](NetworkStatusV1.md) | | [optional] +**keys** | [**List[ProjectKeyV1]**](ProjectKeyV1.md) | | [optional] + +## Example + +```python +from corellium.models.project_with_keys_v1 import ProjectWithKeysV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectWithKeysV1 from a JSON string +project_with_keys_v1_instance = ProjectWithKeysV1.from_json(json) +# print the JSON string representation of the object +print(ProjectWithKeysV1.to_json()) + +# convert the object into a dict +project_with_keys_v1_dict = project_with_keys_v1_instance.to_dict() +# create an instance of ProjectWithKeysV1 from a dict +project_with_keys_v1_from_dict = ProjectWithKeysV1.from_dict(project_with_keys_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectsApi.md b/docs/ProjectsApi.md new file mode 100644 index 0000000..4acd87b --- /dev/null +++ b/docs/ProjectsApi.md @@ -0,0 +1,1455 @@ +# corellium.ProjectsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_project**](ProjectsApi.md#v3_create_project) | **POST** /v3/projects | Create a project +[**v3_create_project_key**](ProjectsApi.md#v3_create_project_key) | **POST** /v3/projects/{projectId}/keys | Add a project key +[**v3_delete_project**](ProjectsApi.md#v3_delete_project) | **DELETE** /v3/projects/{projectId} | Delete a project +[**v3_delete_project_key**](ProjectsApi.md#v3_delete_project_key) | **DELETE** /v3/projects/{projectId}/keys/{keyId} | Delete a project key +[**v3_fetch_project_firmware_assets**](ProjectsApi.md#v3_fetch_project_firmware_assets) | **POST** /v3/projects/{projectId}/firmware-assets | Fetch firmware assets for a project +[**v3_get_project**](ProjectsApi.md#v3_get_project) | **GET** /v3/projects/{projectId} | Get a project +[**v3_get_project_image_upload**](ProjectsApi.md#v3_get_project_image_upload) | **GET** /v3/projects/{projectId}/image-upload/{type}/{imageId}/{name} | Get image upload status +[**v3_get_project_network_log**](ProjectsApi.md#v3_get_project_network_log) | **GET** /v3/projects/{projectId}/network/log | Get project network log +[**v3_get_project_network_status**](ProjectsApi.md#v3_get_project_network_status) | **GET** /v3/projects/{projectId}/network/status | Get project network status +[**v3_get_project_vpn_config**](ProjectsApi.md#v3_get_project_vpn_config) | **GET** /v3/projects/{projectId}/vpnconfig/{format} | Get project VPN configuration +[**v3_list_project_instances**](ProjectsApi.md#v3_list_project_instances) | **GET** /v3/projects/{projectId}/instances | List project instances +[**v3_list_project_keys**](ProjectsApi.md#v3_list_project_keys) | **GET** /v3/projects/{projectId}/keys | List project keys +[**v3_list_projects**](ProjectsApi.md#v3_list_projects) | **GET** /v3/projects | List projects +[**v3_patch_project**](ProjectsApi.md#v3_patch_project) | **PATCH** /v3/projects/{projectId} | Update a project +[**v3_preauth_vpn_config**](ProjectsApi.md#v3_preauth_vpn_config) | **POST** /v3/projects/{projectId}/preauth-vpn-config/{filename} | Pre-authorize a VPN configuration download +[**v3_put_project_image_upload**](ProjectsApi.md#v3_put_project_image_upload) | **PUT** /v3/projects/{projectId}/image-upload/{type}/{imageId}/{name} | Upload image chunk + + +# **v3_create_project** +> Project v3_create_project(create_project_body) + +Create a project + +**Required role:** Domain administrator. + +Creates a new project in your domain. Requires a domain administrator. + +**Give it quota, or it cannot run devices.** A new project created without `quotas` has zero quota. Quota is reserved out of your domain's total allowance, so if the whole allowance is already reserved by other projects, lower one of them with `v3PatchProject` first. + +When you set `quotas`, `cores` is required. `instances` is derived from `cores` if you leave it out, and memory is always calculated from cores (6144 MiB per core); any `ram` you send is ignored. + +Returns 201 with the new project, including its `id`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_project_body import CreateProjectBody +from corellium.models.project import Project +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + create_project_body = corellium.CreateProjectBody() # CreateProjectBody | Project to create. + + try: + # Create a project + api_response = api_instance.v3_create_project(create_project_body) + print("The response of ProjectsApi->v3_create_project:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_create_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_project_body** | [**CreateProjectBody**](CreateProjectBody.md)| Project to create. | + +### Return type + +[**Project**](Project.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The created project. | - | +**400** | The project payload is invalid. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_create_project_key** +> ProjectKey v3_create_project_key(project_id, create_project_key_body) + +Add a project key + +**Required role:** Domain administrator or project administrator. + +Authorizes a public key on the project, so its holder can connect to the project's devices. Requires a domain or project administrator. + +Set `kind` to `ssh` for SSH access or `adb` for Android Debug Bridge access, and put the public key (never the private key) in `key`, in the same one-line format as an OpenSSH `authorized_keys` entry. `label` is an optional note to help you recognise the key later. Returns 400 if the key cannot be parsed. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_project_key_body import CreateProjectKeyBody +from corellium.models.project_key import ProjectKey +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + create_project_key_body = corellium.CreateProjectKeyBody() # CreateProjectKeyBody | Key to add. + + try: + # Add a project key + api_response = api_instance.v3_create_project_key(project_id, create_project_key_body) + print("The response of ProjectsApi->v3_create_project_key:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_create_project_key: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **create_project_key_body** | [**CreateProjectKeyBody**](CreateProjectKeyBody.md)| Key to add. | + +### Return type + +[**ProjectKey**](ProjectKey.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The added authorized key. | - | +**400** | The supplied public key is invalid. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator or project administrator permissions required. This deployment is not licensed for SSH key pairing. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_project** +> v3_delete_project(project_id) + +Delete a project + +**Required role:** Domain administrator. + +Deletes a project together with every file (image) uploaded to it. Requires a domain administrator. + +The project must not contain any devices: if it does, the request fails with 409 and nothing is deleted. Delete the devices first with `DELETE /v3/instances/{instanceId}` and wait until they are gone. + +Deletes are idempotent: an unknown `projectId`, or a project that was already deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + + try: + # Delete a project + api_instance.v3_delete_project(project_id) + except Exception as e: + print("Exception when calling ProjectsApi->v3_delete_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The project was deleted. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**409** | The project still contains devices and cannot be deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_project_key** +> v3_delete_project_key(project_id, key_id) + +Delete a project key + +**Required role:** Domain administrator or project administrator. + +Removes an authorized key from the project, so it can no longer be used to connect to the project's devices. Requires a domain or project administrator. + +Deletes are idempotent: a `keyId` that is not present on the project, or an unknown `projectId`, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + key_id = '9c1098dc-e881-41fb-b3af-e2d5ddd55d86' # str | Project key identifier. + + try: + # Delete a project key + api_instance.v3_delete_project_key(project_id, key_id) + except Exception as e: + print("Exception when calling ProjectsApi->v3_delete_project_key: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **key_id** | **str**| Project key identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | The authorized key was removed. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_fetch_project_firmware_assets** +> FetchFirmwareAssetsResponse v3_fetch_project_firmware_assets(project_id, fetch_firmware_assets_body) + +Fetch firmware assets for a project + +Asks the platform to download firmware assets (for example the decryption keys some iOS versions need to boot) from the given URLs and store them for your domain. Use it when device creation reports that assets are missing: the missing asset URLs appear in that error and in each firmware entry. The response lists which URLs were newly stored, which were already present, and which failed and why. Returns 409 if downloading assets is turned off on this deployment (for example an air-gapped one); there, upload the assets as a file and install them with `POST /v3/images/install-firmware-assets` instead. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.fetch_firmware_assets_body import FetchFirmwareAssetsBody +from corellium.models.fetch_firmware_assets_response import FetchFirmwareAssetsResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + fetch_firmware_assets_body = corellium.FetchFirmwareAssetsBody() # FetchFirmwareAssetsBody | Firmware asset URLs to fetch. + + try: + # Fetch firmware assets for a project + api_response = api_instance.v3_fetch_project_firmware_assets(project_id, fetch_firmware_assets_body) + print("The response of ProjectsApi->v3_fetch_project_firmware_assets:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_fetch_project_firmware_assets: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **fetch_firmware_assets_body** | [**FetchFirmwareAssetsBody**](FetchFirmwareAssetsBody.md)| Firmware asset URLs to fetch. | + +### Return type + +[**FetchFirmwareAssetsResponse**](FetchFirmwareAssetsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The fetch result reported by the firmware service. | - | +**400** | The asset URL payload is invalid. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No project with the given identifier. | - | +**409** | Fetching firmware assets is disabled on this cluster. | - | +**503** | The firmware service is currently unavailable. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_project** +> Project v3_get_project(project_id) + +Get a project + +Returns one project with its settings, quotas, and current resource usage (`quotasUsed`). Compare `quotas` with `quotasUsed` to see whether there is room for another device before creating one. Returns 404 if the project does not exist and 403 if you cannot access it. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project import Project +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + + try: + # Get a project + api_response = api_instance.v3_get_project(project_id) + print("The response of ProjectsApi->v3_get_project:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_get_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + +### Return type + +[**Project**](Project.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The requested project. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_project_image_upload** +> bytearray v3_get_project_image_upload(project_id, type, image_id, name, resumable_chunk_number=resumable_chunk_number) + +Get image upload status + +Checks the progress of a chunked upload made with `v3PutProjectImageUpload`, or downloads the finished file. + +- **With chunk parameters** (`resumableChunkNumber` and friends): returns 200 if that chunk is already stored, or 204 if it still needs to be sent. Use this to resume an interrupted upload without re-sending data. +- **Without them:** downloads the image file. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + type = 'type_example' # str | What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. + image_id = 'image_id_example' # str | An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. + name = 'name_example' # str | The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. + resumable_chunk_number = 3.4 # float | Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. (optional) + + try: + # Get image upload status + api_response = api_instance.v3_get_project_image_upload(project_id, type, image_id, name, resumable_chunk_number=resumable_chunk_number) + print("The response of ProjectsApi->v3_get_project_image_upload:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_get_project_image_upload: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **type** | **str**| What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. | + **image_id** | **str**| An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. | + **name** | **str**| The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. | + **resumable_chunk_number** | **float**| Chunk number. When present the response reports whether that chunk was already stored (200) or still needs to be uploaded (204) instead of returning the image file. | [optional] + +### Return type + +**bytearray** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An empty JSON object when a probed chunk is already stored, the image bytes when the file is stored locally, or the image metadata when no file has been stored yet. | - | +**204** | The probed chunk is not stored yet and still needs to be uploaded. | - | +**302** | The image is stored in S3; follow the Location header to download it. | * Location - URL the client is redirected to.
| +**400** | The image identifier is invalid or the image record is missing. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No image with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_project_network_log** +> str v3_get_project_network_log(project_id) + +Get project network log + +Returns the log of the project's outbound VPN connection as plain text. Use it to diagnose a connection that will not come up. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + + try: + # Get project network log + api_response = api_instance.v3_get_project_network_log(project_id) + print("The response of ProjectsApi->v3_get_project_network_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_get_project_network_log: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The project network connection log. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_project_network_status** +> NetworkStatus v3_get_project_network_status(project_id) + +Get project network status + +Returns the state of the project's outbound VPN connection (the connection set in `settings.connection`), such as whether it is connected, and error details if it is not. Use it to check that device traffic is flowing through your VPN. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_status import NetworkStatus +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + + try: + # Get project network status + api_response = api_instance.v3_get_project_network_status(project_id) + print("The response of ProjectsApi->v3_get_project_network_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_get_project_network_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + +### Return type + +[**NetworkStatus**](NetworkStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The project network connection status. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_project_vpn_config** +> str v3_get_project_vpn_config(project_id, format) + +Get project VPN configuration + +Downloads a VPN configuration that lets your computer join the project's device network, so you can reach the devices directly (for example by SSH or a local debugger). Set `format` to 'ovpn' to get an OpenVPN profile to import into any OpenVPN client. Any other value returns a zip for the Tunnelblick client on macOS. Returns 400 if the project does not have a VPN endpoint yet. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + format = 'ovpn' # str | VPN configuration format: 'ovpn' for an OpenVPN profile; any other value returns a Tunnelblick zip. + + try: + # Get project VPN configuration + api_response = api_instance.v3_get_project_vpn_config(project_id, format) + print("The response of ProjectsApi->v3_get_project_vpn_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_get_project_vpn_config: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **format** | **str**| VPN configuration format: 'ovpn' for an OpenVPN profile; any other value returns a Tunnelblick zip. | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/x-openvpn-profile, application/zip, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The VPN configuration, as a text OpenVPN profile or a binary Tunnelblick zip. | - | +**400** | The project does not have an active VPN IP or port. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_project_instances** +> ProjectInstanceList v3_list_project_instances(project_id, limit=limit, offset=offset, name=name) + +List project instances + +Lists the devices (instances) in a project, with their ID, name and current state. Results are paginated with `limit` and `offset`; use `name` to find a device by its exact name. For full device details, call `GET /v3/instances/{instanceId}`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_instance_list import ProjectInstanceList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + name = 'My Device' # str | Filter by exact instance name. (optional) + + try: + # List project instances + api_response = api_instance.v3_list_project_instances(project_id, limit=limit, offset=offset, name=name) + print("The response of ProjectsApi->v3_list_project_instances:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_list_project_instances: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **name** | **str**| Filter by exact instance name. | [optional] + +### Return type + +[**ProjectInstanceList**](ProjectInstanceList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of instances in the project. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_project_keys** +> ProjectKeyList v3_list_project_keys(project_id, limit=limit, offset=offset) + +List project keys + +Lists the public keys authorized on this project. Keys let you connect to the project's devices over SSH, or to Android devices over ADB, without a password. Returns 403 if your deployment is not licensed for key pairing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_key_list import ProjectKeyList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List project keys + api_response = api_instance.v3_list_project_keys(project_id, limit=limit, offset=offset) + print("The response of ProjectsApi->v3_list_project_keys:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_list_project_keys: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**ProjectKeyList**](ProjectKeyList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of authorized keys. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | This deployment is not licensed for SSH key pairing. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_projects** +> ProjectList v3_list_projects(limit=limit, offset=offset, name=name) + +List projects + +Lists the projects you can access. A project is a workspace that holds devices (instances), the files uploaded for them, and a share of your domain's resources (CPU cores, memory and device count). Almost every other call needs a project ID, so this is usually the first call after you sign in. + +Results are paginated with `limit` and `offset`. Use `name` to find one project by its exact name (not case-sensitive). Each entry includes its quotas, current usage, and the number of authorized keys. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_list import ProjectList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + name = 'Default Project' # str | Filter by exact project name (case-insensitive). (optional) + + try: + # List projects + api_response = api_instance.v3_list_projects(limit=limit, offset=offset, name=name) + print("The response of ProjectsApi->v3_list_projects:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_list_projects: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **name** | **str**| Filter by exact project name (case-insensitive). | [optional] + +### Return type + +[**ProjectList**](ProjectList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of projects. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_project** +> Project v3_patch_project(project_id, patch_project_body) + +Update a project + +Changes a project's name, settings or quotas. Send only the fields you want to change. + +- `settings` is merged into the existing settings: fields you leave out keep their current values. +- `quotas` follows the same rules as on create: `cores` is required, `instances` is derived when omitted, and memory is always calculated from cores. +- Changing the network connection (`settings.connection`) is refused with 400 while any device in the project is running. Stop the devices first. + +Returns the updated project. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.patch_project_body import PatchProjectBody +from corellium.models.project import Project +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + patch_project_body = corellium.PatchProjectBody() # PatchProjectBody | Fields to update. + + try: + # Update a project + api_response = api_instance.v3_patch_project(project_id, patch_project_body) + print("The response of ProjectsApi->v3_patch_project:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_patch_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **patch_project_body** | [**PatchProjectBody**](PatchProjectBody.md)| Fields to update. | + +### Return type + +[**Project**](Project.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated project. | - | +**400** | The update payload is invalid, or the network connection cannot be changed while instances are active. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_preauth_vpn_config** +> VpnConfigPreauthorization v3_preauth_vpn_config(project_id, filename) + +Pre-authorize a VPN configuration download + +Pre-authorize a VPN configuration download. Returns a short-lived signed token that authorizes the download without an Authorization header, so it can be embedded in a plain download URL: GET /v1/preauthed-vpn-configs/{token}/{filename}. The token carries the client identifier and the format, and expires with the calling session token. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.vpn_config_preauthorization import VpnConfigPreauthorization +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + filename = 'researcher-laptop.ovpn' # str | VPN configuration filename, as '.'. The client identifier becomes the common name of the issued client certificate; a format of 'ovpn' yields an OpenVPN profile and any other value yields a Tunnelblick zip. + + try: + # Pre-authorize a VPN configuration download + api_response = api_instance.v3_preauth_vpn_config(project_id, filename) + print("The response of ProjectsApi->v3_preauth_vpn_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_preauth_vpn_config: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **filename** | **str**| VPN configuration filename, as '<clientId>.<format>'. The client identifier becomes the common name of the issued client certificate; a format of 'ovpn' yields an OpenVPN profile and any other value yields a Tunnelblick zip. | + +### Return type + +[**VpnConfigPreauthorization**](VpnConfigPreauthorization.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A short-lived signed token. | - | +**400** | The project does not have an active VPN IP or port. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No project with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_put_project_image_upload** +> Dict[str, Optional[object]] v3_put_project_image_upload(project_id, type, image_id, name, body, resumable_chunk_number=resumable_chunk_number, resumable_chunk_size=resumable_chunk_size, resumable_current_chunk_size=resumable_current_chunk_size, resumable_total_size=resumable_total_size, resumable_total_chunks=resumable_total_chunks, corellium_checksum=corellium_checksum, flavor=flavor, x_corellium_image_encoding=x_corellium_image_encoding, x_corellium_image_encapsulated=x_corellium_image_encapsulated, x_corellium_total_file_size=x_corellium_total_file_size, x_corellium_image_password=x_corellium_image_password) + +Upload image chunk + +Uploads one chunk of a file into this project, using the same resumable protocol as `PUT /v3/images/{imageId}/file`. The difference is that you choose the image ID yourself (a new random UUID) and the image record is created automatically when the first chunk arrives, so no `POST /v3/images` call is needed. The `type` and `name` in the path set the image type and name. The image belongs to the project and is deleted with it. The web interface uses this route when uploading firmware while creating a device. For your own code, `POST /v3/images` followed by `PUT /v3/images/{imageId}/file` is easier to follow. Returns 200 with an empty object for each stored chunk. If an upload fails for a reason other than a network error, the partial image is deleted. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. + type = 'type_example' # str | What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. + image_id = 'image_id_example' # str | An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. + name = 'name_example' # str | The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. + body = None # bytearray | + resumable_chunk_number = 3.4 # float | Which chunk this is, counting from 1. (optional) + resumable_chunk_size = 3.4 # float | The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. (optional) + resumable_current_chunk_size = 3.4 # float | Actual size in bytes of this chunk's body. (optional) + resumable_total_size = 3.4 # float | Size of the whole file in bytes. (optional) + resumable_total_chunks = 3.4 # float | How many chunks the whole file is split into. The upload completes when the last one arrives. (optional) + corellium_checksum = 'corellium_checksum_example' # str | Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. (optional) + flavor = 'flavor_example' # str | Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. (optional) + x_corellium_image_encoding = 'x_corellium_image_encoding_example' # str | How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. (optional) + x_corellium_image_encapsulated = True # bool | Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. (optional) + x_corellium_total_file_size = 3.4 # float | Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. (optional) + x_corellium_image_password = 'x_corellium_image_password_example' # str | Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. (optional) + + try: + # Upload image chunk + api_response = api_instance.v3_put_project_image_upload(project_id, type, image_id, name, body, resumable_chunk_number=resumable_chunk_number, resumable_chunk_size=resumable_chunk_size, resumable_current_chunk_size=resumable_current_chunk_size, resumable_total_size=resumable_total_size, resumable_total_chunks=resumable_total_chunks, corellium_checksum=corellium_checksum, flavor=flavor, x_corellium_image_encoding=x_corellium_image_encoding, x_corellium_image_encapsulated=x_corellium_image_encapsulated, x_corellium_total_file_size=x_corellium_total_file_size, x_corellium_image_password=x_corellium_image_password) + print("The response of ProjectsApi->v3_put_project_image_upload:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsApi->v3_put_project_image_upload: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| ID of the project. Get it from `v3ListProjects`, or from the `id` returned when the project was created. | + **type** | **str**| What kind of file this is, for example `fw` for firmware or `kernel`. Uses the same values as `type` on `POST /v3/images`; see `ImageType` for what each means. Types that need a license feature your license lacks are rejected with 403. | + **image_id** | **str**| An ID you choose for the new image: generate a random UUID once per file and use the same value for every chunk of that file. The image record is created with this ID when the first chunk arrives. Use a new UUID for each new upload. | + **name** | **str**| The file name to store, URL-encoded (for example `my%20firmware.ipsw`). Becomes the image `name`. | + **body** | **bytearray**| | + **resumable_chunk_number** | **float**| Which chunk this is, counting from 1. | [optional] + **resumable_chunk_size** | **float**| The size, in bytes, you split the file into. Use the same value for every chunk; only the last chunk may be smaller. If you send `corelliumChecksum`, this must equal the block size inside it. | [optional] + **resumable_current_chunk_size** | **float**| Actual size in bytes of this chunk's body. | [optional] + **resumable_total_size** | **float**| Size of the whole file in bytes. | [optional] + **resumable_total_chunks** | **float**| How many chunks the whole file is split into. The upload completes when the last one arrives. | [optional] + **corellium_checksum** | **str**| Optional expected checksum of the whole file, formatted `algorithm$blockSize$hash`. When given, the finished upload is checked and rejected (and the image removed) if it does not match. Required for firmware (`fw`) uploads on air-gapped deployments. | [optional] + **flavor** | **str**| Device model (`flavor` from `GET /v3/models`) the image is for. Needed for `partition` uploads when the image is not attached to a device, so the partition name can be checked against that model. | [optional] + **x_corellium_image_encoding** | **str**| How the file is stored: `plain` (normal) or `encrypted`. Only read on the first chunk, when the image record is created; later chunks cannot change it. | [optional] + **x_corellium_image_encapsulated** | **bool**| Whether the uploaded file is a ZIP wrapper the platform should unpack. Send false to store the file exactly as uploaded. Only read on the first chunk, when the image record is created. | [optional] + **x_corellium_total_file_size** | **float**| Size of the whole file in bytes. Send it on every chunk: the platform uses it to check up front that there is room for the entire file, and answers 507 if there is not, before storing any data. | [optional] + **x_corellium_image_password** | **str**| Password of a password-protected file (for example encrypted firmware), used to check the file after upload. Leave out for normal files. | [optional] + +### Return type + +**Dict[str, Optional[object]]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Chunk stored. The body is an empty JSON object. Send the next chunk; the image is finished when the last chunk arrives. | - | +**400** | Invalid chunk or upload parameters, unreadable body, or a missing/mismatched corelliumChecksum for a firmware upload. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No image with the given identifier. | - | +**507** | The image pool does not have enough space for this upload. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProjectsV1Api.md b/docs/ProjectsV1Api.md new file mode 100644 index 0000000..5381d1d --- /dev/null +++ b/docs/ProjectsV1Api.md @@ -0,0 +1,1081 @@ +# corellium.ProjectsV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_add_project_key**](ProjectsV1Api.md#v1_add_project_key) | **POST** /v1/projects/{projectId}/keys | Add Project Authorized Key +[**v1_create_project**](ProjectsV1Api.md#v1_create_project) | **POST** /v1/projects | Create a Project +[**v1_delete_project**](ProjectsV1Api.md#v1_delete_project) | **DELETE** /v1/projects/{projectId} | Delete a Project +[**v1_get_project**](ProjectsV1Api.md#v1_get_project) | **GET** /v1/projects/{projectId} | Get a Project +[**v1_get_project_instances**](ProjectsV1Api.md#v1_get_project_instances) | **GET** /v1/projects/{projectId}/instances | Get Instances in Project +[**v1_get_project_keys**](ProjectsV1Api.md#v1_get_project_keys) | **GET** /v1/projects/{projectId}/keys | Get Project Authorized Keys +[**v1_get_project_network_log**](ProjectsV1Api.md#v1_get_project_network_log) | **GET** /v1/projects/{projectId}/network/log | Retrieve the network connection log for a project +[**v1_get_project_network_status**](ProjectsV1Api.md#v1_get_project_network_status) | **GET** /v1/projects/{projectId}/network/status | Retrieve the network connection status for a project +[**v1_get_project_vpn_config**](ProjectsV1Api.md#v1_get_project_vpn_config) | **GET** /v1/projects/{projectId}/vpnconfig/{format} | Get Project VPN Configuration +[**v1_get_projects**](ProjectsV1Api.md#v1_get_projects) | **GET** /v1/projects | Get Projects +[**v1_remove_project_key**](ProjectsV1Api.md#v1_remove_project_key) | **DELETE** /v1/projects/{projectId}/keys/{keyId} | Delete Project Authorized Key +[**v1_update_project**](ProjectsV1Api.md#v1_update_project) | **PATCH** /v1/projects/{projectId} | Update a Project +[**v1_update_project_settings**](ProjectsV1Api.md#v1_update_project_settings) | **PATCH** /v1/projects/{projectId}/settings | Change Project Settings + + +# **v1_add_project_key** +> ProjectKeyV1 v1_add_project_key(project_id, project_key_v1) + +Add Project Authorized Key + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_key_v1 import ProjectKeyV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + project_key_v1 = { + "kind": "ssh", + "label": "My New Key", + "key": "ssh-ed25519 " +} # ProjectKeyV1 | Key to add + + try: + # Add Project Authorized Key + api_response = api_instance.v1_add_project_key(project_id, project_key_v1) + print("The response of ProjectsV1Api->v1_add_project_key:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_add_project_key: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **project_key_v1** | [**ProjectKeyV1**](ProjectKeyV1.md)| Key to add | + +### Return type + +[**ProjectKeyV1**](ProjectKeyV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Authorized Key | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_create_project** +> ProjectV1 v1_create_project(project_v1) + +Create a Project + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_v1 import ProjectV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_v1 = { + "name": "New Project", + "settings": { + "internet-access": true + }, + "quotas": { + "cores": 8, + "instances": 2, + "ram": 16384 + } +} # ProjectV1 | Project + + try: + # Create a Project + api_response = api_instance.v1_create_project(project_v1) + print("The response of ProjectsV1Api->v1_create_project:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_create_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_v1** | [**ProjectV1**](ProjectV1.md)| Project | + +### Return type + +[**ProjectV1**](ProjectV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_project** +> v1_delete_project(project_id) + +Delete a Project + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + + try: + # Delete a Project + api_instance.v1_delete_project(project_id) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_delete_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_project** +> ProjectWithKeysV1 v1_get_project(project_id) + +Get a Project + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_with_keys_v1 import ProjectWithKeysV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + + try: + # Get a Project + api_response = api_instance.v1_get_project(project_id) + print("The response of ProjectsV1Api->v1_get_project:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_get_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + +### Return type + +[**ProjectWithKeysV1**](ProjectWithKeysV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_project_instances** +> List[InstanceV1] v1_get_project_instances(project_id, name=name, return_attr=return_attr) + +Get Instances in Project + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_v1 import InstanceV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + name = 'name_example' # str | Filter by project name (optional) + return_attr = ['return_attr_example'] # List[str] | Attributes to include in instance return (optional) + + try: + # Get Instances in Project + api_response = api_instance.v1_get_project_instances(project_id, name=name, return_attr=return_attr) + print("The response of ProjectsV1Api->v1_get_project_instances:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_get_project_instances: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **name** | **str**| Filter by project name | [optional] + **return_attr** | [**List[str]**](str.md)| Attributes to include in instance return | [optional] + +### Return type + +[**List[InstanceV1]**](InstanceV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_project_keys** +> List[ProjectKeyV1] v1_get_project_keys(project_id) + +Get Project Authorized Keys + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_key_v1 import ProjectKeyV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + + try: + # Get Project Authorized Keys + api_response = api_instance.v1_get_project_keys(project_id) + print("The response of ProjectsV1Api->v1_get_project_keys:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_get_project_keys: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + +### Return type + +[**List[ProjectKeyV1]**](ProjectKeyV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Authorized Keys | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_project_network_log** +> str v1_get_project_network_log(project_id) + +Retrieve the network connection log for a project + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID (must be a valid UUID) + + try: + # Retrieve the network connection log for a project + api_response = api_instance.v1_get_project_network_log(project_id) + print("The response of ProjectsV1Api->v1_get_project_network_log:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_get_project_network_log: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID (must be a valid UUID) | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**503** | Service Unavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_project_network_status** +> NetworkStatusResponse v1_get_project_network_status(project_id) + +Retrieve the network connection status for a project + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.network_status_response import NetworkStatusResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + + try: + # Retrieve the network connection status for a project + api_response = api_instance.v1_get_project_network_status(project_id) + print("The response of ProjectsV1Api->v1_get_project_network_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_get_project_network_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + +### Return type + +[**NetworkStatusResponse**](NetworkStatusResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_project_vpn_config** +> str v1_get_project_vpn_config(project_id, format) + +Get Project VPN Configuration + +A Project VPN allows connection _into_ virtual devices in the project (e.g., connecting a researcher's computer as a VPN client to a virtual device within the project). If a Project VPN has been defined, this will return the configuration. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + format = 'format_example' # str | VPN Config format + + try: + # Get Project VPN Configuration + api_response = api_instance.v1_get_project_vpn_config(project_id, format) + print("The response of ProjectsV1Api->v1_get_project_vpn_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_get_project_vpn_config: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **format** | **str**| VPN Config format | + +### Return type + +**str** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OpenVPN Configuration | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_projects** +> List[ProjectWithKeysV1] v1_get_projects(name=name, ids_only=ids_only) + +Get Projects + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_with_keys_v1 import ProjectWithKeysV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + name = 'name_example' # str | Filter by project name (optional) + ids_only = True # bool | Only include id of project in results (optional) + + try: + # Get Projects + api_response = api_instance.v1_get_projects(name=name, ids_only=ids_only) + print("The response of ProjectsV1Api->v1_get_projects:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_get_projects: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| Filter by project name | [optional] + **ids_only** | **bool**| Only include id of project in results | [optional] + +### Return type + +[**List[ProjectWithKeysV1]**](ProjectWithKeysV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Projects | - | +**403** | Forbidden | - | +**404** | No Projects Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_remove_project_key** +> v1_remove_project_key(project_id, key_id) + +Delete Project Authorized Key + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + key_id = 'key_id_example' # str | Key ID - uuid + + try: + # Delete Project Authorized Key + api_instance.v1_remove_project_key(project_id, key_id) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_remove_project_key: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **key_id** | **str**| Key ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Deleted | - | +**403** | Forbidden | - | +**404** | Not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_project** +> ProjectV1 v1_update_project(project_id, project_v1) + +Update a Project + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_v1 import ProjectV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + project_v1 = corellium.ProjectV1() # ProjectV1 | Updated Project Settings + + try: + # Update a Project + api_response = api_instance.v1_update_project(project_id, project_v1) + print("The response of ProjectsV1Api->v1_update_project:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_update_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **project_v1** | [**ProjectV1**](ProjectV1.md)| Updated Project Settings | + +### Return type + +[**ProjectV1**](ProjectV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_project_settings** +> v1_update_project_settings(project_id, project_settings_v1) + +Change Project Settings + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.project_settings_v1 import ProjectSettingsV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.ProjectsV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + project_settings_v1 = corellium.ProjectSettingsV1() # ProjectSettingsV1 | New settings + + try: + # Change Project Settings + api_instance.v1_update_project_settings(project_id, project_settings_v1) + except Exception as e: + print("Exception when calling ProjectsV1Api->v1_update_project_settings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **project_settings_v1** | [**ProjectSettingsV1**](ProjectSettingsV1.md)| New settings | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**400** | Validation Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ProviderNetworkConnection.md b/docs/ProviderNetworkConnection.md new file mode 100644 index 0000000..3a5d588 --- /dev/null +++ b/docs/ProviderNetworkConnection.md @@ -0,0 +1,37 @@ +# ProviderNetworkConnection + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**VLANConfig**](VLANConfig.md) | | [optional] +**identifier** | **str** | Unique identifier for the network connection. | +**projects** | [**Dict[str, OpenVPNNetworkConnectionProjectsValue]**](OpenVPNNetworkConnectionProjectsValue.md) | Network states mapped by project IDs. | [optional] +**created_at** | **datetime** | Timestamp when the network connection was created. | +**updated_at** | **datetime** | Timestamp when the network connection was last updated. | +**created_by** | **str** | User ID of the creator. | +**updated_by** | **str** | User ID of the last updater. | + +## Example + +```python +from corellium.models.provider_network_connection import ProviderNetworkConnection + +# TODO update the JSON string below +json = "{}" +# create an instance of ProviderNetworkConnection from a JSON string +provider_network_connection_instance = ProviderNetworkConnection.from_json(json) +# print the JSON string representation of the object +print(ProviderNetworkConnection.to_json()) + +# convert the object into a dict +provider_network_connection_dict = provider_network_connection_instance.to_dict() +# create an instance of ProviderNetworkConnection from a dict +provider_network_connection_from_dict = ProviderNetworkConnection.from_dict(provider_network_connection_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProxyConfig.md b/docs/ProxyConfig.md index 3f7bfd2..e71e86b 100644 --- a/docs/ProxyConfig.md +++ b/docs/ProxyConfig.md @@ -3,6 +3,7 @@ Represents a Proxy configuration object. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **device_port** | **float** | The device port to use for proxying. | [optional] @@ -10,6 +11,23 @@ Name | Type | Description | Notes **expose** | **bool** | If `true`, the proxy will be exposed to the external interface. | [optional] **router_port** | **float** | The router port to use for proxying. | [optional] +## Example + +```python +from corellium.models.proxy_config import ProxyConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of ProxyConfig from a JSON string +proxy_config_instance = ProxyConfig.from_json(json) +# print the JSON string representation of the object +print(ProxyConfig.to_json()) + +# convert the object into a dict +proxy_config_dict = proxy_config_instance.to_dict() +# create an instance of ProxyConfig from a dict +proxy_config_from_dict = ProxyConfig.from_dict(proxy_config_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RAMDumpApi.md b/docs/RAMDumpApi.md new file mode 100644 index 0000000..08b3828 --- /dev/null +++ b/docs/RAMDumpApi.md @@ -0,0 +1,279 @@ +# corellium.RAMDumpApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_clear_ram_dump**](RAMDumpApi.md#v3_clear_ram_dump) | **DELETE** /v3/instances/{instanceId}/ramdump | Delete a RAM dump +[**v3_ram_dump_preauthorize**](RAMDumpApi.md#v3_ram_dump_preauthorize) | **GET** /v3/instances/{instanceId}/ramdump-authorize | Get a RAM dump download token +[**v3_start_ram_dump**](RAMDumpApi.md#v3_start_ram_dump) | **POST** /v3/instances/{instanceId}/ramdump/start | Start a RAM dump + + +# **v3_clear_ram_dump** +> v3_clear_ram_dump(instance_id) + +Delete a RAM dump + +Deletes this device's RAM dump file. Returns 204 whether or not a dump existed. Requires the RAM dump license feature. An unknown `instanceId` is a successful no-op that returns 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RAMDumpApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Delete a RAM dump + api_instance.v3_clear_ram_dump(instance_id) + except Exception as e: + print("Exception when calling RAMDumpApi->v3_clear_ram_dump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_ram_dump_preauthorize** +> Token v3_ram_dump_preauthorize(instance_id) + +Get a RAM dump download token + +Returns a short-lived token that authorizes downloading this device's RAM dump without an `Authorization` header, so you can hand the link to a download manager or browser. Download with `GET /v1/preauthed/{token}/{filename}`. The token works only for this device's RAM dump and expires when your current session token expires. Requires the RAM dump license feature. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.token import Token +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RAMDumpApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Get a RAM dump download token + api_response = api_instance.v3_ram_dump_preauthorize(instance_id) + print("The response of RAMDumpApi->v3_ram_dump_preauthorize:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RAMDumpApi->v3_ram_dump_preauthorize: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +[**Token**](Token.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_start_ram_dump** +> v3_start_ram_dump(instance_id) + +Start a RAM dump + +Captures the full contents of the device's memory to a file, for offline analysis with memory forensics tools. Returns 202 as soon as the dump has started; it is written in the background, and large memory sizes take a while. Download it with `v3RamDumpPreauthorize` when it is done, and delete it with `v3ClearRamDump`. Requires the RAM dump license feature (403 otherwise). + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RAMDumpApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance ID. + + try: + # Start a RAM dump + api_instance.v3_start_ram_dump(instance_id) + except Exception as e: + print("Exception when calling RAMDumpApi->v3_start_ram_dump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | RAM dump started. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**409** | The request conflicts with the current state of the resource. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RAMDumpV1Api.md b/docs/RAMDumpV1Api.md new file mode 100644 index 0000000..5e238a2 --- /dev/null +++ b/docs/RAMDumpV1Api.md @@ -0,0 +1,270 @@ +# corellium.RAMDumpV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_clear_ram_dump**](RAMDumpV1Api.md#v1_clear_ram_dump) | **DELETE** /v1/instances/{instanceId}/ramdump | Clear RAM Dump +[**v1_ram_dump_preauthorize**](RAMDumpV1Api.md#v1_ram_dump_preauthorize) | **GET** /v1/instances/{instanceId}/ramdump-authorize | Pre-authorize a RAM Dump download +[**v1_start_ram_dump**](RAMDumpV1Api.md#v1_start_ram_dump) | **POST** /v1/instances/{instanceId}/ramdump/start | Start a RAM Dump on an instance + + +# **v1_clear_ram_dump** +> v1_clear_ram_dump(instance_id) + +Clear RAM Dump + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RAMDumpV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Clear RAM Dump + api_instance.v1_clear_ram_dump(instance_id) + except Exception as e: + print("Exception when calling RAMDumpV1Api->v1_clear_ram_dump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_ram_dump_preauthorize** +> TokenV1 v1_ram_dump_preauthorize(instance_id) + +Pre-authorize a RAM Dump download + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.token_v1 import TokenV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RAMDumpV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Pre-authorize a RAM Dump download + api_response = api_instance.v1_ram_dump_preauthorize(instance_id) + print("The response of RAMDumpV1Api->v1_ram_dump_preauthorize:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RAMDumpV1Api->v1_ram_dump_preauthorize: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**TokenV1**](TokenV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_start_ram_dump** +> v1_start_ram_dump(instance_id) + +Start a RAM Dump on an instance + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RAMDumpV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Start a RAM Dump on an instance + api_instance.v1_start_ram_dump(instance_id) + except Exception as e: + print("Exception when calling RAMDumpV1Api->v1_start_ram_dump: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**409** | Conflict | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RateInfo.md b/docs/RateInfo.md deleted file mode 100644 index 97cbc68..0000000 --- a/docs/RateInfo.md +++ /dev/null @@ -1,13 +0,0 @@ -# RateInfo - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**on_rate_microcents** | **int** | The amount per second, in microcents (USD), that this instance charges to be running. | [optional] -**off_rate_microcents** | **int** | The amount per second, in microcents (USD), that this instance charges to be stored. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RegisterServiceBody.md b/docs/RegisterServiceBody.md new file mode 100644 index 0000000..825cc44 --- /dev/null +++ b/docs/RegisterServiceBody.md @@ -0,0 +1,36 @@ +# RegisterServiceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Service password, must match the configured service password. | +**node_id** | **str** | Node identifier. | +**address** | **str** | Service address (IP:Port). | +**service_name** | **str** | Service name (e.g. mast, c3po, iptables-nat). | +**endpoints** | [**List[ServiceEndpointSchema]**](ServiceEndpointSchema.md) | Endpoints this service exposes. Replaces any previously registered endpoints for this address. | [optional] +**identity_key** | **str** | Identity key for mutual authentication. | +**ca_cert** | **str** | CA certificate. | +**cert_fingerprint** | **str** | Certificate fingerprint. | + +## Example + +```python +from corellium.models.register_service_body import RegisterServiceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of RegisterServiceBody from a JSON string +register_service_body_instance = RegisterServiceBody.from_json(json) +# print the JSON string representation of the object +print(RegisterServiceBody.to_json()) + +# convert the object into a dict +register_service_body_dict = register_service_body_instance.to_dict() +# create an instance of RegisterServiceBody from a dict +register_service_body_from_dict = RegisterServiceBody.from_dict(register_service_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReportModificationInput.md b/docs/ReportModificationInput.md new file mode 100644 index 0000000..394e61d --- /dev/null +++ b/docs/ReportModificationInput.md @@ -0,0 +1,32 @@ +# ReportModificationInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**check_id** | **str** | Identifier of the check to modify. | +**var_property** | **str** | Property of the check to modify: \"outcome\", \"severity\", or \"evidence_<index>\". | +**suppressed** | **bool** | For an \"evidence_<index>\" property, whether the evidence entry is suppressed. Required for evidence modifications. | [optional] +**value** | **str** | New value for the property. Required for \"outcome\" and \"severity\"; must be omitted for \"evidence_<index>\". | [optional] + +## Example + +```python +from corellium.models.report_modification_input import ReportModificationInput + +# TODO update the JSON string below +json = "{}" +# create an instance of ReportModificationInput from a JSON string +report_modification_input_instance = ReportModificationInput.from_json(json) +# print the JSON string representation of the object +print(ReportModificationInput.to_json()) + +# convert the object into a dict +report_modification_input_dict = report_modification_input_instance.to_dict() +# create an instance of ReportModificationInput from a dict +report_modification_input_from_dict = ReportModificationInput.from_dict(report_modification_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReportModificationResult.md b/docs/ReportModificationResult.md new file mode 100644 index 0000000..d5f5b0f --- /dev/null +++ b/docs/ReportModificationResult.md @@ -0,0 +1,32 @@ +# ReportModificationResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**check_id** | **str** | Identifier of the check the modification applied to. | +**var_property** | **str** | Property of the check that was modified. | +**status** | **str** | Outcome of applying the modification. | +**error** | **str** | Explanation when the modification was ignored or errored. | [optional] + +## Example + +```python +from corellium.models.report_modification_result import ReportModificationResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ReportModificationResult from a JSON string +report_modification_result_instance = ReportModificationResult.from_json(json) +# print the JSON string representation of the object +print(ReportModificationResult.to_json()) + +# convert the object into a dict +report_modification_result_dict = report_modification_result_instance.to_dict() +# create an instance of ReportModificationResult from a dict +report_modification_result_from_dict = ReportModificationResult.from_dict(report_modification_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResetLinkBody.md b/docs/ResetLinkBody.md index edffa6c..91c9075 100644 --- a/docs/ResetLinkBody.md +++ b/docs/ResetLinkBody.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | Email address to request password reset link for | +## Example + +```python +from corellium.models.reset_link_body import ResetLinkBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ResetLinkBody from a JSON string +reset_link_body_instance = ResetLinkBody.from_json(json) +# print the JSON string representation of the object +print(ResetLinkBody.to_json()) + +# convert the object into a dict +reset_link_body_dict = reset_link_body_instance.to_dict() +# create an instance of ResetLinkBody from a dict +reset_link_body_from_dict = ResetLinkBody.from_dict(reset_link_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResetLinkInfo.md b/docs/ResetLinkInfo.md new file mode 100644 index 0000000..7fb227a --- /dev/null +++ b/docs/ResetLinkInfo.md @@ -0,0 +1,31 @@ +# ResetLinkInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | User identifier. | +**username** | **str** | Username. | +**domain** | **str** | Domain name. | + +## Example + +```python +from corellium.models.reset_link_info import ResetLinkInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of ResetLinkInfo from a JSON string +reset_link_info_instance = ResetLinkInfo.from_json(json) +# print the JSON string representation of the object +print(ResetLinkInfo.to_json()) + +# convert the object into a dict +reset_link_info_dict = reset_link_info_instance.to_dict() +# create an instance of ResetLinkInfo from a dict +reset_link_info_from_dict = ResetLinkInfo.from_dict(reset_link_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResetLinkInfoReturn.md b/docs/ResetLinkInfoReturn.md index 0ea16f1..983e987 100644 --- a/docs/ResetLinkInfoReturn.md +++ b/docs/ResetLinkInfoReturn.md @@ -3,12 +3,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user_id** | **str** | The user identifier | [optional] **username** | **str** | The user name | [optional] **domain** | **str** | The domain name | [optional] +## Example + +```python +from corellium.models.reset_link_info_return import ResetLinkInfoReturn + +# TODO update the JSON string below +json = "{}" +# create an instance of ResetLinkInfoReturn from a JSON string +reset_link_info_return_instance = ResetLinkInfoReturn.from_json(json) +# print the JSON string representation of the object +print(ResetLinkInfoReturn.to_json()) + +# convert the object into a dict +reset_link_info_return_dict = reset_link_info_return_instance.to_dict() +# create an instance of ResetLinkInfoReturn from a dict +reset_link_info_return_from_dict = ResetLinkInfoReturn.from_dict(reset_link_info_return_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResetPasswordBody.md b/docs/ResetPasswordBody.md new file mode 100644 index 0000000..3add39f --- /dev/null +++ b/docs/ResetPasswordBody.md @@ -0,0 +1,31 @@ +# ResetPasswordBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Password reset token. | +**new_password** | **str** | New password. | +**totp_token** | **str** | TOTP token when two-factor is required. | [optional] + +## Example + +```python +from corellium.models.reset_password_body import ResetPasswordBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ResetPasswordBody from a JSON string +reset_password_body_instance = ResetPasswordBody.from_json(json) +# print the JSON string representation of the object +print(ResetPasswordBody.to_json()) + +# convert the object into a dict +reset_password_body_dict = reset_password_body_instance.to_dict() +# create an instance of ResetPasswordBody from a dict +reset_password_body_from_dict = ResetPasswordBody.from_dict(reset_password_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResetUnauthorizedResponse.md b/docs/ResetUnauthorizedResponse.md new file mode 100644 index 0000000..a96fcdb --- /dev/null +++ b/docs/ResetUnauthorizedResponse.md @@ -0,0 +1,30 @@ +# ResetUnauthorizedResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text. | +**error_id** | **str** | Error ID. | + +## Example + +```python +from corellium.models.reset_unauthorized_response import ResetUnauthorizedResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ResetUnauthorizedResponse from a JSON string +reset_unauthorized_response_instance = ResetUnauthorizedResponse.from_json(json) +# print the JSON string representation of the object +print(ResetUnauthorizedResponse.to_json()) + +# convert the object into a dict +reset_unauthorized_response_dict = reset_unauthorized_response_instance.to_dict() +# create an instance of ResetUnauthorizedResponse from a dict +reset_unauthorized_response_from_dict = ResetUnauthorizedResponse.from_dict(reset_unauthorized_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RestoreBackupBody.md b/docs/RestoreBackupBody.md new file mode 100644 index 0000000..8af73d1 --- /dev/null +++ b/docs/RestoreBackupBody.md @@ -0,0 +1,29 @@ +# RestoreBackupBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Password of the backup file. Needed only if the backup is encrypted; leave it out for an unencrypted backup. | [optional] + +## Example + +```python +from corellium.models.restore_backup_body import RestoreBackupBody + +# TODO update the JSON string below +json = "{}" +# create an instance of RestoreBackupBody from a JSON string +restore_backup_body_instance = RestoreBackupBody.from_json(json) +# print the JSON string representation of the object +print(RestoreBackupBody.to_json()) + +# convert the object into a dict +restore_backup_body_dict = restore_backup_body_instance.to_dict() +# create an instance of RestoreBackupBody from a dict +restore_backup_body_from_dict = RestoreBackupBody.from_dict(restore_backup_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RestoreBackupData.md b/docs/RestoreBackupData.md index 7116112..542d9cb 100644 --- a/docs/RestoreBackupData.md +++ b/docs/RestoreBackupData.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **password** | **str** | Required for encrypted backup | [optional] +## Example + +```python +from corellium.models.restore_backup_data import RestoreBackupData + +# TODO update the JSON string below +json = "{}" +# create an instance of RestoreBackupData from a JSON string +restore_backup_data_instance = RestoreBackupData.from_json(json) +# print the JSON string representation of the object +print(RestoreBackupData.to_json()) + +# convert the object into a dict +restore_backup_data_dict = restore_backup_data_instance.to_dict() +# create an instance of RestoreBackupData from a dict +restore_backup_data_from_dict = RestoreBackupData.from_dict(restore_backup_data_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RevokeInvitesBody.md b/docs/RevokeInvitesBody.md new file mode 100644 index 0000000..2c01f75 --- /dev/null +++ b/docs/RevokeInvitesBody.md @@ -0,0 +1,29 @@ +# RevokeInvitesBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ids** | **List[str]** | Invite IDs to operate on. | + +## Example + +```python +from corellium.models.revoke_invites_body import RevokeInvitesBody + +# TODO update the JSON string below +json = "{}" +# create an instance of RevokeInvitesBody from a JSON string +revoke_invites_body_instance = RevokeInvitesBody.from_json(json) +# print the JSON string representation of the object +print(RevokeInvitesBody.to_json()) + +# convert the object into a dict +revoke_invites_body_dict = revoke_invites_body_instance.to_dict() +# create an instance of RevokeInvitesBody from a dict +revoke_invites_body_from_dict = RevokeInvitesBody.from_dict(revoke_invites_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RevokeInvitesResponse.md b/docs/RevokeInvitesResponse.md new file mode 100644 index 0000000..57b093e --- /dev/null +++ b/docs/RevokeInvitesResponse.md @@ -0,0 +1,29 @@ +# RevokeInvitesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deleted_count** | **float** | Number of invites revoked. | + +## Example + +```python +from corellium.models.revoke_invites_response import RevokeInvitesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RevokeInvitesResponse from a JSON string +revoke_invites_response_instance = RevokeInvitesResponse.from_json(json) +# print the JSON string representation of the object +print(RevokeInvitesResponse.to_json()) + +# convert the object into a dict +revoke_invites_response_dict = revoke_invites_response_instance.to_dict() +# create an instance of RevokeInvitesResponse from a dict +revoke_invites_response_from_dict = RevokeInvitesResponse.from_dict(revoke_invites_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Role.md b/docs/Role.md index d2efc1a..8e960db 100644 --- a/docs/Role.md +++ b/docs/Role.md @@ -1,14 +1,33 @@ # Role - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**role** | **str** | | -**project** | **str** | Project ID | -**user** | **str** | User ID | +**role** | [**RoleName**](RoleName.md) | | +**project** | **str** | Project identifier (when scoped to a project). | [optional] +**deployment** | **str** | Deployment identifier (when scoped to a deployment). | [optional] +**user** | **str** | User identifier (when granted to a user). | [optional] +**team** | **str** | Team identifier (when granted to a team). | [optional] + +## Example + +```python +from corellium.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print(Role.to_json()) +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_from_dict = Role.from_dict(role_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RoleName.md b/docs/RoleName.md new file mode 100644 index 0000000..cc7f310 --- /dev/null +++ b/docs/RoleName.md @@ -0,0 +1,13 @@ +# RoleName + +Role identifier. + +## Enum + +* `ADMIN` (value: `'admin'`) + +* `MEMBER` (value: `'member'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleV1.md b/docs/RoleV1.md new file mode 100644 index 0000000..78e8f22 --- /dev/null +++ b/docs/RoleV1.md @@ -0,0 +1,33 @@ +# RoleV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**role** | **str** | | +**project** | **str** | Project ID. Omitted for domain/global roles | [optional] +**user** | **str** | User ID. Omitted for team roles | [optional] +**team** | **str** | Team ID. Present on team roles instead of user | [optional] + +## Example + +```python +from corellium.models.role_v1 import RoleV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of RoleV1 from a JSON string +role_v1_instance = RoleV1.from_json(json) +# print the JSON string representation of the object +print(RoleV1.to_json()) + +# convert the object into a dict +role_v1_dict = role_v1_instance.to_dict() +# create an instance of RoleV1 from a dict +role_v1_from_dict = RoleV1.from_dict(role_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RolesApi.md b/docs/RolesApi.md new file mode 100644 index 0000000..6ecb1be --- /dev/null +++ b/docs/RolesApi.md @@ -0,0 +1,904 @@ +# corellium.RolesApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_add_team_role_to_deployment**](RolesApi.md#v3_add_team_role_to_deployment) | **PUT** /v3/roles/deployments/{deploymentId}/teams/{teamId}/roles/{roleId} | Add team role to deployment +[**v3_add_team_role_to_project**](RolesApi.md#v3_add_team_role_to_project) | **PUT** /v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Add team role to project +[**v3_add_user_role_to_deployment**](RolesApi.md#v3_add_user_role_to_deployment) | **PUT** /v3/roles/deployments/{deploymentId}/users/{userId}/roles/{roleId} | Add user role to deployment +[**v3_add_user_role_to_project**](RolesApi.md#v3_add_user_role_to_project) | **PUT** /v3/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Add user role to project +[**v3_list_deployment_roles**](RolesApi.md#v3_list_deployment_roles) | **GET** /v3/roles/deployments | List deployment role assignments +[**v3_list_roles**](RolesApi.md#v3_list_roles) | **GET** /v3/roles | List all role assignments for the caller's domain +[**v3_remove_team_role_from_deployment**](RolesApi.md#v3_remove_team_role_from_deployment) | **DELETE** /v3/roles/deployments/{deploymentId}/teams/{teamId}/roles/{roleId} | Remove team role from deployment +[**v3_remove_team_role_from_project**](RolesApi.md#v3_remove_team_role_from_project) | **DELETE** /v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Remove team role from project +[**v3_remove_user_role_from_deployment**](RolesApi.md#v3_remove_user_role_from_deployment) | **DELETE** /v3/roles/deployments/{deploymentId}/users/{userId}/roles/{roleId} | Remove user role from deployment +[**v3_remove_user_role_from_project**](RolesApi.md#v3_remove_user_role_from_project) | **DELETE** /v3/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Remove user role from project + + +# **v3_add_team_role_to_deployment** +> v3_add_team_role_to_deployment(deployment_id, team_id, role_id) + +Add team role to deployment + +**Required role:** Domain administrator. + +Grants a team a role within a deployment. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + deployment_id = 'prod-us-east' # str | Deployment identifier. + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' # str | Team identifier. + role_id = 'admin' # str | Role identifier. + + try: + # Add team role to deployment + api_instance.v3_add_team_role_to_deployment(deployment_id, team_id, role_id) + except Exception as e: + print("Exception when calling RolesApi->v3_add_team_role_to_deployment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **str**| Deployment identifier. | + **team_id** | **str**| Team identifier. | + **role_id** | **str**| Role identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role assigned. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Deployment, team, or role not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_add_team_role_to_project** +> v3_add_team_role_to_project(project_id, team_id, role_id) + +Add team role to project + +**Required role:** Domain administrator or project administrator. + +Gives every member of a team a role on a project. Pass `all-users` as `teamId` to give the role to everyone in your domain. People added to the team later get the access automatically. Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | Project identifier. + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' # str | Team ID from `GET /v3/teams`, or `all-users` to grant the role to everyone in your domain at once. + role_id = 'admin' # str | Role to grant or remove: `admin` or `member`. See `RoleName`. + + try: + # Add team role to project + api_instance.v3_add_team_role_to_project(project_id, team_id, role_id) + except Exception as e: + print("Exception when calling RolesApi->v3_add_team_role_to_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project identifier. | + **team_id** | **str**| Team ID from `GET /v3/teams`, or `all-users` to grant the role to everyone in your domain at once. | + **role_id** | **str**| Role to grant or remove: `admin` or `member`. See `RoleName`. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role assigned. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Project, team, or role not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_add_user_role_to_deployment** +> v3_add_user_role_to_deployment(deployment_id, user_id, role_id) + +Add user role to deployment + +**Required role:** Domain administrator. + +Grants a user a role within a deployment. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + deployment_id = 'prod-us-east' # str | Deployment identifier. + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | User identifier. + role_id = 'admin' # str | Role identifier. + + try: + # Add user role to deployment + api_instance.v3_add_user_role_to_deployment(deployment_id, user_id, role_id) + except Exception as e: + print("Exception when calling RolesApi->v3_add_user_role_to_deployment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **str**| Deployment identifier. | + **user_id** | **str**| User identifier. | + **role_id** | **str**| Role identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role assigned. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Deployment, user, or role not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_add_user_role_to_project** +> v3_add_user_role_to_project(project_id, user_id, role_id) + +Add user role to project + +**Required role:** Domain administrator or project administrator. + +Gives a user a role on a project: `member` to use the project and its devices, or `admin` to also manage it. This is how a new user gets access to a project. Requires a domain administrator, or a project administrator of that project. Returns 404 if the project, user or role does not exist. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | Project identifier. + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | User identifier. + role_id = 'admin' # str | Role to grant or remove: `admin` or `member`. See `RoleName`. + + try: + # Add user role to project + api_instance.v3_add_user_role_to_project(project_id, user_id, role_id) + except Exception as e: + print("Exception when calling RolesApi->v3_add_user_role_to_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project identifier. | + **user_id** | **str**| User identifier. | + **role_id** | **str**| Role to grant or remove: `admin` or `member`. See `RoleName`. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role assigned. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Project, user, or role not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_deployment_roles** +> RolesListResponse v3_list_deployment_roles(limit=limit, offset=offset) + +List deployment role assignments + +**Required role:** Domain administrator or project administrator. + +Returns paginated role assignments scoped to deployments. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.roles_list_response import RolesListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List deployment role assignments + api_response = api_instance.v3_list_deployment_roles(limit=limit, offset=offset) + print("The response of RolesApi->v3_list_deployment_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RolesApi->v3_list_deployment_roles: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**RolesListResponse**](RolesListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of deployment role assignments. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_roles** +> RolesListResponse v3_list_roles(limit=limit, offset=offset) + +List all role assignments for the caller's domain + +**Required role:** Domain administrator or project administrator. + +Lists who has which role on which project in your domain, for both individual users and teams: each entry names a role and either a `user` or a `team`, plus the `project`. Use it to audit access. Requires a domain or project administrator. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.roles_list_response import RolesListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List all role assignments for the caller's domain + api_response = api_instance.v3_list_roles(limit=limit, offset=offset) + print("The response of RolesApi->v3_list_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RolesApi->v3_list_roles: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**RolesListResponse**](RolesListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of role assignments. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_remove_team_role_from_deployment** +> v3_remove_team_role_from_deployment(deployment_id, team_id, role_id) + +Remove team role from deployment + +**Required role:** Domain administrator. + +Revokes a team role within a deployment. Available for Enterprise accounts only. + +Revocation is idempotent: if the team does not currently hold that role in the deployment, the call is a +no-op and still returns 204. Repeated calls therefore also return 204. A `deploymentId` or `teamId` that does not exist +is also a successful no-op that returns 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + deployment_id = 'prod-us-east' # str | Deployment identifier. + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' # str | Team identifier. + role_id = 'admin' # str | Role identifier. + + try: + # Remove team role from deployment + api_instance.v3_remove_team_role_from_deployment(deployment_id, team_id, role_id) + except Exception as e: + print("Exception when calling RolesApi->v3_remove_team_role_from_deployment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **str**| Deployment identifier. | + **team_id** | **str**| Team identifier. | + **role_id** | **str**| Role identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role removed, or the team did not hold the role. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_remove_team_role_from_project** +> v3_remove_team_role_from_project(project_id, team_id, role_id) + +Remove team role from project + +**Required role:** Domain administrator or project administrator. + +Takes a role on a project away from a team, so its members lose the access they had through it. Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. + +Revocation is idempotent: if the team does not currently hold that role in the project, the call is a +no-op and still returns 204. Repeated calls therefore also return 204. A `projectId` or `teamId` that does not exist +is also a successful no-op that returns 204. A project administrator acting on another +project in their own domain receives 403. +An unrecognized `roleId` returns 400. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | Project identifier. + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' # str | Team identifier. + role_id = 'admin' # str | Role to grant or remove: `admin` or `member`. See `RoleName`. + + try: + # Remove team role from project + api_instance.v3_remove_team_role_from_project(project_id, team_id, role_id) + except Exception as e: + print("Exception when calling RolesApi->v3_remove_team_role_from_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project identifier. | + **team_id** | **str**| Team identifier. | + **role_id** | **str**| Role to grant or remove: `admin` or `member`. See `RoleName`. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role removed, or the team did not hold the role. | - | +**400** | Unrecognized role. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_remove_user_role_from_deployment** +> v3_remove_user_role_from_deployment(deployment_id, user_id, role_id) + +Remove user role from deployment + +**Required role:** Domain administrator. + +Revokes a user role within a deployment. Available for Enterprise accounts only. + +Revocation is idempotent: if the user does not currently hold that role in the deployment, the call is a +no-op and still returns 204. Repeated calls therefore also return 204. A `deploymentId` or `userId` that does not exist +is also a successful no-op that returns 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + deployment_id = 'prod-us-east' # str | Deployment identifier. + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | User identifier. + role_id = 'admin' # str | Role identifier. + + try: + # Remove user role from deployment + api_instance.v3_remove_user_role_from_deployment(deployment_id, user_id, role_id) + except Exception as e: + print("Exception when calling RolesApi->v3_remove_user_role_from_deployment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deployment_id** | **str**| Deployment identifier. | + **user_id** | **str**| User identifier. | + **role_id** | **str**| Role identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role removed, or the user did not hold the role. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_remove_user_role_from_project** +> v3_remove_user_role_from_project(project_id, user_id, role_id) + +Remove user role from project + +**Required role:** Domain administrator or project administrator. + +Takes a role on a project away from a user, so they lose that access (unless they also have it through a team). Requires a domain administrator, or a project administrator of that project. Available for Enterprise accounts only. + +Revocation is idempotent: if the user does not currently hold that role in the project, the call is a +no-op and still returns 204. Repeated calls therefore also return 204. A `projectId` or `userId` that does not exist +is also a successful no-op that returns 204. A project administrator acting on another +project in their own domain receives 403. +An unrecognized `roleId` returns 400. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesApi(api_client) + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960' # str | Project identifier. + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | User identifier. + role_id = 'admin' # str | Role to grant or remove: `admin` or `member`. See `RoleName`. + + try: + # Remove user role from project + api_instance.v3_remove_user_role_from_project(project_id, user_id, role_id) + except Exception as e: + print("Exception when calling RolesApi->v3_remove_user_role_from_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project identifier. | + **user_id** | **str**| User identifier. | + **role_id** | **str**| Role to grant or remove: `admin` or `member`. See `RoleName`. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Role removed, or the user did not hold the role. | - | +**400** | Unrecognized role. | - | +**403** | Domain administrator or project administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RolesListResponse.md b/docs/RolesListResponse.md new file mode 100644 index 0000000..26eaef8 --- /dev/null +++ b/docs/RolesListResponse.md @@ -0,0 +1,34 @@ +# RolesListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Role]**](Role.md) | Array of role assignments. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.roles_list_response import RolesListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of RolesListResponse from a JSON string +roles_list_response_instance = RolesListResponse.from_json(json) +# print the JSON string representation of the object +print(RolesListResponse.to_json()) + +# convert the object into a dict +roles_list_response_dict = roles_list_response_instance.to_dict() +# create an instance of RolesListResponse from a dict +roles_list_response_from_dict = RolesListResponse.from_dict(roles_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RolesV1Api.md b/docs/RolesV1Api.md new file mode 100644 index 0000000..c91f1e8 --- /dev/null +++ b/docs/RolesV1Api.md @@ -0,0 +1,443 @@ +# corellium.RolesV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_add_team_role_to_project**](RolesV1Api.md#v1_add_team_role_to_project) | **PUT** /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Add team role to project +[**v1_add_user_role_to_project**](RolesV1Api.md#v1_add_user_role_to_project) | **PUT** /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Add user role to project +[**v1_remove_team_role_from_project**](RolesV1Api.md#v1_remove_team_role_from_project) | **DELETE** /v1/roles/projects/{projectId}/teams/{teamId}/roles/{roleId} | Remove team role from project +[**v1_remove_user_role_from_project**](RolesV1Api.md#v1_remove_user_role_from_project) | **DELETE** /v1/roles/projects/{projectId}/users/{userId}/roles/{roleId} | Remove user role from project +[**v1_roles**](RolesV1Api.md#v1_roles) | **GET** /v1/roles | Get all roles + + +# **v1_add_team_role_to_project** +> v1_add_team_role_to_project(project_id, team_id, role_id) + +Add team role to project + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + team_id = 'team_id_example' # str | Team ID - uuid + role_id = 'role_id_example' # str | Role ID + + try: + # Add team role to project + api_instance.v1_add_team_role_to_project(project_id, team_id, role_id) + except Exception as e: + print("Exception when calling RolesV1Api->v1_add_team_role_to_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **team_id** | **str**| Team ID - uuid | + **role_id** | **str**| Role ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_add_user_role_to_project** +> v1_add_user_role_to_project(project_id, user_id, role_id) + +Add user role to project + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + user_id = 'user_id_example' # str | User ID - uuid + role_id = 'role_id_example' # str | Role ID + + try: + # Add user role to project + api_instance.v1_add_user_role_to_project(project_id, user_id, role_id) + except Exception as e: + print("Exception when calling RolesV1Api->v1_add_user_role_to_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **user_id** | **str**| User ID - uuid | + **role_id** | **str**| Role ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_remove_team_role_from_project** +> v1_remove_team_role_from_project(project_id, team_id, role_id) + +Remove team role from project + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + team_id = 'team_id_example' # str | Team ID - uuid + role_id = 'role_id_example' # str | Role ID + + try: + # Remove team role from project + api_instance.v1_remove_team_role_from_project(project_id, team_id, role_id) + except Exception as e: + print("Exception when calling RolesV1Api->v1_remove_team_role_from_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **team_id** | **str**| Team ID - uuid | + **role_id** | **str**| Role ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_remove_user_role_from_project** +> v1_remove_user_role_from_project(project_id, user_id, role_id) + +Remove user role from project + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesV1Api(api_client) + project_id = 'project_id_example' # str | Project ID - uuid + user_id = 'user_id_example' # str | User ID - uuid + role_id = 'role_id_example' # str | Role ID + + try: + # Remove user role from project + api_instance.v1_remove_user_role_from_project(project_id, user_id, role_id) + except Exception as e: + print("Exception when calling RolesV1Api->v1_remove_user_role_from_project: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Project ID - uuid | + **user_id** | **str**| User ID - uuid | + **role_id** | **str**| Role ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_roles** +> List[RoleV1] v1_roles() + +Get all roles + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.role_v1 import RoleV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.RolesV1Api(api_client) + + try: + # Get all roles + api_response = api_instance.v1_roles() + print("The response of RolesV1Api->v1_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RolesV1Api->v1_roles: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[RoleV1]**](RoleV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Roles | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RotateBody.md b/docs/RotateBody.md index 00048b1..04b4d99 100644 --- a/docs/RotateBody.md +++ b/docs/RotateBody.md @@ -1,12 +1,29 @@ # RotateBody - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**orientation** | **float** | Desired orientation | +**orientation** | **float** | Desired orientation. 1=Portrait, 2=Portrait inverted, 3=Landscape (top left), 4=Landscape (top right). | + +## Example + +```python +from corellium.models.rotate_body import RotateBody + +# TODO update the JSON string below +json = "{}" +# create an instance of RotateBody from a JSON string +rotate_body_instance = RotateBody.from_json(json) +# print the JSON string representation of the object +print(RotateBody.to_json()) +# convert the object into a dict +rotate_body_dict = rotate_body_instance.to_dict() +# create an instance of RotateBody from a dict +rotate_body_from_dict = RotateBody.from_dict(rotate_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RotateBodyV1.md b/docs/RotateBodyV1.md new file mode 100644 index 0000000..e634fb3 --- /dev/null +++ b/docs/RotateBodyV1.md @@ -0,0 +1,30 @@ +# RotateBodyV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orientation** | **float** | Desired orientation | + +## Example + +```python +from corellium.models.rotate_body_v1 import RotateBodyV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of RotateBodyV1 from a JSON string +rotate_body_v1_instance = RotateBodyV1.from_json(json) +# print the JSON string representation of the object +print(RotateBodyV1.to_json()) + +# convert the object into a dict +rotate_body_v1_dict = rotate_body_v1_instance.to_dict() +# create an instance of RotateBodyV1 from a dict +rotate_body_v1_from_dict = RotateBodyV1.from_dict(rotate_body_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SAMLConfig.md b/docs/SAMLConfig.md new file mode 100644 index 0000000..b157b50 --- /dev/null +++ b/docs/SAMLConfig.md @@ -0,0 +1,33 @@ +# SAMLConfig + +SAML provider configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity_provider_config** | [**SamlIdentityProviderConfig**](SamlIdentityProviderConfig.md) | | +**service_provider_config** | [**SamlServiceProviderConfig**](SamlServiceProviderConfig.md) | | [optional] +**user_attribute_mapping** | [**SamlUserAttributeMapping**](SamlUserAttributeMapping.md) | | [optional] +**group_mapping** | [**List[SamlGroupMapping]**](SamlGroupMapping.md) | | [optional] + +## Example + +```python +from corellium.models.saml_config import SAMLConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of SAMLConfig from a JSON string +saml_config_instance = SAMLConfig.from_json(json) +# print the JSON string representation of the object +print(SAMLConfig.to_json()) + +# convert the object into a dict +saml_config_dict = saml_config_instance.to_dict() +# create an instance of SAMLConfig from a dict +saml_config_from_dict = SAMLConfig.from_dict(saml_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SamlGroupMapping.md b/docs/SamlGroupMapping.md new file mode 100644 index 0000000..a00eae8 --- /dev/null +++ b/docs/SamlGroupMapping.md @@ -0,0 +1,31 @@ +# SamlGroupMapping + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_name** | **str** | Group name in the IdP. | +**role** | **str** | Role granted in Corellium (e.g. admin, member). | +**team** | **str** | Associated Corellium team. | + +## Example + +```python +from corellium.models.saml_group_mapping import SamlGroupMapping + +# TODO update the JSON string below +json = "{}" +# create an instance of SamlGroupMapping from a JSON string +saml_group_mapping_instance = SamlGroupMapping.from_json(json) +# print the JSON string representation of the object +print(SamlGroupMapping.to_json()) + +# convert the object into a dict +saml_group_mapping_dict = saml_group_mapping_instance.to_dict() +# create an instance of SamlGroupMapping from a dict +saml_group_mapping_from_dict = SamlGroupMapping.from_dict(saml_group_mapping_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SamlIdentityProviderConfig.md b/docs/SamlIdentityProviderConfig.md new file mode 100644 index 0000000..c51484c --- /dev/null +++ b/docs/SamlIdentityProviderConfig.md @@ -0,0 +1,32 @@ +# SamlIdentityProviderConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**login_url** | **str** | IdP SSO login endpoint the AuthnRequest is sent to. | +**public_certificate** | **str** | IdP X.509 public certificate, used to verify the SAML response. | +**issuer_url** | **str** | IdP unique identifier (issuer / entity ID). | +**logout_url** | **str** | Optional IdP Single Logout URL. | [optional] + +## Example + +```python +from corellium.models.saml_identity_provider_config import SamlIdentityProviderConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of SamlIdentityProviderConfig from a JSON string +saml_identity_provider_config_instance = SamlIdentityProviderConfig.from_json(json) +# print the JSON string representation of the object +print(SamlIdentityProviderConfig.to_json()) + +# convert the object into a dict +saml_identity_provider_config_dict = saml_identity_provider_config_instance.to_dict() +# create an instance of SamlIdentityProviderConfig from a dict +saml_identity_provider_config_from_dict = SamlIdentityProviderConfig.from_dict(saml_identity_provider_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SamlServiceProviderConfig.md b/docs/SamlServiceProviderConfig.md new file mode 100644 index 0000000..5ab63a6 --- /dev/null +++ b/docs/SamlServiceProviderConfig.md @@ -0,0 +1,32 @@ +# SamlServiceProviderConfig + +Service-provider configuration, generated by the server. Never includes the private key. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sso_url** | **str** | SP assertion consumer service URL. | +**public_certificate** | **str** | SP X.509 public certificate. | +**audience_url** | **str** | SP audience / entity ID. | + +## Example + +```python +from corellium.models.saml_service_provider_config import SamlServiceProviderConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of SamlServiceProviderConfig from a JSON string +saml_service_provider_config_instance = SamlServiceProviderConfig.from_json(json) +# print the JSON string representation of the object +print(SamlServiceProviderConfig.to_json()) + +# convert the object into a dict +saml_service_provider_config_dict = saml_service_provider_config_instance.to_dict() +# create an instance of SamlServiceProviderConfig from a dict +saml_service_provider_config_from_dict = SamlServiceProviderConfig.from_dict(saml_service_provider_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SamlUserAttributeMapping.md b/docs/SamlUserAttributeMapping.md new file mode 100644 index 0000000..4345905 --- /dev/null +++ b/docs/SamlUserAttributeMapping.md @@ -0,0 +1,33 @@ +# SamlUserAttributeMapping + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | SAML assertion attribute mapped to username. | [optional] +**email** | **str** | SAML assertion attribute mapped to email. | +**first_name** | **str** | SAML assertion attribute mapped to first name. | +**last_name** | **str** | SAML assertion attribute mapped to last name. | +**group** | **str** | SAML assertion attribute mapped to group. | + +## Example + +```python +from corellium.models.saml_user_attribute_mapping import SamlUserAttributeMapping + +# TODO update the JSON string below +json = "{}" +# create an instance of SamlUserAttributeMapping from a JSON string +saml_user_attribute_mapping_instance = SamlUserAttributeMapping.from_json(json) +# print the JSON string representation of the object +print(SamlUserAttributeMapping.to_json()) + +# convert the object into a dict +saml_user_attribute_mapping_dict = saml_user_attribute_mapping_instance.to_dict() +# create an instance of SamlUserAttributeMapping from a dict +saml_user_attribute_mapping_from_dict = SamlUserAttributeMapping.from_dict(saml_user_attribute_mapping_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SendResetLinkBody.md b/docs/SendResetLinkBody.md new file mode 100644 index 0000000..cf5901c --- /dev/null +++ b/docs/SendResetLinkBody.md @@ -0,0 +1,29 @@ +# SendResetLinkBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address to send the reset link to. | [optional] + +## Example + +```python +from corellium.models.send_reset_link_body import SendResetLinkBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SendResetLinkBody from a JSON string +send_reset_link_body_instance = SendResetLinkBody.from_json(json) +# print the JSON string representation of the object +print(SendResetLinkBody.to_json()) + +# convert the object into a dict +send_reset_link_body_dict = send_reset_link_body_instance.to_dict() +# create an instance of SendResetLinkBody from a dict +send_reset_link_body_from_dict = SendResetLinkBody.from_dict(send_reset_link_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServiceEndpointSchema.md b/docs/ServiceEndpointSchema.md new file mode 100644 index 0000000..44d0c9f --- /dev/null +++ b/docs/ServiceEndpointSchema.md @@ -0,0 +1,32 @@ +# ServiceEndpointSchema + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service_name** | **str** | Service name (e.g. mast, c3po, iptables-nat). | [optional] +**path** | **str** | Endpoint path, following /:apiVersion/. | +**method** | **str** | HTTP method (e.g. GET, POST). | +**permissions** | **List[str]** | Required permissions (e.g. projectMember, cloud-administrator, domain-administrator, administrator). | + +## Example + +```python +from corellium.models.service_endpoint_schema import ServiceEndpointSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of ServiceEndpointSchema from a JSON string +service_endpoint_schema_instance = ServiceEndpointSchema.from_json(json) +# print the JSON string representation of the object +print(ServiceEndpointSchema.to_json()) + +# convert the object into a dict +service_endpoint_schema_dict = service_endpoint_schema_instance.to_dict() +# create an instance of ServiceEndpointSchema from a dict +service_endpoint_schema_from_dict = ServiceEndpointSchema.from_dict(service_endpoint_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServiceStatusRequestBody.md b/docs/ServiceStatusRequestBody.md new file mode 100644 index 0000000..7c5defd --- /dev/null +++ b/docs/ServiceStatusRequestBody.md @@ -0,0 +1,41 @@ +# ServiceStatusRequestBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**healthy** | **bool** | Whether the service is healthy. | +**service_name** | **str** | Service name. | +**address** | **str** | Service address (IP:Port). | +**hostname** | **str** | Service hostname. | +**node_id** | **str** | Node identifier. | +**sys_info** | [**SysInfoSchema**](SysInfoSchema.md) | | [optional] +**layout** | [**LayoutSchema**](LayoutSchema.md) | | [optional] +**vms** | [**List[ServiceStatusRequestBodyVmsInner]**](ServiceStatusRequestBodyVmsInner.md) | VM list reported by this node. | [optional] +**pool_usage** | [**PoolUsageSchema**](PoolUsageSchema.md) | | [optional] +**az** | **str** | Availability zone. | [optional] +**network** | [**NetworkSchema**](NetworkSchema.md) | | [optional] +**ec2_instance_type** | **str** | EC2 instance type, if applicable. | [optional] [default to ''] +**op** | **str** | Current operation. | [optional] + +## Example + +```python +from corellium.models.service_status_request_body import ServiceStatusRequestBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ServiceStatusRequestBody from a JSON string +service_status_request_body_instance = ServiceStatusRequestBody.from_json(json) +# print the JSON string representation of the object +print(ServiceStatusRequestBody.to_json()) + +# convert the object into a dict +service_status_request_body_dict = service_status_request_body_instance.to_dict() +# create an instance of ServiceStatusRequestBody from a dict +service_status_request_body_from_dict = ServiceStatusRequestBody.from_dict(service_status_request_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServiceStatusRequestBodyVmsInner.md b/docs/ServiceStatusRequestBodyVmsInner.md new file mode 100644 index 0000000..e63425e --- /dev/null +++ b/docs/ServiceStatusRequestBodyVmsInner.md @@ -0,0 +1,29 @@ +# ServiceStatusRequestBodyVmsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | | + +## Example + +```python +from corellium.models.service_status_request_body_vms_inner import ServiceStatusRequestBodyVmsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ServiceStatusRequestBodyVmsInner from a JSON string +service_status_request_body_vms_inner_instance = ServiceStatusRequestBodyVmsInner.from_json(json) +# print the JSON string representation of the object +print(ServiceStatusRequestBodyVmsInner.to_json()) + +# convert the object into a dict +service_status_request_body_vms_inner_dict = service_status_request_body_vms_inner_instance.to_dict() +# create an instance of ServiceStatusRequestBodyVmsInner from a dict +service_status_request_body_vms_inner_from_dict = ServiceStatusRequestBodyVmsInner.from_dict(service_status_request_body_vms_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SetDomainWelcomeMessageBody.md b/docs/SetDomainWelcomeMessageBody.md new file mode 100644 index 0000000..291c854 --- /dev/null +++ b/docs/SetDomainWelcomeMessageBody.md @@ -0,0 +1,30 @@ +# SetDomainWelcomeMessageBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | The welcome message text (HTML allowed, will be sanitized). | +**enabled** | **bool** | Whether the welcome message is shown to users. | + +## Example + +```python +from corellium.models.set_domain_welcome_message_body import SetDomainWelcomeMessageBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SetDomainWelcomeMessageBody from a JSON string +set_domain_welcome_message_body_instance = SetDomainWelcomeMessageBody.from_json(json) +# print the JSON string representation of the object +print(SetDomainWelcomeMessageBody.to_json()) + +# convert the object into a dict +set_domain_welcome_message_body_dict = set_domain_welcome_message_body_instance.to_dict() +# create an instance of SetDomainWelcomeMessageBody from a dict +set_domain_welcome_message_body_from_dict = SetDomainWelcomeMessageBody.from_dict(set_domain_welcome_message_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SetSnapshotPermissionsBody.md b/docs/SetSnapshotPermissionsBody.md new file mode 100644 index 0000000..57fbdaa --- /dev/null +++ b/docs/SetSnapshotPermissionsBody.md @@ -0,0 +1,29 @@ +# SetSnapshotPermissionsBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | **List[str]** | The people who may use the snapshot, by email address or user ID. Used with sharing type `emailInvite`. | + +## Example + +```python +from corellium.models.set_snapshot_permissions_body import SetSnapshotPermissionsBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SetSnapshotPermissionsBody from a JSON string +set_snapshot_permissions_body_instance = SetSnapshotPermissionsBody.from_json(json) +# print the JSON string representation of the object +print(SetSnapshotPermissionsBody.to_json()) + +# convert the object into a dict +set_snapshot_permissions_body_dict = set_snapshot_permissions_body_instance.to_dict() +# create an instance of SetSnapshotPermissionsBody from a dict +set_snapshot_permissions_body_from_dict = SetSnapshotPermissionsBody.from_dict(set_snapshot_permissions_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ShareSnapshotBody.md b/docs/ShareSnapshotBody.md new file mode 100644 index 0000000..0884ed2 --- /dev/null +++ b/docs/ShareSnapshotBody.md @@ -0,0 +1,30 @@ +# ShareSnapshotBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sharing_type** | [**SnapshotSharingType**](SnapshotSharingType.md) | | +**password** | **str** | Password to require from anyone accepting the snapshot. Required when sharingType is passwordPublicLink, and ignored for every other sharing type. Never returned by the API once set. | [optional] + +## Example + +```python +from corellium.models.share_snapshot_body import ShareSnapshotBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ShareSnapshotBody from a JSON string +share_snapshot_body_instance = ShareSnapshotBody.from_json(json) +# print the JSON string representation of the object +print(ShareSnapshotBody.to_json()) + +# convert the object into a dict +share_snapshot_body_dict = share_snapshot_body_instance.to_dict() +# create an instance of ShareSnapshotBody from a dict +share_snapshot_body_from_dict = ShareSnapshotBody.from_dict(share_snapshot_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SharedSnapshot.md b/docs/SharedSnapshot.md new file mode 100644 index 0000000..5ebd753 --- /dev/null +++ b/docs/SharedSnapshot.md @@ -0,0 +1,44 @@ +# SharedSnapshot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shared_on** | **datetime** | Date of when the snapshot was first shared with member. | [optional] +**shared_with_member** | **str** | The member who the snapshot was shared with. Only present in sharedWithUser. | [optional] +**sharing_type** | [**SnapshotSharingType**](SnapshotSharingType.md) | | +**shared_by** | [**SnapshotOwner**](SnapshotOwner.md) | | [optional] +**id** | **str** | The snapshot identifier. | +**var_date** | **float** | Date that the snapshot was created (UNIX epoch milliseconds). | +**hw_pac** | **float** | Denotes whether this snapshot requires a compute node with hardware PAC enabled. | +**instance** | **str** | The UUID of the instance that this snapshot is of. | +**live** | **bool** | Live snapshot (included state and memory). | [optional] +**local** | **bool** | Denotes whether the snapshot has a local storage type. | +**model** | **str** | The device model. | [optional] [default to ''] +**type** | **str** | Device type of the instance this snapshot belongs to. | [optional] +**name** | **str** | The snapshot name. | +**status** | [**SnapshotStatus**](SnapshotStatus.md) | | +**fresh** | **bool** | Denotes whether snapshot was created immediately after the device was restored. | [optional] +**sharing** | [**SnapshotSharing**](SnapshotSharing.md) | | [optional] + +## Example + +```python +from corellium.models.shared_snapshot import SharedSnapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of SharedSnapshot from a JSON string +shared_snapshot_instance = SharedSnapshot.from_json(json) +# print the JSON string representation of the object +print(SharedSnapshot.to_json()) + +# convert the object into a dict +shared_snapshot_dict = shared_snapshot_instance.to_dict() +# create an instance of SharedSnapshot from a dict +shared_snapshot_from_dict = SharedSnapshot.from_dict(shared_snapshot_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SharedSnapshotsInfo.md b/docs/SharedSnapshotsInfo.md index f291e08..1986462 100644 --- a/docs/SharedSnapshotsInfo.md +++ b/docs/SharedSnapshotsInfo.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | UUID of the snapshot | @@ -10,8 +11,25 @@ Name | Type | Description | Notes **model** | **str** | Device model | **shared_on** | **float** | UNIX Date of when the snapshot was first shared with member | **shared_with_member** | **str** | The member who the snapshot was shared with. Only present in sharedWithUser | [optional] -**shared_by** | [**SnapshotOwner**](SnapshotOwner.md) | | [optional] +**shared_by** | [**SnapshotOwnerV1**](SnapshotOwnerV1.md) | | [optional] + +## Example + +```python +from corellium.models.shared_snapshots_info import SharedSnapshotsInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of SharedSnapshotsInfo from a JSON string +shared_snapshots_info_instance = SharedSnapshotsInfo.from_json(json) +# print the JSON string representation of the object +print(SharedSnapshotsInfo.to_json()) +# convert the object into a dict +shared_snapshots_info_dict = shared_snapshots_info_instance.to_dict() +# create an instance of SharedSnapshotsInfo from a dict +shared_snapshots_info_from_dict = SharedSnapshotsInfo.from_dict(shared_snapshots_info_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SharedSnapshotsResponse.md b/docs/SharedSnapshotsResponse.md new file mode 100644 index 0000000..267f0c7 --- /dev/null +++ b/docs/SharedSnapshotsResponse.md @@ -0,0 +1,30 @@ +# SharedSnapshotsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shared_with_user** | [**List[SharedSnapshot]**](SharedSnapshot.md) | Snapshots shared with the logged-in user. | +**shared_by_user** | [**List[SharedSnapshot]**](SharedSnapshot.md) | Snapshots shared by the logged-in user. | + +## Example + +```python +from corellium.models.shared_snapshots_response import SharedSnapshotsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SharedSnapshotsResponse from a JSON string +shared_snapshots_response_instance = SharedSnapshotsResponse.from_json(json) +# print the JSON string representation of the object +print(SharedSnapshotsResponse.to_json()) + +# convert the object into a dict +shared_snapshots_response_dict = shared_snapshots_response_instance.to_dict() +# create an instance of SharedSnapshotsResponse from a dict +shared_snapshots_response_from_dict = SharedSnapshotsResponse.from_dict(shared_snapshots_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Snapshot.md b/docs/Snapshot.md index f33e5f4..f7b6595 100644 --- a/docs/Snapshot.md +++ b/docs/Snapshot.md @@ -1,21 +1,38 @@ # Snapshot - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Snapshot ID | -**name** | **str** | Snapshot name | -**instance** | **str** | Instance that this snapshot is of | +**id** | **str** | The snapshot identifier. | +**name** | **str** | The snapshot name. | +**instance** | **str** | The UUID of the instance that this snapshot is of. | **status** | [**SnapshotStatus**](SnapshotStatus.md) | | -**date** | **float** | UNIX Date that the snapshot was created | -**fresh** | **bool** | | -**live** | **bool** | Live snapshot (included state and memory) | -**local** | **bool** | | -**model** | **str** | The device model | [optional] -**sharing** | [**SnapshotSharing**](SnapshotSharing.md) | | [optional] +**var_date** | **float** | Date that the snapshot was created (UNIX epoch milliseconds). | +**fresh** | **bool** | Denotes whether snapshot was created immediately after the device was restored. | [optional] +**live** | **bool** | Live snapshot (included state and memory). | [optional] +**local** | **bool** | Denotes whether the snapshot has a local storage type. | +**model** | **str** | The device model. | [optional] +**sharing** | [**SnapshotSharing**](SnapshotSharing.md) | | + +## Example + +```python +from corellium.models.snapshot import Snapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of Snapshot from a JSON string +snapshot_instance = Snapshot.from_json(json) +# print the JSON string representation of the object +print(Snapshot.to_json()) +# convert the object into a dict +snapshot_dict = snapshot_instance.to_dict() +# create an instance of Snapshot from a dict +snapshot_from_dict = Snapshot.from_dict(snapshot_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnapshotCreationOptions.md b/docs/SnapshotCreationOptions.md index fa9cba6..516ba85 100644 --- a/docs/SnapshotCreationOptions.md +++ b/docs/SnapshotCreationOptions.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Snapshot name | +## Example + +```python +from corellium.models.snapshot_creation_options import SnapshotCreationOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotCreationOptions from a JSON string +snapshot_creation_options_instance = SnapshotCreationOptions.from_json(json) +# print the JSON string representation of the object +print(SnapshotCreationOptions.to_json()) + +# convert the object into a dict +snapshot_creation_options_dict = snapshot_creation_options_instance.to_dict() +# create an instance of SnapshotCreationOptions from a dict +snapshot_creation_options_from_dict = SnapshotCreationOptions.from_dict(snapshot_creation_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnapshotList.md b/docs/SnapshotList.md new file mode 100644 index 0000000..34c5b02 --- /dev/null +++ b/docs/SnapshotList.md @@ -0,0 +1,33 @@ +# SnapshotList + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[ClusterSnapshotV1]**](ClusterSnapshotV1.md) | List of snapshots | [optional] +**offset** | **float** | Offset for pagination, defaults to 0 | [optional] +**limit** | **float** | Number of items to return, defaults to 100, minimum of 1 and maximum of 1000 | [optional] +**count** | **float** | Number of items in current response | [optional] + +## Example + +```python +from corellium.models.snapshot_list import SnapshotList + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotList from a JSON string +snapshot_list_instance = SnapshotList.from_json(json) +# print the JSON string representation of the object +print(SnapshotList.to_json()) + +# convert the object into a dict +snapshot_list_dict = snapshot_list_instance.to_dict() +# create an instance of SnapshotList from a dict +snapshot_list_from_dict = SnapshotList.from_dict(snapshot_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotMember.md b/docs/SnapshotMember.md index d1ce579..b39853b 100644 --- a/docs/SnapshotMember.md +++ b/docs/SnapshotMember.md @@ -1,16 +1,33 @@ # SnapshotMember - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **str** | The email of the member | -**invite_sent_at** | **float** | The date when the invite was sent | -**shared_on** | **float** | UNIX Date of when the snapshot was first shared with member | -**user_id** | **str** | The member's user ID | [optional] -**label** | **str** | The user's label or name | [optional] +**email** | **str** | The email of the member. | +**invite_sent_at** | **datetime** | The date when the invite was sent. | +**shared_on** | **datetime** | Date of when the snapshot was first shared with member. | [optional] +**user_id** | **str** | The member's user ID. | [optional] +**name** | **str** | The user's label or name. | [optional] + +## Example + +```python +from corellium.models.snapshot_member import SnapshotMember + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotMember from a JSON string +snapshot_member_instance = SnapshotMember.from_json(json) +# print the JSON string representation of the object +print(SnapshotMember.to_json()) +# convert the object into a dict +snapshot_member_dict = snapshot_member_instance.to_dict() +# create an instance of SnapshotMember from a dict +snapshot_member_from_dict = SnapshotMember.from_dict(snapshot_member_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnapshotMemberV1.md b/docs/SnapshotMemberV1.md new file mode 100644 index 0000000..0f67fc0 --- /dev/null +++ b/docs/SnapshotMemberV1.md @@ -0,0 +1,34 @@ +# SnapshotMemberV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | The email of the member | +**invite_sent_at** | **float** | The date when the invite was sent | +**shared_on** | **float** | UNIX Date of when the snapshot was first shared with member | +**user_id** | **str** | The member's user ID | [optional] +**label** | **str** | The user's label or name | [optional] + +## Example + +```python +from corellium.models.snapshot_member_v1 import SnapshotMemberV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotMemberV1 from a JSON string +snapshot_member_v1_instance = SnapshotMemberV1.from_json(json) +# print the JSON string representation of the object +print(SnapshotMemberV1.to_json()) + +# convert the object into a dict +snapshot_member_v1_dict = snapshot_member_v1_instance.to_dict() +# create an instance of SnapshotMemberV1 from a dict +snapshot_member_v1_from_dict = SnapshotMemberV1.from_dict(snapshot_member_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotOwner.md b/docs/SnapshotOwner.md index fe9e9df..6306003 100644 --- a/docs/SnapshotOwner.md +++ b/docs/SnapshotOwner.md @@ -1,13 +1,31 @@ # SnapshotOwner - +The owner of the snapshot. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The name of the owner. | **email** | **str** | The email of the member. | +## Example + +```python +from corellium.models.snapshot_owner import SnapshotOwner + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotOwner from a JSON string +snapshot_owner_instance = SnapshotOwner.from_json(json) +# print the JSON string representation of the object +print(SnapshotOwner.to_json()) + +# convert the object into a dict +snapshot_owner_dict = snapshot_owner_instance.to_dict() +# create an instance of SnapshotOwner from a dict +snapshot_owner_from_dict = SnapshotOwner.from_dict(snapshot_owner_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnapshotOwnerV1.md b/docs/SnapshotOwnerV1.md new file mode 100644 index 0000000..0eb1e63 --- /dev/null +++ b/docs/SnapshotOwnerV1.md @@ -0,0 +1,31 @@ +# SnapshotOwnerV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the owner. | +**email** | **str** | The email of the member. | + +## Example + +```python +from corellium.models.snapshot_owner_v1 import SnapshotOwnerV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotOwnerV1 from a JSON string +snapshot_owner_v1_instance = SnapshotOwnerV1.from_json(json) +# print the JSON string representation of the object +print(SnapshotOwnerV1.to_json()) + +# convert the object into a dict +snapshot_owner_v1_dict = snapshot_owner_v1_instance.to_dict() +# create an instance of SnapshotOwnerV1 from a dict +snapshot_owner_v1_from_dict = SnapshotOwnerV1.from_dict(snapshot_owner_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotPermissionsRequestPayload.md b/docs/SnapshotPermissionsRequestPayload.md index 8532139..548c914 100644 --- a/docs/SnapshotPermissionsRequestPayload.md +++ b/docs/SnapshotPermissionsRequestPayload.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**members** | **list[str]** | The email addresses or user ids of the members. | +**members** | **List[str]** | The email addresses or user ids of the members. | + +## Example + +```python +from corellium.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotPermissionsRequestPayload from a JSON string +snapshot_permissions_request_payload_instance = SnapshotPermissionsRequestPayload.from_json(json) +# print the JSON string representation of the object +print(SnapshotPermissionsRequestPayload.to_json()) +# convert the object into a dict +snapshot_permissions_request_payload_dict = snapshot_permissions_request_payload_instance.to_dict() +# create an instance of SnapshotPermissionsRequestPayload from a dict +snapshot_permissions_request_payload_from_dict = SnapshotPermissionsRequestPayload.from_dict(snapshot_permissions_request_payload_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnapshotRequest.md b/docs/SnapshotRequest.md new file mode 100644 index 0000000..9d65978 --- /dev/null +++ b/docs/SnapshotRequest.md @@ -0,0 +1,40 @@ +# SnapshotRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **float** | Number of entries to return, defaults to 100 | [optional] +**offset** | **float** | Number of rows to skip, defaults to 0 | [optional] +**springboard** | **bool** | Denotes whether snapshot was a springboard snapshot | [optional] +**live** | **bool** | Denotes whether snapshot was a live snapshot | [optional] +**fresh** | **bool** | Denotes whether snapshot was created immediately after the device was restored | [optional] +**device_name** | **str** | Name of device | [optional] +**task** | **str** | Task being executed on snapshot | [optional] +**to** | **str** | Date to filter to, keyed off of createdAt | [optional] +**var_from** | **str** | Date to filter from, keyed off of createdAt | [optional] +**order_by** | **str** | Sorting order ('-createdAt' or 'createdAt'), defaults to -createdAt | [optional] +**search** | **str** | Last filter applied and searches on snapshot / associated instance name and snapshot / instance id | [optional] + +## Example + +```python +from corellium.models.snapshot_request import SnapshotRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotRequest from a JSON string +snapshot_request_instance = SnapshotRequest.from_json(json) +# print the JSON string representation of the object +print(SnapshotRequest.to_json()) + +# convert the object into a dict +snapshot_request_dict = snapshot_request_instance.to_dict() +# create an instance of SnapshotRequest from a dict +snapshot_request_from_dict = SnapshotRequest.from_dict(snapshot_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotSharing.md b/docs/SnapshotSharing.md index 4f03ace..3ffdf34 100644 --- a/docs/SnapshotSharing.md +++ b/docs/SnapshotSharing.md @@ -1,15 +1,34 @@ # SnapshotSharing - +The sharing information of the snapshot. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sharing_type** | **str** | | -**password** | **str** | Password with using passwordPublicLink | [optional] +**sharing_type** | [**SnapshotSharingType**](SnapshotSharingType.md) | | +**access_code** | **str** | Access code of shared snapshot. | [optional] +**shared_on** | **datetime** | Date of when the snapshot was first shared with member. | [optional] **shared_by** | [**SnapshotOwner**](SnapshotOwner.md) | | [optional] -**members** | [**list[SnapshotMember]**](SnapshotMember.md) | The members who have access to the snapshot | [optional] +**members** | [**List[SnapshotMember]**](SnapshotMember.md) | The email addresses or user ids of the members. | [optional] + +## Example + +```python +from corellium.models.snapshot_sharing import SnapshotSharing + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotSharing from a JSON string +snapshot_sharing_instance = SnapshotSharing.from_json(json) +# print the JSON string representation of the object +print(SnapshotSharing.to_json()) +# convert the object into a dict +snapshot_sharing_dict = snapshot_sharing_instance.to_dict() +# create an instance of SnapshotSharing from a dict +snapshot_sharing_from_dict = SnapshotSharing.from_dict(snapshot_sharing_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnapshotSharingApi.md b/docs/SnapshotSharingApi.md new file mode 100644 index 0000000..98c44bb --- /dev/null +++ b/docs/SnapshotSharingApi.md @@ -0,0 +1,455 @@ +# corellium.SnapshotSharingApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_accept_shared_snapshot**](SnapshotSharingApi.md#v3_accept_shared_snapshot) | **POST** /v3/snapshots/accept | Accept a shared snapshot +[**v3_delete_snapshot_permissions**](SnapshotSharingApi.md#v3_delete_snapshot_permissions) | **DELETE** /v3/snapshots/{snapshotId}/permissions | Delete member(s) +[**v3_get_shared_snapshots**](SnapshotSharingApi.md#v3_get_shared_snapshots) | **GET** /v3/snapshots/shared | Fetch shared snapshots +[**v3_set_snapshot_permissions**](SnapshotSharingApi.md#v3_set_snapshot_permissions) | **POST** /v3/snapshots/{snapshotId}/permissions | Set member list +[**v3_share_snapshot**](SnapshotSharingApi.md#v3_share_snapshot) | **POST** /v3/snapshots/{snapshotId}/share | Create or update snapshot sharing + + +# **v3_accept_shared_snapshot** +> Snapshot v3_accept_shared_snapshot(accept_snapshot_body) + +Accept a shared snapshot + +Checks that you may use a snapshot someone shared with you, using the access code they gave you (and the password, for `passwordPublicLink`). Returns the snapshot. + +To create a device from it, call `POST /v3/instances` with `sharedSnapshot` set to the snapshot's `id` (and `sharedSnapshotPassword` for password-protected shares). Returns 403 if the snapshot is not shared with you, for example it is limited to another domain or you are not on its member list. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.accept_snapshot_body import AcceptSnapshotBody +from corellium.models.snapshot import Snapshot +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingApi(api_client) + accept_snapshot_body = corellium.AcceptSnapshotBody() # AcceptSnapshotBody | + + try: + # Accept a shared snapshot + api_response = api_instance.v3_accept_shared_snapshot(accept_snapshot_body) + print("The response of SnapshotSharingApi->v3_accept_shared_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingApi->v3_accept_shared_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accept_snapshot_body** | [**AcceptSnapshotBody**](AcceptSnapshotBody.md)| | + +### Return type + +[**Snapshot**](Snapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully accepted shared snapshot. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Snapshot not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_snapshot_permissions** +> v3_delete_snapshot_permissions(snapshot_id, set_snapshot_permissions_body) + +Delete member(s) + +Deletes one or more members from the list of members who have access to the snapshot. + +Members that do not currently have access are ignored rather than reported as an error. +Deletes are idempotent: an unknown `snapshotId` is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.set_snapshot_permissions_body import SetSnapshotPermissionsBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingApi(api_client) + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + set_snapshot_permissions_body = corellium.SetSnapshotPermissionsBody() # SetSnapshotPermissionsBody | + + try: + # Delete member(s) + api_instance.v3_delete_snapshot_permissions(snapshot_id, set_snapshot_permissions_body) + except Exception as e: + print("Exception when calling SnapshotSharingApi->v3_delete_snapshot_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot identifier. | + **set_snapshot_permissions_body** | [**SetSnapshotPermissionsBody**](SetSnapshotPermissionsBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Member(s) removed from the snapshot; empty body. | - | +**400** | Invalid request body, or malformed snapshot ID. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_shared_snapshots** +> SharedSnapshotsResponse v3_get_shared_snapshots() + +Fetch shared snapshots + +Lists snapshots involving you: `sharedWithUser` holds snapshots other people shared with you, and `sharedByUser` holds snapshots you shared. Use it to find a snapshot to create a device from, or to review what you are sharing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.shared_snapshots_response import SharedSnapshotsResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingApi(api_client) + + try: + # Fetch shared snapshots + api_response = api_instance.v3_get_shared_snapshots() + print("The response of SnapshotSharingApi->v3_get_shared_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingApi->v3_get_shared_snapshots: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SharedSnapshotsResponse**](SharedSnapshotsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved shared snapshots. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_set_snapshot_permissions** +> Snapshot v3_set_snapshot_permissions(snapshot_id, set_snapshot_permissions_body) + +Set member list + +Sets who may use a snapshot shared by email invitation: send the full list of members, by email address or user ID. The list replaces the previous one. If the snapshot was not shared yet, this shares it with sharing type `emailInvite`. Returns the snapshot with its updated `sharing` details. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.set_snapshot_permissions_body import SetSnapshotPermissionsBody +from corellium.models.snapshot import Snapshot +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingApi(api_client) + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + set_snapshot_permissions_body = corellium.SetSnapshotPermissionsBody() # SetSnapshotPermissionsBody | + + try: + # Set member list + api_response = api_instance.v3_set_snapshot_permissions(snapshot_id, set_snapshot_permissions_body) + print("The response of SnapshotSharingApi->v3_set_snapshot_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingApi->v3_set_snapshot_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot identifier. | + **set_snapshot_permissions_body** | [**SetSnapshotPermissionsBody**](SetSnapshotPermissionsBody.md)| | + +### Return type + +[**Snapshot**](Snapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully updated the members who have access to the snapshot. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Snapshot not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_share_snapshot** +> Snapshot v3_share_snapshot(snapshot_id, share_snapshot_body) + +Create or update snapshot sharing + +Shares one of your snapshots so other people can create devices from it, or stops sharing it. Choose who can use it with `sharingType` (see `SnapshotSharingType`); for `passwordPublicLink` also set `password`. The response is the snapshot with its `sharing` details, including the `accessCode` to give to the people you share with. Send `notShared` to stop sharing. Returns 403 if snapshot sharing, or that sharing type, is not enabled for your domain or license. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.share_snapshot_body import ShareSnapshotBody +from corellium.models.snapshot import Snapshot +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingApi(api_client) + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + share_snapshot_body = corellium.ShareSnapshotBody() # ShareSnapshotBody | + + try: + # Create or update snapshot sharing + api_response = api_instance.v3_share_snapshot(snapshot_id, share_snapshot_body) + print("The response of SnapshotSharingApi->v3_share_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingApi->v3_share_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot identifier. | + **share_snapshot_body** | [**ShareSnapshotBody**](ShareSnapshotBody.md)| | + +### Return type + +[**Snapshot**](Snapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Snapshot sharing configuration updated. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Snapshot not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SnapshotSharingPermissions.md b/docs/SnapshotSharingPermissions.md index a45a1e1..08a37e1 100644 --- a/docs/SnapshotSharingPermissions.md +++ b/docs/SnapshotSharingPermissions.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cloud_enabled** | **bool** | Indicates if snapshot permissions are enabled by the cloud admin | [optional] @@ -12,6 +13,23 @@ Name | Type | Description | Notes **password_public_link** | **bool** | Indicates if password-protected public link access is enabled | [optional] **email_invite** | **bool** | Indicates if email invite access is enabled | [optional] +## Example + +```python +from corellium.models.snapshot_sharing_permissions import SnapshotSharingPermissions + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotSharingPermissions from a JSON string +snapshot_sharing_permissions_instance = SnapshotSharingPermissions.from_json(json) +# print the JSON string representation of the object +print(SnapshotSharingPermissions.to_json()) + +# convert the object into a dict +snapshot_sharing_permissions_dict = snapshot_sharing_permissions_instance.to_dict() +# create an instance of SnapshotSharingPermissions from a dict +snapshot_sharing_permissions_from_dict = SnapshotSharingPermissions.from_dict(snapshot_sharing_permissions_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnapshotSharingPermissionsRequestSchema.md b/docs/SnapshotSharingPermissionsRequestSchema.md new file mode 100644 index 0000000..c5b3000 --- /dev/null +++ b/docs/SnapshotSharingPermissionsRequestSchema.md @@ -0,0 +1,33 @@ +# SnapshotSharingPermissionsRequestSchema + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether snapshot sharing is enabled. | [optional] +**public_link** | **bool** | Whether public link access is enabled. | [optional] [default to True] +**domain_restricted_link** | **bool** | Whether domain-restricted link access is enabled. | [optional] [default to True] +**password_public_link** | **bool** | Whether password-protected public link access is enabled. | [optional] [default to True] +**email_invite** | **bool** | Whether email invite access is enabled. | [optional] [default to True] + +## Example + +```python +from corellium.models.snapshot_sharing_permissions_request_schema import SnapshotSharingPermissionsRequestSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotSharingPermissionsRequestSchema from a JSON string +snapshot_sharing_permissions_request_schema_instance = SnapshotSharingPermissionsRequestSchema.from_json(json) +# print the JSON string representation of the object +print(SnapshotSharingPermissionsRequestSchema.to_json()) + +# convert the object into a dict +snapshot_sharing_permissions_request_schema_dict = snapshot_sharing_permissions_request_schema_instance.to_dict() +# create an instance of SnapshotSharingPermissionsRequestSchema from a dict +snapshot_sharing_permissions_request_schema_from_dict = SnapshotSharingPermissionsRequestSchema.from_dict(snapshot_sharing_permissions_request_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotSharingType.md b/docs/SnapshotSharingType.md new file mode 100644 index 0000000..85cc95e --- /dev/null +++ b/docs/SnapshotSharingType.md @@ -0,0 +1,19 @@ +# SnapshotSharingType + +Who can use a shared snapshot: - `publicLink`: anyone who has the access code. - `domainRestrictedLink`: only signed-in users in the owner's domain who have the access code. - `passwordPublicLink`: anyone who has the access code and the password. - `emailInvite`: only the people listed as members (see `v3SetSnapshotPermissions`). - `notShared`: sharing is turned off. Each type must also be allowed by your domain's snapshot sharing settings (`PATCH /v3/domain`); a type that is not allowed is refused with 403. + +## Enum + +* `PUBLICLINK` (value: `'publicLink'`) + +* `DOMAINRESTRICTEDLINK` (value: `'domainRestrictedLink'`) + +* `PASSWORDPUBLICLINK` (value: `'passwordPublicLink'`) + +* `EMAILINVITE` (value: `'emailInvite'`) + +* `NOTSHARED` (value: `'notShared'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotSharingV1.md b/docs/SnapshotSharingV1.md new file mode 100644 index 0000000..69940ab --- /dev/null +++ b/docs/SnapshotSharingV1.md @@ -0,0 +1,32 @@ +# SnapshotSharingV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sharing_type** | **str** | | +**shared_by** | [**SnapshotOwnerV1**](SnapshotOwnerV1.md) | | [optional] +**members** | [**List[SnapshotMemberV1]**](SnapshotMemberV1.md) | The members who have access to the snapshot | [optional] + +## Example + +```python +from corellium.models.snapshot_sharing_v1 import SnapshotSharingV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotSharingV1 from a JSON string +snapshot_sharing_v1_instance = SnapshotSharingV1.from_json(json) +# print the JSON string representation of the object +print(SnapshotSharingV1.to_json()) + +# convert the object into a dict +snapshot_sharing_v1_dict = snapshot_sharing_v1_instance.to_dict() +# create an instance of SnapshotSharingV1 from a dict +snapshot_sharing_v1_from_dict = SnapshotSharingV1.from_dict(snapshot_sharing_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotSharingV1Api.md b/docs/SnapshotSharingV1Api.md new file mode 100644 index 0000000..0c5dd50 --- /dev/null +++ b/docs/SnapshotSharingV1Api.md @@ -0,0 +1,447 @@ +# corellium.SnapshotSharingV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_accept_shared_snapshot**](SnapshotSharingV1Api.md#v1_accept_shared_snapshot) | **POST** /v1/snapshots/accept | Accept a snapshot shared with you +[**v1_delete_snapshot_permissions**](SnapshotSharingV1Api.md#v1_delete_snapshot_permissions) | **DELETE** /v1/snapshots/{snapshotId}/permissions | Delete member(s) +[**v1_get_shared_snapshots**](SnapshotSharingV1Api.md#v1_get_shared_snapshots) | **GET** /v1/snapshots/shared | Fetch shared snapshots +[**v1_set_snapshot_permissions**](SnapshotSharingV1Api.md#v1_set_snapshot_permissions) | **POST** /v1/snapshots/{snapshotId}/permissions | Set member list +[**v1_share_snapshot**](SnapshotSharingV1Api.md#v1_share_snapshot) | **POST** /v1/snapshots/{snapshotId}/share | Share snapshot + + +# **v1_accept_shared_snapshot** +> SnapshotV1 v1_accept_shared_snapshot(accept_snapshot_request_payload) + +Accept a snapshot shared with you + +### Example + + +```python +import corellium +from corellium.models.accept_snapshot_request_payload import AcceptSnapshotRequestPayload +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingV1Api(api_client) + accept_snapshot_request_payload = { + "accessCode": "1S33IA5G71YJ5", + "password": "password" +} # AcceptSnapshotRequestPayload | + + try: + # Accept a snapshot shared with you + api_response = api_instance.v1_accept_shared_snapshot(accept_snapshot_request_payload) + print("The response of SnapshotSharingV1Api->v1_accept_shared_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingV1Api->v1_accept_shared_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accept_snapshot_request_payload** | [**AcceptSnapshotRequestPayload**](AcceptSnapshotRequestPayload.md)| | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_snapshot_permissions** +> SnapshotV1 v1_delete_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload) + +Delete member(s) + +Deletes one or more members from the list of members who have access to the snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingV1Api(api_client) + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + snapshot_permissions_request_payload = { + "members": [ + "newuser1@domain.com", + "newuser2@domain.com" + ] +} # SnapshotPermissionsRequestPayload | + + try: + # Delete member(s) + api_response = api_instance.v1_delete_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload) + print("The response of SnapshotSharingV1Api->v1_delete_snapshot_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingV1Api->v1_delete_snapshot_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot ID - uuid | + **snapshot_permissions_request_payload** | [**SnapshotPermissionsRequestPayload**](SnapshotPermissionsRequestPayload.md)| | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_shared_snapshots** +> UserSnapshots v1_get_shared_snapshots() + +Fetch shared snapshots + +Fetch snapshots shared with and shared by the requesting user + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.user_snapshots import UserSnapshots +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingV1Api(api_client) + + try: + # Fetch shared snapshots + api_response = api_instance.v1_get_shared_snapshots() + print("The response of SnapshotSharingV1Api->v1_get_shared_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingV1Api->v1_get_shared_snapshots: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**UserSnapshots**](UserSnapshots.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_set_snapshot_permissions** +> SnapshotV1 v1_set_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload) + +Set member list + +Sets the list of members who have access to the snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingV1Api(api_client) + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + snapshot_permissions_request_payload = { + "members": [ + "newuser1@domain.com", + "newuser2@domain.com" + ] +} # SnapshotPermissionsRequestPayload | + + try: + # Set member list + api_response = api_instance.v1_set_snapshot_permissions(snapshot_id, snapshot_permissions_request_payload) + print("The response of SnapshotSharingV1Api->v1_set_snapshot_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingV1Api->v1_set_snapshot_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot ID - uuid | + **snapshot_permissions_request_payload** | [**SnapshotPermissionsRequestPayload**](SnapshotPermissionsRequestPayload.md)| | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_share_snapshot** +> SnapshotV1 v1_share_snapshot(snapshot_id, post_share_snapshot_request_payload) + +Share snapshot + +Share a snapshot + +### Example + + +```python +import corellium +from corellium.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotSharingV1Api(api_client) + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + post_share_snapshot_request_payload = { + "sharingType": "passwordPublicLink", + "password": "password" +} # PostShareSnapshotRequestPayload | + + try: + # Share snapshot + api_response = api_instance.v1_share_snapshot(snapshot_id, post_share_snapshot_request_payload) + print("The response of SnapshotSharingV1Api->v1_share_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotSharingV1Api->v1_share_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot ID - uuid | + **post_share_snapshot_request_payload** | [**PostShareSnapshotRequestPayload**](PostShareSnapshotRequestPayload.md)| | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SnapshotStatus.md b/docs/SnapshotStatus.md index e7ab260..d1c7950 100644 --- a/docs/SnapshotStatus.md +++ b/docs/SnapshotStatus.md @@ -1,13 +1,31 @@ # SnapshotStatus - +The status of the snapshot. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**task** | **str** | The current task being performed on the snapshot | [optional] -**created** | **bool** | Indicates if the snapshot has been successfully created | [optional] +**task** | **str** | The current task being performed on the snapshot. | [optional] +**created** | **bool** | Indicates if the snapshot has been successfully created. | [optional] + +## Example + +```python +from corellium.models.snapshot_status import SnapshotStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotStatus from a JSON string +snapshot_status_instance = SnapshotStatus.from_json(json) +# print the JSON string representation of the object +print(SnapshotStatus.to_json()) +# convert the object into a dict +snapshot_status_dict = snapshot_status_instance.to_dict() +# create an instance of SnapshotStatus from a dict +snapshot_status_from_dict = SnapshotStatus.from_dict(snapshot_status_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SnapshotStatusV1.md b/docs/SnapshotStatusV1.md new file mode 100644 index 0000000..bfac707 --- /dev/null +++ b/docs/SnapshotStatusV1.md @@ -0,0 +1,31 @@ +# SnapshotStatusV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task** | **str** | The current task being performed on the snapshot | [optional] +**created** | **bool** | Indicates if the snapshot has been successfully created | [optional] + +## Example + +```python +from corellium.models.snapshot_status_v1 import SnapshotStatusV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotStatusV1 from a JSON string +snapshot_status_v1_instance = SnapshotStatusV1.from_json(json) +# print the JSON string representation of the object +print(SnapshotStatusV1.to_json()) + +# convert the object into a dict +snapshot_status_v1_dict = snapshot_status_v1_instance.to_dict() +# create an instance of SnapshotStatusV1 from a dict +snapshot_status_v1_from_dict = SnapshotStatusV1.from_dict(snapshot_status_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotV1.md b/docs/SnapshotV1.md new file mode 100644 index 0000000..910c5f1 --- /dev/null +++ b/docs/SnapshotV1.md @@ -0,0 +1,39 @@ +# SnapshotV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Snapshot ID | +**name** | **str** | Snapshot name | +**instance** | **str** | Instance that this snapshot is of | +**status** | [**SnapshotStatusV1**](SnapshotStatusV1.md) | | +**var_date** | **float** | UNIX Date that the snapshot was created | +**fresh** | **bool** | | +**live** | **bool** | Live snapshot (included state and memory) | +**local** | **bool** | | +**model** | **str** | The device model | [optional] +**sharing** | [**SnapshotSharingV1**](SnapshotSharingV1.md) | | [optional] + +## Example + +```python +from corellium.models.snapshot_v1 import SnapshotV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotV1 from a JSON string +snapshot_v1_instance = SnapshotV1.from_json(json) +# print the JSON string representation of the object +print(SnapshotV1.to_json()) + +# convert the object into a dict +snapshot_v1_dict = snapshot_v1_instance.to_dict() +# create an instance of SnapshotV1 from a dict +snapshot_v1_from_dict = SnapshotV1.from_dict(snapshot_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SnapshotsApi.md b/docs/SnapshotsApi.md new file mode 100644 index 0000000..f952ac0 --- /dev/null +++ b/docs/SnapshotsApi.md @@ -0,0 +1,797 @@ +# corellium.SnapshotsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_instance_snapshot**](SnapshotsApi.md#v3_create_instance_snapshot) | **POST** /v3/instances/{instanceId}/snapshots | Create instance snapshot +[**v3_delete_instance_snapshot**](SnapshotsApi.md#v3_delete_instance_snapshot) | **DELETE** /v3/instances/{instanceId}/snapshots/{snapshotId} | Delete an instance snapshot +[**v3_delete_snapshot**](SnapshotsApi.md#v3_delete_snapshot) | **DELETE** /v3/snapshots/{snapshotId} | Delete a snapshot +[**v3_get_instance_snapshot**](SnapshotsApi.md#v3_get_instance_snapshot) | **GET** /v3/instances/{instanceId}/snapshots/{snapshotId} | Get instance snapshot +[**v3_get_snapshot**](SnapshotsApi.md#v3_get_snapshot) | **GET** /v3/snapshots/{snapshotId} | Get snapshot +[**v3_list_instance_snapshots**](SnapshotsApi.md#v3_list_instance_snapshots) | **GET** /v3/instances/{instanceId}/snapshots | List instance snapshots +[**v3_patch_instance_snapshot**](SnapshotsApi.md#v3_patch_instance_snapshot) | **PATCH** /v3/instances/{instanceId}/snapshots/{snapshotId} | Update an instance snapshot +[**v3_restore_instance_snapshot**](SnapshotsApi.md#v3_restore_instance_snapshot) | **POST** /v3/instances/{instanceId}/snapshots/{snapshotId}/restore | Restore instance snapshot +[**v3_update_snapshot**](SnapshotsApi.md#v3_update_snapshot) | **PATCH** /v3/snapshots/{snapshotId} | Update snapshot name + + +# **v3_create_instance_snapshot** +> Snapshot v3_create_instance_snapshot(instance_id, create_snapshot_body=create_snapshot_body) + +Create instance snapshot + +Saves a snapshot of the device's current state, so you can return to it later with `v3RestoreInstanceSnapshot`. Take one before a risky change (an app install, a jailbreak step, an OS change) to be able to undo it. + +**Running or off.** A device that is off can always be snapshotted. A running device can only be snapshotted if its model supports live snapshots; otherwise the request fails with 400, so stop the device first (`v3StopInstance`). + +The snapshot is saved in the background: the response is the new snapshot with status `creating`. Poll `v3GetInstanceSnapshot` until it is ready. Each device can keep a limited number of snapshots (`snapshotLimit` in `GET /v3/config`); at the limit, delete an old one first. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_snapshot_body import CreateSnapshotBody +from corellium.models.snapshot import Snapshot +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance identifier. + create_snapshot_body = corellium.CreateSnapshotBody() # CreateSnapshotBody | (optional) + + try: + # Create instance snapshot + api_response = api_instance.v3_create_instance_snapshot(instance_id, create_snapshot_body=create_snapshot_body) + print("The response of SnapshotsApi->v3_create_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_create_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance identifier. | + **create_snapshot_body** | [**CreateSnapshotBody**](CreateSnapshotBody.md)| | [optional] + +### Return type + +[**Snapshot**](Snapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Created snapshot. | - | +**400** | Instance not found. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_instance_snapshot** +> v3_delete_instance_snapshot(instance_id, snapshot_id) + +Delete an instance snapshot + +Delete an instance snapshot. Deletion is asynchronous: the snapshot is marked `deleting` and +the call returns 204 before the underlying storage has been reclaimed. + +Deletes are idempotent: an unknown `snapshotId`, or an unknown `instanceId`, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. +A repeat therefore returns 204 both while the snapshot is still present in the `deleting` state and after +it has disappeared. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance identifier. + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + + try: + # Delete an instance snapshot + api_instance.v3_delete_instance_snapshot(instance_id, snapshot_id) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_delete_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance identifier. | + **snapshot_id** | **str**| Snapshot identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Snapshot deleted; empty body. | - | +**400** | Malformed snapshot ID. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_snapshot** +> v3_delete_snapshot(snapshot_id) + +Delete a snapshot + +Delete a snapshot by ID. Deletion is asynchronous: the snapshot is marked `deleting` and the +call returns 204 before the underlying storage has been reclaimed. + +Deletes are idempotent: an unknown `snapshotId`, or a snapshot that was already deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. +A repeat therefore returns 204 both while the snapshot is still present in the `deleting` state and after +it has disappeared. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + + try: + # Delete a snapshot + api_instance.v3_delete_snapshot(snapshot_id) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_delete_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successfully deleted snapshot; empty body. | - | +**400** | Malformed snapshot ID. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_instance_snapshot** +> Snapshot v3_get_instance_snapshot(instance_id, snapshot_id) + +Get instance snapshot + +Returns one snapshot of this device, including its status. Poll it after `v3CreateInstanceSnapshot` until the snapshot has finished `creating`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot import Snapshot +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance identifier. + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + + try: + # Get instance snapshot + api_response = api_instance.v3_get_instance_snapshot(instance_id, snapshot_id) + print("The response of SnapshotsApi->v3_get_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_get_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance identifier. | + **snapshot_id** | **str**| Snapshot identifier. | + +### Return type + +[**Snapshot**](Snapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Instance snapshot details. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance or snapshot not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_snapshot** +> Snapshot v3_get_snapshot(snapshot_id) + +Get snapshot + +Returns one snapshot by its ID, including its status and sharing details. Works for snapshots of your devices; use `v3AcceptSharedSnapshot` for snapshots shared with you. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot import Snapshot +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + + try: + # Get snapshot + api_response = api_instance.v3_get_snapshot(snapshot_id) + print("The response of SnapshotsApi->v3_get_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_get_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot identifier. | + +### Return type + +[**Snapshot**](Snapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved snapshot. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Snapshot not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_instance_snapshots** +> InstanceSnapshotsList v3_list_instance_snapshots(instance_id, limit=limit, offset=offset) + +List instance snapshots + +Lists the snapshots saved for one device, with each snapshot's ID, name and status. A snapshot is a saved copy of the device's storage at a moment in time; restore it with `v3RestoreInstanceSnapshot` to put the device back to that state. Results are paginated with `limit` and `offset`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.instance_snapshots_list import InstanceSnapshotsList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance identifier. + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List instance snapshots + api_response = api_instance.v3_list_instance_snapshots(instance_id, limit=limit, offset=offset) + print("The response of SnapshotsApi->v3_list_instance_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_list_instance_snapshots: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance identifier. | + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**InstanceSnapshotsList**](InstanceSnapshotsList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of snapshots for the instance. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Instance not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_instance_snapshot** +> Snapshot v3_patch_instance_snapshot(instance_id, snapshot_id, create_snapshot_body) + +Update an instance snapshot + +Renames a snapshot. Send the new `name`. Returns the updated snapshot. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_snapshot_body import CreateSnapshotBody +from corellium.models.snapshot import Snapshot +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance identifier. + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + create_snapshot_body = corellium.CreateSnapshotBody() # CreateSnapshotBody | + + try: + # Update an instance snapshot + api_response = api_instance.v3_patch_instance_snapshot(instance_id, snapshot_id, create_snapshot_body) + print("The response of SnapshotsApi->v3_patch_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_patch_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance identifier. | + **snapshot_id** | **str**| Snapshot identifier. | + **create_snapshot_body** | [**CreateSnapshotBody**](CreateSnapshotBody.md)| | + +### Return type + +[**Snapshot**](Snapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated snapshot. | - | +**400** | Validation error or no changes provided. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_restore_instance_snapshot** +> v3_restore_instance_snapshot(instance_id, snapshot_id) + +Restore instance snapshot + +Puts the device back to the state saved in a snapshot, replacing its current storage. Anything changed since the snapshot was taken is lost; take a new snapshot first if you want to keep it. The restore runs in the background and starts the device from the snapshot; returns 204 once it has been accepted. Poll `v3GetInstanceState` until the device is `on`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' # str | Instance identifier. + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + + try: + # Restore instance snapshot + api_instance.v3_restore_instance_snapshot(instance_id, snapshot_id) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_restore_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance identifier. | + **snapshot_id** | **str**| Snapshot identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Restore snapshot accepted. | - | +**400** | Invalid snapshot ID. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_update_snapshot** +> Snapshot v3_update_snapshot(snapshot_id, v3_update_snapshot_request) + +Update snapshot name + +Renames a snapshot. Send the new `name`. Returns the updated snapshot. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot import Snapshot +from corellium.models.v3_update_snapshot_request import V3UpdateSnapshotRequest +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsApi(api_client) + snapshot_id = 'c67af9c0-26cd-4233-9782-436c842b60db' # str | Snapshot identifier. + v3_update_snapshot_request = corellium.V3UpdateSnapshotRequest() # V3UpdateSnapshotRequest | + + try: + # Update snapshot name + api_response = api_instance.v3_update_snapshot(snapshot_id, v3_update_snapshot_request) + print("The response of SnapshotsApi->v3_update_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsApi->v3_update_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot identifier. | + **v3_update_snapshot_request** | [**V3UpdateSnapshotRequest**](V3UpdateSnapshotRequest.md)| | + +### Return type + +[**Snapshot**](Snapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully updated snapshot name. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | Snapshot not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SnapshotsV1Api.md b/docs/SnapshotsV1Api.md new file mode 100644 index 0000000..f25b53e --- /dev/null +++ b/docs/SnapshotsV1Api.md @@ -0,0 +1,757 @@ +# corellium.SnapshotsV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_create_snapshot**](SnapshotsV1Api.md#v1_create_snapshot) | **POST** /v1/instances/{instanceId}/snapshots | Create Instance Snapshot +[**v1_delete_instance_snapshot**](SnapshotsV1Api.md#v1_delete_instance_snapshot) | **DELETE** /v1/instances/{instanceId}/snapshots/{snapshotId} | Delete an Instance Snapshot +[**v1_delete_snapshot**](SnapshotsV1Api.md#v1_delete_snapshot) | **DELETE** /v1/snapshots/{snapshotId} | Delete a Snapshot +[**v1_get_instance_snapshot**](SnapshotsV1Api.md#v1_get_instance_snapshot) | **GET** /v1/instances/{instanceId}/snapshots/{snapshotId} | Get Instance Snapshot +[**v1_get_instance_snapshots**](SnapshotsV1Api.md#v1_get_instance_snapshots) | **GET** /v1/instances/{instanceId}/snapshots | Get Instance Snapshots +[**v1_get_snapshot**](SnapshotsV1Api.md#v1_get_snapshot) | **GET** /v1/snapshots/{snapshotId} | Get Snapshot +[**v1_rename_instance_snapshot**](SnapshotsV1Api.md#v1_rename_instance_snapshot) | **PATCH** /v1/instances/{instanceId}/snapshots/{snapshotId} | Rename an Instance Snapshot +[**v1_restore_instance_snapshot**](SnapshotsV1Api.md#v1_restore_instance_snapshot) | **POST** /v1/instances/{instanceId}/snapshots/{snapshotId}/restore | Restore an Instance Snapshot +[**v1_snapshot_rename**](SnapshotsV1Api.md#v1_snapshot_rename) | **PATCH** /v1/snapshots/{snapshotId} | Rename a Snapshot + + +# **v1_create_snapshot** +> SnapshotV1 v1_create_snapshot(instance_id, snapshot_creation_options) + +Create Instance Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_creation_options import SnapshotCreationOptions +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + snapshot_creation_options = corellium.SnapshotCreationOptions() # SnapshotCreationOptions | + + try: + # Create Instance Snapshot + api_response = api_instance.v1_create_snapshot(instance_id, snapshot_creation_options) + print("The response of SnapshotsV1Api->v1_create_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_create_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **snapshot_creation_options** | [**SnapshotCreationOptions**](SnapshotCreationOptions.md)| | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_instance_snapshot** +> v1_delete_instance_snapshot(instance_id, snapshot_id) + +Delete an Instance Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + + try: + # Delete an Instance Snapshot + api_instance.v1_delete_instance_snapshot(instance_id, snapshot_id) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_delete_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **snapshot_id** | **str**| Snapshot ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Bad Request { \"error\": \"Invalid snapshot id: 3a28e565-cf46-4706-86e7-e3af6b33ae0dd\", \"errorID\": \"UserError\", \"field\": \"snapshotId\" } | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_snapshot** +> v1_delete_snapshot(snapshot_id) + +Delete a Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + + try: + # Delete a Snapshot + api_instance.v1_delete_snapshot(snapshot_id) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_delete_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance_snapshot** +> SnapshotV1 v1_get_instance_snapshot(instance_id, snapshot_id) + +Get Instance Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + + try: + # Get Instance Snapshot + api_response = api_instance.v1_get_instance_snapshot(instance_id, snapshot_id) + print("The response of SnapshotsV1Api->v1_get_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_get_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **snapshot_id** | **str**| Snapshot ID - uuid | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_instance_snapshots** +> List[SnapshotV1] v1_get_instance_snapshots(instance_id) + +Get Instance Snapshots + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + + try: + # Get Instance Snapshots + api_response = api_instance.v1_get_instance_snapshots(instance_id) + print("The response of SnapshotsV1Api->v1_get_instance_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_get_instance_snapshots: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + +### Return type + +[**List[SnapshotV1]**](SnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_snapshot** +> SnapshotV1 v1_get_snapshot(snapshot_id) + +Get Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + + try: + # Get Snapshot + api_response = api_instance.v1_get_snapshot(snapshot_id) + print("The response of SnapshotsV1Api->v1_get_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_get_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot ID - uuid | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_rename_instance_snapshot** +> SnapshotV1 v1_rename_instance_snapshot(instance_id, snapshot_id, snapshot_creation_options) + +Rename an Instance Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_creation_options import SnapshotCreationOptions +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + snapshot_creation_options = corellium.SnapshotCreationOptions() # SnapshotCreationOptions | + + try: + # Rename an Instance Snapshot + api_response = api_instance.v1_rename_instance_snapshot(instance_id, snapshot_id, snapshot_creation_options) + print("The response of SnapshotsV1Api->v1_rename_instance_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_rename_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **snapshot_id** | **str**| Snapshot ID - uuid | + **snapshot_creation_options** | [**SnapshotCreationOptions**](SnapshotCreationOptions.md)| | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**400** | Validation Error | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_restore_instance_snapshot** +> v1_restore_instance_snapshot(instance_id, snapshot_id) + +Restore an Instance Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + instance_id = 'instance_id_example' # str | Instance ID - uuid + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + + try: + # Restore an Instance Snapshot + api_instance.v1_restore_instance_snapshot(instance_id, snapshot_id) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_restore_instance_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **str**| Instance ID - uuid | + **snapshot_id** | **str**| Snapshot ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_snapshot_rename** +> SnapshotV1 v1_snapshot_rename(snapshot_id, snapshot_creation_options) + +Rename a Snapshot + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.snapshot_creation_options import SnapshotCreationOptions +from corellium.models.snapshot_v1 import SnapshotV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.SnapshotsV1Api(api_client) + snapshot_id = 'snapshot_id_example' # str | Snapshot ID - uuid + snapshot_creation_options = corellium.SnapshotCreationOptions() # SnapshotCreationOptions | + + try: + # Rename a Snapshot + api_response = api_instance.v1_snapshot_rename(snapshot_id, snapshot_creation_options) + print("The response of SnapshotsV1Api->v1_snapshot_rename:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SnapshotsV1Api->v1_snapshot_rename: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| Snapshot ID - uuid | + **snapshot_creation_options** | [**SnapshotCreationOptions**](SnapshotCreationOptions.md)| | + +### Return type + +[**SnapshotV1**](SnapshotV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SslsplitFilter.md b/docs/SslsplitFilter.md index fe32109..45f8732 100644 --- a/docs/SslsplitFilter.md +++ b/docs/SslsplitFilter.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **truncate_pcap** | **bool** | | [optional] +## Example + +```python +from corellium.models.sslsplit_filter import SslsplitFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of SslsplitFilter from a JSON string +sslsplit_filter_instance = SslsplitFilter.from_json(json) +# print the JSON string representation of the object +print(SslsplitFilter.to_json()) + +# convert the object into a dict +sslsplit_filter_dict = sslsplit_filter_instance.to_dict() +# create an instance of SslsplitFilter from a dict +sslsplit_filter_from_dict = SslsplitFilter.from_dict(sslsplit_filter_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StartInstanceBody.md b/docs/StartInstanceBody.md new file mode 100644 index 0000000..2ba87d4 --- /dev/null +++ b/docs/StartInstanceBody.md @@ -0,0 +1,30 @@ +# StartInstanceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**paused** | **bool** | Start device paused. | [optional] +**sock_cap** | **bool** | Start device with Process Network Monitoring enabled. | [optional] + +## Example + +```python +from corellium.models.start_instance_body import StartInstanceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of StartInstanceBody from a JSON string +start_instance_body_instance = StartInstanceBody.from_json(json) +# print the JSON string representation of the object +print(StartInstanceBody.to_json()) + +# convert the object into a dict +start_instance_body_dict = start_instance_body_instance.to_dict() +# create an instance of StartInstanceBody from a dict +start_instance_body_from_dict = StartInstanceBody.from_dict(start_instance_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StatusApi.md b/docs/StatusApi.md new file mode 100644 index 0000000..92af56a --- /dev/null +++ b/docs/StatusApi.md @@ -0,0 +1,111 @@ +# corellium.StatusApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_ready**](StatusApi.md#v3_ready) | **GET** /v3/ready | Check that the API is ready + + +# **v3_ready** +> v3_ready() + +Check that the API is ready + +Health check. Returns 204 (no body) when the API is up and accepting requests, and 503 while it is shutting down. Needs no sign-in, so monitoring tools and scripts can call it before doing real work, for example to wait for a deployment to come back after an upgrade. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StatusApi(api_client) + + try: + # Check that the API is ready + api_instance.v3_ready() + except Exception as e: + print("Exception when calling StatusApi->v3_ready: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | API is ready for queries. | - | +**503** | API is not ready. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/StatusV1Api.md b/docs/StatusV1Api.md new file mode 100644 index 0000000..b311d1a --- /dev/null +++ b/docs/StatusV1Api.md @@ -0,0 +1,101 @@ +# corellium.StatusV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_ready**](StatusV1Api.md#v1_ready) | **GET** /v1/ready | API Status + + +# **v1_ready** +> v1_ready() + +API Status + +Check if API is ready for queries + +### Example + + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StatusV1Api(api_client) + + try: + # API Status + api_instance.v1_ready() + except Exception as e: + print("Exception when calling StatusV1Api->v1_ready: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | API is ready for queries | - | +**503** | API is not ready | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/StopInstanceBody.md b/docs/StopInstanceBody.md new file mode 100644 index 0000000..91e8d33 --- /dev/null +++ b/docs/StopInstanceBody.md @@ -0,0 +1,29 @@ +# StopInstanceBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**soft** | **bool** | Controls how the VM is stopped. When true (the default), performs a graceful shutdown. When false, performs a forced, immediate stop. | [optional] [default to True] + +## Example + +```python +from corellium.models.stop_instance_body import StopInstanceBody + +# TODO update the JSON string below +json = "{}" +# create an instance of StopInstanceBody from a JSON string +stop_instance_body_instance = StopInstanceBody.from_json(json) +# print the JSON string representation of the object +print(StopInstanceBody.to_json()) + +# convert the object into a dict +stop_instance_body_dict = stop_instance_body_instance.to_dict() +# create an instance of StopInstanceBody from a dict +stop_instance_body_from_dict = StopInstanceBody.from_dict(stop_instance_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageAlreadyMountedResponse.md b/docs/StorageAlreadyMountedResponse.md new file mode 100644 index 0000000..3cd849f --- /dev/null +++ b/docs/StorageAlreadyMountedResponse.md @@ -0,0 +1,31 @@ +# StorageAlreadyMountedResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Human-readable status message. | +**mount_point** | **str** | Filesystem path where the device is mounted. | +**device** | **str** | Device node path. | + +## Example + +```python +from corellium.models.storage_already_mounted_response import StorageAlreadyMountedResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageAlreadyMountedResponse from a JSON string +storage_already_mounted_response_instance = StorageAlreadyMountedResponse.from_json(json) +# print the JSON string representation of the object +print(StorageAlreadyMountedResponse.to_json()) + +# convert the object into a dict +storage_already_mounted_response_dict = storage_already_mounted_response_instance.to_dict() +# create an instance of StorageAlreadyMountedResponse from a dict +storage_already_mounted_response_from_dict = StorageAlreadyMountedResponse.from_dict(storage_already_mounted_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageApi.md b/docs/StorageApi.md new file mode 100644 index 0000000..5b1e037 --- /dev/null +++ b/docs/StorageApi.md @@ -0,0 +1,511 @@ +# corellium.StorageApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_attach_cluster_storage**](StorageApi.md#v3_attach_cluster_storage) | **POST** /v3/cluster/storage/{id}/attach | Attach storage device +[**v3_eject_cluster_storage**](StorageApi.md#v3_eject_cluster_storage) | **POST** /v3/cluster/storage/{id}/eject | Eject storage device +[**v3_list_cluster_storage**](StorageApi.md#v3_list_cluster_storage) | **GET** /v3/cluster/storage | List cluster storage devices +[**v3_list_storage**](StorageApi.md#v3_list_storage) | **GET** /v3/storage | List server-attached storage devices +[**v3_list_storage_files**](StorageApi.md#v3_list_storage_files) | **GET** /v3/storage/{id}/files/{path} | List storage files + + +# **v3_attach_cluster_storage** +> StorageAlreadyMountedResponse v3_attach_cluster_storage(id) + +Attach storage device + +**Required role:** Cluster administrator. + +Mounts an attached storage device so its files can be used. Mounting runs in the background: returns 202 when the mount has been queued, or 200 if the device is already mounted. Browse its files with `GET /v3/storage/{id}/files/{path}`. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.storage_already_mounted_response import StorageAlreadyMountedResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageApi(api_client) + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab' # str | Storage device identifier. + + try: + # Attach storage device + api_response = api_instance.v3_attach_cluster_storage(id) + print("The response of StorageApi->v3_attach_cluster_storage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageApi->v3_attach_cluster_storage: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Storage device identifier. | + +### Return type + +[**StorageAlreadyMountedResponse**](StorageAlreadyMountedResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Device is already mounted. | - | +**202** | Mount job queued. | - | +**400** | Server-attached storage is not available on cloud installations. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. The serverAttachedStorage feature must be enabled. | - | +**404** | Storage device not found. | - | +**500** | Failed to queue the mount job. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_eject_cluster_storage** +> StorageEjectAlreadyUnmountedResponse v3_eject_cluster_storage(id) + +Eject storage device + +**Required role:** Cluster administrator. + +Unmounts an attached storage device so it can be unplugged safely. Unmounting runs in the background: returns 202 when the unmount has been queued, or 200 if the device is already unmounted. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.storage_eject_already_unmounted_response import StorageEjectAlreadyUnmountedResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageApi(api_client) + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab' # str | Storage device identifier. + + try: + # Eject storage device + api_response = api_instance.v3_eject_cluster_storage(id) + print("The response of StorageApi->v3_eject_cluster_storage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageApi->v3_eject_cluster_storage: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Storage device identifier. | + +### Return type + +[**StorageEjectAlreadyUnmountedResponse**](StorageEjectAlreadyUnmountedResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Device is already unmounted. | - | +**202** | Unmount job queued. | - | +**400** | Server-attached storage is not available on cloud installations. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. The serverAttachedStorage feature must be enabled. | - | +**404** | Storage device not found. | - | +**500** | Failed to queue the unmount job. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_cluster_storage** +> StorageDeviceList v3_list_cluster_storage(limit=limit, offset=offset, id=id, device=device, fs_type=fs_type, fs_uuid=fs_uuid, label=label, serial=serial, vendor=vendor, model=model, mount_policy=mount_policy, status=status, sort=sort) + +List cluster storage devices + +**Required role:** Cluster administrator. + +Lists the physical storage devices (for example USB drives) attached to the cluster's servers, for cluster administrators. Requires a cluster administrator. Requires the serverAttachedStorage feature. Not available on cloud installations. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.storage_device_list import StorageDeviceList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageApi(api_client) + limit = 100 # float | Maximum results to return. (optional) (default to 100) + offset = 0 # float | Results to skip. (optional) (default to 0) + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab' # str | Filter by identifier (comma-separated for multiple). (optional) + device = 'sdb1' # str | Filter by device name (partial match). (optional) + fs_type = 'ext4' # str | Filter by filesystem type (comma-separated). (optional) + fs_uuid = '4a3f2e1d' # str | Filter by filesystem UUID (partial match). (optional) + label = 'EXTERNAL' # str | Filter by label (partial match). (optional) + serial = '0123456789' # str | Filter by serial number (partial match). (optional) + vendor = 'SanDisk' # str | Filter by vendor (partial match). (optional) + model = 'Ultra' # str | Filter by model (partial match). (optional) + mount_policy = 'mount_policy_example' # str | Filter by mount policy. (optional) + status = 'status_example' # str | Filter by mount status. (optional) + sort = '-device' # str | Sort order (e.g. 'device' or '-device'). (optional) + + try: + # List cluster storage devices + api_response = api_instance.v3_list_cluster_storage(limit=limit, offset=offset, id=id, device=device, fs_type=fs_type, fs_uuid=fs_uuid, label=label, serial=serial, vendor=vendor, model=model, mount_policy=mount_policy, status=status, sort=sort) + print("The response of StorageApi->v3_list_cluster_storage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageApi->v3_list_cluster_storage: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Maximum results to return. | [optional] [default to 100] + **offset** | **float**| Results to skip. | [optional] [default to 0] + **id** | **str**| Filter by identifier (comma-separated for multiple). | [optional] + **device** | **str**| Filter by device name (partial match). | [optional] + **fs_type** | **str**| Filter by filesystem type (comma-separated). | [optional] + **fs_uuid** | **str**| Filter by filesystem UUID (partial match). | [optional] + **label** | **str**| Filter by label (partial match). | [optional] + **serial** | **str**| Filter by serial number (partial match). | [optional] + **vendor** | **str**| Filter by vendor (partial match). | [optional] + **model** | **str**| Filter by model (partial match). | [optional] + **mount_policy** | **str**| Filter by mount policy. | [optional] + **status** | **str**| Filter by mount status. | [optional] + **sort** | **str**| Sort order (e.g. 'device' or '-device'). | [optional] + +### Return type + +[**StorageDeviceList**](StorageDeviceList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of attached storage devices. | - | +**400** | Invalid query parameter(s). | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Cluster administrator permissions required. The serverAttachedStorage feature must be enabled. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_storage** +> StorageList v3_list_storage(limit=limit, offset=offset, sort=sort, identifier=identifier, device=device, fs_type=fs_type, mount_policy=mount_policy, status=status) + +List server-attached storage devices + +Lists the physical storage devices (for example USB drives or disks) plugged into an on-site Corellium server, with their name, filesystem, label, vendor, whether they are mounted, and whether they are mounted read-only (`RO`) or read-write (`RW`). Use a device's `id` with `v3ListStorageFiles` to browse its contents. For cluster administrators on on-site deployments; not available on cloud installations. Results are paginated and can be filtered and sorted with the query parameters. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.storage_list import StorageList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + sort = '-createdAt' # str | Sort order (prefix a field with \"-\" for descending). (optional) + identifier = '73357171-23a0-4a3e-8661-216dbfbdd7ab,9f2b6c04-58ad-4d61-b0e7-1ac9d8e07f35' # str | Filter by identifier (comma separated). (optional) + device = 'sdb' # str | Filter by device name (partial match). (optional) + fs_type = 'ext4,exfat' # str | Filter by filesystem type (comma separated). (optional) + mount_policy = 'mount_policy_example' # str | Filter by mount policy. (optional) + status = 'status_example' # str | Filter by mount status. (optional) + + try: + # List server-attached storage devices + api_response = api_instance.v3_list_storage(limit=limit, offset=offset, sort=sort, identifier=identifier, device=device, fs_type=fs_type, mount_policy=mount_policy, status=status) + print("The response of StorageApi->v3_list_storage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageApi->v3_list_storage: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **sort** | **str**| Sort order (prefix a field with \"-\" for descending). | [optional] + **identifier** | **str**| Filter by identifier (comma separated). | [optional] + **device** | **str**| Filter by device name (partial match). | [optional] + **fs_type** | **str**| Filter by filesystem type (comma separated). | [optional] + **mount_policy** | **str**| Filter by mount policy. | [optional] + **status** | **str**| Filter by mount status. | [optional] + +### Return type + +[**StorageList**](StorageList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of storage devices. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_storage_files** +> StorageFileList v3_list_storage_files(id, path, limit=limit, offset=offset, sort=sort, name=name, type=type) + +List storage files + +Lists the files and folders at one path on a server-attached storage device (see `v3ListStorage`), with each entry's name, type, size and modification time. Use `/` to list the top level, then pass a folder's path to go deeper. The path must be a folder; a file path returns 400, and paths that try to leave the device (for example with `..`) are rejected. Returns 404 if the device or path does not exist. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.storage_file_list import StorageFileList +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageApi(api_client) + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab' # str | Storage device identifier. + path = '/var/mobile/Media' # str | Folder to list, relative to the top of the storage device. Slashes are kept as path separators. + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + sort = '-lastModifiedTime' # str | Sort order (prefix a field with \"-\" for descending). (optional) + name = 'firmware.ipsw,boot.img' # str | Filter by name (case-insensitive exact match, comma separated). (optional) + type = 'file' # str | Filter by type (case-insensitive partial match, e.g. \"file\" or \"dir\"). (optional) + + try: + # List storage files + api_response = api_instance.v3_list_storage_files(id, path, limit=limit, offset=offset, sort=sort, name=name, type=type) + print("The response of StorageApi->v3_list_storage_files:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageApi->v3_list_storage_files: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Storage device identifier. | + **path** | **str**| Folder to list, relative to the top of the storage device. Slashes are kept as path separators. | + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + **sort** | **str**| Sort order (prefix a field with \"-\" for descending). | [optional] + **name** | **str**| Filter by name (case-insensitive exact match, comma separated). | [optional] + **type** | **str**| Filter by type (case-insensitive partial match, e.g. \"file\" or \"dir\"). | [optional] + +### Return type + +[**StorageFileList**](StorageFileList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of files and directories. | - | +**400** | Invalid path or query parameters. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No storage device or path with the given identifier. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/StorageAttachResponse.md b/docs/StorageAttachResponse.md new file mode 100644 index 0000000..539d546 --- /dev/null +++ b/docs/StorageAttachResponse.md @@ -0,0 +1,31 @@ +# StorageAttachResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Job status. | +**message** | **str** | Human-readable status message. | +**id** | **str** | Storage device identifier. | + +## Example + +```python +from corellium.models.storage_attach_response import StorageAttachResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageAttachResponse from a JSON string +storage_attach_response_instance = StorageAttachResponse.from_json(json) +# print the JSON string representation of the object +print(StorageAttachResponse.to_json()) + +# convert the object into a dict +storage_attach_response_dict = storage_attach_response_instance.to_dict() +# create an instance of StorageAttachResponse from a dict +storage_attach_response_from_dict = StorageAttachResponse.from_dict(storage_attach_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageDevice.md b/docs/StorageDevice.md new file mode 100644 index 0000000..959da68 --- /dev/null +++ b/docs/StorageDevice.md @@ -0,0 +1,40 @@ +# StorageDevice + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for the storage device. | +**device** | **str** | Device node path (e.g. /dev/sdb1). | +**fs_type** | **str** | Filesystem type (e.g. ext4, vfat). | +**fs_uuid** | **str** | Filesystem UUID. | +**label** | **str** | Filesystem label. | +**serial** | **str** | Device serial number. | +**vendor** | **str** | Device vendor. | +**model** | **str** | Device model. | +**mount_policy** | **str** | Mount policy for the device. | +**status** | **str** | Current mount status. | +**created_at** | **datetime** | Timestamp when the record was created. | +**updated_at** | **datetime** | Timestamp when the record was last updated. | + +## Example + +```python +from corellium.models.storage_device import StorageDevice + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageDevice from a JSON string +storage_device_instance = StorageDevice.from_json(json) +# print the JSON string representation of the object +print(StorageDevice.to_json()) + +# convert the object into a dict +storage_device_dict = storage_device_instance.to_dict() +# create an instance of StorageDevice from a dict +storage_device_from_dict = StorageDevice.from_dict(storage_device_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageDeviceList.md b/docs/StorageDeviceList.md new file mode 100644 index 0000000..bccccf5 --- /dev/null +++ b/docs/StorageDeviceList.md @@ -0,0 +1,34 @@ +# StorageDeviceList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[StorageDevice]**](StorageDevice.md) | List of storage devices. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.storage_device_list import StorageDeviceList + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageDeviceList from a JSON string +storage_device_list_instance = StorageDeviceList.from_json(json) +# print the JSON string representation of the object +print(StorageDeviceList.to_json()) + +# convert the object into a dict +storage_device_list_dict = storage_device_list_instance.to_dict() +# create an instance of StorageDeviceList from a dict +storage_device_list_from_dict = StorageDeviceList.from_dict(storage_device_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageEjectAlreadyUnmountedResponse.md b/docs/StorageEjectAlreadyUnmountedResponse.md new file mode 100644 index 0000000..d8e52d0 --- /dev/null +++ b/docs/StorageEjectAlreadyUnmountedResponse.md @@ -0,0 +1,29 @@ +# StorageEjectAlreadyUnmountedResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Human-readable status message. | + +## Example + +```python +from corellium.models.storage_eject_already_unmounted_response import StorageEjectAlreadyUnmountedResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageEjectAlreadyUnmountedResponse from a JSON string +storage_eject_already_unmounted_response_instance = StorageEjectAlreadyUnmountedResponse.from_json(json) +# print the JSON string representation of the object +print(StorageEjectAlreadyUnmountedResponse.to_json()) + +# convert the object into a dict +storage_eject_already_unmounted_response_dict = storage_eject_already_unmounted_response_instance.to_dict() +# create an instance of StorageEjectAlreadyUnmountedResponse from a dict +storage_eject_already_unmounted_response_from_dict = StorageEjectAlreadyUnmountedResponse.from_dict(storage_eject_already_unmounted_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageFile.md b/docs/StorageFile.md new file mode 100644 index 0000000..b630471 --- /dev/null +++ b/docs/StorageFile.md @@ -0,0 +1,33 @@ +# StorageFile + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | File or directory name. | +**ext** | **str** | File extension, or null for directories. | +**type** | **str** | Entry type. | +**size** | **float** | Size in bytes (0 for directories). | +**last_modified_time** | **datetime** | Last modified timestamp, or 1970-01-01T00:00:00.000Z when the entry could not be stat'd. | + +## Example + +```python +from corellium.models.storage_file import StorageFile + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageFile from a JSON string +storage_file_instance = StorageFile.from_json(json) +# print the JSON string representation of the object +print(StorageFile.to_json()) + +# convert the object into a dict +storage_file_dict = storage_file_instance.to_dict() +# create an instance of StorageFile from a dict +storage_file_from_dict = StorageFile.from_dict(storage_file_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageFileList.md b/docs/StorageFileList.md new file mode 100644 index 0000000..09415a0 --- /dev/null +++ b/docs/StorageFileList.md @@ -0,0 +1,34 @@ +# StorageFileList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[StorageFile]**](StorageFile.md) | Files and directories in this response. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.storage_file_list import StorageFileList + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageFileList from a JSON string +storage_file_list_instance = StorageFileList.from_json(json) +# print the JSON string representation of the object +print(StorageFileList.to_json()) + +# convert the object into a dict +storage_file_list_dict = storage_file_list_instance.to_dict() +# create an instance of StorageFileList from a dict +storage_file_list_from_dict = StorageFileList.from_dict(storage_file_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageList.md b/docs/StorageList.md new file mode 100644 index 0000000..37d2bec --- /dev/null +++ b/docs/StorageList.md @@ -0,0 +1,34 @@ +# StorageList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[MediaStore]**](MediaStore.md) | Storage devices in this response. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.storage_list import StorageList + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageList from a JSON string +storage_list_instance = StorageList.from_json(json) +# print the JSON string representation of the object +print(StorageList.to_json()) + +# convert the object into a dict +storage_list_dict = storage_list_instance.to_dict() +# create an instance of StorageList from a dict +storage_list_from_dict = StorageList.from_dict(storage_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageQueueError.md b/docs/StorageQueueError.md new file mode 100644 index 0000000..613230d --- /dev/null +++ b/docs/StorageQueueError.md @@ -0,0 +1,31 @@ +# StorageQueueError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error summary. | +**details** | **str** | Underlying error message. | +**suggestion** | **str** | Suggested remediation. | + +## Example + +```python +from corellium.models.storage_queue_error import StorageQueueError + +# TODO update the JSON string below +json = "{}" +# create an instance of StorageQueueError from a JSON string +storage_queue_error_instance = StorageQueueError.from_json(json) +# print the JSON string representation of the object +print(StorageQueueError.to_json()) + +# convert the object into a dict +storage_queue_error_dict = storage_queue_error_instance.to_dict() +# create an instance of StorageQueueError from a dict +storage_queue_error_from_dict = StorageQueueError.from_dict(storage_queue_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StorageV1Api.md b/docs/StorageV1Api.md new file mode 100644 index 0000000..2d6c81d --- /dev/null +++ b/docs/StorageV1Api.md @@ -0,0 +1,499 @@ +# corellium.StorageV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_attach_storage_cluster**](StorageV1Api.md#v1_attach_storage_cluster) | **POST** /v1/cluster/storage/{id}/attach | Mount and attach a storage device +[**v1_eject_storage_cluster**](StorageV1Api.md#v1_eject_storage_cluster) | **POST** /v1/cluster/storage/{id}/eject | Eject/Unmount removable media +[**v1_list_storage**](StorageV1Api.md#v1_list_storage) | **GET** /v1/storage | Get storage devices +[**v1_list_storage_cluster**](StorageV1Api.md#v1_list_storage_cluster) | **GET** /v1/cluster/storage | Get storage devices +[**v1_list_storage_files**](StorageV1Api.md#v1_list_storage_files) | **GET** /v1/storage/{id}/files/{path} | List Storage Files + + +# **v1_attach_storage_cluster** +> object v1_attach_storage_cluster(id) + +Mount and attach a storage device + +Initiates an asynchronous mount job for a registered storage device. If already mounted, returns status 200. If not, queues a background job and returns 202. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageV1Api(api_client) + id = 'id_example' # str | The unique identifier of the storage media + + try: + # Mount and attach a storage device + api_response = api_instance.v1_attach_storage_cluster(id) + print("The response of StorageV1Api->v1_attach_storage_cluster:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageV1Api->v1_attach_storage_cluster: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The unique identifier of the storage media | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Device is already mounted | - | +**202** | Mount job successfully queued | - | +**403** | Forbidden | - | +**404** | MediaStore record not found | - | +**500** | System failure while queuing the job | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_eject_storage_cluster** +> object v1_eject_storage_cluster(id) + +Eject/Unmount removable media + +Initiates an asynchronous unmount job for the physical storage device. If the device is already unmounted, returns success. If mounted, creates a background job to safely unmount. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageV1Api(api_client) + id = 'id_example' # str | Storage device identifier (UUID) + + try: + # Eject/Unmount removable media + api_response = api_instance.v1_eject_storage_cluster(id) + print("The response of StorageV1Api->v1_eject_storage_cluster:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageV1Api->v1_eject_storage_cluster: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Storage device identifier (UUID) | + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Device is already unmounted | - | +**202** | Unmount job successfully queued | - | +**403** | Forbidden | - | +**404** | MediaStore record not found | - | +**500** | System failure during job queuing | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_storage** +> GetStorageResponse v1_list_storage(limit=limit, offset=offset, identifier=identifier, device=device, fs_type=fs_type, mount_policy=mount_policy, status=status, sort=sort) + +Get storage devices + +List all attached storage devices. This endpoint is only available to all authenticated users. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.get_storage_response import GetStorageResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageV1Api(api_client) + limit = 3.4 # float | Maximum number of results to return (1–1000, default: 100) (optional) + offset = 3.4 # float | Number of results to skip (default: 0) (optional) + identifier = 'identifier_example' # str | Filter by identifier (comma separated) (optional) + device = 'device_example' # str | Filter by device name (partial match) (optional) + fs_type = 'fs_type_example' # str | Filter by filesystem type (comma separated) (optional) + mount_policy = 'mount_policy_example' # str | Filter by mount policy (RO or RW) (optional) + status = 'status_example' # str | Filter by status (unmounted or mounted) (optional) + sort = 'sort_example' # str | Sort order (e.g. \"device\" or \"-device\") (optional) + + try: + # Get storage devices + api_response = api_instance.v1_list_storage(limit=limit, offset=offset, identifier=identifier, device=device, fs_type=fs_type, mount_policy=mount_policy, status=status, sort=sort) + print("The response of StorageV1Api->v1_list_storage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageV1Api->v1_list_storage: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Maximum number of results to return (1–1000, default: 100) | [optional] + **offset** | **float**| Number of results to skip (default: 0) | [optional] + **identifier** | **str**| Filter by identifier (comma separated) | [optional] + **device** | **str**| Filter by device name (partial match) | [optional] + **fs_type** | **str**| Filter by filesystem type (comma separated) | [optional] + **mount_policy** | **str**| Filter by mount policy (RO or RW) | [optional] + **status** | **str**| Filter by status (unmounted or mounted) | [optional] + **sort** | **str**| Sort order (e.g. \"device\" or \"-device\") | [optional] + +### Return type + +[**GetStorageResponse**](GetStorageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved storage devices | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_storage_cluster** +> GetStorageResponse v1_list_storage_cluster(limit=limit, offset=offset, device=device, fs_type=fs_type, fs_uuid=fs_uuid, label=label, serial=serial, vendor=vendor, model=model, mount_policy=mount_policy, status=status, sort=sort) + +Get storage devices + +List all attached storage devices. This endpoint is only available to cluster administrators. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.get_storage_response import GetStorageResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageV1Api(api_client) + limit = 3.4 # float | Maximum number of results to return (1–1000, default: 100) (optional) + offset = 3.4 # float | Number of results to skip (default: 0) (optional) + device = 'device_example' # str | Filter by device name (partial match) (optional) + fs_type = 'fs_type_example' # str | Filter by filesystem type (comma separated) (optional) + fs_uuid = 'fs_uuid_example' # str | Filter by filesystem UUID (partial match) (optional) + label = 'label_example' # str | Filter by label (partial match) (optional) + serial = 'serial_example' # str | Filter by serial number (partial match) (optional) + vendor = 'vendor_example' # str | Filter by vendor (partial match) (optional) + model = 'model_example' # str | Filter by model (partial match) (optional) + mount_policy = 'mount_policy_example' # str | Filter by mount policy (RO or RW) (optional) + status = 'status_example' # str | Filter by status (unmounted or mounted) (optional) + sort = 'sort_example' # str | Sort order (e.g. \"device\" or \"-device\") (optional) + + try: + # Get storage devices + api_response = api_instance.v1_list_storage_cluster(limit=limit, offset=offset, device=device, fs_type=fs_type, fs_uuid=fs_uuid, label=label, serial=serial, vendor=vendor, model=model, mount_policy=mount_policy, status=status, sort=sort) + print("The response of StorageV1Api->v1_list_storage_cluster:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageV1Api->v1_list_storage_cluster: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Maximum number of results to return (1–1000, default: 100) | [optional] + **offset** | **float**| Number of results to skip (default: 0) | [optional] + **device** | **str**| Filter by device name (partial match) | [optional] + **fs_type** | **str**| Filter by filesystem type (comma separated) | [optional] + **fs_uuid** | **str**| Filter by filesystem UUID (partial match) | [optional] + **label** | **str**| Filter by label (partial match) | [optional] + **serial** | **str**| Filter by serial number (partial match) | [optional] + **vendor** | **str**| Filter by vendor (partial match) | [optional] + **model** | **str**| Filter by model (partial match) | [optional] + **mount_policy** | **str**| Filter by mount policy (RO or RW) | [optional] + **status** | **str**| Filter by status (unmounted or mounted) | [optional] + **sort** | **str**| Sort order (e.g. \"device\" or \"-device\") | [optional] + +### Return type + +[**GetStorageResponse**](GetStorageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved storage devices | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**500** | Internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_list_storage_files** +> object v1_list_storage_files(id, path, limit=limit, offset=offset, name=name, type=type, sort=sort) + +List Storage Files + +List files from attached storage devices. Looks up the storage device by identifier, + then lists filesystem contents at the given path within the device's mount point. + This endpoint is available to all authenticated users. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.StorageV1Api(api_client) + id = 'id_example' # str | Storage device identifier (MediaStore identifier) + path = 'path_example' # str | Path within the storage device to list + limit = 3.4 # float | Maximum number of results to return (1–1000, default: 100) (optional) + offset = 3.4 # float | Number of results to skip (default: 0) (optional) + name = 'name_example' # str | Filter by name (case insensitive exact match, comma separated for multiple values) (optional) + type = 'type_example' # str | Filter by type (case insensitive partial match, e.g. \"file\" or \"dir\") (optional) + sort = 'sort_example' # str | Sort order (e.g., 'name', '-name', 'type,-size,-lastModifiedTime'). Prefix with '-' for descending. (optional) + + try: + # List Storage Files + api_response = api_instance.v1_list_storage_files(id, path, limit=limit, offset=offset, name=name, type=type, sort=sort) + print("The response of StorageV1Api->v1_list_storage_files:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StorageV1Api->v1_list_storage_files: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Storage device identifier (MediaStore identifier) | + **path** | **str**| Path within the storage device to list | + **limit** | **float**| Maximum number of results to return (1–1000, default: 100) | [optional] + **offset** | **float**| Number of results to skip (default: 0) | [optional] + **name** | **str**| Filter by name (case insensitive exact match, comma separated for multiple values) | [optional] + **type** | **str**| Filter by type (case insensitive partial match, e.g. \"file\" or \"dir\") | [optional] + **sort** | **str**| Sort order (e.g., 'name', '-name', 'type,-size,-lastModifiedTime'). Prefix with '-' for descending. | [optional] + +### Return type + +**object** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found (storage device or path) | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/StripeCheckoutBody.md b/docs/StripeCheckoutBody.md new file mode 100644 index 0000000..9c87a6c --- /dev/null +++ b/docs/StripeCheckoutBody.md @@ -0,0 +1,37 @@ +# StripeCheckoutBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**terms_of_service** | **bool** | Whether terms of service were accepted. | +**email** | **str** | Customer email. | +**name** | **str** | Customer name. | +**domain** | **str** | Domain name. | +**cores** | **float** | Number of cores. | +**license_type** | **str** | License type. | +**existing_domain** | **bool** | Whether this targets an existing domain. | +**price_id** | **str** | Stripe price identifier. | +**coupon_code** | **str** | Optional coupon code. | [optional] + +## Example + +```python +from corellium.models.stripe_checkout_body import StripeCheckoutBody + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCheckoutBody from a JSON string +stripe_checkout_body_instance = StripeCheckoutBody.from_json(json) +# print the JSON string representation of the object +print(StripeCheckoutBody.to_json()) + +# convert the object into a dict +stripe_checkout_body_dict = stripe_checkout_body_instance.to_dict() +# create an instance of StripeCheckoutBody from a dict +stripe_checkout_body_from_dict = StripeCheckoutBody.from_dict(stripe_checkout_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StripeCheckoutCompleteBody.md b/docs/StripeCheckoutCompleteBody.md new file mode 100644 index 0000000..8ce64cd --- /dev/null +++ b/docs/StripeCheckoutCompleteBody.md @@ -0,0 +1,29 @@ +# StripeCheckoutCompleteBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**session_id** | **str** | Stripe checkout session identifier. | + +## Example + +```python +from corellium.models.stripe_checkout_complete_body import StripeCheckoutCompleteBody + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCheckoutCompleteBody from a JSON string +stripe_checkout_complete_body_instance = StripeCheckoutCompleteBody.from_json(json) +# print the JSON string representation of the object +print(StripeCheckoutCompleteBody.to_json()) + +# convert the object into a dict +stripe_checkout_complete_body_dict = stripe_checkout_complete_body_instance.to_dict() +# create an instance of StripeCheckoutCompleteBody from a dict +stripe_checkout_complete_body_from_dict = StripeCheckoutCompleteBody.from_dict(stripe_checkout_complete_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StripeWebhookAck.md b/docs/StripeWebhookAck.md new file mode 100644 index 0000000..903cd73 --- /dev/null +++ b/docs/StripeWebhookAck.md @@ -0,0 +1,30 @@ +# StripeWebhookAck + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**received** | **bool** | Whether the event was received. | +**ignored** | **str** | Reason the event was ignored, when applicable. | [optional] + +## Example + +```python +from corellium.models.stripe_webhook_ack import StripeWebhookAck + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeWebhookAck from a JSON string +stripe_webhook_ack_instance = StripeWebhookAck.from_json(json) +# print the JSON string representation of the object +print(StripeWebhookAck.to_json()) + +# convert the object into a dict +stripe_webhook_ack_dict = stripe_webhook_ack_instance.to_dict() +# create an instance of StripeWebhookAck from a dict +stripe_webhook_ack_from_dict = StripeWebhookAck.from_dict(stripe_webhook_ack_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubscribeToTrialBody.md b/docs/SubscribeToTrialBody.md new file mode 100644 index 0000000..3aa4fc7 --- /dev/null +++ b/docs/SubscribeToTrialBody.md @@ -0,0 +1,36 @@ +# SubscribeToTrialBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trial_request_code** | **str** | Trial request code. | [optional] +**password** | **str** | Account password. | [optional] +**terms_of_service** | **bool** | Whether terms of service were accepted. | [optional] +**enterprise_domain_name** | **str** | Enterprise domain name. | [optional] +**sso** | **bool** | Whether this is an SSO-based subscription. | [optional] +**email** | **str** | Requester email. | [optional] +**name** | **str** | Requester name. | [optional] +**federated_user_id** | **str** | Federated user identifier. | [optional] + +## Example + +```python +from corellium.models.subscribe_to_trial_body import SubscribeToTrialBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SubscribeToTrialBody from a JSON string +subscribe_to_trial_body_instance = SubscribeToTrialBody.from_json(json) +# print the JSON string representation of the object +print(SubscribeToTrialBody.to_json()) + +# convert the object into a dict +subscribe_to_trial_body_dict = subscribe_to_trial_body_instance.to_dict() +# create an instance of SubscribeToTrialBody from a dict +subscribe_to_trial_body_from_dict = SubscribeToTrialBody.from_dict(subscribe_to_trial_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubscriberInvite.md b/docs/SubscriberInvite.md deleted file mode 100644 index 24a5435..0000000 --- a/docs/SubscriberInvite.md +++ /dev/null @@ -1,24 +0,0 @@ -# SubscriberInvite - -Subscriber Invite - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**coupon_options** | [**CouponOptions**](CouponOptions.md) | | [optional] -**plan** | [**Plan**](Plan.md) | | [optional] -**trial** | [**Trial**](Trial.md) | | [optional] -**name** | **str** | Name | [optional] -**email** | **str** | Email | [optional] -**coupon_code** | **str** | Coupon code | -**domain** | **str** | Domain | [optional] -**aggregate** | **str** | Aggregate | -**use_by** | **str** | Used By | [optional] -**active** | **bool** | Is Active flag | -**reusable** | **bool** | Is reusable flag | -**created_at** | **str** | Created Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | -**updated_at** | **str** | Updated Date in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Subscription.md b/docs/Subscription.md new file mode 100644 index 0000000..c10dfb4 --- /dev/null +++ b/docs/Subscription.md @@ -0,0 +1,37 @@ +# Subscription + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**trial** | [**SubscriptionTrial**](SubscriptionTrial.md) | | +**status** | **str** | Subscription status. Null on domains without billing. | +**billing_type** | **str** | Billing type. | +**plan_name** | **str** | Plan name. | +**next_bill** | **str** | Next billing date. Omitted on domains without billing. | [optional] +**use_device_accounting** | **bool** | Whether device accounting is used. | +**is_enterprise** | **bool** | Whether the plan is enterprise. | +**is_usage_based** | **bool** | Whether the plan is usage based. | +**cancel_policy** | **str** | Cancellation policy. | + +## Example + +```python +from corellium.models.subscription import Subscription + +# TODO update the JSON string below +json = "{}" +# create an instance of Subscription from a JSON string +subscription_instance = Subscription.from_json(json) +# print the JSON string representation of the object +print(Subscription.to_json()) + +# convert the object into a dict +subscription_dict = subscription_instance.to_dict() +# create an instance of Subscription from a dict +subscription_from_dict = Subscription.from_dict(subscription_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubscriptionTrial.md b/docs/SubscriptionTrial.md new file mode 100644 index 0000000..8f50d46 --- /dev/null +++ b/docs/SubscriptionTrial.md @@ -0,0 +1,34 @@ +# SubscriptionTrial + +Trial usage details, or null when the domain has no trial. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Trial status. | +**start** | **datetime** | Trial start time, or null. | +**end** | **datetime** | Trial end time, or null. | +**used_hours** | **float** | Trial hours used, or null. | +**max_hours** | **float** | Trial hour allowance, or null. | + +## Example + +```python +from corellium.models.subscription_trial import SubscriptionTrial + +# TODO update the JSON string below +json = "{}" +# create an instance of SubscriptionTrial from a JSON string +subscription_trial_instance = SubscriptionTrial.from_json(json) +# print the JSON string representation of the object +print(SubscriptionTrial.to_json()) + +# convert the object into a dict +subscription_trial_dict = subscription_trial_instance.to_dict() +# create an instance of SubscriptionTrial from a dict +subscription_trial_from_dict = SubscriptionTrial.from_dict(subscription_trial_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SysInfoSchema.md b/docs/SysInfoSchema.md new file mode 100644 index 0000000..06c2930 --- /dev/null +++ b/docs/SysInfoSchema.md @@ -0,0 +1,49 @@ +# SysInfoSchema + +System information for this node. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**numa_nodes** | **float** | Number of NUMA nodes. | [optional] [default to 0] +**cpu** | **object** | CPU availability. | [optional] +**cpu_avail** | **object** | Available CPU. | [optional] +**slot** | **float** | Slot count. | [optional] [default to 0] +**slot_avail** | **float** | Available slot count. | [optional] [default to 0] +**ram** | **float** | Total RAM in MiB. | [optional] [default to 0] +**ram_avail** | **float** | Available RAM in MiB. | [optional] [default to 0] +**vpn** | **float** | VPN count. | [optional] [default to 0] +**vpn_avail** | **float** | Available VPN count. | [optional] [default to 0] +**gpu** | **float** | GPU count. | [optional] [default to 0] +**gpu_avail** | **float** | Available GPU count. | [optional] [default to 0] +**ram_cpu** | **str** | RAM per CPU. | [optional] [default to '0'] +**el032** | **str** | EL0-32 capability. | [optional] [default to '0'] +**el132** | **str** | EL1-32 capability. | [optional] [default to '0'] +**mmu_tg16k** | **str** | MMU 16K translation granule support. | [optional] [default to '0'] +**hw_pac** | **float** | Hardware pointer authentication support. | [optional] [default to 0] +**arm_trace** | **str** | ARM trace capability. | [optional] [default to '0'] +**cores** | **float** | Total core count. | [optional] [default to 0] +**cores_avail** | **float** | Available core count. | [optional] [default to 0] +**ram_core** | **float** | RAM per core in MiB. | [optional] [default to 0] + +## Example + +```python +from corellium.models.sys_info_schema import SysInfoSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of SysInfoSchema from a JSON string +sys_info_schema_instance = SysInfoSchema.from_json(json) +# print the JSON string representation of the object +print(SysInfoSchema.to_json()) + +# convert the object into a dict +sys_info_schema_dict = sys_info_schema_instance.to_dict() +# create an instance of SysInfoSchema from a dict +sys_info_schema_from_dict = SysInfoSchema.from_dict(sys_info_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TOTPApi.md b/docs/TOTPApi.md new file mode 100644 index 0000000..7a48ba3 --- /dev/null +++ b/docs/TOTPApi.md @@ -0,0 +1,288 @@ +# corellium.TOTPApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_disable_totp**](TOTPApi.md#v3_disable_totp) | **POST** /v3/totp/disable | Disable TOTP for this user +[**v3_enable_totp**](TOTPApi.md#v3_enable_totp) | **POST** /v3/totp/enable | Enable TOTP for this user +[**v3_generate_totp**](TOTPApi.md#v3_generate_totp) | **POST** /v3/totp/generate | Generate a TOTP secret + + +# **v3_disable_totp** +> LoginResult v3_disable_totp(totp_disable_body) + +Disable TOTP for this user + +Turns two-factor sign-in off for your account. Send your `password` and a current six-digit code (`totpToken`) from your authenticator app. On success a confirmation email is sent, signing in no longer needs a code, and the response is a fresh login result with a new session token. Returns 401 if the password or code is wrong. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.login_result import LoginResult +from corellium.models.totp_disable_body import TotpDisableBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TOTPApi(api_client) + totp_disable_body = corellium.TotpDisableBody() # TotpDisableBody | + + try: + # Disable TOTP for this user + api_response = api_instance.v3_disable_totp(totp_disable_body) + print("The response of TOTPApi->v3_disable_totp:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TOTPApi->v3_disable_totp: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **totp_disable_body** | [**TotpDisableBody**](TotpDisableBody.md)| | + +### Return type + +[**LoginResult**](LoginResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | TOTP disabled. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Invalid login token, password, or TOTP token. | - | +**403** | Multi-factor authentication is not licensed for this deployment. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_enable_totp** +> LoginResult v3_enable_totp(totp_enable_body) + +Enable TOTP for this user + +Step 2 of turning on two-factor sign-in. Send the `secret` from `v3GenerateTotp`, the current six-digit code (`totpToken`) the authenticator app shows for it, and your account `password`. If the password is right and the code matches, two-factor sign-in is turned on and a confirmation email is sent. + +From then on, signing in with a username and password also needs `totpToken` (see `v3AuthLogin`). The response is a fresh login result with a new session token; use it for later requests. Returns 401 if the password or code is wrong; generate a new code and retry. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.login_result import LoginResult +from corellium.models.totp_enable_body import TotpEnableBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TOTPApi(api_client) + totp_enable_body = corellium.TotpEnableBody() # TotpEnableBody | + + try: + # Enable TOTP for this user + api_response = api_instance.v3_enable_totp(totp_enable_body) + print("The response of TOTPApi->v3_enable_totp:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TOTPApi->v3_enable_totp: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **totp_enable_body** | [**TotpEnableBody**](TotpEnableBody.md)| | + +### Return type + +[**LoginResult**](LoginResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | TOTP enabled. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Invalid login token, password, or TOTP token. | - | +**403** | Multi-factor authentication is not licensed for this deployment. | - | +**404** | User not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_generate_totp** +> TotpGenerateResponse v3_generate_totp() + +Generate a TOTP secret + +Step 1 of turning on two-factor sign-in (TOTP: six-digit codes from an authenticator app such as Google Authenticator, 1Password or Authy). Creates a new secret and returns it both as text (`secret`) and as a QR code image. Show the QR code to the user to scan with their authenticator app, or let them type the secret in. + +Nothing is turned on yet, and the secret is not saved: two-factor sign-in starts only after step 2, `v3EnableTotp`, succeeds. Keep the `secret` value; step 2 needs it. Calling this again creates a different secret. Returns 403 if your deployment is not licensed for two-factor sign-in. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.totp_generate_response import TotpGenerateResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TOTPApi(api_client) + + try: + # Generate a TOTP secret + api_response = api_instance.v3_generate_totp() + print("The response of TOTPApi->v3_generate_totp:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TOTPApi->v3_generate_totp: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**TotpGenerateResponse**](TotpGenerateResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Generated TOTP secret and QR code. | - | +**400** | Invalid token format. | - | +**401** | Invalid login token. | - | +**403** | Multi-factor authentication is not licensed for this deployment. | - | +**404** | User not found. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TaskStatus.md b/docs/TaskStatus.md new file mode 100644 index 0000000..f369cfb --- /dev/null +++ b/docs/TaskStatus.md @@ -0,0 +1,15 @@ +# TaskStatus + +Current task status. + +## Enum + +* `IN_MINUS_PROGRESS` (value: `'in-progress'`) + +* `COMPLETE` (value: `'complete'`) + +* `ERROR` (value: `'error'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Team.md b/docs/Team.md index d8f779d..0b34e13 100644 --- a/docs/Team.md +++ b/docs/Team.md @@ -1,14 +1,31 @@ # Team - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Team ID | -**label** | **str** | Team Label | -**users** | [**list[User]**](User.md) | Users | [optional] +**id** | **str** | Team identifier (or \"all-users\" for the implicit team). | +**label** | **str** | Team label; null when the team has no name set. | +**users** | [**List[TeamUser]**](TeamUser.md) | Members of the team. | + +## Example + +```python +from corellium.models.team import Team + +# TODO update the JSON string below +json = "{}" +# create an instance of Team from a JSON string +team_instance = Team.from_json(json) +# print the JSON string representation of the object +print(Team.to_json()) +# convert the object into a dict +team_dict = team_instance.to_dict() +# create an instance of Team from a dict +team_from_dict = Team.from_dict(team_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TeamCreate.md b/docs/TeamCreate.md index 0418ebd..e135641 100644 --- a/docs/TeamCreate.md +++ b/docs/TeamCreate.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | ID of newly created team | [optional] +## Example + +```python +from corellium.models.team_create import TeamCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of TeamCreate from a JSON string +team_create_instance = TeamCreate.from_json(json) +# print the JSON string representation of the object +print(TeamCreate.to_json()) + +# convert the object into a dict +team_create_dict = team_create_instance.to_dict() +# create an instance of TeamCreate from a dict +team_create_from_dict = TeamCreate.from_dict(team_create_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TeamCreated.md b/docs/TeamCreated.md new file mode 100644 index 0000000..18660d3 --- /dev/null +++ b/docs/TeamCreated.md @@ -0,0 +1,29 @@ +# TeamCreated + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the newly created team. | + +## Example + +```python +from corellium.models.team_created import TeamCreated + +# TODO update the JSON string below +json = "{}" +# create an instance of TeamCreated from a JSON string +team_created_instance = TeamCreated.from_json(json) +# print the JSON string representation of the object +print(TeamCreated.to_json()) + +# convert the object into a dict +team_created_dict = team_created_instance.to_dict() +# create an instance of TeamCreated from a dict +team_created_from_dict = TeamCreated.from_dict(team_created_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TeamUser.md b/docs/TeamUser.md new file mode 100644 index 0000000..206c200 --- /dev/null +++ b/docs/TeamUser.md @@ -0,0 +1,36 @@ +# TeamUser + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | User identifier. | +**label** | **str** | User label. | +**name** | **str** | Username. | [optional] +**email** | **str** | User email. | [optional] +**administrator** | **bool** | Whether the user is a domain administrator. | [optional] +**can_edit_user_attributes** | **bool** | Whether the user can edit user attributes. | [optional] +**cluster_administrator** | **bool** | Whether the user is a cluster administrator. | [optional] +**is_federated_user** | **bool** | Whether the user authenticates via a federated provider. | [optional] + +## Example + +```python +from corellium.models.team_user import TeamUser + +# TODO update the JSON string below +json = "{}" +# create an instance of TeamUser from a JSON string +team_user_instance = TeamUser.from_json(json) +# print the JSON string representation of the object +print(TeamUser.to_json()) + +# convert the object into a dict +team_user_dict = team_user_instance.to_dict() +# create an instance of TeamUser from a dict +team_user_from_dict = TeamUser.from_dict(team_user_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TeamV1.md b/docs/TeamV1.md new file mode 100644 index 0000000..e8317d9 --- /dev/null +++ b/docs/TeamV1.md @@ -0,0 +1,32 @@ +# TeamV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Team ID | +**label** | **str** | Team Label | +**users** | [**List[User]**](User.md) | Users | [optional] + +## Example + +```python +from corellium.models.team_v1 import TeamV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of TeamV1 from a JSON string +team_v1_instance = TeamV1.from_json(json) +# print the JSON string representation of the object +print(TeamV1.to_json()) + +# convert the object into a dict +team_v1_dict = team_v1_instance.to_dict() +# create an instance of TeamV1 from a dict +team_v1_from_dict = TeamV1.from_dict(team_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TeamsApi.md b/docs/TeamsApi.md new file mode 100644 index 0000000..94e52af --- /dev/null +++ b/docs/TeamsApi.md @@ -0,0 +1,537 @@ +# corellium.TeamsApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_add_user_to_team**](TeamsApi.md#v3_add_user_to_team) | **PUT** /v3/teams/{teamId}/users/{userId} | Add a user to a team +[**v3_create_team**](TeamsApi.md#v3_create_team) | **POST** /v3/teams | Create a team +[**v3_delete_team**](TeamsApi.md#v3_delete_team) | **DELETE** /v3/teams/{teamId} | Delete a team +[**v3_list_teams**](TeamsApi.md#v3_list_teams) | **GET** /v3/teams | List teams +[**v3_remove_user_from_team**](TeamsApi.md#v3_remove_user_from_team) | **DELETE** /v3/teams/{teamId}/users/{userId} | Remove a user from a team +[**v3_update_team**](TeamsApi.md#v3_update_team) | **PATCH** /v3/teams/{teamId} | Update a team + + +# **v3_add_user_to_team** +> v3_add_user_to_team(team_id, user_id) + +Add a user to a team + +**Required role:** Domain administrator. + +Adds a user to a team, so the user gets every project role the team has. Requires a domain administrator. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsApi(api_client) + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' # str | Team identifier. + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | User identifier. + + try: + # Add a user to a team + api_instance.v3_add_user_to_team(team_id, user_id) + except Exception as e: + print("Exception when calling TeamsApi->v3_add_user_to_team: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **team_id** | **str**| Team identifier. | + **user_id** | **str**| User identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User added to team. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_create_team** +> TeamCreated v3_create_team(create_team_body) + +Create a team + +**Required role:** Domain administrator. + +Creates an empty team in your domain and returns its ID. Requires a domain administrator. Next, add members with `v3AddUserToTeam` and give the team project access with `PUT /v3/roles/projects/{projectId}/teams/{teamId}/roles/{roleId}`. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_team_body import CreateTeamBody +from corellium.models.team_created import TeamCreated +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsApi(api_client) + create_team_body = corellium.CreateTeamBody() # CreateTeamBody | + + try: + # Create a team + api_response = api_instance.v3_create_team(create_team_body) + print("The response of TeamsApi->v3_create_team:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TeamsApi->v3_create_team: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_team_body** | [**CreateTeamBody**](CreateTeamBody.md)| | + +### Return type + +[**TeamCreated**](TeamCreated.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Team created. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_team** +> v3_delete_team(team_id) + +Delete a team + +**Required role:** Domain administrator. + +Deletes a team. Requires a domain administrator. The users in it are not deleted, but they lose any project access they had only through this team. Available for Enterprise accounts only. + +Deletes are idempotent: a `teamId` that does not exist, including one that was already deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsApi(api_client) + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' # str | Team identifier. + + try: + # Delete a team + api_instance.v3_delete_team(team_id) + except Exception as e: + print("Exception when calling TeamsApi->v3_delete_team: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **team_id** | **str**| Team identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Team deleted. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_teams** +> TeamsListResponse v3_list_teams(limit=limit, offset=offset) + +List teams + +Lists the teams in your domain. A team is a named group of users; giving a team a role on a project (with the Roles endpoints) gives every member that access, which is easier than granting each user separately. Includes the built-in `all-users` team, which always contains everyone in the domain. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.teams_list_response import TeamsListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List teams + api_response = api_instance.v3_list_teams(limit=limit, offset=offset) + print("The response of TeamsApi->v3_list_teams:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TeamsApi->v3_list_teams: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**TeamsListResponse**](TeamsListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of teams. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_remove_user_from_team** +> v3_remove_user_from_team(team_id, user_id) + +Remove a user from a team + +**Required role:** Domain administrator. + +Removes a user from a team, so the user loses the project access they had only through this team. Requires a domain administrator. Available for Enterprise accounts only. + +Removal is idempotent: if the user is not a member of the team, the call is a no-op and still returns 204. +Repeated calls therefore also return 204. A `teamId` or `userId` that does not exist is also a successful +no-op that returns 204. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsApi(api_client) + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' # str | Team identifier. + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | User identifier. + + try: + # Remove a user from a team + api_instance.v3_remove_user_from_team(team_id, user_id) + except Exception as e: + print("Exception when calling TeamsApi->v3_remove_user_from_team: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **team_id** | **str**| Team identifier. | + **user_id** | **str**| User identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User removed from team, or was not a member. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_update_team** +> v3_update_team(team_id, update_team_body=update_team_body) + +Update a team + +**Required role:** Domain administrator. + +Renames a team or changes its settings. Requires a domain administrator. Available for Enterprise accounts only. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.update_team_body import UpdateTeamBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsApi(api_client) + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' # str | Team identifier. + update_team_body = corellium.UpdateTeamBody() # UpdateTeamBody | (optional) + + try: + # Update a team + api_instance.v3_update_team(team_id, update_team_body=update_team_body) + except Exception as e: + print("Exception when calling TeamsApi->v3_update_team: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **team_id** | **str**| Team identifier. | + **update_team_body** | [**UpdateTeamBody**](UpdateTeamBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Team updated. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No team with the given teamId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TeamsListResponse.md b/docs/TeamsListResponse.md new file mode 100644 index 0000000..653effd --- /dev/null +++ b/docs/TeamsListResponse.md @@ -0,0 +1,34 @@ +# TeamsListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Team]**](Team.md) | Array of teams. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.teams_list_response import TeamsListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TeamsListResponse from a JSON string +teams_list_response_instance = TeamsListResponse.from_json(json) +# print the JSON string representation of the object +print(TeamsListResponse.to_json()) + +# convert the object into a dict +teams_list_response_dict = teams_list_response_instance.to_dict() +# create an instance of TeamsListResponse from a dict +teams_list_response_from_dict = TeamsListResponse.from_dict(teams_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TeamsV1Api.md b/docs/TeamsV1Api.md new file mode 100644 index 0000000..f70095d --- /dev/null +++ b/docs/TeamsV1Api.md @@ -0,0 +1,515 @@ +# corellium.TeamsV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_add_user_to_team**](TeamsV1Api.md#v1_add_user_to_team) | **PUT** /v1/teams/{teamId}/users/{userId} | Add user to team +[**v1_remove_user_from_team**](TeamsV1Api.md#v1_remove_user_from_team) | **DELETE** /v1/teams/{teamId}/users/{userId} | Remove user from team +[**v1_team_change**](TeamsV1Api.md#v1_team_change) | **PATCH** /v1/teams/{teamId} | Update team +[**v1_team_create**](TeamsV1Api.md#v1_team_create) | **POST** /v1/teams | Create team +[**v1_team_delete**](TeamsV1Api.md#v1_team_delete) | **DELETE** /v1/teams/{teamId} | Delete team +[**v1_teams**](TeamsV1Api.md#v1_teams) | **GET** /v1/teams | Get teams + + +# **v1_add_user_to_team** +> v1_add_user_to_team(team_id, user_id) + +Add user to team + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsV1Api(api_client) + team_id = 'team_id_example' # str | Team ID - uuid + user_id = 'user_id_example' # str | User ID - uuid + + try: + # Add user to team + api_instance.v1_add_user_to_team(team_id, user_id) + except Exception as e: + print("Exception when calling TeamsV1Api->v1_add_user_to_team: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **team_id** | **str**| Team ID - uuid | + **user_id** | **str**| User ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**403** | Forbidden | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_remove_user_from_team** +> v1_remove_user_from_team(team_id, user_id) + +Remove user from team + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsV1Api(api_client) + team_id = 'team_id_example' # str | Team ID - uuid + user_id = 'user_id_example' # str | User ID - uuid + + try: + # Remove user from team + api_instance.v1_remove_user_from_team(team_id, user_id) + except Exception as e: + print("Exception when calling TeamsV1Api->v1_remove_user_from_team: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **team_id** | **str**| Team ID - uuid | + **user_id** | **str**| User ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**403** | Forbidden | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_team_change** +> v1_team_change(team_id, create_team) + +Update team + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_team import CreateTeam +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsV1Api(api_client) + team_id = 'team_id_example' # str | Team ID - uuid + create_team = { "name": "Test Team"} # CreateTeam | + + try: + # Update team + api_instance.v1_team_change(team_id, create_team) + except Exception as e: + print("Exception when calling TeamsV1Api->v1_team_change: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **team_id** | **str**| Team ID - uuid | + **create_team** | [**CreateTeam**](CreateTeam.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_team_create** +> TeamCreate v1_team_create(create_team) + +Create team + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_team import CreateTeam +from corellium.models.team_create import TeamCreate +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsV1Api(api_client) + create_team = { "name": "Test Team"} # CreateTeam | + + try: + # Create team + api_response = api_instance.v1_team_create(create_team) + print("The response of TeamsV1Api->v1_team_create:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TeamsV1Api->v1_team_create: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_team** | [**CreateTeam**](CreateTeam.md)| | + +### Return type + +[**TeamCreate**](TeamCreate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_team_delete** +> v1_team_delete(team_id) + +Delete team + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsV1Api(api_client) + team_id = 'team_id_example' # str | Team ID - uuid + + try: + # Delete team + api_instance.v1_team_delete(team_id) + except Exception as e: + print("Exception when calling TeamsV1Api->v1_team_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **team_id** | **str**| Team ID - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Success | - | +**403** | Forbidden | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_teams** +> List[TeamV1] v1_teams() + +Get teams + +This endpoint is available for Enterprise accounts only + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.team_v1 import TeamV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.TeamsV1Api(api_client) + + try: + # Get teams + api_response = api_instance.v1_teams() + print("The response of TeamsV1Api->v1_teams:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TeamsV1Api->v1_teams: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[TeamV1]**](TeamV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Teams | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TestAssessmentDto.md b/docs/TestAssessmentDto.md deleted file mode 100644 index bb47bac..0000000 --- a/docs/TestAssessmentDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# TestAssessmentDto - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invert** | **bool** | | [optional] -**grep** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TestAssessmentInput.md b/docs/TestAssessmentInput.md new file mode 100644 index 0000000..4e18ec2 --- /dev/null +++ b/docs/TestAssessmentInput.md @@ -0,0 +1,30 @@ +# TestAssessmentInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invert** | **bool** | Optional, default false. When true, run every check EXCEPT those matched by `grep`. Has no effect without `grep`. | [optional] +**grep** | **str** | A JavaScript regular expression; only checks whose check ID, group ID, or category ID matches it are run. Without anchors (`^`, `$`) it can match anywhere in the ID, so `masvs-storage` selects every storage check. Characters such as `.` have their regular-expression meaning. To add flags, wrap the pattern in slashes, for example `/^masvs-network-1-ios-/i`. Omit to run every applicable check. | [optional] + +## Example + +```python +from corellium.models.test_assessment_input import TestAssessmentInput + +# TODO update the JSON string below +json = "{}" +# create an instance of TestAssessmentInput from a JSON string +test_assessment_input_instance = TestAssessmentInput.from_json(json) +# print the JSON string representation of the object +print(TestAssessmentInput.to_json()) + +# convert the object into a dict +test_assessment_input_dict = test_assessment_input_instance.to_dict() +# create an instance of TestAssessmentInput from a dict +test_assessment_input_from_dict = TestAssessmentInput.from_dict(test_assessment_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TextInput.md b/docs/TextInput.md index ee86adc..6b48721 100644 --- a/docs/TextInput.md +++ b/docs/TextInput.md @@ -3,11 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**required** | **str** | text to type | -**key_duration** | **float** | How long to take to type each key. 150ms if not defined. | [optional] +**text** | **str** | text to type | [optional] + +## Example + +```python +from corellium.models.text_input import TextInput + +# TODO update the JSON string below +json = "{}" +# create an instance of TextInput from a JSON string +text_input_instance = TextInput.from_json(json) +# print the JSON string representation of the object +print(TextInput.to_json()) +# convert the object into a dict +text_input_dict = text_input_instance.to_dict() +# create an instance of TextInput from a dict +text_input_from_dict = TextInput.from_dict(text_input_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TextInputRequest.md b/docs/TextInputRequest.md new file mode 100644 index 0000000..2cfff92 --- /dev/null +++ b/docs/TextInputRequest.md @@ -0,0 +1,30 @@ +# TextInputRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | Text to type. | +**key_duration** | **float** | How long to take to type each key, in milliseconds. Defaults to ~150ms per key downstream when omitted. | [optional] + +## Example + +```python +from corellium.models.text_input_request import TextInputRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TextInputRequest from a JSON string +text_input_request_instance = TextInputRequest.from_json(json) +# print the JSON string representation of the object +print(TextInputRequest.to_json()) + +# convert the object into a dict +text_input_request_dict = text_input_request_instance.to_dict() +# create an instance of TextInputRequest from a dict +text_input_request_from_dict = TextInputRequest.from_dict(text_input_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TextInputRequestV1.md b/docs/TextInputRequestV1.md new file mode 100644 index 0000000..32a2bee --- /dev/null +++ b/docs/TextInputRequestV1.md @@ -0,0 +1,31 @@ +# TextInputRequestV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**required** | **str** | text to type | +**key_duration** | **float** | How long to take to type each key. 150ms if not defined. | [optional] + +## Example + +```python +from corellium.models.text_input_request_v1 import TextInputRequestV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of TextInputRequestV1 from a JSON string +text_input_request_v1_instance = TextInputRequestV1.from_json(json) +# print the JSON string representation of the object +print(TextInputRequestV1.to_json()) + +# convert the object into a dict +text_input_request_v1_dict = text_input_request_v1_instance.to_dict() +# create an instance of TextInputRequestV1 from a dict +text_input_request_v1_from_dict = TextInputRequestV1.from_dict(text_input_request_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Token.md b/docs/Token.md index c14a71a..3ff1cf7 100644 --- a/docs/Token.md +++ b/docs/Token.md @@ -1,12 +1,29 @@ # Token - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token** | **str** | | [optional] +**token** | **str** | Authorization token. | + +## Example + +```python +from corellium.models.token import Token + +# TODO update the JSON string below +json = "{}" +# create an instance of Token from a JSON string +token_instance = Token.from_json(json) +# print the JSON string representation of the object +print(Token.to_json()) +# convert the object into a dict +token_dict = token_instance.to_dict() +# create an instance of Token from a dict +token_from_dict = Token.from_dict(token_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TokenV1.md b/docs/TokenV1.md new file mode 100644 index 0000000..bf23bc9 --- /dev/null +++ b/docs/TokenV1.md @@ -0,0 +1,30 @@ +# TokenV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | [optional] + +## Example + +```python +from corellium.models.token_v1 import TokenV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenV1 from a JSON string +token_v1_instance = TokenV1.from_json(json) +# print the JSON string representation of the object +print(TokenV1.to_json()) + +# convert the object into a dict +token_v1_dict = token_v1_instance.to_dict() +# create an instance of TokenV1 from a dict +token_v1_from_dict = TokenV1.from_dict(token_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenValidateBody.md b/docs/TokenValidateBody.md new file mode 100644 index 0000000..52cc982 --- /dev/null +++ b/docs/TokenValidateBody.md @@ -0,0 +1,29 @@ +# TokenValidateBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Instance token to validate. | + +## Example + +```python +from corellium.models.token_validate_body import TokenValidateBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenValidateBody from a JSON string +token_validate_body_instance = TokenValidateBody.from_json(json) +# print the JSON string representation of the object +print(TokenValidateBody.to_json()) + +# convert the object into a dict +token_validate_body_dict = token_validate_body_instance.to_dict() +# create an instance of TokenValidateBody from a dict +token_validate_body_from_dict = TokenValidateBody.from_dict(token_validate_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TotpDisableBody.md b/docs/TotpDisableBody.md new file mode 100644 index 0000000..2b3ce29 --- /dev/null +++ b/docs/TotpDisableBody.md @@ -0,0 +1,30 @@ +# TotpDisableBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totp_token** | **str** | Current TOTP token. | +**password** | **str** | User password. | + +## Example + +```python +from corellium.models.totp_disable_body import TotpDisableBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TotpDisableBody from a JSON string +totp_disable_body_instance = TotpDisableBody.from_json(json) +# print the JSON string representation of the object +print(TotpDisableBody.to_json()) + +# convert the object into a dict +totp_disable_body_dict = totp_disable_body_instance.to_dict() +# create an instance of TotpDisableBody from a dict +totp_disable_body_from_dict = TotpDisableBody.from_dict(totp_disable_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TotpEnableBody.md b/docs/TotpEnableBody.md new file mode 100644 index 0000000..b0b2675 --- /dev/null +++ b/docs/TotpEnableBody.md @@ -0,0 +1,31 @@ +# TotpEnableBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secret** | **str** | Base32-encoded TOTP secret returned by generate. | +**totp_token** | **str** | Current TOTP token, used to confirm the secret. | +**password** | **str** | User password. | + +## Example + +```python +from corellium.models.totp_enable_body import TotpEnableBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TotpEnableBody from a JSON string +totp_enable_body_instance = TotpEnableBody.from_json(json) +# print the JSON string representation of the object +print(TotpEnableBody.to_json()) + +# convert the object into a dict +totp_enable_body_dict = totp_enable_body_instance.to_dict() +# create an instance of TotpEnableBody from a dict +totp_enable_body_from_dict = TotpEnableBody.from_dict(totp_enable_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TotpGenerateResponse.md b/docs/TotpGenerateResponse.md new file mode 100644 index 0000000..32efb4d --- /dev/null +++ b/docs/TotpGenerateResponse.md @@ -0,0 +1,30 @@ +# TotpGenerateResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**qr_code** | **str** | TOTP otpauth URL encoded as a data-URL QR code. | +**secret** | **str** | Base32-encoded TOTP secret. | + +## Example + +```python +from corellium.models.totp_generate_response import TotpGenerateResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TotpGenerateResponse from a JSON string +totp_generate_response_instance = TotpGenerateResponse.from_json(json) +# print the JSON string representation of the object +print(TotpGenerateResponse.to_json()) + +# convert the object into a dict +totp_generate_response_dict = totp_generate_response_instance.to_dict() +# create an instance of TotpGenerateResponse from a dict +totp_generate_response_from_dict = TotpGenerateResponse.from_dict(totp_generate_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TouchCurveInput.md b/docs/TouchCurveInput.md index 7d92434..7951969 100644 --- a/docs/TouchCurveInput.md +++ b/docs/TouchCurveInput.md @@ -3,17 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**start** | **object** | Finger Positions | -**end** | **object** | Finger Positions | -**bezier_points** | **list[object]** | array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined. | [optional] -**start_buttons** | [**list[TouchInputButtonsInner]**](TouchInputButtonsInner.md) | Buttons to be held during this curve. | -**end_buttons** | [**list[TouchInputButtonsInner]**](TouchInputButtonsInner.md) | Buttons to be left held after this curve. Same as startButtons if not defined. | [optional] -**normalized** | **bool** | true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) | [optional] -**wait** | **float** | Duration to wait before this input is executed. Instant if not defined. | [optional] -**duration** | **float** | Duration to execute this curve over. | +**start** | **object** | Finger Positions | [optional] +**end** | **object** | Finger Positions | [optional] + +## Example + +```python +from corellium.models.touch_curve_input import TouchCurveInput + +# TODO update the JSON string below +json = "{}" +# create an instance of TouchCurveInput from a JSON string +touch_curve_input_instance = TouchCurveInput.from_json(json) +# print the JSON string representation of the object +print(TouchCurveInput.to_json()) +# convert the object into a dict +touch_curve_input_dict = touch_curve_input_instance.to_dict() +# create an instance of TouchCurveInput from a dict +touch_curve_input_from_dict = TouchCurveInput.from_dict(touch_curve_input_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TouchCurveInputRequest.md b/docs/TouchCurveInputRequest.md new file mode 100644 index 0000000..cbf3eb7 --- /dev/null +++ b/docs/TouchCurveInputRequest.md @@ -0,0 +1,36 @@ +# TouchCurveInputRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start** | **List[List[float]]** | Array of per-finger [x,y] touch positions, up to 10 depending on model. | +**end** | **List[List[float]]** | Array of per-finger [x,y] touch positions, up to 10 depending on model. | +**bezier_points** | **List[List[List[float]]]** | Per-finger intermediate touch positions. | [optional] +**start_buttons** | **List[str]** | Buttons held during this curve. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor. | +**end_buttons** | **List[str]** | Buttons left held after this curve. Omit to leave unchanged; use an empty array to release. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor. | [optional] +**normalized** | **bool** | Use normalized 0-10000 coordinates. | [optional] +**wait** | **float** | Duration to wait before this input is executed, in milliseconds. | [optional] +**duration** | **float** | Duration to execute this curve over, in milliseconds. | + +## Example + +```python +from corellium.models.touch_curve_input_request import TouchCurveInputRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TouchCurveInputRequest from a JSON string +touch_curve_input_request_instance = TouchCurveInputRequest.from_json(json) +# print the JSON string representation of the object +print(TouchCurveInputRequest.to_json()) + +# convert the object into a dict +touch_curve_input_request_dict = touch_curve_input_request_instance.to_dict() +# create an instance of TouchCurveInputRequest from a dict +touch_curve_input_request_from_dict = TouchCurveInputRequest.from_dict(touch_curve_input_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TouchCurveInputRequestV1.md b/docs/TouchCurveInputRequestV1.md new file mode 100644 index 0000000..701d169 --- /dev/null +++ b/docs/TouchCurveInputRequestV1.md @@ -0,0 +1,37 @@ +# TouchCurveInputRequestV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start** | **object** | Finger Positions | +**end** | **object** | Finger Positions | +**bezier_points** | **List[object]** | array of per-finger intermediate touch positions, up to 10 depending on model. Straight line if not defined. | [optional] +**start_buttons** | **List[object]** | Buttons to be held during this curve. | +**end_buttons** | **List[object]** | Buttons to be left held after this curve. Same as startButtons if not defined. | [optional] +**normalized** | **bool** | true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) | [optional] +**wait** | **float** | Duration to wait before this input is executed. Instant if not defined. | [optional] +**duration** | **float** | Duration to execute this curve over. | + +## Example + +```python +from corellium.models.touch_curve_input_request_v1 import TouchCurveInputRequestV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of TouchCurveInputRequestV1 from a JSON string +touch_curve_input_request_v1_instance = TouchCurveInputRequestV1.from_json(json) +# print the JSON string representation of the object +print(TouchCurveInputRequestV1.to_json()) + +# convert the object into a dict +touch_curve_input_request_v1_dict = touch_curve_input_request_v1_instance.to_dict() +# create an instance of TouchCurveInputRequestV1 from a dict +touch_curve_input_request_v1_from_dict = TouchCurveInputRequestV1.from_dict(touch_curve_input_request_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TouchInput.md b/docs/TouchInput.md index 0a76da3..f5d28e0 100644 --- a/docs/TouchInput.md +++ b/docs/TouchInput.md @@ -3,13 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**position** | **object** | Finger Positions | -**buttons** | [**list[TouchInputButtonsInner]**](TouchInputButtonsInner.md) | Buttons to be held when this position is reached. Either a Button enum object or an ASCII character. No change if not defined. | [optional] -**normalized** | **bool** | true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) | [optional] -**wait** | **float** | Duration to wait before this input is executed. Instant if not defined. | [optional] +**position** | **object** | Finger Positions | [optional] + +## Example + +```python +from corellium.models.touch_input import TouchInput + +# TODO update the JSON string below +json = "{}" +# create an instance of TouchInput from a JSON string +touch_input_instance = TouchInput.from_json(json) +# print the JSON string representation of the object +print(TouchInput.to_json()) +# convert the object into a dict +touch_input_dict = touch_input_instance.to_dict() +# create an instance of TouchInput from a dict +touch_input_from_dict = TouchInput.from_dict(touch_input_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TouchInputButtonsInner.md b/docs/TouchInputButtonsInner.md deleted file mode 100644 index 574a9d4..0000000 --- a/docs/TouchInputButtonsInner.md +++ /dev/null @@ -1,10 +0,0 @@ -# TouchInputButtonsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TouchInputRequest.md b/docs/TouchInputRequest.md new file mode 100644 index 0000000..5530089 --- /dev/null +++ b/docs/TouchInputRequest.md @@ -0,0 +1,32 @@ +# TouchInputRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position** | **List[List[float]]** | Array of per-finger [x,y] touch positions, up to 10 depending on model. | [optional] +**buttons** | **List[str]** | Buttons held when this position is reached. Omit to leave unchanged; use an empty array to release. VM button names: finger, homeButton, holdButton (Power/Hold), volumeUp, volumeDown, backButton, overviewButton. Also accepts single ASCII characters and keyboard key names (e.g. enter, home, power). Use finger:1 for the fingerprint sensor. | [optional] +**normalized** | **bool** | Use normalized 0-10000 coordinates. | [optional] +**wait** | **float** | Duration to wait before this input is executed, in milliseconds. | [optional] + +## Example + +```python +from corellium.models.touch_input_request import TouchInputRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TouchInputRequest from a JSON string +touch_input_request_instance = TouchInputRequest.from_json(json) +# print the JSON string representation of the object +print(TouchInputRequest.to_json()) + +# convert the object into a dict +touch_input_request_dict = touch_input_request_instance.to_dict() +# create an instance of TouchInputRequest from a dict +touch_input_request_from_dict = TouchInputRequest.from_dict(touch_input_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TouchInputRequestV1.md b/docs/TouchInputRequestV1.md new file mode 100644 index 0000000..d72f665 --- /dev/null +++ b/docs/TouchInputRequestV1.md @@ -0,0 +1,33 @@ +# TouchInputRequestV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**position** | **object** | Finger Positions | [optional] +**buttons** | **List[object]** | Buttons to be held when this position is reached. Accepts case-insensitive VM button names, keyboard key names, or single ASCII characters. No change if not defined; an empty array releases all buttons. | [optional] +**normalized** | **bool** | true if you want to use normalized x,y coordinates from 0-10000 (eg 5000,5000 is always center of screen) | [optional] +**wait** | **float** | Duration to wait before this input is executed. Instant if not defined. | [optional] + +## Example + +```python +from corellium.models.touch_input_request_v1 import TouchInputRequestV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of TouchInputRequestV1 from a JSON string +touch_input_request_v1_instance = TouchInputRequestV1.from_json(json) +# print the JSON string representation of the object +print(TouchInputRequestV1.to_json()) + +# convert the object into a dict +touch_input_request_v1_dict = touch_input_request_v1_instance.to_dict() +# create an instance of TouchInputRequestV1 from a dict +touch_input_request_v1_from_dict = TouchInputRequestV1.from_dict(touch_input_request_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Trial.md b/docs/Trial.md index 332ee15..99ac385 100644 --- a/docs/Trial.md +++ b/docs/Trial.md @@ -1,15 +1,33 @@ # Trial - +Info about trial. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**default_duration** | **float** | Maintenance message | [optional] -**default_hours** | **float** | Maintenance header | [optional] -**default_devices** | **float** | Maintenance header | [optional] -**default_cores** | **float** | Maintenance header | [optional] +**default_duration** | **float** | Default trial duration. | +**default_hours** | **float** | Default trial hours. | +**default_devices** | **float** | Default trial devices. | +**default_cores** | **float** | Default trial cores. | + +## Example + +```python +from corellium.models.trial import Trial + +# TODO update the JSON string below +json = "{}" +# create an instance of Trial from a JSON string +trial_instance = Trial.from_json(json) +# print the JSON string representation of the object +print(Trial.to_json()) +# convert the object into a dict +trial_dict = trial_instance.to_dict() +# create an instance of Trial from a dict +trial_from_dict = Trial.from_dict(trial_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TrialExtension.md b/docs/TrialExtension.md index 322eba0..ccf733c 100644 --- a/docs/TrialExtension.md +++ b/docs/TrialExtension.md @@ -1,15 +1,32 @@ # TrialExtension - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**duration** | **float** | how many additional days? | [optional] -**reason** | **str** | why does the user want more time? | [optional] -**denied** | **bool** | | [optional] -**denied_reason** | **str** | explanation for why the request was denied | [optional] +**duration** | **float** | Number of additional days requested. | +**reason** | **str** | Reason for the extension request. | [optional] +**denied** | **bool** | Whether the request was denied. | [optional] +**denied_reason** | **str** | Explanation for why the request was denied. | [optional] + +## Example + +```python +from corellium.models.trial_extension import TrialExtension + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialExtension from a JSON string +trial_extension_instance = TrialExtension.from_json(json) +# print the JSON string representation of the object +print(TrialExtension.to_json()) +# convert the object into a dict +trial_extension_dict = trial_extension_instance.to_dict() +# create an instance of TrialExtension from a dict +trial_extension_from_dict = TrialExtension.from_dict(trial_extension_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TrialExtensionV1.md b/docs/TrialExtensionV1.md new file mode 100644 index 0000000..d62d867 --- /dev/null +++ b/docs/TrialExtensionV1.md @@ -0,0 +1,33 @@ +# TrialExtensionV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**duration** | **float** | how many additional days? | [optional] +**reason** | **str** | why does the user want more time? | [optional] +**denied** | **bool** | | [optional] +**denied_reason** | **str** | explanation for why the request was denied | [optional] + +## Example + +```python +from corellium.models.trial_extension_v1 import TrialExtensionV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialExtensionV1 from a JSON string +trial_extension_v1_instance = TrialExtensionV1.from_json(json) +# print the JSON string representation of the object +print(TrialExtensionV1.to_json()) + +# convert the object into a dict +trial_extension_v1_dict = trial_extension_v1_instance.to_dict() +# create an instance of TrialExtensionV1 from a dict +trial_extension_v1_from_dict = TrialExtensionV1.from_dict(trial_extension_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrialRequest.md b/docs/TrialRequest.md new file mode 100644 index 0000000..12623e2 --- /dev/null +++ b/docs/TrialRequest.md @@ -0,0 +1,43 @@ +# TrialRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Requester email. | +**name** | **str** | Requester name. | +**billing_type** | **str** | Billing type. | +**billing_id** | **str** | Billing backend identifier. | +**code** | **str** | Sign-up code. | +**enterprise** | **bool** | Whether an enterprise domain is requested. | +**granted** | **bool** | Whether the request was granted. | +**phone** | **str** | Phone number. | +**country** | **str** | Country. | +**organization** | **str** | Organization. | +**organization_type** | **str** | Organization type. | +**metadata** | **Dict[str, Optional[object]]** | Sign-up metadata. | +**created_at** | **float** | Creation timestamp (ms). | +**updated_at** | **float** | Update timestamp (ms). | +**display_status** | **str** | Computed display status of the trial request. | + +## Example + +```python +from corellium.models.trial_request import TrialRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialRequest from a JSON string +trial_request_instance = TrialRequest.from_json(json) +# print the JSON string representation of the object +print(TrialRequest.to_json()) + +# convert the object into a dict +trial_request_dict = trial_request_instance.to_dict() +# create an instance of TrialRequest from a dict +trial_request_from_dict = TrialRequest.from_dict(trial_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrialRequestDetail.md b/docs/TrialRequestDetail.md new file mode 100644 index 0000000..34c289a --- /dev/null +++ b/docs/TrialRequestDetail.md @@ -0,0 +1,59 @@ +# TrialRequestDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Trial request identifier. | +**metadata** | **Dict[str, Optional[object]]** | Additional metadata. | +**organization** | [**TrialRequestDetailOrganization**](TrialRequestDetailOrganization.md) | | +**devices** | **List[Dict[str, str]]** | Devices requested (e.g. [{ ios: \"iOS\" }]). | +**use_cases** | **List[Dict[str, str]]** | Use cases (e.g. [{ malware: \"Malware Research\" }]). | +**email** | **str** | Contact email. | +**name** | **str** | Contact name. | +**billing_type** | **str** | Billing type. | +**billing_backend** | **str** | Billing backend (e.g. stripe). | +**billing_id** | **str** | External billing identifier. | +**product_id** | **str** | Stripe product identifier. | +**code** | **str** | Trial coupon code. | +**enterprise** | **bool** | Whether the request is for enterprise. | +**granted** | **bool** | Whether the trial has been granted. | +**phone** | **str** | Contact phone number. | +**country** | **str** | Country code. | +**organization_type** | **str** | Organization type. | +**industry** | **str** | Industry. | +**role** | **str** | Job role. | +**solution** | **str** | Solution of interest. | +**domain** | **str** | Associated domain identifier. | +**started_at** | **datetime** | ISO timestamp of trial start. | +**granted_at** | **datetime** | ISO timestamp of when trial was granted. | +**denied_at** | **datetime** | ISO timestamp of when trial was denied. | +**plan_name** | **str** | Trial plan name. | +**ends_at** | **datetime** | ISO timestamp of when trial ends. | +**grant_method** | **str** | Method used to grant the trial. | +**duration** | **float** | Trial duration in days (override). | +**trial_units** | **float** | Trial usage units remaining. | +**created_at** | **datetime** | ISO timestamp of creation. | +**updated_at** | **datetime** | ISO timestamp of last update. | + +## Example + +```python +from corellium.models.trial_request_detail import TrialRequestDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialRequestDetail from a JSON string +trial_request_detail_instance = TrialRequestDetail.from_json(json) +# print the JSON string representation of the object +print(TrialRequestDetail.to_json()) + +# convert the object into a dict +trial_request_detail_dict = trial_request_detail_instance.to_dict() +# create an instance of TrialRequestDetail from a dict +trial_request_detail_from_dict = TrialRequestDetail.from_dict(trial_request_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrialRequestDetailOrganization.md b/docs/TrialRequestDetailOrganization.md new file mode 100644 index 0000000..949edac --- /dev/null +++ b/docs/TrialRequestDetailOrganization.md @@ -0,0 +1,31 @@ +# TrialRequestDetailOrganization + +Organization info. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Organization name. | [optional] +**country** | **str** | Organization country. | [optional] + +## Example + +```python +from corellium.models.trial_request_detail_organization import TrialRequestDetailOrganization + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialRequestDetailOrganization from a JSON string +trial_request_detail_organization_instance = TrialRequestDetailOrganization.from_json(json) +# print the JSON string representation of the object +print(TrialRequestDetailOrganization.to_json()) + +# convert the object into a dict +trial_request_detail_organization_dict = trial_request_detail_organization_instance.to_dict() +# create an instance of TrialRequestDetailOrganization from a dict +trial_request_detail_organization_from_dict = TrialRequestDetailOrganization.from_dict(trial_request_detail_organization_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrialRequestListResponse.md b/docs/TrialRequestListResponse.md new file mode 100644 index 0000000..94257bd --- /dev/null +++ b/docs/TrialRequestListResponse.md @@ -0,0 +1,34 @@ +# TrialRequestListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[TrialRequest]**](TrialRequest.md) | Trial requests. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.trial_request_list_response import TrialRequestListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialRequestListResponse from a JSON string +trial_request_list_response_instance = TrialRequestListResponse.from_json(json) +# print the JSON string representation of the object +print(TrialRequestListResponse.to_json()) + +# convert the object into a dict +trial_request_list_response_dict = trial_request_list_response_instance.to_dict() +# create an instance of TrialRequestListResponse from a dict +trial_request_list_response_from_dict = TrialRequestListResponse.from_dict(trial_request_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrialRequestMetadata.md b/docs/TrialRequestMetadata.md index 579a9a9..9166def 100644 --- a/docs/TrialRequestMetadata.md +++ b/docs/TrialRequestMetadata.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] @@ -12,6 +13,23 @@ Name | Type | Description | Notes **pentest** | **bool** | option from sign up form, interesting using for pentesting | [optional] **other** | **str** | option from sign up form, interesting using for other area added here | [optional] +## Example + +```python +from corellium.models.trial_request_metadata import TrialRequestMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialRequestMetadata from a JSON string +trial_request_metadata_instance = TrialRequestMetadata.from_json(json) +# print the JSON string representation of the object +print(TrialRequestMetadata.to_json()) + +# convert the object into a dict +trial_request_metadata_dict = trial_request_metadata_instance.to_dict() +# create an instance of TrialRequestMetadata from a dict +trial_request_metadata_from_dict = TrialRequestMetadata.from_dict(trial_request_metadata_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TrialRequestOptions.md b/docs/TrialRequestOptions.md index 6ac8bd7..e94c7e9 100644 --- a/docs/TrialRequestOptions.md +++ b/docs/TrialRequestOptions.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | [**Address**](Address.md) | | [optional] @@ -12,6 +13,23 @@ Name | Type | Description | Notes **enterprise** | **bool** | If true, create an enterprise domain. | [optional] **token** | **str** | Stripe payment token. | [optional] +## Example + +```python +from corellium.models.trial_request_options import TrialRequestOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialRequestOptions from a JSON string +trial_request_options_instance = TrialRequestOptions.from_json(json) +# print the JSON string representation of the object +print(TrialRequestOptions.to_json()) + +# convert the object into a dict +trial_request_options_dict = trial_request_options_instance.to_dict() +# create an instance of TrialRequestOptions from a dict +trial_request_options_from_dict = TrialRequestOptions.from_dict(trial_request_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TrialV1.md b/docs/TrialV1.md new file mode 100644 index 0000000..76d6d17 --- /dev/null +++ b/docs/TrialV1.md @@ -0,0 +1,33 @@ +# TrialV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_duration** | **float** | Maintenance message | [optional] +**default_hours** | **float** | Maintenance header | [optional] +**default_devices** | **float** | Maintenance header | [optional] +**default_cores** | **float** | Maintenance header | [optional] + +## Example + +```python +from corellium.models.trial_v1 import TrialV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of TrialV1 from a JSON string +trial_v1_instance = TrialV1.from_json(json) +# print the JSON string representation of the object +print(TrialV1.to_json()) + +# convert the object into a dict +trial_v1_dict = trial_v1_instance.to_dict() +# create an instance of TrialV1 from a dict +trial_v1_from_dict = TrialV1.from_dict(trial_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UnauthorizedError.md b/docs/UnauthorizedError.md new file mode 100644 index 0000000..8f2f138 --- /dev/null +++ b/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text. | +**error_id** | **str** | Error ID. | + +## Example + +```python +from corellium.models.unauthorized_error import UnauthorizedError + +# TODO update the JSON string below +json = "{}" +# create an instance of UnauthorizedError from a JSON string +unauthorized_error_instance = UnauthorizedError.from_json(json) +# print the JSON string representation of the object +print(UnauthorizedError.to_json()) + +# convert the object into a dict +unauthorized_error_dict = unauthorized_error_instance.to_dict() +# create an instance of UnauthorizedError from a dict +unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UncancelSubscriptionBody.md b/docs/UncancelSubscriptionBody.md new file mode 100644 index 0000000..f7b3ff0 --- /dev/null +++ b/docs/UncancelSubscriptionBody.md @@ -0,0 +1,29 @@ +# UncancelSubscriptionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_id** | **str** | Domain to uncancel (defaults to the caller domain). | [optional] + +## Example + +```python +from corellium.models.uncancel_subscription_body import UncancelSubscriptionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UncancelSubscriptionBody from a JSON string +uncancel_subscription_body_instance = UncancelSubscriptionBody.from_json(json) +# print the JSON string representation of the object +print(UncancelSubscriptionBody.to_json()) + +# convert the object into a dict +uncancel_subscription_body_dict = uncancel_subscription_body_instance.to_dict() +# create an instance of UncancelSubscriptionBody from a dict +uncancel_subscription_body_from_dict = UncancelSubscriptionBody.from_dict(uncancel_subscription_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateAssessmentDto.md b/docs/UpdateAssessmentDto.md deleted file mode 100644 index 09f7742..0000000 --- a/docs/UpdateAssessmentDto.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateAssessmentDto - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **str** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateAssessmentInput.md b/docs/UpdateAssessmentInput.md new file mode 100644 index 0000000..d255576 --- /dev/null +++ b/docs/UpdateAssessmentInput.md @@ -0,0 +1,29 @@ +# UpdateAssessmentInput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | New lifecycle status for the assessment. | + +## Example + +```python +from corellium.models.update_assessment_input import UpdateAssessmentInput + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateAssessmentInput from a JSON string +update_assessment_input_instance = UpdateAssessmentInput.from_json(json) +# print the JSON string representation of the object +print(UpdateAssessmentInput.to_json()) + +# convert the object into a dict +update_assessment_input_dict = update_assessment_input_instance.to_dict() +# create an instance of UpdateAssessmentInput from a dict +update_assessment_input_from_dict = UpdateAssessmentInput.from_dict(update_assessment_input_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDomainSettingsResponse.md b/docs/UpdateDomainSettingsResponse.md new file mode 100644 index 0000000..4037e15 --- /dev/null +++ b/docs/UpdateDomainSettingsResponse.md @@ -0,0 +1,35 @@ +# UpdateDomainSettingsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_id** | **str** | Domain identifier. | +**settings** | [**UpdateDomainSettingsResponseSettings**](UpdateDomainSettingsResponseSettings.md) | | +**trial_extension** | [**TrialExtension**](TrialExtension.md) | | [optional] +**device_auto_shutdown** | [**DeviceAutoShutdownSchema**](DeviceAutoShutdownSchema.md) | | [optional] +**allowed_devices_filters** | [**List[AllowedDevicesFilterSchema]**](AllowedDevicesFilterSchema.md) | Applied device/firmware allowlist filters. | [optional] +**webplayer** | [**UpdateDomainSettingsResponseWebplayer**](UpdateDomainSettingsResponseWebplayer.md) | | [optional] +**snapshot_sharing_permissions** | [**UpdateDomainSettingsResponseSnapshotSharingPermissions**](UpdateDomainSettingsResponseSnapshotSharingPermissions.md) | | [optional] + +## Example + +```python +from corellium.models.update_domain_settings_response import UpdateDomainSettingsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateDomainSettingsResponse from a JSON string +update_domain_settings_response_instance = UpdateDomainSettingsResponse.from_json(json) +# print the JSON string representation of the object +print(UpdateDomainSettingsResponse.to_json()) + +# convert the object into a dict +update_domain_settings_response_dict = update_domain_settings_response_instance.to_dict() +# create an instance of UpdateDomainSettingsResponse from a dict +update_domain_settings_response_from_dict = UpdateDomainSettingsResponse.from_dict(update_domain_settings_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDomainSettingsResponseSettings.md b/docs/UpdateDomainSettingsResponseSettings.md new file mode 100644 index 0000000..3855ea9 --- /dev/null +++ b/docs/UpdateDomainSettingsResponseSettings.md @@ -0,0 +1,30 @@ +# UpdateDomainSettingsResponseSettings + +Applied domain settings. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totp_required** | **bool** | Whether TOTP is required. | [optional] + +## Example + +```python +from corellium.models.update_domain_settings_response_settings import UpdateDomainSettingsResponseSettings + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateDomainSettingsResponseSettings from a JSON string +update_domain_settings_response_settings_instance = UpdateDomainSettingsResponseSettings.from_json(json) +# print the JSON string representation of the object +print(UpdateDomainSettingsResponseSettings.to_json()) + +# convert the object into a dict +update_domain_settings_response_settings_dict = update_domain_settings_response_settings_instance.to_dict() +# create an instance of UpdateDomainSettingsResponseSettings from a dict +update_domain_settings_response_settings_from_dict = UpdateDomainSettingsResponseSettings.from_dict(update_domain_settings_response_settings_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDomainSettingsResponseSnapshotSharingPermissions.md b/docs/UpdateDomainSettingsResponseSnapshotSharingPermissions.md new file mode 100644 index 0000000..c626ba0 --- /dev/null +++ b/docs/UpdateDomainSettingsResponseSnapshotSharingPermissions.md @@ -0,0 +1,35 @@ +# UpdateDomainSettingsResponseSnapshotSharingPermissions + +Applied snapshot sharing permissions. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cloud_enabled** | **bool** | Whether snapshot sharing is enabled at the cloud level. | [optional] +**domain_enabled** | **bool** | Whether snapshot sharing is enabled at the domain level. | [optional] +**public_link** | **bool** | Whether public link sharing is enabled. | [optional] +**domain_restricted_link** | **bool** | Whether domain-restricted link sharing is enabled. | [optional] +**password_public_link** | **bool** | Whether password-protected public link sharing is enabled. | [optional] +**email_invite** | **bool** | Whether email invite sharing is enabled. | [optional] + +## Example + +```python +from corellium.models.update_domain_settings_response_snapshot_sharing_permissions import UpdateDomainSettingsResponseSnapshotSharingPermissions + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateDomainSettingsResponseSnapshotSharingPermissions from a JSON string +update_domain_settings_response_snapshot_sharing_permissions_instance = UpdateDomainSettingsResponseSnapshotSharingPermissions.from_json(json) +# print the JSON string representation of the object +print(UpdateDomainSettingsResponseSnapshotSharingPermissions.to_json()) + +# convert the object into a dict +update_domain_settings_response_snapshot_sharing_permissions_dict = update_domain_settings_response_snapshot_sharing_permissions_instance.to_dict() +# create an instance of UpdateDomainSettingsResponseSnapshotSharingPermissions from a dict +update_domain_settings_response_snapshot_sharing_permissions_from_dict = UpdateDomainSettingsResponseSnapshotSharingPermissions.from_dict(update_domain_settings_response_snapshot_sharing_permissions_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDomainSettingsResponseWebplayer.md b/docs/UpdateDomainSettingsResponseWebplayer.md new file mode 100644 index 0000000..dece3e0 --- /dev/null +++ b/docs/UpdateDomainSettingsResponseWebplayer.md @@ -0,0 +1,30 @@ +# UpdateDomainSettingsResponseWebplayer + +Applied web player settings. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_domains** | **List[str]** | Permitted web player embed domains. | [optional] + +## Example + +```python +from corellium.models.update_domain_settings_response_webplayer import UpdateDomainSettingsResponseWebplayer + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateDomainSettingsResponseWebplayer from a JSON string +update_domain_settings_response_webplayer_instance = UpdateDomainSettingsResponseWebplayer.from_json(json) +# print the JSON string representation of the object +print(UpdateDomainSettingsResponseWebplayer.to_json()) + +# convert the object into a dict +update_domain_settings_response_webplayer_dict = update_domain_settings_response_webplayer_instance.to_dict() +# create an instance of UpdateDomainSettingsResponseWebplayer from a dict +update_domain_settings_response_webplayer_from_dict = UpdateDomainSettingsResponseWebplayer.from_dict(update_domain_settings_response_webplayer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDomainWelcomeMessageRequest.md b/docs/UpdateDomainWelcomeMessageRequest.md new file mode 100644 index 0000000..7997341 --- /dev/null +++ b/docs/UpdateDomainWelcomeMessageRequest.md @@ -0,0 +1,31 @@ +# UpdateDomainWelcomeMessageRequest + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | The welcome message text (HTML allowed, will be sanitized) | [optional] +**enabled** | **bool** | | [optional] + +## Example + +```python +from corellium.models.update_domain_welcome_message_request import UpdateDomainWelcomeMessageRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateDomainWelcomeMessageRequest from a JSON string +update_domain_welcome_message_request_instance = UpdateDomainWelcomeMessageRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateDomainWelcomeMessageRequest.to_json()) + +# convert the object into a dict +update_domain_welcome_message_request_dict = update_domain_welcome_message_request_instance.to_dict() +# create an instance of UpdateDomainWelcomeMessageRequest from a dict +update_domain_welcome_message_request_from_dict = UpdateDomainWelcomeMessageRequest.from_dict(update_domain_welcome_message_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateExtension.md b/docs/UpdateExtension.md index 1cc9161..093919c 100644 --- a/docs/UpdateExtension.md +++ b/docs/UpdateExtension.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **enabled** | **bool** | If true, instances requiring this extension can be created or started | [optional] +## Example + +```python +from corellium.models.update_extension import UpdateExtension + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateExtension from a JSON string +update_extension_instance = UpdateExtension.from_json(json) +# print the JSON string representation of the object +print(UpdateExtension.to_json()) + +# convert the object into a dict +update_extension_dict = update_extension_instance.to_dict() +# create an instance of UpdateExtension from a dict +update_extension_from_dict = UpdateExtension.from_dict(update_extension_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateExtensionBody.md b/docs/UpdateExtensionBody.md new file mode 100644 index 0000000..4a0791c --- /dev/null +++ b/docs/UpdateExtensionBody.md @@ -0,0 +1,29 @@ +# UpdateExtensionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | If true, devices that use this extension's models can be created and started. Set false to block new use without deleting the extension. | + +## Example + +```python +from corellium.models.update_extension_body import UpdateExtensionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateExtensionBody from a JSON string +update_extension_body_instance = UpdateExtensionBody.from_json(json) +# print the JSON string representation of the object +print(UpdateExtensionBody.to_json()) + +# convert the object into a dict +update_extension_body_dict = update_extension_body_instance.to_dict() +# create an instance of UpdateExtensionBody from a dict +update_extension_body_from_dict = UpdateExtensionBody.from_dict(update_extension_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateHookBody.md b/docs/UpdateHookBody.md new file mode 100644 index 0000000..63e7baf --- /dev/null +++ b/docs/UpdateHookBody.md @@ -0,0 +1,33 @@ +# UpdateHookBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Hook label. | [optional] +**address** | **str** | Memory address to hook. | [optional] +**patch** | **str** | Patch code to execute. | [optional] +**patch_type** | [**HookPatchType**](HookPatchType.md) | | [optional] +**enabled** | **bool** | Whether the hook is active. | [optional] + +## Example + +```python +from corellium.models.update_hook_body import UpdateHookBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateHookBody from a JSON string +update_hook_body_instance = UpdateHookBody.from_json(json) +# print the JSON string representation of the object +print(UpdateHookBody.to_json()) + +# convert the object into a dict +update_hook_body_dict = update_hook_body_instance.to_dict() +# create an instance of UpdateHookBody from a dict +update_hook_body_from_dict = UpdateHookBody.from_dict(update_hook_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateInterconnectBody.md b/docs/UpdateInterconnectBody.md new file mode 100644 index 0000000..8bca02e --- /dev/null +++ b/docs/UpdateInterconnectBody.md @@ -0,0 +1,31 @@ +# UpdateInterconnectBody + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the interconnect | +**interfaces** | **List[object]** | Array of interfaces with deviceId and interfaceId | + +## Example + +```python +from corellium.models.update_interconnect_body import UpdateInterconnectBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateInterconnectBody from a JSON string +update_interconnect_body_instance = UpdateInterconnectBody.from_json(json) +# print the JSON string representation of the object +print(UpdateInterconnectBody.to_json()) + +# convert the object into a dict +update_interconnect_body_dict = update_interconnect_body_instance.to_dict() +# create an instance of UpdateInterconnectBody from a dict +update_interconnect_body_from_dict = UpdateInterconnectBody.from_dict(update_interconnect_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateInterconnectRequest.md b/docs/UpdateInterconnectRequest.md deleted file mode 100644 index 3949f67..0000000 --- a/docs/UpdateInterconnectRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# UpdateInterconnectRequest - - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | The name of the interconnect | [optional] -**interfaces** | **list[object]** | Array of interfaces with deviceId and interfaceId | [optional] -**interfaces** | **str** | The interface identifier | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateInterconnectV3Body.md b/docs/UpdateInterconnectV3Body.md new file mode 100644 index 0000000..b4b10ce --- /dev/null +++ b/docs/UpdateInterconnectV3Body.md @@ -0,0 +1,33 @@ +# UpdateInterconnectV3Body + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | A name to recognise the interconnect by. | +**interfaces** | [**List[InterfacesSchemaInner]**](InterfacesSchemaInner.md) | | +**type** | **str** | How the interconnect behaves: `hub` passes every signal to every connected interface; `switch` routes traffic between endpoints. | [optional] +**project_id** | **str** | Project the interconnect belongs to. Every device listed in `interfaces` must be in this project, otherwise the request fails with 400. Cannot be changed later. | [optional] +**protocol** | [**InterconnectProtocol**](InterconnectProtocol.md) | | [optional] + +## Example + +```python +from corellium.models.update_interconnect_v3_body import UpdateInterconnectV3Body + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateInterconnectV3Body from a JSON string +update_interconnect_v3_body_instance = UpdateInterconnectV3Body.from_json(json) +# print the JSON string representation of the object +print(UpdateInterconnectV3Body.to_json()) + +# convert the object into a dict +update_interconnect_v3_body_dict = update_interconnect_v3_body_instance.to_dict() +# create an instance of UpdateInterconnectV3Body from a dict +update_interconnect_v3_body_from_dict = UpdateInterconnectV3Body.from_dict(update_interconnect_v3_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateNetworkConnectionBody.md b/docs/UpdateNetworkConnectionBody.md new file mode 100644 index 0000000..7c400b9 --- /dev/null +++ b/docs/UpdateNetworkConnectionBody.md @@ -0,0 +1,31 @@ +# UpdateNetworkConnectionBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for Network connection. | +**config** | [**NetworkConnectionConfig**](NetworkConnectionConfig.md) | | [optional] +**force** | **bool** | Force the operation through constraint checks (e.g. stopping active instances). | [optional] [default to False] + +## Example + +```python +from corellium.models.update_network_connection_body import UpdateNetworkConnectionBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNetworkConnectionBody from a JSON string +update_network_connection_body_instance = UpdateNetworkConnectionBody.from_json(json) +# print the JSON string representation of the object +print(UpdateNetworkConnectionBody.to_json()) + +# convert the object into a dict +update_network_connection_body_dict = update_network_connection_body_instance.to_dict() +# create an instance of UpdateNetworkConnectionBody from a dict +update_network_connection_body_from_dict = UpdateNetworkConnectionBody.from_dict(update_network_connection_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateNetworkConnectionOptions.md b/docs/UpdateNetworkConnectionOptions.md index c995569..47d97a8 100644 --- a/docs/UpdateNetworkConnectionOptions.md +++ b/docs/UpdateNetworkConnectionOptions.md @@ -3,11 +3,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User specified name for this network connection. e.g. My Network Connection | -**config** | **object** | An object containing network connection configuration data. Will vary based on network provider type. See examples. | [optional] +**config** | [**UpdateNetworkConnectionOptionsConfig**](UpdateNetworkConnectionOptionsConfig.md) | | [optional] +**force** | **bool** | Force the update through constraint checks (e.g. stopping active instances). Defaults to false. | [optional] + +## Example + +```python +from corellium.models.update_network_connection_options import UpdateNetworkConnectionOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNetworkConnectionOptions from a JSON string +update_network_connection_options_instance = UpdateNetworkConnectionOptions.from_json(json) +# print the JSON string representation of the object +print(UpdateNetworkConnectionOptions.to_json()) +# convert the object into a dict +update_network_connection_options_dict = update_network_connection_options_instance.to_dict() +# create an instance of UpdateNetworkConnectionOptions from a dict +update_network_connection_options_from_dict = UpdateNetworkConnectionOptions.from_dict(update_network_connection_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateNetworkConnectionOptionsConfig.md b/docs/UpdateNetworkConnectionOptionsConfig.md new file mode 100644 index 0000000..1635544 --- /dev/null +++ b/docs/UpdateNetworkConnectionOptionsConfig.md @@ -0,0 +1,38 @@ +# UpdateNetworkConnectionOptionsConfig + +An object containing network connection configuration data. Will vary based on network provider type. See examples. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | Username for OpenVPN connection. | [optional] +**password** | **str** | Password for OpenVPN connection. | [optional] +**config** | **str** | OpenVPN connection configuration. | +**physical_interface** | **str** | Physical network interface to create VLAN on. | +**vlan_id** | **float** | VLAN ID (1-4094). | +**dhcp_mode** | **str** | DHCP server mode. | +**gateway** | **str** | Gateway IP address. | [optional] +**network** | **str** | Network address. | [optional] +**dns_servers** | **List[str]** | List of DNS servers. | [optional] + +## Example + +```python +from corellium.models.update_network_connection_options_config import UpdateNetworkConnectionOptionsConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateNetworkConnectionOptionsConfig from a JSON string +update_network_connection_options_config_instance = UpdateNetworkConnectionOptionsConfig.from_json(json) +# print the JSON string representation of the object +print(UpdateNetworkConnectionOptionsConfig.to_json()) + +# convert the object into a dict +update_network_connection_options_config_dict = update_network_connection_options_config_instance.to_dict() +# create an instance of UpdateNetworkConnectionOptionsConfig from a dict +update_network_connection_options_config_from_dict = UpdateNetworkConnectionOptionsConfig.from_dict(update_network_connection_options_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateOwnProfileBody.md b/docs/UpdateOwnProfileBody.md new file mode 100644 index 0000000..46f4f9b --- /dev/null +++ b/docs/UpdateOwnProfileBody.md @@ -0,0 +1,29 @@ +# UpdateOwnProfileBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Display name. | + +## Example + +```python +from corellium.models.update_own_profile_body import UpdateOwnProfileBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateOwnProfileBody from a JSON string +update_own_profile_body_instance = UpdateOwnProfileBody.from_json(json) +# print the JSON string representation of the object +print(UpdateOwnProfileBody.to_json()) + +# convert the object into a dict +update_own_profile_body_dict = update_own_profile_body_instance.to_dict() +# create an instance of UpdateOwnProfileBody from a dict +update_own_profile_body_from_dict = UpdateOwnProfileBody.from_dict(update_own_profile_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateTeamBody.md b/docs/UpdateTeamBody.md new file mode 100644 index 0000000..a44ef04 --- /dev/null +++ b/docs/UpdateTeamBody.md @@ -0,0 +1,29 @@ +# UpdateTeamBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Team name. | [optional] + +## Example + +```python +from corellium.models.update_team_body import UpdateTeamBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTeamBody from a JSON string +update_team_body_instance = UpdateTeamBody.from_json(json) +# print the JSON string representation of the object +print(UpdateTeamBody.to_json()) + +# convert the object into a dict +update_team_body_dict = update_team_body_instance.to_dict() +# create an instance of UpdateTeamBody from a dict +update_team_body_from_dict = UpdateTeamBody.from_dict(update_team_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateTrialRequestBody.md b/docs/UpdateTrialRequestBody.md new file mode 100644 index 0000000..373cf38 --- /dev/null +++ b/docs/UpdateTrialRequestBody.md @@ -0,0 +1,30 @@ +# UpdateTrialRequestBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**extension_days** | **float** | Days to add to the trial before it ends. | [optional] +**extension_hours** | **float** | Hours of usage to add to the trial (device-hours or core-hours). | [optional] + +## Example + +```python +from corellium.models.update_trial_request_body import UpdateTrialRequestBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTrialRequestBody from a JSON string +update_trial_request_body_instance = UpdateTrialRequestBody.from_json(json) +# print the JSON string representation of the object +print(UpdateTrialRequestBody.to_json()) + +# convert the object into a dict +update_trial_request_body_dict = update_trial_request_body_instance.to_dict() +# create an instance of UpdateTrialRequestBody from a dict +update_trial_request_body_from_dict = UpdateTrialRequestBody.from_dict(update_trial_request_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateTrialRequestParams.md b/docs/UpdateTrialRequestParams.md index dcfdbfe..22fd755 100644 --- a/docs/UpdateTrialRequestParams.md +++ b/docs/UpdateTrialRequestParams.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **extension_days** | **float** | Days to add to the trial before it ends. | [optional] **extension_hours** | **float** | Hours of usage to add to the trial. This will be either device-hours or core-hours depending on the trial. | [optional] +## Example + +```python +from corellium.models.update_trial_request_params import UpdateTrialRequestParams + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateTrialRequestParams from a JSON string +update_trial_request_params_instance = UpdateTrialRequestParams.from_json(json) +# print the JSON string representation of the object +print(UpdateTrialRequestParams.to_json()) + +# convert the object into a dict +update_trial_request_params_dict = update_trial_request_params_instance.to_dict() +# create an instance of UpdateTrialRequestParams from a dict +update_trial_request_params_from_dict = UpdateTrialRequestParams.from_dict(update_trial_request_params_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UploadSizeError.md b/docs/UploadSizeError.md new file mode 100644 index 0000000..c622ff8 --- /dev/null +++ b/docs/UploadSizeError.md @@ -0,0 +1,31 @@ +# UploadSizeError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text. | +**error_id** | **str** | Error ID. | +**var_field** | **str** | Limit that was exceeded, e.g. 'storageQuota' or the image type. | [optional] + +## Example + +```python +from corellium.models.upload_size_error import UploadSizeError + +# TODO update the JSON string below +json = "{}" +# create an instance of UploadSizeError from a JSON string +upload_size_error_instance = UploadSizeError.from_json(json) +# print the JSON string representation of the object +print(UploadSizeError.to_json()) + +# convert the object into a dict +upload_size_error_dict = upload_size_error_instance.to_dict() +# create an instance of UploadSizeError from a dict +upload_size_error_from_dict = UploadSizeError.from_dict(upload_size_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/User.md b/docs/User.md index cfb6c8b..eb460e1 100644 --- a/docs/User.md +++ b/docs/User.md @@ -3,6 +3,7 @@ /** ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | User ID | @@ -13,6 +14,23 @@ Name | Type | Description | Notes **can_edit_user_attributes** | **bool** | Flag to determine if user attributes are editable. | [optional] **cluster_administrator** | **bool** | the flag that specifies whether user is cluster administrator or not | [optional] +## Example + +```python +from corellium.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print(User.to_json()) + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_from_dict = User.from_dict(user_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserCreate.md b/docs/UserCreate.md index 05ca9f9..06af5ea 100644 --- a/docs/UserCreate.md +++ b/docs/UserCreate.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The user name. | [optional] @@ -12,6 +13,23 @@ Name | Type | Description | Notes **administrator** | **bool** | Whether the user is a domain administrator. Only users with the Domain Administrator role can set this. | [optional] **cluster_administrator** | **bool** | Whether the user is a cluster administrator. Only users with the Cluster Administrator role can set this. | [optional] +## Example + +```python +from corellium.models.user_create import UserCreate + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCreate from a JSON string +user_create_instance = UserCreate.from_json(json) +# print the JSON string representation of the object +print(UserCreate.to_json()) + +# convert the object into a dict +user_create_dict = user_create_instance.to_dict() +# create an instance of UserCreate from a dict +user_create_from_dict = UserCreate.from_dict(user_create_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserCreateReturn.md b/docs/UserCreateReturn.md index 1932c9f..745c690 100644 --- a/docs/UserCreateReturn.md +++ b/docs/UserCreateReturn.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The user identifier | [optional] +## Example + +```python +from corellium.models.user_create_return import UserCreateReturn + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCreateReturn from a JSON string +user_create_return_instance = UserCreateReturn.from_json(json) +# print the JSON string representation of the object +print(UserCreateReturn.to_json()) + +# convert the object into a dict +user_create_return_dict = user_create_return_instance.to_dict() +# create an instance of UserCreateReturn from a dict +user_create_return_from_dict = UserCreateReturn.from_dict(user_create_return_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserCreated.md b/docs/UserCreated.md new file mode 100644 index 0000000..d78dae0 --- /dev/null +++ b/docs/UserCreated.md @@ -0,0 +1,29 @@ +# UserCreated + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the created user. | + +## Example + +```python +from corellium.models.user_created import UserCreated + +# TODO update the JSON string below +json = "{}" +# create an instance of UserCreated from a JSON string +user_created_instance = UserCreated.from_json(json) +# print the JSON string representation of the object +print(UserCreated.to_json()) + +# convert the object into a dict +user_created_dict = user_created_instance.to_dict() +# create an instance of UserCreated from a dict +user_created_from_dict = UserCreated.from_dict(user_created_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserError.md b/docs/UserError.md index d9ba828..8e84617 100644 --- a/docs/UserError.md +++ b/docs/UserError.md @@ -1,14 +1,34 @@ # UserError - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | **str** | Error text | -**error_id** | **str** | Error ID | -**field** | **str** | Field associated with error | [optional] +**error** | **str** | Human-readable explanation of what was wrong with the request. Show it to the user or log it; do not parse it, because the wording can change. | +**error_id** | **str** | Always `UserError`: the request itself was invalid. Fix the request before retrying; sending it again unchanged fails the same way. | +**var_field** | **str** | Name of the request field that was rejected, when the error is about one field. | [optional] +**validator** | **str** | Validator that rejected the field. | [optional] +**project_ids** | **List[str]** | Projects still using this resource, when the error is a usage conflict. | [optional] +**missing_fw_assets** | **List[str]** | Firmware asset URLs required by the target firmware but absent from the domain, when field is 'firmware_asset'. | [optional] + +## Example + +```python +from corellium.models.user_error import UserError + +# TODO update the JSON string below +json = "{}" +# create an instance of UserError from a JSON string +user_error_instance = UserError.from_json(json) +# print the JSON string representation of the object +print(UserError.to_json()) +# convert the object into a dict +user_error_dict = user_error_instance.to_dict() +# create an instance of UserError from a dict +user_error_from_dict = UserError.from_dict(user_error_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserErrorItem.md b/docs/UserErrorItem.md new file mode 100644 index 0000000..48e53a3 --- /dev/null +++ b/docs/UserErrorItem.md @@ -0,0 +1,34 @@ +# UserErrorItem + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text | +**error_id** | **str** | Error ID | +**var_field** | **str** | Field associated with error | [optional] +**validator** | **str** | Validator that rejected the field | [optional] +**project_ids** | **List[str]** | Projects still using this resource, when the error is a usage conflict. | [optional] + +## Example + +```python +from corellium.models.user_error_item import UserErrorItem + +# TODO update the JSON string below +json = "{}" +# create an instance of UserErrorItem from a JSON string +user_error_item_instance = UserErrorItem.from_json(json) +# print the JSON string representation of the object +print(UserErrorItem.to_json()) + +# convert the object into a dict +user_error_item_dict = user_error_item_instance.to_dict() +# create an instance of UserErrorItem from a dict +user_error_item_from_dict = UserErrorItem.from_dict(user_error_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserErrorResponse.md b/docs/UserErrorResponse.md new file mode 100644 index 0000000..be9f779 --- /dev/null +++ b/docs/UserErrorResponse.md @@ -0,0 +1,35 @@ +# UserErrorResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Summary of the problem. The individual problems are listed in `errors`. | +**error_id** | **str** | Always `UserErrors`: more than one field in the request was invalid. | +**var_field** | **str** | Name of the request field that was rejected, when the error is about one field. | [optional] +**validator** | **str** | Validator that rejected the field. | [optional] +**project_ids** | **List[str]** | Projects still using this resource, when the error is a usage conflict. | [optional] +**missing_fw_assets** | **List[str]** | Firmware asset URLs required by the target firmware but absent from the domain, when field is 'firmware_asset'. | [optional] +**errors** | [**List[UserError]**](UserError.md) | One entry per rejected field. Fix every one before retrying. | + +## Example + +```python +from corellium.models.user_error_response import UserErrorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserErrorResponse from a JSON string +user_error_response_instance = UserErrorResponse.from_json(json) +# print the JSON string representation of the object +print(UserErrorResponse.to_json()) + +# convert the object into a dict +user_error_response_dict = user_error_response_instance.to_dict() +# create an instance of UserErrorResponse from a dict +user_error_response_from_dict = UserErrorResponse.from_dict(user_error_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserErrorV1.md b/docs/UserErrorV1.md new file mode 100644 index 0000000..4ccb7ab --- /dev/null +++ b/docs/UserErrorV1.md @@ -0,0 +1,35 @@ +# UserErrorV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text | +**error_id** | **str** | Error ID | +**var_field** | **str** | Field associated with error | [optional] +**validator** | **str** | Validator that rejected the field | [optional] +**project_ids** | **List[str]** | Projects still using this resource, when the error is a usage conflict. | [optional] +**errors** | [**List[UserErrorItem]**](UserErrorItem.md) | Individual field errors | + +## Example + +```python +from corellium.models.user_error_v1 import UserErrorV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of UserErrorV1 from a JSON string +user_error_v1_instance = UserErrorV1.from_json(json) +# print the JSON string representation of the object +print(UserErrorV1.to_json()) + +# convert the object into a dict +user_error_v1_dict = user_error_v1_instance.to_dict() +# create an instance of UserErrorV1 from a dict +user_error_v1_from_dict = UserErrorV1.from_dict(user_error_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserErrors.md b/docs/UserErrors.md new file mode 100644 index 0000000..63e6bbd --- /dev/null +++ b/docs/UserErrors.md @@ -0,0 +1,31 @@ +# UserErrors + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Summary of the problem. The individual problems are listed in `errors`. | +**error_id** | **str** | Always `UserErrors`: more than one field in the request was invalid. | +**errors** | [**List[UserError]**](UserError.md) | One entry per rejected field. Fix every one before retrying. | + +## Example + +```python +from corellium.models.user_errors import UserErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of UserErrors from a JSON string +user_errors_instance = UserErrors.from_json(json) +# print the JSON string representation of the object +print(UserErrors.to_json()) + +# convert the object into a dict +user_errors_dict = user_errors_instance.to_dict() +# create an instance of UserErrors from a dict +user_errors_from_dict = UserErrors.from_dict(user_errors_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserErrorsV1.md b/docs/UserErrorsV1.md new file mode 100644 index 0000000..33ebc18 --- /dev/null +++ b/docs/UserErrorsV1.md @@ -0,0 +1,32 @@ +# UserErrorsV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error text | +**error_id** | **str** | Error ID | +**errors** | [**List[UserErrorItem]**](UserErrorItem.md) | Individual field errors | + +## Example + +```python +from corellium.models.user_errors_v1 import UserErrorsV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of UserErrorsV1 from a JSON string +user_errors_v1_instance = UserErrorsV1.from_json(json) +# print the JSON string representation of the object +print(UserErrorsV1.to_json()) + +# convert the object into a dict +user_errors_v1_dict = user_errors_v1_instance.to_dict() +# create an instance of UserErrorsV1 from a dict +user_errors_v1_from_dict = UserErrorsV1.from_dict(user_errors_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserSnapshots.md b/docs/UserSnapshots.md index 2ae6b3e..c53cb04 100644 --- a/docs/UserSnapshots.md +++ b/docs/UserSnapshots.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **shared_with_user** | [**SharedSnapshotsInfo**](SharedSnapshotsInfo.md) | | **shared_by_user** | [**SharedSnapshotsInfo**](SharedSnapshotsInfo.md) | | +## Example + +```python +from corellium.models.user_snapshots import UserSnapshots + +# TODO update the JSON string below +json = "{}" +# create an instance of UserSnapshots from a JSON string +user_snapshots_instance = UserSnapshots.from_json(json) +# print the JSON string representation of the object +print(UserSnapshots.to_json()) + +# convert the object into a dict +user_snapshots_dict = user_snapshots_instance.to_dict() +# create an instance of UserSnapshots from a dict +user_snapshots_from_dict = UserSnapshots.from_dict(user_snapshots_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserUpdate.md b/docs/UserUpdate.md index 1273ab2..7666078 100644 --- a/docs/UserUpdate.md +++ b/docs/UserUpdate.md @@ -3,11 +3,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The user name. | [optional] **label** | **str** | The user label (e.g., \"Domain Administrator\"). | [optional] +## Example + +```python +from corellium.models.user_update import UserUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of UserUpdate from a JSON string +user_update_instance = UserUpdate.from_json(json) +# print the JSON string representation of the object +print(UserUpdate.to_json()) + +# convert the object into a dict +user_update_dict = user_update_instance.to_dict() +# create an instance of UserUpdate from a dict +user_update_from_dict = UserUpdate.from_dict(user_update_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UsersApi.md b/docs/UsersApi.md new file mode 100644 index 0000000..e1b3315 --- /dev/null +++ b/docs/UsersApi.md @@ -0,0 +1,732 @@ +# corellium.UsersApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_agree_to_terms**](UsersApi.md#v3_agree_to_terms) | **POST** /v3/users/agree | Agree to terms +[**v3_change_password**](UsersApi.md#v3_change_password) | **POST** /v3/users/change-password | Change password +[**v3_create_user**](UsersApi.md#v3_create_user) | **POST** /v3/users | Create a user +[**v3_delete_user**](UsersApi.md#v3_delete_user) | **DELETE** /v3/users/{userId} | Delete a user +[**v3_get_reset_link_info**](UsersApi.md#v3_get_reset_link_info) | **POST** /v3/users/reset-link-info | Get reset link info +[**v3_patch_user**](UsersApi.md#v3_patch_user) | **PATCH** /v3/users/{userId} | Update a user +[**v3_reset_password**](UsersApi.md#v3_reset_password) | **POST** /v3/users/reset-password | Reset password +[**v3_send_reset_link**](UsersApi.md#v3_send_reset_link) | **POST** /v3/users/send-reset-link | Send a password reset link +[**v3_update_own_profile**](UsersApi.md#v3_update_own_profile) | **PATCH** /v3/users/me | Update your profile + + +# **v3_agree_to_terms** +> AgreedAck v3_agree_to_terms() + +Agree to terms + +Records that you, the signed-in user, accept the current terms and conditions, and returns the time of agreement. The web interface calls this when it shows the terms; call it yourself if your domain requires agreement before using the platform. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agreed_ack import AgreedAck +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + + try: + # Agree to terms + api_response = api_instance.v3_agree_to_terms() + print("The response of UsersApi->v3_agree_to_terms:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->v3_agree_to_terms: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AgreedAck**](AgreedAck.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Terms accepted. | - | +**401** | The session token is missing, invalid, or expired. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_change_password** +> v3_change_password(change_password_body) + +Change password + +Changes a password when you know the current one. Needs no sign-in: send the user's ID in `user`, the current password in `oldPassword`, and the new one in `newPassword`. Returns 204 on success and 403 if the old password is wrong. If you have forgotten the password, use the reset flow instead (`v3SendResetLink`). + +### Example + + +```python +import corellium +from corellium.models.change_password_body import ChangePasswordBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + change_password_body = corellium.ChangePasswordBody() # ChangePasswordBody | + + try: + # Change password + api_instance.v3_change_password(change_password_body) + except Exception as e: + print("Exception when calling UsersApi->v3_change_password: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **change_password_body** | [**ChangePasswordBody**](ChangePasswordBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Password changed. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | The user does not exist or the old password is wrong. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_create_user** +> UserCreated v3_create_user(create_user_body) + +Create a user + +**Required role:** Domain administrator. + +Creates a user account in your domain directly, with a username and password you choose, without sending an invitation. Requires a domain administrator. Returns 201 with the new user's ID. To let people set their own password instead, invite them with `POST /v3/invites`. A new user has no project access until you grant it with the Roles endpoints or add them to a team. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_user_body import CreateUserBody +from corellium.models.user_created import UserCreated +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + create_user_body = corellium.CreateUserBody() # CreateUserBody | + + try: + # Create a user + api_response = api_instance.v3_create_user(create_user_body) + print("The response of UsersApi->v3_create_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->v3_create_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_user_body** | [**CreateUserBody**](CreateUserBody.md)| | + +### Return type + +[**UserCreated**](UserCreated.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | User created. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_user** +> v3_delete_user(user_id) + +Delete a user + +**Required role:** Domain administrator. + +Deletes the user identified by the given userId. + +Deletes are idempotent: a `userId` that does not exist, including one that was already deleted, is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | User identifier. + + try: + # Delete a user + api_instance.v3_delete_user(user_id) + except Exception as e: + print("Exception when calling UsersApi->v3_delete_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User deleted. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_reset_link_info** +> ResetLinkInfo v3_get_reset_link_info(get_reset_link_info_body) + +Get reset link info + +Step 2 (optional) of resetting a forgotten password: checks the token from a reset email and returns the account it belongs to (user ID, username and domain), so a reset page can show whose password is being changed. Needs no sign-in. Returns 400 or 401 if the token is missing, invalid or expired. + +### Example + + +```python +import corellium +from corellium.models.get_reset_link_info_body import GetResetLinkInfoBody +from corellium.models.reset_link_info import ResetLinkInfo +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + get_reset_link_info_body = corellium.GetResetLinkInfoBody() # GetResetLinkInfoBody | + + try: + # Get reset link info + api_response = api_instance.v3_get_reset_link_info(get_reset_link_info_body) + print("The response of UsersApi->v3_get_reset_link_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->v3_get_reset_link_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **get_reset_link_info_body** | [**GetResetLinkInfoBody**](GetResetLinkInfoBody.md)| | + +### Return type + +[**ResetLinkInfo**](ResetLinkInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Reset link info. | - | +**400** | Token was not supplied, or is not a password reset token. | - | +**401** | The reset token failed verification: malformed, tampered with, or expired. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_patch_user** +> v3_patch_user(user_id, patch_user_body=patch_user_body) + +Update a user + +Changes a user's account details, such as their name, display label, email or password. Send only the fields you want to change. Only cluster administrators may set or change `clusterAdministrator`, which gives a user control over the whole cluster. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.patch_user_body import PatchUserBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' # str | User identifier. + patch_user_body = corellium.PatchUserBody() # PatchUserBody | (optional) + + try: + # Update a user + api_instance.v3_patch_user(user_id, patch_user_body=patch_user_body) + except Exception as e: + print("Exception when calling UsersApi->v3_patch_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| User identifier. | + **patch_user_body** | [**PatchUserBody**](PatchUserBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | User updated. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_reset_password** +> v3_reset_password(reset_password_body) + +Reset password + +Step 3 of resetting a forgotten password. Send the `token` from the reset email, the `newPassword`, and, if the account has two-factor sign-in turned on, a current six-digit code in `totpToken`. Returns 204 when the password has been changed; sign in with the new password. + +**Reset flow:** +1. `v3SendResetLink` with the account's email address. +2. Optionally `v3GetResetLinkInfo` with the token from the email, to show which account is being reset. +3. `v3ResetPassword` (this call). + +Returns 401 if the token is invalid or expired, or the two-factor code is wrong. + +### Example + + +```python +import corellium +from corellium.models.reset_password_body import ResetPasswordBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + reset_password_body = corellium.ResetPasswordBody() # ResetPasswordBody | + + try: + # Reset password + api_instance.v3_reset_password(reset_password_body) + except Exception as e: + print("Exception when calling UsersApi->v3_reset_password: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **reset_password_body** | [**ResetPasswordBody**](ResetPasswordBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Password reset. | - | +**400** | Password reset token must be supplied. | - | +**401** | The one-time code is incorrect, or the reset token failed verification. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_send_reset_link** +> v3_send_reset_link(send_reset_link_body=send_reset_link_body) + +Send a password reset link + +Step 1 of resetting a forgotten password: emails a password reset link to the given address, if it belongs to an account in the domain you are calling. Needs no sign-in. Always returns 204, whether or not the address matched an account, so the response does not reveal which emails are registered. The link contains the token used by `v3ResetPassword`. + +### Example + + +```python +import corellium +from corellium.models.send_reset_link_body import SendResetLinkBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + send_reset_link_body = corellium.SendResetLinkBody() # SendResetLinkBody | (optional) + + try: + # Send a password reset link + api_instance.v3_send_reset_link(send_reset_link_body=send_reset_link_body) + except Exception as e: + print("Exception when calling UsersApi->v3_send_reset_link: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **send_reset_link_body** | [**SendResetLinkBody**](SendResetLinkBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Reset link sent (if the email matched an account). | - | +**400** | The request body failed validation. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_update_own_profile** +> v3_update_own_profile(update_own_profile_body) + +Update your profile + +Updates the caller's own display name. Needs no administrator role. Users created through an authentication provider cannot change their label, because the provider owns it. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.update_own_profile_body import UpdateOwnProfileBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersApi(api_client) + update_own_profile_body = corellium.UpdateOwnProfileBody() # UpdateOwnProfileBody | + + try: + # Update your profile + api_instance.v3_update_own_profile(update_own_profile_body) + except Exception as e: + print("Exception when calling UsersApi->v3_update_own_profile: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_own_profile_body** | [**UpdateOwnProfileBody**](UpdateOwnProfileBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Profile updated. | - | +**400** | The label is missing, empty, or longer than 100 characters; the body has a field other than `label`; or the user was created through an authentication provider. | - | +**401** | The session token is missing, invalid, or expired. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UsersV1Api.md b/docs/UsersV1Api.md new file mode 100644 index 0000000..dd7c2a4 --- /dev/null +++ b/docs/UsersV1Api.md @@ -0,0 +1,703 @@ +# corellium.UsersV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_change_password_users**](UsersV1Api.md#v1_change_password_users) | **POST** /v1/users/change-password | Change User Password +[**v1_create_user**](UsersV1Api.md#v1_create_user) | **POST** /v1/users | Create User +[**v1_delete_user**](UsersV1Api.md#v1_delete_user) | **DELETE** /v1/users/{userId} | Delete User +[**v1_get_reset_link_info**](UsersV1Api.md#v1_get_reset_link_info) | **GET** /v1/users/reset-link-info | Send Password Reset Link Info +[**v1_reset_user_password**](UsersV1Api.md#v1_reset_user_password) | **POST** /v1/users/reset-password | Reset User Password +[**v1_send_user_reset_link**](UsersV1Api.md#v1_send_user_reset_link) | **POST** /v1/users/send-reset-link | Send Password Reset Link +[**v1_update_user**](UsersV1Api.md#v1_update_user) | **PATCH** /v1/users/{userId} | Update User +[**v1_user_agree_terms**](UsersV1Api.md#v1_user_agree_terms) | **POST** /v1/users/agree | Consent to the current terms and conditions +[**v1_users_login**](UsersV1Api.md#v1_users_login) | **POST** /v1/users/login | Log In + + +# **v1_change_password_users** +> v1_change_password_users(password_change_body) + +Change User Password + +Authenticated solely by the old-password. + +### Example + + +```python +import corellium +from corellium.models.password_change_body import PasswordChangeBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + password_change_body = { + "user": "", + "old-password": "Password1", + "new-password": "Password2" +} # PasswordChangeBody | + + try: + # Change User Password + api_instance.v1_change_password_users(password_change_body) + except Exception as e: + print("Exception when calling UsersV1Api->v1_change_password_users: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **password_change_body** | [**PasswordChangeBody**](PasswordChangeBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_create_user** +> UserCreateReturn v1_create_user(user_create) + +Create User + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.user_create import UserCreate +from corellium.models.user_create_return import UserCreateReturn +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + user_create = { + "name": "test", + "label": "Project Admin", +} # UserCreate | User data + + try: + # Create User + api_response = api_instance.v1_create_user(user_create) + print("The response of UsersV1Api->v1_create_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersV1Api->v1_create_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_create** | [**UserCreate**](UserCreate.md)| User data | + +### Return type + +[**UserCreateReturn**](UserCreateReturn.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_delete_user** +> v1_delete_user(user_id) + +Delete User + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + user_id = 'user_id_example' # str | userId - uuid + + try: + # Delete User + api_instance.v1_delete_user(user_id) + except Exception as e: + print("Exception when calling UsersV1Api->v1_delete_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| userId - uuid | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_get_reset_link_info** +> ResetLinkInfoReturn v1_get_reset_link_info(token) + +Send Password Reset Link Info + +### Example + + +```python +import corellium +from corellium.models.reset_link_info_return import ResetLinkInfoReturn +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + token = 'token_example' # str | Reset token + + try: + # Send Password Reset Link Info + api_response = api_instance.v1_get_reset_link_info(token) + print("The response of UsersV1Api->v1_get_reset_link_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersV1Api->v1_get_reset_link_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| Reset token | + +### Return type + +[**ResetLinkInfoReturn**](ResetLinkInfoReturn.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Reset Link Info | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_reset_user_password** +> v1_reset_user_password(password_reset_body) + +Reset User Password + +### Example + + +```python +import corellium +from corellium.models.password_reset_body import PasswordResetBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + password_reset_body = { + "token": "", + "totpToken": "", + "new-password": "password" +} # PasswordResetBody | application/json + + try: + # Reset User Password + api_instance.v1_reset_user_password(password_reset_body) + except Exception as e: + print("Exception when calling UsersV1Api->v1_reset_user_password: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **password_reset_body** | [**PasswordResetBody**](PasswordResetBody.md)| application/json | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_send_user_reset_link** +> v1_send_user_reset_link(reset_link_body) + +Send Password Reset Link + +### Example + + +```python +import corellium +from corellium.models.reset_link_body import ResetLinkBody +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + reset_link_body = corellium.ResetLinkBody() # ResetLinkBody | application/json + + try: + # Send Password Reset Link + api_instance.v1_send_user_reset_link(reset_link_body) + except Exception as e: + print("Exception when calling UsersV1Api->v1_send_user_reset_link: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **reset_link_body** | [**ResetLinkBody**](ResetLinkBody.md)| application/json | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Accepted | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_update_user** +> v1_update_user(user_id, user_update) + +Update User + +Update a user. Fields such as `name`, `label`, `password`, and `clusterAdministrator` can be updated. + Only users with the Cluster Administrator role can set or modify the `clusterAdministrator` flag. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.user_update import UserUpdate +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + user_id = 'user_id_example' # str | userId - uuid + user_update = { + "name": "test", + "label": "Project Admin", + "password": "new-password", + "clusterAdministrator": true +} # UserUpdate | User data + + try: + # Update User + api_instance.v1_update_user(user_id, user_update) + except Exception as e: + print("Exception when calling UsersV1Api->v1_update_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| userId - uuid | + **user_update** | [**UserUpdate**](UserUpdate.md)| User data | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_user_agree_terms** +> AgreedAckV1 v1_user_agree_terms() + +Consent to the current terms and conditions + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.agreed_ack_v1 import AgreedAckV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + + try: + # Consent to the current terms and conditions + api_response = api_instance.v1_user_agree_terms() + print("The response of UsersV1Api->v1_user_agree_terms:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersV1Api->v1_user_agree_terms: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AgreedAckV1**](AgreedAckV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | application/json | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_users_login** +> TokenV1 v1_users_login(credentials) + +Log In + +### Example + + +```python +import corellium +from corellium.models.credentials import Credentials +from corellium.models.token_v1 import TokenV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.UsersV1Api(api_client) + credentials = { + "username": "admin", + "password": "password" +} # Credentials | Authorization data + + try: + # Log In + api_response = api_instance.v1_users_login(credentials) + print("The response of UsersV1Api->v1_users_login:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersV1Api->v1_users_login: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **credentials** | [**Credentials**](Credentials.md)| Authorization data | + +### Return type + +[**TokenV1**](TokenV1.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User Authorization | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/V1CheckSubdomainExistenceParameters.md b/docs/V1CheckSubdomainExistenceParameters.md index 8114f47..77dd508 100644 --- a/docs/V1CheckSubdomainExistenceParameters.md +++ b/docs/V1CheckSubdomainExistenceParameters.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **domain** | **str** | Domain to check | +## Example + +```python +from corellium.models.v1_check_subdomain_existence_parameters import V1CheckSubdomainExistenceParameters + +# TODO update the JSON string below +json = "{}" +# create an instance of V1CheckSubdomainExistenceParameters from a JSON string +v1_check_subdomain_existence_parameters_instance = V1CheckSubdomainExistenceParameters.from_json(json) +# print the JSON string representation of the object +print(V1CheckSubdomainExistenceParameters.to_json()) + +# convert the object into a dict +v1_check_subdomain_existence_parameters_dict = v1_check_subdomain_existence_parameters_instance.to_dict() +# create an instance of V1CheckSubdomainExistenceParameters from a dict +v1_check_subdomain_existence_parameters_from_dict = V1CheckSubdomainExistenceParameters.from_dict(v1_check_subdomain_existence_parameters_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V1CreateHookParameters.md b/docs/V1CreateHookParameters.md index 94e41e9..898bb83 100644 --- a/docs/V1CreateHookParameters.md +++ b/docs/V1CreateHookParameters.md @@ -3,13 +3,32 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | **str** | Label | **address** | **str** | Address | **patch** | **str** | Patch | **patch_type** | **str** | Patch Type | +**enabled** | **bool** | If true, instances can call required hooks | [optional] + +## Example + +```python +from corellium.models.v1_create_hook_parameters import V1CreateHookParameters + +# TODO update the JSON string below +json = "{}" +# create an instance of V1CreateHookParameters from a JSON string +v1_create_hook_parameters_instance = V1CreateHookParameters.from_json(json) +# print the JSON string representation of the object +print(V1CreateHookParameters.to_json()) +# convert the object into a dict +v1_create_hook_parameters_dict = v1_create_hook_parameters_instance.to_dict() +# create an instance of V1CreateHookParameters from a dict +v1_create_hook_parameters_from_dict = V1CreateHookParameters.from_dict(v1_create_hook_parameters_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V1LoadExtensionParameters.md b/docs/V1LoadExtensionParameters.md index dd4147f..c30b3db 100644 --- a/docs/V1LoadExtensionParameters.md +++ b/docs/V1LoadExtensionParameters.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **image_id** | **str** | The uuid of the image to load | +## Example + +```python +from corellium.models.v1_load_extension_parameters import V1LoadExtensionParameters + +# TODO update the JSON string below +json = "{}" +# create an instance of V1LoadExtensionParameters from a JSON string +v1_load_extension_parameters_instance = V1LoadExtensionParameters.from_json(json) +# print the JSON string representation of the object +print(V1LoadExtensionParameters.to_json()) + +# convert the object into a dict +v1_load_extension_parameters_dict = v1_load_extension_parameters_instance.to_dict() +# create an instance of V1LoadExtensionParameters from a dict +v1_load_extension_parameters_from_dict = V1LoadExtensionParameters.from_dict(v1_load_extension_parameters_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V1SetStateBody.md b/docs/V1SetStateBody.md index 3b079e6..a9e2046 100644 --- a/docs/V1SetStateBody.md +++ b/docs/V1SetStateBody.md @@ -3,10 +3,28 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state** | [**InstanceState**](InstanceState.md) | | +**state** | [**InstanceStateV1**](InstanceStateV1.md) | | + +## Example + +```python +from corellium.models.v1_set_state_body import V1SetStateBody + +# TODO update the JSON string below +json = "{}" +# create an instance of V1SetStateBody from a JSON string +v1_set_state_body_instance = V1SetStateBody.from_json(json) +# print the JSON string representation of the object +print(V1SetStateBody.to_json()) +# convert the object into a dict +v1_set_state_body_dict = v1_set_state_body_instance.to_dict() +# create an instance of V1SetStateBody from a dict +v1_set_state_body_from_dict = V1SetStateBody.from_dict(v1_set_state_body_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V1UpdateHookParameters.md b/docs/V1UpdateHookParameters.md index 68764e0..9bf2a1e 100644 --- a/docs/V1UpdateHookParameters.md +++ b/docs/V1UpdateHookParameters.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | **str** | Label | [optional] @@ -11,6 +12,23 @@ Name | Type | Description | Notes **patch_type** | **str** | Patch Type | [optional] **enabled** | **bool** | Enabled | [optional] +## Example + +```python +from corellium.models.v1_update_hook_parameters import V1UpdateHookParameters + +# TODO update the JSON string below +json = "{}" +# create an instance of V1UpdateHookParameters from a JSON string +v1_update_hook_parameters_instance = V1UpdateHookParameters.from_json(json) +# print the JSON string representation of the object +print(V1UpdateHookParameters.to_json()) + +# convert the object into a dict +v1_update_hook_parameters_dict = v1_update_hook_parameters_instance.to_dict() +# create an instance of V1UpdateHookParameters from a dict +v1_update_hook_parameters_from_dict = V1UpdateHookParameters.from_dict(v1_update_hook_parameters_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/V3DeleteNetworkConnectionRequest.md b/docs/V3DeleteNetworkConnectionRequest.md new file mode 100644 index 0000000..b8ac968 --- /dev/null +++ b/docs/V3DeleteNetworkConnectionRequest.md @@ -0,0 +1,29 @@ +# V3DeleteNetworkConnectionRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**force** | **bool** | Force the operation through constraint checks (e.g. stopping active instances). | [optional] [default to False] + +## Example + +```python +from corellium.models.v3_delete_network_connection_request import V3DeleteNetworkConnectionRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of V3DeleteNetworkConnectionRequest from a JSON string +v3_delete_network_connection_request_instance = V3DeleteNetworkConnectionRequest.from_json(json) +# print the JSON string representation of the object +print(V3DeleteNetworkConnectionRequest.to_json()) + +# convert the object into a dict +v3_delete_network_connection_request_dict = v3_delete_network_connection_request_instance.to_dict() +# create an instance of V3DeleteNetworkConnectionRequest from a dict +v3_delete_network_connection_request_from_dict = V3DeleteNetworkConnectionRequest.from_dict(v3_delete_network_connection_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/V3UpdateSnapshotRequest.md b/docs/V3UpdateSnapshotRequest.md new file mode 100644 index 0000000..3e9b103 --- /dev/null +++ b/docs/V3UpdateSnapshotRequest.md @@ -0,0 +1,29 @@ +# V3UpdateSnapshotRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | New name for the snapshot. | + +## Example + +```python +from corellium.models.v3_update_snapshot_request import V3UpdateSnapshotRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of V3UpdateSnapshotRequest from a JSON string +v3_update_snapshot_request_instance = V3UpdateSnapshotRequest.from_json(json) +# print the JSON string representation of the object +print(V3UpdateSnapshotRequest.to_json()) + +# convert the object into a dict +v3_update_snapshot_request_dict = v3_update_snapshot_request_instance.to_dict() +# create an instance of V3UpdateSnapshotRequest from a dict +v3_update_snapshot_request_from_dict = V3UpdateSnapshotRequest.from_dict(v3_update_snapshot_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VLANConfig.md b/docs/VLANConfig.md new file mode 100644 index 0000000..be41811 --- /dev/null +++ b/docs/VLANConfig.md @@ -0,0 +1,34 @@ +# VLANConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**physical_interface** | **str** | Physical network interface to create VLAN on | +**vlan_id** | **float** | VLAN ID (1-4094) | +**dhcp_mode** | **str** | DHCP server mode | +**gateway** | **str** | Gateway IP address | [optional] +**network** | **str** | Network address | [optional] +**dns_servers** | **List[str]** | List of DNS servers | [optional] + +## Example + +```python +from corellium.models.vlan_config import VLANConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of VLANConfig from a JSON string +vlan_config_instance = VLANConfig.from_json(json) +# print the JSON string representation of the object +print(VLANConfig.to_json()) + +# convert the object into a dict +vlan_config_dict = vlan_config_instance.to_dict() +# create an instance of VLANConfig from a dict +vlan_config_from_dict = VLANConfig.from_dict(vlan_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VLANConfigV1.md b/docs/VLANConfigV1.md new file mode 100644 index 0000000..84ffe9f --- /dev/null +++ b/docs/VLANConfigV1.md @@ -0,0 +1,35 @@ +# VLANConfigV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**physical_interface** | **str** | Physical network interface to create VLAN on. | +**vlan_id** | **float** | VLAN ID (1-4094). | +**dhcp_mode** | **str** | DHCP server mode. | +**gateway** | **str** | Gateway IP address. | [optional] +**network** | **str** | Network address. | [optional] +**dns_servers** | **List[str]** | List of DNS servers. | [optional] + +## Example + +```python +from corellium.models.vlan_config_v1 import VLANConfigV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of VLANConfigV1 from a JSON string +vlan_config_v1_instance = VLANConfigV1.from_json(json) +# print the JSON string representation of the object +print(VLANConfigV1.to_json()) + +# convert the object into a dict +vlan_config_v1_dict = vlan_config_v1_instance.to_dict() +# create an instance of VLANConfigV1 from a dict +vlan_config_v1_from_dict = VLANConfigV1.from_dict(vlan_config_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VLANNetworkConnection.md b/docs/VLANNetworkConnection.md new file mode 100644 index 0000000..ea3bcd0 --- /dev/null +++ b/docs/VLANNetworkConnection.md @@ -0,0 +1,37 @@ +# VLANNetworkConnection + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User friendly name for network connection. | +**provider** | **str** | Type of network connection. | +**config** | [**VLANConfig**](VLANConfig.md) | | [optional] +**identifier** | **str** | Unique identifier for the network connection. | +**projects** | [**Dict[str, OpenVPNNetworkConnectionProjectsValue]**](OpenVPNNetworkConnectionProjectsValue.md) | Network states mapped by project IDs. | [optional] +**created_at** | **datetime** | Timestamp when the network connection was created. | +**updated_at** | **datetime** | Timestamp when the network connection was last updated. | +**created_by** | **str** | User ID of the creator. | +**updated_by** | **str** | User ID of the last updater. | + +## Example + +```python +from corellium.models.vlan_network_connection import VLANNetworkConnection + +# TODO update the JSON string below +json = "{}" +# create an instance of VLANNetworkConnection from a JSON string +vlan_network_connection_instance = VLANNetworkConnection.from_json(json) +# print the JSON string representation of the object +print(VLANNetworkConnection.to_json()) + +# convert the object into a dict +vlan_network_connection_dict = vlan_network_connection_instance.to_dict() +# create an instance of VLANNetworkConnection from a dict +vlan_network_connection_from_dict = VLANNetworkConnection.from_dict(vlan_network_connection_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VLANNetworkConnectionV1.md b/docs/VLANNetworkConnectionV1.md new file mode 100644 index 0000000..c9e4979 --- /dev/null +++ b/docs/VLANNetworkConnectionV1.md @@ -0,0 +1,38 @@ +# VLANNetworkConnectionV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | UUIDv4 | +**provider** | **str** | Type of network connection. | +**name** | **str** | User specified name for this network connection. e.g., \"My Network Connection\" | +**config** | [**VLANConfigV1**](VLANConfigV1.md) | | [optional] +**projects** | [**Dict[str, ProjectNetworkState]**](ProjectNetworkState.md) | An object where the keys are project IDs and the values are {@link ProjectNetworkState} objects representing the state of each project. | [optional] +**created_at** | **str** | Created Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" | +**updated_at** | **str** | Updated Date in ISO-8601 format e.g., \"2022-05-06T02:39:23.000Z\" | +**created_by** | **str** | UUIDv4 of the user who created this record. | +**updated_by** | **str** | UUIDv4 of the user who last updated this record. | + +## Example + +```python +from corellium.models.vlan_network_connection_v1 import VLANNetworkConnectionV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of VLANNetworkConnectionV1 from a JSON string +vlan_network_connection_v1_instance = VLANNetworkConnectionV1.from_json(json) +# print the JSON string representation of the object +print(VLANNetworkConnectionV1.to_json()) + +# convert the object into a dict +vlan_network_connection_v1_dict = vlan_network_connection_v1_instance.to_dict() +# create an instance of VLANNetworkConnectionV1 from a dict +vlan_network_connection_v1_from_dict = VLANNetworkConnectionV1.from_dict(vlan_network_connection_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ValidationError.md b/docs/ValidationError.md index 53ea634..b00c6ed 100644 --- a/docs/ValidationError.md +++ b/docs/ValidationError.md @@ -3,12 +3,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | **str** | Error text | **error_id** | **str** | Error ID | -**field** | **str** | Field associated with error | [optional] +**var_field** | **str** | Field associated with error | [optional] + +## Example + +```python +from corellium.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VolumeOptions.md b/docs/VolumeOptions.md index 9b983d7..4b30ec3 100644 --- a/docs/VolumeOptions.md +++ b/docs/VolumeOptions.md @@ -1,13 +1,30 @@ # VolumeOptions - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**blocks** | **float** | blocks to resize partition to | [optional] -**name** | **str** | name of partition | [optional] +**blocks** | **float** | Blocks to resize partition to. | +**name** | **str** | Name of partition. | + +## Example + +```python +from corellium.models.volume_options import VolumeOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of VolumeOptions from a JSON string +volume_options_instance = VolumeOptions.from_json(json) +# print the JSON string representation of the object +print(VolumeOptions.to_json()) +# convert the object into a dict +volume_options_dict = volume_options_instance.to_dict() +# create an instance of VolumeOptions from a dict +volume_options_from_dict = VolumeOptions.from_dict(volume_options_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VolumeOptionsV1.md b/docs/VolumeOptionsV1.md new file mode 100644 index 0000000..58d2a73 --- /dev/null +++ b/docs/VolumeOptionsV1.md @@ -0,0 +1,31 @@ +# VolumeOptionsV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**blocks** | **float** | blocks to resize partition to | [optional] +**name** | **str** | name of partition | [optional] + +## Example + +```python +from corellium.models.volume_options_v1 import VolumeOptionsV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of VolumeOptionsV1 from a JSON string +volume_options_v1_instance = VolumeOptionsV1.from_json(json) +# print the JSON string representation of the object +print(VolumeOptionsV1.to_json()) + +# convert the object into a dict +volume_options_v1_dict = volume_options_v1_instance.to_dict() +# create an instance of VolumeOptionsV1 from a dict +volume_options_v1_from_dict = VolumeOptionsV1.from_dict(volume_options_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VpnConfigPreauthorization.md b/docs/VpnConfigPreauthorization.md new file mode 100644 index 0000000..7486760 --- /dev/null +++ b/docs/VpnConfigPreauthorization.md @@ -0,0 +1,29 @@ +# VpnConfigPreauthorization + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | Signed JWT granting access to the VPN configuration download. | + +## Example + +```python +from corellium.models.vpn_config_preauthorization import VpnConfigPreauthorization + +# TODO update the JSON string below +json = "{}" +# create an instance of VpnConfigPreauthorization from a JSON string +vpn_config_preauthorization_instance = VpnConfigPreauthorization.from_json(json) +# print the JSON string representation of the object +print(VpnConfigPreauthorization.to_json()) + +# convert the object into a dict +vpn_config_preauthorization_dict = vpn_config_preauthorization_instance.to_dict() +# create an instance of VpnConfigPreauthorization from a dict +vpn_config_preauthorization_from_dict = VpnConfigPreauthorization.from_dict(vpn_config_preauthorization_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VpnDefinition.md b/docs/VpnDefinition.md index 7794aa5..7aff886 100644 --- a/docs/VpnDefinition.md +++ b/docs/VpnDefinition.md @@ -1,13 +1,30 @@ # VpnDefinition - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**proxy** | **list[object]** | | [optional] -**listeners** | **list[object]** | | [optional] +**proxy** | **List[Dict[str, Optional[object]]]** | VPN proxy definitions. | [optional] +**listeners** | **List[Dict[str, Optional[object]]]** | VPN listener definitions. | [optional] + +## Example + +```python +from corellium.models.vpn_definition import VpnDefinition + +# TODO update the JSON string below +json = "{}" +# create an instance of VpnDefinition from a JSON string +vpn_definition_instance = VpnDefinition.from_json(json) +# print the JSON string representation of the object +print(VpnDefinition.to_json()) +# convert the object into a dict +vpn_definition_dict = vpn_definition_instance.to_dict() +# create an instance of VpnDefinition from a dict +vpn_definition_from_dict = VpnDefinition.from_dict(vpn_definition_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VpnDefinitionV1.md b/docs/VpnDefinitionV1.md new file mode 100644 index 0000000..4227e60 --- /dev/null +++ b/docs/VpnDefinitionV1.md @@ -0,0 +1,31 @@ +# VpnDefinitionV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**proxy** | **List[object]** | | [optional] +**listeners** | **List[object]** | | [optional] + +## Example + +```python +from corellium.models.vpn_definition_v1 import VpnDefinitionV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of VpnDefinitionV1 from a JSON string +vpn_definition_v1_instance = VpnDefinitionV1.from_json(json) +# print the JSON string representation of the object +print(VpnDefinitionV1.to_json()) + +# convert the object into a dict +vpn_definition_v1_dict = vpn_definition_v1_instance.to_dict() +# create an instance of VpnDefinitionV1 from a dict +vpn_definition_v1_from_dict = VpnDefinitionV1.from_dict(vpn_definition_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VpnSchema.md b/docs/VpnSchema.md new file mode 100644 index 0000000..c88430c --- /dev/null +++ b/docs/VpnSchema.md @@ -0,0 +1,32 @@ +# VpnSchema + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | VPN type. | +**project_id** | **str** | Project identifier. | +**state** | **str** | VPN state. | +**details** | **Dict[str, Optional[object]]** | VPN details. | + +## Example + +```python +from corellium.models.vpn_schema import VpnSchema + +# TODO update the JSON string below +json = "{}" +# create an instance of VpnSchema from a JSON string +vpn_schema_instance = VpnSchema.from_json(json) +# print the JSON string representation of the object +print(VpnSchema.to_json()) + +# convert the object into a dict +vpn_schema_dict = vpn_schema_instance.to_dict() +# create an instance of VpnSchema from a dict +vpn_schema_from_dict = VpnSchema.from_dict(vpn_schema_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebPlayerAllowedDomains.md b/docs/WebPlayerAllowedDomains.md new file mode 100644 index 0000000..c4a8845 --- /dev/null +++ b/docs/WebPlayerAllowedDomains.md @@ -0,0 +1,29 @@ +# WebPlayerAllowedDomains + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_domains** | **List[str]** | Domains permitted for webplayer sessions. | + +## Example + +```python +from corellium.models.web_player_allowed_domains import WebPlayerAllowedDomains + +# TODO update the JSON string below +json = "{}" +# create an instance of WebPlayerAllowedDomains from a JSON string +web_player_allowed_domains_instance = WebPlayerAllowedDomains.from_json(json) +# print the JSON string representation of the object +print(WebPlayerAllowedDomains.to_json()) + +# convert the object into a dict +web_player_allowed_domains_dict = web_player_allowed_domains_instance.to_dict() +# create an instance of WebPlayerAllowedDomains from a dict +web_player_allowed_domains_from_dict = WebPlayerAllowedDomains.from_dict(web_player_allowed_domains_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebPlayerApi.md b/docs/WebPlayerApi.md new file mode 100644 index 0000000..d6a027e --- /dev/null +++ b/docs/WebPlayerApi.md @@ -0,0 +1,459 @@ +# corellium.WebPlayerApi + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_create_web_player_session**](WebPlayerApi.md#v3_create_web_player_session) | **POST** /v3/webplayer | Create a webplayer session +[**v3_delete_web_player_session**](WebPlayerApi.md#v3_delete_web_player_session) | **DELETE** /v3/webplayer/{sessionId} | Delete a webplayer session +[**v3_get_web_player_allowed_domains**](WebPlayerApi.md#v3_get_web_player_allowed_domains) | **GET** /v3/webplayer/allowedDomains | Get allowed webplayer domains +[**v3_get_web_player_session**](WebPlayerApi.md#v3_get_web_player_session) | **GET** /v3/webplayer/{sessionId} | Get a webplayer session +[**v3_list_web_player_sessions**](WebPlayerApi.md#v3_list_web_player_sessions) | **GET** /v3/webplayer | List webplayer sessions + + +# **v3_create_web_player_session** +> WebPlayerCreatedSession v3_create_web_player_session(create_web_player_session_body) + +Create a webplayer session + +**Required role:** Domain administrator. + +Creates a Web Player session: a limited token that lets someone use one device, embedded in your own web page, without giving them a Corellium account. Requires a domain administrator. + +Choose the device (`projectId`, `instanceId`), how long the session lasts (`expiresIn`, at least 1800 seconds), and which parts of the device interface the viewer may use (`features`). Pass the returned `token` to the Web Player in your page. The website domains configured for embedding are listed by `v3GetWebPlayerAllowedDomains` and set with `webplayer.allowedDomains` on `PATCH /v3/domain`. End the session early with `v3DeleteWebPlayerSession`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.create_web_player_session_body import CreateWebPlayerSessionBody +from corellium.models.web_player_created_session import WebPlayerCreatedSession +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerApi(api_client) + create_web_player_session_body = corellium.CreateWebPlayerSessionBody() # CreateWebPlayerSessionBody | + + try: + # Create a webplayer session + api_response = api_instance.v3_create_web_player_session(create_web_player_session_body) + print("The response of WebPlayerApi->v3_create_web_player_session:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPlayerApi->v3_create_web_player_session: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_web_player_session_body** | [**CreateWebPlayerSessionBody**](CreateWebPlayerSessionBody.md)| | + +### Return type + +[**WebPlayerCreatedSession**](WebPlayerCreatedSession.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Session created. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_delete_web_player_session** +> v3_delete_web_player_session(session_id) + +Delete a webplayer session + +**Required role:** Domain administrator. + +Ends a Web Player session: its token stops working, so the embedded viewer loses access to the device. Requires a domain administrator. The device itself is not affected. + +Deletes are idempotent: an unknown `sessionId` is a successful no-op that still returns 204, and +repeated calls return 204 as well. A 404 means the request path did not match a delete route, not +that the target was missing. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerApi(api_client) + session_id = 'a3569608-10e1-41c7-99fa-1a7d1f336c58' # str | Webplayer session identifier. + + try: + # Delete a webplayer session + api_instance.v3_delete_web_player_session(session_id) + except Exception as e: + print("Exception when calling WebPlayerApi->v3_delete_web_player_session: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **session_id** | **str**| Webplayer session identifier. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Session torn down, or no such session; empty body. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_web_player_allowed_domains** +> WebPlayerAllowedDomains v3_get_web_player_allowed_domains() + +Get allowed webplayer domains + +Returns the website domains configured for embedding the Web Player (`webplayer.allowedDomains` in your domain settings). Change the list with `PATCH /v3/domain`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.web_player_allowed_domains import WebPlayerAllowedDomains +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerApi(api_client) + + try: + # Get allowed webplayer domains + api_response = api_instance.v3_get_web_player_allowed_domains() + print("The response of WebPlayerApi->v3_get_web_player_allowed_domains:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPlayerApi->v3_get_web_player_allowed_domains: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**WebPlayerAllowedDomains**](WebPlayerAllowedDomains.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Allowed domains. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_web_player_session** +> List[WebPlayerSession] v3_get_web_player_session(session_id) + +Get a webplayer session + +**Required role:** Domain administrator. + +Returns one Web Player session, including its token and expiration. Requires a domain administrator. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.web_player_session import WebPlayerSession +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerApi(api_client) + session_id = 'a3569608-10e1-41c7-99fa-1a7d1f336c58' # str | Webplayer session identifier. + + try: + # Get a webplayer session + api_response = api_instance.v3_get_web_player_session(session_id) + print("The response of WebPlayerApi->v3_get_web_player_session:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPlayerApi->v3_get_web_player_session: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **session_id** | **str**| Webplayer session identifier. | + +### Return type + +[**List[WebPlayerSession]**](WebPlayerSession.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The webplayer session. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | +**404** | No session with the given sessionId. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_list_web_player_sessions** +> WebPlayerSessionListResponse v3_list_web_player_sessions(limit=limit, offset=offset) + +List webplayer sessions + +**Required role:** Domain administrator. + +Lists the Web Player sessions in your domain, with each session's ID, token and expiration. Requires a domain administrator. Results are paginated with `limit` and `offset`. + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.web_player_session_list_response import WebPlayerSessionListResponse +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerApi(api_client) + limit = 100 # float | Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. (optional) (default to 100) + offset = 0 # float | How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. (optional) (default to 0) + + try: + # List webplayer sessions + api_response = api_instance.v3_list_web_player_sessions(limit=limit, offset=offset) + print("The response of WebPlayerApi->v3_list_web_player_sessions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPlayerApi->v3_list_web_player_sessions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **float**| Most results to return in one page. Whole number from 1 to 1000; defaults to 100. A value outside that range is rejected with 400. | [optional] [default to 100] + **offset** | **float**| How many results to skip before this page starts; defaults to 0. To get the next page, add `limit` to the previous `offset`. | [optional] [default to 0] + +### Return type + +[**WebPlayerSessionListResponse**](WebPlayerSessionListResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated list of webplayer sessions. | - | +**400** | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - | +**401** | Not signed in: the `Authorization: Bearer <token>` header is missing, or the token is invalid or expired. Get a new token and retry. | - | +**403** | Domain administrator permissions required. Signed in, but not allowed to do this: you lack the required role, have no access to the project, or your license does not include the feature. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/WebPlayerCreateSessionRequest.md b/docs/WebPlayerCreateSessionRequest.md index d5e8133..aeccfed 100644 --- a/docs/WebPlayerCreateSessionRequest.md +++ b/docs/WebPlayerCreateSessionRequest.md @@ -3,6 +3,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **project_id** | **str** | Project Identifier | @@ -11,6 +12,23 @@ Name | Type | Description | Notes **features** | [**Features**](Features.md) | | **client_id** | **str** | Optional string value supplied by client for tracking purposes | [optional] +## Example + +```python +from corellium.models.web_player_create_session_request import WebPlayerCreateSessionRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of WebPlayerCreateSessionRequest from a JSON string +web_player_create_session_request_instance = WebPlayerCreateSessionRequest.from_json(json) +# print the JSON string representation of the object +print(WebPlayerCreateSessionRequest.to_json()) + +# convert the object into a dict +web_player_create_session_request_dict = web_player_create_session_request_instance.to_dict() +# create an instance of WebPlayerCreateSessionRequest from a dict +web_player_create_session_request_from_dict = WebPlayerCreateSessionRequest.from_dict(web_player_create_session_request_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebPlayerCreatedSession.md b/docs/WebPlayerCreatedSession.md new file mode 100644 index 0000000..12a925b --- /dev/null +++ b/docs/WebPlayerCreatedSession.md @@ -0,0 +1,34 @@ +# WebPlayerCreatedSession + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | Session identifier. | +**token** | **str** | Session token to hand to the Web Player in your page. It grants access only to this one device and only to the enabled features, until `expiration`. | +**expiration** | **datetime** | Session expiration timestamp. | +**domain** | [**WebPlayerSessionDomain**](WebPlayerSessionDomain.md) | | [optional] +**time** | **float** | Server timestamp (ms) when the session was created. | [optional] +**disabled** | **bool** | Present and set when the domain is disabled (public flag). | [optional] + +## Example + +```python +from corellium.models.web_player_created_session import WebPlayerCreatedSession + +# TODO update the JSON string below +json = "{}" +# create an instance of WebPlayerCreatedSession from a JSON string +web_player_created_session_instance = WebPlayerCreatedSession.from_json(json) +# print the JSON string representation of the object +print(WebPlayerCreatedSession.to_json()) + +# convert the object into a dict +web_player_created_session_dict = web_player_created_session_instance.to_dict() +# create an instance of WebPlayerCreatedSession from a dict +web_player_created_session_from_dict = WebPlayerCreatedSession.from_dict(web_player_created_session_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebPlayerFeatures.md b/docs/WebPlayerFeatures.md new file mode 100644 index 0000000..2759f3b --- /dev/null +++ b/docs/WebPlayerFeatures.md @@ -0,0 +1,49 @@ +# WebPlayerFeatures + +Which parts of the device interface the viewer may use, for example `apps`, `files` or `console`. Only features set to true are available in the session. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apps** | **bool** | Whether the viewer may use the apps part of the device interface. Features left out are off. | [optional] +**connect** | **bool** | Whether the viewer may use the connect part of the device interface. Features left out are off. | [optional] +**console** | **bool** | Whether the viewer may use the console part of the device interface. Features left out are off. | [optional] +**coretrace** | **bool** | Whether the viewer may use the coretrace part of the device interface. Features left out are off. | [optional] +**device_control** | **bool** | Whether the viewer may use the deviceControl part of the device interface. Features left out are off. | [optional] +**device_delete** | **bool** | Whether the viewer may use the deviceDelete part of the device interface. Features left out are off. | [optional] +**files** | **bool** | Whether the viewer may use the files part of the device interface. Features left out are off. | [optional] +**frida** | **bool** | Whether the viewer may use the frida part of the device interface. Features left out are off. | [optional] +**images** | **bool** | Whether the viewer may use the images part of the device interface. Features left out are off. | [optional] +**messaging** | **bool** | Whether the viewer may use the messaging part of the device interface. Features left out are off. | [optional] +**netmon** | **bool** | Whether the viewer may use the netmon part of the device interface. Features left out are off. | [optional] +**network** | **bool** | Whether the viewer may use the network part of the device interface. Features left out are off. | [optional] +**port_forwarding** | **bool** | Whether the viewer may use the portForwarding part of the device interface. Features left out are off. | [optional] +**power_management** | **bool** | Whether the viewer may use the powerManagement part of the device interface. Features left out are off. | [optional] +**profile** | **bool** | Whether the viewer may use the profile part of the device interface. Features left out are off. | [optional] +**sensors** | **bool** | Whether the viewer may use the sensors part of the device interface. Features left out are off. | [optional] +**settings** | **bool** | Whether the viewer may use the settings part of the device interface. Features left out are off. | [optional] +**snapshots** | **bool** | Whether the viewer may use the snapshots part of the device interface. Features left out are off. | [optional] +**strace** | **bool** | Whether the viewer may use the strace part of the device interface. Features left out are off. | [optional] +**system** | **bool** | Whether the viewer may use the system part of the device interface. Features left out are off. | [optional] + +## Example + +```python +from corellium.models.web_player_features import WebPlayerFeatures + +# TODO update the JSON string below +json = "{}" +# create an instance of WebPlayerFeatures from a JSON string +web_player_features_instance = WebPlayerFeatures.from_json(json) +# print the JSON string representation of the object +print(WebPlayerFeatures.to_json()) + +# convert the object into a dict +web_player_features_dict = web_player_features_instance.to_dict() +# create an instance of WebPlayerFeatures from a dict +web_player_features_from_dict = WebPlayerFeatures.from_dict(web_player_features_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebPlayerSession.md b/docs/WebPlayerSession.md index 0822bd0..cbcfd0a 100644 --- a/docs/WebPlayerSession.md +++ b/docs/WebPlayerSession.md @@ -1,14 +1,31 @@ # WebPlayerSession - ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**identifier** | **str** | New Session Identifier | -**token** | **str** | Session Token | -**expiration** | **float** | Expiration in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | +**identifier** | **str** | Session identifier. | +**token** | **str** | Session token to hand to the Web Player in your page. It grants access only to this one device and only to the enabled features, until `expiration`. | +**expiration** | **datetime** | Session expiration timestamp. | + +## Example + +```python +from corellium.models.web_player_session import WebPlayerSession + +# TODO update the JSON string below +json = "{}" +# create an instance of WebPlayerSession from a JSON string +web_player_session_instance = WebPlayerSession.from_json(json) +# print the JSON string representation of the object +print(WebPlayerSession.to_json()) +# convert the object into a dict +web_player_session_dict = web_player_session_instance.to_dict() +# create an instance of WebPlayerSession from a dict +web_player_session_from_dict = WebPlayerSession.from_dict(web_player_session_dict) +``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebPlayerSessionDomain.md b/docs/WebPlayerSessionDomain.md new file mode 100644 index 0000000..1b5271d --- /dev/null +++ b/docs/WebPlayerSessionDomain.md @@ -0,0 +1,35 @@ +# WebPlayerSessionDomain + +Domain configuration for the session. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Domain name. | +**label** | **str** | Domain description/label. | [optional] +**terms_policy** | **str** | Domain terms policy. | [optional] +**cores** | **float** | Core quota for the domain. | [optional] +**individual** | **bool** | Whether the domain is an individual account nested under an aggregate parent domain. | [optional] +**totp_required** | **bool** | Whether two-factor is required for the domain. | [optional] + +## Example + +```python +from corellium.models.web_player_session_domain import WebPlayerSessionDomain + +# TODO update the JSON string below +json = "{}" +# create an instance of WebPlayerSessionDomain from a JSON string +web_player_session_domain_instance = WebPlayerSessionDomain.from_json(json) +# print the JSON string representation of the object +print(WebPlayerSessionDomain.to_json()) + +# convert the object into a dict +web_player_session_domain_dict = web_player_session_domain_instance.to_dict() +# create an instance of WebPlayerSessionDomain from a dict +web_player_session_domain_from_dict = WebPlayerSessionDomain.from_dict(web_player_session_domain_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebPlayerSessionListResponse.md b/docs/WebPlayerSessionListResponse.md new file mode 100644 index 0000000..96a0d05 --- /dev/null +++ b/docs/WebPlayerSessionListResponse.md @@ -0,0 +1,34 @@ +# WebPlayerSessionListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[WebPlayerSession]**](WebPlayerSession.md) | Webplayer sessions. | +**count** | **float** | Number of results in this page. Can be less than `limit` on the last page. | +**total** | **float** | Number of results across all pages, after any filters. | +**limit** | **float** | The page size that was used (your `limit`, or the default 100). | +**offset** | **float** | The offset that was used (your `offset`, or the default 0). | +**has_more** | **bool** | True if more results exist after this page. To read everything, keep requesting with `offset` increased by `limit` until this is false. | + +## Example + +```python +from corellium.models.web_player_session_list_response import WebPlayerSessionListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of WebPlayerSessionListResponse from a JSON string +web_player_session_list_response_instance = WebPlayerSessionListResponse.from_json(json) +# print the JSON string representation of the object +print(WebPlayerSessionListResponse.to_json()) + +# convert the object into a dict +web_player_session_list_response_dict = web_player_session_list_response_instance.to_dict() +# create an instance of WebPlayerSessionListResponse from a dict +web_player_session_list_response_from_dict = WebPlayerSessionListResponse.from_dict(web_player_session_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebPlayerSessionV1.md b/docs/WebPlayerSessionV1.md new file mode 100644 index 0000000..9ecddba --- /dev/null +++ b/docs/WebPlayerSessionV1.md @@ -0,0 +1,32 @@ +# WebPlayerSessionV1 + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identifier** | **str** | New Session Identifier | +**token** | **str** | Session Token | +**expiration** | **float** | Expiration in ISO-8601 format e.g. 2022-05-06T02:39:23.000Z | + +## Example + +```python +from corellium.models.web_player_session_v1 import WebPlayerSessionV1 + +# TODO update the JSON string below +json = "{}" +# create an instance of WebPlayerSessionV1 from a JSON string +web_player_session_v1_instance = WebPlayerSessionV1.from_json(json) +# print the JSON string representation of the object +print(WebPlayerSessionV1.to_json()) + +# convert the object into a dict +web_player_session_v1_dict = web_player_session_v1_instance.to_dict() +# create an instance of WebPlayerSessionV1 from a dict +web_player_session_v1_from_dict = WebPlayerSessionV1.from_dict(web_player_session_v1_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebPlayerV1Api.md b/docs/WebPlayerV1Api.md new file mode 100644 index 0000000..4eec47e --- /dev/null +++ b/docs/WebPlayerV1Api.md @@ -0,0 +1,430 @@ +# corellium.WebPlayerV1Api + +## Request timeouts + +Every API method accepts `_request_timeout` in seconds: a positive float for +the urllib3 total timeout, or a pair of positive floats `(connect, read)`. +This controls HTTP transport waiting, not how long the server operation may run. +It is not a wall-clock deadline for the operation or for all retries combined. + +Transport timeouts raise `urllib3.exceptions.TimeoutError` subclasses such as +`ReadTimeoutError` and `ConnectTimeoutError`. When retries are exhausted, urllib3 +can instead raise `urllib3.exceptions.MaxRetryError`; inspect its `reason` to +distinguish a timeout from other connection failures. Retry behavior depends on +the HTTP method and `Configuration.retries`. These are client-side exceptions, +not HTTP response statuses or SDK `ApiException` responses. + +A timeout does not guarantee cancellation or rollback of an operation accepted by the server. +For example, after a start request times out, the instance may still be starting +or may already be running; the timeout alone does not establish its state or +mean it was stopped or destroyed. The request might not have reached the server +at all, leaving the instance off. Treat the outcome as unknown and fetch the +instance's current state before deciding whether to retry. If it has since been +destroyed, that lookup may return not found; the timeout itself does not prove +destruction. Do not blindly repeat a state-changing request. + +Catch `urllib3.exceptions.TimeoutError` and `urllib3.exceptions.MaxRetryError` +separately from the SDK `ApiException`. `MaxRetryError` is not a subclass of +`TimeoutError`. With +`_with_http_info` the same rules apply. With `_without_preload_content`, a read +timeout may also occur later when reading the returned response body. + + +All URIs are relative to *https://app.corellium.com/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v1_web_player_allowed_domains**](WebPlayerV1Api.md#v1_web_player_allowed_domains) | **GET** /v1/webplayer/allowedDomains | Retrieve the list of allowed domains for all Webplayer sessions +[**v1_web_player_create_session**](WebPlayerV1Api.md#v1_web_player_create_session) | **POST** /v1/webplayer | Create a new Webplayer Session +[**v1_web_player_destroy_session**](WebPlayerV1Api.md#v1_web_player_destroy_session) | **DELETE** /v1/webplayer/{sessionId} | Tear down a Webplayer Session +[**v1_web_player_list_sessions**](WebPlayerV1Api.md#v1_web_player_list_sessions) | **GET** /v1/webplayer | List all Webplayer sessions +[**v1_web_player_session_info**](WebPlayerV1Api.md#v1_web_player_session_info) | **GET** /v1/webplayer/{sessionId} | Retrieve Webplayer Session Information + + +# **v1_web_player_allowed_domains** +> v1_web_player_allowed_domains() + +Retrieve the list of allowed domains for all Webplayer sessions + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerV1Api(api_client) + + try: + # Retrieve the list of allowed domains for all Webplayer sessions + api_instance.v1_web_player_allowed_domains() + except Exception as e: + print("Exception when calling WebPlayerV1Api->v1_web_player_allowed_domains: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_web_player_create_session** +> WebPlayerSessionV1 v1_web_player_create_session(web_player_create_session_request) + +Create a new Webplayer Session + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.web_player_create_session_request import WebPlayerCreateSessionRequest +from corellium.models.web_player_session_v1 import WebPlayerSessionV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerV1Api(api_client) + web_player_create_session_request = { + "projectId": "0fc719fc-335d-458c-a424-51a550a73d12", + "instanceId": "fbd94550-3f74-4d46-a6ed-c26cbfb23340", + "expiresIn": 18000, + "features": { + "apps": true, + "files": true + } +} # WebPlayerCreateSessionRequest | Request Data + + try: + # Create a new Webplayer Session + api_response = api_instance.v1_web_player_create_session(web_player_create_session_request) + print("The response of WebPlayerV1Api->v1_web_player_create_session:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPlayerV1Api->v1_web_player_create_session: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **web_player_create_session_request** | [**WebPlayerCreateSessionRequest**](WebPlayerCreateSessionRequest.md)| Request Data | + +### Return type + +[**WebPlayerSessionV1**](WebPlayerSessionV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_web_player_destroy_session** +> List[str] v1_web_player_destroy_session(session_id) + +Tear down a Webplayer Session + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerV1Api(api_client) + session_id = 'session_id_example' # str | Webplayer Session identifier + + try: + # Tear down a Webplayer Session + api_response = api_instance.v1_web_player_destroy_session(session_id) + print("The response of WebPlayerV1Api->v1_web_player_destroy_session:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPlayerV1Api->v1_web_player_destroy_session: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **session_id** | **str**| Webplayer Session identifier | + +### Return type + +**List[str]** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_web_player_list_sessions** +> List[WebPlayerSessionV1] v1_web_player_list_sessions() + +List all Webplayer sessions + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.web_player_session_v1 import WebPlayerSessionV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerV1Api(api_client) + + try: + # List all Webplayer sessions + api_response = api_instance.v1_web_player_list_sessions() + print("The response of WebPlayerV1Api->v1_web_player_list_sessions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPlayerV1Api->v1_web_player_list_sessions: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[WebPlayerSessionV1]**](WebPlayerSessionV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v1_web_player_session_info** +> WebPlayerSessionV1 v1_web_player_session_info(session_id) + +Retrieve Webplayer Session Information + +### Example + +* Bearer (JWT) Authentication (BearerAuth): + +```python +import corellium +from corellium.models.web_player_session_v1 import WebPlayerSessionV1 +from corellium.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.corellium.com/api +# See configuration.py for a list of all supported configuration parameters. +configuration = corellium.Configuration( + host = "https://app.corellium.com/api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization (JWT): BearerAuth +configuration = corellium.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with corellium.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = corellium.WebPlayerV1Api(api_client) + session_id = 'session_id_example' # str | Webplayer Session identifier + + try: + # Retrieve Webplayer Session Information + api_response = api_instance.v1_web_player_session_info(session_id) + print("The response of WebPlayerV1Api->v1_web_player_session_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPlayerV1Api->v1_web_player_session_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **session_id** | **str**| Webplayer Session identifier | + +### Return type + +[**WebPlayerSessionV1**](WebPlayerSessionV1.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..4f835e9 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="corellium" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="corellium-python-api-client" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c2853e1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,95 @@ +[project] +name = "corellium-api-client" +version = "1.0.0" +description = "Corellium API" +authors = [ + {name = "Corellium",email = "support@corellium.com"}, +] +license = {text = "Apache-2.0"} +readme = "README.md" +keywords = ["OpenAPI", "OpenAPI-Generator", "Corellium API"] +requires-python = ">=3.9" + +dependencies = [ + "urllib3 (>=2.1.0,<3.0.0)", + "python-dateutil (>=2.8.2)", + "pydantic (>=2)", + "typing-extensions (>=4.7.1)" +] + +[project.urls] +Repository = "https://github.com/corellium/corellium-python-api-client" + +[tool.poetry] +requires-poetry = ">=2.0" + +[tool.poetry.group.dev.dependencies] +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "corellium", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +extra_checks = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "corellium.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/requirements.txt b/requirements.txt index 7e7e63b..6cbb2b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ -future; python_version<="2.7" -six >= 1.10 -python_dateutil >= 2.9 -setuptools >= 80.0 -urllib3 >= 1.26.20 +urllib3 >= 2.1.0, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/setup.py b/setup.py index 8a0dc5a..91cf0b0 100644 --- a/setup.py +++ b/setup.py @@ -3,40 +3,49 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 from setuptools import setup, find_packages # noqa: H301 -NAME = "corellium-api" -VERSION = "0.4.2" # To install the library, run the following # # python setup.py install # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools - -REQUIRES = ["urllib3 >= 1.25.3", "six >= 1.10", "python-dateutil"] -REQUIRES.append("aiohttp >= 3.0.0") +NAME = "corellium-api-client" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">= 3.9" +REQUIRES = [ + "urllib3 >= 2.1.0, < 3.0.0", + "python-dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] setup( name=NAME, version=VERSION, description="Corellium API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="", + author="Corellium", + author_email="support@corellium.com", + url="https://github.com/corellium/corellium-python-api-client", keywords=["OpenAPI", "OpenAPI-Generator", "Corellium API"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description_content_type='text/markdown', long_description="""\ - REST API to manage your virtual devices. # noqa: E501 - """ -) + REST API to manage your virtual devices. + """, # noqa: E501 + package_data={"corellium": ["py.typed"]}, +) \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt index 4ed3991..e98555c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,6 @@ -pytest~=4.6.7 # needed for python 2.7+3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 2.7+3.4 +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 diff --git a/test/test_accept_snapshot_body.py b/test/test_accept_snapshot_body.py new file mode 100644 index 0000000..6e4d774 --- /dev/null +++ b/test/test_accept_snapshot_body.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.accept_snapshot_body import AcceptSnapshotBody + +class TestAcceptSnapshotBody(unittest.TestCase): + """AcceptSnapshotBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AcceptSnapshotBody: + """Test AcceptSnapshotBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AcceptSnapshotBody` + """ + model = AcceptSnapshotBody() + if include_optional: + return AcceptSnapshotBody( + access_code = 'X7QK9P2M', + password = '' + ) + else: + return AcceptSnapshotBody( + access_code = 'X7QK9P2M', + ) + """ + + def testAcceptSnapshotBody(self): + """Test AcceptSnapshotBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_accept_snapshot_request_payload.py b/test/test_accept_snapshot_request_payload.py new file mode 100644 index 0000000..8b0edce --- /dev/null +++ b/test/test_accept_snapshot_request_payload.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.accept_snapshot_request_payload import AcceptSnapshotRequestPayload + +class TestAcceptSnapshotRequestPayload(unittest.TestCase): + """AcceptSnapshotRequestPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AcceptSnapshotRequestPayload: + """Test AcceptSnapshotRequestPayload + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AcceptSnapshotRequestPayload` + """ + model = AcceptSnapshotRequestPayload() + if include_optional: + return AcceptSnapshotRequestPayload( + access_code = '', + password = '' + ) + else: + return AcceptSnapshotRequestPayload( + access_code = '', + ) + """ + + def testAcceptSnapshotRequestPayload(self): + """Test AcceptSnapshotRequestPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_account_setup_response.py b/test/test_account_setup_response.py new file mode 100644 index 0000000..7235b7f --- /dev/null +++ b/test/test_account_setup_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.account_setup_response import AccountSetupResponse + +class TestAccountSetupResponse(unittest.TestCase): + """AccountSetupResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountSetupResponse: + """Test AccountSetupResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountSetupResponse` + """ + model = AccountSetupResponse() + if include_optional: + return AccountSetupResponse( + success = True + ) + else: + return AccountSetupResponse( + success = True, + ) + """ + + def testAccountSetupResponse(self): + """Test AccountSetupResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity.py b/test/test_activity.py index 1dcb301..dc9da4a 100644 --- a/test/test_activity.py +++ b/test/test_activity.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.activity import Activity # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.activity import Activity class TestActivity(unittest.TestCase): """Activity unit test stubs""" @@ -28,34 +26,48 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Activity: """Test Activity - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.activity.Activity() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Activity` + """ + model = Activity() + if include_optional: return Activity( - identifier = '', - domain = '', - actor = '', - event = '', - outcome = '', - metadata = None, - corellium_version = '', - project_id = '', - instance_id = '', - created_at = '', - updated_at = '' + identifier = '5927ac2a-fdd4-4ab5-860f-28eec3511028', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + actor = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + event = 'domain.config.device_auto_shutdown', + outcome = 'success', + metadata = {"name":"My iPhone 13 Pro"}, + corellium_version = '7.4.0-28212', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' ) - else : + else: return Activity( + identifier = '5927ac2a-fdd4-4ab5-860f-28eec3511028', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + actor = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + event = 'domain.config.device_auto_shutdown', + outcome = 'success', + metadata = {"name":"My iPhone 13 Pro"}, + corellium_version = '7.4.0-28212', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + """ def testActivity(self): """Test Activity""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_activity_api.py b/test/test_activity_api.py new file mode 100644 index 0000000..b995a62 --- /dev/null +++ b/test/test_activity_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.activity_api import ActivityApi + + +class TestActivityApi(unittest.TestCase): + """ActivityApi unit test stubs""" + + def setUp(self) -> None: + self.api = ActivityApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_activity_export(self) -> None: + """Test case for v3_create_activity_export + + Start activity export + """ + pass + + def test_v3_download_activity(self) -> None: + """Test case for v3_download_activity + + Download activity for a given task + """ + pass + + def test_v3_get_activity_export_status(self) -> None: + """Test case for v3_get_activity_export_status + + Get export task status + """ + pass + + def test_v3_get_activity_export_tasks(self) -> None: + """Test case for v3_get_activity_export_tasks + + Get all export tasks for user + """ + pass + + def test_v3_list_activities(self) -> None: + """Test case for v3_list_activities + + Get resource activities + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_export_dto.py b/test/test_activity_export_dto.py index be2699a..937b7cf 100644 --- a/test/test_activity_export_dto.py +++ b/test/test_activity_export_dto.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.activity_export_dto import ActivityExportDto # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.activity_export_dto import ActivityExportDto class TestActivityExportDto(unittest.TestCase): """ActivityExportDto unit test stubs""" @@ -28,31 +26,34 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ActivityExportDto: """Test ActivityExportDto - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.activity_export_dto.ActivityExportDto() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ActivityExportDto` + """ + model = ActivityExportDto() + if include_optional: return ActivityExportDto( - resource = '', - order_by = '', - instance = '', - project = '', - actor = '', - search = '', - to = '', - _from = '' + resource = '', + order_by = '', + instance = '', + project = '', + actor = '', + search = '', + to = '', + var_from = '' ) - else : + else: return ActivityExportDto( ) + """ def testActivityExportDto(self): """Test ActivityExportDto""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_activity_export_format.py b/test/test_activity_export_format.py new file mode 100644 index 0000000..41771b7 --- /dev/null +++ b/test/test_activity_export_format.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.activity_export_format import ActivityExportFormat + +class TestActivityExportFormat(unittest.TestCase): + """ActivityExportFormat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testActivityExportFormat(self): + """Test ActivityExportFormat""" + # inst = ActivityExportFormat() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_export_response.py b/test/test_activity_export_response.py index 2c8141b..d737735 100644 --- a/test/test_activity_export_response.py +++ b/test/test_activity_export_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.activity_export_response import ActivityExportResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.activity_export_response import ActivityExportResponse class TestActivityExportResponse(unittest.TestCase): """ActivityExportResponse unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ActivityExportResponse: """Test ActivityExportResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.activity_export_response.ActivityExportResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ActivityExportResponse` + """ + model = ActivityExportResponse() + if include_optional: return ActivityExportResponse( id = '' ) - else : + else: return ActivityExportResponse( id = '', ) + """ def testActivityExportResponse(self): """Test ActivityExportResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_activity_export_status.py b/test/test_activity_export_status.py new file mode 100644 index 0000000..132b2ec --- /dev/null +++ b/test/test_activity_export_status.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.activity_export_status import ActivityExportStatus + +class TestActivityExportStatus(unittest.TestCase): + """ActivityExportStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActivityExportStatus: + """Test ActivityExportStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActivityExportStatus` + """ + model = ActivityExportStatus() + if include_optional: + return ActivityExportStatus( + status = 'in-progress' + ) + else: + return ActivityExportStatus( + status = 'in-progress', + ) + """ + + def testActivityExportStatus(self): + """Test ActivityExportStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_export_task.py b/test/test_activity_export_task.py new file mode 100644 index 0000000..6ff38f2 --- /dev/null +++ b/test/test_activity_export_task.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.activity_export_task import ActivityExportTask + +class TestActivityExportTask(unittest.TestCase): + """ActivityExportTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActivityExportTask: + """Test ActivityExportTask + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActivityExportTask` + """ + model = ActivityExportTask() + if include_optional: + return ActivityExportTask( + identifier = 'activity-export/722cdce5-6f71-4f4a-b2b6-c00f11c015f6', + scheduled_at = '2026-03-14T09:12:47Z', + status = 'in-progress', + args = {"handlerName":"activity-export","exportType":"text/csv","domainId":"c29762d1-45d7-489d-a3a2-9dadc43978ba","userId":"e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320","apiVersion":"v3"}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return ActivityExportTask( + identifier = 'activity-export/722cdce5-6f71-4f4a-b2b6-c00f11c015f6', + scheduled_at = '2026-03-14T09:12:47Z', + status = 'in-progress', + args = {"handlerName":"activity-export","exportType":"text/csv","domainId":"c29762d1-45d7-489d-a3a2-9dadc43978ba","userId":"e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320","apiVersion":"v3"}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testActivityExportTask(self): + """Test ActivityExportTask""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_export_task_list.py b/test/test_activity_export_task_list.py new file mode 100644 index 0000000..0476c97 --- /dev/null +++ b/test/test_activity_export_task_list.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.activity_export_task_list import ActivityExportTaskList + +class TestActivityExportTaskList(unittest.TestCase): + """ActivityExportTaskList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActivityExportTaskList: + """Test ActivityExportTaskList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActivityExportTaskList` + """ + model = ActivityExportTaskList() + if include_optional: + return ActivityExportTaskList( + results = [ + corellium.models.activity_export_task.ActivityExportTask( + identifier = 'activity-export/722cdce5-6f71-4f4a-b2b6-c00f11c015f6', + scheduled_at = '2026-03-14T09:12:47Z', + status = 'in-progress', + args = {"handlerName":"activity-export","exportType":"text/csv","domainId":"c29762d1-45d7-489d-a3a2-9dadc43978ba","userId":"e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320","apiVersion":"v3"}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return ActivityExportTaskList( + results = [ + corellium.models.activity_export_task.ActivityExportTask( + identifier = 'activity-export/722cdce5-6f71-4f4a-b2b6-c00f11c015f6', + scheduled_at = '2026-03-14T09:12:47Z', + status = 'in-progress', + args = {"handlerName":"activity-export","exportType":"text/csv","domainId":"c29762d1-45d7-489d-a3a2-9dadc43978ba","userId":"e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320","apiVersion":"v3"}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testActivityExportTaskList(self): + """Test ActivityExportTaskList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_list.py b/test/test_activity_list.py index 1a9dced..5ef6b2a 100644 --- a/test/test_activity_list.py +++ b/test/test_activity_list.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.activity_list import ActivityList # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.activity_list import ActivityList class TestActivityList(unittest.TestCase): """ActivityList unit test stubs""" @@ -28,42 +26,45 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ActivityList: """Test ActivityList - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.activity_list.ActivityList() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ActivityList` + """ + model = ActivityList() + if include_optional: return ActivityList( data = [ - corellium_api.models.activity.Activity( + corellium.models.activity_v1.ActivityV1( identifier = '', domain = '', actor = '', event = '', outcome = '', - metadata = corellium_api.models.metadata.metadata(), + metadata = corellium.models.metadata.metadata(), corellium_version = '', project_id = '', instance_id = '', created_at = '', updated_at = '', ) - ], - pagination = corellium_api.models.pagination.Pagination( + ], + pagination = corellium.models.pagination.Pagination( current_page = 1.337, total_pages = 1.337, total_items = 1.337, items_per_page = 1.337, ) ) - else : + else: return ActivityList( ) + """ def testActivityList(self): """Test ActivityList""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_activity_list_response.py b/test/test_activity_list_response.py new file mode 100644 index 0000000..e14dab6 --- /dev/null +++ b/test/test_activity_list_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.activity_list_response import ActivityListResponse + +class TestActivityListResponse(unittest.TestCase): + """ActivityListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActivityListResponse: + """Test ActivityListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActivityListResponse` + """ + model = ActivityListResponse() + if include_optional: + return ActivityListResponse( + results = [ + corellium.models.activity.Activity( + identifier = '5927ac2a-fdd4-4ab5-860f-28eec3511028', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + actor = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + event = 'domain.config.device_auto_shutdown', + outcome = 'success', + metadata = {"name":"My iPhone 13 Pro"}, + corellium_version = '7.4.0-28212', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return ActivityListResponse( + results = [ + corellium.models.activity.Activity( + identifier = '5927ac2a-fdd4-4ab5-860f-28eec3511028', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + actor = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + event = 'domain.config.device_auto_shutdown', + outcome = 'success', + metadata = {"name":"My iPhone 13 Pro"}, + corellium_version = '7.4.0-28212', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testActivityListResponse(self): + """Test ActivityListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_request.py b/test/test_activity_request.py index fc50bd1..d3f113d 100644 --- a/test/test_activity_request.py +++ b/test/test_activity_request.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.activity_request import ActivityRequest # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.activity_request import ActivityRequest class TestActivityRequest(unittest.TestCase): """ActivityRequest unit test stubs""" @@ -28,33 +26,36 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ActivityRequest: """Test ActivityRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.activity_request.ActivityRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ActivityRequest` + """ + model = ActivityRequest() + if include_optional: return ActivityRequest( - resource = '', - limit = 1.337, - order_by = '', - page = 1.337, - instance = '', - project = '', - actor = '', - search = '', - to = '', - _from = '' + resource = '', + limit = 1.337, + order_by = '', + page = 1.337, + instance = '', + project = '', + actor = '', + search = '', + to = '', + var_from = '' ) - else : + else: return ActivityRequest( ) + """ def testActivityRequest(self): """Test ActivityRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_activity_resource_not_starts_with_filter.py b/test/test_activity_resource_not_starts_with_filter.py new file mode 100644 index 0000000..045fc30 --- /dev/null +++ b/test/test_activity_resource_not_starts_with_filter.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.activity_resource_not_starts_with_filter import ActivityResourceNotStartsWithFilter + +class TestActivityResourceNotStartsWithFilter(unittest.TestCase): + """ActivityResourceNotStartsWithFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActivityResourceNotStartsWithFilter: + """Test ActivityResourceNotStartsWithFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActivityResourceNotStartsWithFilter` + """ + model = ActivityResourceNotStartsWithFilter() + if include_optional: + return ActivityResourceNotStartsWithFilter( + starts_with = None + ) + else: + return ActivityResourceNotStartsWithFilter( + starts_with = None, + ) + """ + + def testActivityResourceNotStartsWithFilter(self): + """Test ActivityResourceNotStartsWithFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_resource_starts_with_filter.py b/test/test_activity_resource_starts_with_filter.py new file mode 100644 index 0000000..533df2a --- /dev/null +++ b/test/test_activity_resource_starts_with_filter.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.activity_resource_starts_with_filter import ActivityResourceStartsWithFilter + +class TestActivityResourceStartsWithFilter(unittest.TestCase): + """ActivityResourceStartsWithFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActivityResourceStartsWithFilter: + """Test ActivityResourceStartsWithFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActivityResourceStartsWithFilter` + """ + model = ActivityResourceStartsWithFilter() + if include_optional: + return ActivityResourceStartsWithFilter( + starts_with = None + ) + else: + return ActivityResourceStartsWithFilter( + starts_with = None, + ) + """ + + def testActivityResourceStartsWithFilter(self): + """Test ActivityResourceStartsWithFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_v1.py b/test/test_activity_v1.py new file mode 100644 index 0000000..b54d6e8 --- /dev/null +++ b/test/test_activity_v1.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.activity_v1 import ActivityV1 + +class TestActivityV1(unittest.TestCase): + """ActivityV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ActivityV1: + """Test ActivityV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ActivityV1` + """ + model = ActivityV1() + if include_optional: + return ActivityV1( + identifier = '', + domain = '', + actor = '', + event = '', + outcome = '', + metadata = corellium.models.metadata.metadata(), + corellium_version = '', + project_id = '', + instance_id = '', + created_at = '', + updated_at = '' + ) + else: + return ActivityV1( + ) + """ + + def testActivityV1(self): + """Test ActivityV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_activity_v1_api.py b/test/test_activity_v1_api.py new file mode 100644 index 0000000..2eb53cb --- /dev/null +++ b/test/test_activity_v1_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.activity_v1_api import ActivityV1Api + + +class TestActivityV1Api(unittest.TestCase): + """ActivityV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = ActivityV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_activity_export(self) -> None: + """Test case for v1_activity_export + + Start activity export + """ + pass + + def test_v1_activity_list(self) -> None: + """Test case for v1_activity_list + + Get resource activities + """ + pass + + def test_v1_download_activity(self) -> None: + """Test case for v1_download_activity + + Download activity + """ + pass + + def test_v1_get_activity_export_status(self) -> None: + """Test case for v1_get_activity_export_status + + Get export task status + """ + pass + + def test_v1_get_activity_export_tasks(self) -> None: + """Test case for v1_get_activity_export_tasks + + Get all export tasks for user + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_address.py b/test/test_address.py index 96c9db4..29afda1 100644 --- a/test/test_address.py +++ b/test/test_address.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.address import Address # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.address import Address class TestAddress(unittest.TestCase): """Address unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Address: """Test Address - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.address.Address() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Address` + """ + model = Address() + if include_optional: return Address( - address1 = '', - address2 = '', - city = '', - country = '', - postal_code = '', + address1 = '', + address2 = '', + city = '', + country = '', + postal_code = '', state = '' ) - else : + else: return Address( ) + """ def testAddress(self): """Test Address""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_api.py b/test/test_agent_api.py new file mode 100644 index 0000000..2292f7d --- /dev/null +++ b/test/test_agent_api.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.agent_api import AgentApi + + +class TestAgentApi(unittest.TestCase): + """AgentApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentApi() + + def tearDown(self) -> None: + pass + + def test_v3_delete_file_agent(self) -> None: + """Test case for v3_delete_file_agent + + Delete a file on VM + """ + pass + + def test_v3_get_adb_auth_agent(self) -> None: + """Test case for v3_get_adb_auth_agent + + Get ADB auth setting + """ + pass + + def test_v3_get_app_ready_agent(self) -> None: + """Test case for v3_get_app_ready_agent + + Check if app subsystem is ready + """ + pass + + def test_v3_get_container_health_agent(self) -> None: + """Test case for v3_get_container_health_agent + + Get container health + """ + pass + + def test_v3_get_file_agent(self) -> None: + """Test case for v3_get_file_agent + + Download a file from VM + """ + pass + + def test_v3_get_network_agent(self) -> None: + """Test case for v3_get_network_agent + + Get eth0 IP address + """ + pass + + def test_v3_get_prop_agent(self) -> None: + """Test case for v3_get_prop_agent + + Get a system property + """ + pass + + def test_v3_get_remote_it_status_agent(self) -> None: + """Test case for v3_get_remote_it_status_agent + + Get Remote.It status + """ + pass + + def test_v3_get_temp_file_agent(self) -> None: + """Test case for v3_get_temp_file_agent + + Get a temp file path on VM + """ + pass + + def test_v3_install_agent(self) -> None: + """Test case for v3_install_agent + + Install app at path + """ + pass + + def test_v3_install_open_gapps_agent(self) -> None: + """Test case for v3_install_open_gapps_agent + + Install OpenGApps + """ + pass + + def test_v3_install_profile_agent(self) -> None: + """Test case for v3_install_profile_agent + + Install a profile + """ + pass + + def test_v3_install_remote_it_agent(self) -> None: + """Test case for v3_install_remote_it_agent + + Install Remote.It + """ + pass + + def test_v3_kill_app_agent(self) -> None: + """Test case for v3_kill_app_agent + + Kill an app + """ + pass + + def test_v3_kill_frida_agent(self) -> None: + """Test case for v3_kill_frida_agent + + Kill Frida + """ + pass + + def test_v3_list_app_icons_agent(self) -> None: + """Test case for v3_list_app_icons_agent + + List app icons + """ + pass + + def test_v3_list_apps_agent(self) -> None: + """Test case for v3_list_apps_agent + + List apps + """ + pass + + def test_v3_list_apps_status_agent(self) -> None: + """Test case for v3_list_apps_status_agent + + List apps status + """ + pass + + def test_v3_list_containers_agent(self) -> None: + """Test case for v3_list_containers_agent + + List containers + """ + pass + + def test_v3_list_frida_processes_agent(self) -> None: + """Test case for v3_list_frida_processes_agent + + List Frida processes + """ + pass + + def test_v3_list_profiles_agent(self) -> None: + """Test case for v3_list_profiles_agent + + List profiles + """ + pass + + def test_v3_lock_agent(self) -> None: + """Test case for v3_lock_agent + + Lock device + """ + pass + + def test_v3_preauthorize_file_archive_download_agent(self) -> None: + """Test case for v3_preauthorize_file_archive_download_agent + + Pre-authorize an archive download from VM + """ + pass + + def test_v3_preauthorize_file_download_agent(self) -> None: + """Test case for v3_preauthorize_file_download_agent + + Pre-authorize a file download from VM + """ + pass + + def test_v3_run_app_agent(self) -> None: + """Test case for v3_run_app_agent + + Run an app + """ + pass + + def test_v3_run_frida_agent(self) -> None: + """Test case for v3_run_frida_agent + + Run Frida + """ + pass + + def test_v3_set_adb_auth_agent(self) -> None: + """Test case for v3_set_adb_auth_agent + + Set ADB auth setting + """ + pass + + def test_v3_set_device_properties_agent(self) -> None: + """Test case for v3_set_device_properties_agent + + Set device properties + """ + pass + + def test_v3_set_file_attributes_agent(self) -> None: + """Test case for v3_set_file_attributes_agent + + Change attributes of a file on VM + """ + pass + + def test_v3_set_hostname_agent(self) -> None: + """Test case for v3_set_hostname_agent + + Set instance hostname + """ + pass + + def test_v3_shutdown_agent(self) -> None: + """Test case for v3_shutdown_agent + + Shut down instance + """ + pass + + def test_v3_start_container_agent(self) -> None: + """Test case for v3_start_container_agent + + Start a container + """ + pass + + def test_v3_start_container_app_agent(self) -> None: + """Test case for v3_start_container_app_agent + + Start an app in a container + """ + pass + + def test_v3_start_container_app_monitored_agent(self) -> None: + """Test case for v3_start_container_app_monitored_agent + + Start and monitor an app in a container + """ + pass + + def test_v3_stop_container_agent(self) -> None: + """Test case for v3_stop_container_agent + + Stop a container + """ + pass + + def test_v3_stop_container_app_agent(self) -> None: + """Test case for v3_stop_container_app_agent + + Stop a monitored app in a container + """ + pass + + def test_v3_uninstall_app_agent(self) -> None: + """Test case for v3_uninstall_app_agent + + Uninstall an app + """ + pass + + def test_v3_uninstall_profile_agent(self) -> None: + """Test case for v3_uninstall_profile_agent + + Uninstall a profile + """ + pass + + def test_v3_uninstall_remote_it_agent(self) -> None: + """Test case for v3_uninstall_remote_it_agent + + Uninstall Remote.It + """ + pass + + def test_v3_unlock_agent(self) -> None: + """Test case for v3_unlock_agent + + Unlock device + """ + pass + + def test_v3_upload_file_agent(self) -> None: + """Test case for v3_upload_file_agent + + Upload a file to VM + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_app.py b/test/test_agent_app.py index c0bffc9..d4efc95 100644 --- a/test/test_agent_app.py +++ b/test/test_agent_app.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_app import AgentApp # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_app import AgentApp class TestAgentApp(unittest.TestCase): """AgentApp unit test stubs""" @@ -28,34 +26,39 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentApp: """Test AgentApp - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_app.AgentApp() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentApp` + """ + model = AgentApp() + if include_optional: return AgentApp( - tags = [ - '' - ], - running = True, - disk_usage = 56, - date = 56, - application_type = '', - name = '', - bundle_id = '', - bundle_path = '', - bundle_data_path = '' + tags = ["Favorites"], + running = True, + disk_usage = 41943040, + var_date = 1773479567, + application_type = 'User', + name = 'Corellium Cafe', + bundle_id = 'com.corellium.cafe', + bundle_path = '/var/containers/Bundle/Application/Cafe.app', + bundle_data_path = '/var/mobile/Containers/Data/Application/Cafe', + is_launchable = True, + icon = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9L' ) - else : + else: return AgentApp( + application_type = 'User', + bundle_id = 'com.corellium.cafe', ) + """ def testAgentApp(self): """Test AgentApp""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_app_ready_response.py b/test/test_agent_app_ready_response.py index 67dcdaf..3a6f069 100644 --- a/test/test_agent_app_ready_response.py +++ b/test/test_agent_app_ready_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_app_ready_response import AgentAppReadyResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_app_ready_response import AgentAppReadyResponse class TestAgentAppReadyResponse(unittest.TestCase): """AgentAppReadyResponse unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentAppReadyResponse: """Test AgentAppReadyResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_app_ready_response.AgentAppReadyResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentAppReadyResponse` + """ + model = AgentAppReadyResponse() + if include_optional: return AgentAppReadyResponse( ready = True ) - else : + else: return AgentAppReadyResponse( ready = True, ) + """ def testAgentAppReadyResponse(self): """Test AgentAppReadyResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_app_ready_response_v1.py b/test/test_agent_app_ready_response_v1.py new file mode 100644 index 0000000..3f4133e --- /dev/null +++ b/test/test_agent_app_ready_response_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_app_ready_response_v1 import AgentAppReadyResponseV1 + +class TestAgentAppReadyResponseV1(unittest.TestCase): + """AgentAppReadyResponseV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentAppReadyResponseV1: + """Test AgentAppReadyResponseV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentAppReadyResponseV1` + """ + model = AgentAppReadyResponseV1() + if include_optional: + return AgentAppReadyResponseV1( + ready = True + ) + else: + return AgentAppReadyResponseV1( + ready = True, + ) + """ + + def testAgentAppReadyResponseV1(self): + """Test AgentAppReadyResponseV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_app_status.py b/test/test_agent_app_status.py index 2d2ba53..eb51cdf 100644 --- a/test/test_agent_app_status.py +++ b/test/test_agent_app_status.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_app_status import AgentAppStatus # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_app_status import AgentAppStatus class TestAgentAppStatus(unittest.TestCase): """AgentAppStatus unit test stubs""" @@ -28,25 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentAppStatus: """Test AgentAppStatus - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_app_status.AgentAppStatus() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentAppStatus` + """ + model = AgentAppStatus() + if include_optional: return AgentAppStatus( - running = True, - bundle_id = '' + running = True, + bundle_id = 'com.corellium.cafe' ) - else : + else: return AgentAppStatus( + running = True, + bundle_id = 'com.corellium.cafe', ) + """ def testAgentAppStatus(self): """Test AgentAppStatus""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_app_status_v1.py b/test/test_agent_app_status_v1.py new file mode 100644 index 0000000..7b30e5a --- /dev/null +++ b/test/test_agent_app_status_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_app_status_v1 import AgentAppStatusV1 + +class TestAgentAppStatusV1(unittest.TestCase): + """AgentAppStatusV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentAppStatusV1: + """Test AgentAppStatusV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentAppStatusV1` + """ + model = AgentAppStatusV1() + if include_optional: + return AgentAppStatusV1( + running = True, + bundle_id = '' + ) + else: + return AgentAppStatusV1( + ) + """ + + def testAgentAppStatusV1(self): + """Test AgentAppStatusV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_app_v1.py b/test/test_agent_app_v1.py new file mode 100644 index 0000000..d849a54 --- /dev/null +++ b/test/test_agent_app_v1.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_app_v1 import AgentAppV1 + +class TestAgentAppV1(unittest.TestCase): + """AgentAppV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentAppV1: + """Test AgentAppV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentAppV1` + """ + model = AgentAppV1() + if include_optional: + return AgentAppV1( + tags = [ + '' + ], + running = True, + disk_usage = 56, + var_date = 56, + application_type = '', + name = '', + bundle_id = '', + bundle_path = '', + bundle_data_path = '' + ) + else: + return AgentAppV1( + ) + """ + + def testAgentAppV1(self): + """Test AgentAppV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_apps_list.py b/test/test_agent_apps_list.py index 613abcc..bca1948 100644 --- a/test/test_agent_apps_list.py +++ b/test/test_agent_apps_list.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_apps_list import AgentAppsList # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_apps_list import AgentAppsList class TestAgentAppsList(unittest.TestCase): """AgentAppsList unit test stubs""" @@ -28,38 +26,57 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentAppsList: """Test AgentAppsList - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_apps_list.AgentAppsList() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentAppsList` + """ + model = AgentAppsList() + if include_optional: return AgentAppsList( + success = True, apps = [ - corellium_api.models.agent_app.AgentApp( - tags = [ - '' - ], + corellium.models.agent_app.AgentApp( + tags = ["Favorites"], running = True, - disk_usage = 56, - date = 56, - application_type = '', - name = '', - bundle_id = '', - bundle_path = '', - bundle_data_path = '', ) - ], - frontmost = '' + disk_usage = 41943040, + date = 1773479567, + application_type = 'User', + name = 'Corellium Cafe', + bundle_id = 'com.corellium.cafe', + bundle_path = '/var/containers/Bundle/Application/Cafe.app', + bundle_data_path = '/var/mobile/Containers/Data/Application/Cafe', + is_launchable = True, + icon = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9L', ) + ], + frontmost = 'com.corellium.cafe' ) - else : + else: return AgentAppsList( + success = True, + apps = [ + corellium.models.agent_app.AgentApp( + tags = ["Favorites"], + running = True, + disk_usage = 41943040, + date = 1773479567, + application_type = 'User', + name = 'Corellium Cafe', + bundle_id = 'com.corellium.cafe', + bundle_path = '/var/containers/Bundle/Application/Cafe.app', + bundle_data_path = '/var/mobile/Containers/Data/Application/Cafe', + is_launchable = True, + icon = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9L', ) + ], ) + """ def testAgentAppsList(self): """Test AgentAppsList""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_apps_list_v1.py b/test/test_agent_apps_list_v1.py new file mode 100644 index 0000000..35cee13 --- /dev/null +++ b/test/test_agent_apps_list_v1.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_apps_list_v1 import AgentAppsListV1 + +class TestAgentAppsListV1(unittest.TestCase): + """AgentAppsListV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentAppsListV1: + """Test AgentAppsListV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentAppsListV1` + """ + model = AgentAppsListV1() + if include_optional: + return AgentAppsListV1( + apps = [ + corellium.models.agent_app_v1.AgentAppV1( + tags = [ + '' + ], + running = True, + disk_usage = 56, + date = 56, + application_type = '', + name = '', + bundle_id = '', + bundle_path = '', + bundle_data_path = '', ) + ], + frontmost = '' + ) + else: + return AgentAppsListV1( + ) + """ + + def testAgentAppsListV1(self): + """Test AgentAppsListV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_apps_status_list.py b/test/test_agent_apps_status_list.py index 593f0a7..ae55e79 100644 --- a/test/test_agent_apps_status_list.py +++ b/test/test_agent_apps_status_list.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_apps_status_list import AgentAppsStatusList # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_apps_status_list import AgentAppsStatusList class TestAgentAppsStatusList(unittest.TestCase): """AgentAppsStatusList unit test stubs""" @@ -28,29 +26,41 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentAppsStatusList: """Test AgentAppsStatusList - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_apps_status_list.AgentAppsStatusList() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentAppsStatusList` + """ + model = AgentAppsStatusList() + if include_optional: return AgentAppsStatusList( + success = True, + id = 7, apps = [ - corellium_api.models.agent_app_status.AgentAppStatus( + corellium.models.agent_app_status.AgentAppStatus( running = True, - bundle_id = '', ) - ], - frontmost = '' + bundle_id = 'com.corellium.cafe', ) + ], + frontmost = 'com.corellium.cafe' ) - else : + else: return AgentAppsStatusList( + success = True, + id = 7, + apps = [ + corellium.models.agent_app_status.AgentAppStatus( + running = True, + bundle_id = 'com.corellium.cafe', ) + ], ) + """ def testAgentAppsStatusList(self): """Test AgentAppsStatusList""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_apps_status_list_v1.py b/test/test_agent_apps_status_list_v1.py new file mode 100644 index 0000000..cb0eed2 --- /dev/null +++ b/test/test_agent_apps_status_list_v1.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_apps_status_list_v1 import AgentAppsStatusListV1 + +class TestAgentAppsStatusListV1(unittest.TestCase): + """AgentAppsStatusListV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentAppsStatusListV1: + """Test AgentAppsStatusListV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentAppsStatusListV1` + """ + model = AgentAppsStatusListV1() + if include_optional: + return AgentAppsStatusListV1( + apps = [ + corellium.models.agent_app_status_v1.AgentAppStatusV1( + running = True, + bundle_id = '', ) + ], + frontmost = '' + ) + else: + return AgentAppsStatusListV1( + ) + """ + + def testAgentAppsStatusListV1(self): + """Test AgentAppsStatusListV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_container.py b/test/test_agent_container.py new file mode 100644 index 0000000..7016e72 --- /dev/null +++ b/test/test_agent_container.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_container import AgentContainer + +class TestAgentContainer(unittest.TestCase): + """AgentContainer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentContainer: + """Test AgentContainer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentContainer` + """ + model = AgentContainer() + if include_optional: + return AgentContainer( + autostart = '1', + groups = 'onboot', + ipv4 = '10.0.0.12', + ipv6 = 'fe80::5054:ff:fe12:3456', + name = 'container1', + pid = '1234', + ram = '52428800', + state = 'RUNNING', + swap = '0', + unprivileged = '1' + ) + else: + return AgentContainer( + autostart = '1', + groups = 'onboot', + ipv4 = '10.0.0.12', + ipv6 = 'fe80::5054:ff:fe12:3456', + name = 'container1', + pid = '1234', + ram = '52428800', + state = 'RUNNING', + swap = '0', + unprivileged = '1', + ) + """ + + def testAgentContainer(self): + """Test AgentContainer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_container_health.py b/test/test_agent_container_health.py new file mode 100644 index 0000000..dadc511 --- /dev/null +++ b/test/test_agent_container_health.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_container_health import AgentContainerHealth + +class TestAgentContainerHealth(unittest.TestCase): + """AgentContainerHealth unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentContainerHealth: + """Test AgentContainerHealth + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentContainerHealth` + """ + model = AgentContainerHealth() + if include_optional: + return AgentContainerHealth( + healthy = True + ) + else: + return AgentContainerHealth( + healthy = True, + ) + """ + + def testAgentContainerHealth(self): + """Test AgentContainerHealth""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_container_list.py b/test/test_agent_container_list.py new file mode 100644 index 0000000..2ed6620 --- /dev/null +++ b/test/test_agent_container_list.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_container_list import AgentContainerList + +class TestAgentContainerList(unittest.TestCase): + """AgentContainerList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentContainerList: + """Test AgentContainerList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentContainerList` + """ + model = AgentContainerList() + if include_optional: + return AgentContainerList( + containers = [ + corellium.models.agent_container.AgentContainer( + autostart = '1', + groups = 'onboot', + ipv4 = '10.0.0.12', + ipv6 = 'fe80::5054:ff:fe12:3456', + name = 'container1', + pid = '1234', + ram = '52428800', + state = 'RUNNING', + swap = '0', + unprivileged = '1', ) + ] + ) + else: + return AgentContainerList( + containers = [ + corellium.models.agent_container.AgentContainer( + autostart = '1', + groups = 'onboot', + ipv4 = '10.0.0.12', + ipv6 = 'fe80::5054:ff:fe12:3456', + name = 'container1', + pid = '1234', + ram = '52428800', + state = 'RUNNING', + swap = '0', + unprivileged = '1', ) + ], + ) + """ + + def testAgentContainerList(self): + """Test AgentContainerList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_error.py b/test/test_agent_error.py index dbde7ec..4e91f4c 100644 --- a/test/test_agent_error.py +++ b/test/test_agent_error.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_error import AgentError # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_error import AgentError class TestAgentError(unittest.TestCase): """AgentError unit test stubs""" @@ -28,28 +26,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentError: """Test AgentError - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_error.AgentError() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentError` + """ + model = AgentError() + if include_optional: return AgentError( - error = '', - error_id = 'AgentError', - original_error = None + error = 'Agent request timed out.', + error_id = 'AgentError', + original_error = {"name":"OperationFailed","message":"Agent request timed out."} ) - else : + else: return AgentError( - error = '', + error = 'Agent request timed out.', error_id = 'AgentError', ) + """ def testAgentError(self): """Test AgentError""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_error_v1.py b/test/test_agent_error_v1.py new file mode 100644 index 0000000..8d8dba0 --- /dev/null +++ b/test/test_agent_error_v1.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_error_v1 import AgentErrorV1 + +class TestAgentErrorV1(unittest.TestCase): + """AgentErrorV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentErrorV1: + """Test AgentErrorV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentErrorV1` + """ + model = AgentErrorV1() + if include_optional: + return AgentErrorV1( + error = '', + error_id = 'AgentError', + original_error = None + ) + else: + return AgentErrorV1( + error = '', + error_id = 'AgentError', + ) + """ + + def testAgentErrorV1(self): + """Test AgentErrorV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_file_archive_download_body.py b/test/test_agent_file_archive_download_body.py new file mode 100644 index 0000000..f6c5532 --- /dev/null +++ b/test/test_agent_file_archive_download_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_file_archive_download_body import AgentFileArchiveDownloadBody + +class TestAgentFileArchiveDownloadBody(unittest.TestCase): + """AgentFileArchiveDownloadBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentFileArchiveDownloadBody: + """Test AgentFileArchiveDownloadBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentFileArchiveDownloadBody` + """ + model = AgentFileArchiveDownloadBody() + if include_optional: + return AgentFileArchiveDownloadBody( + paths = ["/var/mobile/Media/DCIM/","/var/tmp/agent.log"] + ) + else: + return AgentFileArchiveDownloadBody( + paths = ["/var/mobile/Media/DCIM/","/var/tmp/agent.log"], + ) + """ + + def testAgentFileArchiveDownloadBody(self): + """Test AgentFileArchiveDownloadBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_file_attributes_body.py b/test/test_agent_file_attributes_body.py new file mode 100644 index 0000000..c552667 --- /dev/null +++ b/test/test_agent_file_attributes_body.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_file_attributes_body import AgentFileAttributesBody + +class TestAgentFileAttributesBody(unittest.TestCase): + """AgentFileAttributesBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentFileAttributesBody: + """Test AgentFileAttributesBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentFileAttributesBody` + """ + model = AgentFileAttributesBody() + if include_optional: + return AgentFileAttributesBody( + path = '/var/tmp/renamed.log', + mode = 420, + uid = 501, + gid = 501 + ) + else: + return AgentFileAttributesBody( + ) + """ + + def testAgentFileAttributesBody(self): + """Test AgentFileAttributesBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_file_download_token.py b/test/test_agent_file_download_token.py new file mode 100644 index 0000000..9201c5d --- /dev/null +++ b/test/test_agent_file_download_token.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_file_download_token import AgentFileDownloadToken + +class TestAgentFileDownloadToken(unittest.TestCase): + """AgentFileDownloadToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentFileDownloadToken: + """Test AgentFileDownloadToken + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentFileDownloadToken` + """ + model = AgentFileDownloadToken() + if include_optional: + return AgentFileDownloadToken( + token = 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6' + ) + else: + return AgentFileDownloadToken( + token = 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6', + ) + """ + + def testAgentFileDownloadToken(self): + """Test AgentFileDownloadToken""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_frida_process_list.py b/test/test_agent_frida_process_list.py new file mode 100644 index 0000000..4764328 --- /dev/null +++ b/test/test_agent_frida_process_list.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_frida_process_list import AgentFridaProcessList + +class TestAgentFridaProcessList(unittest.TestCase): + """AgentFridaProcessList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentFridaProcessList: + """Test AgentFridaProcessList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentFridaProcessList` + """ + model = AgentFridaProcessList() + if include_optional: + return AgentFridaProcessList( + success = True, + exit_status = 0, + output = ' PID Name + 1234 com.corellium.cafe +', + attached = corellium.models.agent_frida_process_list_attached.AgentFridaProcessList_attached( + target_name = 'com.corellium.cafe', + target_pid = 1234, ) + ) + else: + return AgentFridaProcessList( + success = True, + exit_status = 0, + output = ' PID Name + 1234 com.corellium.cafe +', + ) + """ + + def testAgentFridaProcessList(self): + """Test AgentFridaProcessList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_frida_process_list_attached.py b/test/test_agent_frida_process_list_attached.py new file mode 100644 index 0000000..670a5b4 --- /dev/null +++ b/test/test_agent_frida_process_list_attached.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_frida_process_list_attached import AgentFridaProcessListAttached + +class TestAgentFridaProcessListAttached(unittest.TestCase): + """AgentFridaProcessListAttached unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentFridaProcessListAttached: + """Test AgentFridaProcessListAttached + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentFridaProcessListAttached` + """ + model = AgentFridaProcessListAttached() + if include_optional: + return AgentFridaProcessListAttached( + target_name = 'com.corellium.cafe', + target_pid = 1234 + ) + else: + return AgentFridaProcessListAttached( + target_name = 'com.corellium.cafe', + target_pid = 1234, + ) + """ + + def testAgentFridaProcessListAttached(self): + """Test AgentFridaProcessListAttached""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_frida_response.py b/test/test_agent_frida_response.py new file mode 100644 index 0000000..b482131 --- /dev/null +++ b/test/test_agent_frida_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_frida_response import AgentFridaResponse + +class TestAgentFridaResponse(unittest.TestCase): + """AgentFridaResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentFridaResponse: + """Test AgentFridaResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentFridaResponse` + """ + model = AgentFridaResponse() + if include_optional: + return AgentFridaResponse( + id = 7, + success = True + ) + else: + return AgentFridaResponse( + id = 7, + success = True, + ) + """ + + def testAgentFridaResponse(self): + """Test AgentFridaResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_frida_run_body.py b/test/test_agent_frida_run_body.py new file mode 100644 index 0000000..f6cb849 --- /dev/null +++ b/test/test_agent_frida_run_body.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_frida_run_body import AgentFridaRunBody + +class TestAgentFridaRunBody(unittest.TestCase): + """AgentFridaRunBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentFridaRunBody: + """Test AgentFridaRunBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentFridaRunBody` + """ + model = AgentFridaRunBody() + if include_optional: + return AgentFridaRunBody( + target_pid = '1234', + target_name = 'com.corellium.cafe' + ) + else: + return AgentFridaRunBody( + target_pid = '1234', + target_name = 'com.corellium.cafe', + ) + """ + + def testAgentFridaRunBody(self): + """Test AgentFridaRunBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_icons.py b/test/test_agent_icons.py index d283baa..6462a21 100644 --- a/test/test_agent_icons.py +++ b/test/test_agent_icons.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_icons import AgentIcons # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_icons import AgentIcons class TestAgentIcons(unittest.TestCase): """AgentIcons unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentIcons: """Test AgentIcons - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_icons.AgentIcons() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentIcons` + """ + model = AgentIcons() + if include_optional: return AgentIcons( icon = 'YQ==' ) - else : + else: return AgentIcons( ) + """ def testAgentIcons(self): """Test AgentIcons""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_icons_response.py b/test/test_agent_icons_response.py new file mode 100644 index 0000000..037b0dd --- /dev/null +++ b/test/test_agent_icons_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_icons_response import AgentIconsResponse + +class TestAgentIconsResponse(unittest.TestCase): + """AgentIconsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentIconsResponse: + """Test AgentIconsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentIconsResponse` + """ + model = AgentIconsResponse() + if include_optional: + return AgentIconsResponse( + success = True, + id = 7, + icons = {"com.corellium.cafe":"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9L"} + ) + else: + return AgentIconsResponse( + success = True, + id = 7, + icons = {"com.corellium.cafe":"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9L"}, + ) + """ + + def testAgentIconsResponse(self): + """Test AgentIconsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_install_body.py b/test/test_agent_install_body.py index 697a7eb..f6d8a84 100644 --- a/test/test_agent_install_body.py +++ b/test/test_agent_install_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_install_body import AgentInstallBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_install_body import AgentInstallBody class TestAgentInstallBody(unittest.TestCase): """AgentInstallBody unit test stubs""" @@ -28,24 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentInstallBody: """Test AgentInstallBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_install_body.AgentInstallBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentInstallBody` + """ + model = AgentInstallBody() + if include_optional: return AgentInstallBody( - path = '' + path = '/var/tmp/Cafe.ipa' ) - else : + else: return AgentInstallBody( + path = '/var/tmp/Cafe.ipa', ) + """ def testAgentInstallBody(self): """Test AgentInstallBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_install_body_v1.py b/test/test_agent_install_body_v1.py new file mode 100644 index 0000000..b6c7a49 --- /dev/null +++ b/test/test_agent_install_body_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_install_body_v1 import AgentInstallBodyV1 + +class TestAgentInstallBodyV1(unittest.TestCase): + """AgentInstallBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentInstallBodyV1: + """Test AgentInstallBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentInstallBodyV1` + """ + model = AgentInstallBodyV1() + if include_optional: + return AgentInstallBodyV1( + path = '' + ) + else: + return AgentInstallBodyV1( + ) + """ + + def testAgentInstallBodyV1(self): + """Test AgentInstallBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_profile_list_response.py b/test/test_agent_profile_list_response.py new file mode 100644 index 0000000..660364e --- /dev/null +++ b/test/test_agent_profile_list_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_profile_list_response import AgentProfileListResponse + +class TestAgentProfileListResponse(unittest.TestCase): + """AgentProfileListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentProfileListResponse: + """Test AgentProfileListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentProfileListResponse` + """ + model = AgentProfileListResponse() + if include_optional: + return AgentProfileListResponse( + profiles = ["com.apple.wifi.managed"] + ) + else: + return AgentProfileListResponse( + profiles = ["com.apple.wifi.managed"], + ) + """ + + def testAgentProfileListResponse(self): + """Test AgentProfileListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_profiles_return.py b/test/test_agent_profiles_return.py index 21a0451..e5b908f 100644 --- a/test/test_agent_profiles_return.py +++ b/test/test_agent_profiles_return.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_profiles_return import AgentProfilesReturn # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_profiles_return import AgentProfilesReturn class TestAgentProfilesReturn(unittest.TestCase): """AgentProfilesReturn unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentProfilesReturn: """Test AgentProfilesReturn - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_profiles_return.AgentProfilesReturn() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentProfilesReturn` + """ + model = AgentProfilesReturn() + if include_optional: return AgentProfilesReturn( profiles = [ '' ] ) - else : + else: return AgentProfilesReturn( profiles = [ '' ], ) + """ def testAgentProfilesReturn(self): """Test AgentProfilesReturn""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_remote_it_status.py b/test/test_agent_remote_it_status.py new file mode 100644 index 0000000..08e42e3 --- /dev/null +++ b/test/test_agent_remote_it_status.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_remote_it_status import AgentRemoteItStatus + +class TestAgentRemoteItStatus(unittest.TestCase): + """AgentRemoteItStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentRemoteItStatus: + """Test AgentRemoteItStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentRemoteItStatus` + """ + model = AgentRemoteItStatus() + if include_optional: + return AgentRemoteItStatus( + remote_it_status = 'unknown', + claim_code = 'a1b2c3d4e5f6' + ) + else: + return AgentRemoteItStatus( + remote_it_status = 'unknown', + ) + """ + + def testAgentRemoteItStatus(self): + """Test AgentRemoteItStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_system_adb_auth.py b/test/test_agent_system_adb_auth.py index aaf5d86..0138eaa 100644 --- a/test/test_agent_system_adb_auth.py +++ b/test/test_agent_system_adb_auth.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_system_adb_auth import AgentSystemAdbAuth # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_system_adb_auth import AgentSystemAdbAuth class TestAgentSystemAdbAuth(unittest.TestCase): """AgentSystemAdbAuth unit test stubs""" @@ -28,24 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentSystemAdbAuth: """Test AgentSystemAdbAuth - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_system_adb_auth.AgentSystemAdbAuth() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentSystemAdbAuth` + """ + model = AgentSystemAdbAuth() + if include_optional: return AgentSystemAdbAuth( enabled = True ) - else : + else: return AgentSystemAdbAuth( + enabled = True, ) + """ def testAgentSystemAdbAuth(self): """Test AgentSystemAdbAuth""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_system_adb_auth_v1.py b/test/test_agent_system_adb_auth_v1.py new file mode 100644 index 0000000..e620a3e --- /dev/null +++ b/test/test_agent_system_adb_auth_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_system_adb_auth_v1 import AgentSystemAdbAuthV1 + +class TestAgentSystemAdbAuthV1(unittest.TestCase): + """AgentSystemAdbAuthV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSystemAdbAuthV1: + """Test AgentSystemAdbAuthV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSystemAdbAuthV1` + """ + model = AgentSystemAdbAuthV1() + if include_optional: + return AgentSystemAdbAuthV1( + enabled = True + ) + else: + return AgentSystemAdbAuthV1( + ) + """ + + def testAgentSystemAdbAuthV1(self): + """Test AgentSystemAdbAuthV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_system_get_prop_body.py b/test/test_agent_system_get_prop_body.py index 3a83ac1..4592370 100644 --- a/test/test_agent_system_get_prop_body.py +++ b/test/test_agent_system_get_prop_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_system_get_prop_body import AgentSystemGetPropBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_system_get_prop_body import AgentSystemGetPropBody class TestAgentSystemGetPropBody(unittest.TestCase): """AgentSystemGetPropBody unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentSystemGetPropBody: """Test AgentSystemGetPropBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_system_get_prop_body.AgentSystemGetPropBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentSystemGetPropBody` + """ + model = AgentSystemGetPropBody() + if include_optional: return AgentSystemGetPropBody( - _property = '' + var_property = 'ro.build.version.sdk' ) - else : + else: return AgentSystemGetPropBody( - _property = '', + var_property = 'ro.build.version.sdk', ) + """ def testAgentSystemGetPropBody(self): """Test AgentSystemGetPropBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_system_get_prop_body_v1.py b/test/test_agent_system_get_prop_body_v1.py new file mode 100644 index 0000000..b2e5135 --- /dev/null +++ b/test/test_agent_system_get_prop_body_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_system_get_prop_body_v1 import AgentSystemGetPropBodyV1 + +class TestAgentSystemGetPropBodyV1(unittest.TestCase): + """AgentSystemGetPropBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSystemGetPropBodyV1: + """Test AgentSystemGetPropBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSystemGetPropBodyV1` + """ + model = AgentSystemGetPropBodyV1() + if include_optional: + return AgentSystemGetPropBodyV1( + var_property = '' + ) + else: + return AgentSystemGetPropBodyV1( + var_property = '', + ) + """ + + def testAgentSystemGetPropBodyV1(self): + """Test AgentSystemGetPropBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_system_get_prop_response.py b/test/test_agent_system_get_prop_response.py new file mode 100644 index 0000000..e49a95c --- /dev/null +++ b/test/test_agent_system_get_prop_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_system_get_prop_response import AgentSystemGetPropResponse + +class TestAgentSystemGetPropResponse(unittest.TestCase): + """AgentSystemGetPropResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSystemGetPropResponse: + """Test AgentSystemGetPropResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSystemGetPropResponse` + """ + model = AgentSystemGetPropResponse() + if include_optional: + return AgentSystemGetPropResponse( + id = 7, + success = True, + value = '33' + ) + else: + return AgentSystemGetPropResponse( + id = 7, + success = True, + ) + """ + + def testAgentSystemGetPropResponse(self): + """Test AgentSystemGetPropResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_system_install_open_gapps_body.py b/test/test_agent_system_install_open_gapps_body.py new file mode 100644 index 0000000..4819b14 --- /dev/null +++ b/test/test_agent_system_install_open_gapps_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_system_install_open_gapps_body import AgentSystemInstallOpenGappsBody + +class TestAgentSystemInstallOpenGappsBody(unittest.TestCase): + """AgentSystemInstallOpenGappsBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSystemInstallOpenGappsBody: + """Test AgentSystemInstallOpenGappsBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSystemInstallOpenGappsBody` + """ + model = AgentSystemInstallOpenGappsBody() + if include_optional: + return AgentSystemInstallOpenGappsBody( + url = 'http://downloads.sourceforge.net/project/opengapps/arm64/20220119/open_gapps-arm64-11.0-pico-20220119.zip', + hash = '58398bf7628f38ef07eaeb3abe26f3ebf0474f4d5ecdac0852bd5de3c15cc828', + fingerprint = 'google/flame/flame:11/RP1A.200720.009/6720564:user/release-keys__2020-09-05' + ) + else: + return AgentSystemInstallOpenGappsBody( + url = 'http://downloads.sourceforge.net/project/opengapps/arm64/20220119/open_gapps-arm64-11.0-pico-20220119.zip', + hash = '58398bf7628f38ef07eaeb3abe26f3ebf0474f4d5ecdac0852bd5de3c15cc828', + fingerprint = 'google/flame/flame:11/RP1A.200720.009/6720564:user/release-keys__2020-09-05', + ) + """ + + def testAgentSystemInstallOpenGappsBody(self): + """Test AgentSystemInstallOpenGappsBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_system_network_response.py b/test/test_agent_system_network_response.py new file mode 100644 index 0000000..1b45289 --- /dev/null +++ b/test/test_agent_system_network_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_system_network_response import AgentSystemNetworkResponse + +class TestAgentSystemNetworkResponse(unittest.TestCase): + """AgentSystemNetworkResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSystemNetworkResponse: + """Test AgentSystemNetworkResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSystemNetworkResponse` + """ + model = AgentSystemNetworkResponse() + if include_optional: + return AgentSystemNetworkResponse( + value = '10.0.0.12' + ) + else: + return AgentSystemNetworkResponse( + value = '10.0.0.12', + ) + """ + + def testAgentSystemNetworkResponse(self): + """Test AgentSystemNetworkResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_system_result.py b/test/test_agent_system_result.py new file mode 100644 index 0000000..030a45c --- /dev/null +++ b/test/test_agent_system_result.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_system_result import AgentSystemResult + +class TestAgentSystemResult(unittest.TestCase): + """AgentSystemResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSystemResult: + """Test AgentSystemResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSystemResult` + """ + model = AgentSystemResult() + if include_optional: + return AgentSystemResult( + id = 7, + success = True + ) + else: + return AgentSystemResult( + id = 7, + success = True, + ) + """ + + def testAgentSystemResult(self): + """Test AgentSystemResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_system_set_device_properties_body.py b/test/test_agent_system_set_device_properties_body.py new file mode 100644 index 0000000..d239bf7 --- /dev/null +++ b/test/test_agent_system_set_device_properties_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_system_set_device_properties_body import AgentSystemSetDevicePropertiesBody + +class TestAgentSystemSetDevicePropertiesBody(unittest.TestCase): + """AgentSystemSetDevicePropertiesBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSystemSetDevicePropertiesBody: + """Test AgentSystemSetDevicePropertiesBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSystemSetDevicePropertiesBody` + """ + model = AgentSystemSetDevicePropertiesBody() + if include_optional: + return AgentSystemSetDevicePropertiesBody( + model_id = 'SM-G973F', + manufacturer_id = 'samsung' + ) + else: + return AgentSystemSetDevicePropertiesBody( + ) + """ + + def testAgentSystemSetDevicePropertiesBody(self): + """Test AgentSystemSetDevicePropertiesBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_system_set_hostname_body.py b/test/test_agent_system_set_hostname_body.py index c37403c..10dcbac 100644 --- a/test/test_agent_system_set_hostname_body.py +++ b/test/test_agent_system_set_hostname_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_system_set_hostname_body import AgentSystemSetHostnameBody class TestAgentSystemSetHostnameBody(unittest.TestCase): """AgentSystemSetHostnameBody unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentSystemSetHostnameBody: """Test AgentSystemSetHostnameBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_system_set_hostname_body.AgentSystemSetHostnameBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentSystemSetHostnameBody` + """ + model = AgentSystemSetHostnameBody() + if include_optional: return AgentSystemSetHostnameBody( - hostname = '' + hostname = 'corellium-device-01' ) - else : + else: return AgentSystemSetHostnameBody( - hostname = '', + hostname = 'corellium-device-01', ) + """ def testAgentSystemSetHostnameBody(self): """Test AgentSystemSetHostnameBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agent_system_set_hostname_body_v1.py b/test/test_agent_system_set_hostname_body_v1.py new file mode 100644 index 0000000..d910bdc --- /dev/null +++ b/test/test_agent_system_set_hostname_body_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_system_set_hostname_body_v1 import AgentSystemSetHostnameBodyV1 + +class TestAgentSystemSetHostnameBodyV1(unittest.TestCase): + """AgentSystemSetHostnameBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSystemSetHostnameBodyV1: + """Test AgentSystemSetHostnameBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSystemSetHostnameBodyV1` + """ + model = AgentSystemSetHostnameBodyV1() + if include_optional: + return AgentSystemSetHostnameBodyV1( + hostname = '' + ) + else: + return AgentSystemSetHostnameBodyV1( + hostname = '', + ) + """ + + def testAgentSystemSetHostnameBodyV1(self): + """Test AgentSystemSetHostnameBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_temp_file_response.py b/test/test_agent_temp_file_response.py new file mode 100644 index 0000000..ff937a9 --- /dev/null +++ b/test/test_agent_temp_file_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agent_temp_file_response import AgentTempFileResponse + +class TestAgentTempFileResponse(unittest.TestCase): + """AgentTempFileResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentTempFileResponse: + """Test AgentTempFileResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentTempFileResponse` + """ + model = AgentTempFileResponse() + if include_optional: + return AgentTempFileResponse( + path = '/var/tmp/tmp3f8a21' + ) + else: + return AgentTempFileResponse( + path = '/var/tmp/tmp3f8a21', + ) + """ + + def testAgentTempFileResponse(self): + """Test AgentTempFileResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_v1_api.py b/test/test_agent_v1_api.py new file mode 100644 index 0000000..2701473 --- /dev/null +++ b/test/test_agent_v1_api.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.agent_v1_api import AgentV1Api + + +class TestAgentV1Api(unittest.TestCase): + """AgentV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = AgentV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_agent_app_ready(self) -> None: + """Test case for v1_agent_app_ready + + Check if App subsystem is ready + """ + pass + + def test_v1_agent_delete_file(self) -> None: + """Test case for v1_agent_delete_file + + Delete a File on VM + """ + pass + + def test_v1_agent_get_file(self) -> None: + """Test case for v1_agent_get_file + + Download a File from VM + """ + pass + + def test_v1_agent_get_temp_filename(self) -> None: + """Test case for v1_agent_get_temp_filename + + Get the path for a new temp file + """ + pass + + def test_v1_agent_install_app(self) -> None: + """Test case for v1_agent_install_app + + Install App at path + """ + pass + + def test_v1_agent_install_profile(self) -> None: + """Test case for v1_agent_install_profile + + Install a Profile to VM + """ + pass + + def test_v1_agent_kill_app(self) -> None: + """Test case for v1_agent_kill_app + + Kill an App + """ + pass + + def test_v1_agent_list_app_icons(self) -> None: + """Test case for v1_agent_list_app_icons + + List App Icons + """ + pass + + def test_v1_agent_list_apps(self) -> None: + """Test case for v1_agent_list_apps + + List Apps + """ + pass + + def test_v1_agent_list_apps_status(self) -> None: + """Test case for v1_agent_list_apps_status + + List Apps Status + """ + pass + + def test_v1_agent_list_profiles(self) -> None: + """Test case for v1_agent_list_profiles + + List Profiles + """ + pass + + def test_v1_agent_run_app(self) -> None: + """Test case for v1_agent_run_app + + Run an App + """ + pass + + def test_v1_agent_set_file_attributes(self) -> None: + """Test case for v1_agent_set_file_attributes + + Change Attrs of a File on VM + """ + pass + + def test_v1_agent_system_get_adb_auth(self) -> None: + """Test case for v1_agent_system_get_adb_auth + + Get ADB Auth Setting (AOSP only) + """ + pass + + def test_v1_agent_system_get_network(self) -> None: + """Test case for v1_agent_system_get_network + + Get IP of eth0 (AOSP only) + """ + pass + + def test_v1_agent_system_get_prop(self) -> None: + """Test case for v1_agent_system_get_prop + + Get System Property (AOSP only) + """ + pass + + def test_v1_agent_system_install_open_g_apps(self) -> None: + """Test case for v1_agent_system_install_open_g_apps + + Install OpenGApps (AOSP only) + """ + pass + + def test_v1_agent_system_lock(self) -> None: + """Test case for v1_agent_system_lock + + Lock Device (iOS Only) + """ + pass + + def test_v1_agent_system_set_adb_auth(self) -> None: + """Test case for v1_agent_system_set_adb_auth + + Set ADB Auth Setting (AOSP only) + """ + pass + + def test_v1_agent_system_set_hostname(self) -> None: + """Test case for v1_agent_system_set_hostname + + Set Hostname of instance + """ + pass + + def test_v1_agent_system_shutdown(self) -> None: + """Test case for v1_agent_system_shutdown + + Instruct VM to halt + """ + pass + + def test_v1_agent_system_unlock(self) -> None: + """Test case for v1_agent_system_unlock + + Unlock Device (iOS Only) + """ + pass + + def test_v1_agent_uninstall_app(self) -> None: + """Test case for v1_agent_uninstall_app + + Uninstall an App + """ + pass + + def test_v1_agent_uninstall_profile(self) -> None: + """Test case for v1_agent_uninstall_profile + + Uninstall a Profile from VM + """ + pass + + def test_v1_agent_upload_file(self) -> None: + """Test case for v1_agent_upload_file + + Upload a file to VM + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_agent_value_return.py b/test/test_agent_value_return.py index 33131f3..1c6c657 100644 --- a/test/test_agent_value_return.py +++ b/test/test_agent_value_return.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agent_value_return import AgentValueReturn # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agent_value_return import AgentValueReturn class TestAgentValueReturn(unittest.TestCase): """AgentValueReturn unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgentValueReturn: """Test AgentValueReturn - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agent_value_return.AgentValueReturn() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgentValueReturn` + """ + model = AgentValueReturn() + if include_optional: return AgentValueReturn( value = '' ) - else : + else: return AgentValueReturn( ) + """ def testAgentValueReturn(self): """Test AgentValueReturn""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agreed_ack.py b/test/test_agreed_ack.py index 1b9dd2a..ead67bf 100644 --- a/test/test_agreed_ack.py +++ b/test/test_agreed_ack.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.agreed_ack import AgreedAck # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.agreed_ack import AgreedAck class TestAgreedAck(unittest.TestCase): """AgreedAck unit test stubs""" @@ -28,24 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AgreedAck: """Test AgreedAck - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.agreed_ack.AgreedAck() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AgreedAck` + """ + model = AgreedAck() + if include_optional: return AgreedAck( - agreed_to_terms = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + agreed_to_terms = '2026-05-22T13:58:34Z' ) - else : + else: return AgreedAck( + agreed_to_terms = '2026-05-22T13:58:34Z', ) + """ def testAgreedAck(self): """Test AgreedAck""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_agreed_ack_v1.py b/test/test_agreed_ack_v1.py new file mode 100644 index 0000000..19e63a6 --- /dev/null +++ b/test/test_agreed_ack_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.agreed_ack_v1 import AgreedAckV1 + +class TestAgreedAckV1(unittest.TestCase): + """AgreedAckV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgreedAckV1: + """Test AgreedAckV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgreedAckV1` + """ + model = AgreedAckV1() + if include_optional: + return AgreedAckV1( + agreed_to_terms = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AgreedAckV1( + ) + """ + + def testAgreedAckV1(self): + """Test AgreedAckV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ai_tools_config.py b/test/test_ai_tools_config.py new file mode 100644 index 0000000..6cb6911 --- /dev/null +++ b/test/test_ai_tools_config.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ai_tools_config import AiToolsConfig + +class TestAiToolsConfig(unittest.TestCase): + """AiToolsConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AiToolsConfig: + """Test AiToolsConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AiToolsConfig` + """ + model = AiToolsConfig() + if include_optional: + return AiToolsConfig( + ai_enabled = True + ) + else: + return AiToolsConfig( + ) + """ + + def testAiToolsConfig(self): + """Test AiToolsConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ai_tools_config_v1.py b/test/test_ai_tools_config_v1.py new file mode 100644 index 0000000..b2ffcf3 --- /dev/null +++ b/test/test_ai_tools_config_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ai_tools_config_v1 import AiToolsConfigV1 + +class TestAiToolsConfigV1(unittest.TestCase): + """AiToolsConfigV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AiToolsConfigV1: + """Test AiToolsConfigV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AiToolsConfigV1` + """ + model = AiToolsConfigV1() + if include_optional: + return AiToolsConfigV1( + ai_enabled = True + ) + else: + return AiToolsConfigV1( + ) + """ + + def testAiToolsConfigV1(self): + """Test AiToolsConfigV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_allowed_devices_filter_schema.py b/test/test_allowed_devices_filter_schema.py new file mode 100644 index 0000000..852572c --- /dev/null +++ b/test/test_allowed_devices_filter_schema.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.allowed_devices_filter_schema import AllowedDevicesFilterSchema + +class TestAllowedDevicesFilterSchema(unittest.TestCase): + """AllowedDevicesFilterSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllowedDevicesFilterSchema: + """Test AllowedDevicesFilterSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AllowedDevicesFilterSchema` + """ + model = AllowedDevicesFilterSchema() + if include_optional: + return AllowedDevicesFilterSchema( + device_name = 'iphone15', + allowed_firmwares = [ + corellium.models.allowed_firmware_schema.AllowedFirmwareSchema( + version = '17.4.1', + build_id = '21E236', ) + ] + ) + else: + return AllowedDevicesFilterSchema( + device_name = 'iphone15', + allowed_firmwares = [ + corellium.models.allowed_firmware_schema.AllowedFirmwareSchema( + version = '17.4.1', + build_id = '21E236', ) + ], + ) + """ + + def testAllowedDevicesFilterSchema(self): + """Test AllowedDevicesFilterSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_allowed_domains_response.py b/test/test_allowed_domains_response.py index 685631a..e2dee3f 100644 --- a/test/test_allowed_domains_response.py +++ b/test/test_allowed_domains_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.allowed_domains_response import AllowedDomainsResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.allowed_domains_response import AllowedDomainsResponse class TestAllowedDomainsResponse(unittest.TestCase): """AllowedDomainsResponse unit test stubs""" @@ -28,26 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AllowedDomainsResponse: """Test AllowedDomainsResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.allowed_domains_response.AllowedDomainsResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AllowedDomainsResponse` + """ + model = AllowedDomainsResponse() + if include_optional: return AllowedDomainsResponse( allowed_domains = [ '' ] ) - else : + else: return AllowedDomainsResponse( ) + """ def testAllowedDomainsResponse(self): """Test AllowedDomainsResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_allowed_firmware_schema.py b/test/test_allowed_firmware_schema.py new file mode 100644 index 0000000..f2bbcb3 --- /dev/null +++ b/test/test_allowed_firmware_schema.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.allowed_firmware_schema import AllowedFirmwareSchema + +class TestAllowedFirmwareSchema(unittest.TestCase): + """AllowedFirmwareSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllowedFirmwareSchema: + """Test AllowedFirmwareSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AllowedFirmwareSchema` + """ + model = AllowedFirmwareSchema() + if include_optional: + return AllowedFirmwareSchema( + version = '17.4.1', + build_id = '21E236' + ) + else: + return AllowedFirmwareSchema( + version = '17.4.1', + build_id = '21E236', + ) + """ + + def testAllowedFirmwareSchema(self): + """Test AllowedFirmwareSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_conflict_error.py b/test/test_api_conflict_error.py index d277526..5e6d1be 100644 --- a/test/test_api_conflict_error.py +++ b/test/test_api_conflict_error.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.api_conflict_error import ApiConflictError # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.api_conflict_error import ApiConflictError class TestApiConflictError(unittest.TestCase): """ApiConflictError unit test stubs""" @@ -28,28 +26,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ApiConflictError: """Test ApiConflictError - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.api_conflict_error.ApiConflictError() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ApiConflictError` + """ + model = ApiConflictError() + if include_optional: return ApiConflictError( - error = '', - error_id = 'Conflict', - object = None + error = 'Conflict with existing resource', + error_id = 'Conflict', + object = {"id":"1c41b1bc-4f53-48a8-b690-ad30611e1960","name":"Default Project"} ) - else : + else: return ApiConflictError( - error = '', + error = 'Conflict with existing resource', error_id = 'Conflict', ) + """ def testApiConflictError(self): """Test ApiConflictError""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_api_conflict_error_v1.py b/test/test_api_conflict_error_v1.py new file mode 100644 index 0000000..f214c34 --- /dev/null +++ b/test/test_api_conflict_error_v1.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.api_conflict_error_v1 import ApiConflictErrorV1 + +class TestApiConflictErrorV1(unittest.TestCase): + """ApiConflictErrorV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiConflictErrorV1: + """Test ApiConflictErrorV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiConflictErrorV1` + """ + model = ApiConflictErrorV1() + if include_optional: + return ApiConflictErrorV1( + error = '', + error_id = 'Conflict', + object = None + ) + else: + return ApiConflictErrorV1( + error = '', + error_id = 'Conflict', + ) + """ + + def testApiConflictErrorV1(self): + """Test ApiConflictErrorV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_error.py b/test/test_api_error.py index 93a530e..2f527bc 100644 --- a/test/test_api_error.py +++ b/test/test_api_error.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.api_error import ApiError # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.api_error import ApiError class TestApiError(unittest.TestCase): """ApiError unit test stubs""" @@ -28,28 +26,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ApiError: """Test ApiError - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.api_error.ApiError() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ApiError` + """ + model = ApiError() + if include_optional: return ApiError( - error = '', - error_id = '', - original_error = '' + error = 'Access denied', + error_id = 'PermissionDenied', + original_error = 'connect ECONNREFUSED 192.0.2.10:443' ) - else : + else: return ApiError( - error = '', - error_id = '', + error = 'Access denied', + error_id = 'PermissionDenied', ) + """ def testApiError(self): """Test ApiError""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_api_error_v1.py b/test/test_api_error_v1.py new file mode 100644 index 0000000..69e8f6f --- /dev/null +++ b/test/test_api_error_v1.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.api_error_v1 import ApiErrorV1 + +class TestApiErrorV1(unittest.TestCase): + """ApiErrorV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiErrorV1: + """Test ApiErrorV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiErrorV1` + """ + model = ApiErrorV1() + if include_optional: + return ApiErrorV1( + error = '', + error_id = '', + original_error = '' + ) + else: + return ApiErrorV1( + error = '', + error_id = '', + ) + """ + + def testApiErrorV1(self): + """Test ApiErrorV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_internal_consistency_error.py b/test/test_api_internal_consistency_error.py index c72e75b..103dbf4 100644 --- a/test/test_api_internal_consistency_error.py +++ b/test/test_api_internal_consistency_error.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.api_internal_consistency_error import ApiInternalConsistencyError # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.api_internal_consistency_error import ApiInternalConsistencyError class TestApiInternalConsistencyError(unittest.TestCase): """ApiInternalConsistencyError unit test stubs""" @@ -28,28 +26,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ApiInternalConsistencyError: """Test ApiInternalConsistencyError - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.api_internal_consistency_error.ApiInternalConsistencyError() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ApiInternalConsistencyError` + """ + model = ApiInternalConsistencyError() + if include_optional: return ApiInternalConsistencyError( - error = '', - error_id = '', + error = '', + error_id = '', original_error = '' ) - else : + else: return ApiInternalConsistencyError( error = '', error_id = '', ) + """ def testApiInternalConsistencyError(self): """Test ApiInternalConsistencyError""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_api_not_found_error.py b/test/test_api_not_found_error.py index f2bf5d2..65eb469 100644 --- a/test/test_api_not_found_error.py +++ b/test/test_api_not_found_error.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.api_not_found_error import ApiNotFoundError # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.api_not_found_error import ApiNotFoundError class TestApiNotFoundError(unittest.TestCase): """ApiNotFoundError unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ApiNotFoundError: """Test ApiNotFoundError - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.api_not_found_error.ApiNotFoundError() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ApiNotFoundError` + """ + model = ApiNotFoundError() + if include_optional: return ApiNotFoundError( - error = '', - error_id = '', - name = '', - params = None + error = 'instance with instanceId=f7f9832a-f824-416f-a5ea-4adfe34754b5 not found', + error_id = 'NotFound', + name = 'instance', + params = {"instanceId":"f7f9832a-f824-416f-a5ea-4adfe34754b5"} ) - else : + else: return ApiNotFoundError( - error = '', - error_id = '', + error = 'instance with instanceId=f7f9832a-f824-416f-a5ea-4adfe34754b5 not found', + error_id = 'NotFound', ) + """ def testApiNotFoundError(self): """Test ApiNotFoundError""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_api_not_found_error_v1.py b/test/test_api_not_found_error_v1.py new file mode 100644 index 0000000..be5a691 --- /dev/null +++ b/test/test_api_not_found_error_v1.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.api_not_found_error_v1 import ApiNotFoundErrorV1 + +class TestApiNotFoundErrorV1(unittest.TestCase): + """ApiNotFoundErrorV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiNotFoundErrorV1: + """Test ApiNotFoundErrorV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiNotFoundErrorV1` + """ + model = ApiNotFoundErrorV1() + if include_optional: + return ApiNotFoundErrorV1( + error = '', + error_id = '', + name = '', + params = None + ) + else: + return ApiNotFoundErrorV1( + error = '', + error_id = '', + ) + """ + + def testApiNotFoundErrorV1(self): + """Test ApiNotFoundErrorV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_token.py b/test/test_api_token.py index 63ce61d..4405509 100644 --- a/test/test_api_token.py +++ b/test/test_api_token.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.api_token import ApiToken # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.api_token import ApiToken class TestApiToken(unittest.TestCase): """ApiToken unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ApiToken: """Test ApiToken - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.api_token.ApiToken() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ApiToken` + """ + model = ApiToken() + if include_optional: return ApiToken( api_token = '' ) - else : + else: return ApiToken( api_token = '', ) + """ def testApiToken(self): """Test ApiToken""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_api_token_result.py b/test/test_api_token_result.py new file mode 100644 index 0000000..498f8d7 --- /dev/null +++ b/test/test_api_token_result.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.api_token_result import ApiTokenResult + +class TestApiTokenResult(unittest.TestCase): + """ApiTokenResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiTokenResult: + """Test ApiTokenResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiTokenResult` + """ + model = ApiTokenResult() + if include_optional: + return ApiTokenResult( + api_token = '' + ) + else: + return ApiTokenResult( + api_token = '', + ) + """ + + def testApiTokenResult(self): + """Test ApiTokenResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_artifacts_path.py b/test/test_artifacts_path.py new file mode 100644 index 0000000..4c6eb78 --- /dev/null +++ b/test/test_artifacts_path.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.artifacts_path import ArtifactsPath + +class TestArtifactsPath(unittest.TestCase): + """ArtifactsPath unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ArtifactsPath: + """Test ArtifactsPath + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ArtifactsPath` + """ + model = ArtifactsPath() + if include_optional: + return ArtifactsPath( + path = '/mnt/charm_f7f9832a-f824-416f-a5ea-4adfe34754b5_artifacts' + ) + else: + return ArtifactsPath( + path = '/mnt/charm_f7f9832a-f824-416f-a5ea-4adfe34754b5_artifacts', + ) + """ + + def testArtifactsPath(self): + """Test ArtifactsPath""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment.py b/test/test_assessment.py index 8c5606e..42f1af1 100644 --- a/test/test_assessment.py +++ b/test/test_assessment.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.assessment import Assessment # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.assessment import Assessment class TestAssessment(unittest.TestCase): """Assessment unit test stubs""" @@ -28,6 +26,88 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> Assessment: + """Test Assessment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Assessment` + """ + model = Assessment() + if include_optional: + return Assessment( + id = '', + status = 'complete', + instance_id = '', + bundle = corellium.models.assessment_bundle.AssessmentBundle( + id = '', + name = 'Camera', + version = '1.2.0', ), + wordlist = corellium.models.assessment_wordlist.Assessment_wordlist( + id = '', + name = '', ), + frida_script = corellium.models.assessment_frida_script.Assessment_fridaScript( + id = '', + name = '', ), + report_id = '', + results = corellium.models.assessment_results.AssessmentResults( + pass = 56, + fail = 56, + error = 56, + info = 56, + na = 56, + artifact = 56, + score = 56, ), + metadata = corellium.models.assessment_metadata.AssessmentMetadata( + corellium_version = '6.4.0', ), + severity_counts = corellium.models.assessment_severity_counts.AssessmentSeverityCounts( + high = 56, + medium = 56, + low = 56, + info = 56, ), + error = '', + created_by = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return Assessment( + id = '', + status = 'complete', + instance_id = '', + bundle = corellium.models.assessment_bundle.AssessmentBundle( + id = '', + name = 'Camera', + version = '1.2.0', ), + wordlist = corellium.models.assessment_wordlist.Assessment_wordlist( + id = '', + name = '', ), + frida_script = corellium.models.assessment_frida_script.Assessment_fridaScript( + id = '', + name = '', ), + report_id = '', + results = corellium.models.assessment_results.AssessmentResults( + pass = 56, + fail = 56, + error = 56, + info = 56, + na = 56, + artifact = 56, + score = 56, ), + metadata = corellium.models.assessment_metadata.AssessmentMetadata( + corellium_version = '6.4.0', ), + severity_counts = corellium.models.assessment_severity_counts.AssessmentSeverityCounts( + high = 56, + medium = 56, + low = 56, + info = 56, ), + error = '', + created_by = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + def testAssessment(self): """Test Assessment""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/test/test_assessment_bundle.py b/test/test_assessment_bundle.py new file mode 100644 index 0000000..faf512c --- /dev/null +++ b/test/test_assessment_bundle.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_bundle import AssessmentBundle + +class TestAssessmentBundle(unittest.TestCase): + """AssessmentBundle unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssessmentBundle: + """Test AssessmentBundle + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentBundle` + """ + model = AssessmentBundle() + if include_optional: + return AssessmentBundle( + id = '', + name = 'Camera', + version = '1.2.0' + ) + else: + return AssessmentBundle( + id = '', + name = 'Camera', + version = '1.2.0', + ) + """ + + def testAssessmentBundle(self): + """Test AssessmentBundle""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_format.py b/test/test_assessment_format.py new file mode 100644 index 0000000..0430739 --- /dev/null +++ b/test/test_assessment_format.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_format import AssessmentFormat + +class TestAssessmentFormat(unittest.TestCase): + """AssessmentFormat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssessmentFormat(self): + """Test AssessmentFormat""" + # inst = AssessmentFormat() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_frida_script.py b/test/test_assessment_frida_script.py new file mode 100644 index 0000000..7236524 --- /dev/null +++ b/test/test_assessment_frida_script.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_frida_script import AssessmentFridaScript + +class TestAssessmentFridaScript(unittest.TestCase): + """AssessmentFridaScript unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssessmentFridaScript: + """Test AssessmentFridaScript + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentFridaScript` + """ + model = AssessmentFridaScript() + if include_optional: + return AssessmentFridaScript( + id = '', + name = '' + ) + else: + return AssessmentFridaScript( + id = '', + name = '', + ) + """ + + def testAssessmentFridaScript(self): + """Test AssessmentFridaScript""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_history.py b/test/test_assessment_history.py index 05ba832..db9e6cf 100644 --- a/test/test_assessment_history.py +++ b/test/test_assessment_history.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.assessment_history import AssessmentHistory # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.assessment_history import AssessmentHistory class TestAssessmentHistory(unittest.TestCase): """AssessmentHistory unit test stubs""" @@ -28,43 +26,48 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AssessmentHistory: """Test AssessmentHistory - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.assessment_history.AssessmentHistory() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AssessmentHistory` + """ + model = AssessmentHistory() + if include_optional: return AssessmentHistory( - total = 1.337, - count = 1.337, - limit = 1.337, - offset = 1.337, results = [ - corellium_api.models.assessment_history_line_item.AssessmentHistoryLineItem( - date = 1.337, - complete = 1.337, - incomplete = 1.337, ) - ] + corellium.models.assessment_history_results_inner.AssessmentHistory_results_inner( + date = 'Jul 2025', + complete = 15, + incomplete = 3, ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True ) - else : + else: return AssessmentHistory( - total = 1.337, - count = 1.337, - limit = 1.337, - offset = 1.337, results = [ - corellium_api.models.assessment_history_line_item.AssessmentHistoryLineItem( - date = 1.337, - complete = 1.337, - incomplete = 1.337, ) + corellium.models.assessment_history_results_inner.AssessmentHistory_results_inner( + date = 'Jul 2025', + complete = 15, + incomplete = 3, ) ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, ) + """ def testAssessmentHistory(self): """Test AssessmentHistory""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assessment_history_line_item.py b/test/test_assessment_history_line_item.py index 8cc70d2..175f68e 100644 --- a/test/test_assessment_history_line_item.py +++ b/test/test_assessment_history_line_item.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.assessment_history_line_item import AssessmentHistoryLineItem # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.assessment_history_line_item import AssessmentHistoryLineItem class TestAssessmentHistoryLineItem(unittest.TestCase): """AssessmentHistoryLineItem unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AssessmentHistoryLineItem: """Test AssessmentHistoryLineItem - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.assessment_history_line_item.AssessmentHistoryLineItem() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AssessmentHistoryLineItem` + """ + model = AssessmentHistoryLineItem() + if include_optional: return AssessmentHistoryLineItem( - date = 1.337, - complete = 1.337, + var_date = 1.337, + complete = 1.337, incomplete = 1.337 ) - else : + else: return AssessmentHistoryLineItem( - date = 1.337, + var_date = 1.337, complete = 1.337, incomplete = 1.337, ) + """ def testAssessmentHistoryLineItem(self): """Test AssessmentHistoryLineItem""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_assessment_history_results_inner.py b/test/test_assessment_history_results_inner.py new file mode 100644 index 0000000..55b0b44 --- /dev/null +++ b/test/test_assessment_history_results_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_history_results_inner import AssessmentHistoryResultsInner + +class TestAssessmentHistoryResultsInner(unittest.TestCase): + """AssessmentHistoryResultsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssessmentHistoryResultsInner: + """Test AssessmentHistoryResultsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentHistoryResultsInner` + """ + model = AssessmentHistoryResultsInner() + if include_optional: + return AssessmentHistoryResultsInner( + var_date = 'Jul 2025', + complete = 15, + incomplete = 3 + ) + else: + return AssessmentHistoryResultsInner( + var_date = 'Jul 2025', + complete = 15, + incomplete = 3, + ) + """ + + def testAssessmentHistoryResultsInner(self): + """Test AssessmentHistoryResultsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_history_v1.py b/test/test_assessment_history_v1.py new file mode 100644 index 0000000..775615d --- /dev/null +++ b/test/test_assessment_history_v1.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_history_v1 import AssessmentHistoryV1 + +class TestAssessmentHistoryV1(unittest.TestCase): + """AssessmentHistoryV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssessmentHistoryV1: + """Test AssessmentHistoryV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentHistoryV1` + """ + model = AssessmentHistoryV1() + if include_optional: + return AssessmentHistoryV1( + total = 1.337, + count = 1.337, + limit = 1.337, + offset = 1.337, + results = [ + corellium.models.assessment_history_line_item.AssessmentHistoryLineItem( + date = 1.337, + complete = 1.337, + incomplete = 1.337, ) + ] + ) + else: + return AssessmentHistoryV1( + total = 1.337, + count = 1.337, + limit = 1.337, + offset = 1.337, + results = [ + corellium.models.assessment_history_line_item.AssessmentHistoryLineItem( + date = 1.337, + complete = 1.337, + incomplete = 1.337, ) + ], + ) + """ + + def testAssessmentHistoryV1(self): + """Test AssessmentHistoryV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_id_status.py b/test/test_assessment_id_status.py index beef4a8..4c403df 100644 --- a/test/test_assessment_id_status.py +++ b/test/test_assessment_id_status.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.assessment_id_status import AssessmentIdStatus # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.assessment_id_status import AssessmentIdStatus class TestAssessmentIdStatus(unittest.TestCase): """AssessmentIdStatus unit test stubs""" @@ -28,6 +26,26 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> AssessmentIdStatus: + """Test AssessmentIdStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentIdStatus` + """ + model = AssessmentIdStatus() + if include_optional: + return AssessmentIdStatus( + id = '', + status = 'complete' + ) + else: + return AssessmentIdStatus( + id = '', + status = 'complete', + ) + """ + def testAssessmentIdStatus(self): """Test AssessmentIdStatus""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/test/test_assessment_metadata.py b/test/test_assessment_metadata.py new file mode 100644 index 0000000..dec37e7 --- /dev/null +++ b/test/test_assessment_metadata.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_metadata import AssessmentMetadata + +class TestAssessmentMetadata(unittest.TestCase): + """AssessmentMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssessmentMetadata: + """Test AssessmentMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentMetadata` + """ + model = AssessmentMetadata() + if include_optional: + return AssessmentMetadata( + corellium_version = '6.4.0' + ) + else: + return AssessmentMetadata( + ) + """ + + def testAssessmentMetadata(self): + """Test AssessmentMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_results.py b/test/test_assessment_results.py new file mode 100644 index 0000000..512ca14 --- /dev/null +++ b/test/test_assessment_results.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_results import AssessmentResults + +class TestAssessmentResults(unittest.TestCase): + """AssessmentResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssessmentResults: + """Test AssessmentResults + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentResults` + """ + model = AssessmentResults() + if include_optional: + return AssessmentResults( + var_pass = 56, + fail = 56, + error = 56, + info = 56, + na = 56, + artifact = 56, + score = 56 + ) + else: + return AssessmentResults( + var_pass = 56, + fail = 56, + error = 56, + info = 56, + na = 56, + artifact = 56, + score = 56, + ) + """ + + def testAssessmentResults(self): + """Test AssessmentResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_severity_counts.py b/test/test_assessment_severity_counts.py new file mode 100644 index 0000000..dec8d47 --- /dev/null +++ b/test/test_assessment_severity_counts.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_severity_counts import AssessmentSeverityCounts + +class TestAssessmentSeverityCounts(unittest.TestCase): + """AssessmentSeverityCounts unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssessmentSeverityCounts: + """Test AssessmentSeverityCounts + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentSeverityCounts` + """ + model = AssessmentSeverityCounts() + if include_optional: + return AssessmentSeverityCounts( + high = 56, + medium = 56, + low = 56, + info = 56 + ) + else: + return AssessmentSeverityCounts( + high = 56, + medium = 56, + low = 56, + info = 56, + ) + """ + + def testAssessmentSeverityCounts(self): + """Test AssessmentSeverityCounts""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_status.py b/test/test_assessment_status.py new file mode 100644 index 0000000..e93b18a --- /dev/null +++ b/test/test_assessment_status.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_status import AssessmentStatus + +class TestAssessmentStatus(unittest.TestCase): + """AssessmentStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssessmentStatus(self): + """Test AssessmentStatus""" + # inst = AssessmentStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessment_wordlist.py b/test/test_assessment_wordlist.py new file mode 100644 index 0000000..6adda0a --- /dev/null +++ b/test/test_assessment_wordlist.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.assessment_wordlist import AssessmentWordlist + +class TestAssessmentWordlist(unittest.TestCase): + """AssessmentWordlist unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssessmentWordlist: + """Test AssessmentWordlist + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AssessmentWordlist` + """ + model = AssessmentWordlist() + if include_optional: + return AssessmentWordlist( + id = '', + name = '' + ) + else: + return AssessmentWordlist( + id = '', + name = '', + ) + """ + + def testAssessmentWordlist(self): + """Test AssessmentWordlist""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessments_api.py b/test/test_assessments_api.py new file mode 100644 index 0000000..3c17205 --- /dev/null +++ b/test/test_assessments_api.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.assessments_api import AssessmentsApi + + +class TestAssessmentsApi(unittest.TestCase): + """AssessmentsApi unit test stubs""" + + def setUp(self) -> None: + self.api = AssessmentsApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_assessment(self) -> None: + """Test case for v3_create_assessment + + Create an assessment. + """ + pass + + def test_v3_create_report_modification(self) -> None: + """Test case for v3_create_report_modification + + Create report modifications. + """ + pass + + def test_v3_delete_assessment(self) -> None: + """Test case for v3_delete_assessment + + Delete an assessment. + """ + pass + + def test_v3_delete_report_modification(self) -> None: + """Test case for v3_delete_report_modification + + Delete report modifications. + """ + pass + + def test_v3_download_report(self) -> None: + """Test case for v3_download_report + + Download an assessment report. + """ + pass + + def test_v3_get_assessment_by_id(self) -> None: + """Test case for v3_get_assessment_by_id + + Get an assessment by ID. + """ + pass + + def test_v3_get_assessments_by_instance_id(self) -> None: + """Test case for v3_get_assessments_by_instance_id + + List assessments for an instance. + """ + pass + + def test_v3_patch_assessment(self) -> None: + """Test case for v3_patch_assessment + + Update an assessment status. + """ + pass + + def test_v3_run_tests(self) -> None: + """Test case for v3_run_tests + + Run assessment tests. + """ + pass + + def test_v3_start_monitoring(self) -> None: + """Test case for v3_start_monitoring + + Start assessment monitoring. + """ + pass + + def test_v3_stop_monitoring(self) -> None: + """Test case for v3_stop_monitoring + + Stop assessment monitoring. + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_assessments_v1_api.py b/test/test_assessments_v1_api.py new file mode 100644 index 0000000..7d2280c --- /dev/null +++ b/test/test_assessments_v1_api.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.assessments_v1_api import AssessmentsV1Api + + +class TestAssessmentsV1Api(unittest.TestCase): + """AssessmentsV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = AssessmentsV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_create_assessment(self) -> None: + """Test case for v1_create_assessment + + Create an assessment. + """ + pass + + def test_v1_create_report_modification(self) -> None: + """Test case for v1_create_report_modification + + Create report modifications. + """ + pass + + def test_v1_delete_assessment(self) -> None: + """Test case for v1_delete_assessment + + Delete an assessment. + """ + pass + + def test_v1_delete_report_modification(self) -> None: + """Test case for v1_delete_report_modification + + Delete report modifications. + """ + pass + + def test_v1_download_report(self) -> None: + """Test case for v1_download_report + + Download an assessment report. + """ + pass + + def test_v1_get_assessment_by_id(self) -> None: + """Test case for v1_get_assessment_by_id + + Get an assessment by ID. + """ + pass + + def test_v1_get_assessments_by_instance_id(self) -> None: + """Test case for v1_get_assessments_by_instance_id + + List assessments for an instance. + """ + pass + + def test_v1_patch_assessment(self) -> None: + """Test case for v1_patch_assessment + + Update an assessment status. + """ + pass + + def test_v1_run_tests(self) -> None: + """Test case for v1_run_tests + + Run assessment tests. + """ + pass + + def test_v1_start_monitoring(self) -> None: + """Test case for v1_start_monitoring + + Start assessment monitoring. + """ + pass + + def test_v1_stop_monitoring(self) -> None: + """Test case for v1_stop_monitoring + + Stop assessment monitoring. + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attach_interface_body.py b/test/test_attach_interface_body.py new file mode 100644 index 0000000..a691a28 --- /dev/null +++ b/test/test_attach_interface_body.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.attach_interface_body import AttachInterfaceBody + +class TestAttachInterfaceBody(unittest.TestCase): + """AttachInterfaceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AttachInterfaceBody: + """Test AttachInterfaceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AttachInterfaceBody` + """ + model = AttachInterfaceBody() + if include_optional: + return AttachInterfaceBody( + interface_id = 'gpio/0', + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' + ) + else: + return AttachInterfaceBody( + interface_id = 'gpio/0', + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + ) + """ + + def testAttachInterfaceBody(self): + """Test AttachInterfaceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attach_interface_request.py b/test/test_attach_interface_request.py index b4bd0ed..13e08be 100644 --- a/test/test_attach_interface_request.py +++ b/test/test_attach_interface_request.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.attach_interface_request import AttachInterfaceRequest # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.attach_interface_request import AttachInterfaceRequest class TestAttachInterfaceRequest(unittest.TestCase): """AttachInterfaceRequest unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AttachInterfaceRequest: """Test AttachInterfaceRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.attach_interface_request.AttachInterfaceRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AttachInterfaceRequest` + """ + model = AttachInterfaceRequest() + if include_optional: return AttachInterfaceRequest( - interface_id = '', + interface_id = '', interconnect_id = '' ) - else : + else: return AttachInterfaceRequest( interface_id = '', interconnect_id = '', ) + """ def testAttachInterfaceRequest(self): """Test AttachInterfaceRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_auth_provider.py b/test/test_auth_provider.py index 7ac8762..b48a2d7 100644 --- a/test/test_auth_provider.py +++ b/test/test_auth_provider.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.auth_provider import AuthProvider # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.auth_provider import AuthProvider class TestAuthProvider(unittest.TestCase): """AuthProvider unit test stubs""" @@ -28,32 +26,40 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> AuthProvider: """Test AuthProvider - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.auth_provider.AuthProvider() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `AuthProvider` + """ + model = AuthProvider() + if include_optional: return AuthProvider( - name = '', - identifier = '', - provider_type = '', - default = True, - label = '', - enabled = True, - authorization_url = '', - id = '', - provider = '' + identifier = 'sso.example.com', + provider_type = 'open-id-connect', + enabled = True, + default = False, + label = 'Log in with Okta', + name = 'Okta', + authorization_url = '/api/v3/auth/providers/sso.example.com/authorization_url' ) - else : + else: return AuthProvider( + identifier = 'sso.example.com', + provider_type = 'open-id-connect', + enabled = True, + default = False, + label = 'Log in with Okta', + name = 'Okta', + authorization_url = '/api/v3/auth/providers/sso.example.com/authorization_url', ) + """ def testAuthProvider(self): """Test AuthProvider""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_auth_provider_type.py b/test/test_auth_provider_type.py new file mode 100644 index 0000000..3fe0547 --- /dev/null +++ b/test/test_auth_provider_type.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.auth_provider_type import AuthProviderType + +class TestAuthProviderType(unittest.TestCase): + """AuthProviderType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthProviderType: + """Test AuthProviderType + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthProviderType` + """ + model = AuthProviderType() + if include_optional: + return AuthProviderType( + provider_type = 'open-id-connect', + var_schema = {"type":"object","properties":{"providerType":{"type":"string","const":"open-id-connect"},"enabled":{"type":"boolean"},"default":{"type":"boolean","readOnly":true},"label":{"type":["string","null"]},"config":{"type":"object","properties":{"discoveryUrl":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"invitedOnly":{"type":"boolean","default":false}},"required":["discoveryUrl","clientId","clientSecret"],"additionalProperties":false,"writeOnly":true}},"required":["providerType","enabled","config"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"} + ) + else: + return AuthProviderType( + provider_type = 'open-id-connect', + var_schema = {"type":"object","properties":{"providerType":{"type":"string","const":"open-id-connect"},"enabled":{"type":"boolean"},"default":{"type":"boolean","readOnly":true},"label":{"type":["string","null"]},"config":{"type":"object","properties":{"discoveryUrl":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"invitedOnly":{"type":"boolean","default":false}},"required":["discoveryUrl","clientId","clientSecret"],"additionalProperties":false,"writeOnly":true}},"required":["providerType","enabled","config"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}, + ) + """ + + def testAuthProviderType(self): + """Test AuthProviderType""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_provider_types_list_response.py b/test/test_auth_provider_types_list_response.py new file mode 100644 index 0000000..56bd872 --- /dev/null +++ b/test/test_auth_provider_types_list_response.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.auth_provider_types_list_response import AuthProviderTypesListResponse + +class TestAuthProviderTypesListResponse(unittest.TestCase): + """AuthProviderTypesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthProviderTypesListResponse: + """Test AuthProviderTypesListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthProviderTypesListResponse` + """ + model = AuthProviderTypesListResponse() + if include_optional: + return AuthProviderTypesListResponse( + results = [ + corellium.models.auth_provider_type.AuthProviderType( + provider_type = 'open-id-connect', + schema = {"type":"object","properties":{"providerType":{"type":"string","const":"open-id-connect"},"enabled":{"type":"boolean"},"default":{"type":"boolean","readOnly":true},"label":{"type":["string","null"]},"config":{"type":"object","properties":{"discoveryUrl":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"invitedOnly":{"type":"boolean","default":false}},"required":["discoveryUrl","clientId","clientSecret"],"additionalProperties":false,"writeOnly":true}},"required":["providerType","enabled","config"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}, ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return AuthProviderTypesListResponse( + results = [ + corellium.models.auth_provider_type.AuthProviderType( + provider_type = 'open-id-connect', + schema = {"type":"object","properties":{"providerType":{"type":"string","const":"open-id-connect"},"enabled":{"type":"boolean"},"default":{"type":"boolean","readOnly":true},"label":{"type":["string","null"]},"config":{"type":"object","properties":{"discoveryUrl":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"invitedOnly":{"type":"boolean","default":false}},"required":["discoveryUrl","clientId","clientSecret"],"additionalProperties":false,"writeOnly":true}},"required":["providerType","enabled","config"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}, ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testAuthProviderTypesListResponse(self): + """Test AuthProviderTypesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_provider_v1.py b/test/test_auth_provider_v1.py new file mode 100644 index 0000000..71ace77 --- /dev/null +++ b/test/test_auth_provider_v1.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.auth_provider_v1 import AuthProviderV1 + +class TestAuthProviderV1(unittest.TestCase): + """AuthProviderV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthProviderV1: + """Test AuthProviderV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthProviderV1` + """ + model = AuthProviderV1() + if include_optional: + return AuthProviderV1( + name = '', + identifier = '', + provider_type = '', + default = True, + label = '', + enabled = True, + authorization_url = '', + id = '', + provider = '' + ) + else: + return AuthProviderV1( + ) + """ + + def testAuthProviderV1(self): + """Test AuthProviderV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_providers_list_response.py b/test/test_auth_providers_list_response.py new file mode 100644 index 0000000..4504b1b --- /dev/null +++ b/test/test_auth_providers_list_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.auth_providers_list_response import AuthProvidersListResponse + +class TestAuthProvidersListResponse(unittest.TestCase): + """AuthProvidersListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthProvidersListResponse: + """Test AuthProvidersListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthProvidersListResponse` + """ + model = AuthProvidersListResponse() + if include_optional: + return AuthProvidersListResponse( + results = [ + corellium.models.auth_provider.AuthProvider( + identifier = 'sso.example.com', + provider_type = 'open-id-connect', + enabled = True, + default = False, + label = 'Log in with Okta', + name = 'Okta', + authorization_url = '/api/v3/auth/providers/sso.example.com/authorization_url', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return AuthProvidersListResponse( + results = [ + corellium.models.auth_provider.AuthProvider( + identifier = 'sso.example.com', + provider_type = 'open-id-connect', + enabled = True, + default = False, + label = 'Log in with Okta', + name = 'Okta', + authorization_url = '/api/v3/auth/providers/sso.example.com/authorization_url', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testAuthProvidersListResponse(self): + """Test AuthProvidersListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_authentication_api.py b/test/test_authentication_api.py new file mode 100644 index 0000000..bddf81e --- /dev/null +++ b/test/test_authentication_api.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.authentication_api import AuthenticationApi + + +class TestAuthenticationApi(unittest.TestCase): + """AuthenticationApi unit test stubs""" + + def setUp(self) -> None: + self.api = AuthenticationApi() + + def tearDown(self) -> None: + pass + + def test_v3_auth_login(self) -> None: + """Test case for v3_auth_login + + Log in + """ + pass + + def test_v3_auth_logout(self) -> None: + """Test case for v3_auth_logout + + Log out + """ + pass + + def test_v3_delete_api_token(self) -> None: + """Test case for v3_delete_api_token + + Delete API token + """ + pass + + def test_v3_fetch_auth_provider_metadata(self) -> None: + """Test case for v3_fetch_auth_provider_metadata + + Fetch SAML metadata + """ + pass + + def test_v3_generate_api_token(self) -> None: + """Test case for v3_generate_api_token + + Generate API token + """ + pass + + def test_v3_get_auth_provider_authorization_url(self) -> None: + """Test case for v3_get_auth_provider_authorization_url + + Get provider authorization URL + """ + pass + + def test_v3_get_auth_provider_callback(self) -> None: + """Test case for v3_get_auth_provider_callback + + Authentication provider callback (GET) + """ + pass + + def test_v3_get_auth_provider_sp_metadata(self) -> None: + """Test case for v3_get_auth_provider_sp_metadata + + Get service provider metadata + """ + pass + + def test_v3_list_auth_provider_types(self) -> None: + """Test case for v3_list_auth_provider_types + + List authentication provider types + """ + pass + + def test_v3_list_auth_providers(self) -> None: + """Test case for v3_list_auth_providers + + List authentication providers + """ + pass + + def test_v3_post_auth_provider_callback(self) -> None: + """Test case for v3_post_auth_provider_callback + + Authentication provider callback (POST) + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_authentication_v1_api.py b/test/test_authentication_v1_api.py new file mode 100644 index 0000000..50c04bc --- /dev/null +++ b/test/test_authentication_v1_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.authentication_v1_api import AuthenticationV1Api + + +class TestAuthenticationV1Api(unittest.TestCase): + """AuthenticationV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = AuthenticationV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_auth_login(self) -> None: + """Test case for v1_auth_login + + Log In + """ + pass + + def test_v1_delete_api_token(self) -> None: + """Test case for v1_delete_api_token + + Delete API token + """ + pass + + def test_v1_generate_api_token(self) -> None: + """Test case for v1_generate_api_token + + Generate API token + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_available_plans_list_response.py b/test/test_available_plans_list_response.py new file mode 100644 index 0000000..9541f2d --- /dev/null +++ b/test/test_available_plans_list_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.available_plans_list_response import AvailablePlansListResponse + +class TestAvailablePlansListResponse(unittest.TestCase): + """AvailablePlansListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AvailablePlansListResponse: + """Test AvailablePlansListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AvailablePlansListResponse` + """ + model = AvailablePlansListResponse() + if include_optional: + return AvailablePlansListResponse( + results = [ + corellium.models.plan.Plan( + id = 'prod_xxxxxxxxxxxxxx', + name = 'Professional', + cores = 12, + devices = 5, + billing_type = 'metered', + unit_amount = 99500, + period = 'month', + additional_price_description = '100 hours device usage included, $8.00 per device per hour after that', + price_id = 'price_xxxxxxxxxxxxxx', + cancel_policy = 'period_end', + aws_marketplace_url = 'https://aws.amazon.com/marketplace/pp/prodview-abc123xyz', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return AvailablePlansListResponse( + results = [ + corellium.models.plan.Plan( + id = 'prod_xxxxxxxxxxxxxx', + name = 'Professional', + cores = 12, + devices = 5, + billing_type = 'metered', + unit_amount = 99500, + period = 'month', + additional_price_description = '100 hours device usage included, $8.00 per device per hour after that', + price_id = 'price_xxxxxxxxxxxxxx', + cancel_policy = 'period_end', + aws_marketplace_url = 'https://aws.amazon.com/marketplace/pp/prodview-abc123xyz', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testAvailablePlansListResponse(self): + """Test AvailablePlansListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_available_trial_plan.py b/test/test_available_trial_plan.py new file mode 100644 index 0000000..533a8e8 --- /dev/null +++ b/test/test_available_trial_plan.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.available_trial_plan import AvailableTrialPlan + +class TestAvailableTrialPlan(unittest.TestCase): + """AvailableTrialPlan unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AvailableTrialPlan: + """Test AvailableTrialPlan + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AvailableTrialPlan` + """ + model = AvailableTrialPlan() + if include_optional: + return AvailableTrialPlan( + product_id = 'prod_ExampleProductId', + name = 'Enterprise Trial', + license = 'enterprise', + workspace = True, + cores = 12, + devices = 1, + trial_duration = 14 + ) + else: + return AvailableTrialPlan( + product_id = 'prod_ExampleProductId', + name = 'Enterprise Trial', + license = 'enterprise', + workspace = True, + cores = 12, + devices = 1, + trial_duration = 14, + ) + """ + + def testAvailableTrialPlan(self): + """Test AvailableTrialPlan""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_available_trial_plan_list.py b/test/test_available_trial_plan_list.py new file mode 100644 index 0000000..cbdd6cd --- /dev/null +++ b/test/test_available_trial_plan_list.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.available_trial_plan_list import AvailableTrialPlanList + +class TestAvailableTrialPlanList(unittest.TestCase): + """AvailableTrialPlanList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AvailableTrialPlanList: + """Test AvailableTrialPlanList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AvailableTrialPlanList` + """ + model = AvailableTrialPlanList() + if include_optional: + return AvailableTrialPlanList( + results = [ + corellium.models.available_trial_plan.AvailableTrialPlan( + product_id = 'prod_ExampleProductId', + name = 'Enterprise Trial', + license = 'enterprise', + workspace = True, + cores = 12, + devices = 1, + trial_duration = 14, ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return AvailableTrialPlanList( + results = [ + corellium.models.available_trial_plan.AvailableTrialPlan( + product_id = 'prod_ExampleProductId', + name = 'Enterprise Trial', + license = 'enterprise', + workspace = True, + cores = 12, + devices = 1, + trial_duration = 14, ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testAvailableTrialPlanList(self): + """Test AvailableTrialPlanList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_aws_create_response.py b/test/test_aws_create_response.py new file mode 100644 index 0000000..a161b0e --- /dev/null +++ b/test/test_aws_create_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.aws_create_response import AwsCreateResponse + +class TestAwsCreateResponse(unittest.TestCase): + """AwsCreateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AwsCreateResponse: + """Test AwsCreateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AwsCreateResponse` + """ + model = AwsCreateResponse() + if include_optional: + return AwsCreateResponse( + ready = True, + is_authed = True + ) + else: + return AwsCreateResponse( + ready = True, + is_authed = True, + ) + """ + + def testAwsCreateResponse(self): + """Test AwsCreateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_billing_api.py b/test/test_billing_api.py new file mode 100644 index 0000000..a0b138a --- /dev/null +++ b/test/test_billing_api.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.billing_api import BillingApi + + +class TestBillingApi(unittest.TestCase): + """BillingApi unit test stubs""" + + def setUp(self) -> None: + self.api = BillingApi() + + def tearDown(self) -> None: + pass + + def test_v3_cancel_subscription(self) -> None: + """Test case for v3_cancel_subscription + + Cancel a subscription + """ + pass + + def test_v3_get_billing_summary(self) -> None: + """Test case for v3_get_billing_summary + + Get billing summary + """ + pass + + def test_v3_get_device_usage(self) -> None: + """Test case for v3_get_device_usage + + Get device usage + """ + pass + + def test_v3_get_metered_subscription_usage(self) -> None: + """Test case for v3_get_metered_subscription_usage + + Get metered subscription usage + """ + pass + + def test_v3_get_subscription(self) -> None: + """Test case for v3_get_subscription + + Get the current subscription + """ + pass + + def test_v3_subscribe_to_trial(self) -> None: + """Test case for v3_subscribe_to_trial + + Subscribe to a trial + """ + pass + + def test_v3_uncancel_subscription(self) -> None: + """Test case for v3_uncancel_subscription + + Uncancel a subscription + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_billing_line_item.py b/test/test_billing_line_item.py new file mode 100644 index 0000000..0559ffa --- /dev/null +++ b/test/test_billing_line_item.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.billing_line_item import BillingLineItem + +class TestBillingLineItem(unittest.TestCase): + """BillingLineItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BillingLineItem: + """Test BillingLineItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BillingLineItem` + """ + model = BillingLineItem() + if include_optional: + return BillingLineItem( + type = 'On', + name = 'iPhone 13 Pro on per hour', + short_name = 'iPhone 13 Pro', + description = 'my-device, OS version 17.5, OS build 21F79', + quantity = 6.25, + unit_cost = 8 + ) + else: + return BillingLineItem( + type = 'On', + name = 'iPhone 13 Pro on per hour', + short_name = 'iPhone 13 Pro', + description = 'my-device, OS version 17.5, OS build 21F79', + quantity = 6.25, + unit_cost = 8, + ) + """ + + def testBillingLineItem(self): + """Test BillingLineItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_billing_summary.py b/test/test_billing_summary.py new file mode 100644 index 0000000..af805c3 --- /dev/null +++ b/test/test_billing_summary.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.billing_summary import BillingSummary + +class TestBillingSummary(unittest.TestCase): + """BillingSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BillingSummary: + """Test BillingSummary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BillingSummary` + """ + model = BillingSummary() + if include_optional: + return BillingSummary( + pending_usage_based = corellium.models.billing_summary_pending_usage_based.BillingSummary_pendingUsageBased( + last_bill_date = 1773479567000, + next_bill_date = 1774084367000, + billing_threshold = 100, + total = '49.99', + line_items = [ + corellium.models.billing_line_item.BillingLineItem( + type = 'On', + name = 'iPhone 13 Pro on per hour', + short_name = 'iPhone 13 Pro', + description = 'my-device, OS version 17.5, OS build 21F79', + quantity = 6.25, + unit_cost = 8, ) + ], ) + ) + else: + return BillingSummary( + pending_usage_based = corellium.models.billing_summary_pending_usage_based.BillingSummary_pendingUsageBased( + last_bill_date = 1773479567000, + next_bill_date = 1774084367000, + billing_threshold = 100, + total = '49.99', + line_items = [ + corellium.models.billing_line_item.BillingLineItem( + type = 'On', + name = 'iPhone 13 Pro on per hour', + short_name = 'iPhone 13 Pro', + description = 'my-device, OS version 17.5, OS build 21F79', + quantity = 6.25, + unit_cost = 8, ) + ], ), + ) + """ + + def testBillingSummary(self): + """Test BillingSummary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_billing_summary_pending_usage_based.py b/test/test_billing_summary_pending_usage_based.py new file mode 100644 index 0000000..fbd04fd --- /dev/null +++ b/test/test_billing_summary_pending_usage_based.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.billing_summary_pending_usage_based import BillingSummaryPendingUsageBased + +class TestBillingSummaryPendingUsageBased(unittest.TestCase): + """BillingSummaryPendingUsageBased unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BillingSummaryPendingUsageBased: + """Test BillingSummaryPendingUsageBased + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BillingSummaryPendingUsageBased` + """ + model = BillingSummaryPendingUsageBased() + if include_optional: + return BillingSummaryPendingUsageBased( + last_bill_date = 1773479567000, + next_bill_date = 1774084367000, + billing_threshold = 100, + total = '49.99', + line_items = [ + corellium.models.billing_line_item.BillingLineItem( + type = 'On', + name = 'iPhone 13 Pro on per hour', + short_name = 'iPhone 13 Pro', + description = 'my-device, OS version 17.5, OS build 21F79', + quantity = 6.25, + unit_cost = 8, ) + ] + ) + else: + return BillingSummaryPendingUsageBased( + last_bill_date = 1773479567000, + next_bill_date = 1774084367000, + billing_threshold = 100, + total = '49.99', + line_items = [ + corellium.models.billing_line_item.BillingLineItem( + type = 'On', + name = 'iPhone 13 Pro on per hour', + short_name = 'iPhone 13 Pro', + description = 'my-device, OS version 17.5, OS build 21F79', + quantity = 6.25, + unit_cost = 8, ) + ], + ) + """ + + def testBillingSummaryPendingUsageBased(self): + """Test BillingSummaryPendingUsageBased""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bit.py b/test/test_bit.py index b190923..28309fa 100644 --- a/test/test_bit.py +++ b/test/test_bit.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.bit import Bit # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.bit import Bit class TestBit(unittest.TestCase): """Bit unit test stubs""" @@ -28,23 +26,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test Bit - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.bit.Bit() # noqa: E501 - if include_optional : - return Bit( - ) - else : - return Bit( - ) - def testBit(self): """Test Bit""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst = Bit() if __name__ == '__main__': unittest.main() diff --git a/test/test_btrace_enable_options.py b/test/test_btrace_enable_options.py index b30faa9..df40fbf 100644 --- a/test/test_btrace_enable_options.py +++ b/test/test_btrace_enable_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.btrace_enable_options import BtraceEnableOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.btrace_enable_options import BtraceEnableOptions class TestBtraceEnableOptions(unittest.TestCase): """BtraceEnableOptions unit test stubs""" @@ -28,13 +26,15 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> BtraceEnableOptions: """Test BtraceEnableOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.btrace_enable_options.BtraceEnableOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `BtraceEnableOptions` + """ + model = BtraceEnableOptions() + if include_optional: return BtraceEnableOptions( ranges = [ [ @@ -42,14 +42,15 @@ def make_instance(self, include_optional): ] ] ) - else : + else: return BtraceEnableOptions( ) + """ def testBtraceEnableOptions(self): """Test BtraceEnableOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_button.py b/test/test_button.py index 543edd7..cce26b0 100644 --- a/test/test_button.py +++ b/test/test_button.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.button import Button # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.button import Button class TestButton(unittest.TestCase): """Button unit test stubs""" @@ -28,23 +26,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test Button - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.button.Button() # noqa: E501 - if include_optional : - return Button( - ) - else : - return Button( - ) - def testButton(self): """Test Button""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst = Button() if __name__ == '__main__': unittest.main() diff --git a/test/test_cancel_subscription_body.py b/test/test_cancel_subscription_body.py new file mode 100644 index 0000000..cc215be --- /dev/null +++ b/test/test_cancel_subscription_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cancel_subscription_body import CancelSubscriptionBody + +class TestCancelSubscriptionBody(unittest.TestCase): + """CancelSubscriptionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CancelSubscriptionBody: + """Test CancelSubscriptionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CancelSubscriptionBody` + """ + model = CancelSubscriptionBody() + if include_optional: + return CancelSubscriptionBody( + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + delete_domain = False + ) + else: + return CancelSubscriptionBody( + ) + """ + + def testCancelSubscriptionBody(self): + """Test CancelSubscriptionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_change_password_body.py b/test/test_change_password_body.py new file mode 100644 index 0000000..65a955b --- /dev/null +++ b/test/test_change_password_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.change_password_body import ChangePasswordBody + +class TestChangePasswordBody(unittest.TestCase): + """ChangePasswordBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChangePasswordBody: + """Test ChangePasswordBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChangePasswordBody` + """ + model = ChangePasswordBody() + if include_optional: + return ChangePasswordBody( + user = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + old_password = '', + new_password = '' + ) + else: + return ChangePasswordBody( + user = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + old_password = '', + new_password = '', + ) + """ + + def testChangePasswordBody(self): + """Test ChangePasswordBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_charm_tag.py b/test/test_charm_tag.py new file mode 100644 index 0000000..8f8b7ed --- /dev/null +++ b/test/test_charm_tag.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.charm_tag import CharmTag + +class TestCharmTag(unittest.TestCase): + """CharmTag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCharmTag(self): + """Test CharmTag""" + # inst = CharmTag() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_check_subdomain_response.py b/test/test_check_subdomain_response.py index 4fb86c6..6e39d6a 100644 --- a/test/test_check_subdomain_response.py +++ b/test/test_check_subdomain_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.check_subdomain_response import CheckSubdomainResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.check_subdomain_response import CheckSubdomainResponse class TestCheckSubdomainResponse(unittest.TestCase): """CheckSubdomainResponse unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CheckSubdomainResponse: """Test CheckSubdomainResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.check_subdomain_response.CheckSubdomainResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CheckSubdomainResponse` + """ + model = CheckSubdomainResponse() + if include_optional: return CheckSubdomainResponse( available = True ) - else : + else: return CheckSubdomainResponse( available = True, ) + """ def testCheckSubdomainResponse(self): """Test CheckSubdomainResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_check_subdomain_response_v1.py b/test/test_check_subdomain_response_v1.py new file mode 100644 index 0000000..37845b0 --- /dev/null +++ b/test/test_check_subdomain_response_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.check_subdomain_response_v1 import CheckSubdomainResponseV1 + +class TestCheckSubdomainResponseV1(unittest.TestCase): + """CheckSubdomainResponseV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CheckSubdomainResponseV1: + """Test CheckSubdomainResponseV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CheckSubdomainResponseV1` + """ + model = CheckSubdomainResponseV1() + if include_optional: + return CheckSubdomainResponseV1( + available = True + ) + else: + return CheckSubdomainResponseV1( + available = True, + ) + """ + + def testCheckSubdomainResponseV1(self): + """Test CheckSubdomainResponseV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cloud_notification_item.py b/test/test_cloud_notification_item.py new file mode 100644 index 0000000..76b4b2b --- /dev/null +++ b/test/test_cloud_notification_item.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cloud_notification_item import CloudNotificationItem + +class TestCloudNotificationItem(unittest.TestCase): + """CloudNotificationItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CloudNotificationItem: + """Test CloudNotificationItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CloudNotificationItem` + """ + model = CloudNotificationItem() + if include_optional: + return CloudNotificationItem( + identifier = '4f634e6a-189d-42eb-9bee-794df1f588d1', + admin_only = True, + quiet = False, + scope = 'project.1c41b1bc-4f53-48a8-b690-ad30611e1960', + level = 1, + title = 'Trial ended for acme.corellium.com', + message = 'The trial subscription for acme.corellium.com is now ended.', + metadata = {"tags":["billing"]}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return CloudNotificationItem( + identifier = '4f634e6a-189d-42eb-9bee-794df1f588d1', + admin_only = True, + quiet = False, + scope = 'project.1c41b1bc-4f53-48a8-b690-ad30611e1960', + level = 1, + title = 'Trial ended for acme.corellium.com', + message = 'The trial subscription for acme.corellium.com is now ended.', + metadata = {"tags":["billing"]}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testCloudNotificationItem(self): + """Test CloudNotificationItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cloud_notification_list.py b/test/test_cloud_notification_list.py new file mode 100644 index 0000000..4441fc7 --- /dev/null +++ b/test/test_cloud_notification_list.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cloud_notification_list import CloudNotificationList + +class TestCloudNotificationList(unittest.TestCase): + """CloudNotificationList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CloudNotificationList: + """Test CloudNotificationList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CloudNotificationList` + """ + model = CloudNotificationList() + if include_optional: + return CloudNotificationList( + results = [ + corellium.models.cloud_notification_item.CloudNotificationItem( + identifier = '4f634e6a-189d-42eb-9bee-794df1f588d1', + admin_only = True, + quiet = False, + scope = 'project.1c41b1bc-4f53-48a8-b690-ad30611e1960', + level = 1, + title = 'Trial ended for acme.corellium.com', + message = 'The trial subscription for acme.corellium.com is now ended.', + metadata = {"tags":["billing"]}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return CloudNotificationList( + results = [ + corellium.models.cloud_notification_item.CloudNotificationItem( + identifier = '4f634e6a-189d-42eb-9bee-794df1f588d1', + admin_only = True, + quiet = False, + scope = 'project.1c41b1bc-4f53-48a8-b690-ad30611e1960', + level = 1, + title = 'Trial ended for acme.corellium.com', + message = 'The trial subscription for acme.corellium.com is now ended.', + metadata = {"tags":["billing"]}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testCloudNotificationList(self): + """Test CloudNotificationList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_administration_config_api.py b/test/test_cluster_administration_config_api.py new file mode 100644 index 0000000..c06edbd --- /dev/null +++ b/test/test_cluster_administration_config_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.cluster_administration_config_api import ClusterAdministrationConfigApi + + +class TestClusterAdministrationConfigApi(unittest.TestCase): + """ClusterAdministrationConfigApi unit test stubs""" + + def setUp(self) -> None: + self.api = ClusterAdministrationConfigApi() + + def tearDown(self) -> None: + pass + + def test_v1_get_cluster_config(self) -> None: + """Test case for v1_get_cluster_config + + Get cluster configuration + """ + pass + + def test_v1_patch_cluster_config(self) -> None: + """Test case for v1_patch_cluster_config + + Update cluster configuration + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_administration_firmware_service_api.py b/test/test_cluster_administration_firmware_service_api.py new file mode 100644 index 0000000..bc1dfea --- /dev/null +++ b/test/test_cluster_administration_firmware_service_api.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.cluster_administration_firmware_service_api import ClusterAdministrationFirmwareServiceApi + + +class TestClusterAdministrationFirmwareServiceApi(unittest.TestCase): + """ClusterAdministrationFirmwareServiceApi unit test stubs""" + + def setUp(self) -> None: + self.api = ClusterAdministrationFirmwareServiceApi() + + def tearDown(self) -> None: + pass + + def test_v1_create_assets_firmware_service(self) -> None: + """Test case for v1_create_assets_firmware_service + + Add firmware assets via the firmware service + """ + pass + + def test_v1_create_image(self) -> None: + """Test case for v1_create_image + + Create a new Image + """ + pass + + def test_v1_delete_asset_firmware_service(self) -> None: + """Test case for v1_delete_asset_firmware_service + + Delete a firmware asset by its URL + """ + pass + + def test_v1_delete_firmware_firmware_service(self) -> None: + """Test case for v1_delete_firmware_firmware_service + + Delete a firmware by filename from the firmware service + """ + pass + + def test_v1_get_asset_extended_firmware_service(self) -> None: + """Test case for v1_get_asset_extended_firmware_service + + Fetch extended firmware-asset details including instances and associated IPSWs + """ + pass + + def test_v1_get_config_firmware_service(self) -> None: + """Test case for v1_get_config_firmware_service + + Fetch firmware service configuration + """ + pass + + def test_v1_get_install_firmware_status(self) -> None: + """Test case for v1_get_install_firmware_status + + Query install firmware request status. + """ + pass + + def test_v1_install_firmware(self) -> None: + """Test case for v1_install_firmware + + Installs a firmware for cluster-wide use + """ + pass + + def test_v1_install_firmware_assets(self) -> None: + """Test case for v1_install_firmware_assets + + Installs firmware assets for cluster-wide use + """ + pass + + def test_v1_list_assets_firmware_service(self) -> None: + """Test case for v1_list_assets_firmware_service + + Fetch firmware assets from the firmware service + """ + pass + + def test_v1_list_devices_firmware_service(self) -> None: + """Test case for v1_list_devices_firmware_service + + Fetch devices from the firmware service + """ + pass + + def test_v1_list_firmwares_firmware_service(self) -> None: + """Test case for v1_list_firmwares_firmware_service + + Fetch firmwares from the firmware service + """ + pass + + def test_v1_patch_config_firmware_service(self) -> None: + """Test case for v1_patch_config_firmware_service + + Update firmware service configuration + """ + pass + + def test_v1_upload_image_data(self) -> None: + """Test case for v1_upload_image_data + + Upload Image Data + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_administration_nodes_api.py b/test/test_cluster_administration_nodes_api.py new file mode 100644 index 0000000..55422b9 --- /dev/null +++ b/test/test_cluster_administration_nodes_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.cluster_administration_nodes_api import ClusterAdministrationNodesApi + + +class TestClusterAdministrationNodesApi(unittest.TestCase): + """ClusterAdministrationNodesApi unit test stubs""" + + def setUp(self) -> None: + self.api = ClusterAdministrationNodesApi() + + def tearDown(self) -> None: + pass + + def test_v1_get_cluster_nodes(self) -> None: + """Test case for v1_get_cluster_nodes + + Get node details by ID + """ + pass + + def test_v1_get_console_cluster_nodes(self) -> None: + """Test case for v1_get_console_cluster_nodes + + Access node console via SSH + """ + pass + + def test_v1_list_cluster_nodes(self) -> None: + """Test case for v1_list_cluster_nodes + + List servers in the cluster + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_api.py b/test/test_cluster_api.py new file mode 100644 index 0000000..32ce627 --- /dev/null +++ b/test/test_cluster_api.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.cluster_api import ClusterApi + + +class TestClusterApi(unittest.TestCase): + """ClusterApi unit test stubs""" + + def setUp(self) -> None: + self.api = ClusterApi() + + def tearDown(self) -> None: + pass + + def test_v3_delete_cluster_snapshot(self) -> None: + """Test case for v3_delete_cluster_snapshot + + Delete cluster snapshot + """ + pass + + def test_v3_get_cluster_config(self) -> None: + """Test case for v3_get_cluster_config + + Get cluster configuration + """ + pass + + def test_v3_get_cluster_node(self) -> None: + """Test case for v3_get_cluster_node + + Get cluster node + """ + pass + + def test_v3_get_cluster_node_console(self) -> None: + """Test case for v3_get_cluster_node_console + + Get node console websocket URL + """ + pass + + def test_v3_get_cluster_snapshot(self) -> None: + """Test case for v3_get_cluster_snapshot + + Get cluster snapshot + """ + pass + + def test_v3_list_cluster_nodes(self) -> None: + """Test case for v3_list_cluster_nodes + + List cluster nodes + """ + pass + + def test_v3_list_cluster_snapshots(self) -> None: + """Test case for v3_list_cluster_snapshots + + List cluster snapshots + """ + pass + + def test_v3_patch_cluster_config(self) -> None: + """Test case for v3_patch_cluster_config + + Update cluster configuration + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config.py b/test/test_cluster_config.py new file mode 100644 index 0000000..93f1bae --- /dev/null +++ b/test/test_cluster_config.py @@ -0,0 +1,327 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config import ClusterConfig + +class TestClusterConfig(unittest.TestCase): + """ClusterConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfig: + """Test ClusterConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfig` + """ + model = ClusterConfig() + if include_optional: + return ClusterConfig( + last_config_keys = [ + '' + ], + local_ip = '', + ip_block_netmask = '', + instance_gateway = '', + instance_dns_servers = [ + '' + ], + coordinator = '', + on_site = True, + cloud_provider = '', + network_types = [ + '' + ], + network_type = 'bridged', + show_domain_settings = True, + version = '', + ipsw_url = '', + coreimg_url = '', + fw_service_url = '', + service_password = '', + invalid_build = True, + sep_sim = True, + installer_available = True, + stripe = corellium.models.cluster_config_stripe.ClusterConfig_stripe( + public_key = '', + private_key = '', + webhook_key = '', ), + intercom_id = '', + aux_webhook = '', + gtm_id = '', + zapier_feedback_webhook = '', + zapier_bugs_webhook = '', + billing_backend = '', + maintenance = corellium.models.cluster_config_maintenance.ClusterConfig_maintenance( + message = '', + header = '', ), + cloud_domain = '', + development = True, + billing_domain = '', + app_domain = '', + enable_firmware_image_upload = True, + net_mon_ca = corellium.models.cluster_config_net_mon_ca.ClusterConfig_netMonCA( + certificate = '', + key = '', + subject_hash2 = '', ), + snapshot_limit = 56, + max_kernel_size = 1.337, + max_ramdisk_size = 1.337, + charm_sdk = True, + sentry_url = '', + remote_gpu = True, + rate_limit = True, + cert_file_data = '', + ca_cert_file_src = '', + vstrm_on_compute_nodes = True, + charm = { + 'key' : null + }, + c3po_path_prefix = '', + branding = '', + open_g_apps_binary = '', + airgapped = True, + node_stale_timeout = 1.337, + report_interval = 1.337, + coordinator_config = corellium.models.cluster_config_coordinator_config.ClusterConfig_coordinatorConfig( + bind_host = '', + bind_port = 1.337, + db_database = '', + db_host = '', + db_port = 1.337, + db_password = '', + db_user = '', + db_logging_enabled = True, + config_db_host = '', + config_db_port = 1.337, + config_db_user = '', + config_db_password = '', + config_db_name = '', + ip_block = '', + local_ip = '', + ip_block_netmask = '', + instance_dns_servers = [ + '' + ], + on_site = True, + private_headers = [ + '' + ], + trial = corellium.models.cluster_config_coordinator_config_trial.ClusterConfig_coordinatorConfig_trial( + default_duration = 1.337, + default_hours = 1.337, + default_devices = 1.337, + default_cores = 1.337, ), + trial_survey_id = '', + auth_providers = [ + null + ], + per_project_storage_quota = 1.337, + image_data_path = '', + ensure_domain = corellium.models.cluster_config_coordinator_config_ensure_domain.ClusterConfig_coordinatorConfig_ensureDomain( + domain = '', + domain_name = '', + quotas = corellium.models.cluster_config_coordinator_config_ensure_domain_quotas.ClusterConfig_coordinatorConfig_ensureDomain_quotas( + cores = 1.337, ), + properties = corellium.models.cluster_config_coordinator_config_ensure_domain_properties.ClusterConfig_coordinatorConfig_ensureDomain_properties( + license_type = '', + android = True, + no_ios = True, ), + admin_password_hash = '', + admin_user_cloud_administrator = True, + is_individual_aggregate = True, ), + hubspot = corellium.models.cluster_config_coordinator_config_hubspot.ClusterConfig_coordinatorConfig_hubspot( + access_token = '', + hubspot_contact_link = '', ), + nexus_url = '', + billing_trade_credit_days = 1.337, + jwt_token_expiration = 1.337, + hypertune = corellium.models.cluster_config_coordinator_config_hypertune.ClusterConfig_coordinatorConfig_hypertune( + token = '', + branch_name = '', + init_data_path = '', ), + aws_marketplace = corellium.models.cluster_config_coordinator_config_aws_marketplace.ClusterConfig_coordinatorConfig_awsMarketplace( + suger_token = '', + suger_webhook_secret = '', + suger_api_client_secret = '', + suger_stripe_mapping = { + 'key' : '' + }, ), + pipedrive = corellium.models.cluster_config_coordinator_config_pipedrive.ClusterConfig_coordinatorConfig_pipedrive( + token = '', ), + webplayer = corellium.models.cluster_config_coordinator_config_webplayer.ClusterConfig_coordinatorConfig_webplayer( + inactivity_delete_timeout = 1.337, + inactivity_shutdown_timeout = 1.337, ), + postmark_server_token = '', + postmark_email_from = '', + postmark_email_template = '', + s3 = { + 'key' : '' + }, + ofac_api_key = '', + usb_media_queue_dir = '', + usb_media_access_enabled = True, + intercom_id_verify_secret = '', + fvp_secret = '', ), + setup_config = corellium.models.cluster_config_setup_config.ClusterConfig_setupConfig( + on_site = True, + artifacts_volume_size = 1.337, + network_monitor_interval = 1.337, + max_network_monitor_file_size = '', + ca_cert_file_src = '', + local_ip = '', + instance_ip_block_netmask = '', + instance_gateway = '', + instance_dns_servers = [ + '' + ], + report_interval = 1.337, + cert_key_file_data = '', + default_ssid = '', + enable_experimental_devices = True, + controller_nodes = [ + '' + ], + domain = '', + interface = '', + virtual_device_interface = '', + auto_approve_trials = '', + snapshot_limit = 56, + max_download_agents_per_device = 56, + client_cert_file = '', + docker_host_ip = '', + domain_name = '', + vpn_client_ip = '', ), + node_specific_config = corellium.models.cluster_config_node_specific_config.ClusterConfig_nodeSpecificConfig( + az = '', + external_ip = '', + node_id = '', ), + package_config = corellium.models.cluster_config_package_config.ClusterConfig_packageConfig( + license_type = '', + cluster_id = '', + network_type = 'bridged', + physical_interfaces = { + 'key' : '' + }, + features = { + 'key' : True + }, + components = corellium.models.cluster_config_package_config_components.ClusterConfig_packageConfig_components( + cellebrite_device_image = True, ), + terms_of_service = '', + domain_authentication_providers = True, + max_network_monitor_file_size = '', + combined = True, + flavor_filters = [ + corellium.models.cluster_config_package_config_flavor_filters_inner.ClusterConfig_packageConfig_flavorFilters_inner( + filter = corellium.models.cluster_config_package_config_flavor_filters_inner_filter.ClusterConfig_packageConfig_flavorFilters_inner_filter( + license = '', + type = '', ), + apply = { + 'key' : True + }, ) + ], + charm_sdk = True, + highly_available = True, + node_version = '', + invalid_build = True, + sep_sim = True, + kernel_gdb = True, + android = True, + no_ios = True, + ios_betas = True, + charm_modules = True, + btrace = True, + strace = True, + game_streaming = True, + container_template_generation = '', + s3_supported = True, ), + monitor_interval = 1.337, + csp = True, + cdk = True, + charm_extension_paths = [ + '' + ], + firmware_cache = '', + vstrm = '', + console = '', + fetch_firmware_assets = True, + cluster_firmware_assets = True, + auth_providers = [ + null + ], + domain = '', + service_domain = '', + service_user = '', + domain_image_upload_quota = 1.337, + ipsw_filters = [ + corellium.models.cluster_config_ipsw_filters_inner.ClusterConfig_ipswFilters_inner( + device = corellium.models.cluster_config_ipsw_filters_inner_device.ClusterConfig_ipswFilters_inner_device( + product = '', ), + version = corellium.models.cluster_config_ipsw_filters_inner_version.ClusterConfig_ipswFilters_inner_version( + lt = '', + gt = '', + le = '', + ge = '', + eq = '', ), + include = True, + exclude = True, ) + ], + firmware_service_config = corellium.models.cluster_config_firmware_service_config.ClusterConfig_firmwareServiceConfig( + fetch_firmware_assets = True, + cluster_firmware_assets = True, + cache_firmware = True, + should_download = True, + fallback_original_url = True, ), + ai_tools_config = corellium.models.ai_tools_config.AiToolsConfig( + ai_enabled = True, ) + ) + else: + return ClusterConfig( + last_config_keys = [ + '' + ], + local_ip = '', + ip_block_netmask = '', + instance_gateway = '', + cloud_provider = '', + network_types = [ + '' + ], + max_kernel_size = 1.337, + max_ramdisk_size = 1.337, + ca_cert_file_src = '', + branding = '', + open_g_apps_binary = '', + airgapped = True, + ai_tools_config = corellium.models.ai_tools_config.AiToolsConfig( + ai_enabled = True, ), + ) + """ + + def testClusterConfig(self): + """Test ClusterConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config.py b/test/test_cluster_config_coordinator_config.py new file mode 100644 index 0000000..343f5ce --- /dev/null +++ b/test/test_cluster_config_coordinator_config.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config import ClusterConfigCoordinatorConfig + +class TestClusterConfigCoordinatorConfig(unittest.TestCase): + """ClusterConfigCoordinatorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfig: + """Test ClusterConfigCoordinatorConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfig` + """ + model = ClusterConfigCoordinatorConfig() + if include_optional: + return ClusterConfigCoordinatorConfig( + bind_host = '', + bind_port = 1.337, + db_database = '', + db_host = '', + db_port = 1.337, + db_password = '', + db_user = '', + db_logging_enabled = True, + config_db_host = '', + config_db_port = 1.337, + config_db_user = '', + config_db_password = '', + config_db_name = '', + ip_block = '', + local_ip = '', + ip_block_netmask = '', + instance_dns_servers = [ + '' + ], + on_site = True, + private_headers = [ + '' + ], + trial = corellium.models.cluster_config_coordinator_config_trial.ClusterConfig_coordinatorConfig_trial( + default_duration = 1.337, + default_hours = 1.337, + default_devices = 1.337, + default_cores = 1.337, ), + trial_survey_id = '', + auth_providers = [ + null + ], + per_project_storage_quota = 1.337, + image_data_path = '', + ensure_domain = corellium.models.cluster_config_coordinator_config_ensure_domain.ClusterConfig_coordinatorConfig_ensureDomain( + domain = '', + domain_name = '', + quotas = corellium.models.cluster_config_coordinator_config_ensure_domain_quotas.ClusterConfig_coordinatorConfig_ensureDomain_quotas( + cores = 1.337, ), + properties = corellium.models.cluster_config_coordinator_config_ensure_domain_properties.ClusterConfig_coordinatorConfig_ensureDomain_properties( + license_type = '', + android = True, + no_ios = True, ), + admin_password_hash = '', + admin_user_cloud_administrator = True, + is_individual_aggregate = True, ), + hubspot = corellium.models.cluster_config_coordinator_config_hubspot.ClusterConfig_coordinatorConfig_hubspot( + access_token = '', + hubspot_contact_link = '', ), + nexus_url = '', + billing_trade_credit_days = 1.337, + jwt_token_expiration = 1.337, + hypertune = corellium.models.cluster_config_coordinator_config_hypertune.ClusterConfig_coordinatorConfig_hypertune( + token = '', + branch_name = '', + init_data_path = '', ), + aws_marketplace = corellium.models.cluster_config_coordinator_config_aws_marketplace.ClusterConfig_coordinatorConfig_awsMarketplace( + suger_token = '', + suger_webhook_secret = '', + suger_api_client_secret = '', + suger_stripe_mapping = { + 'key' : '' + }, ), + pipedrive = corellium.models.cluster_config_coordinator_config_pipedrive.ClusterConfig_coordinatorConfig_pipedrive( + token = '', ), + webplayer = corellium.models.cluster_config_coordinator_config_webplayer.ClusterConfig_coordinatorConfig_webplayer( + inactivity_delete_timeout = 1.337, + inactivity_shutdown_timeout = 1.337, ), + postmark_server_token = '', + postmark_email_from = '', + postmark_email_template = '', + s3 = { + 'key' : '' + }, + ofac_api_key = '', + usb_media_queue_dir = '', + usb_media_access_enabled = True, + intercom_id_verify_secret = '', + fvp_secret = '' + ) + else: + return ClusterConfigCoordinatorConfig( + bind_host = '', + bind_port = 1.337, + db_database = '', + db_host = '', + db_port = 1.337, + db_password = '', + db_user = '', + db_logging_enabled = True, + ip_block = '', + local_ip = '', + ip_block_netmask = '', + on_site = True, + private_headers = [ + '' + ], + trial_survey_id = '', + ) + """ + + def testClusterConfigCoordinatorConfig(self): + """Test ClusterConfigCoordinatorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_auth_providers_inner.py b/test/test_cluster_config_coordinator_config_auth_providers_inner.py new file mode 100644 index 0000000..a4338e8 --- /dev/null +++ b/test/test_cluster_config_coordinator_config_auth_providers_inner.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_auth_providers_inner import ClusterConfigCoordinatorConfigAuthProvidersInner + +class TestClusterConfigCoordinatorConfigAuthProvidersInner(unittest.TestCase): + """ClusterConfigCoordinatorConfigAuthProvidersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigAuthProvidersInner: + """Test ClusterConfigCoordinatorConfigAuthProvidersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigAuthProvidersInner` + """ + model = ClusterConfigCoordinatorConfigAuthProvidersInner() + if include_optional: + return ClusterConfigCoordinatorConfigAuthProvidersInner( + provider = '', + discovery_url = '', + client_id = '', + client_secret = '', + label = '', + invited_only = True + ) + else: + return ClusterConfigCoordinatorConfigAuthProvidersInner( + provider = '', + discovery_url = '', + client_id = '', + client_secret = '', + label = '', + invited_only = True, + ) + """ + + def testClusterConfigCoordinatorConfigAuthProvidersInner(self): + """Test ClusterConfigCoordinatorConfigAuthProvidersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_auth_providers_inner_any_of.py b/test/test_cluster_config_coordinator_config_auth_providers_inner_any_of.py new file mode 100644 index 0000000..c6bd585 --- /dev/null +++ b/test/test_cluster_config_coordinator_config_auth_providers_inner_any_of.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf + +class TestClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf(unittest.TestCase): + """ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf: + """Test ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf` + """ + model = ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf() + if include_optional: + return ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf( + provider = '' + ) + else: + return ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf( + provider = '', + ) + """ + + def testClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf(self): + """Test ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_auth_providers_inner_any_of1.py b/test/test_cluster_config_coordinator_config_auth_providers_inner_any_of1.py new file mode 100644 index 0000000..320729f --- /dev/null +++ b/test/test_cluster_config_coordinator_config_auth_providers_inner_any_of1.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_auth_providers_inner_any_of1 import ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 + +class TestClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1(unittest.TestCase): + """ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1: + """Test ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1` + """ + model = ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1() + if include_optional: + return ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1( + provider = '', + discovery_url = '', + client_id = '', + client_secret = '', + label = '', + invited_only = True + ) + else: + return ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1( + provider = '', + discovery_url = '', + client_id = '', + client_secret = '', + label = '', + invited_only = True, + ) + """ + + def testClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1(self): + """Test ClusterConfigCoordinatorConfigAuthProvidersInnerAnyOf1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_aws_marketplace.py b/test/test_cluster_config_coordinator_config_aws_marketplace.py new file mode 100644 index 0000000..607d69a --- /dev/null +++ b/test/test_cluster_config_coordinator_config_aws_marketplace.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_aws_marketplace import ClusterConfigCoordinatorConfigAwsMarketplace + +class TestClusterConfigCoordinatorConfigAwsMarketplace(unittest.TestCase): + """ClusterConfigCoordinatorConfigAwsMarketplace unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigAwsMarketplace: + """Test ClusterConfigCoordinatorConfigAwsMarketplace + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigAwsMarketplace` + """ + model = ClusterConfigCoordinatorConfigAwsMarketplace() + if include_optional: + return ClusterConfigCoordinatorConfigAwsMarketplace( + suger_token = '', + suger_webhook_secret = '', + suger_api_client_secret = '', + suger_stripe_mapping = { + 'key' : '' + } + ) + else: + return ClusterConfigCoordinatorConfigAwsMarketplace( + suger_token = '', + suger_webhook_secret = '', + suger_api_client_secret = '', + suger_stripe_mapping = { + 'key' : '' + }, + ) + """ + + def testClusterConfigCoordinatorConfigAwsMarketplace(self): + """Test ClusterConfigCoordinatorConfigAwsMarketplace""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_ensure_domain.py b/test/test_cluster_config_coordinator_config_ensure_domain.py new file mode 100644 index 0000000..d8aa138 --- /dev/null +++ b/test/test_cluster_config_coordinator_config_ensure_domain.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_ensure_domain import ClusterConfigCoordinatorConfigEnsureDomain + +class TestClusterConfigCoordinatorConfigEnsureDomain(unittest.TestCase): + """ClusterConfigCoordinatorConfigEnsureDomain unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigEnsureDomain: + """Test ClusterConfigCoordinatorConfigEnsureDomain + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigEnsureDomain` + """ + model = ClusterConfigCoordinatorConfigEnsureDomain() + if include_optional: + return ClusterConfigCoordinatorConfigEnsureDomain( + domain = '', + domain_name = '', + quotas = corellium.models.cluster_config_coordinator_config_ensure_domain_quotas.ClusterConfig_coordinatorConfig_ensureDomain_quotas( + cores = 1.337, ), + properties = corellium.models.cluster_config_coordinator_config_ensure_domain_properties.ClusterConfig_coordinatorConfig_ensureDomain_properties( + license_type = '', + android = True, + no_ios = True, ), + admin_password_hash = '', + admin_user_cloud_administrator = True, + is_individual_aggregate = True + ) + else: + return ClusterConfigCoordinatorConfigEnsureDomain( + domain = '', + domain_name = '', + quotas = corellium.models.cluster_config_coordinator_config_ensure_domain_quotas.ClusterConfig_coordinatorConfig_ensureDomain_quotas( + cores = 1.337, ), + properties = corellium.models.cluster_config_coordinator_config_ensure_domain_properties.ClusterConfig_coordinatorConfig_ensureDomain_properties( + license_type = '', + android = True, + no_ios = True, ), + admin_password_hash = '', + admin_user_cloud_administrator = True, + is_individual_aggregate = True, + ) + """ + + def testClusterConfigCoordinatorConfigEnsureDomain(self): + """Test ClusterConfigCoordinatorConfigEnsureDomain""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_ensure_domain_properties.py b/test/test_cluster_config_coordinator_config_ensure_domain_properties.py new file mode 100644 index 0000000..1b9ee17 --- /dev/null +++ b/test/test_cluster_config_coordinator_config_ensure_domain_properties.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_ensure_domain_properties import ClusterConfigCoordinatorConfigEnsureDomainProperties + +class TestClusterConfigCoordinatorConfigEnsureDomainProperties(unittest.TestCase): + """ClusterConfigCoordinatorConfigEnsureDomainProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigEnsureDomainProperties: + """Test ClusterConfigCoordinatorConfigEnsureDomainProperties + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigEnsureDomainProperties` + """ + model = ClusterConfigCoordinatorConfigEnsureDomainProperties() + if include_optional: + return ClusterConfigCoordinatorConfigEnsureDomainProperties( + license_type = '', + android = True, + no_ios = True + ) + else: + return ClusterConfigCoordinatorConfigEnsureDomainProperties( + license_type = '', + android = True, + no_ios = True, + ) + """ + + def testClusterConfigCoordinatorConfigEnsureDomainProperties(self): + """Test ClusterConfigCoordinatorConfigEnsureDomainProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_ensure_domain_quotas.py b/test/test_cluster_config_coordinator_config_ensure_domain_quotas.py new file mode 100644 index 0000000..7133f48 --- /dev/null +++ b/test/test_cluster_config_coordinator_config_ensure_domain_quotas.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_ensure_domain_quotas import ClusterConfigCoordinatorConfigEnsureDomainQuotas + +class TestClusterConfigCoordinatorConfigEnsureDomainQuotas(unittest.TestCase): + """ClusterConfigCoordinatorConfigEnsureDomainQuotas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigEnsureDomainQuotas: + """Test ClusterConfigCoordinatorConfigEnsureDomainQuotas + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigEnsureDomainQuotas` + """ + model = ClusterConfigCoordinatorConfigEnsureDomainQuotas() + if include_optional: + return ClusterConfigCoordinatorConfigEnsureDomainQuotas( + cores = 1.337 + ) + else: + return ClusterConfigCoordinatorConfigEnsureDomainQuotas( + cores = 1.337, + ) + """ + + def testClusterConfigCoordinatorConfigEnsureDomainQuotas(self): + """Test ClusterConfigCoordinatorConfigEnsureDomainQuotas""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_hubspot.py b/test/test_cluster_config_coordinator_config_hubspot.py new file mode 100644 index 0000000..fa9423f --- /dev/null +++ b/test/test_cluster_config_coordinator_config_hubspot.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_hubspot import ClusterConfigCoordinatorConfigHubspot + +class TestClusterConfigCoordinatorConfigHubspot(unittest.TestCase): + """ClusterConfigCoordinatorConfigHubspot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigHubspot: + """Test ClusterConfigCoordinatorConfigHubspot + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigHubspot` + """ + model = ClusterConfigCoordinatorConfigHubspot() + if include_optional: + return ClusterConfigCoordinatorConfigHubspot( + access_token = '', + hubspot_contact_link = '' + ) + else: + return ClusterConfigCoordinatorConfigHubspot( + access_token = '', + hubspot_contact_link = '', + ) + """ + + def testClusterConfigCoordinatorConfigHubspot(self): + """Test ClusterConfigCoordinatorConfigHubspot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_hypertune.py b/test/test_cluster_config_coordinator_config_hypertune.py new file mode 100644 index 0000000..2a2721c --- /dev/null +++ b/test/test_cluster_config_coordinator_config_hypertune.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_hypertune import ClusterConfigCoordinatorConfigHypertune + +class TestClusterConfigCoordinatorConfigHypertune(unittest.TestCase): + """ClusterConfigCoordinatorConfigHypertune unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigHypertune: + """Test ClusterConfigCoordinatorConfigHypertune + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigHypertune` + """ + model = ClusterConfigCoordinatorConfigHypertune() + if include_optional: + return ClusterConfigCoordinatorConfigHypertune( + token = '', + branch_name = '', + init_data_path = '' + ) + else: + return ClusterConfigCoordinatorConfigHypertune( + token = '', + ) + """ + + def testClusterConfigCoordinatorConfigHypertune(self): + """Test ClusterConfigCoordinatorConfigHypertune""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_pipedrive.py b/test/test_cluster_config_coordinator_config_pipedrive.py new file mode 100644 index 0000000..639722f --- /dev/null +++ b/test/test_cluster_config_coordinator_config_pipedrive.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_pipedrive import ClusterConfigCoordinatorConfigPipedrive + +class TestClusterConfigCoordinatorConfigPipedrive(unittest.TestCase): + """ClusterConfigCoordinatorConfigPipedrive unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigPipedrive: + """Test ClusterConfigCoordinatorConfigPipedrive + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigPipedrive` + """ + model = ClusterConfigCoordinatorConfigPipedrive() + if include_optional: + return ClusterConfigCoordinatorConfigPipedrive( + token = '' + ) + else: + return ClusterConfigCoordinatorConfigPipedrive( + token = '', + ) + """ + + def testClusterConfigCoordinatorConfigPipedrive(self): + """Test ClusterConfigCoordinatorConfigPipedrive""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_trial.py b/test/test_cluster_config_coordinator_config_trial.py new file mode 100644 index 0000000..6e2f1f0 --- /dev/null +++ b/test/test_cluster_config_coordinator_config_trial.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_trial import ClusterConfigCoordinatorConfigTrial + +class TestClusterConfigCoordinatorConfigTrial(unittest.TestCase): + """ClusterConfigCoordinatorConfigTrial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigTrial: + """Test ClusterConfigCoordinatorConfigTrial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigTrial` + """ + model = ClusterConfigCoordinatorConfigTrial() + if include_optional: + return ClusterConfigCoordinatorConfigTrial( + default_duration = 1.337, + default_hours = 1.337, + default_devices = 1.337, + default_cores = 1.337 + ) + else: + return ClusterConfigCoordinatorConfigTrial( + default_duration = 1.337, + default_hours = 1.337, + default_devices = 1.337, + default_cores = 1.337, + ) + """ + + def testClusterConfigCoordinatorConfigTrial(self): + """Test ClusterConfigCoordinatorConfigTrial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_coordinator_config_webplayer.py b/test/test_cluster_config_coordinator_config_webplayer.py new file mode 100644 index 0000000..34b1e88 --- /dev/null +++ b/test/test_cluster_config_coordinator_config_webplayer.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_coordinator_config_webplayer import ClusterConfigCoordinatorConfigWebplayer + +class TestClusterConfigCoordinatorConfigWebplayer(unittest.TestCase): + """ClusterConfigCoordinatorConfigWebplayer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigCoordinatorConfigWebplayer: + """Test ClusterConfigCoordinatorConfigWebplayer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigCoordinatorConfigWebplayer` + """ + model = ClusterConfigCoordinatorConfigWebplayer() + if include_optional: + return ClusterConfigCoordinatorConfigWebplayer( + inactivity_delete_timeout = 1.337, + inactivity_shutdown_timeout = 1.337 + ) + else: + return ClusterConfigCoordinatorConfigWebplayer( + inactivity_delete_timeout = 1.337, + inactivity_shutdown_timeout = 1.337, + ) + """ + + def testClusterConfigCoordinatorConfigWebplayer(self): + """Test ClusterConfigCoordinatorConfigWebplayer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_firmware_service_config.py b/test/test_cluster_config_firmware_service_config.py new file mode 100644 index 0000000..4fb74a7 --- /dev/null +++ b/test/test_cluster_config_firmware_service_config.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_firmware_service_config import ClusterConfigFirmwareServiceConfig + +class TestClusterConfigFirmwareServiceConfig(unittest.TestCase): + """ClusterConfigFirmwareServiceConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigFirmwareServiceConfig: + """Test ClusterConfigFirmwareServiceConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigFirmwareServiceConfig` + """ + model = ClusterConfigFirmwareServiceConfig() + if include_optional: + return ClusterConfigFirmwareServiceConfig( + fetch_firmware_assets = True, + cluster_firmware_assets = True, + cache_firmware = True, + should_download = True, + fallback_original_url = True + ) + else: + return ClusterConfigFirmwareServiceConfig( + ) + """ + + def testClusterConfigFirmwareServiceConfig(self): + """Test ClusterConfigFirmwareServiceConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_ipsw_filters_inner.py b/test/test_cluster_config_ipsw_filters_inner.py new file mode 100644 index 0000000..95ddc35 --- /dev/null +++ b/test/test_cluster_config_ipsw_filters_inner.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_ipsw_filters_inner import ClusterConfigIpswFiltersInner + +class TestClusterConfigIpswFiltersInner(unittest.TestCase): + """ClusterConfigIpswFiltersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigIpswFiltersInner: + """Test ClusterConfigIpswFiltersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigIpswFiltersInner` + """ + model = ClusterConfigIpswFiltersInner() + if include_optional: + return ClusterConfigIpswFiltersInner( + device = corellium.models.cluster_config_ipsw_filters_inner_device.ClusterConfig_ipswFilters_inner_device( + product = '', ), + version = corellium.models.cluster_config_ipsw_filters_inner_version.ClusterConfig_ipswFilters_inner_version( + lt = '', + gt = '', + le = '', + ge = '', + eq = '', ), + include = True, + exclude = True + ) + else: + return ClusterConfigIpswFiltersInner( + ) + """ + + def testClusterConfigIpswFiltersInner(self): + """Test ClusterConfigIpswFiltersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_ipsw_filters_inner_device.py b/test/test_cluster_config_ipsw_filters_inner_device.py new file mode 100644 index 0000000..3c9262e --- /dev/null +++ b/test/test_cluster_config_ipsw_filters_inner_device.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_ipsw_filters_inner_device import ClusterConfigIpswFiltersInnerDevice + +class TestClusterConfigIpswFiltersInnerDevice(unittest.TestCase): + """ClusterConfigIpswFiltersInnerDevice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigIpswFiltersInnerDevice: + """Test ClusterConfigIpswFiltersInnerDevice + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigIpswFiltersInnerDevice` + """ + model = ClusterConfigIpswFiltersInnerDevice() + if include_optional: + return ClusterConfigIpswFiltersInnerDevice( + product = '' + ) + else: + return ClusterConfigIpswFiltersInnerDevice( + product = '', + ) + """ + + def testClusterConfigIpswFiltersInnerDevice(self): + """Test ClusterConfigIpswFiltersInnerDevice""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_ipsw_filters_inner_version.py b/test/test_cluster_config_ipsw_filters_inner_version.py new file mode 100644 index 0000000..3a60801 --- /dev/null +++ b/test/test_cluster_config_ipsw_filters_inner_version.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_ipsw_filters_inner_version import ClusterConfigIpswFiltersInnerVersion + +class TestClusterConfigIpswFiltersInnerVersion(unittest.TestCase): + """ClusterConfigIpswFiltersInnerVersion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigIpswFiltersInnerVersion: + """Test ClusterConfigIpswFiltersInnerVersion + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigIpswFiltersInnerVersion` + """ + model = ClusterConfigIpswFiltersInnerVersion() + if include_optional: + return ClusterConfigIpswFiltersInnerVersion( + lt = '', + gt = '', + le = '', + ge = '', + eq = '' + ) + else: + return ClusterConfigIpswFiltersInnerVersion( + ) + """ + + def testClusterConfigIpswFiltersInnerVersion(self): + """Test ClusterConfigIpswFiltersInnerVersion""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_maintenance.py b/test/test_cluster_config_maintenance.py new file mode 100644 index 0000000..33b2e58 --- /dev/null +++ b/test/test_cluster_config_maintenance.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_maintenance import ClusterConfigMaintenance + +class TestClusterConfigMaintenance(unittest.TestCase): + """ClusterConfigMaintenance unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigMaintenance: + """Test ClusterConfigMaintenance + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigMaintenance` + """ + model = ClusterConfigMaintenance() + if include_optional: + return ClusterConfigMaintenance( + message = '', + header = '' + ) + else: + return ClusterConfigMaintenance( + ) + """ + + def testClusterConfigMaintenance(self): + """Test ClusterConfigMaintenance""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_net_mon_ca.py b/test/test_cluster_config_net_mon_ca.py new file mode 100644 index 0000000..a7c57e7 --- /dev/null +++ b/test/test_cluster_config_net_mon_ca.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_net_mon_ca import ClusterConfigNetMonCA + +class TestClusterConfigNetMonCA(unittest.TestCase): + """ClusterConfigNetMonCA unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigNetMonCA: + """Test ClusterConfigNetMonCA + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigNetMonCA` + """ + model = ClusterConfigNetMonCA() + if include_optional: + return ClusterConfigNetMonCA( + certificate = '', + key = '', + subject_hash2 = '' + ) + else: + return ClusterConfigNetMonCA( + certificate = '', + key = '', + subject_hash2 = '', + ) + """ + + def testClusterConfigNetMonCA(self): + """Test ClusterConfigNetMonCA""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_node_specific_config.py b/test/test_cluster_config_node_specific_config.py new file mode 100644 index 0000000..a39c08f --- /dev/null +++ b/test/test_cluster_config_node_specific_config.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_node_specific_config import ClusterConfigNodeSpecificConfig + +class TestClusterConfigNodeSpecificConfig(unittest.TestCase): + """ClusterConfigNodeSpecificConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigNodeSpecificConfig: + """Test ClusterConfigNodeSpecificConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigNodeSpecificConfig` + """ + model = ClusterConfigNodeSpecificConfig() + if include_optional: + return ClusterConfigNodeSpecificConfig( + az = '', + external_ip = '', + node_id = '' + ) + else: + return ClusterConfigNodeSpecificConfig( + ) + """ + + def testClusterConfigNodeSpecificConfig(self): + """Test ClusterConfigNodeSpecificConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_package_config.py b/test/test_cluster_config_package_config.py new file mode 100644 index 0000000..04d2bad --- /dev/null +++ b/test/test_cluster_config_package_config.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_package_config import ClusterConfigPackageConfig + +class TestClusterConfigPackageConfig(unittest.TestCase): + """ClusterConfigPackageConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigPackageConfig: + """Test ClusterConfigPackageConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigPackageConfig` + """ + model = ClusterConfigPackageConfig() + if include_optional: + return ClusterConfigPackageConfig( + license_type = '', + cluster_id = '', + network_type = 'bridged', + physical_interfaces = { + 'key' : '' + }, + features = { + 'key' : True + }, + components = corellium.models.cluster_config_package_config_components.ClusterConfig_packageConfig_components( + cellebrite_device_image = True, ), + terms_of_service = '', + domain_authentication_providers = True, + max_network_monitor_file_size = '', + combined = True, + flavor_filters = [ + corellium.models.cluster_config_package_config_flavor_filters_inner.ClusterConfig_packageConfig_flavorFilters_inner( + filter = corellium.models.cluster_config_package_config_flavor_filters_inner_filter.ClusterConfig_packageConfig_flavorFilters_inner_filter( + license = '', + type = '', ), + apply = { + 'key' : True + }, ) + ], + charm_sdk = True, + highly_available = True, + node_version = '', + invalid_build = True, + sep_sim = True, + kernel_gdb = True, + android = True, + no_ios = True, + ios_betas = True, + charm_modules = True, + btrace = True, + strace = True, + game_streaming = True, + container_template_generation = '', + s3_supported = True + ) + else: + return ClusterConfigPackageConfig( + flavor_filters = [ + corellium.models.cluster_config_package_config_flavor_filters_inner.ClusterConfig_packageConfig_flavorFilters_inner( + filter = corellium.models.cluster_config_package_config_flavor_filters_inner_filter.ClusterConfig_packageConfig_flavorFilters_inner_filter( + license = '', + type = '', ), + apply = { + 'key' : True + }, ) + ], + ) + """ + + def testClusterConfigPackageConfig(self): + """Test ClusterConfigPackageConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_package_config_components.py b/test/test_cluster_config_package_config_components.py new file mode 100644 index 0000000..4b26955 --- /dev/null +++ b/test/test_cluster_config_package_config_components.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_package_config_components import ClusterConfigPackageConfigComponents + +class TestClusterConfigPackageConfigComponents(unittest.TestCase): + """ClusterConfigPackageConfigComponents unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigPackageConfigComponents: + """Test ClusterConfigPackageConfigComponents + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigPackageConfigComponents` + """ + model = ClusterConfigPackageConfigComponents() + if include_optional: + return ClusterConfigPackageConfigComponents( + cellebrite_device_image = True + ) + else: + return ClusterConfigPackageConfigComponents( + ) + """ + + def testClusterConfigPackageConfigComponents(self): + """Test ClusterConfigPackageConfigComponents""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_package_config_features.py b/test/test_cluster_config_package_config_features.py new file mode 100644 index 0000000..c3b915a --- /dev/null +++ b/test/test_cluster_config_package_config_features.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_package_config_features import ClusterConfigPackageConfigFeatures + +class TestClusterConfigPackageConfigFeatures(unittest.TestCase): + """ClusterConfigPackageConfigFeatures unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigPackageConfigFeatures: + """Test ClusterConfigPackageConfigFeatures + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigPackageConfigFeatures` + """ + model = ClusterConfigPackageConfigFeatures() + if include_optional: + return ClusterConfigPackageConfigFeatures( + net_mon_proc_map = True, + cellebrite_device_image = True, + custom_ramdisk = True, + injected_cdhashes = True, + custom_kernel = True, + custom_ramdom_seed = True, + disable_snapshot_mount = True, + tracing_tools = True, + sep_sim = True, + custom_boot_args = True, + netdump = True, + pac = True, + vstrm_on_compute_nodes = True, + aprr = True, + kernel_gdb = True, + kalloc_tracing = True, + track_project_instance_usage = True, + custom_device_tree = True, + custom_kernel_patches = True, + mast = True, + charm_modules = True, + sep = True, + custom_boot_loader = True + ) + else: + return ClusterConfigPackageConfigFeatures( + ) + """ + + def testClusterConfigPackageConfigFeatures(self): + """Test ClusterConfigPackageConfigFeatures""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_package_config_flavor_filters_inner.py b/test/test_cluster_config_package_config_flavor_filters_inner.py new file mode 100644 index 0000000..5bc7ded --- /dev/null +++ b/test/test_cluster_config_package_config_flavor_filters_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_package_config_flavor_filters_inner import ClusterConfigPackageConfigFlavorFiltersInner + +class TestClusterConfigPackageConfigFlavorFiltersInner(unittest.TestCase): + """ClusterConfigPackageConfigFlavorFiltersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigPackageConfigFlavorFiltersInner: + """Test ClusterConfigPackageConfigFlavorFiltersInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigPackageConfigFlavorFiltersInner` + """ + model = ClusterConfigPackageConfigFlavorFiltersInner() + if include_optional: + return ClusterConfigPackageConfigFlavorFiltersInner( + filter = corellium.models.cluster_config_package_config_flavor_filters_inner_filter.ClusterConfig_packageConfig_flavorFilters_inner_filter( + license = '', + type = '', ), + apply = { + 'key' : True + } + ) + else: + return ClusterConfigPackageConfigFlavorFiltersInner( + ) + """ + + def testClusterConfigPackageConfigFlavorFiltersInner(self): + """Test ClusterConfigPackageConfigFlavorFiltersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_package_config_flavor_filters_inner_apply.py b/test/test_cluster_config_package_config_flavor_filters_inner_apply.py new file mode 100644 index 0000000..e94fd69 --- /dev/null +++ b/test/test_cluster_config_package_config_flavor_filters_inner_apply.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_package_config_flavor_filters_inner_apply import ClusterConfigPackageConfigFlavorFiltersInnerApply + +class TestClusterConfigPackageConfigFlavorFiltersInnerApply(unittest.TestCase): + """ClusterConfigPackageConfigFlavorFiltersInnerApply unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigPackageConfigFlavorFiltersInnerApply: + """Test ClusterConfigPackageConfigFlavorFiltersInnerApply + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigPackageConfigFlavorFiltersInnerApply` + """ + model = ClusterConfigPackageConfigFlavorFiltersInnerApply() + if include_optional: + return ClusterConfigPackageConfigFlavorFiltersInnerApply( + supports_core_trace = True, + supports_port_frida = True, + supports_custom_firmware = True, + supports_custom_kernel = True, + supports_gdb = True, + supports_custom_devicetree = True, + supports_network_monitor = True + ) + else: + return ClusterConfigPackageConfigFlavorFiltersInnerApply( + ) + """ + + def testClusterConfigPackageConfigFlavorFiltersInnerApply(self): + """Test ClusterConfigPackageConfigFlavorFiltersInnerApply""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_package_config_flavor_filters_inner_filter.py b/test/test_cluster_config_package_config_flavor_filters_inner_filter.py new file mode 100644 index 0000000..8b308c8 --- /dev/null +++ b/test/test_cluster_config_package_config_flavor_filters_inner_filter.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_package_config_flavor_filters_inner_filter import ClusterConfigPackageConfigFlavorFiltersInnerFilter + +class TestClusterConfigPackageConfigFlavorFiltersInnerFilter(unittest.TestCase): + """ClusterConfigPackageConfigFlavorFiltersInnerFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigPackageConfigFlavorFiltersInnerFilter: + """Test ClusterConfigPackageConfigFlavorFiltersInnerFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigPackageConfigFlavorFiltersInnerFilter` + """ + model = ClusterConfigPackageConfigFlavorFiltersInnerFilter() + if include_optional: + return ClusterConfigPackageConfigFlavorFiltersInnerFilter( + license = '', + type = '' + ) + else: + return ClusterConfigPackageConfigFlavorFiltersInnerFilter( + ) + """ + + def testClusterConfigPackageConfigFlavorFiltersInnerFilter(self): + """Test ClusterConfigPackageConfigFlavorFiltersInnerFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_setup_config.py b/test/test_cluster_config_setup_config.py new file mode 100644 index 0000000..6a9e98b --- /dev/null +++ b/test/test_cluster_config_setup_config.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_setup_config import ClusterConfigSetupConfig + +class TestClusterConfigSetupConfig(unittest.TestCase): + """ClusterConfigSetupConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigSetupConfig: + """Test ClusterConfigSetupConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigSetupConfig` + """ + model = ClusterConfigSetupConfig() + if include_optional: + return ClusterConfigSetupConfig( + on_site = True, + artifacts_volume_size = 1.337, + network_monitor_interval = 1.337, + max_network_monitor_file_size = '', + ca_cert_file_src = '', + local_ip = '', + instance_ip_block_netmask = '', + instance_gateway = '', + instance_dns_servers = [ + '' + ], + report_interval = 1.337, + cert_key_file_data = '', + default_ssid = '', + enable_experimental_devices = True, + controller_nodes = [ + '' + ], + domain = '', + interface = '', + virtual_device_interface = '', + auto_approve_trials = '', + snapshot_limit = 56, + max_download_agents_per_device = 56, + client_cert_file = '', + docker_host_ip = '', + domain_name = '', + vpn_client_ip = '' + ) + else: + return ClusterConfigSetupConfig( + on_site = True, + network_monitor_interval = 1.337, + max_network_monitor_file_size = '', + ca_cert_file_src = '', + local_ip = '', + instance_ip_block_netmask = '', + instance_gateway = '', + report_interval = 1.337, + interface = '', + ) + """ + + def testClusterConfigSetupConfig(self): + """Test ClusterConfigSetupConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_stripe.py b/test/test_cluster_config_stripe.py new file mode 100644 index 0000000..a8d3cb6 --- /dev/null +++ b/test/test_cluster_config_stripe.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_stripe import ClusterConfigStripe + +class TestClusterConfigStripe(unittest.TestCase): + """ClusterConfigStripe unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigStripe: + """Test ClusterConfigStripe + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigStripe` + """ + model = ClusterConfigStripe() + if include_optional: + return ClusterConfigStripe( + public_key = '', + private_key = '', + webhook_key = '' + ) + else: + return ClusterConfigStripe( + public_key = '', + private_key = '', + webhook_key = '', + ) + """ + + def testClusterConfigStripe(self): + """Test ClusterConfigStripe""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_config_update_error.py b/test/test_cluster_config_update_error.py new file mode 100644 index 0000000..5679f53 --- /dev/null +++ b/test/test_cluster_config_update_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_config_update_error import ClusterConfigUpdateError + +class TestClusterConfigUpdateError(unittest.TestCase): + """ClusterConfigUpdateError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigUpdateError: + """Test ClusterConfigUpdateError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigUpdateError` + """ + model = ClusterConfigUpdateError() + if include_optional: + return ClusterConfigUpdateError( + message = 'Retry the request or apply the configuration change manually on the affected nodes.', + nodes = [ + corellium.models.node_information.NodeInformation( + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + address = '10.0.0.12', + hostname = 'node-01.example.com', + ssh_port = 22, + node_types = ["controller","compute"], ) + ] + ) + else: + return ClusterConfigUpdateError( + message = 'Retry the request or apply the configuration change manually on the affected nodes.', + ) + """ + + def testClusterConfigUpdateError(self): + """Test ClusterConfigUpdateError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_configuration_payload.py b/test/test_cluster_configuration_payload.py new file mode 100644 index 0000000..22797c4 --- /dev/null +++ b/test/test_cluster_configuration_payload.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_configuration_payload import ClusterConfigurationPayload + +class TestClusterConfigurationPayload(unittest.TestCase): + """ClusterConfigurationPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterConfigurationPayload: + """Test ClusterConfigurationPayload + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterConfigurationPayload` + """ + model = ClusterConfigurationPayload() + if include_optional: + return ClusterConfigurationPayload( + snapshot_limit = 1.337, + coordinator_config = corellium.models.coordinator_config_v1.CoordinatorConfigV1( + usb_media_access_enabled = True, ), + ai_tools_config = corellium.models.ai_tools_config_v1.AiToolsConfigV1( + ai_enabled = True, ) + ) + else: + return ClusterConfigurationPayload( + ) + """ + + def testClusterConfigurationPayload(self): + """Test ClusterConfigurationPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node.py b/test/test_cluster_node.py new file mode 100644 index 0000000..1c61774 --- /dev/null +++ b/test/test_cluster_node.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node import ClusterNode + +class TestClusterNode(unittest.TestCase): + """ClusterNode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNode: + """Test ClusterNode + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNode` + """ + model = ClusterNode() + if include_optional: + return ClusterNode( + reserved = corellium.models.cluster_node_reserved.ClusterNode_reserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + total = corellium.models.cluster_node_total.ClusterNode_total( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + available = corellium.models.cluster_node_available.ClusterNode_available( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + hostname = 'node03.us-east-1.example.com', + address = '10.0.0.5:6666', + last_seen = '2026-03-17T11:41:05Z' + ) + else: + return ClusterNode( + reserved = corellium.models.cluster_node_reserved.ClusterNode_reserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + total = corellium.models.cluster_node_total.ClusterNode_total( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + available = corellium.models.cluster_node_available.ClusterNode_available( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + hostname = 'node03.us-east-1.example.com', + address = '10.0.0.5:6666', + last_seen = '2026-03-17T11:41:05Z', + ) + """ + + def testClusterNode(self): + """Test ClusterNode""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node_available.py b/test/test_cluster_node_available.py new file mode 100644 index 0000000..8cc8a14 --- /dev/null +++ b/test/test_cluster_node_available.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node_available import ClusterNodeAvailable + +class TestClusterNodeAvailable(unittest.TestCase): + """ClusterNodeAvailable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNodeAvailable: + """Test ClusterNodeAvailable + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNodeAvailable` + """ + model = ClusterNodeAvailable() + if include_optional: + return ClusterNodeAvailable( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2 + ) + else: + return ClusterNodeAvailable( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, + ) + """ + + def testClusterNodeAvailable(self): + """Test ClusterNodeAvailable""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node_reserved.py b/test/test_cluster_node_reserved.py new file mode 100644 index 0000000..8122b30 --- /dev/null +++ b/test/test_cluster_node_reserved.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node_reserved import ClusterNodeReserved + +class TestClusterNodeReserved(unittest.TestCase): + """ClusterNodeReserved unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNodeReserved: + """Test ClusterNodeReserved + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNodeReserved` + """ + model = ClusterNodeReserved() + if include_optional: + return ClusterNodeReserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2 + ) + else: + return ClusterNodeReserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, + ) + """ + + def testClusterNodeReserved(self): + """Test ClusterNodeReserved""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node_status.py b/test/test_cluster_node_status.py new file mode 100644 index 0000000..30bc5ff --- /dev/null +++ b/test/test_cluster_node_status.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node_status import ClusterNodeStatus + +class TestClusterNodeStatus(unittest.TestCase): + """ClusterNodeStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNodeStatus: + """Test ClusterNodeStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNodeStatus` + """ + model = ClusterNodeStatus() + if include_optional: + return ClusterNodeStatus( + cluster_totals = corellium.models.cluster_node_status_cluster_totals.ClusterNodeStatus_clusterTotals( + reserved = corellium.models.cluster_node_status_cluster_totals_reserved.ClusterNodeStatus_clusterTotals_reserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + total = corellium.models.cluster_node_status_cluster_totals_total.ClusterNodeStatus_clusterTotals_total( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + available = corellium.models.cluster_node_status_cluster_totals_available.ClusterNodeStatus_clusterTotals_available( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), ), + nodes = [ + corellium.models.cluster_node.ClusterNode( + reserved = corellium.models.cluster_node_reserved.ClusterNode_reserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + total = corellium.models.cluster_node_total.ClusterNode_total( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + available = corellium.models.cluster_node_available.ClusterNode_available( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + hostname = 'node03.us-east-1.example.com', + address = '10.0.0.5:6666', + last_seen = '2026-03-17T11:41:05Z', ) + ] + ) + else: + return ClusterNodeStatus( + cluster_totals = corellium.models.cluster_node_status_cluster_totals.ClusterNodeStatus_clusterTotals( + reserved = corellium.models.cluster_node_status_cluster_totals_reserved.ClusterNodeStatus_clusterTotals_reserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + total = corellium.models.cluster_node_status_cluster_totals_total.ClusterNodeStatus_clusterTotals_total( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + available = corellium.models.cluster_node_status_cluster_totals_available.ClusterNodeStatus_clusterTotals_available( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), ), + nodes = [ + corellium.models.cluster_node.ClusterNode( + reserved = corellium.models.cluster_node_reserved.ClusterNode_reserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + total = corellium.models.cluster_node_total.ClusterNode_total( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + available = corellium.models.cluster_node_available.ClusterNode_available( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + hostname = 'node03.us-east-1.example.com', + address = '10.0.0.5:6666', + last_seen = '2026-03-17T11:41:05Z', ) + ], + ) + """ + + def testClusterNodeStatus(self): + """Test ClusterNodeStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node_status_cluster_totals.py b/test/test_cluster_node_status_cluster_totals.py new file mode 100644 index 0000000..61d4e19 --- /dev/null +++ b/test/test_cluster_node_status_cluster_totals.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node_status_cluster_totals import ClusterNodeStatusClusterTotals + +class TestClusterNodeStatusClusterTotals(unittest.TestCase): + """ClusterNodeStatusClusterTotals unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNodeStatusClusterTotals: + """Test ClusterNodeStatusClusterTotals + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNodeStatusClusterTotals` + """ + model = ClusterNodeStatusClusterTotals() + if include_optional: + return ClusterNodeStatusClusterTotals( + reserved = corellium.models.cluster_node_status_cluster_totals_reserved.ClusterNodeStatus_clusterTotals_reserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + total = corellium.models.cluster_node_status_cluster_totals_total.ClusterNodeStatus_clusterTotals_total( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + available = corellium.models.cluster_node_status_cluster_totals_available.ClusterNodeStatus_clusterTotals_available( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ) + ) + else: + return ClusterNodeStatusClusterTotals( + reserved = corellium.models.cluster_node_status_cluster_totals_reserved.ClusterNodeStatus_clusterTotals_reserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + total = corellium.models.cluster_node_status_cluster_totals_total.ClusterNodeStatus_clusterTotals_total( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + available = corellium.models.cluster_node_status_cluster_totals_available.ClusterNodeStatus_clusterTotals_available( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, ), + ) + """ + + def testClusterNodeStatusClusterTotals(self): + """Test ClusterNodeStatusClusterTotals""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node_status_cluster_totals_available.py b/test/test_cluster_node_status_cluster_totals_available.py new file mode 100644 index 0000000..01facaf --- /dev/null +++ b/test/test_cluster_node_status_cluster_totals_available.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node_status_cluster_totals_available import ClusterNodeStatusClusterTotalsAvailable + +class TestClusterNodeStatusClusterTotalsAvailable(unittest.TestCase): + """ClusterNodeStatusClusterTotalsAvailable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNodeStatusClusterTotalsAvailable: + """Test ClusterNodeStatusClusterTotalsAvailable + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNodeStatusClusterTotalsAvailable` + """ + model = ClusterNodeStatusClusterTotalsAvailable() + if include_optional: + return ClusterNodeStatusClusterTotalsAvailable( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2 + ) + else: + return ClusterNodeStatusClusterTotalsAvailable( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, + ) + """ + + def testClusterNodeStatusClusterTotalsAvailable(self): + """Test ClusterNodeStatusClusterTotalsAvailable""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node_status_cluster_totals_reserved.py b/test/test_cluster_node_status_cluster_totals_reserved.py new file mode 100644 index 0000000..b266885 --- /dev/null +++ b/test/test_cluster_node_status_cluster_totals_reserved.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node_status_cluster_totals_reserved import ClusterNodeStatusClusterTotalsReserved + +class TestClusterNodeStatusClusterTotalsReserved(unittest.TestCase): + """ClusterNodeStatusClusterTotalsReserved unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNodeStatusClusterTotalsReserved: + """Test ClusterNodeStatusClusterTotalsReserved + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNodeStatusClusterTotalsReserved` + """ + model = ClusterNodeStatusClusterTotalsReserved() + if include_optional: + return ClusterNodeStatusClusterTotalsReserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2 + ) + else: + return ClusterNodeStatusClusterTotalsReserved( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, + ) + """ + + def testClusterNodeStatusClusterTotalsReserved(self): + """Test ClusterNodeStatusClusterTotalsReserved""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node_status_cluster_totals_total.py b/test/test_cluster_node_status_cluster_totals_total.py new file mode 100644 index 0000000..162e909 --- /dev/null +++ b/test/test_cluster_node_status_cluster_totals_total.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node_status_cluster_totals_total import ClusterNodeStatusClusterTotalsTotal + +class TestClusterNodeStatusClusterTotalsTotal(unittest.TestCase): + """ClusterNodeStatusClusterTotalsTotal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNodeStatusClusterTotalsTotal: + """Test ClusterNodeStatusClusterTotalsTotal + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNodeStatusClusterTotalsTotal` + """ + model = ClusterNodeStatusClusterTotalsTotal() + if include_optional: + return ClusterNodeStatusClusterTotalsTotal( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2 + ) + else: + return ClusterNodeStatusClusterTotalsTotal( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, + ) + """ + + def testClusterNodeStatusClusterTotalsTotal(self): + """Test ClusterNodeStatusClusterTotalsTotal""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_node_total.py b/test/test_cluster_node_total.py new file mode 100644 index 0000000..567ee3b --- /dev/null +++ b/test/test_cluster_node_total.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_node_total import ClusterNodeTotal + +class TestClusterNodeTotal(unittest.TestCase): + """ClusterNodeTotal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterNodeTotal: + """Test ClusterNodeTotal + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterNodeTotal` + """ + model = ClusterNodeTotal() + if include_optional: + return ClusterNodeTotal( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2 + ) + else: + return ClusterNodeTotal( + cores = 30, + ram = 32768, + disk = 2412.18, + slot = 32, + gpu = 2, + ) + """ + + def testClusterNodeTotal(self): + """Test ClusterNodeTotal""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_snapshot.py b/test/test_cluster_snapshot.py new file mode 100644 index 0000000..d35f41b --- /dev/null +++ b/test/test_cluster_snapshot.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_snapshot import ClusterSnapshot + +class TestClusterSnapshot(unittest.TestCase): + """ClusterSnapshot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterSnapshot: + """Test ClusterSnapshot + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterSnapshot` + """ + model = ClusterSnapshot() + if include_optional: + return ClusterSnapshot( + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + name = 'pre-update-snapshot', + volume = 'b6f1c9d2-8e47-4b3a-9c5d-2f1e8a7b6c5d', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = corellium.models.cluster_snapshot_status.ClusterSnapshot_status( + task = 'creating', + created = False, ), + type = 'iscsi', + compute_node = '10.0.0.12:6666', + metadata = corellium.models.cluster_snapshot_metadata.ClusterSnapshot_metadata( + live = True, + fresh = False, + hw_pac = 1, + springboard = False, + boot_options = null, + device = {"flavorId":"iphone13p","type":"ios","product":"iPhone14,2","model":"d63ap","cores":6}, + flavor = 'iphone13p', + os_version = '16.5', + os_build = '20F66', + patches = 'jailbroken', + cpid = 33040, ), + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return ClusterSnapshot( + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + volume = 'b6f1c9d2-8e47-4b3a-9c5d-2f1e8a7b6c5d', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = corellium.models.cluster_snapshot_status.ClusterSnapshot_status( + task = 'creating', + created = False, ), + type = 'iscsi', + metadata = corellium.models.cluster_snapshot_metadata.ClusterSnapshot_metadata( + live = True, + fresh = False, + hw_pac = 1, + springboard = False, + boot_options = null, + device = {"flavorId":"iphone13p","type":"ios","product":"iPhone14,2","model":"d63ap","cores":6}, + flavor = 'iphone13p', + os_version = '16.5', + os_build = '20F66', + patches = 'jailbroken', + cpid = 33040, ), + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testClusterSnapshot(self): + """Test ClusterSnapshot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_snapshot_list.py b/test/test_cluster_snapshot_list.py new file mode 100644 index 0000000..8d38f09 --- /dev/null +++ b/test/test_cluster_snapshot_list.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_snapshot_list import ClusterSnapshotList + +class TestClusterSnapshotList(unittest.TestCase): + """ClusterSnapshotList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterSnapshotList: + """Test ClusterSnapshotList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterSnapshotList` + """ + model = ClusterSnapshotList() + if include_optional: + return ClusterSnapshotList( + results = [ + corellium.models.cluster_snapshot.ClusterSnapshot( + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + name = 'pre-update-snapshot', + volume = 'b6f1c9d2-8e47-4b3a-9c5d-2f1e8a7b6c5d', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = corellium.models.cluster_snapshot_status.ClusterSnapshot_status( + task = 'creating', + created = False, ), + type = 'iscsi', + compute_node = '10.0.0.12:6666', + metadata = corellium.models.cluster_snapshot_metadata.ClusterSnapshot_metadata( + live = True, + fresh = False, + hw_pac = 1, + springboard = False, + boot_options = null, + device = {"flavorId":"iphone13p","type":"ios","product":"iPhone14,2","model":"d63ap","cores":6}, + flavor = 'iphone13p', + os_version = '16.5', + os_build = '20F66', + patches = 'jailbroken', + cpid = 33040, ), + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return ClusterSnapshotList( + results = [ + corellium.models.cluster_snapshot.ClusterSnapshot( + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + name = 'pre-update-snapshot', + volume = 'b6f1c9d2-8e47-4b3a-9c5d-2f1e8a7b6c5d', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = corellium.models.cluster_snapshot_status.ClusterSnapshot_status( + task = 'creating', + created = False, ), + type = 'iscsi', + compute_node = '10.0.0.12:6666', + metadata = corellium.models.cluster_snapshot_metadata.ClusterSnapshot_metadata( + live = True, + fresh = False, + hw_pac = 1, + springboard = False, + boot_options = null, + device = {"flavorId":"iphone13p","type":"ios","product":"iPhone14,2","model":"d63ap","cores":6}, + flavor = 'iphone13p', + os_version = '16.5', + os_build = '20F66', + patches = 'jailbroken', + cpid = 33040, ), + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testClusterSnapshotList(self): + """Test ClusterSnapshotList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_snapshot_metadata.py b/test/test_cluster_snapshot_metadata.py new file mode 100644 index 0000000..adde62e --- /dev/null +++ b/test/test_cluster_snapshot_metadata.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_snapshot_metadata import ClusterSnapshotMetadata + +class TestClusterSnapshotMetadata(unittest.TestCase): + """ClusterSnapshotMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterSnapshotMetadata: + """Test ClusterSnapshotMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterSnapshotMetadata` + """ + model = ClusterSnapshotMetadata() + if include_optional: + return ClusterSnapshotMetadata( + live = True, + fresh = False, + hw_pac = 1, + springboard = False, + boot_options = corellium.models.instance_boot_options.InstanceBootOptions( + boot_args = '-v debug=0x8 keepsyms=1', + restore_boot_args = '-v debug=0x8 keepsyms=1', + udid = '00008030-001A2D423C29802E', + ecid = '0x1a2b3c4d5e6f', + random_seed = 'deadbeefcafebabe', + pac = True, + aprr = True, + cores = 4, + ram = 6144, + additional_tags = ["kalloc"], + kernel = corellium.models.instance_boot_options_kernel.InstanceBootOptionsKernel( + firmware_path = 'kernelcache', ), + pongo = corellium.models.instance_boot_options_pongo.InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576, ), + serial = 'C39ABCDEFGH1', + no_snapshot_mount = False, + kernel_slide = '0x18000000', + cd_hashes = ["a1b2c3d4e5f60718293a4b5c6d7e8f90"], + imei = '359268000000000', + imsi = '310150123456789', + ssid0 = 'CorelliumWiFi', + ssid1 = 'CorelliumWiFi-5G', + wifi_mac = '02:00:00:aa:bb:cc', + model_id = 'SM-G973F', + manufacturer_id = 'samsung', + kernel_patches = 'patch1,patch2', + stop_on_fault = True, + boot_addr = '0x800000000', + tzen = True, + authorized_keys = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFhYmJjY2RkZWVmZmdnaGhpaWpqa2trbGxtbW5ubm9v user@example.com', + v_mmio = [ + corellium.models.instance_boot_options_v_mmio_inner.InstanceBootOptions_vMMIO_inner( + start = '0x9000000', + size = '0x1000', + irq = '33-36', ) + ], + fvp = corellium.models.instance_boot_options_fvp.InstanceBootOptionsFvp( + model_binary = '/usr/local/fvp/bin/FVP_Base_RevC-2xAEMvA', + parameters = {"bp.secure_memory":"false","cluster0.NUM_CORES":"4"}, + data = ["/tmp/data.bin@0x80000000"], + breaks = ["0x80001000"], + dumps = ["/tmp/dump.bin@0x80000000,0x1000"], + cadi_log = 'cadi-log.xml', + cadi_server = 'true', + iris_server = 'true', + iris_log = 'info', + iris_allow_remote = 'true', + iris_port_range = '7000:7010', + iris_port = '7100', + run = 'true', + stat = 'true', + quiet = 'true', + start = '0x80000000', + plugin = '/usr/local/fvp/plugins/ToolsSharedLib.so', + fast_ram = 'fastram.cfg', + save = '/tmp/checkpoint', + restore = '/tmp/checkpoint', + cpi_file = 'cpi.txt', + cycle_limit = '1000000', + cpu_limit = '3600', + time_limit = '3600', + sim_limit = '60', ), ), + device = {"flavorId":"iphone13p","type":"ios","product":"iPhone14,2","model":"d63ap","cores":6}, + flavor = 'iphone13p', + os_version = '16.5', + os_build = '20F66', + patches = 'jailbroken', + cpid = 33040 + ) + else: + return ClusterSnapshotMetadata( + ) + """ + + def testClusterSnapshotMetadata(self): + """Test ClusterSnapshotMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_snapshot_status.py b/test/test_cluster_snapshot_status.py new file mode 100644 index 0000000..06efea5 --- /dev/null +++ b/test/test_cluster_snapshot_status.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_snapshot_status import ClusterSnapshotStatus + +class TestClusterSnapshotStatus(unittest.TestCase): + """ClusterSnapshotStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterSnapshotStatus: + """Test ClusterSnapshotStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterSnapshotStatus` + """ + model = ClusterSnapshotStatus() + if include_optional: + return ClusterSnapshotStatus( + task = 'creating', + created = False + ) + else: + return ClusterSnapshotStatus( + ) + """ + + def testClusterSnapshotStatus(self): + """Test ClusterSnapshotStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_snapshot_v1.py b/test/test_cluster_snapshot_v1.py new file mode 100644 index 0000000..1592139 --- /dev/null +++ b/test/test_cluster_snapshot_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.cluster_snapshot_v1 import ClusterSnapshotV1 + +class TestClusterSnapshotV1(unittest.TestCase): + """ClusterSnapshotV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterSnapshotV1: + """Test ClusterSnapshotV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterSnapshotV1` + """ + model = ClusterSnapshotV1() + if include_optional: + return ClusterSnapshotV1( + identifier = '' + ) + else: + return ClusterSnapshotV1( + ) + """ + + def testClusterSnapshotV1(self): + """Test ClusterSnapshotV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_snapshots_api.py b/test/test_cluster_snapshots_api.py new file mode 100644 index 0000000..6489c2b --- /dev/null +++ b/test/test_cluster_snapshots_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.cluster_snapshots_api import ClusterSnapshotsApi + + +class TestClusterSnapshotsApi(unittest.TestCase): + """ClusterSnapshotsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ClusterSnapshotsApi() + + def tearDown(self) -> None: + pass + + def test_v1_delete_cluster_snapshot(self) -> None: + """Test case for v1_delete_cluster_snapshot + + Delete a Cluster Snapshot + """ + pass + + def test_v1_get_cluster_snapshot(self) -> None: + """Test case for v1_get_cluster_snapshot + + Get Cluster Snapshot + """ + pass + + def test_v1_get_cluster_snapshots(self) -> None: + """Test case for v1_get_cluster_snapshots + + Get Cluster Snapshots + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_compute_node_file.py b/test/test_compute_node_file.py new file mode 100644 index 0000000..c908c96 --- /dev/null +++ b/test/test_compute_node_file.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.compute_node_file import ComputeNodeFile + +class TestComputeNodeFile(unittest.TestCase): + """ComputeNodeFile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ComputeNodeFile: + """Test ComputeNodeFile + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ComputeNodeFile` + """ + model = ComputeNodeFile() + if include_optional: + return ComputeNodeFile( + path = '/mnt/charm_f7f9832a-f824-416f-a5ea-4adfe34754b5_tmp/strace-0', + size = 268435456, + mtime = '2026-03-17T11:41:05Z' + ) + else: + return ComputeNodeFile( + path = '/mnt/charm_f7f9832a-f824-416f-a5ea-4adfe34754b5_tmp/strace-0', + size = 268435456, + mtime = '2026-03-17T11:41:05Z', + ) + """ + + def testComputeNodeFile(self): + """Test ComputeNodeFile""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_compute_node_file_list.py b/test/test_compute_node_file_list.py new file mode 100644 index 0000000..7966df8 --- /dev/null +++ b/test/test_compute_node_file_list.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.compute_node_file_list import ComputeNodeFileList + +class TestComputeNodeFileList(unittest.TestCase): + """ComputeNodeFileList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ComputeNodeFileList: + """Test ComputeNodeFileList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ComputeNodeFileList` + """ + model = ComputeNodeFileList() + if include_optional: + return ComputeNodeFileList( + files = [ + corellium.models.compute_node_file.ComputeNodeFile( + path = '/mnt/charm_f7f9832a-f824-416f-a5ea-4adfe34754b5_tmp/strace-0', + size = 268435456, + mtime = '2026-03-17T11:41:05Z', ) + ] + ) + else: + return ComputeNodeFileList( + files = [ + corellium.models.compute_node_file.ComputeNodeFile( + path = '/mnt/charm_f7f9832a-f824-416f-a5ea-4adfe34754b5_tmp/strace-0', + size = 268435456, + mtime = '2026-03-17T11:41:05Z', ) + ], + ) + """ + + def testComputeNodeFileList(self): + """Test ComputeNodeFileList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_config_api.py b/test/test_config_api.py new file mode 100644 index 0000000..12f730a --- /dev/null +++ b/test/test_config_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.config_api import ConfigApi + + +class TestConfigApi(unittest.TestCase): + """ConfigApi unit test stubs""" + + def setUp(self) -> None: + self.api = ConfigApi() + + def tearDown(self) -> None: + pass + + def test_v3_get_config(self) -> None: + """Test case for v3_get_config + + Get deployment configuration + """ + pass + + def test_v3_get_version(self) -> None: + """Test case for v3_get_version + + Get the platform version + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_config_auth_provider.py b/test/test_config_auth_provider.py new file mode 100644 index 0000000..0cb7f3a --- /dev/null +++ b/test/test_config_auth_provider.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.config_auth_provider import ConfigAuthProvider + +class TestConfigAuthProvider(unittest.TestCase): + """ConfigAuthProvider unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConfigAuthProvider: + """Test ConfigAuthProvider + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConfigAuthProvider` + """ + model = ConfigAuthProvider() + if include_optional: + return ConfigAuthProvider( + name = 'Database', + provider_type = 'database', + default = True, + label = 'database', + enabled = True, + authorization_url = '/api/v1/auth/providers/database/authorization_url', + identifier = 'database', + provider = 'database' + ) + else: + return ConfigAuthProvider( + name = 'Database', + provider_type = 'database', + default = True, + label = 'database', + enabled = True, + authorization_url = '/api/v1/auth/providers/database/authorization_url', + identifier = 'database', + provider = 'database', + ) + """ + + def testConfigAuthProvider(self): + """Test ConfigAuthProvider""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_config_response.py b/test/test_config_response.py index 1adc673..6d1db57 100644 --- a/test/test_config_response.py +++ b/test/test_config_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.config_response import ConfigResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.config_response import ConfigResponse class TestConfigResponse(unittest.TestCase): """ConfigResponse unit test stubs""" @@ -28,76 +26,116 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ConfigResponse: """Test ConfigResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.config_response.ConfigResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ConfigResponse` + """ + model = ConfigResponse() + if include_optional: return ConfigResponse( - on_site = True, - network_types = [ - '' - ], - network_type = '', - show_domain_settings = True, - version = '', - invalid_build = True, - sep_sim = True, - installer_available = True, - invoiced_publishable_key = '', - stripe_public_key = '', - intercom_id = '', - aux_webhook = '', - gtm_id = '', - zapier_feedback_webhook = '', - zapier_bugs_webhook = '', - billing_backend = '', - maintenance = None, - logging = corellium_api.models.logging.Logging( - development = True, - throw_warnings = True, ), - cloud_admin = '', - files_admin = '', - cloud_domain = '', - billing_domain = '', - app_domain = '', - max_network_monitor_file_size = '', - enable_firmware_image_upload = True, + on_site = False, + network_types = ["bridged","nat","routed"], + network_type = 'bridged', + show_domain_settings = False, + version = '7.4.0-28212', + invalid_build = False, + sep_sim = True, + installer_available = True, + stripe_public_key = 'pk_test_xxxxxxxxxxxxxxxxxxxxxxxx', + intercom_id = 'abc12345', + gtm_id = 'GTM-ABCD123', + billing_backend = 'stripe', + maintenance = corellium.models.config_response_maintenance.ConfigResponse_maintenance( + message = 'The system is currently undergoing scheduled maintenance. Please check back soon.', + header = 'Scheduled Maintenance', ), + logging = corellium.models.logging.Logging( + development = False, + throw_warnings = False, ), + cloud_admin = 'https://admin.corellium.com/login', + files_admin = 'https://onsite.corellium.com/login', + cloud_domain = 'corellium.com', + billing_domain = 'billing.app.corellium.com', + app_domain = 'app.corellium.com', + max_network_monitor_file_size = '2000m', + enable_firmware_image_upload = True, auth_providers = [ - corellium_api.models.auth_provider.AuthProvider( - name = '', - identifier = '', - provider_type = '', + corellium.models.config_auth_provider.ConfigAuthProvider( + name = 'Database', + provider_type = 'database', default = True, - label = '', + label = 'database', enabled = True, - authorization_url = '', - id = '', - provider = '', ) - ], - snapshot_limit = 1.337, - max_kernel_size = 1.337, - max_ramdisk_size = 1.337, - charm_sdk = '', - trial = corellium_api.models.trial.Trial( - default_duration = 1.337, - default_hours = 1.337, - default_devices = 1.337, - default_cores = 1.337, ), - sentry_url = '', - domain_authentication_providers = True, - default_ssid = '' + authorization_url = '/api/v1/auth/providers/database/authorization_url', + identifier = 'database', + provider = 'database', ) + ], + welcome_message = 'Welcome to the Corellium virtual device platform!', + snapshot_limit = 10, + max_kernel_size = 104857600, + max_ramdisk_size = 524288000, + charm_sdk = True, + trial = corellium.models.trial.Trial( + default_duration = 30, + default_hours = 24, + default_devices = 24, + default_cores = 10, ), + sentry_url = 'https://sentry.example.com', + domain_authentication_providers = False, + remote_gpu = False, + default_ssid = 'Corellium', + aws_marketplace = False, + open_g_apps_binary = 'http://downloads.sourceforge.net/project/opengapps/arm64/20220119/open_gapps-arm64-11.0-pico-20220119.zip', + air_gapped = False, + coordinator_config = corellium.models.coordinator_config.CoordinatorConfig( + usb_media_access_enabled = True, ), + ai_tools_config = corellium.models.config_response_ai_tools_config.ConfigResponse_aiToolsConfig( + ai_enabled = True, ) ) - else : + else: return ConfigResponse( + on_site = False, + network_types = ["bridged","nat","routed"], + network_type = 'bridged', + show_domain_settings = False, + version = '7.4.0-28212', + sep_sim = True, + installer_available = True, + cloud_admin = 'https://admin.corellium.com/login', + files_admin = 'https://onsite.corellium.com/login', + max_network_monitor_file_size = '2000m', + enable_firmware_image_upload = True, + auth_providers = [ + corellium.models.config_auth_provider.ConfigAuthProvider( + name = 'Database', + provider_type = 'database', + default = True, + label = 'database', + enabled = True, + authorization_url = '/api/v1/auth/providers/database/authorization_url', + identifier = 'database', + provider = 'database', ) + ], + snapshot_limit = 10, + max_kernel_size = 104857600, + max_ramdisk_size = 524288000, + trial = corellium.models.trial.Trial( + default_duration = 30, + default_hours = 24, + default_devices = 24, + default_cores = 10, ), + default_ssid = 'Corellium', + coordinator_config = corellium.models.coordinator_config.CoordinatorConfig( + usb_media_access_enabled = True, ), ) + """ def testConfigResponse(self): """Test ConfigResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_config_response_ai_tools_config.py b/test/test_config_response_ai_tools_config.py new file mode 100644 index 0000000..919bb02 --- /dev/null +++ b/test/test_config_response_ai_tools_config.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.config_response_ai_tools_config import ConfigResponseAiToolsConfig + +class TestConfigResponseAiToolsConfig(unittest.TestCase): + """ConfigResponseAiToolsConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConfigResponseAiToolsConfig: + """Test ConfigResponseAiToolsConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConfigResponseAiToolsConfig` + """ + model = ConfigResponseAiToolsConfig() + if include_optional: + return ConfigResponseAiToolsConfig( + ai_enabled = True + ) + else: + return ConfigResponseAiToolsConfig( + ) + """ + + def testConfigResponseAiToolsConfig(self): + """Test ConfigResponseAiToolsConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_config_response_maintenance.py b/test/test_config_response_maintenance.py index a47070b..847296e 100644 --- a/test/test_config_response_maintenance.py +++ b/test/test_config_response_maintenance.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.config_response_maintenance import ConfigResponseMaintenance # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.config_response_maintenance import ConfigResponseMaintenance class TestConfigResponseMaintenance(unittest.TestCase): """ConfigResponseMaintenance unit test stubs""" @@ -28,6 +26,26 @@ def setUp(self): def tearDown(self): pass + def make_instance(self, include_optional) -> ConfigResponseMaintenance: + """Test ConfigResponseMaintenance + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConfigResponseMaintenance` + """ + model = ConfigResponseMaintenance() + if include_optional: + return ConfigResponseMaintenance( + message = 'The system is currently undergoing scheduled maintenance. Please check back soon.', + header = 'Scheduled Maintenance' + ) + else: + return ConfigResponseMaintenance( + message = 'The system is currently undergoing scheduled maintenance. Please check back soon.', + header = 'Scheduled Maintenance', + ) + """ + def testConfigResponseMaintenance(self): """Test ConfigResponseMaintenance""" # inst_req_only = self.make_instance(include_optional=False) diff --git a/test/test_config_response_v1.py b/test/test_config_response_v1.py new file mode 100644 index 0000000..14170c0 --- /dev/null +++ b/test/test_config_response_v1.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.config_response_v1 import ConfigResponseV1 + +class TestConfigResponseV1(unittest.TestCase): + """ConfigResponseV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ConfigResponseV1: + """Test ConfigResponseV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ConfigResponseV1` + """ + model = ConfigResponseV1() + if include_optional: + return ConfigResponseV1( + on_site = True, + network_types = [ + '' + ], + network_type = '', + show_domain_settings = True, + version = '', + invalid_build = True, + sep_sim = True, + installer_available = True, + invoiced_publishable_key = '', + stripe_public_key = '', + intercom_id = '', + gtm_id = '', + billing_backend = '', + maintenance = None, + logging = corellium.models.logging_v1.LoggingV1( + development = True, + throw_warnings = True, ), + cloud_admin = '', + files_admin = '', + cloud_domain = '', + billing_domain = '', + app_domain = '', + max_network_monitor_file_size = '', + enable_firmware_image_upload = True, + auth_providers = [ + corellium.models.auth_provider_v1.AuthProviderV1( + name = '', + identifier = '', + provider_type = '', + default = True, + label = '', + enabled = True, + authorization_url = '', + id = '', + provider = '', ) + ], + snapshot_limit = 1.337, + max_kernel_size = 1.337, + max_ramdisk_size = 1.337, + charm_sdk = True, + trial = corellium.models.trial_v1.TrialV1( + default_duration = 1.337, + default_hours = 1.337, + default_devices = 1.337, + default_cores = 1.337, ), + sentry_url = '', + domain_authentication_providers = True, + default_ssid = '', + coordinator_config = corellium.models.coordinator_config_v1.CoordinatorConfigV1( + usb_media_access_enabled = True, ) + ) + else: + return ConfigResponseV1( + ) + """ + + def testConfigResponseV1(self): + """Test ConfigResponseV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_config_v1_api.py b/test/test_config_v1_api.py new file mode 100644 index 0000000..9ec1525 --- /dev/null +++ b/test/test_config_v1_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.config_v1_api import ConfigV1Api + + +class TestConfigV1Api(unittest.TestCase): + """ConfigV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = ConfigV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_get_config(self) -> None: + """Test case for v1_get_config + + Get all configs + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_coordinator_config.py b/test/test_coordinator_config.py new file mode 100644 index 0000000..92c4d97 --- /dev/null +++ b/test/test_coordinator_config.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.coordinator_config import CoordinatorConfig + +class TestCoordinatorConfig(unittest.TestCase): + """CoordinatorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CoordinatorConfig: + """Test CoordinatorConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CoordinatorConfig` + """ + model = CoordinatorConfig() + if include_optional: + return CoordinatorConfig( + usb_media_access_enabled = True + ) + else: + return CoordinatorConfig( + ) + """ + + def testCoordinatorConfig(self): + """Test CoordinatorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_coordinator_config_v1.py b/test/test_coordinator_config_v1.py new file mode 100644 index 0000000..e1e60d4 --- /dev/null +++ b/test/test_coordinator_config_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.coordinator_config_v1 import CoordinatorConfigV1 + +class TestCoordinatorConfigV1(unittest.TestCase): + """CoordinatorConfigV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CoordinatorConfigV1: + """Test CoordinatorConfigV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CoordinatorConfigV1` + """ + model = CoordinatorConfigV1() + if include_optional: + return CoordinatorConfigV1( + usb_media_access_enabled = True + ) + else: + return CoordinatorConfigV1( + ) + """ + + def testCoordinatorConfigV1(self): + """Test CoordinatorConfigV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_core_trace_api.py b/test/test_core_trace_api.py new file mode 100644 index 0000000..cd9566c --- /dev/null +++ b/test/test_core_trace_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.core_trace_api import CoreTraceApi + + +class TestCoreTraceApi(unittest.TestCase): + """CoreTraceApi unit test stubs""" + + def setUp(self) -> None: + self.api = CoreTraceApi() + + def tearDown(self) -> None: + pass + + def test_v3_clear_core_trace(self) -> None: + """Test case for v3_clear_core_trace + + Clear CoreTrace output + """ + pass + + def test_v3_list_threads(self) -> None: + """Test case for v3_list_threads + + List running processes (CoreTrace) + """ + pass + + def test_v3_start_core_trace(self) -> None: + """Test case for v3_start_core_trace + + Start CoreTrace + """ + pass + + def test_v3_stop_core_trace(self) -> None: + """Test case for v3_stop_core_trace + + Stop CoreTrace + """ + pass + + def test_v3_strace_preauthorize(self) -> None: + """Test case for v3_strace_preauthorize + + Get a CoreTrace download token + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_core_trace_v1_api.py b/test/test_core_trace_v1_api.py new file mode 100644 index 0000000..11c66dc --- /dev/null +++ b/test/test_core_trace_v1_api.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.core_trace_v1_api import CoreTraceV1Api + + +class TestCoreTraceV1Api(unittest.TestCase): + """CoreTraceV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = CoreTraceV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_clear_core_trace(self) -> None: + """Test case for v1_clear_core_trace + + Clear CoreTrace logs + """ + pass + + def test_v1_list_threads(self) -> None: + """Test case for v1_list_threads + + Get Running Threads (CoreTrace) + """ + pass + + def test_v1_start_core_trace(self) -> None: + """Test case for v1_start_core_trace + + Start CoreTrace on an instance + """ + pass + + def test_v1_stop_core_trace(self) -> None: + """Test case for v1_stop_core_trace + + Stop CoreTrace on an instance. + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_corellium_api.py b/test/test_corellium_api.py deleted file mode 100644 index 66d1701..0000000 --- a/test/test_corellium_api.py +++ /dev/null @@ -1,1377 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest - -import corellium_api -from corellium_api.api.corellium_api import CorelliumApi # noqa: E501 -from corellium_api.rest import ApiException - - -class TestCorelliumApi(unittest.TestCase): - """CorelliumApi unit test stubs""" - - def setUp(self): - self.api = corellium_api.api.corellium_api.CorelliumApi() # noqa: E501 - - def tearDown(self): - pass - - def test_api_v1_cluster_nodes_node_id_console_get(self): - """Test case for api_v1_cluster_nodes_node_id_console_get - - Access node console via SSH # noqa: E501 - """ - pass - - def test_api_v1_interconnects_get(self): - """Test case for api_v1_interconnects_get - - Get all I/O Interconnects # noqa: E501 - """ - pass - - def test_api_v1_interconnects_interconnect_id_delete(self): - """Test case for api_v1_interconnects_interconnect_id_delete - - Delete I/O Interconnect # noqa: E501 - """ - pass - - def test_api_v1_interconnects_interconnect_id_get(self): - """Test case for api_v1_interconnects_interconnect_id_get - - Get Interconnect # noqa: E501 - """ - pass - - def test_api_v1_interconnects_interconnect_id_patch(self): - """Test case for api_v1_interconnects_interconnect_id_patch - - Partial Update Interconnect # noqa: E501 - """ - pass - - def test_api_v1_interconnects_interconnect_id_put(self): - """Test case for api_v1_interconnects_interconnect_id_put - - Update Interconnect # noqa: E501 - """ - pass - - def test_api_v1_interconnects_post(self): - """Test case for api_v1_interconnects_post - - Create I/O Interconnect # noqa: E501 - """ - pass - - def test_create_assessment(self): - """Test case for create_assessment - - Create assessment # noqa: E501 - """ - pass - - def test_delete_assessment(self): - """Test case for delete_assessment - - Delete assessment # noqa: E501 - """ - pass - - def test_download_report(self): - """Test case for download_report - - Download report # noqa: E501 - """ - pass - - def test_get_assessment_by_id(self): - """Test case for get_assessment_by_id - - Get assessment by ID # noqa: E501 - """ - pass - - def test_get_assessments_by_instance_id(self): - """Test case for get_assessments_by_instance_id - - Get assessments by instanceId # noqa: E501 - """ - pass - - def test_run_tests(self): - """Test case for run_tests - - Update assessment state and execute MATRIX tests # noqa: E501 - """ - pass - - def test_start_monitoring(self): - """Test case for start_monitoring - - Update assessment state and begin device monitoring # noqa: E501 - """ - pass - - def test_stop_monitoring(self): - """Test case for stop_monitoring - - Update assessment state and stop device monitoring # noqa: E501 - """ - pass - - def test_v1_accept_shared_snapshot(self): - """Test case for v1_accept_shared_snapshot - - Accept a snapshot shared with you # noqa: E501 - """ - pass - - def test_v1_activity_export(self): - """Test case for v1_activity_export - - Start activity export # noqa: E501 - """ - pass - - def test_v1_activity_list(self): - """Test case for v1_activity_list - - Get resource activities # noqa: E501 - """ - pass - - def test_v1_add_project_key(self): - """Test case for v1_add_project_key - - Add Project Authorized Key # noqa: E501 - """ - pass - - def test_v1_add_team_role_to_project(self): - """Test case for v1_add_team_role_to_project - - Add team role to project # noqa: E501 - """ - pass - - def test_v1_add_user_role_to_project(self): - """Test case for v1_add_user_role_to_project - - Add user role to project # noqa: E501 - """ - pass - - def test_v1_add_user_to_team(self): - """Test case for v1_add_user_to_team - - Add user to team # noqa: E501 - """ - pass - - def test_v1_agent_app_ready(self): - """Test case for v1_agent_app_ready - - Check if App subsystem is ready # noqa: E501 - """ - pass - - def test_v1_agent_delete_file(self): - """Test case for v1_agent_delete_file - - Delete a File on VM # noqa: E501 - """ - pass - - def test_v1_agent_get_file(self): - """Test case for v1_agent_get_file - - Download a File from VM # noqa: E501 - """ - pass - - def test_v1_agent_get_temp_filename(self): - """Test case for v1_agent_get_temp_filename - - Get the path for a new temp file # noqa: E501 - """ - pass - - def test_v1_agent_install_app(self): - """Test case for v1_agent_install_app - - Install App at path # noqa: E501 - """ - pass - - def test_v1_agent_install_profile(self): - """Test case for v1_agent_install_profile - - Install a Profile to VM # noqa: E501 - """ - pass - - def test_v1_agent_kill_app(self): - """Test case for v1_agent_kill_app - - Kill an App # noqa: E501 - """ - pass - - def test_v1_agent_list_app_icons(self): - """Test case for v1_agent_list_app_icons - - List App Icons # noqa: E501 - """ - pass - - def test_v1_agent_list_apps(self): - """Test case for v1_agent_list_apps - - List Apps # noqa: E501 - """ - pass - - def test_v1_agent_list_apps_status(self): - """Test case for v1_agent_list_apps_status - - List Apps Status # noqa: E501 - """ - pass - - def test_v1_agent_list_profiles(self): - """Test case for v1_agent_list_profiles - - List Profiles # noqa: E501 - """ - pass - - def test_v1_agent_run_app(self): - """Test case for v1_agent_run_app - - Run an App # noqa: E501 - """ - pass - - def test_v1_agent_set_file_attributes(self): - """Test case for v1_agent_set_file_attributes - - Change Attrs of a File on VM # noqa: E501 - """ - pass - - def test_v1_agent_system_get_adb_auth(self): - """Test case for v1_agent_system_get_adb_auth - - Get ADB Auth Setting (AOSP only) # noqa: E501 - """ - pass - - def test_v1_agent_system_get_network(self): - """Test case for v1_agent_system_get_network - - Get IP of eth0 (AOSP only) # noqa: E501 - """ - pass - - def test_v1_agent_system_get_prop(self): - """Test case for v1_agent_system_get_prop - - Get System Property (AOSP only) # noqa: E501 - """ - pass - - def test_v1_agent_system_install_open_g_apps(self): - """Test case for v1_agent_system_install_open_g_apps - - Install OpenGApps (AOSP only) # noqa: E501 - """ - pass - - def test_v1_agent_system_lock(self): - """Test case for v1_agent_system_lock - - Lock Device (iOS Only) # noqa: E501 - """ - pass - - def test_v1_agent_system_set_adb_auth(self): - """Test case for v1_agent_system_set_adb_auth - - Set ADB Auth Setting (AOSP only) # noqa: E501 - """ - pass - - def test_v1_agent_system_set_hostname(self): - """Test case for v1_agent_system_set_hostname - - Set Hostname of instance # noqa: E501 - """ - pass - - def test_v1_agent_system_shutdown(self): - """Test case for v1_agent_system_shutdown - - Instruct VM to halt # noqa: E501 - """ - pass - - def test_v1_agent_system_unlock(self): - """Test case for v1_agent_system_unlock - - Unlock Device (iOS Only) # noqa: E501 - """ - pass - - def test_v1_agent_uninstall_app(self): - """Test case for v1_agent_uninstall_app - - Uninstall an App # noqa: E501 - """ - pass - - def test_v1_agent_uninstall_profile(self): - """Test case for v1_agent_uninstall_profile - - Uninstall a Profile from VM # noqa: E501 - """ - pass - - def test_v1_agent_upload_file(self): - """Test case for v1_agent_upload_file - - Upload a file to VM # noqa: E501 - """ - pass - - def test_v1_attach_instance_interface(self): - """Test case for v1_attach_instance_interface - - Attach I/O Interface # noqa: E501 - """ - pass - - def test_v1_auth_login(self): - """Test case for v1_auth_login - - Log In # noqa: E501 - """ - pass - - def test_v1_btrace_preauthorize(self): - """Test case for v1_btrace_preauthorize - - Pre-authorize an btrace download # noqa: E501 - """ - pass - - def test_v1_clear_core_trace(self): - """Test case for v1_clear_core_trace - - Clear CoreTrace logs # noqa: E501 - """ - pass - - def test_v1_clear_hyper_trace(self): - """Test case for v1_clear_hyper_trace - - Clear HyperTrace logs # noqa: E501 - """ - pass - - def test_v1_clear_hyper_trace_hooks(self): - """Test case for v1_clear_hyper_trace_hooks - - Clear Hooks on an instance # noqa: E501 - """ - pass - - def test_v1_clear_instance_panics(self): - """Test case for v1_clear_instance_panics - - Clear Panics # noqa: E501 - """ - pass - - def test_v1_cluster_firmware_service_devices_get(self): - """Test case for v1_cluster_firmware_service_devices_get - - Fetch devices from the firmware service # noqa: E501 - """ - pass - - def test_v1_cluster_firmware_service_firmware_assets_asset_url_delete(self): - """Test case for v1_cluster_firmware_service_firmware_assets_asset_url_delete - - Delete a firmware asset by its URL # noqa: E501 - """ - pass - - def test_v1_cluster_firmware_service_firmware_assets_asset_url_extended_get(self): - """Test case for v1_cluster_firmware_service_firmware_assets_asset_url_extended_get - - Fetch extended firmware-asset details including instances and associated IPSWs # noqa: E501 - """ - pass - - def test_v1_cluster_firmware_service_firmware_assets_get(self): - """Test case for v1_cluster_firmware_service_firmware_assets_get - - Fetch firmware assets from the firmware service # noqa: E501 - """ - pass - - def test_v1_cluster_firmware_service_firmware_assets_post(self): - """Test case for v1_cluster_firmware_service_firmware_assets_post - - Add firmware assets via the firmware service # noqa: E501 - """ - pass - - def test_v1_cluster_firmware_service_firmwares_filename_delete(self): - """Test case for v1_cluster_firmware_service_firmwares_filename_delete - - Delete a firmware by filename from the firmware service # noqa: E501 - """ - pass - - def test_v1_cluster_firmware_service_firmwares_get(self): - """Test case for v1_cluster_firmware_service_firmwares_get - - Fetch firmwares from the firmware service # noqa: E501 - """ - pass - - def test_v1_cluster_nodes_get(self): - """Test case for v1_cluster_nodes_get - - List servers in the cluster # noqa: E501 - """ - pass - - def test_v1_cluster_nodes_node_id_get(self): - """Test case for v1_cluster_nodes_node_id_get - - Get node details by ID # noqa: E501 - """ - pass - - def test_v1_create_domain_auth_provider(self): - """Test case for v1_create_domain_auth_provider - - Create a new auth provider for a domain # noqa: E501 - """ - pass - - def test_v1_create_hook(self): - """Test case for v1_create_hook - - Create hypervisor hook for Instance # noqa: E501 - """ - pass - - def test_v1_create_image(self): - """Test case for v1_create_image - - Create a new Image # noqa: E501 - """ - pass - - def test_v1_create_instance(self): - """Test case for v1_create_instance - - Create Instance # noqa: E501 - """ - pass - - def test_v1_create_network_connection(self): - """Test case for v1_create_network_connection - - Create a new Network Connection # noqa: E501 - """ - pass - - def test_v1_create_project(self): - """Test case for v1_create_project - - Create a Project # noqa: E501 - """ - pass - - def test_v1_create_snapshot(self): - """Test case for v1_create_snapshot - - Create Instance Snapshot # noqa: E501 - """ - pass - - def test_v1_create_user(self): - """Test case for v1_create_user - - Create User # noqa: E501 - """ - pass - - def test_v1_delete_domain_auth_provider(self): - """Test case for v1_delete_domain_auth_provider - - Delete an auth provider from a domain # noqa: E501 - """ - pass - - def test_v1_delete_extension(self): - """Test case for v1_delete_extension - - Delete an existing extension # noqa: E501 - """ - pass - - def test_v1_delete_hook(self): - """Test case for v1_delete_hook - - Delete an existing hypervisor hook # noqa: E501 - """ - pass - - def test_v1_delete_image(self): - """Test case for v1_delete_image - - Delete Image # noqa: E501 - """ - pass - - def test_v1_delete_instance(self): - """Test case for v1_delete_instance - - Remove Instance # noqa: E501 - """ - pass - - def test_v1_delete_instance_snapshot(self): - """Test case for v1_delete_instance_snapshot - - Delete an Instance Snapshot # noqa: E501 - """ - pass - - def test_v1_delete_network_connection(self): - """Test case for v1_delete_network_connection - - Delete an existing Network Connection # noqa: E501 - """ - pass - - def test_v1_delete_project(self): - """Test case for v1_delete_project - - Delete a Project # noqa: E501 - """ - pass - - def test_v1_delete_snapshot(self): - """Test case for v1_delete_snapshot - - Delete a Snapshot # noqa: E501 - """ - pass - - def test_v1_delete_snapshot_permissions(self): - """Test case for v1_delete_snapshot_permissions - - Delete member(s) # noqa: E501 - """ - pass - - def test_v1_delete_user(self): - """Test case for v1_delete_user - - Delete User # noqa: E501 - """ - pass - - def test_v1_detach_instance_interface(self): - """Test case for v1_detach_instance_interface - - Detach I/O Interface # noqa: E501 - """ - pass - - def test_v1_disable_expose_port(self): - """Test case for v1_disable_expose_port - - Disable an exposed port on an instance for device access. # noqa: E501 - """ - pass - - def test_v1_download_activity(self): - """Test case for v1_download_activity - - Download activity # noqa: E501 - """ - pass - - def test_v1_enable_expose_port(self): - """Test case for v1_enable_expose_port - - Enable an exposed port on an instance for device access. # noqa: E501 - """ - pass - - def test_v1_execute_hyper_trace_hooks(self): - """Test case for v1_execute_hyper_trace_hooks - - Execute Hooks on an instance # noqa: E501 - """ - pass - - def test_v1_get_activity_export_status(self): - """Test case for v1_get_activity_export_status - - Get export task status # noqa: E501 - """ - pass - - def test_v1_get_activity_export_tasks(self): - """Test case for v1_get_activity_export_tasks - - Get all export tasks for user # noqa: E501 - """ - pass - - def test_v1_get_config(self): - """Test case for v1_get_config - - Get all configs # noqa: E501 - """ - pass - - def test_v1_get_domain_auth_providers(self): - """Test case for v1_get_domain_auth_providers - - Return all configured auth providers for a domain (including globally configured providers) # noqa: E501 - """ - pass - - def test_v1_get_extension_by_id(self): - """Test case for v1_get_extension_by_id - - Get extension by id # noqa: E501 - """ - pass - - def test_v1_get_extensions(self): - """Test case for v1_get_extensions - - Get all extensions # noqa: E501 - """ - pass - - def test_v1_get_hook_by_id(self): - """Test case for v1_get_hook_by_id - - Get hypervisor hook by id # noqa: E501 - """ - pass - - def test_v1_get_hooks(self): - """Test case for v1_get_hooks - - Get all hypervisor hooks for Instance # noqa: E501 - """ - pass - - def test_v1_get_image(self): - """Test case for v1_get_image - - Get Image Metadata # noqa: E501 - """ - pass - - def test_v1_get_images(self): - """Test case for v1_get_images - - Get all Images Metadata # noqa: E501 - """ - pass - - def test_v1_get_install_firmware_status(self): - """Test case for v1_get_install_firmware_status - - Query install firmware request status. # noqa: E501 - """ - pass - - def test_v1_get_instance(self): - """Test case for v1_get_instance - - Get Instance # noqa: E501 - """ - pass - - def test_v1_get_instance_console(self): - """Test case for v1_get_instance_console - - Get console websocket URL # noqa: E501 - """ - pass - - def test_v1_get_instance_console_log(self): - """Test case for v1_get_instance_console_log - - Get Console Log # noqa: E501 - """ - pass - - def test_v1_get_instance_gpios(self): - """Test case for v1_get_instance_gpios - - Get Instance GPIOs # noqa: E501 - """ - pass - - def test_v1_get_instance_panics(self): - """Test case for v1_get_instance_panics - - Get Panics # noqa: E501 - """ - pass - - def test_v1_get_instance_peripherals(self): - """Test case for v1_get_instance_peripherals - - Get Instance Peripherals # noqa: E501 - """ - pass - - def test_v1_get_instance_screenshot(self): - """Test case for v1_get_instance_screenshot - - Get Instance Screenshot # noqa: E501 - """ - pass - - def test_v1_get_instance_snapshot(self): - """Test case for v1_get_instance_snapshot - - Get Instance Snapshot # noqa: E501 - """ - pass - - def test_v1_get_instance_snapshots(self): - """Test case for v1_get_instance_snapshots - - Get Instance Snapshots # noqa: E501 - """ - pass - - def test_v1_get_instances(self): - """Test case for v1_get_instances - - Get Instances # noqa: E501 - """ - pass - - def test_v1_get_model_software(self): - """Test case for v1_get_model_software - - Get Software for Model # noqa: E501 - """ - pass - - def test_v1_get_models(self): - """Test case for v1_get_models - - Get Supported Models # noqa: E501 - """ - pass - - def test_v1_get_network_connection(self): - """Test case for v1_get_network_connection - - Return the configuration and per project statuses for a single network provider. # noqa: E501 - """ - pass - - def test_v1_get_project(self): - """Test case for v1_get_project - - Get a Project # noqa: E501 - """ - pass - - def test_v1_get_project_instances(self): - """Test case for v1_get_project_instances - - Get Instances in Project # noqa: E501 - """ - pass - - def test_v1_get_project_keys(self): - """Test case for v1_get_project_keys - - Get Project Authorized Keys # noqa: E501 - """ - pass - - def test_v1_get_project_network_log(self): - """Test case for v1_get_project_network_log - - Retrieve the network connection log for a project # noqa: E501 - """ - pass - - def test_v1_get_project_network_status(self): - """Test case for v1_get_project_network_status - - Retrieve the network connection status for a project # noqa: E501 - """ - pass - - def test_v1_get_project_vpn_config(self): - """Test case for v1_get_project_vpn_config - - Get Project VPN Configuration # noqa: E501 - """ - pass - - def test_v1_get_projects(self): - """Test case for v1_get_projects - - Get Projects # noqa: E501 - """ - pass - - def test_v1_get_reset_link_info(self): - """Test case for v1_get_reset_link_info - - Send Password Reset Link Info # noqa: E501 - """ - pass - - def test_v1_get_shared_snapshots(self): - """Test case for v1_get_shared_snapshots - - Fetch shared snapshots # noqa: E501 - """ - pass - - def test_v1_get_snapshot(self): - """Test case for v1_get_snapshot - - Get Snapshot # noqa: E501 - """ - pass - - def test_v1_install_firmware(self): - """Test case for v1_install_firmware - - Installs a firmware for cluster-wide use # noqa: E501 - """ - pass - - def test_v1_instances_instance_id_message_post(self): - """Test case for v1_instances_instance_id_message_post - - Inject a message into an iOS VM # noqa: E501 - """ - pass - - def test_v1_instances_instance_id_netdump_pcap_get(self): - """Test case for v1_instances_instance_id_netdump_pcap_get - - Download a netdump pcap file # noqa: E501 - """ - pass - - def test_v1_instances_instance_id_network_monitor_pcap_get(self): - """Test case for v1_instances_instance_id_network_monitor_pcap_get - - Download a Network Monitor pcap file # noqa: E501 - """ - pass - - def test_v1_kcrange(self): - """Test case for v1_kcrange - - Get Kernel extension ranges # noqa: E501 - """ - pass - - def test_v1_list_network_connections(self): - """Test case for v1_list_network_connections - - List available network connections # noqa: E501 - """ - pass - - def test_v1_list_network_interfaces(self): - """Test case for v1_list_network_interfaces - - List available physical network interfaces # noqa: E501 - """ - pass - - def test_v1_list_network_providers(self): - """Test case for v1_list_network_providers - - List available network providers # noqa: E501 - """ - pass - - def test_v1_list_threads(self): - """Test case for v1_list_threads - - Get Running Threads (CoreTrace) # noqa: E501 - """ - pass - - def test_v1_load_extension(self): - """Test case for v1_load_extension - - Load an extension # noqa: E501 - """ - pass - - def test_v1_media_play(self): - """Test case for v1_media_play - - Start playing media # noqa: E501 - """ - pass - - def test_v1_media_stop(self): - """Test case for v1_media_stop - - Stop playing media # noqa: E501 - """ - pass - - def test_v1_parse_extension_json(self): - """Test case for v1_parse_extension_json - - Validates extension.json # noqa: E501 - """ - pass - - def test_v1_partial_update_network_connection(self): - """Test case for v1_partial_update_network_connection - - Update Network Connection (partial) # noqa: E501 - """ - pass - - def test_v1_patch_instance(self): - """Test case for v1_patch_instance - - Update Instance # noqa: E501 - """ - pass - - def test_v1_patch_instance_read_only(self): - """Test case for v1_patch_instance_read_only - - Update Instance Read Only # noqa: E501 - """ - pass - - def test_v1_pause_instance(self): - """Test case for v1_pause_instance - - Pause an Instance # noqa: E501 - """ - pass - - def test_v1_post_instance_input(self): - """Test case for v1_post_instance_input - - Provide Instance Input # noqa: E501 - """ - pass - - def test_v1_ready(self): - """Test case for v1_ready - - API Status # noqa: E501 - """ - pass - - def test_v1_reboot_instance(self): - """Test case for v1_reboot_instance - - Reboot an Instance # noqa: E501 - """ - pass - - def test_v1_remove_project_key(self): - """Test case for v1_remove_project_key - - Delete Project Authorized Key # noqa: E501 - """ - pass - - def test_v1_remove_team_role_from_project(self): - """Test case for v1_remove_team_role_from_project - - Remove team role from project # noqa: E501 - """ - pass - - def test_v1_remove_user_from_team(self): - """Test case for v1_remove_user_from_team - - Remove user from team # noqa: E501 - """ - pass - - def test_v1_remove_user_role_from_project(self): - """Test case for v1_remove_user_role_from_project - - Remove user role from project # noqa: E501 - """ - pass - - def test_v1_rename_instance_snapshot(self): - """Test case for v1_rename_instance_snapshot - - Rename an Instance Snapshot # noqa: E501 - """ - pass - - def test_v1_reset_user_password(self): - """Test case for v1_reset_user_password - - Reset User Password # noqa: E501 - """ - pass - - def test_v1_restore_backup(self): - """Test case for v1_restore_backup - - Restore backup # noqa: E501 - """ - pass - - def test_v1_restore_instance_snapshot(self): - """Test case for v1_restore_instance_snapshot - - Restore an Instance Snapshot # noqa: E501 - """ - pass - - def test_v1_roles(self): - """Test case for v1_roles - - Get all roles # noqa: E501 - """ - pass - - def test_v1_rotate_instance(self): - """Test case for v1_rotate_instance - - Rotate device to specified orientation # noqa: E501 - """ - pass - - def test_v1_send_user_reset_link(self): - """Test case for v1_send_user_reset_link - - Send Password Reset Link # noqa: E501 - """ - pass - - def test_v1_set_instance_gpios(self): - """Test case for v1_set_instance_gpios - - Set Instance GPIOs # noqa: E501 - """ - pass - - def test_v1_set_instance_peripherals(self): - """Test case for v1_set_instance_peripherals - - Set Instance Peripherals # noqa: E501 - """ - pass - - def test_v1_set_instance_state(self): - """Test case for v1_set_instance_state - - Set state of Instance # noqa: E501 - """ - pass - - def test_v1_set_snapshot_permissions(self): - """Test case for v1_set_snapshot_permissions - - Set member list # noqa: E501 - """ - pass - - def test_v1_share_snapshot(self): - """Test case for v1_share_snapshot - - Share snapshot # noqa: E501 - """ - pass - - def test_v1_snapshot_rename(self): - """Test case for v1_snapshot_rename - - Rename a Snapshot # noqa: E501 - """ - pass - - def test_v1_start_core_trace(self): - """Test case for v1_start_core_trace - - Start CoreTrace on an instance # noqa: E501 - """ - pass - - def test_v1_start_hyper_trace(self): - """Test case for v1_start_hyper_trace - - Start HyperTrace on an instance # noqa: E501 - """ - pass - - def test_v1_start_instance(self): - """Test case for v1_start_instance - - Start an Instance # noqa: E501 - """ - pass - - def test_v1_start_netdump(self): - """Test case for v1_start_netdump - - Start Enhanced Network Monitor on an instance. # noqa: E501 - """ - pass - - def test_v1_start_network_monitor(self): - """Test case for v1_start_network_monitor - - Start Network Monitor on an instance. # noqa: E501 - """ - pass - - def test_v1_stop_core_trace(self): - """Test case for v1_stop_core_trace - - Stop CoreTrace on an instance. # noqa: E501 - """ - pass - - def test_v1_stop_hyper_trace(self): - """Test case for v1_stop_hyper_trace - - Stop HyperTrace on an instance. # noqa: E501 - """ - pass - - def test_v1_stop_instance(self): - """Test case for v1_stop_instance - - Stop an Instance # noqa: E501 - """ - pass - - def test_v1_stop_netdump(self): - """Test case for v1_stop_netdump - - Stop Enhanced Network Monitor on an instance. # noqa: E501 - """ - pass - - def test_v1_stop_network_monitor(self): - """Test case for v1_stop_network_monitor - - Stop Network Monitor on an instance. # noqa: E501 - """ - pass - - def test_v1_team_change(self): - """Test case for v1_team_change - - Update team # noqa: E501 - """ - pass - - def test_v1_team_create(self): - """Test case for v1_team_create - - Create team # noqa: E501 - """ - pass - - def test_v1_team_delete(self): - """Test case for v1_team_delete - - Delete team # noqa: E501 - """ - pass - - def test_v1_teams(self): - """Test case for v1_teams - - Get teams # noqa: E501 - """ - pass - - def test_v1_unpause_instance(self): - """Test case for v1_unpause_instance - - Unpause an Instance # noqa: E501 - """ - pass - - def test_v1_update_domain_auth_provider(self): - """Test case for v1_update_domain_auth_provider - - Update an auth provider for a domain # noqa: E501 - """ - pass - - def test_v1_update_extension(self): - """Test case for v1_update_extension - - Update an existing extension # noqa: E501 - """ - pass - - def test_v1_update_hook(self): - """Test case for v1_update_hook - - Update an existing hypervisor hook # noqa: E501 - """ - pass - - def test_v1_update_network_connection(self): - """Test case for v1_update_network_connection - - Update Network Connection # noqa: E501 - """ - pass - - def test_v1_update_project(self): - """Test case for v1_update_project - - Update a Project # noqa: E501 - """ - pass - - def test_v1_update_project_settings(self): - """Test case for v1_update_project_settings - - Change Project Settings # noqa: E501 - """ - pass - - def test_v1_update_user(self): - """Test case for v1_update_user - - Update User # noqa: E501 - """ - pass - - def test_v1_upgrade_instance(self): - """Test case for v1_upgrade_instance - - Upgrade iOS version # noqa: E501 - """ - pass - - def test_v1_upload_image_data(self): - """Test case for v1_upload_image_data - - Upload Image Data # noqa: E501 - """ - pass - - def test_v1_user_agree_terms(self): - """Test case for v1_user_agree_terms - - Consent to the current terms and conditions # noqa: E501 - """ - pass - - def test_v1_users_change_password_post(self): - """Test case for v1_users_change_password_post - - Change User Password # noqa: E501 - """ - pass - - def test_v1_users_login(self): - """Test case for v1_users_login - - Log In # noqa: E501 - """ - pass - - def test_v1_web_player_allowed_domains(self): - """Test case for v1_web_player_allowed_domains - - Retrieve the list of allowed domains for all Webplayer sessions # noqa: E501 - """ - pass - - def test_v1_web_player_create_session(self): - """Test case for v1_web_player_create_session - - Create a new Webplayer Session # noqa: E501 - """ - pass - - def test_v1_web_player_destroy_session(self): - """Test case for v1_web_player_destroy_session - - Tear down a Webplayer Session # noqa: E501 - """ - pass - - def test_v1_web_player_list_sessions(self): - """Test case for v1_web_player_list_sessions - - List all Webplayer sessions # noqa: E501 - """ - pass - - def test_v1_web_player_session_info(self): - """Test case for v1_web_player_session_info - - Retrieve Webplayer Session Information # noqa: E501 - """ - pass - - def test_v2_get_instance_quick_connect_command(self): - """Test case for v2_get_instance_quick_connect_command - - Recommended SSH Command for Quick Connect # noqa: E501 - """ - pass - - def test_v2_get_instance_state(self): - """Test case for v2_get_instance_state - - Get state of Instance # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_coupon_options.py b/test/test_coupon_options.py index 85cdbe6..8b9d28c 100644 --- a/test/test_coupon_options.py +++ b/test/test_coupon_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.coupon_options import CouponOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.coupon_options import CouponOptions class TestCouponOptions(unittest.TestCase): """CouponOptions unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CouponOptions: """Test CouponOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.coupon_options.CouponOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CouponOptions` + """ + model = CouponOptions() + if include_optional: return CouponOptions( - type = 'percent', - amount = 1.337, + type = 'percent', + amount = 1.337, used = True ) - else : + else: return CouponOptions( type = 'percent', amount = 1.337, used = True, ) + """ def testCouponOptions(self): """Test CouponOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_create_activity_export_body.py b/test/test_create_activity_export_body.py new file mode 100644 index 0000000..ffec83c --- /dev/null +++ b/test/test_create_activity_export_body.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_activity_export_body import CreateActivityExportBody + +class TestCreateActivityExportBody(unittest.TestCase): + """CreateActivityExportBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateActivityExportBody: + """Test CreateActivityExportBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateActivityExportBody` + """ + model = CreateActivityExportBody() + if include_optional: + return CreateActivityExportBody( + resource = None, + offset = 0, + order_by = '-createdAt', + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + actor = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + search = 'iPhone15,2', + to = '2026-05-22T13:58:34Z', + var_from = '2026-05-22T00:00Z' + ) + else: + return CreateActivityExportBody( + ) + """ + + def testCreateActivityExportBody(self): + """Test CreateActivityExportBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_activity_export_response.py b/test/test_create_activity_export_response.py new file mode 100644 index 0000000..4811826 --- /dev/null +++ b/test/test_create_activity_export_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_activity_export_response import CreateActivityExportResponse + +class TestCreateActivityExportResponse(unittest.TestCase): + """CreateActivityExportResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateActivityExportResponse: + """Test CreateActivityExportResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateActivityExportResponse` + """ + model = CreateActivityExportResponse() + if include_optional: + return CreateActivityExportResponse( + id = 'activity-export/722cdce5-6f71-4f4a-b2b6-c00f11c015f6' + ) + else: + return CreateActivityExportResponse( + id = 'activity-export/722cdce5-6f71-4f4a-b2b6-c00f11c015f6', + ) + """ + + def testCreateActivityExportResponse(self): + """Test CreateActivityExportResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_assessment_dto.py b/test/test_create_assessment_dto.py deleted file mode 100644 index af7bd6f..0000000 --- a/test/test_create_assessment_dto.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.create_assessment_dto import CreateAssessmentDto # noqa: E501 -from corellium_api.rest import ApiException - -class TestCreateAssessmentDto(unittest.TestCase): - """CreateAssessmentDto unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test CreateAssessmentDto - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.create_assessment_dto.CreateAssessmentDto() # noqa: E501 - if include_optional : - return CreateAssessmentDto( - instance_id = '', - bundle_id = 'com.android.egg', - wordlist_id = '' - ) - else : - return CreateAssessmentDto( - instance_id = '', - bundle_id = 'com.android.egg', - ) - - def testCreateAssessmentDto(self): - """Test CreateAssessmentDto""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_create_assessment_input.py b/test/test_create_assessment_input.py new file mode 100644 index 0000000..ba4108c --- /dev/null +++ b/test/test_create_assessment_input.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_assessment_input import CreateAssessmentInput + +class TestCreateAssessmentInput(unittest.TestCase): + """CreateAssessmentInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateAssessmentInput: + """Test CreateAssessmentInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateAssessmentInput` + """ + model = CreateAssessmentInput() + if include_optional: + return CreateAssessmentInput( + instance_id = '', + bundle_id = 'com.android.egg', + wordlist_id = '', + frida_script_id = '', + created_by = '' + ) + else: + return CreateAssessmentInput( + instance_id = '', + bundle_id = 'com.android.egg', + ) + """ + + def testCreateAssessmentInput(self): + """Test CreateAssessmentInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_cloud_admin_trial_request_body.py b/test/test_create_cloud_admin_trial_request_body.py new file mode 100644 index 0000000..4e06e0c --- /dev/null +++ b/test/test_create_cloud_admin_trial_request_body.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_cloud_admin_trial_request_body import CreateCloudAdminTrialRequestBody + +class TestCreateCloudAdminTrialRequestBody(unittest.TestCase): + """CreateCloudAdminTrialRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateCloudAdminTrialRequestBody: + """Test CreateCloudAdminTrialRequestBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateCloudAdminTrialRequestBody` + """ + model = CreateCloudAdminTrialRequestBody() + if include_optional: + return CreateCloudAdminTrialRequestBody( + email = 'jane.doe@example.com', + name = 'Jane Doe', + phone = '+1-555-123-4567', + country = 'US', + company = 'Acme Corp', + industry = 'Software', + role = 'Security Engineer', + solution = 'Mobile App Security Testing', + product_id = 'prod_ExampleProductId', + granted = True, + number_of_apps = 12, + team_size = 25, + send_email = True, + duration = 14 + ) + else: + return CreateCloudAdminTrialRequestBody( + email = 'jane.doe@example.com', + name = 'Jane Doe', + phone = '+1-555-123-4567', + country = 'US', + company = 'Acme Corp', + industry = 'Software', + role = 'Security Engineer', + product_id = 'prod_ExampleProductId', + ) + """ + + def testCreateCloudAdminTrialRequestBody(self): + """Test CreateCloudAdminTrialRequestBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_domain_auth_provider_body.py b/test/test_create_domain_auth_provider_body.py new file mode 100644 index 0000000..60d7d77 --- /dev/null +++ b/test/test_create_domain_auth_provider_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_domain_auth_provider_body import CreateDomainAuthProviderBody + +class TestCreateDomainAuthProviderBody(unittest.TestCase): + """CreateDomainAuthProviderBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateDomainAuthProviderBody: + """Test CreateDomainAuthProviderBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateDomainAuthProviderBody` + """ + model = CreateDomainAuthProviderBody() + if include_optional: + return CreateDomainAuthProviderBody( + provider_type = 'open-id-connect', + enabled = True, + label = 'Log in with Okta', + config = None + ) + else: + return CreateDomainAuthProviderBody( + provider_type = 'open-id-connect', + enabled = True, + ) + """ + + def testCreateDomainAuthProviderBody(self): + """Test CreateDomainAuthProviderBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_domain_auth_provider_response.py b/test/test_create_domain_auth_provider_response.py new file mode 100644 index 0000000..9c00107 --- /dev/null +++ b/test/test_create_domain_auth_provider_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_domain_auth_provider_response import CreateDomainAuthProviderResponse + +class TestCreateDomainAuthProviderResponse(unittest.TestCase): + """CreateDomainAuthProviderResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateDomainAuthProviderResponse: + """Test CreateDomainAuthProviderResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateDomainAuthProviderResponse` + """ + model = CreateDomainAuthProviderResponse() + if include_optional: + return CreateDomainAuthProviderResponse( + identifier = '8036ef76-8194-4a7c-95b2-42606a5d0171', + config = None, + provider_type = 'open-id-connect', + label = 'Log in with Okta', + enabled = True, + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + default = False, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return CreateDomainAuthProviderResponse( + identifier = '8036ef76-8194-4a7c-95b2-42606a5d0171', + provider_type = 'open-id-connect', + label = 'Log in with Okta', + enabled = True, + default = False, + ) + """ + + def testCreateDomainAuthProviderResponse(self): + """Test CreateDomainAuthProviderResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_domain_auth_provider_response_config.py b/test/test_create_domain_auth_provider_response_config.py new file mode 100644 index 0000000..16da8ff --- /dev/null +++ b/test/test_create_domain_auth_provider_response_config.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_domain_auth_provider_response_config import CreateDomainAuthProviderResponseConfig + +class TestCreateDomainAuthProviderResponseConfig(unittest.TestCase): + """CreateDomainAuthProviderResponseConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateDomainAuthProviderResponseConfig: + """Test CreateDomainAuthProviderResponseConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateDomainAuthProviderResponseConfig` + """ + model = CreateDomainAuthProviderResponseConfig() + if include_optional: + return CreateDomainAuthProviderResponseConfig( + identity_provider_config = { + 'key' : null + }, + service_provider_config = { + 'key' : null + }, + user_attribute_mapping = { + 'key' : null + }, + group_mapping = [ + { + 'key' : null + } + ], + discovery_url = 'https://accounts.example.com/.well-known/openid-configuration', + client_id = 'corellium-domain-client', + client_secret = '', + invited_only = False, + server_connection_details = { + 'key' : null + }, + authentication_credentials = { + 'key' : null + }, + user_search_configuration = { + 'key' : null + }, + group_search_configuration = [ + { + 'key' : null + } + ] + ) + else: + return CreateDomainAuthProviderResponseConfig( + identity_provider_config = { + 'key' : null + }, + discovery_url = 'https://accounts.example.com/.well-known/openid-configuration', + client_id = 'corellium-domain-client', + client_secret = '', + server_connection_details = { + 'key' : null + }, + authentication_credentials = { + 'key' : null + }, + user_search_configuration = { + 'key' : null + }, + ) + """ + + def testCreateDomainAuthProviderResponseConfig(self): + """Test CreateDomainAuthProviderResponseConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_domain_welcome_message_body.py b/test/test_create_domain_welcome_message_body.py new file mode 100644 index 0000000..7b0ebf8 --- /dev/null +++ b/test/test_create_domain_welcome_message_body.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_domain_welcome_message_body import CreateDomainWelcomeMessageBody + +class TestCreateDomainWelcomeMessageBody(unittest.TestCase): + """CreateDomainWelcomeMessageBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateDomainWelcomeMessageBody: + """Test CreateDomainWelcomeMessageBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateDomainWelcomeMessageBody` + """ + model = CreateDomainWelcomeMessageBody() + if include_optional: + return CreateDomainWelcomeMessageBody( + message = '', + enabled = True + ) + else: + return CreateDomainWelcomeMessageBody( + message = '', + ) + """ + + def testCreateDomainWelcomeMessageBody(self): + """Test CreateDomainWelcomeMessageBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_hook_body.py b/test/test_create_hook_body.py new file mode 100644 index 0000000..3c62074 --- /dev/null +++ b/test/test_create_hook_body.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_hook_body import CreateHookBody + +class TestCreateHookBody(unittest.TestCase): + """CreateHookBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateHookBody: + """Test CreateHookBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateHookBody` + """ + model = CreateHookBody() + if include_optional: + return CreateHookBody( + label = 'Bypass jailbreak detection', + address = '0x1000042a4', + patch = 'return 0;', + patch_type = 'csmfcc', + enabled = True + ) + else: + return CreateHookBody( + label = 'Bypass jailbreak detection', + address = '0x1000042a4', + patch = 'return 0;', + patch_type = 'csmfcc', + ) + """ + + def testCreateHookBody(self): + """Test CreateHookBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_image_body.py b/test/test_create_image_body.py new file mode 100644 index 0000000..a00b34c --- /dev/null +++ b/test/test_create_image_body.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_image_body import CreateImageBody + +class TestCreateImageBody(unittest.TestCase): + """CreateImageBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateImageBody: + """Test CreateImageBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateImageBody` + """ + model = CreateImageBody() + if include_optional: + return CreateImageBody( + type = 'fwbinary', + encoding = 'plain', + encapsulated = False, + name = 'firmware.ipsw', + full_path = '/data/uploads/firmware.ipsw', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + file = bytes(b'blah') + ) + else: + return CreateImageBody( + type = 'fwbinary', + encoding = 'plain', + ) + """ + + def testCreateImageBody(self): + """Test CreateImageBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_instance_body.py b/test/test_create_instance_body.py new file mode 100644 index 0000000..dd955ca --- /dev/null +++ b/test/test_create_instance_body.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_instance_body import CreateInstanceBody + +class TestCreateInstanceBody(unittest.TestCase): + """CreateInstanceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInstanceBody: + """Test CreateInstanceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInstanceBody` + """ + model = CreateInstanceBody() + if include_optional: + return CreateInstanceBody( + shared_snapshot = 'c67af9c0-26cd-4233-9782-436c842b60db', + shared_snapshot_password = '', + name = 'My iPhone 13 Pro', + key = '', + flavor = 'iphone13p', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + os_version = '17.5', + os_build = '21F79', + patches = ["jailbroken"], + fw_package = 'https://example.com/firmware.ipsw', + original_firmware_package_url = 'https://example.com/firmware.ipsw', + encrypt = True, + wifi_mac = '02:00:00:aa:bb:cc', + wan_access = True, + volume = corellium.models.volume_options.VolumeOptions( + blocks = 5505024, + name = 'userdata_img', ), + snapshot = 'c67af9c0-26cd-4233-9782-436c842b60db', + boot_options = corellium.models.instance_boot_options.InstanceBootOptions( + boot_args = '-v debug=0x8 keepsyms=1', + restore_boot_args = '-v debug=0x8 keepsyms=1', + udid = '00008030-001A2D423C29802E', + ecid = '0x1a2b3c4d5e6f', + random_seed = 'deadbeefcafebabe', + pac = True, + aprr = True, + cores = 4, + ram = 6144, + additional_tags = ["kalloc"], + kernel = corellium.models.instance_boot_options_kernel.InstanceBootOptionsKernel( + firmware_path = 'kernelcache', ), + pongo = corellium.models.instance_boot_options_pongo.InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576, ), + serial = 'C39ABCDEFGH1', + no_snapshot_mount = False, + kernel_slide = '0x18000000', + cd_hashes = ["a1b2c3d4e5f60718293a4b5c6d7e8f90"], + imei = '359268000000000', + imsi = '310150123456789', + ssid0 = 'CorelliumWiFi', + ssid1 = 'CorelliumWiFi-5G', + wifi_mac = '02:00:00:aa:bb:cc', + model_id = 'SM-G973F', + manufacturer_id = 'samsung', + kernel_patches = 'patch1,patch2', + stop_on_fault = True, + boot_addr = '0x800000000', + tzen = True, + authorized_keys = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFhYmJjY2RkZWVmZmdnaGhpaWpqa2trbGxtbW5ubm9v user@example.com', + v_mmio = [ + corellium.models.instance_boot_options_v_mmio_inner.InstanceBootOptions_vMMIO_inner( + start = '0x9000000', + size = '0x1000', + irq = '33-36', ) + ], + fvp = corellium.models.instance_boot_options_fvp.InstanceBootOptionsFvp( + model_binary = '/usr/local/fvp/bin/FVP_Base_RevC-2xAEMvA', + parameters = {"bp.secure_memory":"false","cluster0.NUM_CORES":"4"}, + data = ["/tmp/data.bin@0x80000000"], + breaks = ["0x80001000"], + dumps = ["/tmp/dump.bin@0x80000000,0x1000"], + cadi_log = 'cadi-log.xml', + cadi_server = 'true', + iris_server = 'true', + iris_log = 'info', + iris_allow_remote = 'true', + iris_port_range = '7000:7010', + iris_port = '7100', + run = 'true', + stat = 'true', + quiet = 'true', + start = '0x80000000', + plugin = '/usr/local/fvp/plugins/ToolsSharedLib.so', + fast_ram = 'fastram.cfg', + save = '/tmp/checkpoint', + restore = '/tmp/checkpoint', + cpi_file = 'cpi.txt', + cycle_limit = '1000000', + cpu_limit = '3600', + time_limit = '3600', + sim_limit = '60', ), ), + sbs = True, + charm_boot_args = [{"charmd":"enabled"},{"strace-file-count":2},{"supportsVideoFile":true}] + ) + else: + return CreateInstanceBody( + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + ) + """ + + def testCreateInstanceBody(self): + """Test CreateInstanceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_instance_response.py b/test/test_create_instance_response.py new file mode 100644 index 0000000..6afcf12 --- /dev/null +++ b/test/test_create_instance_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_instance_response import CreateInstanceResponse + +class TestCreateInstanceResponse(unittest.TestCase): + """CreateInstanceResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInstanceResponse: + """Test CreateInstanceResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInstanceResponse` + """ + model = CreateInstanceResponse() + if include_optional: + return CreateInstanceResponse( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + state = 'creating' + ) + else: + return CreateInstanceResponse( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + state = 'creating', + ) + """ + + def testCreateInstanceResponse(self): + """Test CreateInstanceResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_interconnect_body.py b/test/test_create_interconnect_body.py new file mode 100644 index 0000000..f2a53f2 --- /dev/null +++ b/test/test_create_interconnect_body.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_interconnect_body import CreateInterconnectBody + +class TestCreateInterconnectBody(unittest.TestCase): + """CreateInterconnectBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInterconnectBody: + """Test CreateInterconnectBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInterconnectBody` + """ + model = CreateInterconnectBody() + if include_optional: + return CreateInterconnectBody( + name = '', + protocol = '', + type = 'hub', + project = '', + interfaces = [ + '' + ] + ) + else: + return CreateInterconnectBody( + name = '', + protocol = '', + type = 'hub', + project = '', + interfaces = [ + '' + ], + ) + """ + + def testCreateInterconnectBody(self): + """Test CreateInterconnectBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_interconnect_request.py b/test/test_create_interconnect_request.py deleted file mode 100644 index 6033fc0..0000000 --- a/test/test_create_interconnect_request.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.create_interconnect_request import CreateInterconnectRequest # noqa: E501 -from corellium_api.rest import ApiException - -class TestCreateInterconnectRequest(unittest.TestCase): - """CreateInterconnectRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test CreateInterconnectRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.create_interconnect_request.CreateInterconnectRequest() # noqa: E501 - if include_optional : - return CreateInterconnectRequest( - name = '', - protocol = '', - type = 'hub', - project = '', - interfaces = [ - '' - ] - ) - else : - return CreateInterconnectRequest( - ) - - def testCreateInterconnectRequest(self): - """Test CreateInterconnectRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_create_interconnect_v3_body.py b/test/test_create_interconnect_v3_body.py new file mode 100644 index 0000000..f899281 --- /dev/null +++ b/test/test_create_interconnect_v3_body.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_interconnect_v3_body import CreateInterconnectV3Body + +class TestCreateInterconnectV3Body(unittest.TestCase): + """CreateInterconnectV3Body unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInterconnectV3Body: + """Test CreateInterconnectV3Body + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInterconnectV3Body` + """ + model = CreateInterconnectV3Body() + if include_optional: + return CreateInterconnectV3Body( + name = 'vpn-gateway', + type = 'hub', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ], + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + protocol = 'can' + ) + else: + return CreateInterconnectV3Body( + name = 'vpn-gateway', + type = 'hub', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ], + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + protocol = 'can', + ) + """ + + def testCreateInterconnectV3Body(self): + """Test CreateInterconnectV3Body""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_invites_body.py b/test/test_create_invites_body.py new file mode 100644 index 0000000..e01fc9c --- /dev/null +++ b/test/test_create_invites_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_invites_body import CreateInvitesBody + +class TestCreateInvitesBody(unittest.TestCase): + """CreateInvitesBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateInvitesBody: + """Test CreateInvitesBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateInvitesBody` + """ + model = CreateInvitesBody() + if include_optional: + return CreateInvitesBody( + email = ["jane.doe@example.com"], + resend = True, + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ) + ) + else: + return CreateInvitesBody( + email = ["jane.doe@example.com"], + ) + """ + + def testCreateInvitesBody(self): + """Test CreateInvitesBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_network_connection_body.py b/test/test_create_network_connection_body.py new file mode 100644 index 0000000..adabfa6 --- /dev/null +++ b/test/test_create_network_connection_body.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_network_connection_body import CreateNetworkConnectionBody + +class TestCreateNetworkConnectionBody(unittest.TestCase): + """CreateNetworkConnectionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateNetworkConnectionBody: + """Test CreateNetworkConnectionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateNetworkConnectionBody` + """ + model = CreateNetworkConnectionBody() + if include_optional: + return CreateNetworkConnectionBody( + name = 'lab-vlan', + provider = 'vlan', + config = corellium.models.vlan_config.VLANConfig( + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + gateway = '10.0.0.1', + network = '10.0.0.0/24', + dns_servers = ["1.1.1.1","8.8.8.8"], ) + ) + else: + return CreateNetworkConnectionBody( + name = 'lab-vlan', + provider = 'vlan', + config = corellium.models.vlan_config.VLANConfig( + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + gateway = '10.0.0.1', + network = '10.0.0.0/24', + dns_servers = ["1.1.1.1","8.8.8.8"], ), + ) + """ + + def testCreateNetworkConnectionBody(self): + """Test CreateNetworkConnectionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_network_connection_options.py b/test/test_create_network_connection_options.py index 526581e..22515b7 100644 --- a/test/test_create_network_connection_options.py +++ b/test/test_create_network_connection_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.create_network_connection_options import CreateNetworkConnectionOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.create_network_connection_options import CreateNetworkConnectionOptions class TestCreateNetworkConnectionOptions(unittest.TestCase): """CreateNetworkConnectionOptions unit test stubs""" @@ -28,30 +26,48 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CreateNetworkConnectionOptions: """Test CreateNetworkConnectionOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.create_network_connection_options.CreateNetworkConnectionOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CreateNetworkConnectionOptions` + """ + model = CreateNetworkConnectionOptions() + if include_optional: return CreateNetworkConnectionOptions( - identifier = '', - name = '', - provider = '', - config = None + name = '', + provider = 'vlan', + config = corellium.models.vlan_config_v1.VLANConfigV1( + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + gateway = '', + network = '', + dns_servers = [ + '' + ], ) ) - else : + else: return CreateNetworkConnectionOptions( - identifier = '', name = '', - provider = '', + provider = 'vlan', + config = corellium.models.vlan_config_v1.VLANConfigV1( + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + gateway = '', + network = '', + dns_servers = [ + '' + ], ), ) + """ def testCreateNetworkConnectionOptions(self): """Test CreateNetworkConnectionOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_create_open_vpn_network_connection_body.py b/test/test_create_open_vpn_network_connection_body.py new file mode 100644 index 0000000..08714b0 --- /dev/null +++ b/test/test_create_open_vpn_network_connection_body.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_open_vpn_network_connection_body import CreateOpenVPNNetworkConnectionBody + +class TestCreateOpenVPNNetworkConnectionBody(unittest.TestCase): + """CreateOpenVPNNetworkConnectionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOpenVPNNetworkConnectionBody: + """Test CreateOpenVPNNetworkConnectionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateOpenVPNNetworkConnectionBody` + """ + model = CreateOpenVPNNetworkConnectionBody() + if include_optional: + return CreateOpenVPNNetworkConnectionBody( + name = 'office-vpn', + provider = 'openvpn', + config = corellium.models.open_vpn_config.OpenVPNConfig( + username = 'jane.doe', + password = '', + config = 'client +dev tun +proto udp +remote vpn.example.com 1194 +resolv-retry infinite +nobind +persist-key +persist-tun +remote-cert-tls server +cipher AES-256-CBC +verb 3 + +-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE----- + +', ) + ) + else: + return CreateOpenVPNNetworkConnectionBody( + name = 'office-vpn', + provider = 'openvpn', + config = corellium.models.open_vpn_config.OpenVPNConfig( + username = 'jane.doe', + password = '', + config = 'client +dev tun +proto udp +remote vpn.example.com 1194 +resolv-retry infinite +nobind +persist-key +persist-tun +remote-cert-tls server +cipher AES-256-CBC +verb 3 + +-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE----- + +', ), + ) + """ + + def testCreateOpenVPNNetworkConnectionBody(self): + """Test CreateOpenVPNNetworkConnectionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_open_vpn_network_connection_body_v1.py b/test/test_create_open_vpn_network_connection_body_v1.py new file mode 100644 index 0000000..69c6237 --- /dev/null +++ b/test/test_create_open_vpn_network_connection_body_v1.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_open_vpn_network_connection_body_v1 import CreateOpenVPNNetworkConnectionBodyV1 + +class TestCreateOpenVPNNetworkConnectionBodyV1(unittest.TestCase): + """CreateOpenVPNNetworkConnectionBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOpenVPNNetworkConnectionBodyV1: + """Test CreateOpenVPNNetworkConnectionBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateOpenVPNNetworkConnectionBodyV1` + """ + model = CreateOpenVPNNetworkConnectionBodyV1() + if include_optional: + return CreateOpenVPNNetworkConnectionBodyV1( + name = '', + provider = 'openvpn', + config = corellium.models.open_vpn_config_v1.OpenVPNConfigV1( + username = '', + password = '', + config = '', ) + ) + else: + return CreateOpenVPNNetworkConnectionBodyV1( + name = '', + provider = 'openvpn', + config = corellium.models.open_vpn_config_v1.OpenVPNConfigV1( + username = '', + password = '', + config = '', ), + ) + """ + + def testCreateOpenVPNNetworkConnectionBodyV1(self): + """Test CreateOpenVPNNetworkConnectionBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_project_body.py b/test/test_create_project_body.py new file mode 100644 index 0000000..a462748 --- /dev/null +++ b/test/test_create_project_body.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_project_body import CreateProjectBody + +class TestCreateProjectBody(unittest.TestCase): + """CreateProjectBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateProjectBody: + """Test CreateProjectBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateProjectBody` + """ + model = CreateProjectBody() + if include_optional: + return CreateProjectBody( + name = 'Default Project', + color = 4, + settings = corellium.models.project_settings.ProjectSettings( + version = 1, + internet_access = True, + dhcp = True, + connection = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', ), + quotas = corellium.models.project_quota_input.ProjectQuotaInput( + cores = 8, + instances = 20, + ram = 49152, ) + ) + else: + return CreateProjectBody( + name = 'Default Project', + ) + """ + + def testCreateProjectBody(self): + """Test CreateProjectBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_project_key_body.py b/test/test_create_project_key_body.py new file mode 100644 index 0000000..b267633 --- /dev/null +++ b/test/test_create_project_key_body.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_project_key_body import CreateProjectKeyBody + +class TestCreateProjectKeyBody(unittest.TestCase): + """CreateProjectKeyBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateProjectKeyBody: + """Test CreateProjectKeyBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateProjectKeyBody` + """ + model = CreateProjectKeyBody() + if include_optional: + return CreateProjectKeyBody( + kind = 'ssh', + label = 'Build server key', + key = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUlGdieyRXdiVIyQjqthDE1YzmwzH0ZeZuHkBuC9Gwr user@example.com' + ) + else: + return CreateProjectKeyBody( + kind = 'ssh', + key = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUlGdieyRXdiVIyQjqthDE1YzmwzH0ZeZuHkBuC9Gwr user@example.com', + ) + """ + + def testCreateProjectKeyBody(self): + """Test CreateProjectKeyBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_snapshot_body.py b/test/test_create_snapshot_body.py new file mode 100644 index 0000000..5d61fe4 --- /dev/null +++ b/test/test_create_snapshot_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_snapshot_body import CreateSnapshotBody + +class TestCreateSnapshotBody(unittest.TestCase): + """CreateSnapshotBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateSnapshotBody: + """Test CreateSnapshotBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateSnapshotBody` + """ + model = CreateSnapshotBody() + if include_optional: + return CreateSnapshotBody( + name = 'before-update' + ) + else: + return CreateSnapshotBody( + name = 'before-update', + ) + """ + + def testCreateSnapshotBody(self): + """Test CreateSnapshotBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_team.py b/test/test_create_team.py index 7a2390f..975ee5a 100644 --- a/test/test_create_team.py +++ b/test/test_create_team.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.create_team import CreateTeam # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.create_team import CreateTeam class TestCreateTeam(unittest.TestCase): """CreateTeam unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CreateTeam: """Test CreateTeam - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.create_team.CreateTeam() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CreateTeam` + """ + model = CreateTeam() + if include_optional: return CreateTeam( name = '' ) - else : + else: return CreateTeam( name = '', ) + """ def testCreateTeam(self): """Test CreateTeam""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_create_team_body.py b/test/test_create_team_body.py new file mode 100644 index 0000000..56666f9 --- /dev/null +++ b/test/test_create_team_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_team_body import CreateTeamBody + +class TestCreateTeamBody(unittest.TestCase): + """CreateTeamBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateTeamBody: + """Test CreateTeamBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateTeamBody` + """ + model = CreateTeamBody() + if include_optional: + return CreateTeamBody( + name = 'Mobile QA' + ) + else: + return CreateTeamBody( + name = 'Mobile QA', + ) + """ + + def testCreateTeamBody(self): + """Test CreateTeamBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_trial_request_body.py b/test/test_create_trial_request_body.py new file mode 100644 index 0000000..69fe5d6 --- /dev/null +++ b/test/test_create_trial_request_body.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_trial_request_body import CreateTrialRequestBody + +class TestCreateTrialRequestBody(unittest.TestCase): + """CreateTrialRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateTrialRequestBody: + """Test CreateTrialRequestBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateTrialRequestBody` + """ + model = CreateTrialRequestBody() + if include_optional: + return CreateTrialRequestBody( + email = 'jane.doe@example.com', + name = 'Jane Doe', + phone = '+1-555-0100', + country = 'United States', + type = 'individual', + company = 'Acme Corp', + industry = 'Automotive', + role = 'Security Engineer', + solution = 'Mobile App Security Testing', + product_id = 'prod_RvHU7hO3XzhmRQ' + ) + else: + return CreateTrialRequestBody( + email = 'jane.doe@example.com', + name = 'Jane Doe', + phone = '+1-555-0100', + country = 'United States', + type = 'individual', + company = 'Acme Corp', + industry = 'Automotive', + role = 'Security Engineer', + solution = 'Mobile App Security Testing', + product_id = 'prod_RvHU7hO3XzhmRQ', + ) + """ + + def testCreateTrialRequestBody(self): + """Test CreateTrialRequestBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_trial_request_response.py b/test/test_create_trial_request_response.py new file mode 100644 index 0000000..874e770 --- /dev/null +++ b/test/test_create_trial_request_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_trial_request_response import CreateTrialRequestResponse + +class TestCreateTrialRequestResponse(unittest.TestCase): + """CreateTrialRequestResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateTrialRequestResponse: + """Test CreateTrialRequestResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateTrialRequestResponse` + """ + model = CreateTrialRequestResponse() + if include_optional: + return CreateTrialRequestResponse( + trial_request = corellium.models.create_trial_request_response_trial_request.CreateTrialRequestResponse_trialRequest( + identifier = 'a1e77521-9267-4e6d-8888-180f3a83ea3a', + email = 'jane.doe@example.com', + name = 'Jane Doe', ) + ) + else: + return CreateTrialRequestResponse( + trial_request = corellium.models.create_trial_request_response_trial_request.CreateTrialRequestResponse_trialRequest( + identifier = 'a1e77521-9267-4e6d-8888-180f3a83ea3a', + email = 'jane.doe@example.com', + name = 'Jane Doe', ), + ) + """ + + def testCreateTrialRequestResponse(self): + """Test CreateTrialRequestResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_trial_request_response_trial_request.py b/test/test_create_trial_request_response_trial_request.py new file mode 100644 index 0000000..12a5434 --- /dev/null +++ b/test/test_create_trial_request_response_trial_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_trial_request_response_trial_request import CreateTrialRequestResponseTrialRequest + +class TestCreateTrialRequestResponseTrialRequest(unittest.TestCase): + """CreateTrialRequestResponseTrialRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateTrialRequestResponseTrialRequest: + """Test CreateTrialRequestResponseTrialRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateTrialRequestResponseTrialRequest` + """ + model = CreateTrialRequestResponseTrialRequest() + if include_optional: + return CreateTrialRequestResponseTrialRequest( + identifier = 'a1e77521-9267-4e6d-8888-180f3a83ea3a', + email = 'jane.doe@example.com', + name = 'Jane Doe' + ) + else: + return CreateTrialRequestResponseTrialRequest( + identifier = 'a1e77521-9267-4e6d-8888-180f3a83ea3a', + email = 'jane.doe@example.com', + name = 'Jane Doe', + ) + """ + + def testCreateTrialRequestResponseTrialRequest(self): + """Test CreateTrialRequestResponseTrialRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_user_body.py b/test/test_create_user_body.py new file mode 100644 index 0000000..b4f5de4 --- /dev/null +++ b/test/test_create_user_body.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_user_body import CreateUserBody + +class TestCreateUserBody(unittest.TestCase): + """CreateUserBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateUserBody: + """Test CreateUserBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateUserBody` + """ + model = CreateUserBody() + if include_optional: + return CreateUserBody( + password = '', + administrator = True, + name = 'jane.doe', + label = 'Domain Administrator', + email = 'jane.doe@example.com', + cluster_administrator = False + ) + else: + return CreateUserBody( + name = 'jane.doe', + label = 'Domain Administrator', + ) + """ + + def testCreateUserBody(self): + """Test CreateUserBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_vlan_network_connection_body.py b/test/test_create_vlan_network_connection_body.py new file mode 100644 index 0000000..46aec16 --- /dev/null +++ b/test/test_create_vlan_network_connection_body.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_vlan_network_connection_body import CreateVLANNetworkConnectionBody + +class TestCreateVLANNetworkConnectionBody(unittest.TestCase): + """CreateVLANNetworkConnectionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateVLANNetworkConnectionBody: + """Test CreateVLANNetworkConnectionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateVLANNetworkConnectionBody` + """ + model = CreateVLANNetworkConnectionBody() + if include_optional: + return CreateVLANNetworkConnectionBody( + name = 'lab-vlan', + provider = 'vlan', + config = corellium.models.vlan_config.VLANConfig( + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + gateway = '10.0.0.1', + network = '10.0.0.0/24', + dns_servers = ["1.1.1.1","8.8.8.8"], ) + ) + else: + return CreateVLANNetworkConnectionBody( + name = 'lab-vlan', + provider = 'vlan', + config = corellium.models.vlan_config.VLANConfig( + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + gateway = '10.0.0.1', + network = '10.0.0.0/24', + dns_servers = ["1.1.1.1","8.8.8.8"], ), + ) + """ + + def testCreateVLANNetworkConnectionBody(self): + """Test CreateVLANNetworkConnectionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_vlan_network_connection_body_v1.py b/test/test_create_vlan_network_connection_body_v1.py new file mode 100644 index 0000000..b75a5a6 --- /dev/null +++ b/test/test_create_vlan_network_connection_body_v1.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_vlan_network_connection_body_v1 import CreateVLANNetworkConnectionBodyV1 + +class TestCreateVLANNetworkConnectionBodyV1(unittest.TestCase): + """CreateVLANNetworkConnectionBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateVLANNetworkConnectionBodyV1: + """Test CreateVLANNetworkConnectionBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateVLANNetworkConnectionBodyV1` + """ + model = CreateVLANNetworkConnectionBodyV1() + if include_optional: + return CreateVLANNetworkConnectionBodyV1( + name = '', + provider = 'vlan', + config = corellium.models.vlan_config_v1.VLANConfigV1( + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + gateway = '', + network = '', + dns_servers = [ + '' + ], ) + ) + else: + return CreateVLANNetworkConnectionBodyV1( + name = '', + provider = 'vlan', + config = corellium.models.vlan_config_v1.VLANConfigV1( + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + gateway = '', + network = '', + dns_servers = [ + '' + ], ), + ) + """ + + def testCreateVLANNetworkConnectionBodyV1(self): + """Test CreateVLANNetworkConnectionBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_web_player_session_body.py b/test/test_create_web_player_session_body.py new file mode 100644 index 0000000..aa8252d --- /dev/null +++ b/test/test_create_web_player_session_body.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.create_web_player_session_body import CreateWebPlayerSessionBody + +class TestCreateWebPlayerSessionBody(unittest.TestCase): + """CreateWebPlayerSessionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateWebPlayerSessionBody: + """Test CreateWebPlayerSessionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateWebPlayerSessionBody` + """ + model = CreateWebPlayerSessionBody() + if include_optional: + return CreateWebPlayerSessionBody( + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + expires_in = 18000, + features = corellium.models.web_player_features.WebPlayerFeatures( + apps = True, + connect = True, + console = True, + coretrace = True, + device_control = True, + device_delete = True, + files = True, + frida = True, + images = True, + messaging = True, + netmon = True, + network = True, + port_forwarding = True, + power_management = True, + profile = True, + sensors = True, + settings = True, + snapshots = True, + strace = True, + system = True, ), + client_id = 'web-console-1234' + ) + else: + return CreateWebPlayerSessionBody( + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + expires_in = 18000, + features = corellium.models.web_player_features.WebPlayerFeatures( + apps = True, + connect = True, + console = True, + coretrace = True, + device_control = True, + device_delete = True, + files = True, + frida = True, + images = True, + messaging = True, + netmon = True, + network = True, + port_forwarding = True, + power_management = True, + profile = True, + sensors = True, + settings = True, + snapshots = True, + strace = True, + system = True, ), + ) + """ + + def testCreateWebPlayerSessionBody(self): + """Test CreateWebPlayerSessionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_created_by.py b/test/test_created_by.py index 7579869..45541e7 100644 --- a/test/test_created_by.py +++ b/test/test_created_by.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.created_by import CreatedBy # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.created_by import CreatedBy class TestCreatedBy(unittest.TestCase): """CreatedBy unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> CreatedBy: """Test CreatedBy - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.created_by.CreatedBy() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `CreatedBy` + """ + model = CreatedBy() + if include_optional: return CreatedBy( - id = '', - username = '', - label = '', + id = '', + username = '', + label = '', deleted = True ) - else : + else: return CreatedBy( ) + """ def testCreatedBy(self): """Test CreatedBy""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_credentials.py b/test/test_credentials.py index dd99cbf..133e23c 100644 --- a/test/test_credentials.py +++ b/test/test_credentials.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.credentials import Credentials # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.credentials import Credentials class TestCredentials(unittest.TestCase): """Credentials unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Credentials: """Test Credentials - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.credentials.Credentials() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Credentials` + """ + model = Credentials() + if include_optional: return Credentials( - username = '', + username = '', password = '' ) - else : + else: return Credentials( username = '', password = '', ) + """ def testCredentials(self): """Test Credentials""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_delete_modification_input.py b/test/test_delete_modification_input.py new file mode 100644 index 0000000..2fbd440 --- /dev/null +++ b/test/test_delete_modification_input.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.delete_modification_input import DeleteModificationInput + +class TestDeleteModificationInput(unittest.TestCase): + """DeleteModificationInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteModificationInput: + """Test DeleteModificationInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteModificationInput` + """ + model = DeleteModificationInput() + if include_optional: + return DeleteModificationInput( + check_id = 'masvs-storage-2-android-8', + var_property = 'severity' + ) + else: + return DeleteModificationInput( + check_id = 'masvs-storage-2-android-8', + var_property = 'severity', + ) + """ + + def testDeleteModificationInput(self): + """Test DeleteModificationInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_network_connection_options.py b/test/test_delete_network_connection_options.py new file mode 100644 index 0000000..d2537f0 --- /dev/null +++ b/test/test_delete_network_connection_options.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.delete_network_connection_options import DeleteNetworkConnectionOptions + +class TestDeleteNetworkConnectionOptions(unittest.TestCase): + """DeleteNetworkConnectionOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteNetworkConnectionOptions: + """Test DeleteNetworkConnectionOptions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteNetworkConnectionOptions` + """ + model = DeleteNetworkConnectionOptions() + if include_optional: + return DeleteNetworkConnectionOptions( + force = True + ) + else: + return DeleteNetworkConnectionOptions( + ) + """ + + def testDeleteNetworkConnectionOptions(self): + """Test DeleteNetworkConnectionOptions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_deployment_version.py b/test/test_deployment_version.py new file mode 100644 index 0000000..b234ce9 --- /dev/null +++ b/test/test_deployment_version.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.deployment_version import DeploymentVersion + +class TestDeploymentVersion(unittest.TestCase): + """DeploymentVersion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeploymentVersion: + """Test DeploymentVersion + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeploymentVersion` + """ + model = DeploymentVersion() + if include_optional: + return DeploymentVersion( + product_version = '0', + coordinator_version = '0', + build_commit = 'bf325375e030fccba00917317c574773100bf03b', + build_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return DeploymentVersion( + product_version = '0', + coordinator_version = '0', + build_commit = 'bf325375e030fccba00917317c574773100bf03b', + build_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testDeploymentVersion(self): + """Test DeploymentVersion""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_detach_interface_body.py b/test/test_detach_interface_body.py new file mode 100644 index 0000000..4de6d7f --- /dev/null +++ b/test/test_detach_interface_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.detach_interface_body import DetachInterfaceBody + +class TestDetachInterfaceBody(unittest.TestCase): + """DetachInterfaceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DetachInterfaceBody: + """Test DetachInterfaceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DetachInterfaceBody` + """ + model = DetachInterfaceBody() + if include_optional: + return DetachInterfaceBody( + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3' + ) + else: + return DetachInterfaceBody( + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + ) + """ + + def testDetachInterfaceBody(self): + """Test DetachInterfaceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_detach_interface_request.py b/test/test_detach_interface_request.py index 2db9802..f873c1b 100644 --- a/test/test_detach_interface_request.py +++ b/test/test_detach_interface_request.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.detach_interface_request import DetachInterfaceRequest # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.detach_interface_request import DetachInterfaceRequest class TestDetachInterfaceRequest(unittest.TestCase): """DetachInterfaceRequest unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DetachInterfaceRequest: """Test DetachInterfaceRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.detach_interface_request.DetachInterfaceRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `DetachInterfaceRequest` + """ + model = DetachInterfaceRequest() + if include_optional: return DetachInterfaceRequest( interconnect_id = '' ) - else : + else: return DetachInterfaceRequest( interconnect_id = '', ) + """ def testDetachInterfaceRequest(self): """Test DetachInterfaceRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_device.py b/test/test_device.py index d534fcd..c3eb2e4 100644 --- a/test/test_device.py +++ b/test/test_device.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.device import Device # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.device import Device class TestDevice(unittest.TestCase): """Device unit test stubs""" @@ -28,35 +26,38 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Device: """Test Device - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.device.Device() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Device` + """ + model = Device() + if include_optional: return Device( - type = '', - model = '', - name = '', - platform = '', - hwmodel = '', - bdid = '', - cpid = '', - created_at = '', + type = '', + model = '', + name = '', + platform = '', + hwmodel = '', + bdid = '', + cpid = '', + created_at = '', updated_at = '' ) - else : + else: return Device( type = '', model = '', name = '', ) + """ def testDevice(self): """Test Device""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_device_auto_shutdown_schema.py b/test/test_device_auto_shutdown_schema.py new file mode 100644 index 0000000..c70eff0 --- /dev/null +++ b/test/test_device_auto_shutdown_schema.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.device_auto_shutdown_schema import DeviceAutoShutdownSchema + +class TestDeviceAutoShutdownSchema(unittest.TestCase): + """DeviceAutoShutdownSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceAutoShutdownSchema: + """Test DeviceAutoShutdownSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeviceAutoShutdownSchema` + """ + model = DeviceAutoShutdownSchema() + if include_optional: + return DeviceAutoShutdownSchema( + enabled = True, + threshold = 10 + ) + else: + return DeviceAutoShutdownSchema( + ) + """ + + def testDeviceAutoShutdownSchema(self): + """Test DeviceAutoShutdownSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_device_usage.py b/test/test_device_usage.py new file mode 100644 index 0000000..7114119 --- /dev/null +++ b/test/test_device_usage.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.device_usage import DeviceUsage + +class TestDeviceUsage(unittest.TestCase): + """DeviceUsage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceUsage: + """Test DeviceUsage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeviceUsage` + """ + model = DeviceUsage() + if include_optional: + return DeviceUsage( + hours_used = 62.5, + hours_max = 100 + ) + else: + return DeviceUsage( + hours_used = 62.5, + hours_max = 100, + ) + """ + + def testDeviceUsage(self): + """Test DeviceUsage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_api.py b/test/test_domain_api.py new file mode 100644 index 0000000..92805db --- /dev/null +++ b/test/test_domain_api.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.domain_api import DomainApi + + +class TestDomainApi(unittest.TestCase): + """DomainApi unit test stubs""" + + def setUp(self) -> None: + self.api = DomainApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_domain_welcome_message(self) -> None: + """Test case for v3_create_domain_welcome_message + + Create a welcome message for a domain + """ + pass + + def test_v3_delete_domain_welcome_message(self) -> None: + """Test case for v3_delete_domain_welcome_message + + Delete the welcome message for the authenticated user's domain + """ + pass + + def test_v3_get_domain_image_upload(self) -> None: + """Test case for v3_get_domain_image_upload + + Get image upload status + """ + pass + + def test_v3_get_domain_welcome_message(self) -> None: + """Test case for v3_get_domain_welcome_message + + Get the welcome message for the authenticated user's domain + """ + pass + + def test_v3_list_domain_software(self) -> None: + """Test case for v3_list_domain_software + + List domain-level firmware images + """ + pass + + def test_v3_patch_domain_welcome_message(self) -> None: + """Test case for v3_patch_domain_welcome_message + + Update a welcome message for a domain + """ + pass + + def test_v3_put_domain_image_upload(self) -> None: + """Test case for v3_put_domain_image_upload + + Upload image chunk + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_auth_provider_api.py b/test/test_domain_auth_provider_api.py new file mode 100644 index 0000000..221de60 --- /dev/null +++ b/test/test_domain_auth_provider_api.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.domain_auth_provider_api import DomainAuthProviderApi + + +class TestDomainAuthProviderApi(unittest.TestCase): + """DomainAuthProviderApi unit test stubs""" + + def setUp(self) -> None: + self.api = DomainAuthProviderApi() + + def tearDown(self) -> None: + pass + + def test_v1_create_domain_auth_provider(self) -> None: + """Test case for v1_create_domain_auth_provider + + Create a new auth provider for a domain + """ + pass + + def test_v1_delete_domain_auth_provider(self) -> None: + """Test case for v1_delete_domain_auth_provider + + Delete an auth provider from a domain + """ + pass + + def test_v1_get_domain_auth_providers(self) -> None: + """Test case for v1_get_domain_auth_providers + + Return all configured auth providers for a domain (including globally configured providers) + """ + pass + + def test_v1_update_domain_auth_provider(self) -> None: + """Test case for v1_update_domain_auth_provider + + Update an auth provider for a domain + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_auth_provider_config.py b/test/test_domain_auth_provider_config.py new file mode 100644 index 0000000..6d45fde --- /dev/null +++ b/test/test_domain_auth_provider_config.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_auth_provider_config import DomainAuthProviderConfig + +class TestDomainAuthProviderConfig(unittest.TestCase): + """DomainAuthProviderConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainAuthProviderConfig: + """Test DomainAuthProviderConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainAuthProviderConfig` + """ + model = DomainAuthProviderConfig() + if include_optional: + return DomainAuthProviderConfig( + identity_provider_config = { + 'key' : null + }, + service_provider_config = { + 'key' : null + }, + user_attribute_mapping = { + 'key' : null + }, + group_mapping = [ + { + 'key' : null + } + ], + discovery_url = 'https://accounts.example.com/.well-known/openid-configuration', + client_id = 'corellium-domain-client', + client_secret = '', + invited_only = False, + server_connection_details = { + 'key' : null + }, + authentication_credentials = { + 'key' : null + }, + user_search_configuration = { + 'key' : null + }, + group_search_configuration = [ + { + 'key' : null + } + ] + ) + else: + return DomainAuthProviderConfig( + identity_provider_config = { + 'key' : null + }, + discovery_url = 'https://accounts.example.com/.well-known/openid-configuration', + client_id = 'corellium-domain-client', + client_secret = '', + server_connection_details = { + 'key' : null + }, + authentication_credentials = { + 'key' : null + }, + user_search_configuration = { + 'key' : null + }, + ) + """ + + def testDomainAuthProviderConfig(self): + """Test DomainAuthProviderConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_auth_provider_request.py b/test/test_domain_auth_provider_request.py index 1e87092..9207d8b 100644 --- a/test/test_domain_auth_provider_request.py +++ b/test/test_domain_auth_provider_request.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.domain_auth_provider_request import DomainAuthProviderRequest # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.domain_auth_provider_request import DomainAuthProviderRequest class TestDomainAuthProviderRequest(unittest.TestCase): """DomainAuthProviderRequest unit test stubs""" @@ -28,33 +26,36 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DomainAuthProviderRequest: """Test DomainAuthProviderRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.domain_auth_provider_request.DomainAuthProviderRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `DomainAuthProviderRequest` + """ + model = DomainAuthProviderRequest() + if include_optional: return DomainAuthProviderRequest( - provider_type = '', - enabled = True, - label = '', - config = corellium_api.models.open_id_config.OpenIDConfig( + provider_type = '', + enabled = True, + label = '', + config = corellium.models.open_id_config_v1.OpenIDConfigV1( discovery_url = '', client_id = '', client_secret = '', invited_only = True, ) ) - else : + else: return DomainAuthProviderRequest( provider_type = '', enabled = True, ) + """ def testDomainAuthProviderRequest(self): """Test DomainAuthProviderRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_domain_auth_provider_response.py b/test/test_domain_auth_provider_response.py index 0dd98a3..1e16d8a 100644 --- a/test/test_domain_auth_provider_response.py +++ b/test/test_domain_auth_provider_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.domain_auth_provider_response import DomainAuthProviderResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.domain_auth_provider_response import DomainAuthProviderResponse class TestDomainAuthProviderResponse(unittest.TestCase): """DomainAuthProviderResponse unit test stubs""" @@ -28,47 +26,42 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DomainAuthProviderResponse: """Test DomainAuthProviderResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.domain_auth_provider_response.DomainAuthProviderResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `DomainAuthProviderResponse` + """ + model = DomainAuthProviderResponse() + if include_optional: return DomainAuthProviderResponse( - identifier = '', - id = '', - provider_type = '', - provider = '', - label = '', - name = '', - authorization_url = '', - default = True, - enabled = True, - config = corellium_api.models.open_id_config.OpenIDConfig( - discovery_url = '', - client_id = '', - client_secret = '', - invited_only = True, ), - created_by = '', - created_at = '', - updated_at = '' + identifier = '8036ef76-8194-4a7c-95b2-42606a5d0171', + config = None, + provider_type = 'open-id-connect', + label = 'Log in with Okta', + enabled = True, + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + default = False, + authorization_url = '/api/v3/auth/providers/sso.example.com/authorization_url', + name = 'Okta', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' ) - else : + else: return DomainAuthProviderResponse( - identifier = '', - provider_type = '', - label = '', - default = True, + identifier = '8036ef76-8194-4a7c-95b2-42606a5d0171', + provider_type = 'open-id-connect', + label = 'Log in with Okta', enabled = True, - created_at = '', - updated_at = '', + default = False, ) + """ def testDomainAuthProviderResponse(self): """Test DomainAuthProviderResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_domain_auth_provider_response_v1.py b/test/test_domain_auth_provider_response_v1.py new file mode 100644 index 0000000..5bda434 --- /dev/null +++ b/test/test_domain_auth_provider_response_v1.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_auth_provider_response_v1 import DomainAuthProviderResponseV1 + +class TestDomainAuthProviderResponseV1(unittest.TestCase): + """DomainAuthProviderResponseV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainAuthProviderResponseV1: + """Test DomainAuthProviderResponseV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainAuthProviderResponseV1` + """ + model = DomainAuthProviderResponseV1() + if include_optional: + return DomainAuthProviderResponseV1( + identifier = '', + id = '', + provider_type = '', + provider = '', + label = '', + name = '', + authorization_url = '', + default = True, + enabled = True, + config = corellium.models.open_id_config_v1.OpenIDConfigV1( + discovery_url = '', + client_id = '', + client_secret = '', + invited_only = True, ), + created_by = '', + created_at = '', + updated_at = '' + ) + else: + return DomainAuthProviderResponseV1( + identifier = '', + provider_type = '', + label = '', + default = True, + enabled = True, + created_at = '', + updated_at = '', + ) + """ + + def testDomainAuthProviderResponseV1(self): + """Test DomainAuthProviderResponseV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_auth_providers_api.py b/test/test_domain_auth_providers_api.py new file mode 100644 index 0000000..77c4136 --- /dev/null +++ b/test/test_domain_auth_providers_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.domain_auth_providers_api import DomainAuthProvidersApi + + +class TestDomainAuthProvidersApi(unittest.TestCase): + """DomainAuthProvidersApi unit test stubs""" + + def setUp(self) -> None: + self.api = DomainAuthProvidersApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_domain_auth_provider(self) -> None: + """Test case for v3_create_domain_auth_provider + + Create a new auth provider for a domain + """ + pass + + def test_v3_delete_domain_auth_provider(self) -> None: + """Test case for v3_delete_domain_auth_provider + + Delete an auth provider from a domain + """ + pass + + def test_v3_list_domain_auth_providers(self) -> None: + """Test case for v3_list_domain_auth_providers + + Return all configured auth providers for a domain (including globally configured providers) + """ + pass + + def test_v3_patch_domain_auth_provider(self) -> None: + """Test case for v3_patch_domain_auth_provider + + Partially update an auth provider for a domain + """ + pass + + def test_v3_update_domain_auth_provider(self) -> None: + """Test case for v3_update_domain_auth_provider + + Update an auth provider for a domain + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_auth_providers_list.py b/test/test_domain_auth_providers_list.py new file mode 100644 index 0000000..f82a0a9 --- /dev/null +++ b/test/test_domain_auth_providers_list.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_auth_providers_list import DomainAuthProvidersList + +class TestDomainAuthProvidersList(unittest.TestCase): + """DomainAuthProvidersList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainAuthProvidersList: + """Test DomainAuthProvidersList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainAuthProvidersList` + """ + model = DomainAuthProvidersList() + if include_optional: + return DomainAuthProvidersList( + results = [ + corellium.models.domain_auth_provider_response.DomainAuthProviderResponse( + identifier = '8036ef76-8194-4a7c-95b2-42606a5d0171', + config = null, + provider_type = 'open-id-connect', + label = 'Log in with Okta', + enabled = True, + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + default = False, + authorization_url = '/api/v3/auth/providers/sso.example.com/authorization_url', + name = 'Okta', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return DomainAuthProvidersList( + results = [ + corellium.models.domain_auth_provider_response.DomainAuthProviderResponse( + identifier = '8036ef76-8194-4a7c-95b2-42606a5d0171', + config = null, + provider_type = 'open-id-connect', + label = 'Log in with Okta', + enabled = True, + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + default = False, + authorization_url = '/api/v3/auth/providers/sso.example.com/authorization_url', + name = 'Okta', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testDomainAuthProvidersList(self): + """Test DomainAuthProvidersList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config.py b/test/test_domain_config.py new file mode 100644 index 0000000..d17a5c0 --- /dev/null +++ b/test/test_domain_config.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config import DomainConfig + +class TestDomainConfig(unittest.TestCase): + """DomainConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfig: + """Test DomainConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfig` + """ + model = DomainConfig() + if include_optional: + return DomainConfig( + android = True, + billing = True, + license_type = 'enterprise', + signup_email = 'jane.doe@example.com', + trial = corellium.models.domain_config_trial.DomainConfig_trial( + start = 1773479567000, + end = 1799971200000, + end_action = corellium.models.domain_config_trial_end_action.DomainConfig_trial_end_action( + action = 'cancel', ), + subscribe_action = corellium.models.domain_config_trial_subscribe_action.DomainConfig_trial_subscribe_action( + action = 'auto', ), + extension = null, ), + usage_based = False, + enable_netgear_devices = True, + no_ios = False, + enable_amazon_devices = True, + device_dhcp_server = True, + enable_arm_devices = True, + enable_devices = True, + webplayer = corellium.models.domain_config_webplayer.DomainConfig_webplayer( + enabled = True, + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.domain_config_snapshot_sharing_permissions.DomainConfig_snapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ) + ) + else: + return DomainConfig( + ) + """ + + def testDomainConfig(self): + """Test DomainConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_input.py b/test/test_domain_config_input.py new file mode 100644 index 0000000..2539a60 --- /dev/null +++ b/test/test_domain_config_input.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_input import DomainConfigInput + +class TestDomainConfigInput(unittest.TestCase): + """DomainConfigInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigInput: + """Test DomainConfigInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigInput` + """ + model = DomainConfigInput() + if include_optional: + return DomainConfigInput( + android = True, + billing = True, + organization_name = 'Acme Corp', + license_type = 'enterprise', + signup_email = 'jane.doe@example.com', + coupon_code = 'LAUNCH2026', + trial = corellium.models.domain_config_input_trial.DomainConfigInput_trial( + start = 1773479567000, + end = 1799971200000, ), + no_ios = False, + device_dhcp_server = True, + files = True, + files_only = False, + remote_gpu = False, + prioritized_nodes = ["10.0.0.5:6666"], + enable_netgear_devices = True, + enable_amazon_devices = True, + enable_arm_devices = True, + enable_devices = True, + webplayer = corellium.models.domain_config_input_webplayer.DomainConfigInput_webplayer( + enabled = True, + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.domain_config_input_snapshot_sharing_permissions.DomainConfigInput_snapshotSharingPermissions( + enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ) + ) + else: + return DomainConfigInput( + ) + """ + + def testDomainConfigInput(self): + """Test DomainConfigInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_input_snapshot_sharing_permissions.py b/test/test_domain_config_input_snapshot_sharing_permissions.py new file mode 100644 index 0000000..0003ba5 --- /dev/null +++ b/test/test_domain_config_input_snapshot_sharing_permissions.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_input_snapshot_sharing_permissions import DomainConfigInputSnapshotSharingPermissions + +class TestDomainConfigInputSnapshotSharingPermissions(unittest.TestCase): + """DomainConfigInputSnapshotSharingPermissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigInputSnapshotSharingPermissions: + """Test DomainConfigInputSnapshotSharingPermissions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigInputSnapshotSharingPermissions` + """ + model = DomainConfigInputSnapshotSharingPermissions() + if include_optional: + return DomainConfigInputSnapshotSharingPermissions( + enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True + ) + else: + return DomainConfigInputSnapshotSharingPermissions( + ) + """ + + def testDomainConfigInputSnapshotSharingPermissions(self): + """Test DomainConfigInputSnapshotSharingPermissions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_input_trial.py b/test/test_domain_config_input_trial.py new file mode 100644 index 0000000..644f86c --- /dev/null +++ b/test/test_domain_config_input_trial.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_input_trial import DomainConfigInputTrial + +class TestDomainConfigInputTrial(unittest.TestCase): + """DomainConfigInputTrial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigInputTrial: + """Test DomainConfigInputTrial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigInputTrial` + """ + model = DomainConfigInputTrial() + if include_optional: + return DomainConfigInputTrial( + start = 1773479567000, + end = 1799971200000 + ) + else: + return DomainConfigInputTrial( + start = 1773479567000, + end = 1799971200000, + ) + """ + + def testDomainConfigInputTrial(self): + """Test DomainConfigInputTrial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_input_webplayer.py b/test/test_domain_config_input_webplayer.py new file mode 100644 index 0000000..9eb3036 --- /dev/null +++ b/test/test_domain_config_input_webplayer.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_input_webplayer import DomainConfigInputWebplayer + +class TestDomainConfigInputWebplayer(unittest.TestCase): + """DomainConfigInputWebplayer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigInputWebplayer: + """Test DomainConfigInputWebplayer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigInputWebplayer` + """ + model = DomainConfigInputWebplayer() + if include_optional: + return DomainConfigInputWebplayer( + enabled = True, + allowed_domains = ["app.example.com"] + ) + else: + return DomainConfigInputWebplayer( + ) + """ + + def testDomainConfigInputWebplayer(self): + """Test DomainConfigInputWebplayer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_snapshot_sharing_permissions.py b/test/test_domain_config_snapshot_sharing_permissions.py new file mode 100644 index 0000000..585499a --- /dev/null +++ b/test/test_domain_config_snapshot_sharing_permissions.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_snapshot_sharing_permissions import DomainConfigSnapshotSharingPermissions + +class TestDomainConfigSnapshotSharingPermissions(unittest.TestCase): + """DomainConfigSnapshotSharingPermissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigSnapshotSharingPermissions: + """Test DomainConfigSnapshotSharingPermissions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigSnapshotSharingPermissions` + """ + model = DomainConfigSnapshotSharingPermissions() + if include_optional: + return DomainConfigSnapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True + ) + else: + return DomainConfigSnapshotSharingPermissions( + ) + """ + + def testDomainConfigSnapshotSharingPermissions(self): + """Test DomainConfigSnapshotSharingPermissions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_trial.py b/test/test_domain_config_trial.py new file mode 100644 index 0000000..03a132f --- /dev/null +++ b/test/test_domain_config_trial.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_trial import DomainConfigTrial + +class TestDomainConfigTrial(unittest.TestCase): + """DomainConfigTrial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigTrial: + """Test DomainConfigTrial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigTrial` + """ + model = DomainConfigTrial() + if include_optional: + return DomainConfigTrial( + start = 1773479567000, + end = 1799971200000, + end_action = corellium.models.domain_config_trial_end_action.DomainConfig_trial_end_action( + action = 'cancel', ), + subscribe_action = corellium.models.domain_config_trial_subscribe_action.DomainConfig_trial_subscribe_action( + action = 'auto', ), + extension = corellium.models.trial_extension.TrialExtension( + duration = 7, + reason = 'Need more time to evaluate the platform.', + denied = True, + denied_reason = 'Trial already extended twice.', ) + ) + else: + return DomainConfigTrial( + ) + """ + + def testDomainConfigTrial(self): + """Test DomainConfigTrial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_trial_end_action.py b/test/test_domain_config_trial_end_action.py new file mode 100644 index 0000000..bc1ff8a --- /dev/null +++ b/test/test_domain_config_trial_end_action.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_trial_end_action import DomainConfigTrialEndAction + +class TestDomainConfigTrialEndAction(unittest.TestCase): + """DomainConfigTrialEndAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigTrialEndAction: + """Test DomainConfigTrialEndAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigTrialEndAction` + """ + model = DomainConfigTrialEndAction() + if include_optional: + return DomainConfigTrialEndAction( + action = 'cancel' + ) + else: + return DomainConfigTrialEndAction( + action = 'cancel', + ) + """ + + def testDomainConfigTrialEndAction(self): + """Test DomainConfigTrialEndAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_trial_subscribe_action.py b/test/test_domain_config_trial_subscribe_action.py new file mode 100644 index 0000000..f371077 --- /dev/null +++ b/test/test_domain_config_trial_subscribe_action.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_trial_subscribe_action import DomainConfigTrialSubscribeAction + +class TestDomainConfigTrialSubscribeAction(unittest.TestCase): + """DomainConfigTrialSubscribeAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigTrialSubscribeAction: + """Test DomainConfigTrialSubscribeAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigTrialSubscribeAction` + """ + model = DomainConfigTrialSubscribeAction() + if include_optional: + return DomainConfigTrialSubscribeAction( + action = 'auto' + ) + else: + return DomainConfigTrialSubscribeAction( + action = 'auto', + ) + """ + + def testDomainConfigTrialSubscribeAction(self): + """Test DomainConfigTrialSubscribeAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_config_webplayer.py b/test/test_domain_config_webplayer.py new file mode 100644 index 0000000..9ea511f --- /dev/null +++ b/test/test_domain_config_webplayer.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_config_webplayer import DomainConfigWebplayer + +class TestDomainConfigWebplayer(unittest.TestCase): + """DomainConfigWebplayer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainConfigWebplayer: + """Test DomainConfigWebplayer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainConfigWebplayer` + """ + model = DomainConfigWebplayer() + if include_optional: + return DomainConfigWebplayer( + enabled = True, + allowed_domains = ["app.example.com"] + ) + else: + return DomainConfigWebplayer( + enabled = True, + ) + """ + + def testDomainConfigWebplayer(self): + """Test DomainConfigWebplayer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_info.py b/test/test_domain_info.py new file mode 100644 index 0000000..a3e11a8 --- /dev/null +++ b/test/test_domain_info.py @@ -0,0 +1,343 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_info import DomainInfo + +class TestDomainInfo(unittest.TestCase): + """DomainInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainInfo: + """Test DomainInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainInfo` + """ + model = DomainInfo() + if include_optional: + return DomainInfo( + domain_info = corellium.models.domain_list_item.DomainListItem( + identifier = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + domain_usage = [ + corellium.models.domain_list_item_domain_usage_inner.DomainListItem_domainUsage_inner( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + month = 'Sun Mar 01 00:00:00 UTC 2026', + hours = 129.61, ) + ], + user_count = 2, + users_info = [ + corellium.models.domain_list_item_users_info_inner.DomainListItem_usersInfo_inner( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + cluster_administrator = False, + last_login = '2026-03-16T08:22:19Z', + teams = 2, ) + ], + domain = 'acme.corellium.com', + domain_name = 'acme', + disabled = corellium.models.domain_list_item_disabled.DomainListItem_disabled( + type = 'SubscriptionCanceled', ), + config = corellium.models.domain_config.DomainConfig( + android = True, + billing = True, + license_type = 'enterprise', + signup_email = 'jane.doe@example.com', + trial = corellium.models.domain_config_trial.DomainConfig_trial( + start = 1773479567000, + end = 1799971200000, + end_action = corellium.models.domain_config_trial_end_action.DomainConfig_trial_end_action( + action = 'cancel', ), + subscribe_action = corellium.models.domain_config_trial_subscribe_action.DomainConfig_trial_subscribe_action( + action = 'auto', ), + extension = null, ), + usage_based = False, + enable_netgear_devices = True, + no_ios = False, + enable_amazon_devices = True, + device_dhcp_server = True, + enable_arm_devices = True, + enable_devices = True, + webplayer = corellium.models.domain_config_webplayer.DomainConfig_webplayer( + enabled = True, + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.domain_config_snapshot_sharing_permissions.DomainConfig_snapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ), ), + quotas = corellium.models.domain_list_item_quotas.DomainListItem_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_usage.DomainListItem_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + created_at = 1773479567000, + subscription = corellium.models.domain_list_item_subscription.DomainListItem_subscription( + renew_action = {"action":"cancel"}, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'sub_1ExampleSubscriptionId', + next_bill = '2027-01-15T00:00Z', + usage_based = False, + last_usage_bill = '2026-03-16T08:22:19Z', + last_payment_amount = 49900, + usage_bill_interval_days = 7, + usage_billing_threshold_dollars = 5, + past_due = False, + payment_attempts = 1, + last_payment_attempt = '2026-03-16T08:22:19Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ), + subscription_history = [ + corellium.models.domain_list_item_subscription_history_inner.DomainListItem_subscriptionHistory_inner( + plan_name = 'Enterprise Annual', + plan_start = '2026-03-14T09:12:47Z', + plan_end = '2027-01-15T00:00Z', + status = 'Active', + administrator = corellium.models.domain_list_item_subscription_history_inner_administrator.DomainListItem_subscriptionHistory_inner_administrator( + name = 'Tom Smith', + email = 'tom.smith@example.com', ), + stripe_link = 'https://dashboard.stripe.com/subscriptions/sub_1ExampleSubscriptionId', ) + ], + plan_name = 'Enterprise Annual', + projects = [ + corellium.models.domain_list_item_projects_inner.DomainListItem_projects_inner( + identifier = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + quotas = corellium.models.domain_list_item_projects_inner_quotas.DomainListItem_projects_inner_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_projects_inner_usage.DomainListItem_projects_inner_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + instances = [ + corellium.models.domain_list_item_projects_inner_instances_inner.DomainListItem_projects_inner_instances_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), ) + ], + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], ) + ], ) + ) + else: + return DomainInfo( + domain_info = corellium.models.domain_list_item.DomainListItem( + identifier = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + domain_usage = [ + corellium.models.domain_list_item_domain_usage_inner.DomainListItem_domainUsage_inner( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + month = 'Sun Mar 01 00:00:00 UTC 2026', + hours = 129.61, ) + ], + user_count = 2, + users_info = [ + corellium.models.domain_list_item_users_info_inner.DomainListItem_usersInfo_inner( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + cluster_administrator = False, + last_login = '2026-03-16T08:22:19Z', + teams = 2, ) + ], + domain = 'acme.corellium.com', + domain_name = 'acme', + disabled = corellium.models.domain_list_item_disabled.DomainListItem_disabled( + type = 'SubscriptionCanceled', ), + config = corellium.models.domain_config.DomainConfig( + android = True, + billing = True, + license_type = 'enterprise', + signup_email = 'jane.doe@example.com', + trial = corellium.models.domain_config_trial.DomainConfig_trial( + start = 1773479567000, + end = 1799971200000, + end_action = corellium.models.domain_config_trial_end_action.DomainConfig_trial_end_action( + action = 'cancel', ), + subscribe_action = corellium.models.domain_config_trial_subscribe_action.DomainConfig_trial_subscribe_action( + action = 'auto', ), + extension = null, ), + usage_based = False, + enable_netgear_devices = True, + no_ios = False, + enable_amazon_devices = True, + device_dhcp_server = True, + enable_arm_devices = True, + enable_devices = True, + webplayer = corellium.models.domain_config_webplayer.DomainConfig_webplayer( + enabled = True, + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.domain_config_snapshot_sharing_permissions.DomainConfig_snapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ), ), + quotas = corellium.models.domain_list_item_quotas.DomainListItem_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_usage.DomainListItem_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + created_at = 1773479567000, + subscription = corellium.models.domain_list_item_subscription.DomainListItem_subscription( + renew_action = {"action":"cancel"}, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'sub_1ExampleSubscriptionId', + next_bill = '2027-01-15T00:00Z', + usage_based = False, + last_usage_bill = '2026-03-16T08:22:19Z', + last_payment_amount = 49900, + usage_bill_interval_days = 7, + usage_billing_threshold_dollars = 5, + past_due = False, + payment_attempts = 1, + last_payment_attempt = '2026-03-16T08:22:19Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ), + subscription_history = [ + corellium.models.domain_list_item_subscription_history_inner.DomainListItem_subscriptionHistory_inner( + plan_name = 'Enterprise Annual', + plan_start = '2026-03-14T09:12:47Z', + plan_end = '2027-01-15T00:00Z', + status = 'Active', + administrator = corellium.models.domain_list_item_subscription_history_inner_administrator.DomainListItem_subscriptionHistory_inner_administrator( + name = 'Tom Smith', + email = 'tom.smith@example.com', ), + stripe_link = 'https://dashboard.stripe.com/subscriptions/sub_1ExampleSubscriptionId', ) + ], + plan_name = 'Enterprise Annual', + projects = [ + corellium.models.domain_list_item_projects_inner.DomainListItem_projects_inner( + identifier = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + quotas = corellium.models.domain_list_item_projects_inner_quotas.DomainListItem_projects_inner_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_projects_inner_usage.DomainListItem_projects_inner_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + instances = [ + corellium.models.domain_list_item_projects_inner_instances_inner.DomainListItem_projects_inner_instances_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), ) + ], + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], ) + ], ), + ) + """ + + def testDomainInfo(self): + """Test DomainInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list.py b/test/test_domain_list.py new file mode 100644 index 0000000..f9b1c49 --- /dev/null +++ b/test/test_domain_list.py @@ -0,0 +1,369 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list import DomainList + +class TestDomainList(unittest.TestCase): + """DomainList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainList: + """Test DomainList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainList` + """ + model = DomainList() + if include_optional: + return DomainList( + count = 37, + page = 0, + per_page = 50, + items = [ + corellium.models.domain_list_item.DomainListItem( + identifier = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + domain_usage = [ + corellium.models.domain_list_item_domain_usage_inner.DomainListItem_domainUsage_inner( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + month = 'Sun Mar 01 00:00:00 UTC 2026', + hours = 129.61, ) + ], + user_count = 2, + users_info = [ + corellium.models.domain_list_item_users_info_inner.DomainListItem_usersInfo_inner( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + cluster_administrator = False, + last_login = '2026-03-16T08:22:19Z', + teams = 2, ) + ], + domain = 'acme.corellium.com', + domain_name = 'acme', + disabled = corellium.models.domain_list_item_disabled.DomainListItem_disabled( + type = 'SubscriptionCanceled', ), + config = corellium.models.domain_config.DomainConfig( + android = True, + billing = True, + license_type = 'enterprise', + signup_email = 'jane.doe@example.com', + trial = corellium.models.domain_config_trial.DomainConfig_trial( + start = 1773479567000, + end = 1799971200000, + end_action = corellium.models.domain_config_trial_end_action.DomainConfig_trial_end_action( + action = 'cancel', ), + subscribe_action = corellium.models.domain_config_trial_subscribe_action.DomainConfig_trial_subscribe_action( + action = 'auto', ), + extension = null, ), + usage_based = False, + enable_netgear_devices = True, + no_ios = False, + enable_amazon_devices = True, + device_dhcp_server = True, + enable_arm_devices = True, + enable_devices = True, + webplayer = corellium.models.domain_config_webplayer.DomainConfig_webplayer( + enabled = True, + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.domain_config_snapshot_sharing_permissions.DomainConfig_snapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ), ), + quotas = corellium.models.domain_list_item_quotas.DomainListItem_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_usage.DomainListItem_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + created_at = 1773479567000, + subscription = corellium.models.domain_list_item_subscription.DomainListItem_subscription( + renew_action = {"action":"cancel"}, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'sub_1ExampleSubscriptionId', + next_bill = '2027-01-15T00:00Z', + usage_based = False, + last_usage_bill = '2026-03-16T08:22:19Z', + last_payment_amount = 49900, + usage_bill_interval_days = 7, + usage_billing_threshold_dollars = 5, + past_due = False, + payment_attempts = 1, + last_payment_attempt = '2026-03-16T08:22:19Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ), + subscription_history = [ + corellium.models.domain_list_item_subscription_history_inner.DomainListItem_subscriptionHistory_inner( + plan_name = 'Enterprise Annual', + plan_start = '2026-03-14T09:12:47Z', + plan_end = '2027-01-15T00:00Z', + status = 'Active', + administrator = corellium.models.domain_list_item_subscription_history_inner_administrator.DomainListItem_subscriptionHistory_inner_administrator( + name = 'Tom Smith', + email = 'tom.smith@example.com', ), + stripe_link = 'https://dashboard.stripe.com/subscriptions/sub_1ExampleSubscriptionId', ) + ], + plan_name = 'Enterprise Annual', + projects = [ + corellium.models.domain_list_item_projects_inner.DomainListItem_projects_inner( + identifier = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + quotas = corellium.models.domain_list_item_projects_inner_quotas.DomainListItem_projects_inner_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_projects_inner_usage.DomainListItem_projects_inner_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + instances = [ + corellium.models.domain_list_item_projects_inner_instances_inner.DomainListItem_projects_inner_instances_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), ) + ], + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], ) + ], ) + ], + usage = corellium.models.domain_list_usage.DomainList_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ) + ) + else: + return DomainList( + count = 37, + page = 0, + per_page = 50, + items = [ + corellium.models.domain_list_item.DomainListItem( + identifier = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + domain_usage = [ + corellium.models.domain_list_item_domain_usage_inner.DomainListItem_domainUsage_inner( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + month = 'Sun Mar 01 00:00:00 UTC 2026', + hours = 129.61, ) + ], + user_count = 2, + users_info = [ + corellium.models.domain_list_item_users_info_inner.DomainListItem_usersInfo_inner( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + cluster_administrator = False, + last_login = '2026-03-16T08:22:19Z', + teams = 2, ) + ], + domain = 'acme.corellium.com', + domain_name = 'acme', + disabled = corellium.models.domain_list_item_disabled.DomainListItem_disabled( + type = 'SubscriptionCanceled', ), + config = corellium.models.domain_config.DomainConfig( + android = True, + billing = True, + license_type = 'enterprise', + signup_email = 'jane.doe@example.com', + trial = corellium.models.domain_config_trial.DomainConfig_trial( + start = 1773479567000, + end = 1799971200000, + end_action = corellium.models.domain_config_trial_end_action.DomainConfig_trial_end_action( + action = 'cancel', ), + subscribe_action = corellium.models.domain_config_trial_subscribe_action.DomainConfig_trial_subscribe_action( + action = 'auto', ), + extension = null, ), + usage_based = False, + enable_netgear_devices = True, + no_ios = False, + enable_amazon_devices = True, + device_dhcp_server = True, + enable_arm_devices = True, + enable_devices = True, + webplayer = corellium.models.domain_config_webplayer.DomainConfig_webplayer( + enabled = True, + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.domain_config_snapshot_sharing_permissions.DomainConfig_snapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ), ), + quotas = corellium.models.domain_list_item_quotas.DomainListItem_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_usage.DomainListItem_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + created_at = 1773479567000, + subscription = corellium.models.domain_list_item_subscription.DomainListItem_subscription( + renew_action = {"action":"cancel"}, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'sub_1ExampleSubscriptionId', + next_bill = '2027-01-15T00:00Z', + usage_based = False, + last_usage_bill = '2026-03-16T08:22:19Z', + last_payment_amount = 49900, + usage_bill_interval_days = 7, + usage_billing_threshold_dollars = 5, + past_due = False, + payment_attempts = 1, + last_payment_attempt = '2026-03-16T08:22:19Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ), + subscription_history = [ + corellium.models.domain_list_item_subscription_history_inner.DomainListItem_subscriptionHistory_inner( + plan_name = 'Enterprise Annual', + plan_start = '2026-03-14T09:12:47Z', + plan_end = '2027-01-15T00:00Z', + status = 'Active', + administrator = corellium.models.domain_list_item_subscription_history_inner_administrator.DomainListItem_subscriptionHistory_inner_administrator( + name = 'Tom Smith', + email = 'tom.smith@example.com', ), + stripe_link = 'https://dashboard.stripe.com/subscriptions/sub_1ExampleSubscriptionId', ) + ], + plan_name = 'Enterprise Annual', + projects = [ + corellium.models.domain_list_item_projects_inner.DomainListItem_projects_inner( + identifier = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + quotas = corellium.models.domain_list_item_projects_inner_quotas.DomainListItem_projects_inner_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_projects_inner_usage.DomainListItem_projects_inner_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + instances = [ + corellium.models.domain_list_item_projects_inner_instances_inner.DomainListItem_projects_inner_instances_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), ) + ], + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], ) + ], ) + ], + usage = corellium.models.domain_list_usage.DomainList_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + ) + """ + + def testDomainList(self): + """Test DomainList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item.py b/test/test_domain_list_item.py new file mode 100644 index 0000000..3ff7ea7 --- /dev/null +++ b/test/test_domain_list_item.py @@ -0,0 +1,329 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item import DomainListItem + +class TestDomainListItem(unittest.TestCase): + """DomainListItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItem: + """Test DomainListItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItem` + """ + model = DomainListItem() + if include_optional: + return DomainListItem( + identifier = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + domain_usage = [ + corellium.models.domain_list_item_domain_usage_inner.DomainListItem_domainUsage_inner( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + month = 'Sun Mar 01 00:00:00 UTC 2026', + hours = 129.61, ) + ], + user_count = 2, + users_info = [ + corellium.models.domain_list_item_users_info_inner.DomainListItem_usersInfo_inner( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + cluster_administrator = False, + last_login = '2026-03-16T08:22:19Z', + teams = 2, ) + ], + domain = 'acme.corellium.com', + domain_name = 'acme', + disabled = corellium.models.domain_list_item_disabled.DomainListItem_disabled( + type = 'SubscriptionCanceled', ), + config = corellium.models.domain_config.DomainConfig( + android = True, + billing = True, + license_type = 'enterprise', + signup_email = 'jane.doe@example.com', + trial = corellium.models.domain_config_trial.DomainConfig_trial( + start = 1773479567000, + end = 1799971200000, + end_action = corellium.models.domain_config_trial_end_action.DomainConfig_trial_end_action( + action = 'cancel', ), + subscribe_action = corellium.models.domain_config_trial_subscribe_action.DomainConfig_trial_subscribe_action( + action = 'auto', ), + extension = null, ), + usage_based = False, + enable_netgear_devices = True, + no_ios = False, + enable_amazon_devices = True, + device_dhcp_server = True, + enable_arm_devices = True, + enable_devices = True, + webplayer = corellium.models.domain_config_webplayer.DomainConfig_webplayer( + enabled = True, + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.domain_config_snapshot_sharing_permissions.DomainConfig_snapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ), ), + quotas = corellium.models.domain_list_item_quotas.DomainListItem_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_usage.DomainListItem_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + created_at = 1773479567000, + subscription = corellium.models.domain_list_item_subscription.DomainListItem_subscription( + renew_action = {"action":"cancel"}, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'sub_1ExampleSubscriptionId', + next_bill = '2027-01-15T00:00Z', + usage_based = False, + last_usage_bill = '2026-03-16T08:22:19Z', + last_payment_amount = 49900, + usage_bill_interval_days = 7, + usage_billing_threshold_dollars = 5, + past_due = False, + payment_attempts = 1, + last_payment_attempt = '2026-03-16T08:22:19Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ), + subscription_history = [ + corellium.models.domain_list_item_subscription_history_inner.DomainListItem_subscriptionHistory_inner( + plan_name = 'Enterprise Annual', + plan_start = '2026-03-14T09:12:47Z', + plan_end = '2027-01-15T00:00Z', + status = 'Active', + administrator = corellium.models.domain_list_item_subscription_history_inner_administrator.DomainListItem_subscriptionHistory_inner_administrator( + name = 'Tom Smith', + email = 'tom.smith@example.com', ), + stripe_link = 'https://dashboard.stripe.com/subscriptions/sub_1ExampleSubscriptionId', ) + ], + plan_name = 'Enterprise Annual', + projects = [ + corellium.models.domain_list_item_projects_inner.DomainListItem_projects_inner( + identifier = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + quotas = corellium.models.domain_list_item_projects_inner_quotas.DomainListItem_projects_inner_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_projects_inner_usage.DomainListItem_projects_inner_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + instances = [ + corellium.models.domain_list_item_projects_inner_instances_inner.DomainListItem_projects_inner_instances_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), ) + ], + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], ) + ] + ) + else: + return DomainListItem( + identifier = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + domain_usage = [ + corellium.models.domain_list_item_domain_usage_inner.DomainListItem_domainUsage_inner( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + month = 'Sun Mar 01 00:00:00 UTC 2026', + hours = 129.61, ) + ], + user_count = 2, + users_info = [ + corellium.models.domain_list_item_users_info_inner.DomainListItem_usersInfo_inner( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + cluster_administrator = False, + last_login = '2026-03-16T08:22:19Z', + teams = 2, ) + ], + domain = 'acme.corellium.com', + domain_name = 'acme', + disabled = corellium.models.domain_list_item_disabled.DomainListItem_disabled( + type = 'SubscriptionCanceled', ), + config = corellium.models.domain_config.DomainConfig( + android = True, + billing = True, + license_type = 'enterprise', + signup_email = 'jane.doe@example.com', + trial = corellium.models.domain_config_trial.DomainConfig_trial( + start = 1773479567000, + end = 1799971200000, + end_action = corellium.models.domain_config_trial_end_action.DomainConfig_trial_end_action( + action = 'cancel', ), + subscribe_action = corellium.models.domain_config_trial_subscribe_action.DomainConfig_trial_subscribe_action( + action = 'auto', ), + extension = null, ), + usage_based = False, + enable_netgear_devices = True, + no_ios = False, + enable_amazon_devices = True, + device_dhcp_server = True, + enable_arm_devices = True, + enable_devices = True, + webplayer = corellium.models.domain_config_webplayer.DomainConfig_webplayer( + enabled = True, + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.domain_config_snapshot_sharing_permissions.DomainConfig_snapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ), ), + quotas = corellium.models.domain_list_item_quotas.DomainListItem_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_usage.DomainListItem_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + created_at = 1773479567000, + subscription = corellium.models.domain_list_item_subscription.DomainListItem_subscription( + renew_action = {"action":"cancel"}, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'sub_1ExampleSubscriptionId', + next_bill = '2027-01-15T00:00Z', + usage_based = False, + last_usage_bill = '2026-03-16T08:22:19Z', + last_payment_amount = 49900, + usage_bill_interval_days = 7, + usage_billing_threshold_dollars = 5, + past_due = False, + payment_attempts = 1, + last_payment_attempt = '2026-03-16T08:22:19Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ), + projects = [ + corellium.models.domain_list_item_projects_inner.DomainListItem_projects_inner( + identifier = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + quotas = corellium.models.domain_list_item_projects_inner_quotas.DomainListItem_projects_inner_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_projects_inner_usage.DomainListItem_projects_inner_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + instances = [ + corellium.models.domain_list_item_projects_inner_instances_inner.DomainListItem_projects_inner_instances_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), ) + ], + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], ) + ], + ) + """ + + def testDomainListItem(self): + """Test DomainListItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_disabled.py b/test/test_domain_list_item_disabled.py new file mode 100644 index 0000000..4928b6b --- /dev/null +++ b/test/test_domain_list_item_disabled.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_disabled import DomainListItemDisabled + +class TestDomainListItemDisabled(unittest.TestCase): + """DomainListItemDisabled unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemDisabled: + """Test DomainListItemDisabled + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemDisabled` + """ + model = DomainListItemDisabled() + if include_optional: + return DomainListItemDisabled( + type = 'SubscriptionCanceled' + ) + else: + return DomainListItemDisabled( + type = 'SubscriptionCanceled', + ) + """ + + def testDomainListItemDisabled(self): + """Test DomainListItemDisabled""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_domain_usage_inner.py b/test/test_domain_list_item_domain_usage_inner.py new file mode 100644 index 0000000..1594d49 --- /dev/null +++ b/test/test_domain_list_item_domain_usage_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_domain_usage_inner import DomainListItemDomainUsageInner + +class TestDomainListItemDomainUsageInner(unittest.TestCase): + """DomainListItemDomainUsageInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemDomainUsageInner: + """Test DomainListItemDomainUsageInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemDomainUsageInner` + """ + model = DomainListItemDomainUsageInner() + if include_optional: + return DomainListItemDomainUsageInner( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + month = 'Sun Mar 01 00:00:00 UTC 2026', + hours = 129.61 + ) + else: + return DomainListItemDomainUsageInner( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + month = 'Sun Mar 01 00:00:00 UTC 2026', + hours = 129.61, + ) + """ + + def testDomainListItemDomainUsageInner(self): + """Test DomainListItemDomainUsageInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_projects_inner.py b/test/test_domain_list_item_projects_inner.py new file mode 100644 index 0000000..2bc37e3 --- /dev/null +++ b/test/test_domain_list_item_projects_inner.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_projects_inner import DomainListItemProjectsInner + +class TestDomainListItemProjectsInner(unittest.TestCase): + """DomainListItemProjectsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemProjectsInner: + """Test DomainListItemProjectsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemProjectsInner` + """ + model = DomainListItemProjectsInner() + if include_optional: + return DomainListItemProjectsInner( + identifier = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + quotas = corellium.models.domain_list_item_projects_inner_quotas.DomainListItem_projects_inner_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_projects_inner_usage.DomainListItem_projects_inner_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + instances = [ + corellium.models.domain_list_item_projects_inner_instances_inner.DomainListItem_projects_inner_instances_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), ) + ], + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ] + ) + else: + return DomainListItemProjectsInner( + identifier = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + quotas = corellium.models.domain_list_item_projects_inner_quotas.DomainListItem_projects_inner_quotas( + cores = 12, + instances = 30, + ram = 73728, ), + usage = corellium.models.domain_list_item_projects_inner_usage.DomainListItem_projects_inner_usage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214, ), + instances = [ + corellium.models.domain_list_item_projects_inner_instances_inner.DomainListItem_projects_inner_instances_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), ) + ], + ) + """ + + def testDomainListItemProjectsInner(self): + """Test DomainListItemProjectsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_projects_inner_instances_inner.py b/test/test_domain_list_item_projects_inner_instances_inner.py new file mode 100644 index 0000000..8f2d12a --- /dev/null +++ b/test/test_domain_list_item_projects_inner_instances_inner.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_projects_inner_instances_inner import DomainListItemProjectsInnerInstancesInner + +class TestDomainListItemProjectsInnerInstancesInner(unittest.TestCase): + """DomainListItemProjectsInnerInstancesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemProjectsInnerInstancesInner: + """Test DomainListItemProjectsInnerInstancesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemProjectsInnerInstancesInner` + """ + model = DomainListItemProjectsInnerInstancesInner() + if include_optional: + return DomainListItemProjectsInnerInstancesInner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'iPhone 6s Test Device', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + flavor = 'iPhone 6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ) + ) + else: + return DomainListItemProjectsInnerInstancesInner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = 'ACTIVE', + error = 'Failed to allocate device slot.', + task_state = 'none', + user_task = 'reboot', + os_version = '14.5.1', + os_build = '18E212', + flavor_id = 'iphone6s', + compute_node = '10.0.0.5:6666', + service_ip = '10.0.1.2', + wifi_ip = '10.0.2.2', + images = [ + corellium.models.domain_list_item_projects_inner_instances_inner_images_inner.DomainListItem_projects_inner_instances_inner_images_inner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, ) + ], + usage = corellium.models.domain_list_item_projects_inner_instances_inner_usage.DomainListItem_projects_inner_instances_inner_usage( + image_bytes = 239380613, ), + ) + """ + + def testDomainListItemProjectsInnerInstancesInner(self): + """Test DomainListItemProjectsInnerInstancesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_projects_inner_instances_inner_images_inner.py b/test/test_domain_list_item_projects_inner_instances_inner_images_inner.py new file mode 100644 index 0000000..4c83c26 --- /dev/null +++ b/test/test_domain_list_item_projects_inner_instances_inner_images_inner.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_projects_inner_instances_inner_images_inner import DomainListItemProjectsInnerInstancesInnerImagesInner + +class TestDomainListItemProjectsInnerInstancesInnerImagesInner(unittest.TestCase): + """DomainListItemProjectsInnerInstancesInnerImagesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemProjectsInnerInstancesInnerImagesInner: + """Test DomainListItemProjectsInnerInstancesInnerImagesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemProjectsInnerInstancesInnerImagesInner` + """ + model = DomainListItemProjectsInnerInstancesInnerImagesInner() + if include_optional: + return DomainListItemProjectsInnerInstancesInnerImagesInner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613 + ) + else: + return DomainListItemProjectsInnerInstancesInnerImagesInner( + identifier = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + type = 'fw', + name = 'iPhone_16.5_20F66_Restore.ipsw', + size = 239380613, + ) + """ + + def testDomainListItemProjectsInnerInstancesInnerImagesInner(self): + """Test DomainListItemProjectsInnerInstancesInnerImagesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_projects_inner_instances_inner_usage.py b/test/test_domain_list_item_projects_inner_instances_inner_usage.py new file mode 100644 index 0000000..9d9e65f --- /dev/null +++ b/test/test_domain_list_item_projects_inner_instances_inner_usage.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_projects_inner_instances_inner_usage import DomainListItemProjectsInnerInstancesInnerUsage + +class TestDomainListItemProjectsInnerInstancesInnerUsage(unittest.TestCase): + """DomainListItemProjectsInnerInstancesInnerUsage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemProjectsInnerInstancesInnerUsage: + """Test DomainListItemProjectsInnerInstancesInnerUsage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemProjectsInnerInstancesInnerUsage` + """ + model = DomainListItemProjectsInnerInstancesInnerUsage() + if include_optional: + return DomainListItemProjectsInnerInstancesInnerUsage( + image_bytes = 239380613 + ) + else: + return DomainListItemProjectsInnerInstancesInnerUsage( + image_bytes = 239380613, + ) + """ + + def testDomainListItemProjectsInnerInstancesInnerUsage(self): + """Test DomainListItemProjectsInnerInstancesInnerUsage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_projects_inner_quotas.py b/test/test_domain_list_item_projects_inner_quotas.py new file mode 100644 index 0000000..fd4177f --- /dev/null +++ b/test/test_domain_list_item_projects_inner_quotas.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_projects_inner_quotas import DomainListItemProjectsInnerQuotas + +class TestDomainListItemProjectsInnerQuotas(unittest.TestCase): + """DomainListItemProjectsInnerQuotas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemProjectsInnerQuotas: + """Test DomainListItemProjectsInnerQuotas + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemProjectsInnerQuotas` + """ + model = DomainListItemProjectsInnerQuotas() + if include_optional: + return DomainListItemProjectsInnerQuotas( + cores = 12, + instances = 30, + ram = 73728 + ) + else: + return DomainListItemProjectsInnerQuotas( + cores = 12, + instances = 30, + ram = 73728, + ) + """ + + def testDomainListItemProjectsInnerQuotas(self): + """Test DomainListItemProjectsInnerQuotas""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_projects_inner_usage.py b/test/test_domain_list_item_projects_inner_usage.py new file mode 100644 index 0000000..9d19f1f --- /dev/null +++ b/test/test_domain_list_item_projects_inner_usage.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_projects_inner_usage import DomainListItemProjectsInnerUsage + +class TestDomainListItemProjectsInnerUsage(unittest.TestCase): + """DomainListItemProjectsInnerUsage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemProjectsInnerUsage: + """Test DomainListItemProjectsInnerUsage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemProjectsInnerUsage` + """ + model = DomainListItemProjectsInnerUsage() + if include_optional: + return DomainListItemProjectsInnerUsage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214 + ) + else: + return DomainListItemProjectsInnerUsage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + ) + """ + + def testDomainListItemProjectsInnerUsage(self): + """Test DomainListItemProjectsInnerUsage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_quotas.py b/test/test_domain_list_item_quotas.py new file mode 100644 index 0000000..48d1dfa --- /dev/null +++ b/test/test_domain_list_item_quotas.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_quotas import DomainListItemQuotas + +class TestDomainListItemQuotas(unittest.TestCase): + """DomainListItemQuotas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemQuotas: + """Test DomainListItemQuotas + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemQuotas` + """ + model = DomainListItemQuotas() + if include_optional: + return DomainListItemQuotas( + cores = 12, + instances = 30, + ram = 73728 + ) + else: + return DomainListItemQuotas( + cores = 12, + instances = 30, + ram = 73728, + ) + """ + + def testDomainListItemQuotas(self): + """Test DomainListItemQuotas""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_subscription.py b/test/test_domain_list_item_subscription.py new file mode 100644 index 0000000..2731f98 --- /dev/null +++ b/test/test_domain_list_item_subscription.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_subscription import DomainListItemSubscription + +class TestDomainListItemSubscription(unittest.TestCase): + """DomainListItemSubscription unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemSubscription: + """Test DomainListItemSubscription + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemSubscription` + """ + model = DomainListItemSubscription() + if include_optional: + return DomainListItemSubscription( + renew_action = {"action":"cancel"}, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'sub_1ExampleSubscriptionId', + next_bill = '2027-01-15T00:00Z', + usage_based = False, + last_usage_bill = '2026-03-16T08:22:19Z', + last_payment_amount = 49900, + usage_bill_interval_days = 7, + usage_billing_threshold_dollars = 5, + past_due = False, + payment_attempts = 1, + last_payment_attempt = '2026-03-16T08:22:19Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return DomainListItemSubscription( + renew_action = {"action":"cancel"}, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'sub_1ExampleSubscriptionId', + next_bill = '2027-01-15T00:00Z', + usage_based = False, + last_usage_bill = '2026-03-16T08:22:19Z', + last_payment_amount = 49900, + usage_bill_interval_days = 7, + usage_billing_threshold_dollars = 5, + past_due = False, + payment_attempts = 1, + last_payment_attempt = '2026-03-16T08:22:19Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testDomainListItemSubscription(self): + """Test DomainListItemSubscription""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_subscription_history_inner.py b/test/test_domain_list_item_subscription_history_inner.py new file mode 100644 index 0000000..e42cb8e --- /dev/null +++ b/test/test_domain_list_item_subscription_history_inner.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_subscription_history_inner import DomainListItemSubscriptionHistoryInner + +class TestDomainListItemSubscriptionHistoryInner(unittest.TestCase): + """DomainListItemSubscriptionHistoryInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemSubscriptionHistoryInner: + """Test DomainListItemSubscriptionHistoryInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemSubscriptionHistoryInner` + """ + model = DomainListItemSubscriptionHistoryInner() + if include_optional: + return DomainListItemSubscriptionHistoryInner( + plan_name = 'Enterprise Annual', + plan_start = '2026-03-14T09:12:47Z', + plan_end = '2027-01-15T00:00Z', + status = 'Active', + administrator = corellium.models.domain_list_item_subscription_history_inner_administrator.DomainListItem_subscriptionHistory_inner_administrator( + name = 'Tom Smith', + email = 'tom.smith@example.com', ), + stripe_link = 'https://dashboard.stripe.com/subscriptions/sub_1ExampleSubscriptionId' + ) + else: + return DomainListItemSubscriptionHistoryInner( + plan_name = 'Enterprise Annual', + plan_start = '2026-03-14T09:12:47Z', + plan_end = '2027-01-15T00:00Z', + status = 'Active', + administrator = corellium.models.domain_list_item_subscription_history_inner_administrator.DomainListItem_subscriptionHistory_inner_administrator( + name = 'Tom Smith', + email = 'tom.smith@example.com', ), + stripe_link = 'https://dashboard.stripe.com/subscriptions/sub_1ExampleSubscriptionId', + ) + """ + + def testDomainListItemSubscriptionHistoryInner(self): + """Test DomainListItemSubscriptionHistoryInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_subscription_history_inner_administrator.py b/test/test_domain_list_item_subscription_history_inner_administrator.py new file mode 100644 index 0000000..261cafd --- /dev/null +++ b/test/test_domain_list_item_subscription_history_inner_administrator.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_subscription_history_inner_administrator import DomainListItemSubscriptionHistoryInnerAdministrator + +class TestDomainListItemSubscriptionHistoryInnerAdministrator(unittest.TestCase): + """DomainListItemSubscriptionHistoryInnerAdministrator unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemSubscriptionHistoryInnerAdministrator: + """Test DomainListItemSubscriptionHistoryInnerAdministrator + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemSubscriptionHistoryInnerAdministrator` + """ + model = DomainListItemSubscriptionHistoryInnerAdministrator() + if include_optional: + return DomainListItemSubscriptionHistoryInnerAdministrator( + name = 'Tom Smith', + email = 'tom.smith@example.com' + ) + else: + return DomainListItemSubscriptionHistoryInnerAdministrator( + name = 'Tom Smith', + email = 'tom.smith@example.com', + ) + """ + + def testDomainListItemSubscriptionHistoryInnerAdministrator(self): + """Test DomainListItemSubscriptionHistoryInnerAdministrator""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_usage.py b/test/test_domain_list_item_usage.py new file mode 100644 index 0000000..c86b3c6 --- /dev/null +++ b/test/test_domain_list_item_usage.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_usage import DomainListItemUsage + +class TestDomainListItemUsage(unittest.TestCase): + """DomainListItemUsage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemUsage: + """Test DomainListItemUsage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemUsage` + """ + model = DomainListItemUsage() + if include_optional: + return DomainListItemUsage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214 + ) + else: + return DomainListItemUsage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + ) + """ + + def testDomainListItemUsage(self): + """Test DomainListItemUsage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_item_users_info_inner.py b/test/test_domain_list_item_users_info_inner.py new file mode 100644 index 0000000..f1afb94 --- /dev/null +++ b/test/test_domain_list_item_users_info_inner.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_item_users_info_inner import DomainListItemUsersInfoInner + +class TestDomainListItemUsersInfoInner(unittest.TestCase): + """DomainListItemUsersInfoInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListItemUsersInfoInner: + """Test DomainListItemUsersInfoInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListItemUsersInfoInner` + """ + model = DomainListItemUsersInfoInner() + if include_optional: + return DomainListItemUsersInfoInner( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + cluster_administrator = False, + last_login = '2026-03-16T08:22:19Z', + teams = 2 + ) + else: + return DomainListItemUsersInfoInner( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + cluster_administrator = False, + last_login = '2026-03-16T08:22:19Z', + teams = 2, + ) + """ + + def testDomainListItemUsersInfoInner(self): + """Test DomainListItemUsersInfoInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_list_usage.py b/test/test_domain_list_usage.py new file mode 100644 index 0000000..fb67108 --- /dev/null +++ b/test/test_domain_list_usage.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_list_usage import DomainListUsage + +class TestDomainListUsage(unittest.TestCase): + """DomainListUsage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainListUsage: + """Test DomainListUsage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainListUsage` + """ + model = DomainListUsage() + if include_optional: + return DomainListUsage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + reserved_cores = 214 + ) + else: + return DomainListUsage( + active_instances = 2, + image_bytes = 239380613, + cores = 8, + instances = 2, + ram = 10240, + gpu = 1, + ) + """ + + def testDomainListUsage(self): + """Test DomainListUsage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_options.py b/test/test_domain_options.py index 7a62e9b..956bdc0 100644 --- a/test/test_domain_options.py +++ b/test/test_domain_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.domain_options import DomainOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.domain_options import DomainOptions class TestDomainOptions(unittest.TestCase): """DomainOptions unit test stubs""" @@ -28,21 +26,23 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> DomainOptions: """Test DomainOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.domain_options.DomainOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `DomainOptions` + """ + model = DomainOptions() + if include_optional: return DomainOptions( - totp_required = True, - trial_extension = corellium_api.models.trial_extension.TrialExtension( + totp_required = True, + trial_extension = corellium.models.trial_extension_v1.TrialExtensionV1( duration = 1.337, reason = '', denied = True, - denied_reason = '', ), - snapshot_sharing_permissions = corellium_api.models.snapshot_sharing_permissions.SnapshotSharingPermissions( + denied_reason = '', ), + snapshot_sharing_permissions = corellium.models.snapshot_sharing_permissions.SnapshotSharingPermissions( cloud_enabled = True, domain_enabled = True, public_link = True, @@ -50,14 +50,15 @@ def make_instance(self, include_optional): password_public_link = True, email_invite = True, ) ) - else : + else: return DomainOptions( ) + """ def testDomainOptions(self): """Test DomainOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_domain_software.py b/test/test_domain_software.py new file mode 100644 index 0000000..b51916c --- /dev/null +++ b/test/test_domain_software.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_software import DomainSoftware + +class TestDomainSoftware(unittest.TestCase): + """DomainSoftware unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainSoftware: + """Test DomainSoftware + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainSoftware` + """ + model = DomainSoftware() + if include_optional: + return DomainSoftware( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + flavor = 'iphone17a', + description = 'iPhone Air', + model = 'iPhone18,4', + platform = 't8101', + has_product_image = True, + os_version = '17.5', + os_build = '21F79', + filename = 'iPhone18,4_17.5_21F79_Restore.ipsw', + size = 7516192768, + release_date = '2026-03-14T09:12:47Z', + upload_date = '2026-03-17T11:41:05Z', + download_url = 'https://example.com/firmware/iPhone18,4_17.5_21F79_Restore.ipsw?signature=' + ) + else: + return DomainSoftware( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + flavor = 'iphone17a', + description = 'iPhone Air', + model = 'iPhone18,4', + platform = 't8101', + has_product_image = True, + os_version = '17.5', + os_build = '21F79', + filename = 'iPhone18,4_17.5_21F79_Restore.ipsw', + size = 7516192768, + release_date = '2026-03-14T09:12:47Z', + upload_date = '2026-03-17T11:41:05Z', + download_url = 'https://example.com/firmware/iPhone18,4_17.5_21F79_Restore.ipsw?signature=', + ) + """ + + def testDomainSoftware(self): + """Test DomainSoftware""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_software_list.py b/test/test_domain_software_list.py new file mode 100644 index 0000000..d123ff4 --- /dev/null +++ b/test/test_domain_software_list.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_software_list import DomainSoftwareList + +class TestDomainSoftwareList(unittest.TestCase): + """DomainSoftwareList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainSoftwareList: + """Test DomainSoftwareList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainSoftwareList` + """ + model = DomainSoftwareList() + if include_optional: + return DomainSoftwareList( + results = [ + corellium.models.domain_software.DomainSoftware( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + flavor = 'iphone17a', + description = 'iPhone Air', + model = 'iPhone18,4', + platform = 't8101', + has_product_image = True, + os_version = '17.5', + os_build = '21F79', + filename = 'iPhone18,4_17.5_21F79_Restore.ipsw', + size = 7516192768, + release_date = '2026-03-14T09:12:47Z', + upload_date = '2026-03-17T11:41:05Z', + download_url = 'https://example.com/firmware/iPhone18,4_17.5_21F79_Restore.ipsw?signature=', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return DomainSoftwareList( + results = [ + corellium.models.domain_software.DomainSoftware( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + flavor = 'iphone17a', + description = 'iPhone Air', + model = 'iPhone18,4', + platform = 't8101', + has_product_image = True, + os_version = '17.5', + os_build = '21F79', + filename = 'iPhone18,4_17.5_21F79_Restore.ipsw', + size = 7516192768, + release_date = '2026-03-14T09:12:47Z', + upload_date = '2026-03-17T11:41:05Z', + download_url = 'https://example.com/firmware/iPhone18,4_17.5_21F79_Restore.ipsw?signature=', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testDomainSoftwareList(self): + """Test DomainSoftwareList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_v1_api.py b/test/test_domain_v1_api.py new file mode 100644 index 0000000..1a1b8a0 --- /dev/null +++ b/test/test_domain_v1_api.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.domain_v1_api import DomainV1Api + + +class TestDomainV1Api(unittest.TestCase): + """DomainV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = DomainV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_create_domain_welcome_message(self) -> None: + """Test case for v1_create_domain_welcome_message + + Create a welcome message for a domain + """ + pass + + def test_v1_delete_domain_welcome_message(self) -> None: + """Test case for v1_delete_domain_welcome_message + + Delete the welcome message for the authenticated user's domain + """ + pass + + def test_v1_get_domain_welcome_message(self) -> None: + """Test case for v1_get_domain_welcome_message + + Get the welcome message for the authenticated user's domain + """ + pass + + def test_v1_update_domain_welcome_message(self) -> None: + """Test case for v1_update_domain_welcome_message + + Update a welcome message for a domain + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_welcome_message_response.py b/test/test_domain_welcome_message_response.py new file mode 100644 index 0000000..6dbb45b --- /dev/null +++ b/test/test_domain_welcome_message_response.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_welcome_message_response import DomainWelcomeMessageResponse + +class TestDomainWelcomeMessageResponse(unittest.TestCase): + """DomainWelcomeMessageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainWelcomeMessageResponse: + """Test DomainWelcomeMessageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainWelcomeMessageResponse` + """ + model = DomainWelcomeMessageResponse() + if include_optional: + return DomainWelcomeMessageResponse( + identifier = 'b10bd74a-a906-46b9-a4f3-a45cccdc2576', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + message = 'Welcome to Acme Corp! Get started by creating your first device.', + enabled = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return DomainWelcomeMessageResponse( + identifier = 'b10bd74a-a906-46b9-a4f3-a45cccdc2576', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + message = 'Welcome to Acme Corp! Get started by creating your first device.', + enabled = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testDomainWelcomeMessageResponse(self): + """Test DomainWelcomeMessageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_welcome_message_response_v1.py b/test/test_domain_welcome_message_response_v1.py new file mode 100644 index 0000000..d4c389b --- /dev/null +++ b/test/test_domain_welcome_message_response_v1.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.domain_welcome_message_response_v1 import DomainWelcomeMessageResponseV1 + +class TestDomainWelcomeMessageResponseV1(unittest.TestCase): + """DomainWelcomeMessageResponseV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainWelcomeMessageResponseV1: + """Test DomainWelcomeMessageResponseV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainWelcomeMessageResponseV1` + """ + model = DomainWelcomeMessageResponseV1() + if include_optional: + return DomainWelcomeMessageResponseV1( + identifier = '', + domain = '', + message = '', + created_at = '', + updated_at = '' + ) + else: + return DomainWelcomeMessageResponseV1( + identifier = '', + domain = '', + message = '', + created_at = '', + updated_at = '', + ) + """ + + def testDomainWelcomeMessageResponseV1(self): + """Test DomainWelcomeMessageResponseV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_invites_body.py b/test/test_edit_invites_body.py new file mode 100644 index 0000000..b385700 --- /dev/null +++ b/test/test_edit_invites_body.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.edit_invites_body import EditInvitesBody + +class TestEditInvitesBody(unittest.TestCase): + """EditInvitesBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EditInvitesBody: + """Test EditInvitesBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EditInvitesBody` + """ + model = EditInvitesBody() + if include_optional: + return EditInvitesBody( + ids = ["5ac8f0be-616d-45b9-b0af-e586fc65ad19"], + changes = corellium.models.edit_invites_body_changes.EditInvitesBody_changes( + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ), ) + ) + else: + return EditInvitesBody( + ids = ["5ac8f0be-616d-45b9-b0af-e586fc65ad19"], + changes = corellium.models.edit_invites_body_changes.EditInvitesBody_changes( + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ), ), + ) + """ + + def testEditInvitesBody(self): + """Test EditInvitesBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_invites_body_changes.py b/test/test_edit_invites_body_changes.py new file mode 100644 index 0000000..435121a --- /dev/null +++ b/test/test_edit_invites_body_changes.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.edit_invites_body_changes import EditInvitesBodyChanges + +class TestEditInvitesBodyChanges(unittest.TestCase): + """EditInvitesBodyChanges unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EditInvitesBodyChanges: + """Test EditInvitesBodyChanges + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EditInvitesBodyChanges` + """ + model = EditInvitesBodyChanges() + if include_optional: + return EditInvitesBodyChanges( + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ) + ) + else: + return EditInvitesBodyChanges( + ) + """ + + def testEditInvitesBodyChanges(self): + """Test EditInvitesBodyChanges""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_enable_btrace_body.py b/test/test_enable_btrace_body.py new file mode 100644 index 0000000..d741e69 --- /dev/null +++ b/test/test_enable_btrace_body.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.enable_btrace_body import EnableBtraceBody + +class TestEnableBtraceBody(unittest.TestCase): + """EnableBtraceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnableBtraceBody: + """Test EnableBtraceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnableBtraceBody` + """ + model = EnableBtraceBody() + if include_optional: + return EnableBtraceBody( + ranges = [["0xfffffff007c88000","0xfffffff007d1c000"]] + ) + else: + return EnableBtraceBody( + ) + """ + + def testEnableBtraceBody(self): + """Test EnableBtraceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_enable_netdump_body.py b/test/test_enable_netdump_body.py new file mode 100644 index 0000000..562f121 --- /dev/null +++ b/test/test_enable_netdump_body.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.enable_netdump_body import EnableNetdumpBody + +class TestEnableNetdumpBody(unittest.TestCase): + """EnableNetdumpBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnableNetdumpBody: + """Test EnableNetdumpBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnableNetdumpBody` + """ + model = EnableNetdumpBody() + if include_optional: + return EnableNetdumpBody( + port_ranges = ["1024-65535"], + src_ports = ["443"], + dst_ports = ["80","443"], + ports = ["80","443"], + protocols = ["tcp","udp"], + processes = ["Safari"], + hosts = ["192.0.2.10"] + ) + else: + return EnableNetdumpBody( + ) + """ + + def testEnableNetdumpBody(self): + """Test EnableNetdumpBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_enable_sslsplit_body.py b/test/test_enable_sslsplit_body.py new file mode 100644 index 0000000..d43a454 --- /dev/null +++ b/test/test_enable_sslsplit_body.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.enable_sslsplit_body import EnableSslsplitBody + +class TestEnableSslsplitBody(unittest.TestCase): + """EnableSslsplitBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnableSslsplitBody: + """Test EnableSslsplitBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnableSslsplitBody` + """ + model = EnableSslsplitBody() + if include_optional: + return EnableSslsplitBody( + truncate_pcap = True + ) + else: + return EnableSslsplitBody( + ) + """ + + def testEnableSslsplitBody(self): + """Test EnableSslsplitBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ensure_domain_settings_body.py b/test/test_ensure_domain_settings_body.py new file mode 100644 index 0000000..a26f320 --- /dev/null +++ b/test/test_ensure_domain_settings_body.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ensure_domain_settings_body import EnsureDomainSettingsBody + +class TestEnsureDomainSettingsBody(unittest.TestCase): + """EnsureDomainSettingsBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnsureDomainSettingsBody: + """Test EnsureDomainSettingsBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnsureDomainSettingsBody` + """ + model = EnsureDomainSettingsBody() + if include_optional: + return EnsureDomainSettingsBody( + fqdn = 'acme.corellium.com', + name = 'acme', + cores = 12, + password = '', + password_if_empty = '', + config = { + 'key' : null + }, + admin_user = corellium.models.ensure_domain_settings_body_admin_user.EnsureDomainSettingsBody_adminUser( + username = 'jane.doe', + email = 'jane.doe@example.com', + label = 'Jane Doe', + billing_url = 'https://billing.example.com/portal', ) + ) + else: + return EnsureDomainSettingsBody( + ) + """ + + def testEnsureDomainSettingsBody(self): + """Test EnsureDomainSettingsBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ensure_domain_settings_body_admin_user.py b/test/test_ensure_domain_settings_body_admin_user.py new file mode 100644 index 0000000..1e160d5 --- /dev/null +++ b/test/test_ensure_domain_settings_body_admin_user.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ensure_domain_settings_body_admin_user import EnsureDomainSettingsBodyAdminUser + +class TestEnsureDomainSettingsBodyAdminUser(unittest.TestCase): + """EnsureDomainSettingsBodyAdminUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnsureDomainSettingsBodyAdminUser: + """Test EnsureDomainSettingsBodyAdminUser + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnsureDomainSettingsBodyAdminUser` + """ + model = EnsureDomainSettingsBodyAdminUser() + if include_optional: + return EnsureDomainSettingsBodyAdminUser( + username = 'jane.doe', + email = 'jane.doe@example.com', + label = 'Jane Doe', + billing_url = 'https://billing.example.com/portal' + ) + else: + return EnsureDomainSettingsBodyAdminUser( + ) + """ + + def testEnsureDomainSettingsBodyAdminUser(self): + """Test EnsureDomainSettingsBodyAdminUser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ensure_domain_settings_response.py b/test/test_ensure_domain_settings_response.py new file mode 100644 index 0000000..a16c754 --- /dev/null +++ b/test/test_ensure_domain_settings_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ensure_domain_settings_response import EnsureDomainSettingsResponse + +class TestEnsureDomainSettingsResponse(unittest.TestCase): + """EnsureDomainSettingsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnsureDomainSettingsResponse: + """Test EnsureDomainSettingsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnsureDomainSettingsResponse` + """ + model = EnsureDomainSettingsResponse() + if include_optional: + return EnsureDomainSettingsResponse( + created = False, + identifier = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + user = corellium.models.ensure_domain_settings_response_user.EnsureDomainSettingsResponse_user( + identifier = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + created = False, ) + ) + else: + return EnsureDomainSettingsResponse( + created = False, + identifier = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + user = corellium.models.ensure_domain_settings_response_user.EnsureDomainSettingsResponse_user( + identifier = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + created = False, ), + ) + """ + + def testEnsureDomainSettingsResponse(self): + """Test EnsureDomainSettingsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ensure_domain_settings_response_user.py b/test/test_ensure_domain_settings_response_user.py new file mode 100644 index 0000000..6c193d4 --- /dev/null +++ b/test/test_ensure_domain_settings_response_user.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ensure_domain_settings_response_user import EnsureDomainSettingsResponseUser + +class TestEnsureDomainSettingsResponseUser(unittest.TestCase): + """EnsureDomainSettingsResponseUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnsureDomainSettingsResponseUser: + """Test EnsureDomainSettingsResponseUser + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnsureDomainSettingsResponseUser` + """ + model = EnsureDomainSettingsResponseUser() + if include_optional: + return EnsureDomainSettingsResponseUser( + identifier = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + created = False + ) + else: + return EnsureDomainSettingsResponseUser( + identifier = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + created = False, + ) + """ + + def testEnsureDomainSettingsResponseUser(self): + """Test EnsureDomainSettingsResponseUser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_extended_firmware_asset_info.py b/test/test_extended_firmware_asset_info.py index 2491baa..45b6179 100644 --- a/test/test_extended_firmware_asset_info.py +++ b/test/test_extended_firmware_asset_info.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.extended_firmware_asset_info import ExtendedFirmwareAssetInfo class TestExtendedFirmwareAssetInfo(unittest.TestCase): """ExtendedFirmwareAssetInfo unit test stubs""" @@ -28,35 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ExtendedFirmwareAssetInfo: """Test ExtendedFirmwareAssetInfo - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.extended_firmware_asset_info.ExtendedFirmwareAssetInfo() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ExtendedFirmwareAssetInfo` + """ + model = ExtendedFirmwareAssetInfo() + if include_optional: return ExtendedFirmwareAssetInfo( - firmwares = [ - '' - ], - instances = [ - '' - ] + firmwares = ["firmware.ipsw"], + instances = ["f7f9832a-f824-416f-a5ea-4adfe34754b5"] ) - else : + else: return ExtendedFirmwareAssetInfo( - firmwares = [ - '' - ], - instances = [ - '' - ], + firmwares = ["firmware.ipsw"], + instances = ["f7f9832a-f824-416f-a5ea-4adfe34754b5"], ) + """ def testExtendedFirmwareAssetInfo(self): """Test ExtendedFirmwareAssetInfo""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_extended_firmware_asset_info_v1.py b/test/test_extended_firmware_asset_info_v1.py new file mode 100644 index 0000000..0def89b --- /dev/null +++ b/test/test_extended_firmware_asset_info_v1.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.extended_firmware_asset_info_v1 import ExtendedFirmwareAssetInfoV1 + +class TestExtendedFirmwareAssetInfoV1(unittest.TestCase): + """ExtendedFirmwareAssetInfoV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtendedFirmwareAssetInfoV1: + """Test ExtendedFirmwareAssetInfoV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtendedFirmwareAssetInfoV1` + """ + model = ExtendedFirmwareAssetInfoV1() + if include_optional: + return ExtendedFirmwareAssetInfoV1( + firmwares = [ + '' + ], + instances = [ + '' + ] + ) + else: + return ExtendedFirmwareAssetInfoV1( + firmwares = [ + '' + ], + instances = [ + '' + ], + ) + """ + + def testExtendedFirmwareAssetInfoV1(self): + """Test ExtendedFirmwareAssetInfoV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_extension.py b/test/test_extension.py index fd28628..6e6ad7b 100644 --- a/test/test_extension.py +++ b/test/test_extension.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.extension import Extension # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.extension import Extension class TestExtension(unittest.TestCase): """Extension unit test stubs""" @@ -28,32 +26,48 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Extension: """Test Extension - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.extension.Extension() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Extension` + """ + model = Extension() + if include_optional: return Extension( - identifier = '', - enabled = True, - created_at = '', - updated_at = '', - image_id = '', - state = '', + id = 'rpi4b', + enabled = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + state = 'deleting', flavors = [ - None + { + 'key' : null + } ] ) - else : + else: return Extension( + id = 'rpi4b', + enabled = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + state = 'deleting', + flavors = [ + { + 'key' : null + } + ], ) + """ def testExtension(self): """Test Extension""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_extension_flavor.py b/test/test_extension_flavor.py new file mode 100644 index 0000000..b9e24b3 --- /dev/null +++ b/test/test_extension_flavor.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.extension_flavor import ExtensionFlavor + +class TestExtensionFlavor(unittest.TestCase): + """ExtensionFlavor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtensionFlavor: + """Test ExtensionFlavor + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtensionFlavor` + """ + model = ExtensionFlavor() + if include_optional: + return ExtensionFlavor( + type = 'iot', + flavor = 'Raspberry Pi 4B', + flavor_id = 'rpi4b', + product = 'rpi4b', + cores = 4, + ram = 4096, + supports_gdb = True, + supports_serial_console = True, + supports_preset_boot_options = True + ) + else: + return ExtensionFlavor( + ) + """ + + def testExtensionFlavor(self): + """Test ExtensionFlavor""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_extension_list.py b/test/test_extension_list.py new file mode 100644 index 0000000..1ffc3ba --- /dev/null +++ b/test/test_extension_list.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.extension_list import ExtensionList + +class TestExtensionList(unittest.TestCase): + """ExtensionList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtensionList: + """Test ExtensionList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtensionList` + """ + model = ExtensionList() + if include_optional: + return ExtensionList( + results = [ + corellium.models.extension.Extension( + id = 'rpi4b', + enabled = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + state = 'deleting', + flavors = [ + { + 'key' : null + } + ], ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return ExtensionList( + results = [ + corellium.models.extension.Extension( + id = 'rpi4b', + enabled = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + state = 'deleting', + flavors = [ + { + 'key' : null + } + ], ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testExtensionList(self): + """Test ExtensionList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_extension_v1.py b/test/test_extension_v1.py new file mode 100644 index 0000000..37d5a16 --- /dev/null +++ b/test/test_extension_v1.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.extension_v1 import ExtensionV1 + +class TestExtensionV1(unittest.TestCase): + """ExtensionV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtensionV1: + """Test ExtensionV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtensionV1` + """ + model = ExtensionV1() + if include_optional: + return ExtensionV1( + identifier = '', + enabled = True, + created_at = '', + updated_at = '', + image_id = '', + state = '', + flavors = [ + None + ] + ) + else: + return ExtensionV1( + ) + """ + + def testExtensionV1(self): + """Test ExtensionV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_extensions_api.py b/test/test_extensions_api.py new file mode 100644 index 0000000..bee2cef --- /dev/null +++ b/test/test_extensions_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.extensions_api import ExtensionsApi + + +class TestExtensionsApi(unittest.TestCase): + """ExtensionsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ExtensionsApi() + + def tearDown(self) -> None: + pass + + def test_v3_delete_extension(self) -> None: + """Test case for v3_delete_extension + + Delete an existing extension + """ + pass + + def test_v3_get_extension_by_id(self) -> None: + """Test case for v3_get_extension_by_id + + Get extension by ID + """ + pass + + def test_v3_list_extensions(self) -> None: + """Test case for v3_list_extensions + + List all extensions + """ + pass + + def test_v3_load_extension(self) -> None: + """Test case for v3_load_extension + + Load an extension + """ + pass + + def test_v3_parse_extension_json(self) -> None: + """Test case for v3_parse_extension_json + + Validates extension.json + """ + pass + + def test_v3_update_extension(self) -> None: + """Test case for v3_update_extension + + Update an existing extension + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_extensions_v1_api.py b/test/test_extensions_v1_api.py new file mode 100644 index 0000000..76bf045 --- /dev/null +++ b/test/test_extensions_v1_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.extensions_v1_api import ExtensionsV1Api + + +class TestExtensionsV1Api(unittest.TestCase): + """ExtensionsV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = ExtensionsV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_delete_extension(self) -> None: + """Test case for v1_delete_extension + + Delete an existing extension + """ + pass + + def test_v1_get_extension_by_id(self) -> None: + """Test case for v1_get_extension_by_id + + Get extension by id + """ + pass + + def test_v1_get_extensions(self) -> None: + """Test case for v1_get_extensions + + Get all extensions + """ + pass + + def test_v1_load_extension(self) -> None: + """Test case for v1_load_extension + + Load an extension + """ + pass + + def test_v1_parse_extension_json(self) -> None: + """Test case for v1_parse_extension_json + + Validates extension.json + """ + pass + + def test_v1_update_extension(self) -> None: + """Test case for v1_update_extension + + Update an existing extension + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_external_services_api.py b/test/test_external_services_api.py new file mode 100644 index 0000000..fd10d38 --- /dev/null +++ b/test/test_external_services_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.external_services_api import ExternalServicesApi + + +class TestExternalServicesApi(unittest.TestCase): + """ExternalServicesApi unit test stubs""" + + def setUp(self) -> None: + self.api = ExternalServicesApi() + + def tearDown(self) -> None: + pass + + def test_delete_external_service(self) -> None: + """Test case for delete_external_service + + Proxy a DELETE request to an external service + """ + pass + + def test_get_external_service(self) -> None: + """Test case for get_external_service + + Proxy a GET request to an external service + """ + pass + + def test_patch_external_service(self) -> None: + """Test case for patch_external_service + + Proxy a PATCH request to an external service + """ + pass + + def test_post_external_service(self) -> None: + """Test case for post_external_service + + Proxy a POST request to an external service + """ + pass + + def test_put_external_service(self) -> None: + """Test case for put_external_service + + Proxy a PUT request to an external service + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_features.py b/test/test_features.py index 8a77dc8..5932443 100644 --- a/test/test_features.py +++ b/test/test_features.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.features import Features # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.features import Features class TestFeatures(unittest.TestCase): """Features unit test stubs""" @@ -28,43 +26,46 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Features: """Test Features - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.features.Features() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Features` + """ + model = Features() + if include_optional: return Features( - apps = True, - connect = True, - console = True, - coretrace = True, - device_control = True, - device_delete = True, - files = True, - frida = True, - images = True, - messaging = True, - netmon = True, - network = True, - port_forwarding = True, - power_management = True, - profile = True, - sensors = True, - settings = True, - snapshots = True, - strace = True, + apps = True, + connect = True, + console = True, + core_trace = True, + device_control = True, + device_delete = True, + files = True, + frida = True, + images = True, + messaging = True, + netmon = True, + network = True, + port_forwarding = True, + power_management = True, + profile = True, + sensors = True, + settings = True, + snapshots = True, + strace = True, system = True ) - else : + else: return Features( ) + """ def testFeatures(self): """Test Features""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_fetch_firmware_assets_body.py b/test/test_fetch_firmware_assets_body.py new file mode 100644 index 0000000..731b602 --- /dev/null +++ b/test/test_fetch_firmware_assets_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.fetch_firmware_assets_body import FetchFirmwareAssetsBody + +class TestFetchFirmwareAssetsBody(unittest.TestCase): + """FetchFirmwareAssetsBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FetchFirmwareAssetsBody: + """Test FetchFirmwareAssetsBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FetchFirmwareAssetsBody` + """ + model = FetchFirmwareAssetsBody() + if include_optional: + return FetchFirmwareAssetsBody( + asset_urls = ["https://example.com/fcs-keys/ExampleKeyA="] + ) + else: + return FetchFirmwareAssetsBody( + asset_urls = ["https://example.com/fcs-keys/ExampleKeyA="], + ) + """ + + def testFetchFirmwareAssetsBody(self): + """Test FetchFirmwareAssetsBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_fetch_firmware_assets_response.py b/test/test_fetch_firmware_assets_response.py new file mode 100644 index 0000000..92d556b --- /dev/null +++ b/test/test_fetch_firmware_assets_response.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.fetch_firmware_assets_response import FetchFirmwareAssetsResponse + +class TestFetchFirmwareAssetsResponse(unittest.TestCase): + """FetchFirmwareAssetsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FetchFirmwareAssetsResponse: + """Test FetchFirmwareAssetsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FetchFirmwareAssetsResponse` + """ + model = FetchFirmwareAssetsResponse() + if include_optional: + return FetchFirmwareAssetsResponse( + added = ["https://example.com/firmware/asset.ipsw"], + existing = ["https://example.com/firmware/asset.ipsw"], + failed = [ + corellium.models.fetch_firmware_assets_response_failed_inner.FetchFirmwareAssetsResponse_failed_inner( + url = 'https://example.com/firmware/asset.ipsw', + error = '404 Not Found', ) + ] + ) + else: + return FetchFirmwareAssetsResponse( + added = ["https://example.com/firmware/asset.ipsw"], + existing = ["https://example.com/firmware/asset.ipsw"], + failed = [ + corellium.models.fetch_firmware_assets_response_failed_inner.FetchFirmwareAssetsResponse_failed_inner( + url = 'https://example.com/firmware/asset.ipsw', + error = '404 Not Found', ) + ], + ) + """ + + def testFetchFirmwareAssetsResponse(self): + """Test FetchFirmwareAssetsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_fetch_firmware_assets_response_failed_inner.py b/test/test_fetch_firmware_assets_response_failed_inner.py new file mode 100644 index 0000000..68ae975 --- /dev/null +++ b/test/test_fetch_firmware_assets_response_failed_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.fetch_firmware_assets_response_failed_inner import FetchFirmwareAssetsResponseFailedInner + +class TestFetchFirmwareAssetsResponseFailedInner(unittest.TestCase): + """FetchFirmwareAssetsResponseFailedInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FetchFirmwareAssetsResponseFailedInner: + """Test FetchFirmwareAssetsResponseFailedInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FetchFirmwareAssetsResponseFailedInner` + """ + model = FetchFirmwareAssetsResponseFailedInner() + if include_optional: + return FetchFirmwareAssetsResponseFailedInner( + url = 'https://example.com/firmware/asset.ipsw', + error = '404 Not Found' + ) + else: + return FetchFirmwareAssetsResponseFailedInner( + url = 'https://example.com/firmware/asset.ipsw', + error = '404 Not Found', + ) + """ + + def testFetchFirmwareAssetsResponseFailedInner(self): + """Test FetchFirmwareAssetsResponseFailedInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_changes.py b/test/test_file_changes.py index 5e3948a..1c33c1c 100644 --- a/test/test_file_changes.py +++ b/test/test_file_changes.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.file_changes import FileChanges # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.file_changes import FileChanges class TestFileChanges(unittest.TestCase): """FileChanges unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FileChanges: """Test FileChanges - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.file_changes.FileChanges() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `FileChanges` + """ + model = FileChanges() + if include_optional: return FileChanges( - path = '', - mode = 1.337, - uid = 1.337, + path = '', + mode = 1.337, + uid = 1.337, gid = 1.337 ) - else : + else: return FileChanges( ) + """ def testFileChanges(self): """Test FileChanges""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_firmware.py b/test/test_firmware.py index 8183e13..d461319 100644 --- a/test/test_firmware.py +++ b/test/test_firmware.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.firmware import Firmware # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.firmware import Firmware class TestFirmware(unittest.TestCase): """Firmware unit test stubs""" @@ -28,38 +26,52 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Firmware: """Test Firmware - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.firmware.Firmware() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Firmware` + """ + model = Firmware() + if include_optional: return Firmware( - version = '', - buildid = '', - android_flavor = '', - api_version = '', - sha256sum = '', - sha1sum = '', - md5sum = '', - size = 56, - unique_id = '', - metadata = None, - releasedate = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - uploaddate = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - orig_url = '', - filename = '' + model = ["iPhone12,1","iPhone12,3"], + firmware_assets = ["https://example.com/firmware-assets/asset.bin"], + filename = 'firmware.ipsw', + type = 'ios', + size = 7838404608, + url = 'https://example.com/firmware.ipsw', + version = '17.5', + build_id = '21F79', + md5sum = '5d41402abc4b2a76b9719d911017c592', + sha1sum = 'aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d', + sha256sum = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + corellium_checksum = 'sha256$1048576$2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + release_date = '2026-05-22T13:58:34.000Z', + upload_date = '2026-05-22T13:58:34.000Z', + metadata = {"variants":["domain"]}, + unique_id = 'acme-fw-0001', + android_flavor = 'ranchu', + api_version = '34', + rooted = True, + installed = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' ) - else : + else: return Firmware( + model = ["iPhone12,1","iPhone12,3"], + filename = 'firmware.ipsw', + size = 7838404608, + version = '17.5', ) + """ def testFirmware(self): """Test Firmware""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_firmware_asset.py b/test/test_firmware_asset.py index 12c0dc6..d55947e 100644 --- a/test/test_firmware_asset.py +++ b/test/test_firmware_asset.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.firmware_asset import FirmwareAsset # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.firmware_asset import FirmwareAsset class TestFirmwareAsset(unittest.TestCase): """FirmwareAsset unit test stubs""" @@ -28,37 +26,40 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> FirmwareAsset: """Test FirmwareAsset - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.firmware_asset.FirmwareAsset() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `FirmwareAsset` + """ + model = FirmwareAsset() + if include_optional: return FirmwareAsset( - domain = '', - url = '', - payload = '', - size = 1.337, - md5sum = '', - sha1sum = '', - sha256sum = '', - uploaddate = '', - created_at = '', - updated_at = '' + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + url = 'https://example.com/firmware-assets/asset.bin', + payload = 'aGVsbG8gd29ybGQ=', + size = 324, + md5sum = '5d41402abc4b2a76b9719d911017c592', + sha1sum = 'aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d', + sha256sum = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + upload_date = '2026-05-22T13:58:34.000Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' ) - else : + else: return FirmwareAsset( - domain = '', - url = '', - payload = '', - size = 1.337, + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + url = 'https://example.com/firmware-assets/asset.bin', + payload = 'aGVsbG8gd29ybGQ=', + size = 324, ) + """ def testFirmwareAsset(self): """Test FirmwareAsset""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_firmware_asset_filter.py b/test/test_firmware_asset_filter.py new file mode 100644 index 0000000..6fefeb1 --- /dev/null +++ b/test/test_firmware_asset_filter.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_asset_filter import FirmwareAssetFilter + +class TestFirmwareAssetFilter(unittest.TestCase): + """FirmwareAssetFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareAssetFilter: + """Test FirmwareAssetFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareAssetFilter` + """ + model = FirmwareAssetFilter() + if include_optional: + return FirmwareAssetFilter( + url = 'https://example.com/firmware-assets/asset.bin', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba' + ) + else: + return FirmwareAssetFilter( + ) + """ + + def testFirmwareAssetFilter(self): + """Test FirmwareAssetFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_asset_list.py b/test/test_firmware_asset_list.py new file mode 100644 index 0000000..c46ed01 --- /dev/null +++ b/test/test_firmware_asset_list.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_asset_list import FirmwareAssetList + +class TestFirmwareAssetList(unittest.TestCase): + """FirmwareAssetList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareAssetList: + """Test FirmwareAssetList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareAssetList` + """ + model = FirmwareAssetList() + if include_optional: + return FirmwareAssetList( + results = [ + corellium.models.firmware_asset.FirmwareAsset( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + url = 'https://example.com/firmware-assets/asset.bin', + payload = 'aGVsbG8gd29ybGQ=', + size = 324, + md5sum = '5d41402abc4b2a76b9719d911017c592', + sha1sum = 'aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d', + sha256sum = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + upload_date = '2026-05-22T13:58:34.000Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return FirmwareAssetList( + results = [ + corellium.models.firmware_asset.FirmwareAsset( + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + url = 'https://example.com/firmware-assets/asset.bin', + payload = 'aGVsbG8gd29ybGQ=', + size = 324, + md5sum = '5d41402abc4b2a76b9719d911017c592', + sha1sum = 'aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d', + sha256sum = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + upload_date = '2026-05-22T13:58:34.000Z', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testFirmwareAssetList(self): + """Test FirmwareAssetList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_asset_v1.py b/test/test_firmware_asset_v1.py new file mode 100644 index 0000000..9c9c009 --- /dev/null +++ b/test/test_firmware_asset_v1.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_asset_v1 import FirmwareAssetV1 + +class TestFirmwareAssetV1(unittest.TestCase): + """FirmwareAssetV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareAssetV1: + """Test FirmwareAssetV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareAssetV1` + """ + model = FirmwareAssetV1() + if include_optional: + return FirmwareAssetV1( + domain = '', + url = '', + payload = '', + size = 1.337, + md5sum = '', + sha1sum = '', + sha256sum = '', + uploaddate = '', + created_at = '', + updated_at = '' + ) + else: + return FirmwareAssetV1( + domain = '', + url = '', + payload = '', + size = 1.337, + ) + """ + + def testFirmwareAssetV1(self): + """Test FirmwareAssetV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_device.py b/test/test_firmware_device.py new file mode 100644 index 0000000..75cb575 --- /dev/null +++ b/test/test_firmware_device.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_device import FirmwareDevice + +class TestFirmwareDevice(unittest.TestCase): + """FirmwareDevice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareDevice: + """Test FirmwareDevice + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareDevice` + """ + model = FirmwareDevice() + if include_optional: + return FirmwareDevice( + type = 'ios', + model = 'iPhone13,2', + name = 'iPhone 12', + platform = 't8101', + hw_model = 'd53gap', + bdid = '12', + cpid = '33025', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return FirmwareDevice( + model = 'iPhone13,2', + name = 'iPhone 12', + ) + """ + + def testFirmwareDevice(self): + """Test FirmwareDevice""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_device_list.py b/test/test_firmware_device_list.py new file mode 100644 index 0000000..52a564c --- /dev/null +++ b/test/test_firmware_device_list.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_device_list import FirmwareDeviceList + +class TestFirmwareDeviceList(unittest.TestCase): + """FirmwareDeviceList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareDeviceList: + """Test FirmwareDeviceList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareDeviceList` + """ + model = FirmwareDeviceList() + if include_optional: + return FirmwareDeviceList( + results = [ + corellium.models.firmware_device.FirmwareDevice( + type = 'ios', + model = 'iPhone13,2', + name = 'iPhone 12', + platform = 't8101', + hw_model = 'd53gap', + bdid = '12', + cpid = '33025', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return FirmwareDeviceList( + results = [ + corellium.models.firmware_device.FirmwareDevice( + type = 'ios', + model = 'iPhone13,2', + name = 'iPhone 12', + platform = 't8101', + hw_model = 'd53gap', + bdid = '12', + cpid = '33025', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testFirmwareDeviceList(self): + """Test FirmwareDeviceList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_info_device.py b/test/test_firmware_info_device.py new file mode 100644 index 0000000..e6acae9 --- /dev/null +++ b/test/test_firmware_info_device.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_info_device import FirmwareInfoDevice + +class TestFirmwareInfoDevice(unittest.TestCase): + """FirmwareInfoDevice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareInfoDevice: + """Test FirmwareInfoDevice + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareInfoDevice` + """ + model = FirmwareInfoDevice() + if include_optional: + return FirmwareInfoDevice( + flavor = 'iphone11', + firmwares = [ + { + 'key' : null + } + ] + ) + else: + return FirmwareInfoDevice( + ) + """ + + def testFirmwareInfoDevice(self): + """Test FirmwareInfoDevice""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_info_device_firmwares_inner.py b/test/test_firmware_info_device_firmwares_inner.py new file mode 100644 index 0000000..d917528 --- /dev/null +++ b/test/test_firmware_info_device_firmwares_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_info_device_firmwares_inner import FirmwareInfoDeviceFirmwaresInner + +class TestFirmwareInfoDeviceFirmwaresInner(unittest.TestCase): + """FirmwareInfoDeviceFirmwaresInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareInfoDeviceFirmwaresInner: + """Test FirmwareInfoDeviceFirmwaresInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareInfoDeviceFirmwaresInner` + """ + model = FirmwareInfoDeviceFirmwaresInner() + if include_optional: + return FirmwareInfoDeviceFirmwaresInner( + filename = 'iPhone12,1_16.4_20E247_Restore.ipsw', + version = '16.4', + build_id = '20E247', + url = 'https://example.com/download/iPhone12,1_16.4_20E247_Restore.ipsw', + orig_url = 'https://example.com/vendor/iPhone12,1_16.4_20E247_Restore.ipsw' + ) + else: + return FirmwareInfoDeviceFirmwaresInner( + ) + """ + + def testFirmwareInfoDeviceFirmwaresInner(self): + """Test FirmwareInfoDeviceFirmwaresInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_list.py b/test/test_firmware_list.py new file mode 100644 index 0000000..ccb9a07 --- /dev/null +++ b/test/test_firmware_list.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_list import FirmwareList + +class TestFirmwareList(unittest.TestCase): + """FirmwareList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareList: + """Test FirmwareList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareList` + """ + model = FirmwareList() + if include_optional: + return FirmwareList( + results = [ + corellium.models.firmware.Firmware( + model = ["iPhone12,1","iPhone12,3"], + firmware_assets = ["https://example.com/firmware-assets/asset.bin"], + filename = 'firmware.ipsw', + type = 'ios', + size = 7838404608, + url = 'https://example.com/firmware.ipsw', + version = '17.5', + build_id = '21F79', + md5sum = '5d41402abc4b2a76b9719d911017c592', + sha1sum = 'aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d', + sha256sum = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + corellium_checksum = 'sha256$1048576$2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + release_date = '2026-05-22T13:58:34.000Z', + upload_date = '2026-05-22T13:58:34.000Z', + metadata = {"variants":["domain"]}, + unique_id = 'acme-fw-0001', + android_flavor = 'ranchu', + api_version = '34', + rooted = True, + installed = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return FirmwareList( + results = [ + corellium.models.firmware.Firmware( + model = ["iPhone12,1","iPhone12,3"], + firmware_assets = ["https://example.com/firmware-assets/asset.bin"], + filename = 'firmware.ipsw', + type = 'ios', + size = 7838404608, + url = 'https://example.com/firmware.ipsw', + version = '17.5', + build_id = '21F79', + md5sum = '5d41402abc4b2a76b9719d911017c592', + sha1sum = 'aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d', + sha256sum = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + corellium_checksum = 'sha256$1048576$2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824', + release_date = '2026-05-22T13:58:34.000Z', + upload_date = '2026-05-22T13:58:34.000Z', + metadata = {"variants":["domain"]}, + unique_id = 'acme-fw-0001', + android_flavor = 'ranchu', + api_version = '34', + rooted = True, + installed = True, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testFirmwareList(self): + """Test FirmwareList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_service_api.py b/test/test_firmware_service_api.py new file mode 100644 index 0000000..b84fe4e --- /dev/null +++ b/test/test_firmware_service_api.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.firmware_service_api import FirmwareServiceApi + + +class TestFirmwareServiceApi(unittest.TestCase): + """FirmwareServiceApi unit test stubs""" + + def setUp(self) -> None: + self.api = FirmwareServiceApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_firmware_assets(self) -> None: + """Test case for v3_create_firmware_assets + + Add firmware assets + """ + pass + + def test_v3_delete_firmware(self) -> None: + """Test case for v3_delete_firmware + + Delete a firmware + """ + pass + + def test_v3_delete_firmware_asset(self) -> None: + """Test case for v3_delete_firmware_asset + + Delete a firmware asset + """ + pass + + def test_v3_get_firmware_asset_extended(self) -> None: + """Test case for v3_get_firmware_asset_extended + + Get extended firmware asset info + """ + pass + + def test_v3_get_firmware_service_config(self) -> None: + """Test case for v3_get_firmware_service_config + + Get firmware service configuration + """ + pass + + def test_v3_list_firmware_assets(self) -> None: + """Test case for v3_list_firmware_assets + + List firmware assets + """ + pass + + def test_v3_list_firmware_devices(self) -> None: + """Test case for v3_list_firmware_devices + + List firmware service devices + """ + pass + + def test_v3_list_firmwares(self) -> None: + """Test case for v3_list_firmwares + + List firmwares + """ + pass + + def test_v3_patch_firmware_service_config(self) -> None: + """Test case for v3_patch_firmware_service_config + + Update firmware service configuration + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_service_config.py b/test/test_firmware_service_config.py new file mode 100644 index 0000000..373b26e --- /dev/null +++ b/test/test_firmware_service_config.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_service_config import FirmwareServiceConfig + +class TestFirmwareServiceConfig(unittest.TestCase): + """FirmwareServiceConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareServiceConfig: + """Test FirmwareServiceConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareServiceConfig` + """ + model = FirmwareServiceConfig() + if include_optional: + return FirmwareServiceConfig( + cache_firmware = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + cluster_firmware_assets = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + fallback_original_url = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + fetch_firmware_assets = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + should_download = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + download_ipsw_filters = corellium.models.firmware_service_config_download_ipsw_filters.FirmwareServiceConfig_downloadIpswFilters( + value = [ + { + 'key' : null + } + ], + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ) + ) + else: + return FirmwareServiceConfig( + cache_firmware = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + cluster_firmware_assets = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + fallback_original_url = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + fetch_firmware_assets = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + should_download = corellium.models.firmware_service_config_cache_firmware.FirmwareServiceConfig_cacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + download_ipsw_filters = corellium.models.firmware_service_config_download_ipsw_filters.FirmwareServiceConfig_downloadIpswFilters( + value = [ + { + 'key' : null + } + ], + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean', ), + ) + """ + + def testFirmwareServiceConfig(self): + """Test FirmwareServiceConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_service_config_cache_firmware.py b/test/test_firmware_service_config_cache_firmware.py new file mode 100644 index 0000000..aa95314 --- /dev/null +++ b/test/test_firmware_service_config_cache_firmware.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_service_config_cache_firmware import FirmwareServiceConfigCacheFirmware + +class TestFirmwareServiceConfigCacheFirmware(unittest.TestCase): + """FirmwareServiceConfigCacheFirmware unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareServiceConfigCacheFirmware: + """Test FirmwareServiceConfigCacheFirmware + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareServiceConfigCacheFirmware` + """ + model = FirmwareServiceConfigCacheFirmware() + if include_optional: + return FirmwareServiceConfigCacheFirmware( + value = True, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean' + ) + else: + return FirmwareServiceConfigCacheFirmware( + value = True, + ) + """ + + def testFirmwareServiceConfigCacheFirmware(self): + """Test FirmwareServiceConfigCacheFirmware""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_service_config_download_ipsw_filters.py b/test/test_firmware_service_config_download_ipsw_filters.py new file mode 100644 index 0000000..94c0004 --- /dev/null +++ b/test/test_firmware_service_config_download_ipsw_filters.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_service_config_download_ipsw_filters import FirmwareServiceConfigDownloadIpswFilters + +class TestFirmwareServiceConfigDownloadIpswFilters(unittest.TestCase): + """FirmwareServiceConfigDownloadIpswFilters unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareServiceConfigDownloadIpswFilters: + """Test FirmwareServiceConfigDownloadIpswFilters + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareServiceConfigDownloadIpswFilters` + """ + model = FirmwareServiceConfigDownloadIpswFilters() + if include_optional: + return FirmwareServiceConfigDownloadIpswFilters( + value = [ + { + 'key' : null + } + ], + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean' + ) + else: + return FirmwareServiceConfigDownloadIpswFilters( + value = [ + { + 'key' : null + } + ], + ) + """ + + def testFirmwareServiceConfigDownloadIpswFilters(self): + """Test FirmwareServiceConfigDownloadIpswFilters""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_service_config_value.py b/test/test_firmware_service_config_value.py new file mode 100644 index 0000000..0bb8eb4 --- /dev/null +++ b/test/test_firmware_service_config_value.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_service_config_value import FirmwareServiceConfigValue + +class TestFirmwareServiceConfigValue(unittest.TestCase): + """FirmwareServiceConfigValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareServiceConfigValue: + """Test FirmwareServiceConfigValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareServiceConfigValue` + """ + model = FirmwareServiceConfigValue() + if include_optional: + return FirmwareServiceConfigValue( + value = None, + component = 'checkbox', + title = 'Cache firmware', + description = 'Cache firmwares in /var/ipsw', + type = 'boolean' + ) + else: + return FirmwareServiceConfigValue( + ) + """ + + def testFirmwareServiceConfigValue(self): + """Test FirmwareServiceConfigValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_service_configuration.py b/test/test_firmware_service_configuration.py new file mode 100644 index 0000000..d5e221b --- /dev/null +++ b/test/test_firmware_service_configuration.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_service_configuration import FirmwareServiceConfiguration + +class TestFirmwareServiceConfiguration(unittest.TestCase): + """FirmwareServiceConfiguration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareServiceConfiguration: + """Test FirmwareServiceConfiguration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareServiceConfiguration` + """ + model = FirmwareServiceConfiguration() + if include_optional: + return FirmwareServiceConfiguration( + cache_firmware = True, + cluster_firmware_assets = True, + fallback_original_url = True, + fetch_firmware_assets = True, + should_download = True, + download_ipsw_filters = [ + corellium.models.ipsw_filter.IpswFilter( + version = corellium.models.ipsw_version_constraint.IpswVersionConstraint( + lt = '', + le = '', + gt = '', + ge = '', + eq = '', ), + device = corellium.models.ipsw_device_constraint.IpswDeviceConstraint( + product = '', ), + exclude = True, + include = True, ) + ] + ) + else: + return FirmwareServiceConfiguration( + ) + """ + + def testFirmwareServiceConfiguration(self): + """Test FirmwareServiceConfiguration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_service_settings.py b/test/test_firmware_service_settings.py new file mode 100644 index 0000000..aefb644 --- /dev/null +++ b/test/test_firmware_service_settings.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_service_settings import FirmwareServiceSettings + +class TestFirmwareServiceSettings(unittest.TestCase): + """FirmwareServiceSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareServiceSettings: + """Test FirmwareServiceSettings + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareServiceSettings` + """ + model = FirmwareServiceSettings() + if include_optional: + return FirmwareServiceSettings( + cache_firmware = False, + cluster_firmware_assets = False, + fallback_original_url = False, + fetch_firmware_assets = True, + should_download = True, + download_ipsw_filters = [{"device":{"product":"iPhone16,.*"},"include":true}] + ) + else: + return FirmwareServiceSettings( + cache_firmware = False, + cluster_firmware_assets = False, + fallback_original_url = False, + fetch_firmware_assets = True, + should_download = True, + download_ipsw_filters = [{"device":{"product":"iPhone16,.*"},"include":true}], + ) + """ + + def testFirmwareServiceSettings(self): + """Test FirmwareServiceSettings""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firmware_v1.py b/test/test_firmware_v1.py new file mode 100644 index 0000000..bcf05f6 --- /dev/null +++ b/test/test_firmware_v1.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.firmware_v1 import FirmwareV1 + +class TestFirmwareV1(unittest.TestCase): + """FirmwareV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirmwareV1: + """Test FirmwareV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirmwareV1` + """ + model = FirmwareV1() + if include_optional: + return FirmwareV1( + version = '', + buildid = '', + android_flavor = '', + api_version = '', + sha256sum = '', + sha1sum = '', + md5sum = '', + size = 56, + unique_id = '', + metadata = corellium.models.metadata.metadata(), + releasedate = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + uploaddate = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + url = '', + orig_url = '', + filename = '' + ) + else: + return FirmwareV1( + ) + """ + + def testFirmwareV1(self): + """Test FirmwareV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_frame.py b/test/test_flavor_frame.py new file mode 100644 index 0000000..40970ca --- /dev/null +++ b/test/test_flavor_frame.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.flavor_frame import FlavorFrame + +class TestFlavorFrame(unittest.TestCase): + """FlavorFrame unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorFrame: + """Test FlavorFrame + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorFrame` + """ + model = FlavorFrame() + if include_optional: + return FlavorFrame( + url = 'frames/iphone8.png', + width = 300, + height = 611.7106773823191, + inner = corellium.models.flavor_frame_inner.FlavorFrame_inner( + top = 75.43053960964409, + left = 21.010332950631458, + width = 258.3237657864524, + height = 459.47187141216995, ), + home = {"top":544.8909299655568,"left":125.71756601607349,"width":48.220436280137775,"height":48.220436280137775}, + dimensions = corellium.models.flavor_frame_dimensions.FlavorFrame_dimensions( + width = 750, + height = 1334, ), + scale = 2 + ) + else: + return FlavorFrame( + url = 'frames/iphone8.png', + width = 300, + height = 611.7106773823191, + inner = corellium.models.flavor_frame_inner.FlavorFrame_inner( + top = 75.43053960964409, + left = 21.010332950631458, + width = 258.3237657864524, + height = 459.47187141216995, ), + home = {"top":544.8909299655568,"left":125.71756601607349,"width":48.220436280137775,"height":48.220436280137775}, + dimensions = corellium.models.flavor_frame_dimensions.FlavorFrame_dimensions( + width = 750, + height = 1334, ), + scale = 2, + ) + """ + + def testFlavorFrame(self): + """Test FlavorFrame""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_frame_dimensions.py b/test/test_flavor_frame_dimensions.py new file mode 100644 index 0000000..e522916 --- /dev/null +++ b/test/test_flavor_frame_dimensions.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.flavor_frame_dimensions import FlavorFrameDimensions + +class TestFlavorFrameDimensions(unittest.TestCase): + """FlavorFrameDimensions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorFrameDimensions: + """Test FlavorFrameDimensions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorFrameDimensions` + """ + model = FlavorFrameDimensions() + if include_optional: + return FlavorFrameDimensions( + width = 750, + height = 1334 + ) + else: + return FlavorFrameDimensions( + width = 750, + height = 1334, + ) + """ + + def testFlavorFrameDimensions(self): + """Test FlavorFrameDimensions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_frame_home.py b/test/test_flavor_frame_home.py new file mode 100644 index 0000000..53d36ea --- /dev/null +++ b/test/test_flavor_frame_home.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.flavor_frame_home import FlavorFrameHome + +class TestFlavorFrameHome(unittest.TestCase): + """FlavorFrameHome unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorFrameHome: + """Test FlavorFrameHome + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorFrameHome` + """ + model = FlavorFrameHome() + if include_optional: + return FlavorFrameHome( + top = 75.43053960964409, + left = 21.010332950631458, + width = 258.3237657864524, + height = 459.47187141216995 + ) + else: + return FlavorFrameHome( + top = 75.43053960964409, + left = 21.010332950631458, + width = 258.3237657864524, + height = 459.47187141216995, + ) + """ + + def testFlavorFrameHome(self): + """Test FlavorFrameHome""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_frame_inner.py b/test/test_flavor_frame_inner.py new file mode 100644 index 0000000..e0524b3 --- /dev/null +++ b/test/test_flavor_frame_inner.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.flavor_frame_inner import FlavorFrameInner + +class TestFlavorFrameInner(unittest.TestCase): + """FlavorFrameInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorFrameInner: + """Test FlavorFrameInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorFrameInner` + """ + model = FlavorFrameInner() + if include_optional: + return FlavorFrameInner( + top = 75.43053960964409, + left = 21.010332950631458, + width = 258.3237657864524, + height = 459.47187141216995 + ) + else: + return FlavorFrameInner( + top = 75.43053960964409, + left = 21.010332950631458, + width = 258.3237657864524, + height = 459.47187141216995, + ) + """ + + def testFlavorFrameInner(self): + """Test FlavorFrameInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavors_api.py b/test/test_flavors_api.py new file mode 100644 index 0000000..ec5e30e --- /dev/null +++ b/test/test_flavors_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.flavors_api import FlavorsApi + + +class TestFlavorsApi(unittest.TestCase): + """FlavorsApi unit test stubs""" + + def setUp(self) -> None: + self.api = FlavorsApi() + + def tearDown(self) -> None: + pass + + def test_v3_get_frame(self) -> None: + """Test case for v3_get_frame + + Get the device frame layout for a model + """ + pass + + def test_v3_get_frame_image(self) -> None: + """Test case for v3_get_frame_image + + Get the device frame image for a model + """ + pass + + def test_v3_get_product_image(self) -> None: + """Test case for v3_get_product_image + + Get the product image for a model + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_assessments_by_instance_id500_response.py b/test/test_get_assessments_by_instance_id500_response.py deleted file mode 100644 index fbc3ff6..0000000 --- a/test/test_get_assessments_by_instance_id500_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.get_assessments_by_instance_id500_response import GetAssessmentsByInstanceId500Response # noqa: E501 -from corellium_api.rest import ApiException - -class TestGetAssessmentsByInstanceId500Response(unittest.TestCase): - """GetAssessmentsByInstanceId500Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test GetAssessmentsByInstanceId500Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.get_assessments_by_instance_id500_response.GetAssessmentsByInstanceId500Response() # noqa: E501 - if include_optional : - return GetAssessmentsByInstanceId500Response( - error = '' - ) - else : - return GetAssessmentsByInstanceId500Response( - ) - - def testGetAssessmentsByInstanceId500Response(self): - """Test GetAssessmentsByInstanceId500Response""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_get_firmware_info_body.py b/test/test_get_firmware_info_body.py new file mode 100644 index 0000000..15123eb --- /dev/null +++ b/test/test_get_firmware_info_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.get_firmware_info_body import GetFirmwareInfoBody + +class TestGetFirmwareInfoBody(unittest.TestCase): + """GetFirmwareInfoBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetFirmwareInfoBody: + """Test GetFirmwareInfoBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetFirmwareInfoBody` + """ + model = GetFirmwareInfoBody() + if include_optional: + return GetFirmwareInfoBody( + password = '', + extended = True + ) + else: + return GetFirmwareInfoBody( + ) + """ + + def testGetFirmwareInfoBody(self): + """Test GetFirmwareInfoBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_interconnects_response.py b/test/test_get_interconnects_response.py index d38a721..efe30c0 100644 --- a/test/test_get_interconnects_response.py +++ b/test/test_get_interconnects_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.get_interconnects_response import GetInterconnectsResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.get_interconnects_response import GetInterconnectsResponse class TestGetInterconnectsResponse(unittest.TestCase): """GetInterconnectsResponse unit test stubs""" @@ -28,16 +26,18 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> GetInterconnectsResponse: """Test GetInterconnectsResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.get_interconnects_response.GetInterconnectsResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `GetInterconnectsResponse` + """ + model = GetInterconnectsResponse() + if include_optional: return GetInterconnectsResponse( results = [ - corellium_api.models.interconnect_response.InterconnectResponse( + corellium.models.interconnect_response.InterconnectResponse( id = '', name = '', protocol = '', @@ -45,26 +45,27 @@ def make_instance(self, include_optional): project = '', status = '', interfaces = [ - corellium_api.models.instance_interface.InstanceInterface( + corellium.models.instance_interface.InstanceInterface( device_id = '', interface_id = '', ) ], created_at = '', updated_at = '', ) - ], - count = 1.337, - total = 1.337, - limit = 1.337, + ], + count = 1.337, + total = 1.337, + limit = 1.337, offset = 1.337 ) - else : + else: return GetInterconnectsResponse( ) + """ def testGetInterconnectsResponse(self): """Test GetInterconnectsResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_get_invite_by_token_body.py b/test/test_get_invite_by_token_body.py new file mode 100644 index 0000000..f94f077 --- /dev/null +++ b/test/test_get_invite_by_token_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.get_invite_by_token_body import GetInviteByTokenBody + +class TestGetInviteByTokenBody(unittest.TestCase): + """GetInviteByTokenBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetInviteByTokenBody: + """Test GetInviteByTokenBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetInviteByTokenBody` + """ + model = GetInviteByTokenBody() + if include_optional: + return GetInviteByTokenBody( + token = '' + ) + else: + return GetInviteByTokenBody( + token = '', + ) + """ + + def testGetInviteByTokenBody(self): + """Test GetInviteByTokenBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_reset_link_info_body.py b/test/test_get_reset_link_info_body.py new file mode 100644 index 0000000..0f26939 --- /dev/null +++ b/test/test_get_reset_link_info_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.get_reset_link_info_body import GetResetLinkInfoBody + +class TestGetResetLinkInfoBody(unittest.TestCase): + """GetResetLinkInfoBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetResetLinkInfoBody: + """Test GetResetLinkInfoBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetResetLinkInfoBody` + """ + model = GetResetLinkInfoBody() + if include_optional: + return GetResetLinkInfoBody( + token = '' + ) + else: + return GetResetLinkInfoBody( + token = '', + ) + """ + + def testGetResetLinkInfoBody(self): + """Test GetResetLinkInfoBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_storage_response.py b/test/test_get_storage_response.py new file mode 100644 index 0000000..21bc7da --- /dev/null +++ b/test/test_get_storage_response.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.get_storage_response import GetStorageResponse + +class TestGetStorageResponse(unittest.TestCase): + """GetStorageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetStorageResponse: + """Test GetStorageResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetStorageResponse` + """ + model = GetStorageResponse() + if include_optional: + return GetStorageResponse( + results = [ + corellium.models.media_store_v1.MediaStoreV1( + identifier = '', + device = '', + fs_type = '', + fs_uuid = '', + label = '', + serial = '', + vendor = '', + model = '', + mount_policy = '', + created_at = '', + updated_at = '', ) + ], + count = 1.337, + total = 1.337, + limit = 1.337, + offset = 1.337 + ) + else: + return GetStorageResponse( + ) + """ + + def testGetStorageResponse(self): + """Test GetStorageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpio_state_definition.py b/test/test_gpio_state_definition.py index c001126..6853f42 100644 --- a/test/test_gpio_state_definition.py +++ b/test/test_gpio_state_definition.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.gpio_state_definition import GpioStateDefinition # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.gpio_state_definition import GpioStateDefinition class TestGpioStateDefinition(unittest.TestCase): """GpioStateDefinition unit test stubs""" @@ -28,35 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> GpioStateDefinition: """Test GpioStateDefinition - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.gpio_state_definition.GpioStateDefinition() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `GpioStateDefinition` + """ + model = GpioStateDefinition() + if include_optional: return GpioStateDefinition( - bit_count = 1.337, - banks = [ - [ - 0 - ] - ] + bit_count = 8, + banks = [[1,0,0,0,0,0,0,0]] ) - else : + else: return GpioStateDefinition( - bit_count = 1.337, - banks = [ - [ - 0 - ] - ], + bit_count = 8, + banks = [[1,0,0,0,0,0,0,0]], ) + """ def testGpioStateDefinition(self): """Test GpioStateDefinition""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_gpio_state_definition_banks_inner_inner.py b/test/test_gpio_state_definition_banks_inner_inner.py new file mode 100644 index 0000000..823da0a --- /dev/null +++ b/test/test_gpio_state_definition_banks_inner_inner.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.gpio_state_definition_banks_inner_inner import GpioStateDefinitionBanksInnerInner + +class TestGpioStateDefinitionBanksInnerInner(unittest.TestCase): + """GpioStateDefinitionBanksInnerInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GpioStateDefinitionBanksInnerInner: + """Test GpioStateDefinitionBanksInnerInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GpioStateDefinitionBanksInnerInner` + """ + model = GpioStateDefinitionBanksInnerInner() + if include_optional: + return GpioStateDefinitionBanksInnerInner( + ) + else: + return GpioStateDefinitionBanksInnerInner( + ) + """ + + def testGpioStateDefinitionBanksInnerInner(self): + """Test GpioStateDefinitionBanksInnerInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpio_state_definition_v1.py b/test/test_gpio_state_definition_v1.py new file mode 100644 index 0000000..131f8d3 --- /dev/null +++ b/test/test_gpio_state_definition_v1.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.gpio_state_definition_v1 import GpioStateDefinitionV1 + +class TestGpioStateDefinitionV1(unittest.TestCase): + """GpioStateDefinitionV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GpioStateDefinitionV1: + """Test GpioStateDefinitionV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GpioStateDefinitionV1` + """ + model = GpioStateDefinitionV1() + if include_optional: + return GpioStateDefinitionV1( + bit_count = 1.337, + banks = [ + [ + 0 + ] + ] + ) + else: + return GpioStateDefinitionV1( + bit_count = 1.337, + banks = [ + [ + 0 + ] + ], + ) + """ + + def testGpioStateDefinitionV1(self): + """Test GpioStateDefinitionV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gpios_state.py b/test/test_gpios_state.py index fc7d077..1b143f4 100644 --- a/test/test_gpios_state.py +++ b/test/test_gpios_state.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.gpios_state import GpiosState # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.gpios_state import GpiosState class TestGpiosState(unittest.TestCase): """GpiosState unit test stubs""" @@ -28,44 +26,35 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> GpiosState: """Test GpiosState - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.gpios_state.GpiosState() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `GpiosState` + """ + model = GpiosState() + if include_optional: return GpiosState( - led = corellium_api.models.gpio_state_definition.GpioStateDefinition( - bit_count = 1.337, - banks = [ - [ - 0 - ] - ], ), - button = corellium_api.models.gpio_state_definition.GpioStateDefinition( - bit_count = 1.337, - banks = [ - [ - 0 - ] - ], ), - switch = corellium_api.models.gpio_state_definition.GpioStateDefinition( - bit_count = 1.337, - banks = [ - [ - 0 - ] - ], ) + led = corellium.models.gpio_state_definition.GpioStateDefinition( + bit_count = 8, + banks = [[1,0,0,0,0,0,0,0]], ), + button = corellium.models.gpio_state_definition.GpioStateDefinition( + bit_count = 8, + banks = [[1,0,0,0,0,0,0,0]], ), + switch = corellium.models.gpio_state_definition.GpioStateDefinition( + bit_count = 8, + banks = [[1,0,0,0,0,0,0,0]], ) ) - else : + else: return GpiosState( ) + """ def testGpiosState(self): """Test GpiosState""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_gpios_state_v1.py b/test/test_gpios_state_v1.py new file mode 100644 index 0000000..0cb403d --- /dev/null +++ b/test/test_gpios_state_v1.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.gpios_state_v1 import GpiosStateV1 + +class TestGpiosStateV1(unittest.TestCase): + """GpiosStateV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GpiosStateV1: + """Test GpiosStateV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GpiosStateV1` + """ + model = GpiosStateV1() + if include_optional: + return GpiosStateV1( + led = corellium.models.gpio_state_definition_v1.GpioStateDefinitionV1( + bit_count = 1.337, + banks = [ + [ + 0 + ] + ], ), + button = corellium.models.gpio_state_definition_v1.GpioStateDefinitionV1( + bit_count = 1.337, + banks = [ + [ + 0 + ] + ], ), + switch = corellium.models.gpio_state_definition_v1.GpioStateDefinitionV1( + bit_count = 1.337, + banks = [ + [ + 0 + ] + ], ) + ) + else: + return GpiosStateV1( + ) + """ + + def testGpiosStateV1(self): + """Test GpiosStateV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_grant_trial_request_response.py b/test/test_grant_trial_request_response.py deleted file mode 100644 index 8e134cc..0000000 --- a/test/test_grant_trial_request_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.grant_trial_request_response import GrantTrialRequestResponse # noqa: E501 -from corellium_api.rest import ApiException - -class TestGrantTrialRequestResponse(unittest.TestCase): - """GrantTrialRequestResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test GrantTrialRequestResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.grant_trial_request_response.GrantTrialRequestResponse() # noqa: E501 - if include_optional : - return GrantTrialRequestResponse( - code = '' - ) - else : - return GrantTrialRequestResponse( - ) - - def testGrantTrialRequestResponse(self): - """Test GrantTrialRequestResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_hook.py b/test/test_hook.py index d6680c3..e9eff89 100644 --- a/test/test_hook.py +++ b/test/test_hook.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.hook import Hook # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.hook import Hook class TestHook(unittest.TestCase): """Hook unit test stubs""" @@ -28,32 +26,44 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Hook: """Test Hook - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.hook.Hook() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Hook` + """ + model = Hook() + if include_optional: return Hook( - identifier = '', - label = '', - address = '', - patch = '', - patch_type = 'csmfcc', - enabled = True, - created_at = '', - updated_at = '', - instance_id = '' + identifier = '2a1192e8-c7de-4981-bc11-c87fd1f12d13', + label = 'Bypass jailbreak detection', + address = '0x1000042a4', + patch = 'return 0;', + patch_type = 'csmfcc', + enabled = True, + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' ) - else : + else: return Hook( + identifier = '2a1192e8-c7de-4981-bc11-c87fd1f12d13', + label = 'Bypass jailbreak detection', + address = '0x1000042a4', + patch = 'return 0;', + patch_type = 'csmfcc', + enabled = True, + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + """ def testHook(self): """Test Hook""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_hook_list.py b/test/test_hook_list.py new file mode 100644 index 0000000..ba25b91 --- /dev/null +++ b/test/test_hook_list.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.hook_list import HookList + +class TestHookList(unittest.TestCase): + """HookList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HookList: + """Test HookList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HookList` + """ + model = HookList() + if include_optional: + return HookList( + results = [ + corellium.models.hook.Hook( + identifier = '2a1192e8-c7de-4981-bc11-c87fd1f12d13', + label = 'Bypass jailbreak detection', + address = '0x1000042a4', + patch = 'return 0;', + patch_type = 'csmfcc', + enabled = True, + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return HookList( + results = [ + corellium.models.hook.Hook( + identifier = '2a1192e8-c7de-4981-bc11-c87fd1f12d13', + label = 'Bypass jailbreak detection', + address = '0x1000042a4', + patch = 'return 0;', + patch_type = 'csmfcc', + enabled = True, + instance_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testHookList(self): + """Test HookList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hook_patch_type.py b/test/test_hook_patch_type.py new file mode 100644 index 0000000..5d05228 --- /dev/null +++ b/test/test_hook_patch_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.hook_patch_type import HookPatchType + +class TestHookPatchType(unittest.TestCase): + """HookPatchType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHookPatchType(self): + """Test HookPatchType""" + # inst = HookPatchType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hook_v1.py b/test/test_hook_v1.py new file mode 100644 index 0000000..13e8e19 --- /dev/null +++ b/test/test_hook_v1.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.hook_v1 import HookV1 + +class TestHookV1(unittest.TestCase): + """HookV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HookV1: + """Test HookV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HookV1` + """ + model = HookV1() + if include_optional: + return HookV1( + identifier = '', + label = '', + address = '', + patch = '', + patch_type = 'csmfcc', + enabled = True, + created_at = '', + updated_at = '', + instance_id = '' + ) + else: + return HookV1( + ) + """ + + def testHookV1(self): + """Test HookV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hyper_trace_api.py b/test/test_hyper_trace_api.py new file mode 100644 index 0000000..abcc23e --- /dev/null +++ b/test/test_hyper_trace_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.hyper_trace_api import HyperTraceApi + + +class TestHyperTraceApi(unittest.TestCase): + """HyperTraceApi unit test stubs""" + + def setUp(self) -> None: + self.api = HyperTraceApi() + + def tearDown(self) -> None: + pass + + def test_v3_btrace_preauthorize(self) -> None: + """Test case for v3_btrace_preauthorize + + Get a HyperTrace download token + """ + pass + + def test_v3_clear_hyper_trace(self) -> None: + """Test case for v3_clear_hyper_trace + + Clear HyperTrace output + """ + pass + + def test_v3_get_instance_kcrange(self) -> None: + """Test case for v3_get_instance_kcrange + + List kernel extension address ranges + """ + pass + + def test_v3_start_hyper_trace(self) -> None: + """Test case for v3_start_hyper_trace + + Start HyperTrace + """ + pass + + def test_v3_stop_hyper_trace(self) -> None: + """Test case for v3_stop_hyper_trace + + Stop HyperTrace + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hyper_trace_v1_api.py b/test/test_hyper_trace_v1_api.py new file mode 100644 index 0000000..7e68be9 --- /dev/null +++ b/test/test_hyper_trace_v1_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.hyper_trace_v1_api import HyperTraceV1Api + + +class TestHyperTraceV1Api(unittest.TestCase): + """HyperTraceV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = HyperTraceV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_btrace_preauthorize(self) -> None: + """Test case for v1_btrace_preauthorize + + Pre-authorize an btrace download + """ + pass + + def test_v1_clear_hyper_trace(self) -> None: + """Test case for v1_clear_hyper_trace + + Clear HyperTrace logs + """ + pass + + def test_v1_kcrange(self) -> None: + """Test case for v1_kcrange + + Get Kernel extension ranges + """ + pass + + def test_v1_start_hyper_trace(self) -> None: + """Test case for v1_start_hyper_trace + + Start HyperTrace on an instance + """ + pass + + def test_v1_stop_hyper_trace(self) -> None: + """Test case for v1_stop_hyper_trace + + Stop HyperTrace on an instance. + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hypertune_api.py b/test/test_hypertune_api.py new file mode 100644 index 0000000..4fffc89 --- /dev/null +++ b/test/test_hypertune_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.hypertune_api import HypertuneApi + + +class TestHypertuneApi(unittest.TestCase): + """HypertuneApi unit test stubs""" + + def setUp(self) -> None: + self.api = HypertuneApi() + + def tearDown(self) -> None: + pass + + def test_v3_hypertune_hash(self) -> None: + """Test case for v3_hypertune_hash + + Get Hypertune state hash + """ + pass + + def test_v3_hypertune_init(self) -> None: + """Test case for v3_hypertune_init + + Get Hypertune initialization data + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hypertune_hash_response.py b/test/test_hypertune_hash_response.py new file mode 100644 index 0000000..b24b099 --- /dev/null +++ b/test/test_hypertune_hash_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.hypertune_hash_response import HypertuneHashResponse + +class TestHypertuneHashResponse(unittest.TestCase): + """HypertuneHashResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HypertuneHashResponse: + """Test HypertuneHashResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HypertuneHashResponse` + """ + model = HypertuneHashResponse() + if include_optional: + return HypertuneHashResponse( + hash = '' + ) + else: + return HypertuneHashResponse( + hash = '', + ) + """ + + def testHypertuneHashResponse(self): + """Test HypertuneHashResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hypertune_init_response.py b/test/test_hypertune_init_response.py new file mode 100644 index 0000000..0491df7 --- /dev/null +++ b/test/test_hypertune_init_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.hypertune_init_response import HypertuneInitResponse + +class TestHypertuneInitResponse(unittest.TestCase): + """HypertuneInitResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HypertuneInitResponse: + """Test HypertuneInitResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HypertuneInitResponse` + """ + model = HypertuneInitResponse() + if include_optional: + return HypertuneInitResponse( + commit_id = 1.337, + hash = '', + reduced_expression = { + 'key' : null + }, + splits = { + 'key' : null + }, + commit_config = { + 'key' : null + } + ) + else: + return HypertuneInitResponse( + ) + """ + + def testHypertuneInitResponse(self): + """Test HypertuneInitResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hypervisor_hooks_api.py b/test/test_hypervisor_hooks_api.py new file mode 100644 index 0000000..bffbe8b --- /dev/null +++ b/test/test_hypervisor_hooks_api.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.hypervisor_hooks_api import HypervisorHooksApi + + +class TestHypervisorHooksApi(unittest.TestCase): + """HypervisorHooksApi unit test stubs""" + + def setUp(self) -> None: + self.api = HypervisorHooksApi() + + def tearDown(self) -> None: + pass + + def test_v3_clear_hyper_trace_hooks(self) -> None: + """Test case for v3_clear_hyper_trace_hooks + + Stop hypervisor hooks + """ + pass + + def test_v3_create_hook(self) -> None: + """Test case for v3_create_hook + + Create a hypervisor hook for an instance + """ + pass + + def test_v3_delete_hook(self) -> None: + """Test case for v3_delete_hook + + Delete a hypervisor hook + """ + pass + + def test_v3_execute_hyper_trace_hooks(self) -> None: + """Test case for v3_execute_hyper_trace_hooks + + Run hypervisor hooks + """ + pass + + def test_v3_get_hook(self) -> None: + """Test case for v3_get_hook + + Get a hypervisor hook by ID + """ + pass + + def test_v3_list_hooks(self) -> None: + """Test case for v3_list_hooks + + List hypervisor hooks for an instance + """ + pass + + def test_v3_update_hook(self) -> None: + """Test case for v3_update_hook + + Update a hypervisor hook + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_hypervisor_hooks_v1_api.py b/test/test_hypervisor_hooks_v1_api.py new file mode 100644 index 0000000..b0ccbe0 --- /dev/null +++ b/test/test_hypervisor_hooks_v1_api.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.hypervisor_hooks_v1_api import HypervisorHooksV1Api + + +class TestHypervisorHooksV1Api(unittest.TestCase): + """HypervisorHooksV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = HypervisorHooksV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_clear_hyper_trace_hooks(self) -> None: + """Test case for v1_clear_hyper_trace_hooks + + Clear Hooks on an instance + """ + pass + + def test_v1_create_hook(self) -> None: + """Test case for v1_create_hook + + Create hypervisor hook for Instance + """ + pass + + def test_v1_delete_hook(self) -> None: + """Test case for v1_delete_hook + + Delete an existing hypervisor hook + """ + pass + + def test_v1_execute_hyper_trace_hooks(self) -> None: + """Test case for v1_execute_hyper_trace_hooks + + Execute Hooks on an instance + """ + pass + + def test_v1_get_hook_by_id(self) -> None: + """Test case for v1_get_hook_by_id + + Get hypervisor hook by id + """ + pass + + def test_v1_get_hooks(self) -> None: + """Test case for v1_get_hooks + + Get all hypervisor hooks for Instance + """ + pass + + def test_v1_update_hook(self) -> None: + """Test case for v1_update_hook + + Update an existing hypervisor hook + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image.py b/test/test_image.py index c74f310..d324ea9 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.image import Image # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.image import Image class TestImage(unittest.TestCase): """Image unit test stubs""" @@ -28,34 +26,42 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Image: """Test Image - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.image.Image() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Image` + """ + model = Image() + if include_optional: return Image( - status = '', - id = '', - name = '', - type = 'fwbinary', - filename = '', - uniqueid = '', - size = 1.337, - project = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + status = 'active', + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'firmware.ipsw', + type = 'fwbinary', + size = 2147483648, + checksum = '9e107d9d372bb6826bd81d3542a419d6', + corellium_checksum = 'sha256$1048576$e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', + encoding = 'plain', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' ) - else : + else: return Image( - status = '', + status = 'active', + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'firmware.ipsw', + type = 'fwbinary', ) + """ def testImage(self): """Test Image""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_image_creation_options.py b/test/test_image_creation_options.py new file mode 100644 index 0000000..9087b3c --- /dev/null +++ b/test/test_image_creation_options.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_creation_options import ImageCreationOptions + +class TestImageCreationOptions(unittest.TestCase): + """ImageCreationOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageCreationOptions: + """Test ImageCreationOptions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageCreationOptions` + """ + model = ImageCreationOptions() + if include_optional: + return ImageCreationOptions( + type = ' iotfirmware', + encoding = 'plain', + encapsulated = True, + name = '', + full_path = '', + project = '', + instance = '', + file = bytes(b'blah') + ) + else: + return ImageCreationOptions( + type = ' iotfirmware', + encoding = 'plain', + ) + """ + + def testImageCreationOptions(self): + """Test ImageCreationOptions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_encoding.py b/test/test_image_encoding.py new file mode 100644 index 0000000..b6146e3 --- /dev/null +++ b/test/test_image_encoding.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_encoding import ImageEncoding + +class TestImageEncoding(unittest.TestCase): + """ImageEncoding unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testImageEncoding(self): + """Test ImageEncoding""" + # inst = ImageEncoding() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_extended.py b/test/test_image_extended.py new file mode 100644 index 0000000..ff98e91 --- /dev/null +++ b/test/test_image_extended.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_extended import ImageExtended + +class TestImageExtended(unittest.TestCase): + """ImageExtended unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageExtended: + """Test ImageExtended + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageExtended` + """ + model = ImageExtended() + if include_optional: + return ImageExtended( + type = '', + version = '', + buildid = '', + device_ids = [ + '' + ], + board_config = '', + device = corellium.models.image_extended_device.ImageExtendedDevice( + flavor = '', + firmwares = [ + corellium.models.image_firmware.ImageFirmware( + filename = '', + version = '', + buildid = '', + url = '', + orig_url = '', ) + ], ) + ) + else: + return ImageExtended( + ) + """ + + def testImageExtended(self): + """Test ImageExtended""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_extended_device.py b/test/test_image_extended_device.py new file mode 100644 index 0000000..630f3c6 --- /dev/null +++ b/test/test_image_extended_device.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_extended_device import ImageExtendedDevice + +class TestImageExtendedDevice(unittest.TestCase): + """ImageExtendedDevice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageExtendedDevice: + """Test ImageExtendedDevice + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageExtendedDevice` + """ + model = ImageExtendedDevice() + if include_optional: + return ImageExtendedDevice( + flavor = '', + firmwares = [ + corellium.models.image_firmware.ImageFirmware( + filename = '', + version = '', + buildid = '', + url = '', + orig_url = '', ) + ] + ) + else: + return ImageExtendedDevice( + ) + """ + + def testImageExtendedDevice(self): + """Test ImageExtendedDevice""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_firmware.py b/test/test_image_firmware.py new file mode 100644 index 0000000..6ee625b --- /dev/null +++ b/test/test_image_firmware.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_firmware import ImageFirmware + +class TestImageFirmware(unittest.TestCase): + """ImageFirmware unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageFirmware: + """Test ImageFirmware + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageFirmware` + """ + model = ImageFirmware() + if include_optional: + return ImageFirmware( + filename = '', + version = '', + buildid = '', + url = '', + orig_url = '' + ) + else: + return ImageFirmware( + ) + """ + + def testImageFirmware(self): + """Test ImageFirmware""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_firmware_info.py b/test/test_image_firmware_info.py new file mode 100644 index 0000000..a95fe2e --- /dev/null +++ b/test/test_image_firmware_info.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_firmware_info import ImageFirmwareInfo + +class TestImageFirmwareInfo(unittest.TestCase): + """ImageFirmwareInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageFirmwareInfo: + """Test ImageFirmwareInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageFirmwareInfo` + """ + model = ImageFirmwareInfo() + if include_optional: + return ImageFirmwareInfo( + type = 'ios', + version = '16.4', + build_id = '20E247', + device_ids = ["iPhone12,1"], + board_config = 'n104ap', + bdid = 12, + cpid = 32816, + platform = 't8030', + boot_args = { + 'key' : null + }, + variants = ["Customer Erase Install (IPSW)"], + device = { + 'key' : null + } + ) + else: + return ImageFirmwareInfo( + ) + """ + + def testImageFirmwareInfo(self): + """Test ImageFirmwareInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_firmware_info_boot_args.py b/test/test_image_firmware_info_boot_args.py new file mode 100644 index 0000000..68b8c46 --- /dev/null +++ b/test/test_image_firmware_info_boot_args.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_firmware_info_boot_args import ImageFirmwareInfoBootArgs + +class TestImageFirmwareInfoBootArgs(unittest.TestCase): + """ImageFirmwareInfoBootArgs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageFirmwareInfoBootArgs: + """Test ImageFirmwareInfoBootArgs + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageFirmwareInfoBootArgs` + """ + model = ImageFirmwareInfoBootArgs() + if include_optional: + return ImageFirmwareInfoBootArgs( + normal = 'rd=md0 -progress -no-battery nand-enable-reformat=1', + restore = 'rd=md0 -restore -progress' + ) + else: + return ImageFirmwareInfoBootArgs( + ) + """ + + def testImageFirmwareInfoBootArgs(self): + """Test ImageFirmwareInfoBootArgs""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_list.py b/test/test_image_list.py new file mode 100644 index 0000000..b53822c --- /dev/null +++ b/test/test_image_list.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_list import ImageList + +class TestImageList(unittest.TestCase): + """ImageList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageList: + """Test ImageList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageList` + """ + model = ImageList() + if include_optional: + return ImageList( + results = [ + corellium.models.image.Image( + status = 'active', + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'firmware.ipsw', + type = 'fwbinary', + size = 2147483648, + checksum = '9e107d9d372bb6826bd81d3542a419d6', + corellium_checksum = 'sha256$1048576$e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', + encoding = 'plain', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return ImageList( + results = [ + corellium.models.image.Image( + status = 'active', + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'firmware.ipsw', + type = 'fwbinary', + size = 2147483648, + checksum = '9e107d9d372bb6826bd81d3542a419d6', + corellium_checksum = 'sha256$1048576$e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', + encoding = 'plain', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testImageList(self): + """Test ImageList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_type.py b/test/test_image_type.py new file mode 100644 index 0000000..d4d8915 --- /dev/null +++ b/test/test_image_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_type import ImageType + +class TestImageType(unittest.TestCase): + """ImageType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testImageType(self): + """Test ImageType""" + # inst = ImageType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_v1.py b/test/test_image_v1.py new file mode 100644 index 0000000..875e1aa --- /dev/null +++ b/test/test_image_v1.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.image_v1 import ImageV1 + +class TestImageV1(unittest.TestCase): + """ImageV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageV1: + """Test ImageV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageV1` + """ + model = ImageV1() + if include_optional: + return ImageV1( + status = '', + id = '', + identifier = '', + name = '', + type = 'fwbinary', + size = 1.337, + checksum = '', + corellium_checksum = '', + encoding = '', + filename = '', + uniqueid = '', + project = '', + instance = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + extended = corellium.models.image_extended.ImageExtended( + type = '', + version = '', + buildid = '', + device_ids = [ + '' + ], + board_config = '', + device = corellium.models.image_extended_device.ImageExtendedDevice( + flavor = '', + firmwares = [ + corellium.models.image_firmware.ImageFirmware( + filename = '', + version = '', + buildid = '', + url = '', + orig_url = '', ) + ], ), ) + ) + else: + return ImageV1( + ) + """ + + def testImageV1(self): + """Test ImageV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_images_api.py b/test/test_images_api.py new file mode 100644 index 0000000..26f322f --- /dev/null +++ b/test/test_images_api.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.images_api import ImagesApi + + +class TestImagesApi(unittest.TestCase): + """ImagesApi unit test stubs""" + + def setUp(self) -> None: + self.api = ImagesApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_image(self) -> None: + """Test case for v3_create_image + + Create an image + """ + pass + + def test_v3_delete_image(self) -> None: + """Test case for v3_delete_image + + Delete an image + """ + pass + + def test_v3_get_image(self) -> None: + """Test case for v3_get_image + + Get image metadata + """ + pass + + def test_v3_get_image_chunk(self) -> None: + """Test case for v3_get_image_chunk + + Check whether an image chunk was already uploaded + """ + pass + + def test_v3_get_image_firmware_info(self) -> None: + """Test case for v3_get_image_firmware_info + + Get firmware info embedded in an image + """ + pass + + def test_v3_get_install_firmware_status(self) -> None: + """Test case for v3_get_install_firmware_status + + Get install-firmware task status + """ + pass + + def test_v3_install_firmware(self) -> None: + """Test case for v3_install_firmware + + Install firmware cluster-wide + """ + pass + + def test_v3_install_firmware_assets(self) -> None: + """Test case for v3_install_firmware_assets + + Install firmware assets cluster-wide + """ + pass + + def test_v3_list_images(self) -> None: + """Test case for v3_list_images + + List image metadata + """ + pass + + def test_v3_upload_image_chunk(self) -> None: + """Test case for v3_upload_image_chunk + + Upload one chunk of an image file + """ + pass + + def test_v3_upload_image_data(self) -> None: + """Test case for v3_upload_image_data + + Upload image file contents + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_images_v1_api.py b/test/test_images_v1_api.py new file mode 100644 index 0000000..101976f --- /dev/null +++ b/test/test_images_v1_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.images_v1_api import ImagesV1Api + + +class TestImagesV1Api(unittest.TestCase): + """ImagesV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = ImagesV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_get_image(self) -> None: + """Test case for v1_get_image + + Get Image Metadata + """ + pass + + def test_v1_get_images(self) -> None: + """Test case for v1_get_images + + Get all Images Metadata + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_images_v2_api.py b/test/test_images_v2_api.py new file mode 100644 index 0000000..efa9844 --- /dev/null +++ b/test/test_images_v2_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.images_v2_api import ImagesV2Api + + +class TestImagesV2Api(unittest.TestCase): + """ImagesV2Api unit test stubs""" + + def setUp(self) -> None: + self.api = ImagesV2Api() + + def tearDown(self) -> None: + pass + + def test_v1_delete_image(self) -> None: + """Test case for v1_delete_image + + Delete Image + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_input_response.py b/test/test_input_response.py index a445b25..121e1df 100644 --- a/test/test_input_response.py +++ b/test/test_input_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.input_response import InputResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.input_response import InputResponse class TestInputResponse(unittest.TestCase): """InputResponse unit test stubs""" @@ -28,24 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InputResponse: """Test InputResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.input_response.InputResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InputResponse` + """ + model = InputResponse() + if include_optional: return InputResponse( - eta = 1.337 + eta = 250 ) - else : + else: return InputResponse( + eta = 250, ) + """ def testInputResponse(self): """Test InputResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_input_response_v1.py b/test/test_input_response_v1.py new file mode 100644 index 0000000..c42460d --- /dev/null +++ b/test/test_input_response_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.input_response_v1 import InputResponseV1 + +class TestInputResponseV1(unittest.TestCase): + """InputResponseV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InputResponseV1: + """Test InputResponseV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InputResponseV1` + """ + model = InputResponseV1() + if include_optional: + return InputResponseV1( + eta = 1.337 + ) + else: + return InputResponseV1( + ) + """ + + def testInputResponseV1(self): + """Test InputResponseV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_firmware_assets_body.py b/test/test_install_firmware_assets_body.py new file mode 100644 index 0000000..cc9bedf --- /dev/null +++ b/test/test_install_firmware_assets_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.install_firmware_assets_body import InstallFirmwareAssetsBody + +class TestInstallFirmwareAssetsBody(unittest.TestCase): + """InstallFirmwareAssetsBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstallFirmwareAssetsBody: + """Test InstallFirmwareAssetsBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstallFirmwareAssetsBody` + """ + model = InstallFirmwareAssetsBody() + if include_optional: + return InstallFirmwareAssetsBody( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' + ) + else: + return InstallFirmwareAssetsBody( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + ) + """ + + def testInstallFirmwareAssetsBody(self): + """Test InstallFirmwareAssetsBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_firmware_assets_body_v1.py b/test/test_install_firmware_assets_body_v1.py new file mode 100644 index 0000000..bec552c --- /dev/null +++ b/test/test_install_firmware_assets_body_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.install_firmware_assets_body_v1 import InstallFirmwareAssetsBodyV1 + +class TestInstallFirmwareAssetsBodyV1(unittest.TestCase): + """InstallFirmwareAssetsBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstallFirmwareAssetsBodyV1: + """Test InstallFirmwareAssetsBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstallFirmwareAssetsBodyV1` + """ + model = InstallFirmwareAssetsBodyV1() + if include_optional: + return InstallFirmwareAssetsBodyV1( + image_id = '' + ) + else: + return InstallFirmwareAssetsBodyV1( + image_id = '', + ) + """ + + def testInstallFirmwareAssetsBodyV1(self): + """Test InstallFirmwareAssetsBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_firmware_assets_response.py b/test/test_install_firmware_assets_response.py new file mode 100644 index 0000000..cc0a4f1 --- /dev/null +++ b/test/test_install_firmware_assets_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.install_firmware_assets_response import InstallFirmwareAssetsResponse + +class TestInstallFirmwareAssetsResponse(unittest.TestCase): + """InstallFirmwareAssetsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstallFirmwareAssetsResponse: + """Test InstallFirmwareAssetsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstallFirmwareAssetsResponse` + """ + model = InstallFirmwareAssetsResponse() + if include_optional: + return InstallFirmwareAssetsResponse( + message = 'Firmware assets installed successfully.' + ) + else: + return InstallFirmwareAssetsResponse( + message = 'Firmware assets installed successfully.', + ) + """ + + def testInstallFirmwareAssetsResponse(self): + """Test InstallFirmwareAssetsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_firmware_assets_response_v1.py b/test/test_install_firmware_assets_response_v1.py new file mode 100644 index 0000000..1ea9ab7 --- /dev/null +++ b/test/test_install_firmware_assets_response_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.install_firmware_assets_response_v1 import InstallFirmwareAssetsResponseV1 + +class TestInstallFirmwareAssetsResponseV1(unittest.TestCase): + """InstallFirmwareAssetsResponseV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstallFirmwareAssetsResponseV1: + """Test InstallFirmwareAssetsResponseV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstallFirmwareAssetsResponseV1` + """ + model = InstallFirmwareAssetsResponseV1() + if include_optional: + return InstallFirmwareAssetsResponseV1( + message = '' + ) + else: + return InstallFirmwareAssetsResponseV1( + ) + """ + + def testInstallFirmwareAssetsResponseV1(self): + """Test InstallFirmwareAssetsResponseV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_firmware_body.py b/test/test_install_firmware_body.py new file mode 100644 index 0000000..543422e --- /dev/null +++ b/test/test_install_firmware_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.install_firmware_body import InstallFirmwareBody + +class TestInstallFirmwareBody(unittest.TestCase): + """InstallFirmwareBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstallFirmwareBody: + """Test InstallFirmwareBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstallFirmwareBody` + """ + model = InstallFirmwareBody() + if include_optional: + return InstallFirmwareBody( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' + ) + else: + return InstallFirmwareBody( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + ) + """ + + def testInstallFirmwareBody(self): + """Test InstallFirmwareBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_firmware_body_v1.py b/test/test_install_firmware_body_v1.py new file mode 100644 index 0000000..562f1e9 --- /dev/null +++ b/test/test_install_firmware_body_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.install_firmware_body_v1 import InstallFirmwareBodyV1 + +class TestInstallFirmwareBodyV1(unittest.TestCase): + """InstallFirmwareBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstallFirmwareBodyV1: + """Test InstallFirmwareBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstallFirmwareBodyV1` + """ + model = InstallFirmwareBodyV1() + if include_optional: + return InstallFirmwareBodyV1( + image_id = '' + ) + else: + return InstallFirmwareBodyV1( + image_id = '', + ) + """ + + def testInstallFirmwareBodyV1(self): + """Test InstallFirmwareBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_firmware_request.py b/test/test_install_firmware_request.py deleted file mode 100644 index b658197..0000000 --- a/test/test_install_firmware_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.install_firmware_request import InstallFirmwareRequest # noqa: E501 -from corellium_api.rest import ApiException - -class TestInstallFirmwareRequest(unittest.TestCase): - """InstallFirmwareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InstallFirmwareRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.install_firmware_request.InstallFirmwareRequest() # noqa: E501 - if include_optional : - return InstallFirmwareRequest( - image_id = '', - filename = '' - ) - else : - return InstallFirmwareRequest( - image_id = '', - filename = '', - ) - - def testInstallFirmwareRequest(self): - """Test InstallFirmwareRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_install_firmware_response.py b/test/test_install_firmware_response.py index 8f554d1..bffcd93 100644 --- a/test/test_install_firmware_response.py +++ b/test/test_install_firmware_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.install_firmware_response import InstallFirmwareResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.install_firmware_response import InstallFirmwareResponse class TestInstallFirmwareResponse(unittest.TestCase): """InstallFirmwareResponse unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstallFirmwareResponse: """Test InstallFirmwareResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.install_firmware_response.InstallFirmwareResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstallFirmwareResponse` + """ + model = InstallFirmwareResponse() + if include_optional: return InstallFirmwareResponse( - task_id = '', - installed_firmware_url = '' + task_id = '722cdce5-6f71-4f4a-b2b6-c00f11c015f6' ) - else : + else: return InstallFirmwareResponse( + task_id = '722cdce5-6f71-4f4a-b2b6-c00f11c015f6', ) + """ def testInstallFirmwareResponse(self): """Test InstallFirmwareResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_install_firmware_response_v1.py b/test/test_install_firmware_response_v1.py new file mode 100644 index 0000000..2b375ca --- /dev/null +++ b/test/test_install_firmware_response_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.install_firmware_response_v1 import InstallFirmwareResponseV1 + +class TestInstallFirmwareResponseV1(unittest.TestCase): + """InstallFirmwareResponseV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstallFirmwareResponseV1: + """Test InstallFirmwareResponseV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstallFirmwareResponseV1` + """ + model = InstallFirmwareResponseV1() + if include_optional: + return InstallFirmwareResponseV1( + task_id = '', + installed_firmware_url = '' + ) + else: + return InstallFirmwareResponseV1( + ) + """ + + def testInstallFirmwareResponseV1(self): + """Test InstallFirmwareResponseV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_firmware_status_response.py b/test/test_install_firmware_status_response.py new file mode 100644 index 0000000..4f582ac --- /dev/null +++ b/test/test_install_firmware_status_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.install_firmware_status_response import InstallFirmwareStatusResponse + +class TestInstallFirmwareStatusResponse(unittest.TestCase): + """InstallFirmwareStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstallFirmwareStatusResponse: + """Test InstallFirmwareStatusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstallFirmwareStatusResponse` + """ + model = InstallFirmwareStatusResponse() + if include_optional: + return InstallFirmwareStatusResponse( + status = 'in-progress', + installed_firmware_url = 'https://example.com/download/iPhone12,1_16.4_20E247_Restore.ipsw' + ) + else: + return InstallFirmwareStatusResponse( + status = 'in-progress', + ) + """ + + def testInstallFirmwareStatusResponse(self): + """Test InstallFirmwareStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance.py b/test/test_instance.py index 040796b..5869469 100644 --- a/test/test_instance.py +++ b/test/test_instance.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance import Instance # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance import Instance class TestInstance(unittest.TestCase): """Instance unit test stubs""" @@ -28,83 +26,208 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Instance: """Test Instance - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance.Instance() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Instance` + """ + model = Instance() + if include_optional: return Instance( - id = '', - name = '', - key = '', - flavor = '', - type = '', - project = '', - state = 'on', - state_changed = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - started_at = '', - user_task = '', - task_state = '', - error = '', - boot_options = corellium_api.models.instance_boot_options.InstanceBootOptions( - boot_args = '', - restore_boot_args = '', - udid = '', - ecid = '', - random_seed = '', + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'My iPhone 13 Pro', + key = '', + flavor = 'iphone13p', + flavor_name = 'iPhone 13 Pro', + type = 'ios', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + domain_name = 'acme-corp', + state = 'on', + state_changed = '2026-03-16T08:22:19Z', + started_at = '2026-03-16T08:22:19Z', + user_task = 'snapshot', + task_state = 'none', + error = 'Failed to start instance: insufficient capacity', + restore_status = corellium.models.instance_restore_status.InstanceRestoreStatus( + type = '1', + stage = 'download-images', + progress = null, + total_progress = null, + heading = 'Restoring device', + description = 'Extracting firmware components', ), + read_only = corellium.models.instance_read_only_status.InstanceReadOnlyStatus( + read_only_status = 'disabling', ), + boot_options = corellium.models.instance_boot_options.InstanceBootOptions( + boot_args = '-v debug=0x8 keepsyms=1', + restore_boot_args = '-v debug=0x8 keepsyms=1', + udid = '00008030-001A2D423C29802E', + ecid = '0x1a2b3c4d5e6f', + random_seed = 'deadbeefcafebabe', pac = True, aprr = True, - additional_tags = [ - 'kalloc' - ], ), - service_ip = '', - wifi_ip = '', - secondary_ip = '', - services = corellium_api.models.instance_services.InstanceServices( - vpn = corellium_api.models.vpn_definition.VpnDefinition( - proxy = [ - None - ], + cores = 4, + ram = 6144, + additional_tags = ["kalloc"], + kernel = corellium.models.instance_boot_options_kernel.InstanceBootOptionsKernel( + firmware_path = 'kernelcache', ), + pongo = corellium.models.instance_boot_options_pongo.InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576, ), + serial = 'C39ABCDEFGH1', + no_snapshot_mount = False, + kernel_slide = '0x18000000', + cd_hashes = ["a1b2c3d4e5f60718293a4b5c6d7e8f90"], + imei = '359268000000000', + imsi = '310150123456789', + ssid0 = 'CorelliumWiFi', + ssid1 = 'CorelliumWiFi-5G', + wifi_mac = '02:00:00:aa:bb:cc', + model_id = 'SM-G973F', + manufacturer_id = 'samsung', + kernel_patches = 'patch1,patch2', + stop_on_fault = True, + boot_addr = '0x800000000', + tzen = True, + authorized_keys = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFhYmJjY2RkZWVmZmdnaGhpaWpqa2trbGxtbW5ubm9v user@example.com', + v_mmio = [ + corellium.models.instance_boot_options_v_mmio_inner.InstanceBootOptions_vMMIO_inner( + start = '0x9000000', + size = '0x1000', + irq = '33-36', ) + ], + fvp = corellium.models.instance_boot_options_fvp.InstanceBootOptionsFvp( + model_binary = '/usr/local/fvp/bin/FVP_Base_RevC-2xAEMvA', + parameters = {"bp.secure_memory":"false","cluster0.NUM_CORES":"4"}, + data = ["/tmp/data.bin@0x80000000"], + breaks = ["0x80001000"], + dumps = ["/tmp/dump.bin@0x80000000,0x1000"], + cadi_log = 'cadi-log.xml', + cadi_server = 'true', + iris_server = 'true', + iris_log = 'info', + iris_allow_remote = 'true', + iris_port_range = '7000:7010', + iris_port = '7100', + run = 'true', + stat = 'true', + quiet = 'true', + start = '0x80000000', + plugin = '/usr/local/fvp/plugins/ToolsSharedLib.so', + fast_ram = 'fastram.cfg', + save = '/tmp/checkpoint', + restore = '/tmp/checkpoint', + cpi_file = 'cpi.txt', + cycle_limit = '1000000', + cpu_limit = '3600', + time_limit = '3600', + sim_limit = '60', ), ), + service_ip = '10.0.10.5', + wifi_ip = '192.168.1.50', + wifi_mac = '02:00:00:aa:bb:cc', + secondary_ip = '192.168.1.51', + port_adb = '5555', + port_usb = '2222', + port_gdb = '5039', + port_sep_gdb = '5040', + port_cons = '2000', + port_sep_cons = '2001', + port_sys_cons = '2002', + port_usbmuxd = '2003', + port_frida = '27042', + port_sockcap = '2004', + port_model_gw = '2005', + consoles = [ + corellium.models.instance_console.InstanceConsole( + name = 'System Console', + id = 'port-cons', + port = '2000', + hash = '', + info = '', ) + ], + interfaces = [ + corellium.models.instance_interface_status.InstanceInterfaceStatus( + interface_id = 'gpio/0', + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + status = 'attached', ) + ], + services = corellium.models.instance_services.InstanceServices( + vpn = corellium.models.vpn_definition.VpnDefinition( + proxy = [{"devicePort":22,"routerPort":22,"status":"started"}], listeners = [ - None - ], ), ), - panicked = True, - created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - model = '', - fwpackage = '', - os = '', - agent = corellium_api.models.instance_agent_state.InstanceAgentState( - hash = '', - info = '', ), - netmon = corellium_api.models.instance_netmon_state.InstanceNetmonState( - hash = '', - info = '', - enabled = True, ), - netdump = corellium_api.models.instance_netdump_state.InstanceNetdumpState( - hash = '', - info = '', - enabled = True, ), - expose_port = '', - fault = True, - patches = [ - '' - ], - created_by = corellium_api.models.created_by.createdBy( - id = '', - username = '', - label = '', - deleted = True, ) + { + 'key' : null + } + ], ), ), + panicked = False, + created = '2026-03-14T09:12:47Z', + model = 'd63ap', + fw_package = 'https://example.com/firmware.ipsw', + os_version = '17.5', + os_build = '21F79', + agent = corellium.models.instance_agent_state.InstanceAgentState( + hash = '', + info = '', ), + net_mon = corellium.models.instance_netmon_state.InstanceNetmonState( + hash = '', + info = '', + enabled = True, ), + net_dump = corellium.models.instance_netdump_state.InstanceNetdumpState( + hash = '', + info = '', + enabled = True, ), + core_trace = corellium.models.instance_trace_state.InstanceTraceState( + enabled = True, + length = 1048576, + filter = [ + corellium.models.instance_trace_filter.InstanceTraceFilter( + trait = 'pid', + value = '1234', ) + ], ), + hyper_trace = corellium.models.instance_hyper_trace_state.InstanceHyperTraceState( + enabled = 'enabling', + length = 1048576, + filter = [ + corellium.models.instance_trace_filter.InstanceTraceFilter( + trait = 'pid', + value = '1234', ) + ], ), + expose_port = '8080', + fault = False, + patches = ["jailbroken"], + created_by = corellium.models.created_by.CreatedBy( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + username = 'jane.doe', + label = 'Jane Doe', + deleted = True, ), + uefi_bootloader = corellium.models.instance_uefi_bootloader.InstanceUefiBootloader( + label = 'Enable UEFI boot', + name = 'uefi.bin', ), + orientation = 1, + mast = True, + wan_access = True ) - else : + else: return Instance( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'My iPhone 13 Pro', + key = '', + flavor = 'iphone13p', + type = 'ios', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + state = 'on', + state_changed = '2026-03-16T08:22:19Z', + started_at = '2026-03-16T08:22:19Z', + created = '2026-03-14T09:12:47Z', ) + """ def testInstance(self): """Test Instance""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_agent_state.py b/test/test_instance_agent_state.py index 0944e92..97f3a41 100644 --- a/test/test_instance_agent_state.py +++ b/test/test_instance_agent_state.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_agent_state import InstanceAgentState # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_agent_state import InstanceAgentState class TestInstanceAgentState(unittest.TestCase): """InstanceAgentState unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceAgentState: """Test InstanceAgentState - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_agent_state.InstanceAgentState() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceAgentState` + """ + model = InstanceAgentState() + if include_optional: return InstanceAgentState( - hash = '', - info = '' + hash = '', + info = '' ) - else : + else: return InstanceAgentState( ) + """ def testInstanceAgentState(self): """Test InstanceAgentState""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_agent_state_v1.py b/test/test_instance_agent_state_v1.py new file mode 100644 index 0000000..ba162c2 --- /dev/null +++ b/test/test_instance_agent_state_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_agent_state_v1 import InstanceAgentStateV1 + +class TestInstanceAgentStateV1(unittest.TestCase): + """InstanceAgentStateV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceAgentStateV1: + """Test InstanceAgentStateV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceAgentStateV1` + """ + model = InstanceAgentStateV1() + if include_optional: + return InstanceAgentStateV1( + hash = '', + info = '' + ) + else: + return InstanceAgentStateV1( + ) + """ + + def testInstanceAgentStateV1(self): + """Test InstanceAgentStateV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_boot_options.py b/test/test_instance_boot_options.py index d21cd04..bf4f034 100644 --- a/test/test_instance_boot_options.py +++ b/test/test_instance_boot_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_boot_options import InstanceBootOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_boot_options import InstanceBootOptions class TestInstanceBootOptions(unittest.TestCase): """InstanceBootOptions unit test stubs""" @@ -28,33 +26,90 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceBootOptions: """Test InstanceBootOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_boot_options.InstanceBootOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceBootOptions` + """ + model = InstanceBootOptions() + if include_optional: return InstanceBootOptions( - boot_args = '', - restore_boot_args = '', - udid = '', - ecid = '', - random_seed = '', - pac = True, - aprr = True, - additional_tags = [ - 'kalloc' - ] + boot_args = '-v debug=0x8 keepsyms=1', + restore_boot_args = '-v debug=0x8 keepsyms=1', + udid = '00008030-001A2D423C29802E', + ecid = '0x1a2b3c4d5e6f', + random_seed = 'deadbeefcafebabe', + pac = True, + aprr = True, + cores = 4, + ram = 6144, + additional_tags = ["kalloc"], + kernel = corellium.models.instance_boot_options_kernel.InstanceBootOptionsKernel( + firmware_path = 'kernelcache', ), + pongo = corellium.models.instance_boot_options_pongo.InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576, ), + serial = 'C39ABCDEFGH1', + no_snapshot_mount = False, + kernel_slide = '0x18000000', + cd_hashes = ["a1b2c3d4e5f60718293a4b5c6d7e8f90"], + imei = '359268000000000', + imsi = '310150123456789', + ssid0 = 'CorelliumWiFi', + ssid1 = 'CorelliumWiFi-5G', + wifi_mac = '02:00:00:aa:bb:cc', + model_id = 'SM-G973F', + manufacturer_id = 'samsung', + kernel_patches = 'patch1,patch2', + stop_on_fault = True, + boot_addr = '0x800000000', + tzen = True, + authorized_keys = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFhYmJjY2RkZWVmZmdnaGhpaWpqa2trbGxtbW5ubm9v user@example.com', + v_mmio = [ + corellium.models.instance_boot_options_v_mmio_inner.InstanceBootOptions_vMMIO_inner( + start = '0x9000000', + size = '0x1000', + irq = '33-36', ) + ], + fvp = corellium.models.instance_boot_options_fvp.InstanceBootOptionsFvp( + model_binary = '/usr/local/fvp/bin/FVP_Base_RevC-2xAEMvA', + parameters = {"bp.secure_memory":"false","cluster0.NUM_CORES":"4"}, + data = ["/tmp/data.bin@0x80000000"], + breaks = ["0x80001000"], + dumps = ["/tmp/dump.bin@0x80000000,0x1000"], + cadi_log = 'cadi-log.xml', + cadi_server = 'true', + iris_server = 'true', + iris_log = 'info', + iris_allow_remote = 'true', + iris_port_range = '7000:7010', + iris_port = '7100', + run = 'true', + stat = 'true', + quiet = 'true', + start = '0x80000000', + plugin = '/usr/local/fvp/plugins/ToolsSharedLib.so', + fast_ram = 'fastram.cfg', + save = '/tmp/checkpoint', + restore = '/tmp/checkpoint', + cpi_file = 'cpi.txt', + cycle_limit = '1000000', + cpu_limit = '3600', + time_limit = '3600', + sim_limit = '60', ) ) - else : + else: return InstanceBootOptions( ) + """ def testInstanceBootOptions(self): """Test InstanceBootOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_boot_options_additional_tag.py b/test/test_instance_boot_options_additional_tag.py index e7c193b..2791054 100644 --- a/test/test_instance_boot_options_additional_tag.py +++ b/test/test_instance_boot_options_additional_tag.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_boot_options_additional_tag import InstanceBootOptionsAdditionalTag # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_boot_options_additional_tag import InstanceBootOptionsAdditionalTag class TestInstanceBootOptionsAdditionalTag(unittest.TestCase): """InstanceBootOptionsAdditionalTag unit test stubs""" @@ -28,23 +26,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test InstanceBootOptionsAdditionalTag - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.instance_boot_options_additional_tag.InstanceBootOptionsAdditionalTag() # noqa: E501 - if include_optional : - return InstanceBootOptionsAdditionalTag( - ) - else : - return InstanceBootOptionsAdditionalTag( - ) - def testInstanceBootOptionsAdditionalTag(self): """Test InstanceBootOptionsAdditionalTag""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst = InstanceBootOptionsAdditionalTag() if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_boot_options_fvp.py b/test/test_instance_boot_options_fvp.py new file mode 100644 index 0000000..5934210 --- /dev/null +++ b/test/test_instance_boot_options_fvp.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_boot_options_fvp import InstanceBootOptionsFvp + +class TestInstanceBootOptionsFvp(unittest.TestCase): + """InstanceBootOptionsFvp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceBootOptionsFvp: + """Test InstanceBootOptionsFvp + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceBootOptionsFvp` + """ + model = InstanceBootOptionsFvp() + if include_optional: + return InstanceBootOptionsFvp( + model_binary = '/usr/local/fvp/bin/FVP_Base_RevC-2xAEMvA', + parameters = {"bp.secure_memory":"false","cluster0.NUM_CORES":"4"}, + data = ["/tmp/data.bin@0x80000000"], + breaks = ["0x80001000"], + dumps = ["/tmp/dump.bin@0x80000000,0x1000"], + cadi_log = 'cadi-log.xml', + cadi_server = 'true', + iris_server = 'true', + iris_log = 'info', + iris_allow_remote = 'true', + iris_port_range = '7000:7010', + iris_port = '7100', + run = 'true', + stat = 'true', + quiet = 'true', + start = '0x80000000', + plugin = '/usr/local/fvp/plugins/ToolsSharedLib.so', + fast_ram = 'fastram.cfg', + save = '/tmp/checkpoint', + restore = '/tmp/checkpoint', + cpi_file = 'cpi.txt', + cycle_limit = '1000000', + cpu_limit = '3600', + time_limit = '3600', + sim_limit = '60' + ) + else: + return InstanceBootOptionsFvp( + ) + """ + + def testInstanceBootOptionsFvp(self): + """Test InstanceBootOptionsFvp""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_boot_options_kernel.py b/test/test_instance_boot_options_kernel.py new file mode 100644 index 0000000..9615527 --- /dev/null +++ b/test/test_instance_boot_options_kernel.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_boot_options_kernel import InstanceBootOptionsKernel + +class TestInstanceBootOptionsKernel(unittest.TestCase): + """InstanceBootOptionsKernel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceBootOptionsKernel: + """Test InstanceBootOptionsKernel + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceBootOptionsKernel` + """ + model = InstanceBootOptionsKernel() + if include_optional: + return InstanceBootOptionsKernel( + firmware_path = 'kernelcache' + ) + else: + return InstanceBootOptionsKernel( + firmware_path = 'kernelcache', + ) + """ + + def testInstanceBootOptionsKernel(self): + """Test InstanceBootOptionsKernel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_boot_options_kernel_v1.py b/test/test_instance_boot_options_kernel_v1.py new file mode 100644 index 0000000..06aebb0 --- /dev/null +++ b/test/test_instance_boot_options_kernel_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_boot_options_kernel_v1 import InstanceBootOptionsKernelV1 + +class TestInstanceBootOptionsKernelV1(unittest.TestCase): + """InstanceBootOptionsKernelV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceBootOptionsKernelV1: + """Test InstanceBootOptionsKernelV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceBootOptionsKernelV1` + """ + model = InstanceBootOptionsKernelV1() + if include_optional: + return InstanceBootOptionsKernelV1( + firmware_path = '' + ) + else: + return InstanceBootOptionsKernelV1( + ) + """ + + def testInstanceBootOptionsKernelV1(self): + """Test InstanceBootOptionsKernelV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_boot_options_pongo.py b/test/test_instance_boot_options_pongo.py new file mode 100644 index 0000000..94d32aa --- /dev/null +++ b/test/test_instance_boot_options_pongo.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_boot_options_pongo import InstanceBootOptionsPongo + +class TestInstanceBootOptionsPongo(unittest.TestCase): + """InstanceBootOptionsPongo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceBootOptionsPongo: + """Test InstanceBootOptionsPongo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceBootOptionsPongo` + """ + model = InstanceBootOptionsPongo() + if include_optional: + return InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576 + ) + else: + return InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576, + ) + """ + + def testInstanceBootOptionsPongo(self): + """Test InstanceBootOptionsPongo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_boot_options_pongo_v1.py b/test/test_instance_boot_options_pongo_v1.py new file mode 100644 index 0000000..9dd9715 --- /dev/null +++ b/test/test_instance_boot_options_pongo_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_boot_options_pongo_v1 import InstanceBootOptionsPongoV1 + +class TestInstanceBootOptionsPongoV1(unittest.TestCase): + """InstanceBootOptionsPongoV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceBootOptionsPongoV1: + """Test InstanceBootOptionsPongoV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceBootOptionsPongoV1` + """ + model = InstanceBootOptionsPongoV1() + if include_optional: + return InstanceBootOptionsPongoV1( + id = '', + name = '', + size = 1.337 + ) + else: + return InstanceBootOptionsPongoV1( + ) + """ + + def testInstanceBootOptionsPongoV1(self): + """Test InstanceBootOptionsPongoV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_boot_options_v1.py b/test/test_instance_boot_options_v1.py new file mode 100644 index 0000000..e50ad44 --- /dev/null +++ b/test/test_instance_boot_options_v1.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_boot_options_v1 import InstanceBootOptionsV1 + +class TestInstanceBootOptionsV1(unittest.TestCase): + """InstanceBootOptionsV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceBootOptionsV1: + """Test InstanceBootOptionsV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceBootOptionsV1` + """ + model = InstanceBootOptionsV1() + if include_optional: + return InstanceBootOptionsV1( + boot_args = '', + restore_boot_args = '', + udid = '', + ecid = '', + random_seed = '', + pac = True, + aprr = True, + additional_tags = [ + 'kalloc' + ], + kernel = corellium.models.instance_boot_options_kernel_v1.InstanceBootOptionsKernelV1( + firmware_path = '', ), + pongo = corellium.models.instance_boot_options_pongo_v1.InstanceBootOptionsPongoV1( + id = '', + name = '', + size = 1.337, ) + ) + else: + return InstanceBootOptionsV1( + ) + """ + + def testInstanceBootOptionsV1(self): + """Test InstanceBootOptionsV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_boot_options_vmmio_inner.py b/test/test_instance_boot_options_vmmio_inner.py new file mode 100644 index 0000000..edcc30e --- /dev/null +++ b/test/test_instance_boot_options_vmmio_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_boot_options_vmmio_inner import InstanceBootOptionsVMMIOInner + +class TestInstanceBootOptionsVMMIOInner(unittest.TestCase): + """InstanceBootOptionsVMMIOInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceBootOptionsVMMIOInner: + """Test InstanceBootOptionsVMMIOInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceBootOptionsVMMIOInner` + """ + model = InstanceBootOptionsVMMIOInner() + if include_optional: + return InstanceBootOptionsVMMIOInner( + start = '0x9000000', + size = '0x1000', + irq = '33-36' + ) + else: + return InstanceBootOptionsVMMIOInner( + start = '0x9000000', + size = '0x1000', + irq = '33-36', + ) + """ + + def testInstanceBootOptionsVMMIOInner(self): + """Test InstanceBootOptionsVMMIOInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_console.py b/test/test_instance_console.py new file mode 100644 index 0000000..6c12691 --- /dev/null +++ b/test/test_instance_console.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_console import InstanceConsole + +class TestInstanceConsole(unittest.TestCase): + """InstanceConsole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceConsole: + """Test InstanceConsole + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceConsole` + """ + model = InstanceConsole() + if include_optional: + return InstanceConsole( + name = 'System Console', + id = 'port-cons', + port = '2000', + hash = '', + info = '' + ) + else: + return InstanceConsole( + name = 'System Console', + id = 'port-cons', + port = '2000', + hash = '', + info = '', + ) + """ + + def testInstanceConsole(self): + """Test InstanceConsole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_console_endpoint.py b/test/test_instance_console_endpoint.py index 5ac6172..988f5f9 100644 --- a/test/test_instance_console_endpoint.py +++ b/test/test_instance_console_endpoint.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_console_endpoint import InstanceConsoleEndpoint # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_console_endpoint import InstanceConsoleEndpoint class TestInstanceConsoleEndpoint(unittest.TestCase): """InstanceConsoleEndpoint unit test stubs""" @@ -28,24 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceConsoleEndpoint: """Test InstanceConsoleEndpoint - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_console_endpoint.InstanceConsoleEndpoint() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceConsoleEndpoint` + """ + model = InstanceConsoleEndpoint() + if include_optional: return InstanceConsoleEndpoint( - url = '' + url = 'wss://example.com/console/ws?token=' ) - else : + else: return InstanceConsoleEndpoint( + url = 'wss://example.com/console/ws?token=', ) + """ def testInstanceConsoleEndpoint(self): """Test InstanceConsoleEndpoint""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_console_endpoint_v1.py b/test/test_instance_console_endpoint_v1.py new file mode 100644 index 0000000..b98af59 --- /dev/null +++ b/test/test_instance_console_endpoint_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_console_endpoint_v1 import InstanceConsoleEndpointV1 + +class TestInstanceConsoleEndpointV1(unittest.TestCase): + """InstanceConsoleEndpointV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceConsoleEndpointV1: + """Test InstanceConsoleEndpointV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceConsoleEndpointV1` + """ + model = InstanceConsoleEndpointV1() + if include_optional: + return InstanceConsoleEndpointV1( + url = '' + ) + else: + return InstanceConsoleEndpointV1( + ) + """ + + def testInstanceConsoleEndpointV1(self): + """Test InstanceConsoleEndpointV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_console_v1.py b/test/test_instance_console_v1.py new file mode 100644 index 0000000..2aa3b4b --- /dev/null +++ b/test/test_instance_console_v1.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_console_v1 import InstanceConsoleV1 + +class TestInstanceConsoleV1(unittest.TestCase): + """InstanceConsoleV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceConsoleV1: + """Test InstanceConsoleV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceConsoleV1` + """ + model = InstanceConsoleV1() + if include_optional: + return InstanceConsoleV1( + name = '', + id = '', + port = 1.337, + hash = '', + info = '' + ) + else: + return InstanceConsoleV1( + ) + """ + + def testInstanceConsoleV1(self): + """Test InstanceConsoleV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_create_options.py b/test/test_instance_create_options.py index c8d807c..8557409 100644 --- a/test/test_instance_create_options.py +++ b/test/test_instance_create_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_create_options import InstanceCreateOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_create_options import InstanceCreateOptions class TestInstanceCreateOptions(unittest.TestCase): """InstanceCreateOptions unit test stubs""" @@ -28,41 +26,45 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceCreateOptions: """Test InstanceCreateOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_create_options.InstanceCreateOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceCreateOptions` + """ + model = InstanceCreateOptions() + if include_optional: return InstanceCreateOptions( - shared_snapshot = '', - shared_snapshot_password = '', - name = '', - key = '', - flavor = '', - project = '', - os = '', - osbuild = '', + shared_snapshot = '', + shared_snapshot_password = '', + name = '', + key = '', + flavor = '', + project = '', + os = '', + osbuild = '', patches = [ '' - ], - fwpackage = '', - orig_fw_package_url = '', - encrypt = True, - wifi_mac = '' + ], + fwpackage = '', + orig_fw_package_url = '', + encrypt = True, + wifi_mac = '', + wan_access = True ) - else : + else: return InstanceCreateOptions( flavor = '', project = '', os = '', ) + """ def testInstanceCreateOptions(self): """Test InstanceCreateOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_hyper_trace_state.py b/test/test_instance_hyper_trace_state.py new file mode 100644 index 0000000..bcbd28e --- /dev/null +++ b/test/test_instance_hyper_trace_state.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_hyper_trace_state import InstanceHyperTraceState + +class TestInstanceHyperTraceState(unittest.TestCase): + """InstanceHyperTraceState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceHyperTraceState: + """Test InstanceHyperTraceState + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceHyperTraceState` + """ + model = InstanceHyperTraceState() + if include_optional: + return InstanceHyperTraceState( + enabled = 'enabling', + length = 1048576, + filter = [ + corellium.models.instance_trace_filter.InstanceTraceFilter( + trait = 'pid', + value = '1234', ) + ] + ) + else: + return InstanceHyperTraceState( + ) + """ + + def testInstanceHyperTraceState(self): + """Test InstanceHyperTraceState""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_hyper_trace_state_v1.py b/test/test_instance_hyper_trace_state_v1.py new file mode 100644 index 0000000..64570d4 --- /dev/null +++ b/test/test_instance_hyper_trace_state_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_hyper_trace_state_v1 import InstanceHyperTraceStateV1 + +class TestInstanceHyperTraceStateV1(unittest.TestCase): + """InstanceHyperTraceStateV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceHyperTraceStateV1: + """Test InstanceHyperTraceStateV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceHyperTraceStateV1` + """ + model = InstanceHyperTraceStateV1() + if include_optional: + return InstanceHyperTraceStateV1( + enabled = 'enabling', + length = 1.337, + filter = '' + ) + else: + return InstanceHyperTraceStateV1( + ) + """ + + def testInstanceHyperTraceStateV1(self): + """Test InstanceHyperTraceStateV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_input.py b/test/test_instance_input.py deleted file mode 100644 index 766d395..0000000 --- a/test/test_instance_input.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.instance_input import InstanceInput # noqa: E501 -from corellium_api.rest import ApiException - -class TestInstanceInput(unittest.TestCase): - """InstanceInput unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInstanceInput(self): - """Test InstanceInput""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_instance_input_body.py b/test/test_instance_input_body.py new file mode 100644 index 0000000..591ebf0 --- /dev/null +++ b/test/test_instance_input_body.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_input_body import InstanceInputBody + +class TestInstanceInputBody(unittest.TestCase): + """InstanceInputBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceInputBody: + """Test InstanceInputBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceInputBody` + """ + model = InstanceInputBody() + if include_optional: + return InstanceInputBody( + position = [[100,200]], + buttons = [finger], + normalized = True, + wait = 100, + start = [[100,200]], + end = [[100,200]], + bezier_points = [[[150, 250]]], + start_buttons = [finger], + end_buttons = [finger], + duration = 250, + text = 'Hello, world!', + key_duration = 150 + ) + else: + return InstanceInputBody( + start = [[100,200]], + end = [[100,200]], + start_buttons = [finger], + duration = 250, + text = 'Hello, world!', + ) + """ + + def testInstanceInputBody(self): + """Test InstanceInputBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_input_request.py b/test/test_instance_input_request.py new file mode 100644 index 0000000..83b65ef --- /dev/null +++ b/test/test_instance_input_request.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_input_request import InstanceInputRequest + +class TestInstanceInputRequest(unittest.TestCase): + """InstanceInputRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceInputRequest: + """Test InstanceInputRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceInputRequest` + """ + model = InstanceInputRequest() + if include_optional: + return InstanceInputRequest( + position = corellium.models.finger_positions_v1.FingerPositionsV1(), + buttons = [ + None + ], + normalized = True, + wait = 56, + start = corellium.models.finger_positions_v1.FingerPositionsV1(), + end = corellium.models.finger_positions_v1.FingerPositionsV1(), + bezier_points = [ + corellium.models.finger_positions_v1.FingerPositionsV1() + ], + start_buttons = [ + None + ], + end_buttons = [ + None + ], + duration = 56, + required = '', + key_duration = 56 + ) + else: + return InstanceInputRequest( + start = corellium.models.finger_positions_v1.FingerPositionsV1(), + end = corellium.models.finger_positions_v1.FingerPositionsV1(), + start_buttons = [ + None + ], + duration = 56, + required = '', + ) + """ + + def testInstanceInputRequest(self): + """Test InstanceInputRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_interface.py b/test/test_instance_interface.py index dd765bc..4aec185 100644 --- a/test/test_instance_interface.py +++ b/test/test_instance_interface.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_interface import InstanceInterface # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_interface import InstanceInterface class TestInstanceInterface(unittest.TestCase): """InstanceInterface unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceInterface: """Test InstanceInterface - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_interface.InstanceInterface() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceInterface` + """ + model = InstanceInterface() + if include_optional: return InstanceInterface( - device_id = '', + device_id = '', interface_id = '' ) - else : + else: return InstanceInterface( ) + """ def testInstanceInterface(self): """Test InstanceInterface""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_interface_status.py b/test/test_instance_interface_status.py new file mode 100644 index 0000000..396e1d6 --- /dev/null +++ b/test/test_instance_interface_status.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_interface_status import InstanceInterfaceStatus + +class TestInstanceInterfaceStatus(unittest.TestCase): + """InstanceInterfaceStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceInterfaceStatus: + """Test InstanceInterfaceStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceInterfaceStatus` + """ + model = InstanceInterfaceStatus() + if include_optional: + return InstanceInterfaceStatus( + interface_id = 'gpio/0', + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + status = 'attached' + ) + else: + return InstanceInterfaceStatus( + interface_id = 'gpio/0', + status = 'attached', + ) + """ + + def testInstanceInterfaceStatus(self): + """Test InstanceInterfaceStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_list.py b/test/test_instance_list.py new file mode 100644 index 0000000..4da818d --- /dev/null +++ b/test/test_instance_list.py @@ -0,0 +1,401 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_list import InstanceList + +class TestInstanceList(unittest.TestCase): + """InstanceList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceList: + """Test InstanceList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceList` + """ + model = InstanceList() + if include_optional: + return InstanceList( + results = [ + corellium.models.instance.Instance( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'My iPhone 13 Pro', + key = '', + flavor = 'iphone13p', + flavor_name = 'iPhone 13 Pro', + type = 'ios', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + domain_name = 'acme-corp', + state = 'on', + state_changed = '2026-03-16T08:22:19Z', + started_at = '2026-03-16T08:22:19Z', + user_task = 'snapshot', + task_state = 'none', + error = 'Failed to start instance: insufficient capacity', + restore_status = corellium.models.instance_restore_status.InstanceRestoreStatus( + type = '1', + stage = 'download-images', + progress = null, + total_progress = null, + heading = 'Restoring device', + description = 'Extracting firmware components', ), + read_only = corellium.models.instance_read_only_status.InstanceReadOnlyStatus( + read_only_status = 'disabling', ), + boot_options = corellium.models.instance_boot_options.InstanceBootOptions( + boot_args = '-v debug=0x8 keepsyms=1', + restore_boot_args = '-v debug=0x8 keepsyms=1', + udid = '00008030-001A2D423C29802E', + ecid = '0x1a2b3c4d5e6f', + random_seed = 'deadbeefcafebabe', + pac = True, + aprr = True, + cores = 4, + ram = 6144, + additional_tags = ["kalloc"], + kernel = corellium.models.instance_boot_options_kernel.InstanceBootOptionsKernel( + firmware_path = 'kernelcache', ), + pongo = corellium.models.instance_boot_options_pongo.InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576, ), + serial = 'C39ABCDEFGH1', + no_snapshot_mount = False, + kernel_slide = '0x18000000', + cd_hashes = ["a1b2c3d4e5f60718293a4b5c6d7e8f90"], + imei = '359268000000000', + imsi = '310150123456789', + ssid0 = 'CorelliumWiFi', + ssid1 = 'CorelliumWiFi-5G', + wifi_mac = '02:00:00:aa:bb:cc', + model_id = 'SM-G973F', + manufacturer_id = 'samsung', + kernel_patches = 'patch1,patch2', + stop_on_fault = True, + boot_addr = '0x800000000', + tzen = True, + authorized_keys = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFhYmJjY2RkZWVmZmdnaGhpaWpqa2trbGxtbW5ubm9v user@example.com', + v_mmio = [ + corellium.models.instance_boot_options_v_mmio_inner.InstanceBootOptions_vMMIO_inner( + start = '0x9000000', + size = '0x1000', + irq = '33-36', ) + ], + fvp = corellium.models.instance_boot_options_fvp.InstanceBootOptionsFvp( + model_binary = '/usr/local/fvp/bin/FVP_Base_RevC-2xAEMvA', + parameters = {"bp.secure_memory":"false","cluster0.NUM_CORES":"4"}, + data = ["/tmp/data.bin@0x80000000"], + breaks = ["0x80001000"], + dumps = ["/tmp/dump.bin@0x80000000,0x1000"], + cadi_log = 'cadi-log.xml', + cadi_server = 'true', + iris_server = 'true', + iris_log = 'info', + iris_allow_remote = 'true', + iris_port_range = '7000:7010', + iris_port = '7100', + run = 'true', + stat = 'true', + quiet = 'true', + start = '0x80000000', + plugin = '/usr/local/fvp/plugins/ToolsSharedLib.so', + fast_ram = 'fastram.cfg', + save = '/tmp/checkpoint', + restore = '/tmp/checkpoint', + cpi_file = 'cpi.txt', + cycle_limit = '1000000', + cpu_limit = '3600', + time_limit = '3600', + sim_limit = '60', ), ), + service_ip = '10.0.10.5', + wifi_ip = '192.168.1.50', + wifi_mac = '02:00:00:aa:bb:cc', + secondary_ip = '192.168.1.51', + port_adb = '5555', + port_usb = '2222', + port_gdb = '5039', + port_sep_gdb = '5040', + port_cons = '2000', + port_sep_cons = '2001', + port_sys_cons = '2002', + port_usbmuxd = '2003', + port_frida = '27042', + port_sockcap = '2004', + port_model_gw = '2005', + consoles = [ + corellium.models.instance_console.InstanceConsole( + name = 'System Console', + id = 'port-cons', + port = '2000', + hash = '', + info = '', ) + ], + interfaces = [ + corellium.models.instance_interface_status.InstanceInterfaceStatus( + interface_id = 'gpio/0', + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + status = 'attached', ) + ], + services = corellium.models.instance_services.InstanceServices( + vpn = corellium.models.vpn_definition.VpnDefinition( + proxy = [{"devicePort":22,"routerPort":22,"status":"started"}], + listeners = [ + { + 'key' : null + } + ], ), ), + panicked = False, + created = '2026-03-14T09:12:47Z', + model = 'd63ap', + fw_package = 'https://example.com/firmware.ipsw', + os_version = '17.5', + os_build = '21F79', + agent = corellium.models.instance_agent_state.InstanceAgentState( + hash = '', + info = '', ), + net_mon = corellium.models.instance_netmon_state.InstanceNetmonState( + hash = '', + info = '', + enabled = True, ), + net_dump = corellium.models.instance_netdump_state.InstanceNetdumpState( + hash = '', + info = '', + enabled = True, ), + core_trace = corellium.models.instance_trace_state.InstanceTraceState( + enabled = True, + length = 1048576, + filter = [ + corellium.models.instance_trace_filter.InstanceTraceFilter( + trait = 'pid', + value = '1234', ) + ], ), + hyper_trace = corellium.models.instance_hyper_trace_state.InstanceHyperTraceState( + enabled = 'enabling', + length = 1048576, ), + expose_port = '8080', + fault = False, + patches = ["jailbroken"], + created_by = corellium.models.created_by.CreatedBy( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + username = 'jane.doe', + label = 'Jane Doe', + deleted = True, ), + uefi_bootloader = corellium.models.instance_uefi_bootloader.InstanceUefiBootloader( + label = 'Enable UEFI boot', + name = 'uefi.bin', ), + orientation = 1, + mast = True, + wan_access = True, ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return InstanceList( + results = [ + corellium.models.instance.Instance( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'My iPhone 13 Pro', + key = '', + flavor = 'iphone13p', + flavor_name = 'iPhone 13 Pro', + type = 'ios', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + domain_name = 'acme-corp', + state = 'on', + state_changed = '2026-03-16T08:22:19Z', + started_at = '2026-03-16T08:22:19Z', + user_task = 'snapshot', + task_state = 'none', + error = 'Failed to start instance: insufficient capacity', + restore_status = corellium.models.instance_restore_status.InstanceRestoreStatus( + type = '1', + stage = 'download-images', + progress = null, + total_progress = null, + heading = 'Restoring device', + description = 'Extracting firmware components', ), + read_only = corellium.models.instance_read_only_status.InstanceReadOnlyStatus( + read_only_status = 'disabling', ), + boot_options = corellium.models.instance_boot_options.InstanceBootOptions( + boot_args = '-v debug=0x8 keepsyms=1', + restore_boot_args = '-v debug=0x8 keepsyms=1', + udid = '00008030-001A2D423C29802E', + ecid = '0x1a2b3c4d5e6f', + random_seed = 'deadbeefcafebabe', + pac = True, + aprr = True, + cores = 4, + ram = 6144, + additional_tags = ["kalloc"], + kernel = corellium.models.instance_boot_options_kernel.InstanceBootOptionsKernel( + firmware_path = 'kernelcache', ), + pongo = corellium.models.instance_boot_options_pongo.InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576, ), + serial = 'C39ABCDEFGH1', + no_snapshot_mount = False, + kernel_slide = '0x18000000', + cd_hashes = ["a1b2c3d4e5f60718293a4b5c6d7e8f90"], + imei = '359268000000000', + imsi = '310150123456789', + ssid0 = 'CorelliumWiFi', + ssid1 = 'CorelliumWiFi-5G', + wifi_mac = '02:00:00:aa:bb:cc', + model_id = 'SM-G973F', + manufacturer_id = 'samsung', + kernel_patches = 'patch1,patch2', + stop_on_fault = True, + boot_addr = '0x800000000', + tzen = True, + authorized_keys = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFhYmJjY2RkZWVmZmdnaGhpaWpqa2trbGxtbW5ubm9v user@example.com', + v_mmio = [ + corellium.models.instance_boot_options_v_mmio_inner.InstanceBootOptions_vMMIO_inner( + start = '0x9000000', + size = '0x1000', + irq = '33-36', ) + ], + fvp = corellium.models.instance_boot_options_fvp.InstanceBootOptionsFvp( + model_binary = '/usr/local/fvp/bin/FVP_Base_RevC-2xAEMvA', + parameters = {"bp.secure_memory":"false","cluster0.NUM_CORES":"4"}, + data = ["/tmp/data.bin@0x80000000"], + breaks = ["0x80001000"], + dumps = ["/tmp/dump.bin@0x80000000,0x1000"], + cadi_log = 'cadi-log.xml', + cadi_server = 'true', + iris_server = 'true', + iris_log = 'info', + iris_allow_remote = 'true', + iris_port_range = '7000:7010', + iris_port = '7100', + run = 'true', + stat = 'true', + quiet = 'true', + start = '0x80000000', + plugin = '/usr/local/fvp/plugins/ToolsSharedLib.so', + fast_ram = 'fastram.cfg', + save = '/tmp/checkpoint', + restore = '/tmp/checkpoint', + cpi_file = 'cpi.txt', + cycle_limit = '1000000', + cpu_limit = '3600', + time_limit = '3600', + sim_limit = '60', ), ), + service_ip = '10.0.10.5', + wifi_ip = '192.168.1.50', + wifi_mac = '02:00:00:aa:bb:cc', + secondary_ip = '192.168.1.51', + port_adb = '5555', + port_usb = '2222', + port_gdb = '5039', + port_sep_gdb = '5040', + port_cons = '2000', + port_sep_cons = '2001', + port_sys_cons = '2002', + port_usbmuxd = '2003', + port_frida = '27042', + port_sockcap = '2004', + port_model_gw = '2005', + consoles = [ + corellium.models.instance_console.InstanceConsole( + name = 'System Console', + id = 'port-cons', + port = '2000', + hash = '', + info = '', ) + ], + interfaces = [ + corellium.models.instance_interface_status.InstanceInterfaceStatus( + interface_id = 'gpio/0', + interconnect_id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + status = 'attached', ) + ], + services = corellium.models.instance_services.InstanceServices( + vpn = corellium.models.vpn_definition.VpnDefinition( + proxy = [{"devicePort":22,"routerPort":22,"status":"started"}], + listeners = [ + { + 'key' : null + } + ], ), ), + panicked = False, + created = '2026-03-14T09:12:47Z', + model = 'd63ap', + fw_package = 'https://example.com/firmware.ipsw', + os_version = '17.5', + os_build = '21F79', + agent = corellium.models.instance_agent_state.InstanceAgentState( + hash = '', + info = '', ), + net_mon = corellium.models.instance_netmon_state.InstanceNetmonState( + hash = '', + info = '', + enabled = True, ), + net_dump = corellium.models.instance_netdump_state.InstanceNetdumpState( + hash = '', + info = '', + enabled = True, ), + core_trace = corellium.models.instance_trace_state.InstanceTraceState( + enabled = True, + length = 1048576, + filter = [ + corellium.models.instance_trace_filter.InstanceTraceFilter( + trait = 'pid', + value = '1234', ) + ], ), + hyper_trace = corellium.models.instance_hyper_trace_state.InstanceHyperTraceState( + enabled = 'enabling', + length = 1048576, ), + expose_port = '8080', + fault = False, + patches = ["jailbroken"], + created_by = corellium.models.created_by.CreatedBy( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + username = 'jane.doe', + label = 'Jane Doe', + deleted = True, ), + uefi_bootloader = corellium.models.instance_uefi_bootloader.InstanceUefiBootloader( + label = 'Enable UEFI boot', + name = 'uefi.bin', ), + orientation = 1, + mast = True, + wan_access = True, ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testInstanceList(self): + """Test InstanceList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_netdump_state.py b/test/test_instance_netdump_state.py index 9c25782..3bcc718 100644 --- a/test/test_instance_netdump_state.py +++ b/test/test_instance_netdump_state.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_netdump_state import InstanceNetdumpState # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_netdump_state import InstanceNetdumpState class TestInstanceNetdumpState(unittest.TestCase): """InstanceNetdumpState unit test stubs""" @@ -28,26 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceNetdumpState: """Test InstanceNetdumpState - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_netdump_state.InstanceNetdumpState() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceNetdumpState` + """ + model = InstanceNetdumpState() + if include_optional: return InstanceNetdumpState( - hash = '', - info = '', + hash = '', + info = '', enabled = True ) - else : + else: return InstanceNetdumpState( ) + """ def testInstanceNetdumpState(self): """Test InstanceNetdumpState""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_netdump_state_v1.py b/test/test_instance_netdump_state_v1.py new file mode 100644 index 0000000..59c84a8 --- /dev/null +++ b/test/test_instance_netdump_state_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_netdump_state_v1 import InstanceNetdumpStateV1 + +class TestInstanceNetdumpStateV1(unittest.TestCase): + """InstanceNetdumpStateV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceNetdumpStateV1: + """Test InstanceNetdumpStateV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceNetdumpStateV1` + """ + model = InstanceNetdumpStateV1() + if include_optional: + return InstanceNetdumpStateV1( + hash = '', + info = '', + enabled = True + ) + else: + return InstanceNetdumpStateV1( + ) + """ + + def testInstanceNetdumpStateV1(self): + """Test InstanceNetdumpStateV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_netmon_proc_map_state.py b/test/test_instance_netmon_proc_map_state.py deleted file mode 100644 index b285951..0000000 --- a/test/test_instance_netmon_proc_map_state.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 4.5.0-16740 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.instance_netmon_proc_map_state import InstanceNetmonProcMapState # noqa: E501 -from corellium_api.rest import ApiException - -class TestInstanceNetmonProcMapState(unittest.TestCase): - """InstanceNetmonProcMapState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InstanceNetmonProcMapState - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.instance_netmon_proc_map_state.InstanceNetmonProcMapState() # noqa: E501 - if include_optional : - return InstanceNetmonProcMapState( - hash = '', - info = '', - enabled = True - ) - else : - return InstanceNetmonProcMapState( - ) - - def testInstanceNetmonProcMapState(self): - """Test InstanceNetmonProcMapState""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_instance_netmon_state.py b/test/test_instance_netmon_state.py index 3924682..5d048aa 100644 --- a/test/test_instance_netmon_state.py +++ b/test/test_instance_netmon_state.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_netmon_state import InstanceNetmonState # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_netmon_state import InstanceNetmonState class TestInstanceNetmonState(unittest.TestCase): """InstanceNetmonState unit test stubs""" @@ -28,26 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceNetmonState: """Test InstanceNetmonState - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_netmon_state.InstanceNetmonState() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceNetmonState` + """ + model = InstanceNetmonState() + if include_optional: return InstanceNetmonState( - hash = '', - info = '', + hash = '', + info = '', enabled = True ) - else : + else: return InstanceNetmonState( ) + """ def testInstanceNetmonState(self): """Test InstanceNetmonState""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_netmon_state_v1.py b/test/test_instance_netmon_state_v1.py new file mode 100644 index 0000000..217123e --- /dev/null +++ b/test/test_instance_netmon_state_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_netmon_state_v1 import InstanceNetmonStateV1 + +class TestInstanceNetmonStateV1(unittest.TestCase): + """InstanceNetmonStateV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceNetmonStateV1: + """Test InstanceNetmonStateV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceNetmonStateV1` + """ + model = InstanceNetmonStateV1() + if include_optional: + return InstanceNetmonStateV1( + hash = '', + info = '', + enabled = True + ) + else: + return InstanceNetmonStateV1( + ) + """ + + def testInstanceNetmonStateV1(self): + """Test InstanceNetmonStateV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_read_only_status.py b/test/test_instance_read_only_status.py new file mode 100644 index 0000000..57e60af --- /dev/null +++ b/test/test_instance_read_only_status.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_read_only_status import InstanceReadOnlyStatus + +class TestInstanceReadOnlyStatus(unittest.TestCase): + """InstanceReadOnlyStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceReadOnlyStatus: + """Test InstanceReadOnlyStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceReadOnlyStatus` + """ + model = InstanceReadOnlyStatus() + if include_optional: + return InstanceReadOnlyStatus( + read_only_status = 'disabling' + ) + else: + return InstanceReadOnlyStatus( + read_only_status = 'disabling', + ) + """ + + def testInstanceReadOnlyStatus(self): + """Test InstanceReadOnlyStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_read_only_status_v1.py b/test/test_instance_read_only_status_v1.py new file mode 100644 index 0000000..e5356a9 --- /dev/null +++ b/test/test_instance_read_only_status_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_read_only_status_v1 import InstanceReadOnlyStatusV1 + +class TestInstanceReadOnlyStatusV1(unittest.TestCase): + """InstanceReadOnlyStatusV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceReadOnlyStatusV1: + """Test InstanceReadOnlyStatusV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceReadOnlyStatusV1` + """ + model = InstanceReadOnlyStatusV1() + if include_optional: + return InstanceReadOnlyStatusV1( + read_only_status = '' + ) + else: + return InstanceReadOnlyStatusV1( + ) + """ + + def testInstanceReadOnlyStatusV1(self): + """Test InstanceReadOnlyStatusV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_restore_status.py b/test/test_instance_restore_status.py new file mode 100644 index 0000000..a7d7ec1 --- /dev/null +++ b/test/test_instance_restore_status.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_restore_status import InstanceRestoreStatus + +class TestInstanceRestoreStatus(unittest.TestCase): + """InstanceRestoreStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceRestoreStatus: + """Test InstanceRestoreStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceRestoreStatus` + """ + model = InstanceRestoreStatus() + if include_optional: + return InstanceRestoreStatus( + type = '1', + stage = 'download-images', + progress = None, + total_progress = None, + heading = 'Restoring device', + description = 'Extracting firmware components' + ) + else: + return InstanceRestoreStatus( + ) + """ + + def testInstanceRestoreStatus(self): + """Test InstanceRestoreStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_restore_status_v1.py b/test/test_instance_restore_status_v1.py new file mode 100644 index 0000000..97e2b39 --- /dev/null +++ b/test/test_instance_restore_status_v1.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_restore_status_v1 import InstanceRestoreStatusV1 + +class TestInstanceRestoreStatusV1(unittest.TestCase): + """InstanceRestoreStatusV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceRestoreStatusV1: + """Test InstanceRestoreStatusV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceRestoreStatusV1` + """ + model = InstanceRestoreStatusV1() + if include_optional: + return InstanceRestoreStatusV1( + type = '', + stage = '', + progress = 1.337, + total_progress = 1.337, + heading = '', + description = '' + ) + else: + return InstanceRestoreStatusV1( + ) + """ + + def testInstanceRestoreStatusV1(self): + """Test InstanceRestoreStatusV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_return.py b/test/test_instance_return.py index 80f08f7..0faf5ef 100644 --- a/test/test_instance_return.py +++ b/test/test_instance_return.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_return import InstanceReturn # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_return import InstanceReturn class TestInstanceReturn(unittest.TestCase): """InstanceReturn unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceReturn: """Test InstanceReturn - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_return.InstanceReturn() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceReturn` + """ + model = InstanceReturn() + if include_optional: return InstanceReturn( - id = '', + id = '', state = 'on' ) - else : + else: return InstanceReturn( id = '', state = 'on', ) + """ def testInstanceReturn(self): """Test InstanceReturn""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_services.py b/test/test_instance_services.py index e2ab6ea..1c36653 100644 --- a/test/test_instance_services.py +++ b/test/test_instance_services.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_services import InstanceServices # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_services import InstanceServices class TestInstanceServices(unittest.TestCase): """InstanceServices unit test stubs""" @@ -28,30 +26,33 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceServices: """Test InstanceServices - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_services.InstanceServices() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceServices` + """ + model = InstanceServices() + if include_optional: return InstanceServices( - vpn = corellium_api.models.vpn_definition.VpnDefinition( - proxy = [ - None - ], + vpn = corellium.models.vpn_definition.VpnDefinition( + proxy = [{"devicePort":22,"routerPort":22,"status":"started"}], listeners = [ - None + { + 'key' : null + } ], ) ) - else : + else: return InstanceServices( ) + """ def testInstanceServices(self): """Test InstanceServices""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_services_v1.py b/test/test_instance_services_v1.py new file mode 100644 index 0000000..47912bb --- /dev/null +++ b/test/test_instance_services_v1.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_services_v1 import InstanceServicesV1 + +class TestInstanceServicesV1(unittest.TestCase): + """InstanceServicesV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceServicesV1: + """Test InstanceServicesV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceServicesV1` + """ + model = InstanceServicesV1() + if include_optional: + return InstanceServicesV1( + vpn = corellium.models.vpn_definition_v1.VpnDefinitionV1( + proxy = [ + None + ], + listeners = [ + None + ], ) + ) + else: + return InstanceServicesV1( + ) + """ + + def testInstanceServicesV1(self): + """Test InstanceServicesV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_snapshots_list.py b/test/test_instance_snapshots_list.py new file mode 100644 index 0000000..c388eff --- /dev/null +++ b/test/test_instance_snapshots_list.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_snapshots_list import InstanceSnapshotsList + +class TestInstanceSnapshotsList(unittest.TestCase): + """InstanceSnapshotsList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceSnapshotsList: + """Test InstanceSnapshotsList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceSnapshotsList` + """ + model = InstanceSnapshotsList() + if include_optional: + return InstanceSnapshotsList( + results = [ + corellium.models.snapshot.Snapshot( + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + name = 'Clean boot', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + date = 1773479567000, + fresh = True, + live = False, + local = True, + model = 'iPhone 13 Pro', + sharing = corellium.models.snapshot_sharing.SnapshotSharing( + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + members = [ + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) + ], ), ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return InstanceSnapshotsList( + results = [ + corellium.models.snapshot.Snapshot( + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + name = 'Clean boot', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + date = 1773479567000, + fresh = True, + live = False, + local = True, + model = 'iPhone 13 Pro', + sharing = corellium.models.snapshot_sharing.SnapshotSharing( + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + members = [ + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) + ], ), ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testInstanceSnapshotsList(self): + """Test InstanceSnapshotsList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_start_options.py b/test/test_instance_start_options.py index 81fc98b..bf8b578 100644 --- a/test/test_instance_start_options.py +++ b/test/test_instance_start_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_start_options import InstanceStartOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_start_options import InstanceStartOptions class TestInstanceStartOptions(unittest.TestCase): """InstanceStartOptions unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceStartOptions: """Test InstanceStartOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_start_options.InstanceStartOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceStartOptions` + """ + model = InstanceStartOptions() + if include_optional: return InstanceStartOptions( - paused = True, + paused = True, sockcap = True ) - else : + else: return InstanceStartOptions( ) + """ def testInstanceStartOptions(self): """Test InstanceStartOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_state.py b/test/test_instance_state.py index e2cd61f..7490f11 100644 --- a/test/test_instance_state.py +++ b/test/test_instance_state.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_state import InstanceState # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_state import InstanceState class TestInstanceState(unittest.TestCase): """InstanceState unit test stubs""" @@ -28,23 +26,9 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): - """Test InstanceState - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.instance_state.InstanceState() # noqa: E501 - if include_optional : - return InstanceState( - ) - else : - return InstanceState( - ) - def testInstanceState(self): """Test InstanceState""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst = InstanceState() if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_state_v1.py b/test/test_instance_state_v1.py new file mode 100644 index 0000000..5842de8 --- /dev/null +++ b/test/test_instance_state_v1.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_state_v1 import InstanceStateV1 + +class TestInstanceStateV1(unittest.TestCase): + """InstanceStateV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInstanceStateV1(self): + """Test InstanceStateV1""" + # inst = InstanceStateV1() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_stop_options.py b/test/test_instance_stop_options.py index 4147b41..ad43186 100644 --- a/test/test_instance_stop_options.py +++ b/test/test_instance_stop_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_stop_options import InstanceStopOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_stop_options import InstanceStopOptions class TestInstanceStopOptions(unittest.TestCase): """InstanceStopOptions unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceStopOptions: """Test InstanceStopOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_stop_options.InstanceStopOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceStopOptions` + """ + model = InstanceStopOptions() + if include_optional: return InstanceStopOptions( soft = True ) - else : + else: return InstanceStopOptions( ) + """ def testInstanceStopOptions(self): """Test InstanceStopOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_trace_filter.py b/test/test_instance_trace_filter.py new file mode 100644 index 0000000..00c8e88 --- /dev/null +++ b/test/test_instance_trace_filter.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_trace_filter import InstanceTraceFilter + +class TestInstanceTraceFilter(unittest.TestCase): + """InstanceTraceFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceTraceFilter: + """Test InstanceTraceFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceTraceFilter` + """ + model = InstanceTraceFilter() + if include_optional: + return InstanceTraceFilter( + trait = 'pid', + value = '1234' + ) + else: + return InstanceTraceFilter( + trait = 'pid', + value = '1234', + ) + """ + + def testInstanceTraceFilter(self): + """Test InstanceTraceFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_trace_state.py b/test/test_instance_trace_state.py new file mode 100644 index 0000000..3c9e9d2 --- /dev/null +++ b/test/test_instance_trace_state.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_trace_state import InstanceTraceState + +class TestInstanceTraceState(unittest.TestCase): + """InstanceTraceState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceTraceState: + """Test InstanceTraceState + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceTraceState` + """ + model = InstanceTraceState() + if include_optional: + return InstanceTraceState( + enabled = True, + length = 1048576, + filter = [ + corellium.models.instance_trace_filter.InstanceTraceFilter( + trait = 'pid', + value = '1234', ) + ] + ) + else: + return InstanceTraceState( + ) + """ + + def testInstanceTraceState(self): + """Test InstanceTraceState""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_trace_state_v1.py b/test/test_instance_trace_state_v1.py new file mode 100644 index 0000000..0da2d12 --- /dev/null +++ b/test/test_instance_trace_state_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_trace_state_v1 import InstanceTraceStateV1 + +class TestInstanceTraceStateV1(unittest.TestCase): + """InstanceTraceStateV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceTraceStateV1: + """Test InstanceTraceStateV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceTraceStateV1` + """ + model = InstanceTraceStateV1() + if include_optional: + return InstanceTraceStateV1( + enabled = True, + length = 1.337, + filter = '' + ) + else: + return InstanceTraceStateV1( + ) + """ + + def testInstanceTraceStateV1(self): + """Test InstanceTraceStateV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_uefi_bootloader.py b/test/test_instance_uefi_bootloader.py new file mode 100644 index 0000000..fc6165a --- /dev/null +++ b/test/test_instance_uefi_bootloader.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_uefi_bootloader import InstanceUefiBootloader + +class TestInstanceUefiBootloader(unittest.TestCase): + """InstanceUefiBootloader unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceUefiBootloader: + """Test InstanceUefiBootloader + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceUefiBootloader` + """ + model = InstanceUefiBootloader() + if include_optional: + return InstanceUefiBootloader( + label = 'Enable UEFI boot', + name = 'uefi.bin' + ) + else: + return InstanceUefiBootloader( + label = 'Enable UEFI boot', + name = 'uefi.bin', + ) + """ + + def testInstanceUefiBootloader(self): + """Test InstanceUefiBootloader""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_upgrade_body.py b/test/test_instance_upgrade_body.py index fa9c9fa..89d35a9 100644 --- a/test/test_instance_upgrade_body.py +++ b/test/test_instance_upgrade_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.instance_upgrade_body import InstanceUpgradeBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.instance_upgrade_body import InstanceUpgradeBody class TestInstanceUpgradeBody(unittest.TestCase): """InstanceUpgradeBody unit test stubs""" @@ -28,26 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InstanceUpgradeBody: """Test InstanceUpgradeBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.instance_upgrade_body.InstanceUpgradeBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InstanceUpgradeBody` + """ + model = InstanceUpgradeBody() + if include_optional: return InstanceUpgradeBody( - os = '', - osbuild = '' + os_version = '17.5', + os_build = '21F79' ) - else : + else: return InstanceUpgradeBody( - os = '', + os_version = '17.5', ) + """ def testInstanceUpgradeBody(self): """Test InstanceUpgradeBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_instance_upgrade_body_v1.py b/test/test_instance_upgrade_body_v1.py new file mode 100644 index 0000000..05ef2e2 --- /dev/null +++ b/test/test_instance_upgrade_body_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_upgrade_body_v1 import InstanceUpgradeBodyV1 + +class TestInstanceUpgradeBodyV1(unittest.TestCase): + """InstanceUpgradeBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceUpgradeBodyV1: + """Test InstanceUpgradeBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceUpgradeBodyV1` + """ + model = InstanceUpgradeBodyV1() + if include_optional: + return InstanceUpgradeBodyV1( + os = '', + osbuild = '' + ) + else: + return InstanceUpgradeBodyV1( + os = '', + ) + """ + + def testInstanceUpgradeBodyV1(self): + """Test InstanceUpgradeBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_upgrade_response.py b/test/test_instance_upgrade_response.py new file mode 100644 index 0000000..a5ac13c --- /dev/null +++ b/test/test_instance_upgrade_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_upgrade_response import InstanceUpgradeResponse + +class TestInstanceUpgradeResponse(unittest.TestCase): + """InstanceUpgradeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceUpgradeResponse: + """Test InstanceUpgradeResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceUpgradeResponse` + """ + model = InstanceUpgradeResponse() + if include_optional: + return InstanceUpgradeResponse( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + state = 'updating' + ) + else: + return InstanceUpgradeResponse( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + state = 'updating', + ) + """ + + def testInstanceUpgradeResponse(self): + """Test InstanceUpgradeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_v1.py b/test/test_instance_v1.py new file mode 100644 index 0000000..4b34c75 --- /dev/null +++ b/test/test_instance_v1.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.instance_v1 import InstanceV1 + +class TestInstanceV1(unittest.TestCase): + """InstanceV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceV1: + """Test InstanceV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceV1` + """ + model = InstanceV1() + if include_optional: + return InstanceV1( + id = '', + name = '', + key = '', + flavor = '', + flavor_name = '', + type = '', + project = '', + domain_name = '', + state = 'on', + state_changed = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + started_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + user_task = '', + task_state = '', + error = '', + restore_status = corellium.models.instance_restore_status_v1.InstanceRestoreStatusV1( + type = '', + stage = '', + progress = 1.337, + total_progress = 1.337, + heading = '', + description = '', ), + read_only = corellium.models.instance_read_only_status_v1.InstanceReadOnlyStatusV1( + read_only_status = '', ), + boot_options = corellium.models.instance_boot_options_v1.InstanceBootOptionsV1( + boot_args = '', + restore_boot_args = '', + udid = '', + ecid = '', + random_seed = '', + pac = True, + aprr = True, + additional_tags = [ + 'kalloc' + ], + kernel = corellium.models.instance_boot_options_kernel_v1.InstanceBootOptionsKernelV1( + firmware_path = '', ), + pongo = corellium.models.instance_boot_options_pongo_v1.InstanceBootOptionsPongoV1( + id = '', + name = '', + size = 1.337, ), ), + service_ip = '', + wifi_ip = '', + wifi_mac = '', + secondary_ip = '', + port_adb = 1.337, + port_usb = 1.337, + port_gdb = 1.337, + port_sep_gdb = 1.337, + port_cons = 1.337, + port_sep_cons = 1.337, + port_sys_cons = 1.337, + port_usbmuxd = 1.337, + port_frida = 1.337, + port_sockcap = 1.337, + port_model_gw = 1.337, + consoles = [ + corellium.models.instance_console_v1.InstanceConsoleV1( + name = '', + id = '', + port = 1.337, + hash = '', + info = '', ) + ], + services = corellium.models.instance_services_v1.InstanceServicesV1( + vpn = corellium.models.vpn_definition_v1.VpnDefinitionV1( + proxy = [ + None + ], + listeners = [ + None + ], ), ), + panicked = True, + created = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + model = '', + fwpackage = '', + os = '', + osbuild = '', + agent = corellium.models.instance_agent_state_v1.InstanceAgentStateV1( + hash = '', + info = '', ), + netmon = corellium.models.instance_netmon_state_v1.InstanceNetmonStateV1( + hash = '', + info = '', + enabled = True, ), + netdump = corellium.models.instance_netdump_state_v1.InstanceNetdumpStateV1( + hash = '', + info = '', + enabled = True, ), + core_trace = corellium.models.instance_trace_state_v1.InstanceTraceStateV1( + enabled = True, + length = 1.337, + filter = '', ), + hyper_trace = corellium.models.instance_hyper_trace_state_v1.InstanceHyperTraceStateV1( + enabled = 'enabling', + length = 1.337, + filter = '', ), + expose_port = '', + fault = True, + patches = [ + '' + ], + created_by = corellium.models.created_by.createdBy( + id = '', + username = '', + label = '', + deleted = True, ), + uefi_bootloader = True, + orientation = 1.337, + mast = True, + wan_access = True + ) + else: + return InstanceV1( + ) + """ + + def testInstanceV1(self): + """Test InstanceV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instances_api.py b/test/test_instances_api.py new file mode 100644 index 0000000..ea16e07 --- /dev/null +++ b/test/test_instances_api.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.instances_api import InstancesApi + + +class TestInstancesApi(unittest.TestCase): + """InstancesApi unit test stubs""" + + def setUp(self) -> None: + self.api = InstancesApi() + + def tearDown(self) -> None: + pass + + def test_v3_attach_instance_interface(self) -> None: + """Test case for v3_attach_instance_interface + + Connect an I/O interface + """ + pass + + def test_v3_clear_instance_panics(self) -> None: + """Test case for v3_clear_instance_panics + + Clear kernel panics + """ + pass + + def test_v3_create_instance(self) -> None: + """Test case for v3_create_instance + + Create a device + """ + pass + + def test_v3_delete_instance(self) -> None: + """Test case for v3_delete_instance + + Remove Instance + """ + pass + + def test_v3_detach_instance_interface(self) -> None: + """Test case for v3_detach_instance_interface + + Disconnect an I/O interface + """ + pass + + def test_v3_disable_expose_port(self) -> None: + """Test case for v3_disable_expose_port + + Stop exposing the device port + """ + pass + + def test_v3_download_netdump_pcap(self) -> None: + """Test case for v3_download_netdump_pcap + + Download the Enhanced Network Monitor capture + """ + pass + + def test_v3_download_network_monitor_pcap(self) -> None: + """Test case for v3_download_network_monitor_pcap + + Download the Network Monitor capture + """ + pass + + def test_v3_enable_expose_port(self) -> None: + """Test case for v3_enable_expose_port + + Expose the device port + """ + pass + + def test_v3_get_instance(self) -> None: + """Test case for v3_get_instance + + Get a device + """ + pass + + def test_v3_get_instance_console(self) -> None: + """Test case for v3_get_instance_console + + Get console websocket URL + """ + pass + + def test_v3_get_instance_console_log(self) -> None: + """Test case for v3_get_instance_console_log + + Read the console log + """ + pass + + def test_v3_get_instance_gpios(self) -> None: + """Test case for v3_get_instance_gpios + + Read board LEDs, buttons and switches + """ + pass + + def test_v3_get_instance_image_upload(self) -> None: + """Test case for v3_get_instance_image_upload + + Get image upload status + """ + pass + + def test_v3_get_instance_panics(self) -> None: + """Test case for v3_get_instance_panics + + List kernel panics + """ + pass + + def test_v3_get_instance_peripherals(self) -> None: + """Test case for v3_get_instance_peripherals + + Read simulated sensors + """ + pass + + def test_v3_get_instance_quick_connect_command(self) -> None: + """Test case for v3_get_instance_quick_connect_command + + Get the SSH quick-connect command + """ + pass + + def test_v3_get_instance_screenshot(self) -> None: + """Test case for v3_get_instance_screenshot + + Take a screenshot + """ + pass + + def test_v3_get_instance_state(self) -> None: + """Test case for v3_get_instance_state + + Get a device's state + """ + pass + + def test_v3_inject_message(self) -> None: + """Test case for v3_inject_message + + Send an SMS message to an iOS device + """ + pass + + def test_v3_kernel_preauthorize(self) -> None: + """Test case for v3_kernel_preauthorize + + Get a kernel download token + """ + pass + + def test_v3_list_instances(self) -> None: + """Test case for v3_list_instances + + List Instances + """ + pass + + def test_v3_media_play(self) -> None: + """Test case for v3_media_play + + Play a video or audio file into the device + """ + pass + + def test_v3_media_stop(self) -> None: + """Test case for v3_media_stop + + Stop playing media + """ + pass + + def test_v3_patch_instance(self) -> None: + """Test case for v3_patch_instance + + Change device settings + """ + pass + + def test_v3_patch_instance_read_only(self) -> None: + """Test case for v3_patch_instance_read_only + + Update Instance Read Only + """ + pass + + def test_v3_pause_instance(self) -> None: + """Test case for v3_pause_instance + + Pause a device + """ + pass + + def test_v3_post_instance_input(self) -> None: + """Test case for v3_post_instance_input + + Provide Instance Input + """ + pass + + def test_v3_put_instance_image_upload(self) -> None: + """Test case for v3_put_instance_image_upload + + Upload image chunk + """ + pass + + def test_v3_reboot_instance(self) -> None: + """Test case for v3_reboot_instance + + Restart a device + """ + pass + + def test_v3_restore_backup(self) -> None: + """Test case for v3_restore_backup + + Restore a backup onto a device + """ + pass + + def test_v3_rotate_instance(self) -> None: + """Test case for v3_rotate_instance + + Rotate the device + """ + pass + + def test_v3_set_instance_gpios(self) -> None: + """Test case for v3_set_instance_gpios + + Press board buttons or flip switches + """ + pass + + def test_v3_set_instance_peripherals(self) -> None: + """Test case for v3_set_instance_peripherals + + Change simulated sensors + """ + pass + + def test_v3_start_instance(self) -> None: + """Test case for v3_start_instance + + Turn a device on + """ + pass + + def test_v3_start_netdump(self) -> None: + """Test case for v3_start_netdump + + Start Enhanced Network Monitor + """ + pass + + def test_v3_start_network_monitor(self) -> None: + """Test case for v3_start_network_monitor + + Start Network Monitor + """ + pass + + def test_v3_stop_instance(self) -> None: + """Test case for v3_stop_instance + + Turn a device off + """ + pass + + def test_v3_stop_netdump(self) -> None: + """Test case for v3_stop_netdump + + Stop Enhanced Network Monitor + """ + pass + + def test_v3_stop_network_monitor(self) -> None: + """Test case for v3_stop_network_monitor + + Stop Network Monitor + """ + pass + + def test_v3_unpause_instance(self) -> None: + """Test case for v3_unpause_instance + + Resume a paused device + """ + pass + + def test_v3_upgrade_instance(self) -> None: + """Test case for v3_upgrade_instance + + Upgrade the iOS version + """ + pass + + def test_v3_validate_instance_token(self) -> None: + """Test case for v3_validate_instance_token + + Check a device connection token + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instances_v1_api.py b/test/test_instances_v1_api.py new file mode 100644 index 0000000..6bc74d9 --- /dev/null +++ b/test/test_instances_v1_api.py @@ -0,0 +1,298 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.instances_v1_api import InstancesV1Api + + +class TestInstancesV1Api(unittest.TestCase): + """InstancesV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = InstancesV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_attach_instance_interface(self) -> None: + """Test case for v1_attach_instance_interface + + Attach I/O Interface + """ + pass + + def test_v1_clear_instance_panics(self) -> None: + """Test case for v1_clear_instance_panics + + Clear Panics + """ + pass + + def test_v1_create_instance(self) -> None: + """Test case for v1_create_instance + + Create Instance + """ + pass + + def test_v1_delete_instance(self) -> None: + """Test case for v1_delete_instance + + Remove Instance + """ + pass + + def test_v1_detach_instance_interface(self) -> None: + """Test case for v1_detach_instance_interface + + Detach I/O Interface + """ + pass + + def test_v1_disable_expose_port(self) -> None: + """Test case for v1_disable_expose_port + + Disable an exposed port on an instance for device access. + """ + pass + + def test_v1_download_netdump_pcap_instances(self) -> None: + """Test case for v1_download_netdump_pcap_instances + + Download a netdump pcap file + """ + pass + + def test_v1_download_network_monitor_pcap_instances(self) -> None: + """Test case for v1_download_network_monitor_pcap_instances + + Download a Network Monitor pcap file + """ + pass + + def test_v1_enable_expose_port(self) -> None: + """Test case for v1_enable_expose_port + + Enable an exposed port on an instance for device access. + """ + pass + + def test_v1_get_instance(self) -> None: + """Test case for v1_get_instance + + Get Instance + """ + pass + + def test_v1_get_instance_console(self) -> None: + """Test case for v1_get_instance_console + + Get console websocket URL + """ + pass + + def test_v1_get_instance_console_log(self) -> None: + """Test case for v1_get_instance_console_log + + Get Console Log + """ + pass + + def test_v1_get_instance_gpios(self) -> None: + """Test case for v1_get_instance_gpios + + Get Instance GPIOs + """ + pass + + def test_v1_get_instance_panics(self) -> None: + """Test case for v1_get_instance_panics + + Get Panics + """ + pass + + def test_v1_get_instance_peripherals(self) -> None: + """Test case for v1_get_instance_peripherals + + Get Instance Peripherals + """ + pass + + def test_v1_get_instance_screenshot(self) -> None: + """Test case for v1_get_instance_screenshot + + Get Instance Screenshot + """ + pass + + def test_v1_get_instances(self) -> None: + """Test case for v1_get_instances + + Get Instances + """ + pass + + def test_v1_inject_message_instances(self) -> None: + """Test case for v1_inject_message_instances + + Inject a message into an iOS VM + """ + pass + + def test_v1_media_play(self) -> None: + """Test case for v1_media_play + + Start playing media + """ + pass + + def test_v1_media_stop(self) -> None: + """Test case for v1_media_stop + + Stop playing media + """ + pass + + def test_v1_patch_instance(self) -> None: + """Test case for v1_patch_instance + + Update Instance + """ + pass + + def test_v1_patch_instance_read_only(self) -> None: + """Test case for v1_patch_instance_read_only + + Update Instance Read Only + """ + pass + + def test_v1_pause_instance(self) -> None: + """Test case for v1_pause_instance + + Pause an Instance + """ + pass + + def test_v1_post_instance_input(self) -> None: + """Test case for v1_post_instance_input + + Provide Instance Input + """ + pass + + def test_v1_reboot_instance(self) -> None: + """Test case for v1_reboot_instance + + Reboot an Instance + """ + pass + + def test_v1_restore_backup(self) -> None: + """Test case for v1_restore_backup + + Restore backup + """ + pass + + def test_v1_rotate_instance(self) -> None: + """Test case for v1_rotate_instance + + Rotate device to specified orientation + """ + pass + + def test_v1_set_instance_gpios(self) -> None: + """Test case for v1_set_instance_gpios + + Set Instance GPIOs + """ + pass + + def test_v1_set_instance_peripherals(self) -> None: + """Test case for v1_set_instance_peripherals + + Update Instance Peripherals + """ + pass + + def test_v1_set_instance_state(self) -> None: + """Test case for v1_set_instance_state + + Set state of Instance + """ + pass + + def test_v1_start_instance(self) -> None: + """Test case for v1_start_instance + + Start an Instance + """ + pass + + def test_v1_start_netdump(self) -> None: + """Test case for v1_start_netdump + + Start Enhanced Network Monitor on an instance. + """ + pass + + def test_v1_start_network_monitor(self) -> None: + """Test case for v1_start_network_monitor + + Start Network Monitor on an instance. + """ + pass + + def test_v1_stop_instance(self) -> None: + """Test case for v1_stop_instance + + Stop an Instance + """ + pass + + def test_v1_stop_netdump(self) -> None: + """Test case for v1_stop_netdump + + Stop Enhanced Network Monitor on an instance. + """ + pass + + def test_v1_stop_network_monitor(self) -> None: + """Test case for v1_stop_network_monitor + + Stop Network Monitor on an instance. + """ + pass + + def test_v1_unpause_instance(self) -> None: + """Test case for v1_unpause_instance + + Unpause an Instance + """ + pass + + def test_v1_upgrade_instance(self) -> None: + """Test case for v1_upgrade_instance + + Upgrade iOS version + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instances_v2_api.py b/test/test_instances_v2_api.py new file mode 100644 index 0000000..21e91cc --- /dev/null +++ b/test/test_instances_v2_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.instances_v2_api import InstancesV2Api + + +class TestInstancesV2Api(unittest.TestCase): + """InstancesV2Api unit test stubs""" + + def setUp(self) -> None: + self.api = InstancesV2Api() + + def tearDown(self) -> None: + pass + + def test_v2_get_instance_quick_connect_command(self) -> None: + """Test case for v2_get_instance_quick_connect_command + + Recommended SSH Command for Quick Connect + """ + pass + + def test_v2_get_instance_state(self) -> None: + """Test case for v2_get_instance_state + + Get state of Instance + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_insufficient_storage_error.py b/test/test_insufficient_storage_error.py new file mode 100644 index 0000000..c55a0f9 --- /dev/null +++ b/test/test_insufficient_storage_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.insufficient_storage_error import InsufficientStorageError + +class TestInsufficientStorageError(unittest.TestCase): + """InsufficientStorageError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InsufficientStorageError: + """Test InsufficientStorageError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InsufficientStorageError` + """ + model = InsufficientStorageError() + if include_optional: + return InsufficientStorageError( + error = 'There is not enough storage space to store the requested file', + error_id = 'InsufficientStorage', + total = 2199023255552, + available = 1073741824, + required = 3448156160 + ) + else: + return InsufficientStorageError( + error = 'There is not enough storage space to store the requested file', + error_id = 'InsufficientStorage', + total = 2199023255552, + available = 1073741824, + required = 3448156160, + ) + """ + + def testInsufficientStorageError(self): + """Test InsufficientStorageError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_insufficient_storage_error_v1.py b/test/test_insufficient_storage_error_v1.py new file mode 100644 index 0000000..bfdd1dd --- /dev/null +++ b/test/test_insufficient_storage_error_v1.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.insufficient_storage_error_v1 import InsufficientStorageErrorV1 + +class TestInsufficientStorageErrorV1(unittest.TestCase): + """InsufficientStorageErrorV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InsufficientStorageErrorV1: + """Test InsufficientStorageErrorV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InsufficientStorageErrorV1` + """ + model = InsufficientStorageErrorV1() + if include_optional: + return InsufficientStorageErrorV1( + error_id = '', + error = '', + total = 1.337, + available = 1.337, + required = 1.337 + ) + else: + return InsufficientStorageErrorV1( + required = 1.337, + ) + """ + + def testInsufficientStorageErrorV1(self): + """Test InsufficientStorageErrorV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interconnect.py b/test/test_interconnect.py new file mode 100644 index 0000000..0ee7413 --- /dev/null +++ b/test/test_interconnect.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.interconnect import Interconnect + +class TestInterconnect(unittest.TestCase): + """Interconnect unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Interconnect: + """Test Interconnect + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Interconnect` + """ + model = Interconnect() + if include_optional: + return Interconnect( + name = 'vpn-gateway', + type = 'hub', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ], + id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + protocol = 'eth', + status = 'attached', + instance_count = 2, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return Interconnect( + name = 'vpn-gateway', + type = 'hub', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ], + id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + protocol = 'eth', + status = 'attached', + instance_count = 2, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testInterconnect(self): + """Test Interconnect""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interconnect_list.py b/test/test_interconnect_list.py new file mode 100644 index 0000000..f56f793 --- /dev/null +++ b/test/test_interconnect_list.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.interconnect_list import InterconnectList + +class TestInterconnectList(unittest.TestCase): + """InterconnectList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InterconnectList: + """Test InterconnectList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InterconnectList` + """ + model = InterconnectList() + if include_optional: + return InterconnectList( + results = [ + corellium.models.interconnect.Interconnect( + name = 'vpn-gateway', + type = 'hub', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ], + id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + protocol = 'eth', + status = 'attached', + instance_count = 2, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return InterconnectList( + results = [ + corellium.models.interconnect.Interconnect( + name = 'vpn-gateway', + type = 'hub', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ], + id = '56494514-33f7-4fc2-9fdc-865e3957e6d3', + protocol = 'eth', + status = 'attached', + instance_count = 2, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testInterconnectList(self): + """Test InterconnectList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interconnect_protocol.py b/test/test_interconnect_protocol.py new file mode 100644 index 0000000..ad67e78 --- /dev/null +++ b/test/test_interconnect_protocol.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.interconnect_protocol import InterconnectProtocol + +class TestInterconnectProtocol(unittest.TestCase): + """InterconnectProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInterconnectProtocol(self): + """Test InterconnectProtocol""" + # inst = InterconnectProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interconnect_response.py b/test/test_interconnect_response.py index 7a46631..042c087 100644 --- a/test/test_interconnect_response.py +++ b/test/test_interconnect_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.interconnect_response import InterconnectResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.interconnect_response import InterconnectResponse class TestInterconnectResponse(unittest.TestCase): """InterconnectResponse unit test stubs""" @@ -28,36 +26,39 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InterconnectResponse: """Test InterconnectResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.interconnect_response.InterconnectResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InterconnectResponse` + """ + model = InterconnectResponse() + if include_optional: return InterconnectResponse( - id = '', - name = '', - protocol = '', - type = 'hub', - project = '', - status = '', + id = '', + name = '', + protocol = '', + type = 'hub', + project = '', + status = '', interfaces = [ - corellium_api.models.instance_interface.InstanceInterface( + corellium.models.instance_interface.InstanceInterface( device_id = '', interface_id = '', ) - ], - created_at = '', + ], + created_at = '', updated_at = '' ) - else : + else: return InterconnectResponse( ) + """ def testInterconnectResponse(self): """Test InterconnectResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_interconnects_api.py b/test/test_interconnects_api.py new file mode 100644 index 0000000..017f23d --- /dev/null +++ b/test/test_interconnects_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.interconnects_api import InterconnectsApi + + +class TestInterconnectsApi(unittest.TestCase): + """InterconnectsApi unit test stubs""" + + def setUp(self) -> None: + self.api = InterconnectsApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_interconnect(self) -> None: + """Test case for v3_create_interconnect + + Create I/O Interconnect + """ + pass + + def test_v3_delete_interconnect(self) -> None: + """Test case for v3_delete_interconnect + + Delete I/O Interconnect + """ + pass + + def test_v3_get_interconnect(self) -> None: + """Test case for v3_get_interconnect + + Get Interconnect + """ + pass + + def test_v3_list_interconnects(self) -> None: + """Test case for v3_list_interconnects + + List I/O Interconnects + """ + pass + + def test_v3_patch_interconnect(self) -> None: + """Test case for v3_patch_interconnect + + Patch I/O Interconnect + """ + pass + + def test_v3_update_interconnect(self) -> None: + """Test case for v3_update_interconnect + + Update I/O Interconnect + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interconnects_v1_api.py b/test/test_interconnects_v1_api.py new file mode 100644 index 0000000..a050f5b --- /dev/null +++ b/test/test_interconnects_v1_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.interconnects_v1_api import InterconnectsV1Api + + +class TestInterconnectsV1Api(unittest.TestCase): + """InterconnectsV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = InterconnectsV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_create_interconnect(self) -> None: + """Test case for v1_create_interconnect + + Create I/O Interconnect + """ + pass + + def test_v1_delete_interconnect(self) -> None: + """Test case for v1_delete_interconnect + + Delete I/O Interconnect + """ + pass + + def test_v1_get_interconnect(self) -> None: + """Test case for v1_get_interconnect + + Get Interconnect + """ + pass + + def test_v1_list_interconnects(self) -> None: + """Test case for v1_list_interconnects + + Get all I/O Interconnects + """ + pass + + def test_v1_patch_interconnect(self) -> None: + """Test case for v1_patch_interconnect + + Partial Update Interconnect + """ + pass + + def test_v1_update_interconnect(self) -> None: + """Test case for v1_update_interconnect + + Update Interconnect + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_interfaces_schema_inner.py b/test/test_interfaces_schema_inner.py new file mode 100644 index 0000000..17efc0e --- /dev/null +++ b/test/test_interfaces_schema_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.interfaces_schema_inner import InterfacesSchemaInner + +class TestInterfacesSchemaInner(unittest.TestCase): + """InterfacesSchemaInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InterfacesSchemaInner: + """Test InterfacesSchemaInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InterfacesSchemaInner` + """ + model = InterfacesSchemaInner() + if include_optional: + return InterfacesSchemaInner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2' + ) + else: + return InterfacesSchemaInner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', + ) + """ + + def testInterfacesSchemaInner(self): + """Test InterfacesSchemaInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invalid_credentials_error.py b/test/test_invalid_credentials_error.py new file mode 100644 index 0000000..b2741f8 --- /dev/null +++ b/test/test_invalid_credentials_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invalid_credentials_error import InvalidCredentialsError + +class TestInvalidCredentialsError(unittest.TestCase): + """InvalidCredentialsError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InvalidCredentialsError: + """Test InvalidCredentialsError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InvalidCredentialsError` + """ + model = InvalidCredentialsError() + if include_optional: + return InvalidCredentialsError( + error = 'The credentials are incorrect or you may be using a different authentication provider.', + error_id = 'InvalidUsernameorPassword' + ) + else: + return InvalidCredentialsError( + error = 'The credentials are incorrect or you may be using a different authentication provider.', + error_id = 'InvalidUsernameorPassword', + ) + """ + + def testInvalidCredentialsError(self): + """Test InvalidCredentialsError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invalid_totp_error.py b/test/test_invalid_totp_error.py new file mode 100644 index 0000000..5770b63 --- /dev/null +++ b/test/test_invalid_totp_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invalid_totp_error import InvalidTOTPError + +class TestInvalidTOTPError(unittest.TestCase): + """InvalidTOTPError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InvalidTOTPError: + """Test InvalidTOTPError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InvalidTOTPError` + """ + model = InvalidTOTPError() + if include_optional: + return InvalidTOTPError( + error = 'Invalid TOTP.', + error_id = 'InvalidTOTP' + ) + else: + return InvalidTOTPError( + error = 'Invalid TOTP.', + error_id = 'InvalidTOTP', + ) + """ + + def testInvalidTOTPError(self): + """Test InvalidTOTPError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invitation.py b/test/test_invitation.py index ddfecfe..cb3663c 100644 --- a/test/test_invitation.py +++ b/test/test_invitation.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.invitation import Invitation # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.invitation import Invitation class TestInvitation(unittest.TestCase): """Invitation unit test stubs""" @@ -28,26 +26,36 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Invitation: """Test Invitation - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.invitation.Invitation() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Invitation` + """ + model = Invitation() + if include_optional: return Invitation( - identifier = '', - email = '', - settings = None + id = '5ac8f0be-616d-45b9-b0af-e586fc65ad19', + email = 'jane.doe@example.com', + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ) ) - else : + else: return Invitation( + id = '5ac8f0be-616d-45b9-b0af-e586fc65ad19', + email = 'jane.doe@example.com', + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ), ) + """ def testInvitation(self): """Test Invitation""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_invitation_by_token.py b/test/test_invitation_by_token.py new file mode 100644 index 0000000..7bb16bd --- /dev/null +++ b/test/test_invitation_by_token.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invitation_by_token import InvitationByToken + +class TestInvitationByToken(unittest.TestCase): + """InvitationByToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InvitationByToken: + """Test InvitationByToken + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InvitationByToken` + """ + model = InvitationByToken() + if include_optional: + return InvitationByToken( + id = '5ac8f0be-616d-45b9-b0af-e586fc65ad19', + email = 'jane.doe@example.com', + domain = 'acme-corp', + display_name = 'Acme Corp', + terms_agreement_required = True, + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ) + ) + else: + return InvitationByToken( + id = '5ac8f0be-616d-45b9-b0af-e586fc65ad19', + email = 'jane.doe@example.com', + domain = 'acme-corp', + display_name = 'Acme Corp', + terms_agreement_required = True, + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ), + ) + """ + + def testInvitationByToken(self): + """Test InvitationByToken""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invitation_v1.py b/test/test_invitation_v1.py new file mode 100644 index 0000000..b04b916 --- /dev/null +++ b/test/test_invitation_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invitation_v1 import InvitationV1 + +class TestInvitationV1(unittest.TestCase): + """InvitationV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InvitationV1: + """Test InvitationV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InvitationV1` + """ + model = InvitationV1() + if include_optional: + return InvitationV1( + identifier = '', + email = '', + settings = None + ) + else: + return InvitationV1( + ) + """ + + def testInvitationV1(self): + """Test InvitationV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_created.py b/test/test_invite_created.py new file mode 100644 index 0000000..527aae4 --- /dev/null +++ b/test/test_invite_created.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invite_created import InviteCreated + +class TestInviteCreated(unittest.TestCase): + """InviteCreated unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteCreated: + """Test InviteCreated + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteCreated` + """ + model = InviteCreated() + if include_optional: + return InviteCreated( + id = '', + email = '', + settings = None + ) + else: + return InviteCreated( + ) + """ + + def testInviteCreated(self): + """Test InviteCreated""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_created_entry.py b/test/test_invite_created_entry.py new file mode 100644 index 0000000..707d006 --- /dev/null +++ b/test/test_invite_created_entry.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invite_created_entry import InviteCreatedEntry + +class TestInviteCreatedEntry(unittest.TestCase): + """InviteCreatedEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteCreatedEntry: + """Test InviteCreatedEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteCreatedEntry` + """ + model = InviteCreatedEntry() + if include_optional: + return InviteCreatedEntry( + invite = corellium.models.invite_created.InviteCreated( + id = '', + email = '', + settings = corellium.models.settings.settings(), ) + ) + else: + return InviteCreatedEntry( + ) + """ + + def testInviteCreatedEntry(self): + """Test InviteCreatedEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_result.py b/test/test_invite_result.py new file mode 100644 index 0000000..7375134 --- /dev/null +++ b/test/test_invite_result.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invite_result import InviteResult + +class TestInviteResult(unittest.TestCase): + """InviteResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteResult: + """Test InviteResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteResult` + """ + model = InviteResult() + if include_optional: + return InviteResult( + invite = corellium.models.invitation.Invitation( + id = '5ac8f0be-616d-45b9-b0af-e586fc65ad19', + email = 'jane.doe@example.com', + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ), ), + error = corellium.models.invite_result_error.InviteResultError( + error = 'An invite has already been sent to jane.doe@example.com for this domain', ) + ) + else: + return InviteResult( + ) + """ + + def testInviteResult(self): + """Test InviteResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_result_error.py b/test/test_invite_result_error.py new file mode 100644 index 0000000..c6d4ffa --- /dev/null +++ b/test/test_invite_result_error.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invite_result_error import InviteResultError + +class TestInviteResultError(unittest.TestCase): + """InviteResultError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteResultError: + """Test InviteResultError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteResultError` + """ + model = InviteResultError() + if include_optional: + return InviteResultError( + error = 'An invite has already been sent to jane.doe@example.com for this domain' + ) + else: + return InviteResultError( + error = 'An invite has already been sent to jane.doe@example.com for this domain', + ) + """ + + def testInviteResultError(self): + """Test InviteResultError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_revoke_params.py b/test/test_invite_revoke_params.py index 2b068fe..ddc4e8e 100644 --- a/test/test_invite_revoke_params.py +++ b/test/test_invite_revoke_params.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.invite_revoke_params import InviteRevokeParams # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.invite_revoke_params import InviteRevokeParams class TestInviteRevokeParams(unittest.TestCase): """InviteRevokeParams unit test stubs""" @@ -28,24 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> InviteRevokeParams: """Test InviteRevokeParams - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.invite_revoke_params.InviteRevokeParams() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `InviteRevokeParams` + """ + model = InviteRevokeParams() + if include_optional: return InviteRevokeParams( - ids = None + ids = [ + '' + ] ) - else : + else: return InviteRevokeParams( ) + """ def testInviteRevokeParams(self): """Test InviteRevokeParams""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_invite_revoke_params_ids.py b/test/test_invite_revoke_params_ids.py deleted file mode 100644 index 2c87577..0000000 --- a/test/test_invite_revoke_params_ids.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.invite_revoke_params_ids import InviteRevokeParamsIds # noqa: E501 -from corellium_api.rest import ApiException - -class TestInviteRevokeParamsIds(unittest.TestCase): - """InviteRevokeParamsIds unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test InviteRevokeParamsIds - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.invite_revoke_params_ids.InviteRevokeParamsIds() # noqa: E501 - if include_optional : - return InviteRevokeParamsIds( - ) - else : - return InviteRevokeParamsIds( - ) - - def testInviteRevokeParamsIds(self): - """Test InviteRevokeParamsIds""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_invite_settings.py b/test/test_invite_settings.py new file mode 100644 index 0000000..2b6fa67 --- /dev/null +++ b/test/test_invite_settings.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invite_settings import InviteSettings + +class TestInviteSettings(unittest.TestCase): + """InviteSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteSettings: + """Test InviteSettings + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteSettings` + """ + model = InviteSettings() + if include_optional: + return InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]] + ) + else: + return InviteSettings( + ) + """ + + def testInviteSettings(self): + """Test InviteSettings""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_signup_body.py b/test/test_invite_signup_body.py new file mode 100644 index 0000000..5ea8275 --- /dev/null +++ b/test/test_invite_signup_body.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invite_signup_body import InviteSignupBody + +class TestInviteSignupBody(unittest.TestCase): + """InviteSignupBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteSignupBody: + """Test InviteSignupBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteSignupBody` + """ + model = InviteSignupBody() + if include_optional: + return InviteSignupBody( + invite_token = '', + params = corellium.models.invite_signup_body_params.InviteSignupBody_params( + email = 'jane.doe@example.com', + password = '', + label = 'Jane Doe', + agreed = True, ) + ) + else: + return InviteSignupBody( + invite_token = '', + params = corellium.models.invite_signup_body_params.InviteSignupBody_params( + email = 'jane.doe@example.com', + password = '', + label = 'Jane Doe', + agreed = True, ), + ) + """ + + def testInviteSignupBody(self): + """Test InviteSignupBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_signup_body_params.py b/test/test_invite_signup_body_params.py new file mode 100644 index 0000000..0873677 --- /dev/null +++ b/test/test_invite_signup_body_params.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invite_signup_body_params import InviteSignupBodyParams + +class TestInviteSignupBodyParams(unittest.TestCase): + """InviteSignupBodyParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteSignupBodyParams: + """Test InviteSignupBodyParams + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteSignupBodyParams` + """ + model = InviteSignupBodyParams() + if include_optional: + return InviteSignupBodyParams( + email = 'jane.doe@example.com', + password = '', + label = 'Jane Doe', + agreed = True + ) + else: + return InviteSignupBodyParams( + password = '', + label = 'Jane Doe', + agreed = True, + ) + """ + + def testInviteSignupBodyParams(self): + """Test InviteSignupBodyParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invite_signup_response.py b/test/test_invite_signup_response.py new file mode 100644 index 0000000..2463c59 --- /dev/null +++ b/test/test_invite_signup_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invite_signup_response import InviteSignupResponse + +class TestInviteSignupResponse(unittest.TestCase): + """InviteSignupResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteSignupResponse: + """Test InviteSignupResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InviteSignupResponse` + """ + model = InviteSignupResponse() + if include_optional: + return InviteSignupResponse( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' + ) + else: + return InviteSignupResponse( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + ) + """ + + def testInviteSignupResponse(self): + """Test InviteSignupResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invites_api.py b/test/test_invites_api.py new file mode 100644 index 0000000..6563829 --- /dev/null +++ b/test/test_invites_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.invites_api import InvitesApi + + +class TestInvitesApi(unittest.TestCase): + """InvitesApi unit test stubs""" + + def setUp(self) -> None: + self.api = InvitesApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_invites(self) -> None: + """Test case for v3_create_invites + + Create invites + """ + pass + + def test_v3_edit_invites(self) -> None: + """Test case for v3_edit_invites + + Edit invites + """ + pass + + def test_v3_get_invite_by_token(self) -> None: + """Test case for v3_get_invite_by_token + + Get an invite by token + """ + pass + + def test_v3_list_invites(self) -> None: + """Test case for v3_list_invites + + List invites + """ + pass + + def test_v3_revoke_invites(self) -> None: + """Test case for v3_revoke_invites + + Revoke invites + """ + pass + + def test_v3_signup_from_invite(self) -> None: + """Test case for v3_signup_from_invite + + Sign up from an invite + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invites_list_response.py b/test/test_invites_list_response.py new file mode 100644 index 0000000..447d385 --- /dev/null +++ b/test/test_invites_list_response.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.invites_list_response import InvitesListResponse + +class TestInvitesListResponse(unittest.TestCase): + """InvitesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InvitesListResponse: + """Test InvitesListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InvitesListResponse` + """ + model = InvitesListResponse() + if include_optional: + return InvitesListResponse( + results = [ + corellium.models.invitation.Invitation( + id = '5ac8f0be-616d-45b9-b0af-e586fc65ad19', + email = 'jane.doe@example.com', + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ), ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return InvitesListResponse( + results = [ + corellium.models.invitation.Invitation( + id = '5ac8f0be-616d-45b9-b0af-e586fc65ad19', + email = 'jane.doe@example.com', + settings = corellium.models.invite_settings.InviteSettings( + teams = ["089c8ffd-ca4d-4d35-80ab-0847d18b7213"], + projects = [["1c41b1bc-4f53-48a8-b690-ad30611e1960","admin"]], ), ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testInvitesListResponse(self): + """Test InvitesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invites_v1_api.py b/test/test_invites_v1_api.py new file mode 100644 index 0000000..480d875 --- /dev/null +++ b/test/test_invites_v1_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.invites_v1_api import InvitesV1Api + + +class TestInvitesV1Api(unittest.TestCase): + """InvitesV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = InvitesV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_create_user_invites(self) -> None: + """Test case for v1_create_user_invites + + Create Invite + """ + pass + + def test_v1_edit_invites(self) -> None: + """Test case for v1_edit_invites + + + """ + pass + + def test_v1_invites(self) -> None: + """Test case for v1_invites + + Get Invites + """ + pass + + def test_v1_invites_by_token(self) -> None: + """Test case for v1_invites_by_token + + + """ + pass + + def test_v1_revoke_user_invite(self) -> None: + """Test case for v1_revoke_user_invite + + Revoke Invite + """ + pass + + def test_v1_user_create_from_invite(self) -> None: + """Test case for v1_user_create_from_invite + + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ipsw_device_constraint.py b/test/test_ipsw_device_constraint.py new file mode 100644 index 0000000..81e6d84 --- /dev/null +++ b/test/test_ipsw_device_constraint.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ipsw_device_constraint import IpswDeviceConstraint + +class TestIpswDeviceConstraint(unittest.TestCase): + """IpswDeviceConstraint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpswDeviceConstraint: + """Test IpswDeviceConstraint + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpswDeviceConstraint` + """ + model = IpswDeviceConstraint() + if include_optional: + return IpswDeviceConstraint( + product = '' + ) + else: + return IpswDeviceConstraint( + ) + """ + + def testIpswDeviceConstraint(self): + """Test IpswDeviceConstraint""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ipsw_filter.py b/test/test_ipsw_filter.py new file mode 100644 index 0000000..66cdf50 --- /dev/null +++ b/test/test_ipsw_filter.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ipsw_filter import IpswFilter + +class TestIpswFilter(unittest.TestCase): + """IpswFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpswFilter: + """Test IpswFilter + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpswFilter` + """ + model = IpswFilter() + if include_optional: + return IpswFilter( + version = corellium.models.ipsw_version_constraint.IpswVersionConstraint( + lt = '', + le = '', + gt = '', + ge = '', + eq = '', ), + device = corellium.models.ipsw_device_constraint.IpswDeviceConstraint( + product = '', ), + exclude = True, + include = True + ) + else: + return IpswFilter( + ) + """ + + def testIpswFilter(self): + """Test IpswFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ipsw_filter_v3.py b/test/test_ipsw_filter_v3.py new file mode 100644 index 0000000..0d79ab3 --- /dev/null +++ b/test/test_ipsw_filter_v3.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ipsw_filter_v3 import IpswFilterV3 + +class TestIpswFilterV3(unittest.TestCase): + """IpswFilterV3 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpswFilterV3: + """Test IpswFilterV3 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpswFilterV3` + """ + model = IpswFilterV3() + if include_optional: + return IpswFilterV3( + version = { + 'key' : null + }, + device = { + 'key' : null + }, + exclude = False, + include = True + ) + else: + return IpswFilterV3( + ) + """ + + def testIpswFilterV3(self): + """Test IpswFilterV3""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ipsw_filter_v3_device.py b/test/test_ipsw_filter_v3_device.py new file mode 100644 index 0000000..f8b51de --- /dev/null +++ b/test/test_ipsw_filter_v3_device.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ipsw_filter_v3_device import IpswFilterV3Device + +class TestIpswFilterV3Device(unittest.TestCase): + """IpswFilterV3Device unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpswFilterV3Device: + """Test IpswFilterV3Device + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpswFilterV3Device` + """ + model = IpswFilterV3Device() + if include_optional: + return IpswFilterV3Device( + product = 'iPhone16,.*' + ) + else: + return IpswFilterV3Device( + ) + """ + + def testIpswFilterV3Device(self): + """Test IpswFilterV3Device""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ipsw_filter_v3_version.py b/test/test_ipsw_filter_v3_version.py new file mode 100644 index 0000000..fe027d5 --- /dev/null +++ b/test/test_ipsw_filter_v3_version.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ipsw_filter_v3_version import IpswFilterV3Version + +class TestIpswFilterV3Version(unittest.TestCase): + """IpswFilterV3Version unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpswFilterV3Version: + """Test IpswFilterV3Version + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpswFilterV3Version` + """ + model = IpswFilterV3Version() + if include_optional: + return IpswFilterV3Version( + lt = '18.0', + le = '17.6', + gt = '16.0', + ge = '17.0', + eq = '17.5' + ) + else: + return IpswFilterV3Version( + ) + """ + + def testIpswFilterV3Version(self): + """Test IpswFilterV3Version""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ipsw_version_constraint.py b/test/test_ipsw_version_constraint.py new file mode 100644 index 0000000..1e3d142 --- /dev/null +++ b/test/test_ipsw_version_constraint.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ipsw_version_constraint import IpswVersionConstraint + +class TestIpswVersionConstraint(unittest.TestCase): + """IpswVersionConstraint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IpswVersionConstraint: + """Test IpswVersionConstraint + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IpswVersionConstraint` + """ + model = IpswVersionConstraint() + if include_optional: + return IpswVersionConstraint( + lt = '', + le = '', + gt = '', + ge = '', + eq = '' + ) + else: + return IpswVersionConstraint( + ) + """ + + def testIpswVersionConstraint(self): + """Test IpswVersionConstraint""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_kcrange.py b/test/test_kcrange.py index 636acf8..14a98e7 100644 --- a/test/test_kcrange.py +++ b/test/test_kcrange.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.kcrange import Kcrange # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.kcrange import Kcrange class TestKcrange(unittest.TestCase): """Kcrange unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Kcrange: """Test Kcrange - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.kcrange.Kcrange() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Kcrange` + """ + model = Kcrange() + if include_optional: return Kcrange( - kext = '', - range = [ - '' - ] + kernel_extension = 'com.apple.driver.AppleMobileFileIntegrity', + range = ["0xfffffff007c88000","0xfffffff007d1c000"] ) - else : + else: return Kcrange( + kernel_extension = 'com.apple.driver.AppleMobileFileIntegrity', + range = ["0xfffffff007c88000","0xfffffff007d1c000"], ) + """ def testKcrange(self): """Test Kcrange""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_kcrange_v1.py b/test/test_kcrange_v1.py new file mode 100644 index 0000000..52840a7 --- /dev/null +++ b/test/test_kcrange_v1.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.kcrange_v1 import KcrangeV1 + +class TestKcrangeV1(unittest.TestCase): + """KcrangeV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KcrangeV1: + """Test KcrangeV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KcrangeV1` + """ + model = KcrangeV1() + if include_optional: + return KcrangeV1( + kext = '', + range = [ + '' + ] + ) + else: + return KcrangeV1( + ) + """ + + def testKcrangeV1(self): + """Test KcrangeV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_kernel_task.py b/test/test_kernel_task.py index 50bb785..e74e4fb 100644 --- a/test/test_kernel_task.py +++ b/test/test_kernel_task.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.kernel_task import KernelTask # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.kernel_task import KernelTask class TestKernelTask(unittest.TestCase): """KernelTask unit test stubs""" @@ -28,34 +26,44 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> KernelTask: """Test KernelTask - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.kernel_task.KernelTask() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `KernelTask` + """ + model = KernelTask() + if include_optional: return KernelTask( - kernel_id = '', - name = '', - pid = 56, + kernel_id = '0xffffff8012345000', + name = 'launchd', + process_id = 1, threads = [ - corellium_api.models.kernel_thread.KernelThread( - kernel_id = '', - tid = 56, - stack = [ - '' - ], ) + corellium.models.kernel_thread.KernelThread( + kernel_id = '0xffffff8012345678', + task_id = 1, + stack = ["0xffffff8012345678","0xffffff8012345690"], ) ] ) - else : + else: return KernelTask( + kernel_id = '0xffffff8012345000', + name = 'launchd', + process_id = 1, + threads = [ + corellium.models.kernel_thread.KernelThread( + kernel_id = '0xffffff8012345678', + task_id = 1, + stack = ["0xffffff8012345678","0xffffff8012345690"], ) + ], ) + """ def testKernelTask(self): """Test KernelTask""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_kernel_task_v1.py b/test/test_kernel_task_v1.py new file mode 100644 index 0000000..b2afd42 --- /dev/null +++ b/test/test_kernel_task_v1.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.kernel_task_v1 import KernelTaskV1 + +class TestKernelTaskV1(unittest.TestCase): + """KernelTaskV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KernelTaskV1: + """Test KernelTaskV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KernelTaskV1` + """ + model = KernelTaskV1() + if include_optional: + return KernelTaskV1( + kernel_id = '', + name = '', + pid = 56, + threads = [ + corellium.models.kernel_thread_v1.KernelThreadV1( + kernel_id = '', + tid = 56, + stack = [ + '' + ], ) + ] + ) + else: + return KernelTaskV1( + ) + """ + + def testKernelTaskV1(self): + """Test KernelTaskV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_kernel_thread.py b/test/test_kernel_thread.py index 5729bbc..36772b7 100644 --- a/test/test_kernel_thread.py +++ b/test/test_kernel_thread.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.kernel_thread import KernelThread # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.kernel_thread import KernelThread class TestKernelThread(unittest.TestCase): """KernelThread unit test stubs""" @@ -28,28 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> KernelThread: """Test KernelThread - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.kernel_thread.KernelThread() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `KernelThread` + """ + model = KernelThread() + if include_optional: return KernelThread( - kernel_id = '', - tid = 56, - stack = [ - '' - ] + kernel_id = '0xffffff8012345678', + task_id = 1, + stack = ["0xffffff8012345678","0xffffff8012345690"] ) - else : + else: return KernelThread( + kernel_id = '0xffffff8012345678', + task_id = 1, + stack = ["0xffffff8012345678","0xffffff8012345690"], ) + """ def testKernelThread(self): """Test KernelThread""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_kernel_thread_v1.py b/test/test_kernel_thread_v1.py new file mode 100644 index 0000000..f440fa4 --- /dev/null +++ b/test/test_kernel_thread_v1.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.kernel_thread_v1 import KernelThreadV1 + +class TestKernelThreadV1(unittest.TestCase): + """KernelThreadV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> KernelThreadV1: + """Test KernelThreadV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `KernelThreadV1` + """ + model = KernelThreadV1() + if include_optional: + return KernelThreadV1( + kernel_id = '', + tid = 56, + stack = [ + '' + ] + ) + else: + return KernelThreadV1( + ) + """ + + def testKernelThreadV1(self): + """Test KernelThreadV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_layout_schema.py b/test/test_layout_schema.py new file mode 100644 index 0000000..1b3bd22 --- /dev/null +++ b/test/test_layout_schema.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.layout_schema import LayoutSchema + +class TestLayoutSchema(unittest.TestCase): + """LayoutSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LayoutSchema: + """Test LayoutSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LayoutSchema` + """ + model = LayoutSchema() + if include_optional: + return LayoutSchema( + free_cpus = None, + free_ram = None, + free_ranges = 6, + numa_nodes = 2, + ram_cpu = '0', + node_map = None, + free_cores = None, + ram_core = 4096 + ) + else: + return LayoutSchema( + ) + """ + + def testLayoutSchema(self): + """Test LayoutSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ldap_authentication_credentials.py b/test/test_ldap_authentication_credentials.py new file mode 100644 index 0000000..889564c --- /dev/null +++ b/test/test_ldap_authentication_credentials.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ldap_authentication_credentials import LdapAuthenticationCredentials + +class TestLdapAuthenticationCredentials(unittest.TestCase): + """LdapAuthenticationCredentials unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LdapAuthenticationCredentials: + """Test LdapAuthenticationCredentials + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LdapAuthenticationCredentials` + """ + model = LdapAuthenticationCredentials() + if include_optional: + return LdapAuthenticationCredentials( + bind_dn = 'cn=admin,dc=example,dc=com', + bind_password = '' + ) + else: + return LdapAuthenticationCredentials( + bind_dn = 'cn=admin,dc=example,dc=com', + bind_password = '', + ) + """ + + def testLdapAuthenticationCredentials(self): + """Test LdapAuthenticationCredentials""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ldap_config.py b/test/test_ldap_config.py new file mode 100644 index 0000000..3cf3fbe --- /dev/null +++ b/test/test_ldap_config.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ldap_config import LDAPConfig + +class TestLDAPConfig(unittest.TestCase): + """LDAPConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LDAPConfig: + """Test LDAPConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LDAPConfig` + """ + model = LDAPConfig() + if include_optional: + return LDAPConfig( + server_connection_details = { + 'key' : null + }, + authentication_credentials = { + 'key' : null + }, + user_search_configuration = { + 'key' : null + }, + user_attribute_mapping = { + 'key' : null + }, + group_search_configuration = [ + { + 'key' : null + } + ] + ) + else: + return LDAPConfig( + server_connection_details = { + 'key' : null + }, + authentication_credentials = { + 'key' : null + }, + user_search_configuration = { + 'key' : null + }, + ) + """ + + def testLDAPConfig(self): + """Test LDAPConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ldap_group_search_configuration.py b/test/test_ldap_group_search_configuration.py new file mode 100644 index 0000000..a22f91b --- /dev/null +++ b/test/test_ldap_group_search_configuration.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ldap_group_search_configuration import LdapGroupSearchConfiguration + +class TestLdapGroupSearchConfiguration(unittest.TestCase): + """LdapGroupSearchConfiguration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LdapGroupSearchConfiguration: + """Test LdapGroupSearchConfiguration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LdapGroupSearchConfiguration` + """ + model = LdapGroupSearchConfiguration() + if include_optional: + return LdapGroupSearchConfiguration( + group_base_dn = 'ou=groups,dc=example,dc=com', + group_search_filter = 'objectClass=groupOfNames', + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', + role = 'admin' + ) + else: + return LdapGroupSearchConfiguration( + group_base_dn = 'ou=groups,dc=example,dc=com', + team_id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', + ) + """ + + def testLdapGroupSearchConfiguration(self): + """Test LdapGroupSearchConfiguration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ldap_server_connection_details.py b/test/test_ldap_server_connection_details.py new file mode 100644 index 0000000..17709df --- /dev/null +++ b/test/test_ldap_server_connection_details.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ldap_server_connection_details import LdapServerConnectionDetails + +class TestLdapServerConnectionDetails(unittest.TestCase): + """LdapServerConnectionDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LdapServerConnectionDetails: + """Test LdapServerConnectionDetails + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LdapServerConnectionDetails` + """ + model = LdapServerConnectionDetails() + if include_optional: + return LdapServerConnectionDetails( + server_url = 'ldap.example.com', + port = '389', + connection_timeout = '5000', + enable_ldaps = False, + ca_cert = '-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE-----', + ca_verify = True + ) + else: + return LdapServerConnectionDetails( + server_url = 'ldap.example.com', + ) + """ + + def testLdapServerConnectionDetails(self): + """Test LdapServerConnectionDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ldap_user_attribute_mapping.py b/test/test_ldap_user_attribute_mapping.py new file mode 100644 index 0000000..aa10c76 --- /dev/null +++ b/test/test_ldap_user_attribute_mapping.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ldap_user_attribute_mapping import LdapUserAttributeMapping + +class TestLdapUserAttributeMapping(unittest.TestCase): + """LdapUserAttributeMapping unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LdapUserAttributeMapping: + """Test LdapUserAttributeMapping + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LdapUserAttributeMapping` + """ + model = LdapUserAttributeMapping() + if include_optional: + return LdapUserAttributeMapping( + username_attribute = 'uid', + email_attribute = 'mail', + first_name_attribute = 'givenName', + last_name_attribute = 'sn' + ) + else: + return LdapUserAttributeMapping( + ) + """ + + def testLdapUserAttributeMapping(self): + """Test LdapUserAttributeMapping""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ldap_user_search_configuration.py b/test/test_ldap_user_search_configuration.py new file mode 100644 index 0000000..885718a --- /dev/null +++ b/test/test_ldap_user_search_configuration.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.ldap_user_search_configuration import LdapUserSearchConfiguration + +class TestLdapUserSearchConfiguration(unittest.TestCase): + """LdapUserSearchConfiguration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LdapUserSearchConfiguration: + """Test LdapUserSearchConfiguration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LdapUserSearchConfiguration` + """ + model = LdapUserSearchConfiguration() + if include_optional: + return LdapUserSearchConfiguration( + base_dn = 'dc=example,dc=com', + user_search_base = 'ou=users', + user_search_filter = 'objectClass=inetOrgPerson' + ) + else: + return LdapUserSearchConfiguration( + base_dn = 'dc=example,dc=com', + ) + """ + + def testLdapUserSearchConfiguration(self): + """Test LdapUserSearchConfiguration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_load_extension_body.py b/test/test_load_extension_body.py new file mode 100644 index 0000000..bbfe203 --- /dev/null +++ b/test/test_load_extension_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.load_extension_body import LoadExtensionBody + +class TestLoadExtensionBody(unittest.TestCase): + """LoadExtensionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoadExtensionBody: + """Test LoadExtensionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoadExtensionBody` + """ + model = LoadExtensionBody() + if include_optional: + return LoadExtensionBody( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' + ) + else: + return LoadExtensionBody( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + ) + """ + + def testLoadExtensionBody(self): + """Test LoadExtensionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_logging.py b/test/test_logging.py index 43fbe0d..525717e 100644 --- a/test/test_logging.py +++ b/test/test_logging.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.logging import Logging # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.logging import Logging class TestLogging(unittest.TestCase): """Logging unit test stubs""" @@ -28,25 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Logging: """Test Logging - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.logging.Logging() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Logging` + """ + model = Logging() + if include_optional: return Logging( - development = True, - throw_warnings = True + development = False, + throw_warnings = False ) - else : + else: return Logging( + development = False, + throw_warnings = False, ) + """ def testLogging(self): """Test Logging""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_logging_v1.py b/test/test_logging_v1.py new file mode 100644 index 0000000..e030eef --- /dev/null +++ b/test/test_logging_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.logging_v1 import LoggingV1 + +class TestLoggingV1(unittest.TestCase): + """LoggingV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoggingV1: + """Test LoggingV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoggingV1` + """ + model = LoggingV1() + if include_optional: + return LoggingV1( + development = True, + throw_warnings = True + ) + else: + return LoggingV1( + ) + """ + + def testLoggingV1(self): + """Test LoggingV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_body.py b/test/test_login_body.py new file mode 100644 index 0000000..3a4bbcd --- /dev/null +++ b/test/test_login_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_body import LoginBody + +class TestLoginBody(unittest.TestCase): + """LoginBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginBody: + """Test LoginBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginBody` + """ + model = LoginBody() + if include_optional: + return LoginBody( + username = 'jane.doe', + password = '', + totp_token = '123456', + api_token = '', + token = '', + revoke_old = True + ) + else: + return LoginBody( + ) + """ + + def testLoginBody(self): + """Test LoginBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result.py b/test/test_login_result.py new file mode 100644 index 0000000..c32cc05 --- /dev/null +++ b/test/test_login_result.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result import LoginResult + +class TestLoginResult(unittest.TestCase): + """LoginResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResult: + """Test LoginResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResult` + """ + model = LoginResult() + if include_optional: + return LoginResult( + token = '', + expiration = '2027-01-15T00:00Z', + user = { + 'key' : null + }, + domain = { + 'key' : null + }, + time = 1773479567000, + identifier = 'a3569608-10e1-41c7-99fa-1a7d1f336c58', + disabled = { + 'key' : null + }, + missing_totp = True + ) + else: + return LoginResult( + token = '', + expiration = '2027-01-15T00:00Z', + ) + """ + + def testLoginResult(self): + """Test LoginResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result_disabled.py b/test/test_login_result_disabled.py new file mode 100644 index 0000000..8ac9cb3 --- /dev/null +++ b/test/test_login_result_disabled.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result_disabled import LoginResultDisabled + +class TestLoginResultDisabled(unittest.TestCase): + """LoginResultDisabled unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResultDisabled: + """Test LoginResultDisabled + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResultDisabled` + """ + model = LoginResultDisabled() + if include_optional: + return LoginResultDisabled( + type = 'SubscriptionCanceled', + disabled_at = '2026-03-18T16:05:33Z', + delete_instances_at = '2027-01-15T00:00Z', + cancel_date = '2026-03-18T16:05:33Z' + ) + else: + return LoginResultDisabled( + type = 'SubscriptionCanceled', + ) + """ + + def testLoginResultDisabled(self): + """Test LoginResultDisabled""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result_domain.py b/test/test_login_result_domain.py new file mode 100644 index 0000000..103dd9a --- /dev/null +++ b/test/test_login_result_domain.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result_domain import LoginResultDomain + +class TestLoginResultDomain(unittest.TestCase): + """LoginResultDomain unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResultDomain: + """Test LoginResultDomain + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResultDomain` + """ + model = LoginResultDomain() + if include_optional: + return LoginResultDomain( + name = 'acme-corp', + label = 'Acme Corp', + terms_policy = 'all', + cores = 48, + individual = False, + totp_required = True, + subscription = {"renew_action":null,"next_bill":"2027-01-15T00:00:00.000Z","billing_type":"metered","billing_backend":"stripe"}, + license_type = 'enterprise', + android = True, + no_ios = False, + files_only = False, + device_dhcp_server = True, + enable_arm_devices = True, + use_device_accounting = False, + single_project = False, + terms_updated = '2026-03-14T09:12:47.000Z', + trial = { + 'key' : null + }, + webplayer = { + 'key' : null + }, + snapshot_sharing_permissions = { + 'key' : null + }, + device_auto_shutdown = { + 'key' : null + }, + disabled = { + 'key' : null + } + ) + else: + return LoginResultDomain( + name = 'acme-corp', + label = 'Acme Corp', + cores = 48, + individual = False, + ) + """ + + def testLoginResultDomain(self): + """Test LoginResultDomain""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result_domain_device_auto_shutdown.py b/test/test_login_result_domain_device_auto_shutdown.py new file mode 100644 index 0000000..1db3852 --- /dev/null +++ b/test/test_login_result_domain_device_auto_shutdown.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result_domain_device_auto_shutdown import LoginResultDomainDeviceAutoShutdown + +class TestLoginResultDomainDeviceAutoShutdown(unittest.TestCase): + """LoginResultDomainDeviceAutoShutdown unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResultDomainDeviceAutoShutdown: + """Test LoginResultDomainDeviceAutoShutdown + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResultDomainDeviceAutoShutdown` + """ + model = LoginResultDomainDeviceAutoShutdown() + if include_optional: + return LoginResultDomainDeviceAutoShutdown( + enabled = True, + threshold = 10 + ) + else: + return LoginResultDomainDeviceAutoShutdown( + ) + """ + + def testLoginResultDomainDeviceAutoShutdown(self): + """Test LoginResultDomainDeviceAutoShutdown""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result_domain_disabled.py b/test/test_login_result_domain_disabled.py new file mode 100644 index 0000000..e8115a9 --- /dev/null +++ b/test/test_login_result_domain_disabled.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result_domain_disabled import LoginResultDomainDisabled + +class TestLoginResultDomainDisabled(unittest.TestCase): + """LoginResultDomainDisabled unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResultDomainDisabled: + """Test LoginResultDomainDisabled + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResultDomainDisabled` + """ + model = LoginResultDomainDisabled() + if include_optional: + return LoginResultDomainDisabled( + type = 'SubscriptionCanceled', + cancel_date = '2026-03-18T16:05:33Z' + ) + else: + return LoginResultDomainDisabled( + ) + """ + + def testLoginResultDomainDisabled(self): + """Test LoginResultDomainDisabled""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result_domain_snapshot_sharing_permissions.py b/test/test_login_result_domain_snapshot_sharing_permissions.py new file mode 100644 index 0000000..b0292ad --- /dev/null +++ b/test/test_login_result_domain_snapshot_sharing_permissions.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result_domain_snapshot_sharing_permissions import LoginResultDomainSnapshotSharingPermissions + +class TestLoginResultDomainSnapshotSharingPermissions(unittest.TestCase): + """LoginResultDomainSnapshotSharingPermissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResultDomainSnapshotSharingPermissions: + """Test LoginResultDomainSnapshotSharingPermissions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResultDomainSnapshotSharingPermissions` + """ + model = LoginResultDomainSnapshotSharingPermissions() + if include_optional: + return LoginResultDomainSnapshotSharingPermissions( + cloud_enabled = False, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True + ) + else: + return LoginResultDomainSnapshotSharingPermissions( + ) + """ + + def testLoginResultDomainSnapshotSharingPermissions(self): + """Test LoginResultDomainSnapshotSharingPermissions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result_domain_trial.py b/test/test_login_result_domain_trial.py new file mode 100644 index 0000000..bd8e40b --- /dev/null +++ b/test/test_login_result_domain_trial.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result_domain_trial import LoginResultDomainTrial + +class TestLoginResultDomainTrial(unittest.TestCase): + """LoginResultDomainTrial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResultDomainTrial: + """Test LoginResultDomainTrial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResultDomainTrial` + """ + model = LoginResultDomainTrial() + if include_optional: + return LoginResultDomainTrial( + start = 1773479567000, + end = 1775207567000 + ) + else: + return LoginResultDomainTrial( + ) + """ + + def testLoginResultDomainTrial(self): + """Test LoginResultDomainTrial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result_domain_webplayer.py b/test/test_login_result_domain_webplayer.py new file mode 100644 index 0000000..2fac818 --- /dev/null +++ b/test/test_login_result_domain_webplayer.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result_domain_webplayer import LoginResultDomainWebplayer + +class TestLoginResultDomainWebplayer(unittest.TestCase): + """LoginResultDomainWebplayer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResultDomainWebplayer: + """Test LoginResultDomainWebplayer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResultDomainWebplayer` + """ + model = LoginResultDomainWebplayer() + if include_optional: + return LoginResultDomainWebplayer( + enabled = True, + allowed_domains = ["example.com"] + ) + else: + return LoginResultDomainWebplayer( + ) + """ + + def testLoginResultDomainWebplayer(self): + """Test LoginResultDomainWebplayer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_login_result_user.py b/test/test_login_result_user.py new file mode 100644 index 0000000..58c6a11 --- /dev/null +++ b/test/test_login_result_user.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.login_result_user import LoginResultUser + +class TestLoginResultUser(unittest.TestCase): + """LoginResultUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginResultUser: + """Test LoginResultUser + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginResultUser` + """ + model = LoginResultUser() + if include_optional: + return LoginResultUser( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'jane.doe', + label = 'Jane Doe', + email = 'jane.doe@example.com', + cluster_administrator = False, + agreed_to_terms = '2026-03-17T11:41:05.000Z', + federated_user_id = 'jane.doe@example.com', + intercom_hmac = '', + misc = {"apiToken":{"prefix":"","lastAuthDate":"2026-03-17T11:41:05.000Z","lastAddress":"192.0.2.10"},"lastVPNType":"ovpn"} + ) + else: + return LoginResultUser( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'jane.doe', + label = 'Jane Doe', + email = 'jane.doe@example.com', + cluster_administrator = False, + intercom_hmac = '', + misc = {"apiToken":{"prefix":"","lastAuthDate":"2026-03-17T11:41:05.000Z","lastAddress":"192.0.2.10"},"lastVPNType":"ovpn"}, + ) + """ + + def testLoginResultUser(self): + """Test LoginResultUser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_maintenance.py b/test/test_maintenance.py index d11d3eb..5b98fed 100644 --- a/test/test_maintenance.py +++ b/test/test_maintenance.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.maintenance import Maintenance # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.maintenance import Maintenance class TestMaintenance(unittest.TestCase): """Maintenance unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Maintenance: """Test Maintenance - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.maintenance.Maintenance() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Maintenance` + """ + model = Maintenance() + if include_optional: return Maintenance( - message = '', + message = '', header = '' ) - else : + else: return Maintenance( ) + """ def testMaintenance(self): """Test Maintenance""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_matrix_error.py b/test/test_matrix_error.py new file mode 100644 index 0000000..965c885 --- /dev/null +++ b/test/test_matrix_error.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.matrix_error import MatrixError + +class TestMatrixError(unittest.TestCase): + """MatrixError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MatrixError: + """Test MatrixError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MatrixError` + """ + model = MatrixError() + if include_optional: + return MatrixError( + error = '' + ) + else: + return MatrixError( + error = '', + ) + """ + + def testMatrixError(self): + """Test MatrixError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_play_body.py b/test/test_media_play_body.py index 0c3d41d..4ecd9fa 100644 --- a/test/test_media_play_body.py +++ b/test/test_media_play_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.media_play_body import MediaPlayBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.media_play_body import MediaPlayBody class TestMediaPlayBody(unittest.TestCase): """MediaPlayBody unit test stubs""" @@ -28,25 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> MediaPlayBody: """Test MediaPlayBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.media_play_body.MediaPlayBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `MediaPlayBody` + """ + model = MediaPlayBody() + if include_optional: return MediaPlayBody( - image_id = '', - url = '' + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + url = 'https://example.com/media.mp4' ) - else : + else: return MediaPlayBody( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + url = 'https://example.com/media.mp4', ) + """ def testMediaPlayBody(self): """Test MediaPlayBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_media_play_body_v1.py b/test/test_media_play_body_v1.py new file mode 100644 index 0000000..e63c14c --- /dev/null +++ b/test/test_media_play_body_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.media_play_body_v1 import MediaPlayBodyV1 + +class TestMediaPlayBodyV1(unittest.TestCase): + """MediaPlayBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaPlayBodyV1: + """Test MediaPlayBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaPlayBodyV1` + """ + model = MediaPlayBodyV1() + if include_optional: + return MediaPlayBodyV1( + image_id = '', + url = '' + ) + else: + return MediaPlayBodyV1( + ) + """ + + def testMediaPlayBodyV1(self): + """Test MediaPlayBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_play_by_image.py b/test/test_media_play_by_image.py new file mode 100644 index 0000000..d527fa3 --- /dev/null +++ b/test/test_media_play_by_image.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.media_play_by_image import MediaPlayByImage + +class TestMediaPlayByImage(unittest.TestCase): + """MediaPlayByImage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaPlayByImage: + """Test MediaPlayByImage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaPlayByImage` + """ + model = MediaPlayByImage() + if include_optional: + return MediaPlayByImage( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69' + ) + else: + return MediaPlayByImage( + image_id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + ) + """ + + def testMediaPlayByImage(self): + """Test MediaPlayByImage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_play_by_url.py b/test/test_media_play_by_url.py new file mode 100644 index 0000000..adc8c4e --- /dev/null +++ b/test/test_media_play_by_url.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.media_play_by_url import MediaPlayByUrl + +class TestMediaPlayByUrl(unittest.TestCase): + """MediaPlayByUrl unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaPlayByUrl: + """Test MediaPlayByUrl + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaPlayByUrl` + """ + model = MediaPlayByUrl() + if include_optional: + return MediaPlayByUrl( + url = 'https://example.com/media.mp4' + ) + else: + return MediaPlayByUrl( + url = 'https://example.com/media.mp4', + ) + """ + + def testMediaPlayByUrl(self): + """Test MediaPlayByUrl""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_store.py b/test/test_media_store.py new file mode 100644 index 0000000..0611137 --- /dev/null +++ b/test/test_media_store.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.media_store import MediaStore + +class TestMediaStore(unittest.TestCase): + """MediaStore unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaStore: + """Test MediaStore + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaStore` + """ + model = MediaStore() + if include_optional: + return MediaStore( + identifier = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + device = '/dev/sdb1', + fs_type = 'ext4', + fs_uuid = '4a3f2e1d-8c7b-4a19-9e2f-6d5c4b3a2190', + label = 'EXTERNAL_SSD', + serial = '0123456789ABCDEF', + vendor = 'SanDisk', + model = 'Ultra USB 3.0', + mount_policy = 'RO', + status = 'mounted', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return MediaStore( + identifier = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + device = '/dev/sdb1', + fs_type = 'ext4', + fs_uuid = '4a3f2e1d-8c7b-4a19-9e2f-6d5c4b3a2190', + label = 'EXTERNAL_SSD', + serial = '0123456789ABCDEF', + vendor = 'SanDisk', + model = 'Ultra USB 3.0', + mount_policy = 'RO', + status = 'mounted', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testMediaStore(self): + """Test MediaStore""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_media_store_v1.py b/test/test_media_store_v1.py new file mode 100644 index 0000000..adf5e31 --- /dev/null +++ b/test/test_media_store_v1.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.media_store_v1 import MediaStoreV1 + +class TestMediaStoreV1(unittest.TestCase): + """MediaStoreV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MediaStoreV1: + """Test MediaStoreV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MediaStoreV1` + """ + model = MediaStoreV1() + if include_optional: + return MediaStoreV1( + identifier = '', + device = '', + fs_type = '', + fs_uuid = '', + label = '', + serial = '', + vendor = '', + model = '', + mount_policy = '', + created_at = '', + updated_at = '' + ) + else: + return MediaStoreV1( + ) + """ + + def testMediaStoreV1(self): + """Test MediaStoreV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_body.py b/test/test_message_body.py new file mode 100644 index 0000000..81d5b66 --- /dev/null +++ b/test/test_message_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.message_body import MessageBody + +class TestMessageBody(unittest.TestCase): + """MessageBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageBody: + """Test MessageBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageBody` + """ + model = MessageBody() + if include_optional: + return MessageBody( + number = '+15555550123', + message = 'Hello from Corellium!', + raw = 'deadbeef' + ) + else: + return MessageBody( + number = '+15555550123', + message = 'Hello from Corellium!', + raw = 'deadbeef', + ) + """ + + def testMessageBody(self): + """Test MessageBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_body_any_of.py b/test/test_message_body_any_of.py new file mode 100644 index 0000000..5b0b88b --- /dev/null +++ b/test/test_message_body_any_of.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.message_body_any_of import MessageBodyAnyOf + +class TestMessageBodyAnyOf(unittest.TestCase): + """MessageBodyAnyOf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageBodyAnyOf: + """Test MessageBodyAnyOf + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageBodyAnyOf` + """ + model = MessageBodyAnyOf() + if include_optional: + return MessageBodyAnyOf( + number = '+15555550123', + message = 'Hello from Corellium!' + ) + else: + return MessageBodyAnyOf( + number = '+15555550123', + message = 'Hello from Corellium!', + ) + """ + + def testMessageBodyAnyOf(self): + """Test MessageBodyAnyOf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_message_body_any_of1.py b/test/test_message_body_any_of1.py new file mode 100644 index 0000000..f400332 --- /dev/null +++ b/test/test_message_body_any_of1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.message_body_any_of1 import MessageBodyAnyOf1 + +class TestMessageBodyAnyOf1(unittest.TestCase): + """MessageBodyAnyOf1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MessageBodyAnyOf1: + """Test MessageBodyAnyOf1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MessageBodyAnyOf1` + """ + model = MessageBodyAnyOf1() + if include_optional: + return MessageBodyAnyOf1( + raw = 'deadbeef' + ) + else: + return MessageBodyAnyOf1( + raw = 'deadbeef', + ) + """ + + def testMessageBodyAnyOf1(self): + """Test MessageBodyAnyOf1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_metered_subscription_usage.py b/test/test_metered_subscription_usage.py index 011f593..1ef5302 100644 --- a/test/test_metered_subscription_usage.py +++ b/test/test_metered_subscription_usage.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.metered_subscription_usage import MeteredSubscriptionUsage # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.metered_subscription_usage import MeteredSubscriptionUsage class TestMeteredSubscriptionUsage(unittest.TestCase): """MeteredSubscriptionUsage unit test stubs""" @@ -28,33 +26,44 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> MeteredSubscriptionUsage: """Test MeteredSubscriptionUsage - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.metered_subscription_usage.MeteredSubscriptionUsage() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `MeteredSubscriptionUsage` + """ + model = MeteredSubscriptionUsage() + if include_optional: return MeteredSubscriptionUsage( - burst_rate = 1.337, - allocated_hours = 1.337, - plan_billed_amount = 1.337, - plan_billed_units = 1.337, - burst_billed_amount = 1.337, - burst_billed_units = 1.337, - burst_outstanding_amount = 1.337, - burst_outstanding_units = 1.337, - total_usage_amount = 1.337, - total_used_units = 1.337 + burst_rate = 800, + allocated_hours = 100, + plan_billed_amount = 99500, + burst_billed_amount = 29600, + burst_billed_units = 37, + burst_outstanding_amount = 9600, + burst_outstanding_units = 12, + total_usage_amount = 138700, + total_used_units = 149 ) - else : + else: return MeteredSubscriptionUsage( + burst_rate = 800, + allocated_hours = 100, + plan_billed_amount = 99500, + burst_billed_amount = 29600, + burst_billed_units = 37, + burst_outstanding_amount = 9600, + burst_outstanding_units = 12, + total_usage_amount = 138700, + total_used_units = 149, ) + """ def testMeteredSubscriptionUsage(self): """Test MeteredSubscriptionUsage""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_metered_subscription_usage_v1.py b/test/test_metered_subscription_usage_v1.py new file mode 100644 index 0000000..da3c7c3 --- /dev/null +++ b/test/test_metered_subscription_usage_v1.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.metered_subscription_usage_v1 import MeteredSubscriptionUsageV1 + +class TestMeteredSubscriptionUsageV1(unittest.TestCase): + """MeteredSubscriptionUsageV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MeteredSubscriptionUsageV1: + """Test MeteredSubscriptionUsageV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MeteredSubscriptionUsageV1` + """ + model = MeteredSubscriptionUsageV1() + if include_optional: + return MeteredSubscriptionUsageV1( + burst_rate = 1.337, + allocated_hours = 1.337, + plan_billed_amount = 1.337, + plan_billed_units = 1.337, + burst_billed_amount = 1.337, + burst_billed_units = 1.337, + burst_outstanding_amount = 1.337, + burst_outstanding_units = 1.337, + total_usage_amount = 1.337, + total_used_units = 1.337 + ) + else: + return MeteredSubscriptionUsageV1( + ) + """ + + def testMeteredSubscriptionUsageV1(self): + """Test MeteredSubscriptionUsageV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model.py b/test/test_model.py index fb6dc6b..54de821 100644 --- a/test/test_model.py +++ b/test/test_model.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.model import Model # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.model import Model class TestModel(unittest.TestCase): """Model unit test stubs""" @@ -28,37 +26,159 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Model: """Test Model - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.model.Model() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Model` + """ + model = Model() + if include_optional: return Model( - type = '', - name = '', - flavor = '', - description = '', - model = '', - board_config = '', - platform = '', - cpid = 1.337, - bdid = 1.337, - peripherals = True + type = 'ios', + flavor = 'iphone17a', + description = 'iPhone Air', + model = 'iPhone18,4', + hardware_model = 'd23ap', + board_config = 'd23ap', + platform = 't8140', + cpid = 33088, + bdid = 14, + vendor = 'Arm', + hidden = False, + is_beta = False, + peripherals = True, + has_software = True, + supports_rapid_start = True, + default_firmware = '.*userdebug.*', + cores = 6, + cores_min = 6, + cores_max = 6, + cores_step = 2, + cores_allowed = [2,4,6,8], + ram = 8192, + ram_min = 8192, + ram_max = 8192, + dynamic_hardware_changes = False, + partitions = [ + corellium.models.model_partition.ModelPartition( + name = 'nand', + block_size = 4096, + blocks = 7812500, + blocks_min = 7812500, + blocks_max = 31250000, + blocks_step = 1024, + block_values = [7812500,15625000,31250000], + user_uploaded = False, ) + ], + frame = corellium.models.model_frame.ModelFrame( + width = 300, + height = 619.49, + inner = corellium.models.model_rect.ModelRect( + top = 10.29, + left = 12.04, + width = 275.91, + height = 599.12, + radius = 0.12, ), + home = null, + dimensions = corellium.models.model_frame_dimensions.ModelFrame_dimensions( + width = 1260, + height = 2736, ), + scale = 3, + has_image = True, ), + product_image = corellium.models.model_product_image.ModelProductImage( + width = 80, + inner = null, + has_image = True, ), + has_frame_variant = False, + show_options = ["jailbroken","nonjailbroken"], + string_udid = True, + charm_boot_args = [{"name":"boot","displayName":"Boot","type":"text","maxLength":32}], + requires_preset_boot_options = False, + supports_preset_boot_options = True, + supports_custom_firmware = False, + supports_custom_firmware_image = True, + supports_custom_kernel = True, + supports_custom_devicetree = True, + supports_custom_mmio = False, + supports_fvp = False, + mast = True ) - else : + else: return Model( - type = '', - name = '', - flavor = '', - model = '', + type = 'ios', + flavor = 'iphone17a', + description = 'iPhone Air', + model = 'iPhone18,4', + hardware_model = 'd23ap', + board_config = 'd23ap', + platform = 't8140', + cpid = 33088, + bdid = 14, + vendor = 'Arm', + hidden = False, + is_beta = False, + peripherals = True, + has_software = True, + supports_rapid_start = True, + default_firmware = '.*userdebug.*', + cores = 6, + cores_min = 6, + cores_max = 6, + ram = 8192, + ram_min = 8192, + ram_max = 8192, + dynamic_hardware_changes = False, + partitions = [ + corellium.models.model_partition.ModelPartition( + name = 'nand', + block_size = 4096, + blocks = 7812500, + blocks_min = 7812500, + blocks_max = 31250000, + blocks_step = 1024, + block_values = [7812500,15625000,31250000], + user_uploaded = False, ) + ], + frame = corellium.models.model_frame.ModelFrame( + width = 300, + height = 619.49, + inner = corellium.models.model_rect.ModelRect( + top = 10.29, + left = 12.04, + width = 275.91, + height = 599.12, + radius = 0.12, ), + home = null, + dimensions = corellium.models.model_frame_dimensions.ModelFrame_dimensions( + width = 1260, + height = 2736, ), + scale = 3, + has_image = True, ), + product_image = corellium.models.model_product_image.ModelProductImage( + width = 80, + inner = null, + has_image = True, ), + has_frame_variant = False, + show_options = ["jailbroken","nonjailbroken"], + string_udid = True, + requires_preset_boot_options = False, + supports_preset_boot_options = True, + supports_custom_firmware = False, + supports_custom_firmware_image = True, + supports_custom_kernel = True, + supports_custom_devicetree = True, + supports_custom_mmio = False, + supports_fvp = False, + mast = True, ) + """ def testModel(self): """Test Model""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_model_firmware.py b/test/test_model_firmware.py new file mode 100644 index 0000000..6c8c965 --- /dev/null +++ b/test/test_model_firmware.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_firmware import ModelFirmware + +class TestModelFirmware(unittest.TestCase): + """ModelFirmware unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelFirmware: + """Test ModelFirmware + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelFirmware` + """ + model = ModelFirmware() + if include_optional: + return ModelFirmware( + os_version = '12.1.4', + os_build = '16D57', + android_flavor = 'ranchu', + api_version = '34', + sha256sum = 'bf613433f156e8f1ab9ad5a554d89734e66c0e5b8dd4cb2848c9e9673847cbe8', + sha1sum = '1c93e6b5931378118b909da6f3e5f6dd2e19b114', + md5sum = '703a35f48f8e299cb90a2d13653589e2', + corellium_checksum = 'sha256$1048576$bf613433f156e8f1ab9ad5a554d89734e66c0e5b8dd4cb2848c9e9673847cbe8', + installed = True, + size = 3448156160, + unique_id = 'acme-fw-0001', + metadata = {"variants":["domain"]}, + release_date = '2026-05-22T13:58:34Z', + upload_date = '2026-05-22T13:58:34.000Z', + url = 'http://updates-http.cdn-apple.com/2019WinterFCS/fullrestores/041-39370/31D8C81A-292C-11E9-80C6-2A11412B0A59/iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw', + orig_url = 'http://updates-http.cdn-apple.com/2019WinterFCS/fullrestores/041-39370/31D8C81A-292C-11E9-80C6-2A11412B0A59/iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw', + filename = 'iPhone_4.7_P3_12.1.4_16D57_Restore.ipsw', + rooted = False, + signed = True, + springboard_snapshot = corellium.models.model_firmware_springboard_snapshot.ModelFirmware_springboardSnapshot( + volumes = [ + corellium.models.model_firmware_springboard_snapshot_volumes_inner.ModelFirmware_springboardSnapshot_volumes_inner( + nand = 32000000000, ) + ], ) + ) + else: + return ModelFirmware( + os_version = '12.1.4', + os_build = '16D57', + ) + """ + + def testModelFirmware(self): + """Test ModelFirmware""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_firmware_springboard_snapshot.py b/test/test_model_firmware_springboard_snapshot.py new file mode 100644 index 0000000..ba927d5 --- /dev/null +++ b/test/test_model_firmware_springboard_snapshot.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_firmware_springboard_snapshot import ModelFirmwareSpringboardSnapshot + +class TestModelFirmwareSpringboardSnapshot(unittest.TestCase): + """ModelFirmwareSpringboardSnapshot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelFirmwareSpringboardSnapshot: + """Test ModelFirmwareSpringboardSnapshot + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelFirmwareSpringboardSnapshot` + """ + model = ModelFirmwareSpringboardSnapshot() + if include_optional: + return ModelFirmwareSpringboardSnapshot( + volumes = [ + corellium.models.model_firmware_springboard_snapshot_volumes_inner.ModelFirmware_springboardSnapshot_volumes_inner( + nand = 32000000000, ) + ] + ) + else: + return ModelFirmwareSpringboardSnapshot( + volumes = [ + corellium.models.model_firmware_springboard_snapshot_volumes_inner.ModelFirmware_springboardSnapshot_volumes_inner( + nand = 32000000000, ) + ], + ) + """ + + def testModelFirmwareSpringboardSnapshot(self): + """Test ModelFirmwareSpringboardSnapshot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_firmware_springboard_snapshot_volumes_inner.py b/test/test_model_firmware_springboard_snapshot_volumes_inner.py new file mode 100644 index 0000000..0dbe5aa --- /dev/null +++ b/test/test_model_firmware_springboard_snapshot_volumes_inner.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_firmware_springboard_snapshot_volumes_inner import ModelFirmwareSpringboardSnapshotVolumesInner + +class TestModelFirmwareSpringboardSnapshotVolumesInner(unittest.TestCase): + """ModelFirmwareSpringboardSnapshotVolumesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelFirmwareSpringboardSnapshotVolumesInner: + """Test ModelFirmwareSpringboardSnapshotVolumesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelFirmwareSpringboardSnapshotVolumesInner` + """ + model = ModelFirmwareSpringboardSnapshotVolumesInner() + if include_optional: + return ModelFirmwareSpringboardSnapshotVolumesInner( + nand = 32000000000 + ) + else: + return ModelFirmwareSpringboardSnapshotVolumesInner( + nand = 32000000000, + ) + """ + + def testModelFirmwareSpringboardSnapshotVolumesInner(self): + """Test ModelFirmwareSpringboardSnapshotVolumesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_frame.py b/test/test_model_frame.py new file mode 100644 index 0000000..26f77db --- /dev/null +++ b/test/test_model_frame.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_frame import ModelFrame + +class TestModelFrame(unittest.TestCase): + """ModelFrame unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelFrame: + """Test ModelFrame + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelFrame` + """ + model = ModelFrame() + if include_optional: + return ModelFrame( + width = 300, + height = 619.49, + inner = corellium.models.model_rect.ModelRect( + top = 10.29, + left = 12.04, + width = 275.91, + height = 599.12, + radius = 0.12, ), + home = corellium.models.model_rect.ModelRect( + top = 10.29, + left = 12.04, + width = 275.91, + height = 599.12, + radius = 0.12, ), + dimensions = corellium.models.model_frame_dimensions.ModelFrame_dimensions( + width = 1260, + height = 2736, ), + scale = 3, + has_image = True + ) + else: + return ModelFrame( + width = 300, + height = 619.49, + has_image = True, + ) + """ + + def testModelFrame(self): + """Test ModelFrame""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_frame_dimensions.py b/test/test_model_frame_dimensions.py new file mode 100644 index 0000000..e4618cb --- /dev/null +++ b/test/test_model_frame_dimensions.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_frame_dimensions import ModelFrameDimensions + +class TestModelFrameDimensions(unittest.TestCase): + """ModelFrameDimensions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelFrameDimensions: + """Test ModelFrameDimensions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelFrameDimensions` + """ + model = ModelFrameDimensions() + if include_optional: + return ModelFrameDimensions( + width = 1260, + height = 2736 + ) + else: + return ModelFrameDimensions( + width = 1260, + height = 2736, + ) + """ + + def testModelFrameDimensions(self): + """Test ModelFrameDimensions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_partition.py b/test/test_model_partition.py new file mode 100644 index 0000000..293746a --- /dev/null +++ b/test/test_model_partition.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_partition import ModelPartition + +class TestModelPartition(unittest.TestCase): + """ModelPartition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelPartition: + """Test ModelPartition + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelPartition` + """ + model = ModelPartition() + if include_optional: + return ModelPartition( + name = 'nand', + block_size = 4096, + blocks = 7812500, + blocks_min = 7812500, + blocks_max = 31250000, + blocks_step = 1024, + block_values = [7812500,15625000,31250000], + user_uploaded = False + ) + else: + return ModelPartition( + name = 'nand', + block_size = 4096, + ) + """ + + def testModelPartition(self): + """Test ModelPartition""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_product_image.py b/test/test_model_product_image.py new file mode 100644 index 0000000..1122216 --- /dev/null +++ b/test/test_model_product_image.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_product_image import ModelProductImage + +class TestModelProductImage(unittest.TestCase): + """ModelProductImage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelProductImage: + """Test ModelProductImage + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelProductImage` + """ + model = ModelProductImage() + if include_optional: + return ModelProductImage( + width = 80, + inner = corellium.models.model_rect.ModelRect( + top = 10.29, + left = 12.04, + width = 275.91, + height = 599.12, + radius = 0.12, ), + has_image = True + ) + else: + return ModelProductImage( + width = 80, + has_image = True, + ) + """ + + def testModelProductImage(self): + """Test ModelProductImage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_rect.py b/test/test_model_rect.py new file mode 100644 index 0000000..7757a30 --- /dev/null +++ b/test/test_model_rect.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_rect import ModelRect + +class TestModelRect(unittest.TestCase): + """ModelRect unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelRect: + """Test ModelRect + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelRect` + """ + model = ModelRect() + if include_optional: + return ModelRect( + top = 10.29, + left = 12.04, + width = 275.91, + height = 599.12, + radius = 0.12 + ) + else: + return ModelRect( + top = 10.29, + left = 12.04, + width = 275.91, + height = 599.12, + ) + """ + + def testModelRect(self): + """Test ModelRect""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_software.py b/test/test_model_software.py deleted file mode 100644 index bf1eadd..0000000 --- a/test/test_model_software.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.model_software import ModelSoftware # noqa: E501 -from corellium_api.rest import ApiException - -class TestModelSoftware(unittest.TestCase): - """ModelSoftware unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ModelSoftware - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.model_software.ModelSoftware() # noqa: E501 - if include_optional : - return ModelSoftware( - name = '', - board_config = '', - platform = '', - cpid = 1.337, - bdid = 1.337, - firmwares = [ - corellium_api.models.firmware.Firmware( - version = '', - buildid = '', - android_flavor = '', - api_version = '', - sha256sum = '', - sha1sum = '', - md5sum = '', - size = 56, - unique_id = '', - metadata = corellium_api.models.metadata.metadata(), - releasedate = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - uploaddate = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - orig_url = '', - filename = '', ) - ] - ) - else : - return ModelSoftware( - ) - - def testModelSoftware(self): - """Test ModelSoftware""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_model_software_v1.py b/test/test_model_software_v1.py new file mode 100644 index 0000000..b82dc1a --- /dev/null +++ b/test/test_model_software_v1.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_software_v1 import ModelSoftwareV1 + +class TestModelSoftwareV1(unittest.TestCase): + """ModelSoftwareV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelSoftwareV1: + """Test ModelSoftwareV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelSoftwareV1` + """ + model = ModelSoftwareV1() + if include_optional: + return ModelSoftwareV1( + name = '', + board_config = '', + platform = '', + cpid = 1.337, + bdid = 1.337, + firmwares = [ + corellium.models.firmware_v1.FirmwareV1( + version = '', + buildid = '', + android_flavor = '', + api_version = '', + sha256sum = '', + sha1sum = '', + md5sum = '', + size = 56, + unique_id = '', + metadata = corellium.models.metadata.metadata(), + releasedate = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + uploaddate = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + url = '', + orig_url = '', + filename = '', ) + ] + ) + else: + return ModelSoftwareV1( + ) + """ + + def testModelSoftwareV1(self): + """Test ModelSoftwareV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_model_v1.py b/test/test_model_v1.py new file mode 100644 index 0000000..d6b6c1a --- /dev/null +++ b/test/test_model_v1.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.model_v1 import ModelV1 + +class TestModelV1(unittest.TestCase): + """ModelV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModelV1: + """Test ModelV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModelV1` + """ + model = ModelV1() + if include_optional: + return ModelV1( + type = '', + name = '', + flavor = '', + description = '', + model = '', + board_config = '', + platform = '', + cpid = 1.337, + bdid = 1.337, + peripherals = True + ) + else: + return ModelV1( + type = '', + name = '', + flavor = '', + model = '', + ) + """ + + def testModelV1(self): + """Test ModelV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models_api.py b/test/test_models_api.py new file mode 100644 index 0000000..0b78f20 --- /dev/null +++ b/test/test_models_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.models_api import ModelsApi + + +class TestModelsApi(unittest.TestCase): + """ModelsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ModelsApi() + + def tearDown(self) -> None: + pass + + def test_v3_get_model_software(self) -> None: + """Test case for v3_get_model_software + + List software for a model + """ + pass + + def test_v3_get_models(self) -> None: + """Test case for v3_get_models + + List device models + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models_v1_api.py b/test/test_models_v1_api.py new file mode 100644 index 0000000..4ed6de0 --- /dev/null +++ b/test/test_models_v1_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.models_v1_api import ModelsV1Api + + +class TestModelsV1Api(unittest.TestCase): + """ModelsV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = ModelsV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_get_model_software(self) -> None: + """Test case for v1_get_model_software + + Get Software for Model + """ + pass + + def test_v1_get_models(self) -> None: + """Test case for v1_get_models + + Get Supported Models + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_net_connect_api.py b/test/test_net_connect_api.py new file mode 100644 index 0000000..6e884b7 --- /dev/null +++ b/test/test_net_connect_api.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.net_connect_api import NetConnectApi + + +class TestNetConnectApi(unittest.TestCase): + """NetConnectApi unit test stubs""" + + def setUp(self) -> None: + self.api = NetConnectApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_network_connection(self) -> None: + """Test case for v3_create_network_connection + + Create a new Network Connection + """ + pass + + def test_v3_delete_network_connection(self) -> None: + """Test case for v3_delete_network_connection + + Delete an existing Network Connection + """ + pass + + def test_v3_get_network_connection(self) -> None: + """Test case for v3_get_network_connection + + Fetch an existing Network Connection + """ + pass + + def test_v3_list_network_connections(self) -> None: + """Test case for v3_list_network_connections + + List available network connections + """ + pass + + def test_v3_list_network_interfaces(self) -> None: + """Test case for v3_list_network_interfaces + + List available physical network interfaces + """ + pass + + def test_v3_list_network_providers(self) -> None: + """Test case for v3_list_network_providers + + List available network providers + """ + pass + + def test_v3_partial_update_network_connection(self) -> None: + """Test case for v3_partial_update_network_connection + + Update Network Connection (patch) + """ + pass + + def test_v3_update_network_connection(self) -> None: + """Test case for v3_update_network_connection + + Update Network Connection + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_net_connect_v1_api.py b/test/test_net_connect_v1_api.py new file mode 100644 index 0000000..26e19ae --- /dev/null +++ b/test/test_net_connect_v1_api.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.net_connect_v1_api import NetConnectV1Api + + +class TestNetConnectV1Api(unittest.TestCase): + """NetConnectV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = NetConnectV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_create_network_connection(self) -> None: + """Test case for v1_create_network_connection + + Create a new Network Connection + """ + pass + + def test_v1_delete_network_connection(self) -> None: + """Test case for v1_delete_network_connection + + Delete an existing Network Connection + """ + pass + + def test_v1_get_network_connection(self) -> None: + """Test case for v1_get_network_connection + + Return the configuration and per project statuses for a single network provider. + """ + pass + + def test_v1_list_network_connections(self) -> None: + """Test case for v1_list_network_connections + + List available network connections + """ + pass + + def test_v1_list_network_interfaces(self) -> None: + """Test case for v1_list_network_interfaces + + List available physical network interfaces + """ + pass + + def test_v1_list_network_providers(self) -> None: + """Test case for v1_list_network_providers + + List available network providers + """ + pass + + def test_v1_partial_update_network_connection(self) -> None: + """Test case for v1_partial_update_network_connection + + Update Network Connection (partial) + """ + pass + + def test_v1_update_network_connection(self) -> None: + """Test case for v1_update_network_connection + + Update Network Connection + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_net_mon_proc_map_filter.py b/test/test_net_mon_proc_map_filter.py deleted file mode 100644 index 47b5580..0000000 --- a/test/test_net_mon_proc_map_filter.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 4.5.0-16740 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.net_mon_proc_map_filter import NetMonProcMapFilter # noqa: E501 -from corellium_api.rest import ApiException - -class TestNetMonProcMapFilter(unittest.TestCase): - """NetMonProcMapFilter unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test NetMonProcMapFilter - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.net_mon_proc_map_filter.NetMonProcMapFilter() # noqa: E501 - if include_optional : - return NetMonProcMapFilter( - port_ranges = [ - '' - ], - src_ports = [ - '' - ], - dst_ports = [ - '' - ], - ports = [ - '' - ], - protocols = [ - '' - ], - processes = [ - '' - ] - ) - else : - return NetMonProcMapFilter( - ) - - def testNetMonProcMapFilter(self): - """Test NetMonProcMapFilter""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_netdump_filter.py b/test/test_netdump_filter.py index d205a0b..bca1148 100644 --- a/test/test_netdump_filter.py +++ b/test/test_netdump_filter.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.netdump_filter import NetdumpFilter # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.netdump_filter import NetdumpFilter class TestNetdumpFilter(unittest.TestCase): """NetdumpFilter unit test stubs""" @@ -28,41 +26,47 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NetdumpFilter: """Test NetdumpFilter - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.netdump_filter.NetdumpFilter() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NetdumpFilter` + """ + model = NetdumpFilter() + if include_optional: return NetdumpFilter( port_ranges = [ '' - ], + ], src_ports = [ '' - ], + ], dst_ports = [ '' - ], + ], ports = [ '' - ], + ], protocols = [ '' - ], + ], processes = [ + '' + ], + hosts = [ '' ] ) - else : + else: return NetdumpFilter( ) + """ def testNetdumpFilter(self): """Test NetdumpFilter""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_network_connection.py b/test/test_network_connection.py index 6ceff72..ec3e723 100644 --- a/test/test_network_connection.py +++ b/test/test_network_connection.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.network_connection import NetworkConnection # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.network_connection import NetworkConnection class TestNetworkConnection(unittest.TestCase): """NetworkConnection unit test stubs""" @@ -28,44 +26,54 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NetworkConnection: """Test NetworkConnection - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.network_connection.NetworkConnection() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NetworkConnection` + """ + model = NetworkConnection() + if include_optional: return NetworkConnection( - identifier = '', - provider = '', - name = '', - config = corellium_api.models.config.config(), - projects = [ - corellium_api.models.project_network_state.ProjectNetworkState( + identifier = '', + provider = 'vlan', + name = '', + config = corellium.models.vlan_config_v1.VLANConfigV1( + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + gateway = '', + network = '', + dns_servers = [ + '' + ], ), + projects = { + 'key' : corellium.models.project_network_state.ProjectNetworkState( state = '', - details = corellium_api.models.details.details(), ) - ], - created_at = '', - updated_at = '', - created_by = '', + details = corellium.models.details.details(), ) + }, + created_at = '', + updated_at = '', + created_by = '', updated_by = '' ) - else : + else: return NetworkConnection( identifier = '', - provider = '', + provider = 'vlan', name = '', - config = corellium_api.models.config.config(), created_at = '', updated_at = '', created_by = '', updated_by = '', ) + """ def testNetworkConnection(self): """Test NetworkConnection""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_network_connection_config.py b/test/test_network_connection_config.py new file mode 100644 index 0000000..7fc56cb --- /dev/null +++ b/test/test_network_connection_config.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_connection_config import NetworkConnectionConfig + +class TestNetworkConnectionConfig(unittest.TestCase): + """NetworkConnectionConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkConnectionConfig: + """Test NetworkConnectionConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkConnectionConfig` + """ + model = NetworkConnectionConfig() + if include_optional: + return NetworkConnectionConfig( + username = 'jane.doe', + password = '', + config = 'client +dev tun +proto udp +remote vpn.example.com 1194 +resolv-retry infinite +nobind +persist-key +persist-tun +remote-cert-tls server +cipher AES-256-CBC +verb 3 + +-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE----- + +', + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + gateway = '10.0.0.1', + network = '10.0.0.0/24', + dns_servers = [1.1.1.1, 8.8.8.8] + ) + else: + return NetworkConnectionConfig( + config = 'client +dev tun +proto udp +remote vpn.example.com 1194 +resolv-retry infinite +nobind +persist-key +persist-tun +remote-cert-tls server +cipher AES-256-CBC +verb 3 + +-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE----- + +', + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + ) + """ + + def testNetworkConnectionConfig(self): + """Test NetworkConnectionConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_connection_offset_pagination_result.py b/test/test_network_connection_offset_pagination_result.py deleted file mode 100644 index 2a1c770..0000000 --- a/test/test_network_connection_offset_pagination_result.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.network_connection_offset_pagination_result import NetworkConnectionOffsetPaginationResult # noqa: E501 -from corellium_api.rest import ApiException - -class TestNetworkConnectionOffsetPaginationResult(unittest.TestCase): - """NetworkConnectionOffsetPaginationResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test NetworkConnectionOffsetPaginationResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.network_connection_offset_pagination_result.NetworkConnectionOffsetPaginationResult() # noqa: E501 - if include_optional : - return NetworkConnectionOffsetPaginationResult( - total = 1.337, - count = 1.337, - limit = 1.337, - offset = 1.337, - results = [ - corellium_api.models.network_connection.NetworkConnection( - identifier = '', - provider = '', - name = '', - config = corellium_api.models.config.config(), - projects = [ - corellium_api.models.project_network_state.ProjectNetworkState( - state = '', - details = corellium_api.models.details.details(), ) - ], - created_at = '', - updated_at = '', - created_by = '', - updated_by = '', ) - ] - ) - else : - return NetworkConnectionOffsetPaginationResult( - total = 1.337, - count = 1.337, - limit = 1.337, - offset = 1.337, - results = [ - corellium_api.models.network_connection.NetworkConnection( - identifier = '', - provider = '', - name = '', - config = corellium_api.models.config.config(), - projects = [ - corellium_api.models.project_network_state.ProjectNetworkState( - state = '', - details = corellium_api.models.details.details(), ) - ], - created_at = '', - updated_at = '', - created_by = '', - updated_by = '', ) - ], - ) - - def testNetworkConnectionOffsetPaginationResult(self): - """Test NetworkConnectionOffsetPaginationResult""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_network_connection_pagination_result.py b/test/test_network_connection_pagination_result.py new file mode 100644 index 0000000..20599dd --- /dev/null +++ b/test/test_network_connection_pagination_result.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_connection_pagination_result import NetworkConnectionPaginationResult + +class TestNetworkConnectionPaginationResult(unittest.TestCase): + """NetworkConnectionPaginationResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkConnectionPaginationResult: + """Test NetworkConnectionPaginationResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkConnectionPaginationResult` + """ + model = NetworkConnectionPaginationResult() + if include_optional: + return NetworkConnectionPaginationResult( + total = 1.337, + count = 1.337, + limit = 1.337, + offset = 1.337, + has_more = True, + results = [ + corellium.models.network_connection.NetworkConnection() + ] + ) + else: + return NetworkConnectionPaginationResult( + total = 1.337, + count = 1.337, + limit = 1.337, + offset = 1.337, + has_more = True, + results = [ + corellium.models.network_connection.NetworkConnection() + ], + ) + """ + + def testNetworkConnectionPaginationResult(self): + """Test NetworkConnectionPaginationResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_connection_provider.py b/test/test_network_connection_provider.py index 40a570a..900de0d 100644 --- a/test/test_network_connection_provider.py +++ b/test/test_network_connection_provider.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.network_connection_provider import NetworkConnectionProvider # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.network_connection_provider import NetworkConnectionProvider class TestNetworkConnectionProvider(unittest.TestCase): """NetworkConnectionProvider unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NetworkConnectionProvider: """Test NetworkConnectionProvider - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.network_connection_provider.NetworkConnectionProvider() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NetworkConnectionProvider` + """ + model = NetworkConnectionProvider() + if include_optional: return NetworkConnectionProvider( - name = '', + name = '', type = '' ) - else : + else: return NetworkConnectionProvider( name = '', type = '', ) + """ def testNetworkConnectionProvider(self): """Test NetworkConnectionProvider""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_network_connection_provider_offset_pagination_result.py b/test/test_network_connection_provider_offset_pagination_result.py deleted file mode 100644 index fd00092..0000000 --- a/test/test_network_connection_provider_offset_pagination_result.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.network_connection_provider_offset_pagination_result import NetworkConnectionProviderOffsetPaginationResult # noqa: E501 -from corellium_api.rest import ApiException - -class TestNetworkConnectionProviderOffsetPaginationResult(unittest.TestCase): - """NetworkConnectionProviderOffsetPaginationResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test NetworkConnectionProviderOffsetPaginationResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.network_connection_provider_offset_pagination_result.NetworkConnectionProviderOffsetPaginationResult() # noqa: E501 - if include_optional : - return NetworkConnectionProviderOffsetPaginationResult( - total = 1.337, - count = 1.337, - limit = 1.337, - offset = 1.337, - results = [ - corellium_api.models.network_connection_provider.NetworkConnectionProvider( - name = '', - type = '', ) - ] - ) - else : - return NetworkConnectionProviderOffsetPaginationResult( - total = 1.337, - count = 1.337, - limit = 1.337, - offset = 1.337, - results = [ - corellium_api.models.network_connection_provider.NetworkConnectionProvider( - name = '', - type = '', ) - ], - ) - - def testNetworkConnectionProviderOffsetPaginationResult(self): - """Test NetworkConnectionProviderOffsetPaginationResult""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_network_connection_provider_pagination_result.py b/test/test_network_connection_provider_pagination_result.py new file mode 100644 index 0000000..9f46994 --- /dev/null +++ b/test/test_network_connection_provider_pagination_result.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_connection_provider_pagination_result import NetworkConnectionProviderPaginationResult + +class TestNetworkConnectionProviderPaginationResult(unittest.TestCase): + """NetworkConnectionProviderPaginationResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkConnectionProviderPaginationResult: + """Test NetworkConnectionProviderPaginationResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkConnectionProviderPaginationResult` + """ + model = NetworkConnectionProviderPaginationResult() + if include_optional: + return NetworkConnectionProviderPaginationResult( + total = 1.337, + count = 1.337, + limit = 1.337, + offset = 1.337, + results = [ + corellium.models.network_connection_provider.NetworkConnectionProvider( + name = '', + type = '', ) + ] + ) + else: + return NetworkConnectionProviderPaginationResult( + total = 1.337, + count = 1.337, + limit = 1.337, + offset = 1.337, + results = [ + corellium.models.network_connection_provider.NetworkConnectionProvider( + name = '', + type = '', ) + ], + ) + """ + + def testNetworkConnectionProviderPaginationResult(self): + """Test NetworkConnectionProviderPaginationResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_connection_providers.py b/test/test_network_connection_providers.py new file mode 100644 index 0000000..d42cf9f --- /dev/null +++ b/test/test_network_connection_providers.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_connection_providers import NetworkConnectionProviders + +class TestNetworkConnectionProviders(unittest.TestCase): + """NetworkConnectionProviders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkConnectionProviders: + """Test NetworkConnectionProviders + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkConnectionProviders` + """ + model = NetworkConnectionProviders() + if include_optional: + return NetworkConnectionProviders( + results = [ + corellium.models.network_connection_providers_results_inner.NetworkConnectionProviders_results_inner( + name = 'OpenVPN', + type = 'openvpn', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return NetworkConnectionProviders( + results = [ + corellium.models.network_connection_providers_results_inner.NetworkConnectionProviders_results_inner( + name = 'OpenVPN', + type = 'openvpn', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testNetworkConnectionProviders(self): + """Test NetworkConnectionProviders""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_connection_providers_results_inner.py b/test/test_network_connection_providers_results_inner.py new file mode 100644 index 0000000..46082a1 --- /dev/null +++ b/test/test_network_connection_providers_results_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_connection_providers_results_inner import NetworkConnectionProvidersResultsInner + +class TestNetworkConnectionProvidersResultsInner(unittest.TestCase): + """NetworkConnectionProvidersResultsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkConnectionProvidersResultsInner: + """Test NetworkConnectionProvidersResultsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkConnectionProvidersResultsInner` + """ + model = NetworkConnectionProvidersResultsInner() + if include_optional: + return NetworkConnectionProvidersResultsInner( + name = 'OpenVPN', + type = 'openvpn' + ) + else: + return NetworkConnectionProvidersResultsInner( + name = 'OpenVPN', + type = 'openvpn', + ) + """ + + def testNetworkConnectionProvidersResultsInner(self): + """Test NetworkConnectionProvidersResultsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_connections.py b/test/test_network_connections.py new file mode 100644 index 0000000..95622d1 --- /dev/null +++ b/test/test_network_connections.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_connections import NetworkConnections + +class TestNetworkConnections(unittest.TestCase): + """NetworkConnections unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkConnections: + """Test NetworkConnections + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkConnections` + """ + model = NetworkConnections() + if include_optional: + return NetworkConnections( + results = [ + null + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return NetworkConnections( + results = [ + null + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testNetworkConnections(self): + """Test NetworkConnections""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_interfaces.py b/test/test_network_interfaces.py new file mode 100644 index 0000000..6bb8aa4 --- /dev/null +++ b/test/test_network_interfaces.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_interfaces import NetworkInterfaces + +class TestNetworkInterfaces(unittest.TestCase): + """NetworkInterfaces unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkInterfaces: + """Test NetworkInterfaces + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkInterfaces` + """ + model = NetworkInterfaces() + if include_optional: + return NetworkInterfaces( + results = [ + 'eth0' + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return NetworkInterfaces( + results = [ + 'eth0' + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testNetworkInterfaces(self): + """Test NetworkInterfaces""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_schema.py b/test/test_network_schema.py new file mode 100644 index 0000000..b40eb7f --- /dev/null +++ b/test/test_network_schema.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_schema import NetworkSchema + +class TestNetworkSchema(unittest.TestCase): + """NetworkSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkSchema: + """Test NetworkSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkSchema` + """ + model = NetworkSchema() + if include_optional: + return NetworkSchema( + physical_interfaces = ["eth0","eth1"], + vpns = [ + corellium.models.vpn_schema.VpnSchema( + type = 'openvpn', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + state = 'connected', + details = {"error":"connection timed out"}, ) + ] + ) + else: + return NetworkSchema( + physical_interfaces = ["eth0","eth1"], + ) + """ + + def testNetworkSchema(self): + """Test NetworkSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_status.py b/test/test_network_status.py new file mode 100644 index 0000000..ebcbaf0 --- /dev/null +++ b/test/test_network_status.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_status import NetworkStatus + +class TestNetworkStatus(unittest.TestCase): + """NetworkStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkStatus: + """Test NetworkStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkStatus` + """ + model = NetworkStatus() + if include_optional: + return NetworkStatus( + type = 'openvpn', + name = 'office-vpn', + state = 'disconnected', + details = {"error":"connection timed out"} + ) + else: + return NetworkStatus( + state = 'disconnected', + ) + """ + + def testNetworkStatus(self): + """Test NetworkStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_status_response.py b/test/test_network_status_response.py index 882b063..637e87b 100644 --- a/test/test_network_status_response.py +++ b/test/test_network_status_response.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.network_status_response import NetworkStatusResponse # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.network_status_response import NetworkStatusResponse class TestNetworkStatusResponse(unittest.TestCase): """NetworkStatusResponse unit test stubs""" @@ -28,31 +26,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NetworkStatusResponse: """Test NetworkStatusResponse - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.network_status_response.NetworkStatusResponse() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NetworkStatusResponse` + """ + model = NetworkStatusResponse() + if include_optional: return NetworkStatusResponse( - type = '', - name = '', - state = 'inactive', + type = '', + name = '', + state = 'inactive', params = None ) - else : + else: return NetworkStatusResponse( - type = '', - name = '', state = 'inactive', - params = None, ) + """ def testNetworkStatusResponse(self): """Test NetworkStatusResponse""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_network_status_v1.py b/test/test_network_status_v1.py new file mode 100644 index 0000000..96a694a --- /dev/null +++ b/test/test_network_status_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.network_status_v1 import NetworkStatusV1 + +class TestNetworkStatusV1(unittest.TestCase): + """NetworkStatusV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkStatusV1: + """Test NetworkStatusV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkStatusV1` + """ + model = NetworkStatusV1() + if include_optional: + return NetworkStatusV1( + type = '', + name = '', + state = 'disconnected' + ) + else: + return NetworkStatusV1( + ) + """ + + def testNetworkStatusV1(self): + """Test NetworkStatusV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_console_endpoint.py b/test/test_node_console_endpoint.py new file mode 100644 index 0000000..e3e57ed --- /dev/null +++ b/test/test_node_console_endpoint.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.node_console_endpoint import NodeConsoleEndpoint + +class TestNodeConsoleEndpoint(unittest.TestCase): + """NodeConsoleEndpoint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NodeConsoleEndpoint: + """Test NodeConsoleEndpoint + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NodeConsoleEndpoint` + """ + model = NodeConsoleEndpoint() + if include_optional: + return NodeConsoleEndpoint( + url = 'wss://acme-corp.example.com/api/v3/cluster/nodes/2x3ZOdu4pshouoY0kttRPoiIk5s/console?token=' + ) + else: + return NodeConsoleEndpoint( + url = 'wss://acme-corp.example.com/api/v3/cluster/nodes/2x3ZOdu4pshouoY0kttRPoiIk5s/console?token=', + ) + """ + + def testNodeConsoleEndpoint(self): + """Test NodeConsoleEndpoint""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_information.py b/test/test_node_information.py index 8df108d..33a3fbd 100644 --- a/test/test_node_information.py +++ b/test/test_node_information.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.node_information import NodeInformation # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.node_information import NodeInformation class TestNodeInformation(unittest.TestCase): """NodeInformation unit test stubs""" @@ -28,36 +26,36 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> NodeInformation: """Test NodeInformation - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.node_information.NodeInformation() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `NodeInformation` + """ + model = NodeInformation() + if include_optional: return NodeInformation( - node_id = '', - address = '', - hostname = '', - ssh_port = 1.337, - node_types = [ - '' - ] + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + address = '10.0.0.12', + hostname = 'node-01.example.com', + ssh_port = 22, + node_types = ["controller","compute"] ) - else : + else: return NodeInformation( - node_id = '', - address = '', - hostname = '', - node_types = [ - '' - ], + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + address = '10.0.0.12', + hostname = 'node-01.example.com', + ssh_port = 22, + node_types = ["controller","compute"], ) + """ def testNodeInformation(self): """Test NodeInformation""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_node_information_v1.py b/test/test_node_information_v1.py new file mode 100644 index 0000000..2dc08b5 --- /dev/null +++ b/test/test_node_information_v1.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.node_information_v1 import NodeInformationV1 + +class TestNodeInformationV1(unittest.TestCase): + """NodeInformationV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NodeInformationV1: + """Test NodeInformationV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NodeInformationV1` + """ + model = NodeInformationV1() + if include_optional: + return NodeInformationV1( + node_id = '', + address = '', + hostname = '', + ssh_port = 1.337, + node_types = [ + '' + ] + ) + else: + return NodeInformationV1( + node_id = '', + address = '', + hostname = '', + node_types = [ + '' + ], + ) + """ + + def testNodeInformationV1(self): + """Test NodeInformationV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_list.py b/test/test_node_list.py new file mode 100644 index 0000000..727869c --- /dev/null +++ b/test/test_node_list.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.node_list import NodeList + +class TestNodeList(unittest.TestCase): + """NodeList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NodeList: + """Test NodeList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NodeList` + """ + model = NodeList() + if include_optional: + return NodeList( + results = [ + corellium.models.node_information.NodeInformation( + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + address = '10.0.0.12', + hostname = 'node-01.example.com', + ssh_port = 22, + node_types = ["controller","compute"], ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return NodeList( + results = [ + corellium.models.node_information.NodeInformation( + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + address = '10.0.0.12', + hostname = 'node-01.example.com', + ssh_port = 22, + node_types = ["controller","compute"], ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testNodeList(self): + """Test NodeList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_updates_failed.py b/test/test_node_updates_failed.py new file mode 100644 index 0000000..2629880 --- /dev/null +++ b/test/test_node_updates_failed.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.node_updates_failed import NodeUpdatesFailed + +class TestNodeUpdatesFailed(unittest.TestCase): + """NodeUpdatesFailed unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NodeUpdatesFailed: + """Test NodeUpdatesFailed + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NodeUpdatesFailed` + """ + model = NodeUpdatesFailed() + if include_optional: + return NodeUpdatesFailed( + message = '', + nodes = [ + corellium.models.node_information_v1.NodeInformationV1( + node_id = '', + address = '', + hostname = '', + ssh_port = 1.337, + node_types = [ + '' + ], ) + ] + ) + else: + return NodeUpdatesFailed( + ) + """ + + def testNodeUpdatesFailed(self): + """Test NodeUpdatesFailed""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_open_id_config.py b/test/test_open_id_config.py index f53c10e..2e60745 100644 --- a/test/test_open_id_config.py +++ b/test/test_open_id_config.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.open_id_config import OpenIDConfig # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.open_id_config import OpenIDConfig class TestOpenIDConfig(unittest.TestCase): """OpenIDConfig unit test stubs""" @@ -28,27 +26,33 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> OpenIDConfig: """Test OpenIDConfig - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.open_id_config.OpenIDConfig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `OpenIDConfig` + """ + model = OpenIDConfig() + if include_optional: return OpenIDConfig( - discovery_url = '', - client_id = '', - client_secret = '', - invited_only = True + discovery_url = 'https://accounts.example.com/.well-known/openid-configuration', + client_id = 'corellium-domain-client', + client_secret = '', + invited_only = False ) - else : + else: return OpenIDConfig( + discovery_url = 'https://accounts.example.com/.well-known/openid-configuration', + client_id = 'corellium-domain-client', + client_secret = '', ) + """ def testOpenIDConfig(self): """Test OpenIDConfig""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_open_id_config_v1.py b/test/test_open_id_config_v1.py new file mode 100644 index 0000000..8264a0e --- /dev/null +++ b/test/test_open_id_config_v1.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.open_id_config_v1 import OpenIDConfigV1 + +class TestOpenIDConfigV1(unittest.TestCase): + """OpenIDConfigV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenIDConfigV1: + """Test OpenIDConfigV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenIDConfigV1` + """ + model = OpenIDConfigV1() + if include_optional: + return OpenIDConfigV1( + discovery_url = '', + client_id = '', + client_secret = '', + invited_only = True + ) + else: + return OpenIDConfigV1( + ) + """ + + def testOpenIDConfigV1(self): + """Test OpenIDConfigV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_open_vpn_config.py b/test/test_open_vpn_config.py new file mode 100644 index 0000000..3be8a08 --- /dev/null +++ b/test/test_open_vpn_config.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.open_vpn_config import OpenVPNConfig + +class TestOpenVPNConfig(unittest.TestCase): + """OpenVPNConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenVPNConfig: + """Test OpenVPNConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenVPNConfig` + """ + model = OpenVPNConfig() + if include_optional: + return OpenVPNConfig( + username = 'jane.doe', + password = '', + config = 'client +dev tun +proto udp +remote vpn.example.com 1194 +resolv-retry infinite +nobind +persist-key +persist-tun +remote-cert-tls server +cipher AES-256-CBC +verb 3 + +-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE----- + +' + ) + else: + return OpenVPNConfig( + config = 'client +dev tun +proto udp +remote vpn.example.com 1194 +resolv-retry infinite +nobind +persist-key +persist-tun +remote-cert-tls server +cipher AES-256-CBC +verb 3 + +-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE----- + +', + ) + """ + + def testOpenVPNConfig(self): + """Test OpenVPNConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_open_vpn_config_v1.py b/test/test_open_vpn_config_v1.py new file mode 100644 index 0000000..a07b46e --- /dev/null +++ b/test/test_open_vpn_config_v1.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.open_vpn_config_v1 import OpenVPNConfigV1 + +class TestOpenVPNConfigV1(unittest.TestCase): + """OpenVPNConfigV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenVPNConfigV1: + """Test OpenVPNConfigV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenVPNConfigV1` + """ + model = OpenVPNConfigV1() + if include_optional: + return OpenVPNConfigV1( + username = '', + password = '', + config = '' + ) + else: + return OpenVPNConfigV1( + config = '', + ) + """ + + def testOpenVPNConfigV1(self): + """Test OpenVPNConfigV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_open_vpn_network_connection.py b/test/test_open_vpn_network_connection.py new file mode 100644 index 0000000..14d446a --- /dev/null +++ b/test/test_open_vpn_network_connection.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.open_vpn_network_connection import OpenVPNNetworkConnection + +class TestOpenVPNNetworkConnection(unittest.TestCase): + """OpenVPNNetworkConnection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenVPNNetworkConnection: + """Test OpenVPNNetworkConnection + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenVPNNetworkConnection` + """ + model = OpenVPNNetworkConnection() + if include_optional: + return OpenVPNNetworkConnection( + name = 'office-vpn', + provider = 'openvpn', + config = corellium.models.open_vpn_config.OpenVPNConfig( + username = 'jane.doe', + password = '', + config = 'client +dev tun +proto udp +remote vpn.example.com 1194 +resolv-retry infinite +nobind +persist-key +persist-tun +remote-cert-tls server +cipher AES-256-CBC +verb 3 + +-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE----- + +', ), + identifier = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', + projects = {"1c41b1bc-4f53-48a8-b690-ad30611e1960":{"state":"connected"}}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + updated_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' + ) + else: + return OpenVPNNetworkConnection( + name = 'office-vpn', + provider = 'openvpn', + identifier = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + updated_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + ) + """ + + def testOpenVPNNetworkConnection(self): + """Test OpenVPNNetworkConnection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_open_vpn_network_connection_projects_value.py b/test/test_open_vpn_network_connection_projects_value.py new file mode 100644 index 0000000..881b43b --- /dev/null +++ b/test/test_open_vpn_network_connection_projects_value.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.open_vpn_network_connection_projects_value import OpenVPNNetworkConnectionProjectsValue + +class TestOpenVPNNetworkConnectionProjectsValue(unittest.TestCase): + """OpenVPNNetworkConnectionProjectsValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenVPNNetworkConnectionProjectsValue: + """Test OpenVPNNetworkConnectionProjectsValue + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenVPNNetworkConnectionProjectsValue` + """ + model = OpenVPNNetworkConnectionProjectsValue() + if include_optional: + return OpenVPNNetworkConnectionProjectsValue( + state = 'disconnected', + details = { + 'key' : null + } + ) + else: + return OpenVPNNetworkConnectionProjectsValue( + state = 'disconnected', + ) + """ + + def testOpenVPNNetworkConnectionProjectsValue(self): + """Test OpenVPNNetworkConnectionProjectsValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_open_vpn_network_connection_v1.py b/test/test_open_vpn_network_connection_v1.py new file mode 100644 index 0000000..90a956f --- /dev/null +++ b/test/test_open_vpn_network_connection_v1.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.open_vpn_network_connection_v1 import OpenVPNNetworkConnectionV1 + +class TestOpenVPNNetworkConnectionV1(unittest.TestCase): + """OpenVPNNetworkConnectionV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenVPNNetworkConnectionV1: + """Test OpenVPNNetworkConnectionV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenVPNNetworkConnectionV1` + """ + model = OpenVPNNetworkConnectionV1() + if include_optional: + return OpenVPNNetworkConnectionV1( + identifier = '', + provider = 'openvpn', + name = '', + config = corellium.models.open_vpn_config_v1.OpenVPNConfigV1( + username = '', + password = '', + config = '', ), + projects = { + 'key' : corellium.models.project_network_state.ProjectNetworkState( + state = '', + details = corellium.models.details.details(), ) + }, + created_at = '', + updated_at = '', + created_by = '', + updated_by = '' + ) + else: + return OpenVPNNetworkConnectionV1( + identifier = '', + provider = 'openvpn', + name = '', + created_at = '', + updated_at = '', + created_by = '', + updated_by = '', + ) + """ + + def testOpenVPNNetworkConnectionV1(self): + """Test OpenVPNNetworkConnectionV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paginated_assessments.py b/test/test_paginated_assessments.py new file mode 100644 index 0000000..acf9fd7 --- /dev/null +++ b/test/test_paginated_assessments.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.paginated_assessments import PaginatedAssessments + +class TestPaginatedAssessments(unittest.TestCase): + """PaginatedAssessments unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginatedAssessments: + """Test PaginatedAssessments + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginatedAssessments` + """ + model = PaginatedAssessments() + if include_optional: + return PaginatedAssessments( + limit = 56, + offset = 56, + count = 56, + total = 56, + results = [ + corellium.models.assessment.Assessment( + id = '', + status = 'complete', + instance_id = '', + bundle = corellium.models.assessment_bundle.AssessmentBundle( + id = '', + name = 'Camera', + version = '1.2.0', ), + wordlist = corellium.models.assessment_wordlist.Assessment_wordlist( + id = '', + name = '', ), + frida_script = corellium.models.assessment_frida_script.Assessment_fridaScript( + id = '', + name = '', ), + report_id = '', + results = corellium.models.assessment_results.AssessmentResults( + pass = 56, + fail = 56, + error = 56, + info = 56, + na = 56, + artifact = 56, + score = 56, ), + metadata = corellium.models.assessment_metadata.AssessmentMetadata( + corellium_version = '6.4.0', ), + severity_counts = corellium.models.assessment_severity_counts.AssessmentSeverityCounts( + high = 56, + medium = 56, + low = 56, + info = 56, ), + error = '', + created_by = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return PaginatedAssessments( + limit = 56, + offset = 56, + count = 56, + total = 56, + results = [ + corellium.models.assessment.Assessment( + id = '', + status = 'complete', + instance_id = '', + bundle = corellium.models.assessment_bundle.AssessmentBundle( + id = '', + name = 'Camera', + version = '1.2.0', ), + wordlist = corellium.models.assessment_wordlist.Assessment_wordlist( + id = '', + name = '', ), + frida_script = corellium.models.assessment_frida_script.Assessment_fridaScript( + id = '', + name = '', ), + report_id = '', + results = corellium.models.assessment_results.AssessmentResults( + pass = 56, + fail = 56, + error = 56, + info = 56, + na = 56, + artifact = 56, + score = 56, ), + metadata = corellium.models.assessment_metadata.AssessmentMetadata( + corellium_version = '6.4.0', ), + severity_counts = corellium.models.assessment_severity_counts.AssessmentSeverityCounts( + high = 56, + medium = 56, + low = 56, + info = 56, ), + error = '', + created_by = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + """ + + def testPaginatedAssessments(self): + """Test PaginatedAssessments""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pagination.py b/test/test_pagination.py index ee11c52..0b41c23 100644 --- a/test/test_pagination.py +++ b/test/test_pagination.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.pagination import Pagination # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.pagination import Pagination class TestPagination(unittest.TestCase): """Pagination unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Pagination: """Test Pagination - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.pagination.Pagination() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Pagination` + """ + model = Pagination() + if include_optional: return Pagination( - current_page = 1.337, - total_pages = 1.337, - total_items = 1.337, + current_page = 1.337, + total_pages = 1.337, + total_items = 1.337, items_per_page = 1.337 ) - else : + else: return Pagination( ) + """ def testPagination(self): """Test Pagination""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_partial_update_interconnect_request.py b/test/test_partial_update_interconnect_request.py index b52a5fa..8ce6c7d 100644 --- a/test/test_partial_update_interconnect_request.py +++ b/test/test_partial_update_interconnect_request.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.partial_update_interconnect_request import PartialUpdateInterconnectRequest class TestPartialUpdateInterconnectRequest(unittest.TestCase): """PartialUpdateInterconnectRequest unit test stubs""" @@ -28,28 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PartialUpdateInterconnectRequest: """Test PartialUpdateInterconnectRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.partial_update_interconnect_request.PartialUpdateInterconnectRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PartialUpdateInterconnectRequest` + """ + model = PartialUpdateInterconnectRequest() + if include_optional: return PartialUpdateInterconnectRequest( - name = '', + name = '', interfaces = [ None - ], - interfaces = '' + ] ) - else : + else: return PartialUpdateInterconnectRequest( ) + """ def testPartialUpdateInterconnectRequest(self): """Test PartialUpdateInterconnectRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_partial_update_network_connection_body.py b/test/test_partial_update_network_connection_body.py new file mode 100644 index 0000000..0bb8ba0 --- /dev/null +++ b/test/test_partial_update_network_connection_body.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.partial_update_network_connection_body import PartialUpdateNetworkConnectionBody + +class TestPartialUpdateNetworkConnectionBody(unittest.TestCase): + """PartialUpdateNetworkConnectionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PartialUpdateNetworkConnectionBody: + """Test PartialUpdateNetworkConnectionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PartialUpdateNetworkConnectionBody` + """ + model = PartialUpdateNetworkConnectionBody() + if include_optional: + return PartialUpdateNetworkConnectionBody( + name = 'office-vpn', + config = None, + force = True + ) + else: + return PartialUpdateNetworkConnectionBody( + ) + """ + + def testPartialUpdateNetworkConnectionBody(self): + """Test PartialUpdateNetworkConnectionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_partial_update_network_connection_options.py b/test/test_partial_update_network_connection_options.py new file mode 100644 index 0000000..a042a6d --- /dev/null +++ b/test/test_partial_update_network_connection_options.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.partial_update_network_connection_options import PartialUpdateNetworkConnectionOptions + +class TestPartialUpdateNetworkConnectionOptions(unittest.TestCase): + """PartialUpdateNetworkConnectionOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PartialUpdateNetworkConnectionOptions: + """Test PartialUpdateNetworkConnectionOptions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PartialUpdateNetworkConnectionOptions` + """ + model = PartialUpdateNetworkConnectionOptions() + if include_optional: + return PartialUpdateNetworkConnectionOptions( + name = '', + config = corellium.models.update_network_connection_options_config.UpdateNetworkConnectionOptions_config(), + force = True + ) + else: + return PartialUpdateNetworkConnectionOptions( + ) + """ + + def testPartialUpdateNetworkConnectionOptions(self): + """Test PartialUpdateNetworkConnectionOptions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_password_change_body.py b/test/test_password_change_body.py index 88fe2bc..3ab1001 100644 --- a/test/test_password_change_body.py +++ b/test/test_password_change_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.password_change_body import PasswordChangeBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.password_change_body import PasswordChangeBody class TestPasswordChangeBody(unittest.TestCase): """PasswordChangeBody unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PasswordChangeBody: """Test PasswordChangeBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.password_change_body.PasswordChangeBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PasswordChangeBody` + """ + model = PasswordChangeBody() + if include_optional: return PasswordChangeBody( - user = '', - old_password = '', + user = '', + old_password = '', new_password = '' ) - else : + else: return PasswordChangeBody( user = '', old_password = '', new_password = '', ) + """ def testPasswordChangeBody(self): """Test PasswordChangeBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_password_reset_body.py b/test/test_password_reset_body.py index fb440ad..5492c0f 100644 --- a/test/test_password_reset_body.py +++ b/test/test_password_reset_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.password_reset_body import PasswordResetBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.password_reset_body import PasswordResetBody class TestPasswordResetBody(unittest.TestCase): """PasswordResetBody unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PasswordResetBody: """Test PasswordResetBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.password_reset_body.PasswordResetBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PasswordResetBody` + """ + model = PasswordResetBody() + if include_optional: return PasswordResetBody( - token = '', - totp_token = '', + token = '', + totp_token = '', new_password = '' ) - else : + else: return PasswordResetBody( token = '', totp_token = '', new_password = '', ) + """ def testPasswordResetBody(self): """Test PasswordResetBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_patch_cluster_config_body.py b/test/test_patch_cluster_config_body.py new file mode 100644 index 0000000..8d6da7b --- /dev/null +++ b/test/test_patch_cluster_config_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_cluster_config_body import PatchClusterConfigBody + +class TestPatchClusterConfigBody(unittest.TestCase): + """PatchClusterConfigBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchClusterConfigBody: + """Test PatchClusterConfigBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchClusterConfigBody` + """ + model = PatchClusterConfigBody() + if include_optional: + return PatchClusterConfigBody( + snapshot_limit = 10, + coordinator_config = corellium.models.coordinator_config.CoordinatorConfig( + usb_media_access_enabled = True, ), + ai_tools_config = corellium.models.ai_tools_config.AiToolsConfig( + ai_enabled = True, ), + originating_node = '10.0.0.12' + ) + else: + return PatchClusterConfigBody( + ) + """ + + def testPatchClusterConfigBody(self): + """Test PatchClusterConfigBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_domain_auth_provider_body.py b/test/test_patch_domain_auth_provider_body.py new file mode 100644 index 0000000..df12d87 --- /dev/null +++ b/test/test_patch_domain_auth_provider_body.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_domain_auth_provider_body import PatchDomainAuthProviderBody + +class TestPatchDomainAuthProviderBody(unittest.TestCase): + """PatchDomainAuthProviderBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchDomainAuthProviderBody: + """Test PatchDomainAuthProviderBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchDomainAuthProviderBody` + """ + model = PatchDomainAuthProviderBody() + if include_optional: + return PatchDomainAuthProviderBody( + provider_type = 'open-id-connect', + enabled = True, + label = 'Log in with Okta', + config = None + ) + else: + return PatchDomainAuthProviderBody( + ) + """ + + def testPatchDomainAuthProviderBody(self): + """Test PatchDomainAuthProviderBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_domain_body.py b/test/test_patch_domain_body.py new file mode 100644 index 0000000..d51f535 --- /dev/null +++ b/test/test_patch_domain_body.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_domain_body import PatchDomainBody + +class TestPatchDomainBody(unittest.TestCase): + """PatchDomainBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchDomainBody: + """Test PatchDomainBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchDomainBody` + """ + model = PatchDomainBody() + if include_optional: + return PatchDomainBody( + totp_required = True, + trial_extension = corellium.models.trial_extension.TrialExtension( + duration = 7, + reason = 'Need more time to evaluate the platform.', + denied = True, + denied_reason = 'Trial already extended twice.', ), + device_auto_shutdown = corellium.models.device_auto_shutdown_schema.DeviceAutoShutdownSchema( + enabled = True, + threshold = 10, ), + allowed_devices_filters = [ + corellium.models.allowed_devices_filter_schema.AllowedDevicesFilterSchema( + device_name = 'iphone15', + allowed_firmwares = [ + corellium.models.allowed_firmware_schema.AllowedFirmwareSchema( + version = '17.4.1', + build_id = '21E236', ) + ], ) + ], + webplayer = corellium.models.patch_domain_body_webplayer.PatchDomainBody_webplayer( + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.snapshot_sharing_permissions_request_schema.SnapshotSharingPermissionsRequestSchema( + enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ) + ) + else: + return PatchDomainBody( + ) + """ + + def testPatchDomainBody(self): + """Test PatchDomainBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_domain_body_webplayer.py b/test/test_patch_domain_body_webplayer.py new file mode 100644 index 0000000..f590778 --- /dev/null +++ b/test/test_patch_domain_body_webplayer.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_domain_body_webplayer import PatchDomainBodyWebplayer + +class TestPatchDomainBodyWebplayer(unittest.TestCase): + """PatchDomainBodyWebplayer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchDomainBodyWebplayer: + """Test PatchDomainBodyWebplayer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchDomainBodyWebplayer` + """ + model = PatchDomainBodyWebplayer() + if include_optional: + return PatchDomainBodyWebplayer( + allowed_domains = ["app.example.com"] + ) + else: + return PatchDomainBodyWebplayer( + ) + """ + + def testPatchDomainBodyWebplayer(self): + """Test PatchDomainBodyWebplayer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_domain_welcome_message_body.py b/test/test_patch_domain_welcome_message_body.py new file mode 100644 index 0000000..476b0a5 --- /dev/null +++ b/test/test_patch_domain_welcome_message_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_domain_welcome_message_body import PatchDomainWelcomeMessageBody + +class TestPatchDomainWelcomeMessageBody(unittest.TestCase): + """PatchDomainWelcomeMessageBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchDomainWelcomeMessageBody: + """Test PatchDomainWelcomeMessageBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchDomainWelcomeMessageBody` + """ + model = PatchDomainWelcomeMessageBody() + if include_optional: + return PatchDomainWelcomeMessageBody( + message = '

Welcome to Acme Corp!

', + enabled = True + ) + else: + return PatchDomainWelcomeMessageBody( + ) + """ + + def testPatchDomainWelcomeMessageBody(self): + """Test PatchDomainWelcomeMessageBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_firmware_service_config_body.py b/test/test_patch_firmware_service_config_body.py new file mode 100644 index 0000000..6ccdc8f --- /dev/null +++ b/test/test_patch_firmware_service_config_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_firmware_service_config_body import PatchFirmwareServiceConfigBody + +class TestPatchFirmwareServiceConfigBody(unittest.TestCase): + """PatchFirmwareServiceConfigBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchFirmwareServiceConfigBody: + """Test PatchFirmwareServiceConfigBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchFirmwareServiceConfigBody` + """ + model = PatchFirmwareServiceConfigBody() + if include_optional: + return PatchFirmwareServiceConfigBody( + cache_firmware = False, + cluster_firmware_assets = False, + fallback_original_url = False, + fetch_firmware_assets = True, + should_download = True, + download_ipsw_filters = [{"device":{"product":"iPhone16,.*"},"include":true}] + ) + else: + return PatchFirmwareServiceConfigBody( + ) + """ + + def testPatchFirmwareServiceConfigBody(self): + """Test PatchFirmwareServiceConfigBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_instance_body.py b/test/test_patch_instance_body.py new file mode 100644 index 0000000..8f6d4a1 --- /dev/null +++ b/test/test_patch_instance_body.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_instance_body import PatchInstanceBody + +class TestPatchInstanceBody(unittest.TestCase): + """PatchInstanceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchInstanceBody: + """Test PatchInstanceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchInstanceBody` + """ + model = PatchInstanceBody() + if include_optional: + return PatchInstanceBody( + name = 'My iPhone 13 Pro', + boot_options = corellium.models.instance_boot_options.InstanceBootOptions( + boot_args = '-v debug=0x8 keepsyms=1', + restore_boot_args = '-v debug=0x8 keepsyms=1', + udid = '00008030-001A2D423C29802E', + ecid = '0x1a2b3c4d5e6f', + random_seed = 'deadbeefcafebabe', + pac = True, + aprr = True, + cores = 4, + ram = 6144, + additional_tags = ["kalloc"], + kernel = corellium.models.instance_boot_options_kernel.InstanceBootOptionsKernel( + firmware_path = 'kernelcache', ), + pongo = corellium.models.instance_boot_options_pongo.InstanceBootOptionsPongo( + id = '3e1354a3-fb10-46c0-8b05-56e28edbde69', + name = 'pongo.bin', + size = 1048576, ), + serial = 'C39ABCDEFGH1', + no_snapshot_mount = False, + kernel_slide = '0x18000000', + cd_hashes = ["a1b2c3d4e5f60718293a4b5c6d7e8f90"], + imei = '359268000000000', + imsi = '310150123456789', + ssid0 = 'CorelliumWiFi', + ssid1 = 'CorelliumWiFi-5G', + wifi_mac = '02:00:00:aa:bb:cc', + model_id = 'SM-G973F', + manufacturer_id = 'samsung', + kernel_patches = 'patch1,patch2', + stop_on_fault = True, + boot_addr = '0x800000000', + tzen = True, + authorized_keys = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFhYmJjY2RkZWVmZmdnaGhpaWpqa2trbGxtbW5ubm9v user@example.com', + v_mmio = [ + corellium.models.instance_boot_options_v_mmio_inner.InstanceBootOptions_vMMIO_inner( + start = '0x9000000', + size = '0x1000', + irq = '33-36', ) + ], + fvp = corellium.models.instance_boot_options_fvp.InstanceBootOptionsFvp( + model_binary = '/usr/local/fvp/bin/FVP_Base_RevC-2xAEMvA', + parameters = {"bp.secure_memory":"false","cluster0.NUM_CORES":"4"}, + data = ["/tmp/data.bin@0x80000000"], + breaks = ["0x80001000"], + dumps = ["/tmp/dump.bin@0x80000000,0x1000"], + cadi_log = 'cadi-log.xml', + cadi_server = 'true', + iris_server = 'true', + iris_log = 'info', + iris_allow_remote = 'true', + iris_port_range = '7000:7010', + iris_port = '7100', + run = 'true', + stat = 'true', + quiet = 'true', + start = '0x80000000', + plugin = '/usr/local/fvp/plugins/ToolsSharedLib.so', + fast_ram = 'fastram.cfg', + save = '/tmp/checkpoint', + restore = '/tmp/checkpoint', + cpi_file = 'cpi.txt', + cycle_limit = '1000000', + cpu_limit = '3600', + time_limit = '3600', + sim_limit = '60', ), ), + proxy = [ + corellium.models.patch_instance_body_proxy_inner.PatchInstanceBody_proxy_inner( + device_port = 22, + first_available = True, + expose = True, + router_port = 22, ) + ], + strace_filter = [ + corellium.models.patch_instance_body_strace_filter_inner.PatchInstanceBody_straceFilter_inner( + trait = 'name', + value = '1234', ) + ] + ) + else: + return PatchInstanceBody( + ) + """ + + def testPatchInstanceBody(self): + """Test PatchInstanceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_instance_body_proxy_inner.py b/test/test_patch_instance_body_proxy_inner.py new file mode 100644 index 0000000..2f35171 --- /dev/null +++ b/test/test_patch_instance_body_proxy_inner.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_instance_body_proxy_inner import PatchInstanceBodyProxyInner + +class TestPatchInstanceBodyProxyInner(unittest.TestCase): + """PatchInstanceBodyProxyInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchInstanceBodyProxyInner: + """Test PatchInstanceBodyProxyInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchInstanceBodyProxyInner` + """ + model = PatchInstanceBodyProxyInner() + if include_optional: + return PatchInstanceBodyProxyInner( + device_port = 22, + first_available = True, + expose = True, + router_port = 22 + ) + else: + return PatchInstanceBodyProxyInner( + device_port = 22, + first_available = True, + expose = True, + router_port = 22, + ) + """ + + def testPatchInstanceBodyProxyInner(self): + """Test PatchInstanceBodyProxyInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_instance_body_strace_filter_inner.py b/test/test_patch_instance_body_strace_filter_inner.py new file mode 100644 index 0000000..41503b5 --- /dev/null +++ b/test/test_patch_instance_body_strace_filter_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_instance_body_strace_filter_inner import PatchInstanceBodyStraceFilterInner + +class TestPatchInstanceBodyStraceFilterInner(unittest.TestCase): + """PatchInstanceBodyStraceFilterInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchInstanceBodyStraceFilterInner: + """Test PatchInstanceBodyStraceFilterInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchInstanceBodyStraceFilterInner` + """ + model = PatchInstanceBodyStraceFilterInner() + if include_optional: + return PatchInstanceBodyStraceFilterInner( + trait = 'name', + value = '1234' + ) + else: + return PatchInstanceBodyStraceFilterInner( + trait = 'name', + value = '1234', + ) + """ + + def testPatchInstanceBodyStraceFilterInner(self): + """Test PatchInstanceBodyStraceFilterInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_instance_options.py b/test/test_patch_instance_options.py index c882b61..2bce29f 100644 --- a/test/test_patch_instance_options.py +++ b/test/test_patch_instance_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.patch_instance_options import PatchInstanceOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.patch_instance_options import PatchInstanceOptions class TestPatchInstanceOptions(unittest.TestCase): """PatchInstanceOptions unit test stubs""" @@ -28,17 +26,19 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PatchInstanceOptions: """Test PatchInstanceOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.patch_instance_options.PatchInstanceOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PatchInstanceOptions` + """ + model = PatchInstanceOptions() + if include_optional: return PatchInstanceOptions( - name = '', - state = 'on', - boot_options = corellium_api.models.instance_boot_options.InstanceBootOptions( + name = '', + state = 'on', + boot_options = corellium.models.instance_boot_options_v1.InstanceBootOptionsV1( boot_args = '', restore_boot_args = '', udid = '', @@ -48,23 +48,30 @@ def make_instance(self, include_optional): aprr = True, additional_tags = [ 'kalloc' - ], ), + ], + kernel = corellium.models.instance_boot_options_kernel_v1.InstanceBootOptionsKernelV1( + firmware_path = '', ), + pongo = corellium.models.instance_boot_options_pongo_v1.InstanceBootOptionsPongoV1( + id = '', + name = '', + size = 1.337, ), ), proxy = [ - corellium_api.models.proxy_config.ProxyConfig( + corellium.models.proxy_config.ProxyConfig( device_port = 1.337, first_available = True, expose = True, router_port = 1.337, ) ] ) - else : + else: return PatchInstanceOptions( ) + """ def testPatchInstanceOptions(self): """Test PatchInstanceOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_patch_instance_read_only.py b/test/test_patch_instance_read_only.py index dc43e4c..1038882 100644 --- a/test/test_patch_instance_read_only.py +++ b/test/test_patch_instance_read_only.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.patch_instance_read_only import PatchInstanceReadOnly # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.patch_instance_read_only import PatchInstanceReadOnly class TestPatchInstanceReadOnly(unittest.TestCase): """PatchInstanceReadOnly unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PatchInstanceReadOnly: """Test PatchInstanceReadOnly - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.patch_instance_read_only.PatchInstanceReadOnly() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PatchInstanceReadOnly` + """ + model = PatchInstanceReadOnly() + if include_optional: return PatchInstanceReadOnly( read_only = '' ) - else : + else: return PatchInstanceReadOnly( ) + """ def testPatchInstanceReadOnly(self): """Test PatchInstanceReadOnly""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_patch_instance_read_only_body.py b/test/test_patch_instance_read_only_body.py new file mode 100644 index 0000000..36b9293 --- /dev/null +++ b/test/test_patch_instance_read_only_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_instance_read_only_body import PatchInstanceReadOnlyBody + +class TestPatchInstanceReadOnlyBody(unittest.TestCase): + """PatchInstanceReadOnlyBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchInstanceReadOnlyBody: + """Test PatchInstanceReadOnlyBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchInstanceReadOnlyBody` + """ + model = PatchInstanceReadOnlyBody() + if include_optional: + return PatchInstanceReadOnlyBody( + read_only = True + ) + else: + return PatchInstanceReadOnlyBody( + read_only = True, + ) + """ + + def testPatchInstanceReadOnlyBody(self): + """Test PatchInstanceReadOnlyBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_interconnect_body.py b/test/test_patch_interconnect_body.py new file mode 100644 index 0000000..1fa2ca7 --- /dev/null +++ b/test/test_patch_interconnect_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_interconnect_body import PatchInterconnectBody + +class TestPatchInterconnectBody(unittest.TestCase): + """PatchInterconnectBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchInterconnectBody: + """Test PatchInterconnectBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchInterconnectBody` + """ + model = PatchInterconnectBody() + if include_optional: + return PatchInterconnectBody( + name = 'vpn-gateway', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ] + ) + else: + return PatchInterconnectBody( + ) + """ + + def testPatchInterconnectBody(self): + """Test PatchInterconnectBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_project_body.py b/test/test_patch_project_body.py new file mode 100644 index 0000000..7c62341 --- /dev/null +++ b/test/test_patch_project_body.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_project_body import PatchProjectBody + +class TestPatchProjectBody(unittest.TestCase): + """PatchProjectBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchProjectBody: + """Test PatchProjectBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchProjectBody` + """ + model = PatchProjectBody() + if include_optional: + return PatchProjectBody( + name = 'Default Project', + settings = corellium.models.project_settings.ProjectSettings( + version = 1, + internet_access = True, + dhcp = True, + connection = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', ), + quotas = corellium.models.project_quota_input.ProjectQuotaInput( + cores = 8, + instances = 20, + ram = 49152, ) + ) + else: + return PatchProjectBody( + ) + """ + + def testPatchProjectBody(self): + """Test PatchProjectBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_patch_user_body.py b/test/test_patch_user_body.py new file mode 100644 index 0000000..6f84bdf --- /dev/null +++ b/test/test_patch_user_body.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.patch_user_body import PatchUserBody + +class TestPatchUserBody(unittest.TestCase): + """PatchUserBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PatchUserBody: + """Test PatchUserBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PatchUserBody` + """ + model = PatchUserBody() + if include_optional: + return PatchUserBody( + name = 'jane.doe', + label = 'Domain Administrator', + email = 'jane.doe@example.com', + cluster_administrator = False, + password = '', + misc = {"lastVPNType":"ovpn"}, + administrator = True, + agreed_to_terms = '2026-05-22T13:58:34.000Z', + totp_enabled = True + ) + else: + return PatchUserBody( + ) + """ + + def testPatchUserBody(self): + """Test PatchUserBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_peripherals_data.py b/test/test_peripherals_data.py index c534228..a07359b 100644 --- a/test/test_peripherals_data.py +++ b/test/test_peripherals_data.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.peripherals_data import PeripheralsData # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.peripherals_data import PeripheralsData class TestPeripheralsData(unittest.TestCase): """PeripheralsData unit test stubs""" @@ -28,40 +26,45 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PeripheralsData: """Test PeripheralsData - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.peripherals_data.PeripheralsData() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PeripheralsData` + """ + model = PeripheralsData() + if include_optional: return PeripheralsData( - acceleration = [ - 1.337 - ], - gyroscope = [ - 1.337 - ], - magnetic = [ - 1.337 - ], - orientation = [ - 1.337 - ], - temperature = 1.337, - proximity = 1.337, - light = 1.337, - pressure = 1.337, - humidity = 1.337 + acceleration = [0,9.81,0], + gyroscope = [0,0,0], + magnetic = [0,45,0], + orientation = [0,0,0], + temperature = 25, + proximity = 50, + light = 20, + pressure = 1013.25, + humidity = 55, + gps_lat = 37.4143, + gps_lon = -122.0774, + gps_alt = 45, + gps_toffs = 0, + ac_online = 0, + battery_present = 0, + battery_status = 'charging', + battery_health = 'good', + battery_capacity = 82, + biometric_pass = 0 ) - else : + else: return PeripheralsData( ) + """ def testPeripheralsData(self): """Test PeripheralsData""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_peripherals_data_v1.py b/test/test_peripherals_data_v1.py new file mode 100644 index 0000000..53d73e2 --- /dev/null +++ b/test/test_peripherals_data_v1.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.peripherals_data_v1 import PeripheralsDataV1 + +class TestPeripheralsDataV1(unittest.TestCase): + """PeripheralsDataV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PeripheralsDataV1: + """Test PeripheralsDataV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PeripheralsDataV1` + """ + model = PeripheralsDataV1() + if include_optional: + return PeripheralsDataV1( + acceleration = [ + 1.337 + ], + gyroscope = [ + 1.337 + ], + magnetic = [ + 1.337 + ], + orientation = [ + 1.337 + ], + temperature = 1.337, + proximity = 1.337, + light = 1.337, + pressure = 1.337, + humidity = 1.337, + gps_lat = 1.337, + gps_lon = 1.337, + gps_alt = 1.337, + gps_toffs = 1.337, + ac_online = 56, + battery_present = 56, + battery_status = 'charging', + battery_health = 'good', + battery_capacity = 1.337, + biometric_pass = 56 + ) + else: + return PeripheralsDataV1( + ) + """ + + def testPeripheralsDataV1(self): + """Test PeripheralsDataV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_plan.py b/test/test_plan.py index 8ec9f18..c18d108 100644 --- a/test/test_plan.py +++ b/test/test_plan.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.plan import Plan # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.plan import Plan class TestPlan(unittest.TestCase): """Plan unit test stubs""" @@ -28,25 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Plan: """Test Plan - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.plan.Plan() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Plan` + """ + model = Plan() + if include_optional: return Plan( - plan_id = '', - name = '' + license_type = 'premium', + cores = 56 ) - else : + else: return Plan( + license_type = 'premium', + cores = 56, ) + """ def testPlan(self): """Test Plan""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_plan_options.py b/test/test_plan_options.py deleted file mode 100644 index 9ee18fa..0000000 --- a/test/test_plan_options.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 3.11.0-13738 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.plan_options import PlanOptions # noqa: E501 -from corellium_api.rest import ApiException - -class TestPlanOptions(unittest.TestCase): - """PlanOptions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test PlanOptions - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.plan_options.PlanOptions() # noqa: E501 - if include_optional : - return PlanOptions( - license_type = 'premium', - cores = 56 - ) - else : - return PlanOptions( - license_type = 'premium', - cores = 56, - ) - - def testPlanOptions(self): - """Test PlanOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_plan_v1.py b/test/test_plan_v1.py new file mode 100644 index 0000000..4a7c60d --- /dev/null +++ b/test/test_plan_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.plan_v1 import PlanV1 + +class TestPlanV1(unittest.TestCase): + """PlanV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PlanV1: + """Test PlanV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PlanV1` + """ + model = PlanV1() + if include_optional: + return PlanV1( + plan_id = '', + name = '' + ) + else: + return PlanV1( + ) + """ + + def testPlanV1(self): + """Test PlanV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pool_usage_schema.py b/test/test_pool_usage_schema.py new file mode 100644 index 0000000..e89ea95 --- /dev/null +++ b/test/test_pool_usage_schema.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.pool_usage_schema import PoolUsageSchema + +class TestPoolUsageSchema(unittest.TestCase): + """PoolUsageSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PoolUsageSchema: + """Test PoolUsageSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PoolUsageSchema` + """ + model = PoolUsageSchema() + if include_optional: + return PoolUsageSchema( + used = 1024, + size = 4096, + free = 3072, + lv_count = 37 + ) + else: + return PoolUsageSchema( + ) + """ + + def testPoolUsageSchema(self): + """Test PoolUsageSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_portal_session.py b/test/test_portal_session.py new file mode 100644 index 0000000..b478aa1 --- /dev/null +++ b/test/test_portal_session.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.portal_session import PortalSession + +class TestPortalSession(unittest.TestCase): + """PortalSession unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PortalSession: + """Test PortalSession + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PortalSession` + """ + model = PortalSession() + if include_optional: + return PortalSession( + url = 'https://billing.stripe.com/p/session/test_xxxxxxxxxxxxxxxxxxxxxxxx' + ) + else: + return PortalSession( + url = 'https://billing.stripe.com/p/session/test_xxxxxxxxxxxxxxxxxxxxxxxx', + ) + """ + + def testPortalSession(self): + """Test PortalSession""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_post_share_snapshot_request_payload.py b/test/test_post_share_snapshot_request_payload.py index e0980c4..e1ed7a8 100644 --- a/test/test_post_share_snapshot_request_payload.py +++ b/test/test_post_share_snapshot_request_payload.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.post_share_snapshot_request_payload import PostShareSnapshotRequestPayload class TestPostShareSnapshotRequestPayload(unittest.TestCase): """PostShareSnapshotRequestPayload unit test stubs""" @@ -28,26 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> PostShareSnapshotRequestPayload: """Test PostShareSnapshotRequestPayload - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.post_share_snapshot_request_payload.PostShareSnapshotRequestPayload() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `PostShareSnapshotRequestPayload` + """ + model = PostShareSnapshotRequestPayload() + if include_optional: return PostShareSnapshotRequestPayload( - sharing_type = 'publicLink', + sharing_type = 'publicLink', password = '' ) - else : + else: return PostShareSnapshotRequestPayload( sharing_type = 'publicLink', ) + """ def testPostShareSnapshotRequestPayload(self): """Test PostShareSnapshotRequestPayload""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_project.py b/test/test_project.py index dbceb70..a357ccc 100644 --- a/test/test_project.py +++ b/test/test_project.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.project import Project # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.project import Project class TestProject(unittest.TestCase): """Project unit test stubs""" @@ -28,39 +26,65 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Project: """Test Project - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.project.Project() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Project` + """ + model = Project() + if include_optional: return Project( - id = '', - name = '', - settings = corellium_api.models.project_settings.ProjectSettings( + id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + settings = corellium.models.project_settings.ProjectSettings( + version = 1, internet_access = True, - connection = '', - dhcp = True, ), - quotas = corellium_api.models.project_quota.ProjectQuota( - cores = 1.337, - instances = 1.337, - ram = 1.337, ), - quotas_used = corellium_api.models.project_usage.ProjectUsage( - cores = 1.337, - instances = 1.337, - ram = 1.337, - gpu = 1.337, ) + dhcp = True, + connection = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', ), + quotas = corellium.models.project_quota.ProjectQuota( + cores = 30, + instances = 75, + ram = 184320, ), + quotas_used = corellium.models.project_usage.ProjectUsage( + cores = 6, + instances = 3, + ram = 18432, + gpu = 1, ), + network_status = corellium.models.network_status.NetworkStatus( + type = 'openvpn', + name = 'office-vpn', + state = 'disconnected', + details = {"error":"connection timed out"}, ), + config = corellium.models.project_config.Project_config( + color = 4, ) ) - else : + else: return Project( - id = '', + id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + settings = corellium.models.project_settings.ProjectSettings( + version = 1, + internet_access = True, + dhcp = True, + connection = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', ), + quotas = corellium.models.project_quota.ProjectQuota( + cores = 30, + instances = 75, + ram = 184320, ), + quotas_used = corellium.models.project_usage.ProjectUsage( + cores = 6, + instances = 3, + ram = 18432, + gpu = 1, ), ) + """ def testProject(self): """Test Project""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_project_config.py b/test/test_project_config.py new file mode 100644 index 0000000..fb462be --- /dev/null +++ b/test/test_project_config.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_config import ProjectConfig + +class TestProjectConfig(unittest.TestCase): + """ProjectConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectConfig: + """Test ProjectConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectConfig` + """ + model = ProjectConfig() + if include_optional: + return ProjectConfig( + color = 4 + ) + else: + return ProjectConfig( + ) + """ + + def testProjectConfig(self): + """Test ProjectConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_instance_list.py b/test/test_project_instance_list.py new file mode 100644 index 0000000..7298366 --- /dev/null +++ b/test/test_project_instance_list.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_instance_list import ProjectInstanceList + +class TestProjectInstanceList(unittest.TestCase): + """ProjectInstanceList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectInstanceList: + """Test ProjectInstanceList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectInstanceList` + """ + model = ProjectInstanceList() + if include_optional: + return ProjectInstanceList( + results = [ + { + 'key' : null + } + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return ProjectInstanceList( + results = [ + { + 'key' : null + } + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testProjectInstanceList(self): + """Test ProjectInstanceList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_instance_summary.py b/test/test_project_instance_summary.py new file mode 100644 index 0000000..cded56a --- /dev/null +++ b/test/test_project_instance_summary.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_instance_summary import ProjectInstanceSummary + +class TestProjectInstanceSummary(unittest.TestCase): + """ProjectInstanceSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectInstanceSummary: + """Test ProjectInstanceSummary + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectInstanceSummary` + """ + model = ProjectInstanceSummary() + if include_optional: + return ProjectInstanceSummary( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'My Device', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + state = 'on' + ) + else: + return ProjectInstanceSummary( + id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + name = 'My Device', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + state = 'on', + ) + """ + + def testProjectInstanceSummary(self): + """Test ProjectInstanceSummary""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_key.py b/test/test_project_key.py index fab31a5..22b5cc6 100644 --- a/test/test_project_key.py +++ b/test/test_project_key.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.project_key import ProjectKey # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.project_key import ProjectKey class TestProjectKey(unittest.TestCase): """ProjectKey unit test stubs""" @@ -28,32 +26,41 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ProjectKey: """Test ProjectKey - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.project_key.ProjectKey() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ProjectKey` + """ + model = ProjectKey() + if include_optional: return ProjectKey( - identifier = '', - kind = 'ssh', - project = '', - key = '', - fingerprint = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + kind = 'ssh', + label = 'Build server key', + key = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUlGdieyRXdiVIyQjqthDE1YzmwzH0ZeZuHkBuC9Gwr user@example.com', + id = '9c1098dc-e881-41fb-b3af-e2d5ddd55d86', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + fingerprint = '82:af:e7:ec:8c:03:17:fa:32:89:d7:e3:93:e2:9e:72', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' ) - else : + else: return ProjectKey( kind = 'ssh', - key = '', + key = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUlGdieyRXdiVIyQjqthDE1YzmwzH0ZeZuHkBuC9Gwr user@example.com', + id = '9c1098dc-e881-41fb-b3af-e2d5ddd55d86', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + fingerprint = '82:af:e7:ec:8c:03:17:fa:32:89:d7:e3:93:e2:9e:72', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + """ def testProjectKey(self): """Test ProjectKey""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_project_key_list.py b/test/test_project_key_list.py new file mode 100644 index 0000000..627465c --- /dev/null +++ b/test/test_project_key_list.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_key_list import ProjectKeyList + +class TestProjectKeyList(unittest.TestCase): + """ProjectKeyList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectKeyList: + """Test ProjectKeyList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectKeyList` + """ + model = ProjectKeyList() + if include_optional: + return ProjectKeyList( + results = [ + corellium.models.project_key.ProjectKey( + kind = 'ssh', + label = 'Build server key', + key = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUlGdieyRXdiVIyQjqthDE1YzmwzH0ZeZuHkBuC9Gwr user@example.com', + id = '9c1098dc-e881-41fb-b3af-e2d5ddd55d86', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + fingerprint = '82:af:e7:ec:8c:03:17:fa:32:89:d7:e3:93:e2:9e:72', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return ProjectKeyList( + results = [ + corellium.models.project_key.ProjectKey( + kind = 'ssh', + label = 'Build server key', + key = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUlGdieyRXdiVIyQjqthDE1YzmwzH0ZeZuHkBuC9Gwr user@example.com', + id = '9c1098dc-e881-41fb-b3af-e2d5ddd55d86', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + fingerprint = '82:af:e7:ec:8c:03:17:fa:32:89:d7:e3:93:e2:9e:72', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testProjectKeyList(self): + """Test ProjectKeyList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_key_v1.py b/test/test_project_key_v1.py new file mode 100644 index 0000000..53dc08c --- /dev/null +++ b/test/test_project_key_v1.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_key_v1 import ProjectKeyV1 + +class TestProjectKeyV1(unittest.TestCase): + """ProjectKeyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectKeyV1: + """Test ProjectKeyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectKeyV1` + """ + model = ProjectKeyV1() + if include_optional: + return ProjectKeyV1( + identifier = '', + kind = 'ssh', + project = '', + key = '', + fingerprint = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return ProjectKeyV1( + kind = 'ssh', + key = '', + ) + """ + + def testProjectKeyV1(self): + """Test ProjectKeyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_list.py b/test/test_project_list.py new file mode 100644 index 0000000..0cd8d98 --- /dev/null +++ b/test/test_project_list.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_list import ProjectList + +class TestProjectList(unittest.TestCase): + """ProjectList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectList: + """Test ProjectList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectList` + """ + model = ProjectList() + if include_optional: + return ProjectList( + results = [ + null + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return ProjectList( + results = [ + null + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testProjectList(self): + """Test ProjectList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_list_item.py b/test/test_project_list_item.py new file mode 100644 index 0000000..801a8b4 --- /dev/null +++ b/test/test_project_list_item.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_list_item import ProjectListItem + +class TestProjectListItem(unittest.TestCase): + """ProjectListItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectListItem: + """Test ProjectListItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectListItem` + """ + model = ProjectListItem() + if include_optional: + return ProjectListItem( + id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + settings = corellium.models.project_settings.ProjectSettings( + version = 1, + internet_access = True, + dhcp = True, + connection = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', ), + quotas = corellium.models.project_quota.ProjectQuota( + cores = 30, + instances = 75, + ram = 184320, ), + quotas_used = corellium.models.project_usage.ProjectUsage( + cores = 6, + instances = 3, + ram = 18432, + gpu = 1, ), + network_status = corellium.models.network_status.NetworkStatus( + type = 'openvpn', + name = 'office-vpn', + state = 'disconnected', + details = {"error":"connection timed out"}, ), + config = corellium.models.project_config.Project_config( + color = 4, ), + key_count = 2 + ) + else: + return ProjectListItem( + id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + name = 'Default Project', + settings = corellium.models.project_settings.ProjectSettings( + version = 1, + internet_access = True, + dhcp = True, + connection = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', ), + quotas = corellium.models.project_quota.ProjectQuota( + cores = 30, + instances = 75, + ram = 184320, ), + quotas_used = corellium.models.project_usage.ProjectUsage( + cores = 6, + instances = 3, + ram = 18432, + gpu = 1, ), + key_count = 2, + ) + """ + + def testProjectListItem(self): + """Test ProjectListItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_network_state.py b/test/test_project_network_state.py index 70188ea..5ba01c2 100644 --- a/test/test_project_network_state.py +++ b/test/test_project_network_state.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.project_network_state import ProjectNetworkState # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.project_network_state import ProjectNetworkState class TestProjectNetworkState(unittest.TestCase): """ProjectNetworkState unit test stubs""" @@ -28,26 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ProjectNetworkState: """Test ProjectNetworkState - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.project_network_state.ProjectNetworkState() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ProjectNetworkState` + """ + model = ProjectNetworkState() + if include_optional: return ProjectNetworkState( - state = '', - details = corellium_api.models.details.details() + state = '', + details = None ) - else : + else: return ProjectNetworkState( state = '', ) + """ def testProjectNetworkState(self): """Test ProjectNetworkState""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_project_quota.py b/test/test_project_quota.py index 9d05fa4..60d660e 100644 --- a/test/test_project_quota.py +++ b/test/test_project_quota.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.project_quota import ProjectQuota # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.project_quota import ProjectQuota class TestProjectQuota(unittest.TestCase): """ProjectQuota unit test stubs""" @@ -28,26 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ProjectQuota: """Test ProjectQuota - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.project_quota.ProjectQuota() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ProjectQuota` + """ + model = ProjectQuota() + if include_optional: return ProjectQuota( - cores = 1.337, - instances = 1.337, - ram = 1.337 + cores = 30, + instances = 75, + ram = 184320 ) - else : + else: return ProjectQuota( ) + """ def testProjectQuota(self): """Test ProjectQuota""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_project_quota_input.py b/test/test_project_quota_input.py new file mode 100644 index 0000000..5731629 --- /dev/null +++ b/test/test_project_quota_input.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_quota_input import ProjectQuotaInput + +class TestProjectQuotaInput(unittest.TestCase): + """ProjectQuotaInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectQuotaInput: + """Test ProjectQuotaInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectQuotaInput` + """ + model = ProjectQuotaInput() + if include_optional: + return ProjectQuotaInput( + cores = 8, + instances = 20, + ram = 49152 + ) + else: + return ProjectQuotaInput( + cores = 8, + ) + """ + + def testProjectQuotaInput(self): + """Test ProjectQuotaInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_quota_v1.py b/test/test_project_quota_v1.py new file mode 100644 index 0000000..a27faa4 --- /dev/null +++ b/test/test_project_quota_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_quota_v1 import ProjectQuotaV1 + +class TestProjectQuotaV1(unittest.TestCase): + """ProjectQuotaV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectQuotaV1: + """Test ProjectQuotaV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectQuotaV1` + """ + model = ProjectQuotaV1() + if include_optional: + return ProjectQuotaV1( + cores = 1.337, + instances = 1.337, + ram = 1.337 + ) + else: + return ProjectQuotaV1( + ) + """ + + def testProjectQuotaV1(self): + """Test ProjectQuotaV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_settings.py b/test/test_project_settings.py index 44fb1d5..43cabf9 100644 --- a/test/test_project_settings.py +++ b/test/test_project_settings.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.project_settings import ProjectSettings # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.project_settings import ProjectSettings class TestProjectSettings(unittest.TestCase): """ProjectSettings unit test stubs""" @@ -28,28 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ProjectSettings: """Test ProjectSettings - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.project_settings.ProjectSettings() # noqa: E501 - if include_optional : - return ProjectSettings( - internet_access = True, - connection = '', - dhcp = True - ) - else : + # uncomment below to create an instance of `ProjectSettings` + """ + model = ProjectSettings() + if include_optional: return ProjectSettings( + version = 1, internet_access = True, dhcp = True, + connection = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7' + ) + else: + return ProjectSettings( ) + """ def testProjectSettings(self): """Test ProjectSettings""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_project_settings_v1.py b/test/test_project_settings_v1.py new file mode 100644 index 0000000..74a0df2 --- /dev/null +++ b/test/test_project_settings_v1.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_settings_v1 import ProjectSettingsV1 + +class TestProjectSettingsV1(unittest.TestCase): + """ProjectSettingsV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectSettingsV1: + """Test ProjectSettingsV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectSettingsV1` + """ + model = ProjectSettingsV1() + if include_optional: + return ProjectSettingsV1( + version = 1.337, + internet_access = True, + connection = '', + dhcp = True + ) + else: + return ProjectSettingsV1( + ) + """ + + def testProjectSettingsV1(self): + """Test ProjectSettingsV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_usage.py b/test/test_project_usage.py index e003918..2e0218f 100644 --- a/test/test_project_usage.py +++ b/test/test_project_usage.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.project_usage import ProjectUsage # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.project_usage import ProjectUsage class TestProjectUsage(unittest.TestCase): """ProjectUsage unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ProjectUsage: """Test ProjectUsage - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.project_usage.ProjectUsage() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ProjectUsage` + """ + model = ProjectUsage() + if include_optional: return ProjectUsage( - cores = 1.337, - instances = 1.337, - ram = 1.337, - gpu = 1.337 + cores = 6, + instances = 3, + ram = 18432, + gpu = 1 ) - else : + else: return ProjectUsage( ) + """ def testProjectUsage(self): """Test ProjectUsage""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_project_usage_v1.py b/test/test_project_usage_v1.py new file mode 100644 index 0000000..2892844 --- /dev/null +++ b/test/test_project_usage_v1.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_usage_v1 import ProjectUsageV1 + +class TestProjectUsageV1(unittest.TestCase): + """ProjectUsageV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectUsageV1: + """Test ProjectUsageV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectUsageV1` + """ + model = ProjectUsageV1() + if include_optional: + return ProjectUsageV1( + cores = 1.337, + instances = 1.337, + ram = 1.337, + gpu = 1.337 + ) + else: + return ProjectUsageV1( + ) + """ + + def testProjectUsageV1(self): + """Test ProjectUsageV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_v1.py b/test/test_project_v1.py new file mode 100644 index 0000000..f257be6 --- /dev/null +++ b/test/test_project_v1.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_v1 import ProjectV1 + +class TestProjectV1(unittest.TestCase): + """ProjectV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectV1: + """Test ProjectV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectV1` + """ + model = ProjectV1() + if include_optional: + return ProjectV1( + id = '', + name = '', + settings = corellium.models.project_settings_v1.ProjectSettingsV1( + version = 1.337, + internet_access = True, + connection = '', + dhcp = True, ), + quotas = corellium.models.project_quota_v1.ProjectQuotaV1( + cores = 1.337, + instances = 1.337, + ram = 1.337, ), + quotas_used = corellium.models.project_usage_v1.ProjectUsageV1( + cores = 1.337, + instances = 1.337, + ram = 1.337, + gpu = 1.337, ), + network_status = corellium.models.network_status_v1.NetworkStatusV1( + type = '', + name = '', + state = 'disconnected', ) + ) + else: + return ProjectV1( + id = '', + ) + """ + + def testProjectV1(self): + """Test ProjectV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_with_keys_v1.py b/test/test_project_with_keys_v1.py new file mode 100644 index 0000000..c92c593 --- /dev/null +++ b/test/test_project_with_keys_v1.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.project_with_keys_v1 import ProjectWithKeysV1 + +class TestProjectWithKeysV1(unittest.TestCase): + """ProjectWithKeysV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectWithKeysV1: + """Test ProjectWithKeysV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectWithKeysV1` + """ + model = ProjectWithKeysV1() + if include_optional: + return ProjectWithKeysV1( + id = '', + name = '', + settings = corellium.models.project_settings_v1.ProjectSettingsV1( + version = 1.337, + internet_access = True, + connection = '', + dhcp = True, ), + quotas = corellium.models.project_quota_v1.ProjectQuotaV1( + cores = 1.337, + instances = 1.337, + ram = 1.337, ), + quotas_used = corellium.models.project_usage_v1.ProjectUsageV1( + cores = 1.337, + instances = 1.337, + ram = 1.337, + gpu = 1.337, ), + network_status = corellium.models.network_status_v1.NetworkStatusV1( + type = '', + name = '', + state = 'disconnected', ), + keys = [ + corellium.models.project_key_v1.ProjectKeyV1( + identifier = '', + kind = 'ssh', + project = '', + key = '', + fingerprint = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return ProjectWithKeysV1( + id = '', + ) + """ + + def testProjectWithKeysV1(self): + """Test ProjectWithKeysV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_projects_api.py b/test/test_projects_api.py new file mode 100644 index 0000000..d3a476a --- /dev/null +++ b/test/test_projects_api.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.projects_api import ProjectsApi + + +class TestProjectsApi(unittest.TestCase): + """ProjectsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ProjectsApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_project(self) -> None: + """Test case for v3_create_project + + Create a project + """ + pass + + def test_v3_create_project_key(self) -> None: + """Test case for v3_create_project_key + + Add a project key + """ + pass + + def test_v3_delete_project(self) -> None: + """Test case for v3_delete_project + + Delete a project + """ + pass + + def test_v3_delete_project_key(self) -> None: + """Test case for v3_delete_project_key + + Delete a project key + """ + pass + + def test_v3_fetch_project_firmware_assets(self) -> None: + """Test case for v3_fetch_project_firmware_assets + + Fetch firmware assets for a project + """ + pass + + def test_v3_get_project(self) -> None: + """Test case for v3_get_project + + Get a project + """ + pass + + def test_v3_get_project_image_upload(self) -> None: + """Test case for v3_get_project_image_upload + + Get image upload status + """ + pass + + def test_v3_get_project_network_log(self) -> None: + """Test case for v3_get_project_network_log + + Get project network log + """ + pass + + def test_v3_get_project_network_status(self) -> None: + """Test case for v3_get_project_network_status + + Get project network status + """ + pass + + def test_v3_get_project_vpn_config(self) -> None: + """Test case for v3_get_project_vpn_config + + Get project VPN configuration + """ + pass + + def test_v3_list_project_instances(self) -> None: + """Test case for v3_list_project_instances + + List project instances + """ + pass + + def test_v3_list_project_keys(self) -> None: + """Test case for v3_list_project_keys + + List project keys + """ + pass + + def test_v3_list_projects(self) -> None: + """Test case for v3_list_projects + + List projects + """ + pass + + def test_v3_patch_project(self) -> None: + """Test case for v3_patch_project + + Update a project + """ + pass + + def test_v3_preauth_vpn_config(self) -> None: + """Test case for v3_preauth_vpn_config + + Pre-authorize a VPN configuration download + """ + pass + + def test_v3_put_project_image_upload(self) -> None: + """Test case for v3_put_project_image_upload + + Upload image chunk + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_projects_v1_api.py b/test/test_projects_v1_api.py new file mode 100644 index 0000000..585564f --- /dev/null +++ b/test/test_projects_v1_api.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.projects_v1_api import ProjectsV1Api + + +class TestProjectsV1Api(unittest.TestCase): + """ProjectsV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = ProjectsV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_add_project_key(self) -> None: + """Test case for v1_add_project_key + + Add Project Authorized Key + """ + pass + + def test_v1_create_project(self) -> None: + """Test case for v1_create_project + + Create a Project + """ + pass + + def test_v1_delete_project(self) -> None: + """Test case for v1_delete_project + + Delete a Project + """ + pass + + def test_v1_get_project(self) -> None: + """Test case for v1_get_project + + Get a Project + """ + pass + + def test_v1_get_project_instances(self) -> None: + """Test case for v1_get_project_instances + + Get Instances in Project + """ + pass + + def test_v1_get_project_keys(self) -> None: + """Test case for v1_get_project_keys + + Get Project Authorized Keys + """ + pass + + def test_v1_get_project_network_log(self) -> None: + """Test case for v1_get_project_network_log + + Retrieve the network connection log for a project + """ + pass + + def test_v1_get_project_network_status(self) -> None: + """Test case for v1_get_project_network_status + + Retrieve the network connection status for a project + """ + pass + + def test_v1_get_project_vpn_config(self) -> None: + """Test case for v1_get_project_vpn_config + + Get Project VPN Configuration + """ + pass + + def test_v1_get_projects(self) -> None: + """Test case for v1_get_projects + + Get Projects + """ + pass + + def test_v1_remove_project_key(self) -> None: + """Test case for v1_remove_project_key + + Delete Project Authorized Key + """ + pass + + def test_v1_update_project(self) -> None: + """Test case for v1_update_project + + Update a Project + """ + pass + + def test_v1_update_project_settings(self) -> None: + """Test case for v1_update_project_settings + + Change Project Settings + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_provider_network_connection.py b/test/test_provider_network_connection.py new file mode 100644 index 0000000..a7e84f0 --- /dev/null +++ b/test/test_provider_network_connection.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.provider_network_connection import ProviderNetworkConnection + +class TestProviderNetworkConnection(unittest.TestCase): + """ProviderNetworkConnection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProviderNetworkConnection: + """Test ProviderNetworkConnection + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProviderNetworkConnection` + """ + model = ProviderNetworkConnection() + if include_optional: + return ProviderNetworkConnection( + name = 'lab-vlan', + provider = 'vlan', + config = corellium.models.vlan_config.VLANConfig( + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + gateway = '10.0.0.1', + network = '10.0.0.0/24', + dns_servers = ["1.1.1.1","8.8.8.8"], ), + identifier = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', + projects = {1c41b1bc-4f53-48a8-b690-ad30611e1960={state=connected}}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + updated_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' + ) + else: + return ProviderNetworkConnection( + name = 'lab-vlan', + provider = 'vlan', + identifier = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + updated_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + ) + """ + + def testProviderNetworkConnection(self): + """Test ProviderNetworkConnection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_proxy_config.py b/test/test_proxy_config.py index 280a3df..638a604 100644 --- a/test/test_proxy_config.py +++ b/test/test_proxy_config.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.proxy_config import ProxyConfig # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.proxy_config import ProxyConfig class TestProxyConfig(unittest.TestCase): """ProxyConfig unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ProxyConfig: """Test ProxyConfig - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.proxy_config.ProxyConfig() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ProxyConfig` + """ + model = ProxyConfig() + if include_optional: return ProxyConfig( - device_port = 1.337, - first_available = True, - expose = True, + device_port = 1.337, + first_available = True, + expose = True, router_port = 1.337 ) - else : + else: return ProxyConfig( ) + """ def testProxyConfig(self): """Test ProxyConfig""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_ram_dump_api.py b/test/test_ram_dump_api.py new file mode 100644 index 0000000..32fefde --- /dev/null +++ b/test/test_ram_dump_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.ram_dump_api import RAMDumpApi + + +class TestRAMDumpApi(unittest.TestCase): + """RAMDumpApi unit test stubs""" + + def setUp(self) -> None: + self.api = RAMDumpApi() + + def tearDown(self) -> None: + pass + + def test_v3_clear_ram_dump(self) -> None: + """Test case for v3_clear_ram_dump + + Delete a RAM dump + """ + pass + + def test_v3_ram_dump_preauthorize(self) -> None: + """Test case for v3_ram_dump_preauthorize + + Get a RAM dump download token + """ + pass + + def test_v3_start_ram_dump(self) -> None: + """Test case for v3_start_ram_dump + + Start a RAM dump + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ram_dump_v1_api.py b/test/test_ram_dump_v1_api.py new file mode 100644 index 0000000..f53506d --- /dev/null +++ b/test/test_ram_dump_v1_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.ram_dump_v1_api import RAMDumpV1Api + + +class TestRAMDumpV1Api(unittest.TestCase): + """RAMDumpV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = RAMDumpV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_clear_ram_dump(self) -> None: + """Test case for v1_clear_ram_dump + + Clear RAM Dump + """ + pass + + def test_v1_ram_dump_preauthorize(self) -> None: + """Test case for v1_ram_dump_preauthorize + + Pre-authorize a RAM Dump download + """ + pass + + def test_v1_start_ram_dump(self) -> None: + """Test case for v1_start_ram_dump + + Start a RAM Dump on an instance + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rate_info.py b/test/test_rate_info.py deleted file mode 100644 index 9e3d1f6..0000000 --- a/test/test_rate_info.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 5.2.0-17368 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.rate_info import RateInfo # noqa: E501 -from corellium_api.rest import ApiException - -class TestRateInfo(unittest.TestCase): - """RateInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test RateInfo - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.rate_info.RateInfo() # noqa: E501 - if include_optional : - return RateInfo( - on_rate_microcents = 56, - off_rate_microcents = 56 - ) - else : - return RateInfo( - ) - - def testRateInfo(self): - """Test RateInfo""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_register_service_body.py b/test/test_register_service_body.py new file mode 100644 index 0000000..7767478 --- /dev/null +++ b/test/test_register_service_body.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.register_service_body import RegisterServiceBody + +class TestRegisterServiceBody(unittest.TestCase): + """RegisterServiceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegisterServiceBody: + """Test RegisterServiceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RegisterServiceBody` + """ + model = RegisterServiceBody() + if include_optional: + return RegisterServiceBody( + password = '', + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + address = '10.0.0.5:8080', + service_name = 'c3po', + endpoints = [ + corellium.models.service_endpoint_schema.ServiceEndpointSchema( + service_name = 'c3po', + path = '/v1/instances', + method = 'GET', + permissions = ["cloud-administrator"], ) + ], + identity_key = '', + ca_cert = '-----BEGIN CERTIFICATE----- +MIIB... +-----END CERTIFICATE-----', + cert_fingerprint = 'AB:CD:EF:12:34:56:78:90:AB:CD:EF:12:34:56:78:90:AB:CD:EF:12' + ) + else: + return RegisterServiceBody( + password = '', + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + address = '10.0.0.5:8080', + service_name = 'c3po', + identity_key = '', + ca_cert = '-----BEGIN CERTIFICATE----- +MIIB... +-----END CERTIFICATE-----', + cert_fingerprint = 'AB:CD:EF:12:34:56:78:90:AB:CD:EF:12:34:56:78:90:AB:CD:EF:12', + ) + """ + + def testRegisterServiceBody(self): + """Test RegisterServiceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_report_modification_input.py b/test/test_report_modification_input.py new file mode 100644 index 0000000..333f217 --- /dev/null +++ b/test/test_report_modification_input.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.report_modification_input import ReportModificationInput + +class TestReportModificationInput(unittest.TestCase): + """ReportModificationInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReportModificationInput: + """Test ReportModificationInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReportModificationInput` + """ + model = ReportModificationInput() + if include_optional: + return ReportModificationInput( + check_id = 'masvs-storage-2-android-8', + var_property = 'severity', + suppressed = True, + value = 'low' + ) + else: + return ReportModificationInput( + check_id = 'masvs-storage-2-android-8', + var_property = 'severity', + ) + """ + + def testReportModificationInput(self): + """Test ReportModificationInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_report_modification_result.py b/test/test_report_modification_result.py new file mode 100644 index 0000000..5173ace --- /dev/null +++ b/test/test_report_modification_result.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.report_modification_result import ReportModificationResult + +class TestReportModificationResult(unittest.TestCase): + """ReportModificationResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReportModificationResult: + """Test ReportModificationResult + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReportModificationResult` + """ + model = ReportModificationResult() + if include_optional: + return ReportModificationResult( + check_id = '', + var_property = '', + status = 'inserted', + error = '' + ) + else: + return ReportModificationResult( + check_id = '', + var_property = '', + status = 'inserted', + ) + """ + + def testReportModificationResult(self): + """Test ReportModificationResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reset_link_body.py b/test/test_reset_link_body.py index a48f5e2..a7dac6f 100644 --- a/test/test_reset_link_body.py +++ b/test/test_reset_link_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.reset_link_body import ResetLinkBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.reset_link_body import ResetLinkBody class TestResetLinkBody(unittest.TestCase): """ResetLinkBody unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ResetLinkBody: """Test ResetLinkBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.reset_link_body.ResetLinkBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ResetLinkBody` + """ + model = ResetLinkBody() + if include_optional: return ResetLinkBody( email = '' ) - else : + else: return ResetLinkBody( email = '', ) + """ def testResetLinkBody(self): """Test ResetLinkBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_reset_link_info.py b/test/test_reset_link_info.py new file mode 100644 index 0000000..41d625a --- /dev/null +++ b/test/test_reset_link_info.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.reset_link_info import ResetLinkInfo + +class TestResetLinkInfo(unittest.TestCase): + """ResetLinkInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResetLinkInfo: + """Test ResetLinkInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResetLinkInfo` + """ + model = ResetLinkInfo() + if include_optional: + return ResetLinkInfo( + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + username = 'jane.doe', + domain = 'acme' + ) + else: + return ResetLinkInfo( + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + username = 'jane.doe', + domain = 'acme', + ) + """ + + def testResetLinkInfo(self): + """Test ResetLinkInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reset_link_info_return.py b/test/test_reset_link_info_return.py index afcd29e..a3e0944 100644 --- a/test/test_reset_link_info_return.py +++ b/test/test_reset_link_info_return.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.reset_link_info_return import ResetLinkInfoReturn # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.reset_link_info_return import ResetLinkInfoReturn class TestResetLinkInfoReturn(unittest.TestCase): """ResetLinkInfoReturn unit test stubs""" @@ -28,26 +26,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ResetLinkInfoReturn: """Test ResetLinkInfoReturn - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.reset_link_info_return.ResetLinkInfoReturn() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ResetLinkInfoReturn` + """ + model = ResetLinkInfoReturn() + if include_optional: return ResetLinkInfoReturn( - user_id = '', - username = '', + user_id = '', + username = '', domain = '' ) - else : + else: return ResetLinkInfoReturn( ) + """ def testResetLinkInfoReturn(self): """Test ResetLinkInfoReturn""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_reset_password_body.py b/test/test_reset_password_body.py new file mode 100644 index 0000000..49ceef7 --- /dev/null +++ b/test/test_reset_password_body.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.reset_password_body import ResetPasswordBody + +class TestResetPasswordBody(unittest.TestCase): + """ResetPasswordBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResetPasswordBody: + """Test ResetPasswordBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResetPasswordBody` + """ + model = ResetPasswordBody() + if include_optional: + return ResetPasswordBody( + token = '', + new_password = '', + totp_token = '123456' + ) + else: + return ResetPasswordBody( + token = '', + new_password = '', + ) + """ + + def testResetPasswordBody(self): + """Test ResetPasswordBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reset_unauthorized_response.py b/test/test_reset_unauthorized_response.py new file mode 100644 index 0000000..97bbc6e --- /dev/null +++ b/test/test_reset_unauthorized_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.reset_unauthorized_response import ResetUnauthorizedResponse + +class TestResetUnauthorizedResponse(unittest.TestCase): + """ResetUnauthorizedResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResetUnauthorizedResponse: + """Test ResetUnauthorizedResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResetUnauthorizedResponse` + """ + model = ResetUnauthorizedResponse() + if include_optional: + return ResetUnauthorizedResponse( + error = 'Access denied', + error_id = 'Unauthorized' + ) + else: + return ResetUnauthorizedResponse( + error = 'Access denied', + error_id = 'Unauthorized', + ) + """ + + def testResetUnauthorizedResponse(self): + """Test ResetUnauthorizedResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_restore_backup_body.py b/test/test_restore_backup_body.py new file mode 100644 index 0000000..971ffc7 --- /dev/null +++ b/test/test_restore_backup_body.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.restore_backup_body import RestoreBackupBody + +class TestRestoreBackupBody(unittest.TestCase): + """RestoreBackupBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RestoreBackupBody: + """Test RestoreBackupBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RestoreBackupBody` + """ + model = RestoreBackupBody() + if include_optional: + return RestoreBackupBody( + password = '' + ) + else: + return RestoreBackupBody( + ) + """ + + def testRestoreBackupBody(self): + """Test RestoreBackupBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_restore_backup_data.py b/test/test_restore_backup_data.py index c9c5cd8..0404a8e 100644 --- a/test/test_restore_backup_data.py +++ b/test/test_restore_backup_data.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.restore_backup_data import RestoreBackupData # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.restore_backup_data import RestoreBackupData class TestRestoreBackupData(unittest.TestCase): """RestoreBackupData unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> RestoreBackupData: """Test RestoreBackupData - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.restore_backup_data.RestoreBackupData() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `RestoreBackupData` + """ + model = RestoreBackupData() + if include_optional: return RestoreBackupData( password = '' ) - else : + else: return RestoreBackupData( ) + """ def testRestoreBackupData(self): """Test RestoreBackupData""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_revoke_invites_body.py b/test/test_revoke_invites_body.py new file mode 100644 index 0000000..819195f --- /dev/null +++ b/test/test_revoke_invites_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.revoke_invites_body import RevokeInvitesBody + +class TestRevokeInvitesBody(unittest.TestCase): + """RevokeInvitesBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RevokeInvitesBody: + """Test RevokeInvitesBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RevokeInvitesBody` + """ + model = RevokeInvitesBody() + if include_optional: + return RevokeInvitesBody( + ids = ["5ac8f0be-616d-45b9-b0af-e586fc65ad19"] + ) + else: + return RevokeInvitesBody( + ids = ["5ac8f0be-616d-45b9-b0af-e586fc65ad19"], + ) + """ + + def testRevokeInvitesBody(self): + """Test RevokeInvitesBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_revoke_invites_response.py b/test/test_revoke_invites_response.py new file mode 100644 index 0000000..0594d39 --- /dev/null +++ b/test/test_revoke_invites_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.revoke_invites_response import RevokeInvitesResponse + +class TestRevokeInvitesResponse(unittest.TestCase): + """RevokeInvitesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RevokeInvitesResponse: + """Test RevokeInvitesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RevokeInvitesResponse` + """ + model = RevokeInvitesResponse() + if include_optional: + return RevokeInvitesResponse( + deleted_count = 1 + ) + else: + return RevokeInvitesResponse( + deleted_count = 1, + ) + """ + + def testRevokeInvitesResponse(self): + """Test RevokeInvitesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role.py b/test/test_role.py index 26e7120..8ae3b29 100644 --- a/test/test_role.py +++ b/test/test_role.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.role import Role # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.role import Role class TestRole(unittest.TestCase): """Role unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Role: """Test Role - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.role.Role() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Role` + """ + model = Role() + if include_optional: return Role( - role = 'admin', - project = '', - user = '' + role = 'admin', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + deployment = 'prod-us-east', + user = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + team = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' ) - else : + else: return Role( role = 'admin', - project = '', - user = '', ) + """ def testRole(self): """Test Role""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_role_name.py b/test/test_role_name.py new file mode 100644 index 0000000..d112dab --- /dev/null +++ b/test/test_role_name.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.role_name import RoleName + +class TestRoleName(unittest.TestCase): + """RoleName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRoleName(self): + """Test RoleName""" + # inst = RoleName() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_role_v1.py b/test/test_role_v1.py new file mode 100644 index 0000000..a085015 --- /dev/null +++ b/test/test_role_v1.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.role_v1 import RoleV1 + +class TestRoleV1(unittest.TestCase): + """RoleV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RoleV1: + """Test RoleV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RoleV1` + """ + model = RoleV1() + if include_optional: + return RoleV1( + role = 'admin', + project = '', + user = '', + team = '' + ) + else: + return RoleV1( + role = 'admin', + ) + """ + + def testRoleV1(self): + """Test RoleV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_roles_api.py b/test/test_roles_api.py new file mode 100644 index 0000000..deac03c --- /dev/null +++ b/test/test_roles_api.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.roles_api import RolesApi + + +class TestRolesApi(unittest.TestCase): + """RolesApi unit test stubs""" + + def setUp(self) -> None: + self.api = RolesApi() + + def tearDown(self) -> None: + pass + + def test_v3_add_team_role_to_deployment(self) -> None: + """Test case for v3_add_team_role_to_deployment + + Add team role to deployment + """ + pass + + def test_v3_add_team_role_to_project(self) -> None: + """Test case for v3_add_team_role_to_project + + Add team role to project + """ + pass + + def test_v3_add_user_role_to_deployment(self) -> None: + """Test case for v3_add_user_role_to_deployment + + Add user role to deployment + """ + pass + + def test_v3_add_user_role_to_project(self) -> None: + """Test case for v3_add_user_role_to_project + + Add user role to project + """ + pass + + def test_v3_list_deployment_roles(self) -> None: + """Test case for v3_list_deployment_roles + + List deployment role assignments + """ + pass + + def test_v3_list_roles(self) -> None: + """Test case for v3_list_roles + + List all role assignments for the caller's domain + """ + pass + + def test_v3_remove_team_role_from_deployment(self) -> None: + """Test case for v3_remove_team_role_from_deployment + + Remove team role from deployment + """ + pass + + def test_v3_remove_team_role_from_project(self) -> None: + """Test case for v3_remove_team_role_from_project + + Remove team role from project + """ + pass + + def test_v3_remove_user_role_from_deployment(self) -> None: + """Test case for v3_remove_user_role_from_deployment + + Remove user role from deployment + """ + pass + + def test_v3_remove_user_role_from_project(self) -> None: + """Test case for v3_remove_user_role_from_project + + Remove user role from project + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_roles_list_response.py b/test/test_roles_list_response.py new file mode 100644 index 0000000..1bf09ce --- /dev/null +++ b/test/test_roles_list_response.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.roles_list_response import RolesListResponse + +class TestRolesListResponse(unittest.TestCase): + """RolesListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RolesListResponse: + """Test RolesListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RolesListResponse` + """ + model = RolesListResponse() + if include_optional: + return RolesListResponse( + results = [ + corellium.models.role.Role( + role = 'admin', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + deployment = 'prod-us-east', + user = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + team = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return RolesListResponse( + results = [ + corellium.models.role.Role( + role = 'admin', + project = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + deployment = 'prod-us-east', + user = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + team = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testRolesListResponse(self): + """Test RolesListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_roles_v1_api.py b/test/test_roles_v1_api.py new file mode 100644 index 0000000..93b3522 --- /dev/null +++ b/test/test_roles_v1_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.roles_v1_api import RolesV1Api + + +class TestRolesV1Api(unittest.TestCase): + """RolesV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = RolesV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_add_team_role_to_project(self) -> None: + """Test case for v1_add_team_role_to_project + + Add team role to project + """ + pass + + def test_v1_add_user_role_to_project(self) -> None: + """Test case for v1_add_user_role_to_project + + Add user role to project + """ + pass + + def test_v1_remove_team_role_from_project(self) -> None: + """Test case for v1_remove_team_role_from_project + + Remove team role from project + """ + pass + + def test_v1_remove_user_role_from_project(self) -> None: + """Test case for v1_remove_user_role_from_project + + Remove user role from project + """ + pass + + def test_v1_roles(self) -> None: + """Test case for v1_roles + + Get all roles + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rotate_body.py b/test/test_rotate_body.py index b77df74..08ce21f 100644 --- a/test/test_rotate_body.py +++ b/test/test_rotate_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.rotate_body import RotateBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.rotate_body import RotateBody class TestRotateBody(unittest.TestCase): """RotateBody unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> RotateBody: """Test RotateBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.rotate_body.RotateBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `RotateBody` + """ + model = RotateBody() + if include_optional: return RotateBody( orientation = 1 ) - else : + else: return RotateBody( orientation = 1, ) + """ def testRotateBody(self): """Test RotateBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_rotate_body_v1.py b/test/test_rotate_body_v1.py new file mode 100644 index 0000000..3840227 --- /dev/null +++ b/test/test_rotate_body_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.rotate_body_v1 import RotateBodyV1 + +class TestRotateBodyV1(unittest.TestCase): + """RotateBodyV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RotateBodyV1: + """Test RotateBodyV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RotateBodyV1` + """ + model = RotateBodyV1() + if include_optional: + return RotateBodyV1( + orientation = 1 + ) + else: + return RotateBodyV1( + orientation = 1, + ) + """ + + def testRotateBodyV1(self): + """Test RotateBodyV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_saml_config.py b/test/test_saml_config.py new file mode 100644 index 0000000..f493d10 --- /dev/null +++ b/test/test_saml_config.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.saml_config import SAMLConfig + +class TestSAMLConfig(unittest.TestCase): + """SAMLConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SAMLConfig: + """Test SAMLConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SAMLConfig` + """ + model = SAMLConfig() + if include_optional: + return SAMLConfig( + identity_provider_config = { + 'key' : null + }, + service_provider_config = { + 'key' : null + }, + user_attribute_mapping = { + 'key' : null + }, + group_mapping = [ + { + 'key' : null + } + ] + ) + else: + return SAMLConfig( + identity_provider_config = { + 'key' : null + }, + ) + """ + + def testSAMLConfig(self): + """Test SAMLConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_saml_group_mapping.py b/test/test_saml_group_mapping.py new file mode 100644 index 0000000..89657ec --- /dev/null +++ b/test/test_saml_group_mapping.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.saml_group_mapping import SamlGroupMapping + +class TestSamlGroupMapping(unittest.TestCase): + """SamlGroupMapping unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SamlGroupMapping: + """Test SamlGroupMapping + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SamlGroupMapping` + """ + model = SamlGroupMapping() + if include_optional: + return SamlGroupMapping( + group_name = 'Mobile-PenTesters', + role = 'admin', + team = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' + ) + else: + return SamlGroupMapping( + group_name = 'Mobile-PenTesters', + role = 'admin', + team = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', + ) + """ + + def testSamlGroupMapping(self): + """Test SamlGroupMapping""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_saml_identity_provider_config.py b/test/test_saml_identity_provider_config.py new file mode 100644 index 0000000..ab30e92 --- /dev/null +++ b/test/test_saml_identity_provider_config.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.saml_identity_provider_config import SamlIdentityProviderConfig + +class TestSamlIdentityProviderConfig(unittest.TestCase): + """SamlIdentityProviderConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SamlIdentityProviderConfig: + """Test SamlIdentityProviderConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SamlIdentityProviderConfig` + """ + model = SamlIdentityProviderConfig() + if include_optional: + return SamlIdentityProviderConfig( + login_url = 'https://idp.example.com/sso/saml', + public_certificate = '-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE-----', + issuer_url = 'https://idp.example.com/saml/metadata', + logout_url = 'https://idp.example.com/slo/saml' + ) + else: + return SamlIdentityProviderConfig( + login_url = 'https://idp.example.com/sso/saml', + public_certificate = '-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE-----', + issuer_url = 'https://idp.example.com/saml/metadata', + ) + """ + + def testSamlIdentityProviderConfig(self): + """Test SamlIdentityProviderConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_saml_service_provider_config.py b/test/test_saml_service_provider_config.py new file mode 100644 index 0000000..2ddea34 --- /dev/null +++ b/test/test_saml_service_provider_config.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.saml_service_provider_config import SamlServiceProviderConfig + +class TestSamlServiceProviderConfig(unittest.TestCase): + """SamlServiceProviderConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SamlServiceProviderConfig: + """Test SamlServiceProviderConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SamlServiceProviderConfig` + """ + model = SamlServiceProviderConfig() + if include_optional: + return SamlServiceProviderConfig( + sso_url = 'https://acme-corp.example.com/api/v1/auth/providers/idp.example.com/callback', + public_certificate = '-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE-----', + audience_url = 'https://acme-corp.example.com/api/v1/auth/providers/idp.example.com/spmetadata' + ) + else: + return SamlServiceProviderConfig( + sso_url = 'https://acme-corp.example.com/api/v1/auth/providers/idp.example.com/callback', + public_certificate = '-----BEGIN CERTIFICATE----- + +-----END CERTIFICATE-----', + audience_url = 'https://acme-corp.example.com/api/v1/auth/providers/idp.example.com/spmetadata', + ) + """ + + def testSamlServiceProviderConfig(self): + """Test SamlServiceProviderConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_saml_user_attribute_mapping.py b/test/test_saml_user_attribute_mapping.py new file mode 100644 index 0000000..4320798 --- /dev/null +++ b/test/test_saml_user_attribute_mapping.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.saml_user_attribute_mapping import SamlUserAttributeMapping + +class TestSamlUserAttributeMapping(unittest.TestCase): + """SamlUserAttributeMapping unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SamlUserAttributeMapping: + """Test SamlUserAttributeMapping + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SamlUserAttributeMapping` + """ + model = SamlUserAttributeMapping() + if include_optional: + return SamlUserAttributeMapping( + username = 'username', + email = 'email', + first_name = 'firstName', + last_name = 'lastName', + group = 'groups' + ) + else: + return SamlUserAttributeMapping( + email = 'email', + first_name = 'firstName', + last_name = 'lastName', + group = 'groups', + ) + """ + + def testSamlUserAttributeMapping(self): + """Test SamlUserAttributeMapping""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_send_reset_link_body.py b/test/test_send_reset_link_body.py new file mode 100644 index 0000000..bb1a66d --- /dev/null +++ b/test/test_send_reset_link_body.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.send_reset_link_body import SendResetLinkBody + +class TestSendResetLinkBody(unittest.TestCase): + """SendResetLinkBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SendResetLinkBody: + """Test SendResetLinkBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SendResetLinkBody` + """ + model = SendResetLinkBody() + if include_optional: + return SendResetLinkBody( + email = 'jane.doe@example.com' + ) + else: + return SendResetLinkBody( + ) + """ + + def testSendResetLinkBody(self): + """Test SendResetLinkBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_service_endpoint_schema.py b/test/test_service_endpoint_schema.py new file mode 100644 index 0000000..021981b --- /dev/null +++ b/test/test_service_endpoint_schema.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.service_endpoint_schema import ServiceEndpointSchema + +class TestServiceEndpointSchema(unittest.TestCase): + """ServiceEndpointSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ServiceEndpointSchema: + """Test ServiceEndpointSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ServiceEndpointSchema` + """ + model = ServiceEndpointSchema() + if include_optional: + return ServiceEndpointSchema( + service_name = 'c3po', + path = '/v1/instances', + method = 'GET', + permissions = ["cloud-administrator"] + ) + else: + return ServiceEndpointSchema( + path = '/v1/instances', + method = 'GET', + permissions = ["cloud-administrator"], + ) + """ + + def testServiceEndpointSchema(self): + """Test ServiceEndpointSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_service_status_request_body.py b/test/test_service_status_request_body.py new file mode 100644 index 0000000..4f66d25 --- /dev/null +++ b/test/test_service_status_request_body.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.service_status_request_body import ServiceStatusRequestBody + +class TestServiceStatusRequestBody(unittest.TestCase): + """ServiceStatusRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ServiceStatusRequestBody: + """Test ServiceStatusRequestBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ServiceStatusRequestBody` + """ + model = ServiceStatusRequestBody() + if include_optional: + return ServiceStatusRequestBody( + healthy = True, + service_name = 'c3po', + address = '10.0.0.5:8080', + hostname = 'c3po-01.internal', + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + sys_info = corellium.models.sys_info_schema.SysInfoSchema( + numa_nodes = 2, + cpu = null, + cpu_avail = null, + slot = 24, + slot_avail = 8, + ram = 262144, + ram_avail = 65536, + vpn = 8, + vpn_avail = 5, + gpu = 2, + gpu_avail = 1, + ram_cpu = '0', + el032 = '0', + el132 = '0', + mmu_tg16k = '0', + hw_pac = 1, + arm_trace = '0', + cores = 64, + cores_avail = 24, + ram_core = 4096, ), + layout = corellium.models.layout_schema.LayoutSchema( + free_cpus = null, + free_ram = null, + free_ranges = 6, + numa_nodes = 2, + ram_cpu = '0', + node_map = null, + free_cores = null, + ram_core = 4096, ), + vms = [ + corellium.models.service_status_request_body_vms_inner.ServiceStatusRequestBody_vms_inner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', ) + ], + pool_usage = corellium.models.pool_usage_schema.PoolUsageSchema( + used = 1024, + size = 4096, + free = 3072, + lv_count = 37, ), + az = 'us-east-1a', + network = corellium.models.network_schema.NetworkSchema( + physical_interfaces = ["eth0","eth1"], + vpns = [ + corellium.models.vpn_schema.VpnSchema( + type = 'openvpn', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + state = 'connected', + details = {"error":"connection timed out"}, ) + ], ), + ec2_instance_type = '', + op = 'boot' + ) + else: + return ServiceStatusRequestBody( + healthy = True, + service_name = 'c3po', + address = '10.0.0.5:8080', + hostname = 'c3po-01.internal', + node_id = '2x3ZOdu4pshouoY0kttRPoiIk5s', + ) + """ + + def testServiceStatusRequestBody(self): + """Test ServiceStatusRequestBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_service_status_request_body_vms_inner.py b/test/test_service_status_request_body_vms_inner.py new file mode 100644 index 0000000..623709e --- /dev/null +++ b/test/test_service_status_request_body_vms_inner.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.service_status_request_body_vms_inner import ServiceStatusRequestBodyVmsInner + +class TestServiceStatusRequestBodyVmsInner(unittest.TestCase): + """ServiceStatusRequestBodyVmsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ServiceStatusRequestBodyVmsInner: + """Test ServiceStatusRequestBodyVmsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ServiceStatusRequestBodyVmsInner` + """ + model = ServiceStatusRequestBodyVmsInner() + if include_optional: + return ServiceStatusRequestBodyVmsInner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5' + ) + else: + return ServiceStatusRequestBodyVmsInner( + identifier = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + ) + """ + + def testServiceStatusRequestBodyVmsInner(self): + """Test ServiceStatusRequestBodyVmsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_set_domain_welcome_message_body.py b/test/test_set_domain_welcome_message_body.py new file mode 100644 index 0000000..a3c3f9f --- /dev/null +++ b/test/test_set_domain_welcome_message_body.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.set_domain_welcome_message_body import SetDomainWelcomeMessageBody + +class TestSetDomainWelcomeMessageBody(unittest.TestCase): + """SetDomainWelcomeMessageBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetDomainWelcomeMessageBody: + """Test SetDomainWelcomeMessageBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetDomainWelcomeMessageBody` + """ + model = SetDomainWelcomeMessageBody() + if include_optional: + return SetDomainWelcomeMessageBody( + message = '

Welcome to Acme Corp!

', + enabled = True + ) + else: + return SetDomainWelcomeMessageBody( + message = '

Welcome to Acme Corp!

', + enabled = True, + ) + """ + + def testSetDomainWelcomeMessageBody(self): + """Test SetDomainWelcomeMessageBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_set_snapshot_permissions_body.py b/test/test_set_snapshot_permissions_body.py new file mode 100644 index 0000000..da7ab29 --- /dev/null +++ b/test/test_set_snapshot_permissions_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.set_snapshot_permissions_body import SetSnapshotPermissionsBody + +class TestSetSnapshotPermissionsBody(unittest.TestCase): + """SetSnapshotPermissionsBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetSnapshotPermissionsBody: + """Test SetSnapshotPermissionsBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetSnapshotPermissionsBody` + """ + model = SetSnapshotPermissionsBody() + if include_optional: + return SetSnapshotPermissionsBody( + members = ["jane.doe@example.com"] + ) + else: + return SetSnapshotPermissionsBody( + members = ["jane.doe@example.com"], + ) + """ + + def testSetSnapshotPermissionsBody(self): + """Test SetSnapshotPermissionsBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_share_snapshot_body.py b/test/test_share_snapshot_body.py new file mode 100644 index 0000000..0f2046f --- /dev/null +++ b/test/test_share_snapshot_body.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.share_snapshot_body import ShareSnapshotBody + +class TestShareSnapshotBody(unittest.TestCase): + """ShareSnapshotBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ShareSnapshotBody: + """Test ShareSnapshotBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ShareSnapshotBody` + """ + model = ShareSnapshotBody() + if include_optional: + return ShareSnapshotBody( + sharing_type = 'publicLink', + password = '' + ) + else: + return ShareSnapshotBody( + sharing_type = 'publicLink', + ) + """ + + def testShareSnapshotBody(self): + """Test ShareSnapshotBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_shared_snapshot.py b/test/test_shared_snapshot.py new file mode 100644 index 0000000..c4560b0 --- /dev/null +++ b/test/test_shared_snapshot.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.shared_snapshot import SharedSnapshot + +class TestSharedSnapshot(unittest.TestCase): + """SharedSnapshot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SharedSnapshot: + """Test SharedSnapshot + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SharedSnapshot` + """ + model = SharedSnapshot() + if include_optional: + return SharedSnapshot( + shared_on = '2026-03-16T08:22:19Z', + shared_with_member = 'jane.doe@example.com', + sharing_type = 'publicLink', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + var_date = 1773479567000, + hw_pac = 1, + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + live = False, + local = True, + model = '', + type = 'ios', + name = 'Clean boot', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + fresh = True, + sharing = corellium.models.snapshot_sharing.SnapshotSharing( + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + members = [ + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) + ], ) + ) + else: + return SharedSnapshot( + sharing_type = 'publicLink', + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + var_date = 1773479567000, + hw_pac = 1, + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + local = True, + name = 'Clean boot', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + ) + """ + + def testSharedSnapshot(self): + """Test SharedSnapshot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_shared_snapshots_info.py b/test/test_shared_snapshots_info.py index fe11f70..83734b6 100644 --- a/test/test_shared_snapshots_info.py +++ b/test/test_shared_snapshots_info.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.shared_snapshots_info import SharedSnapshotsInfo # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.shared_snapshots_info import SharedSnapshotsInfo class TestSharedSnapshotsInfo(unittest.TestCase): """SharedSnapshotsInfo unit test stubs""" @@ -28,35 +26,38 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SharedSnapshotsInfo: """Test SharedSnapshotsInfo - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.shared_snapshots_info.SharedSnapshotsInfo() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SharedSnapshotsInfo` + """ + model = SharedSnapshotsInfo() + if include_optional: return SharedSnapshotsInfo( - id = '', - name = '', - model = '', - shared_on = 1.337, - shared_with_member = '', - shared_by = corellium_api.models.snapshot_owner.SnapshotOwner( + id = '', + name = '', + model = '', + shared_on = 1.337, + shared_with_member = '', + shared_by = corellium.models.snapshot_owner_v1.SnapshotOwnerV1( name = '', email = '', ) ) - else : + else: return SharedSnapshotsInfo( id = '', name = '', model = '', shared_on = 1.337, ) + """ def testSharedSnapshotsInfo(self): """Test SharedSnapshotsInfo""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_shared_snapshots_response.py b/test/test_shared_snapshots_response.py new file mode 100644 index 0000000..0edc45b --- /dev/null +++ b/test/test_shared_snapshots_response.py @@ -0,0 +1,187 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.shared_snapshots_response import SharedSnapshotsResponse + +class TestSharedSnapshotsResponse(unittest.TestCase): + """SharedSnapshotsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SharedSnapshotsResponse: + """Test SharedSnapshotsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SharedSnapshotsResponse` + """ + model = SharedSnapshotsResponse() + if include_optional: + return SharedSnapshotsResponse( + shared_with_user = [ + corellium.models.shared_snapshot.SharedSnapshot( + shared_on = '2026-03-16T08:22:19Z', + shared_with_member = 'jane.doe@example.com', + sharing_type = 'publicLink', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + date = 1773479567000, + hw_pac = 1, + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + live = False, + local = True, + model = '', + type = 'ios', + name = 'Clean boot', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + fresh = True, + sharing = corellium.models.snapshot_sharing.SnapshotSharing( + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + members = [ + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) + ], ), ) + ], + shared_by_user = [ + corellium.models.shared_snapshot.SharedSnapshot( + shared_on = '2026-03-16T08:22:19Z', + shared_with_member = 'jane.doe@example.com', + sharing_type = 'publicLink', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + date = 1773479567000, + hw_pac = 1, + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + live = False, + local = True, + model = '', + type = 'ios', + name = 'Clean boot', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + fresh = True, + sharing = corellium.models.snapshot_sharing.SnapshotSharing( + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + members = [ + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) + ], ), ) + ] + ) + else: + return SharedSnapshotsResponse( + shared_with_user = [ + corellium.models.shared_snapshot.SharedSnapshot( + shared_on = '2026-03-16T08:22:19Z', + shared_with_member = 'jane.doe@example.com', + sharing_type = 'publicLink', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + date = 1773479567000, + hw_pac = 1, + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + live = False, + local = True, + model = '', + type = 'ios', + name = 'Clean boot', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + fresh = True, + sharing = corellium.models.snapshot_sharing.SnapshotSharing( + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + members = [ + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) + ], ), ) + ], + shared_by_user = [ + corellium.models.shared_snapshot.SharedSnapshot( + shared_on = '2026-03-16T08:22:19Z', + shared_with_member = 'jane.doe@example.com', + sharing_type = 'publicLink', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + date = 1773479567000, + hw_pac = 1, + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + live = False, + local = True, + model = '', + type = 'ios', + name = 'Clean boot', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + fresh = True, + sharing = corellium.models.snapshot_sharing.SnapshotSharing( + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + members = [ + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) + ], ), ) + ], + ) + """ + + def testSharedSnapshotsResponse(self): + """Test SharedSnapshotsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot.py b/test/test_snapshot.py index 2eb29bb..7fd9a24 100644 --- a/test/test_snapshot.py +++ b/test/test_snapshot.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.snapshot import Snapshot # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.snapshot import Snapshot class TestSnapshot(unittest.TestCase): """Snapshot unit test stubs""" @@ -28,58 +26,75 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Snapshot: """Test Snapshot - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.snapshot.Snapshot() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Snapshot` + """ + model = Snapshot() + if include_optional: return Snapshot( - id = '', - name = '', - instance = '', - status = corellium_api.models.snapshot_status.SnapshotStatus( - task = '', - created = True, ), - date = 1.337, - fresh = True, - live = True, - local = True, - model = '', - sharing = corellium_api.models.snapshot_sharing.SnapshotSharing( + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + name = 'Clean boot', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', + created = True, ), + var_date = 1773479567000, + fresh = True, + live = False, + local = True, + model = 'iPhone 13 Pro', + sharing = corellium.models.snapshot_sharing.SnapshotSharing( sharing_type = 'publicLink', - password = '', - shared_by = corellium_api.models.snapshot_owner.SnapshotOwner( - name = '', - email = '', ), + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), members = [ - corellium_api.models.snapshot_member.SnapshotMember( - email = '', - invite_sent_at = 1.337, - shared_on = 1.337, - user_id = '', - label = '', ) + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) ], ) ) - else : + else: return Snapshot( - id = '', - name = '', - instance = '', - status = corellium_api.models.snapshot_status.SnapshotStatus( - task = '', + id = 'c67af9c0-26cd-4233-9782-436c842b60db', + name = 'Clean boot', + instance = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + status = corellium.models.snapshot_status.SnapshotStatus( + task = 'none', created = True, ), - date = 1.337, - fresh = True, - live = True, + var_date = 1773479567000, local = True, + sharing = corellium.models.snapshot_sharing.SnapshotSharing( + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), + members = [ + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) + ], ), ) + """ def testSnapshot(self): """Test Snapshot""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_snapshot_creation_options.py b/test/test_snapshot_creation_options.py index d49e4b1..95d324e 100644 --- a/test/test_snapshot_creation_options.py +++ b/test/test_snapshot_creation_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.snapshot_creation_options import SnapshotCreationOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.snapshot_creation_options import SnapshotCreationOptions class TestSnapshotCreationOptions(unittest.TestCase): """SnapshotCreationOptions unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SnapshotCreationOptions: """Test SnapshotCreationOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.snapshot_creation_options.SnapshotCreationOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SnapshotCreationOptions` + """ + model = SnapshotCreationOptions() + if include_optional: return SnapshotCreationOptions( name = '' ) - else : + else: return SnapshotCreationOptions( name = '', ) + """ def testSnapshotCreationOptions(self): """Test SnapshotCreationOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_snapshot_list.py b/test/test_snapshot_list.py new file mode 100644 index 0000000..810a0f3 --- /dev/null +++ b/test/test_snapshot_list.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_list import SnapshotList + +class TestSnapshotList(unittest.TestCase): + """SnapshotList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotList: + """Test SnapshotList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotList` + """ + model = SnapshotList() + if include_optional: + return SnapshotList( + results = [ + corellium.models.cluster_snapshot_v1.ClusterSnapshotV1( + identifier = '', ) + ], + offset = 1.337, + limit = 1.337, + count = 1.337 + ) + else: + return SnapshotList( + ) + """ + + def testSnapshotList(self): + """Test SnapshotList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_member.py b/test/test_snapshot_member.py index 428a6ea..f3b25ca 100644 --- a/test/test_snapshot_member.py +++ b/test/test_snapshot_member.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.snapshot_member import SnapshotMember # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.snapshot_member import SnapshotMember class TestSnapshotMember(unittest.TestCase): """SnapshotMember unit test stubs""" @@ -28,31 +26,33 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SnapshotMember: """Test SnapshotMember - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.snapshot_member.SnapshotMember() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SnapshotMember` + """ + model = SnapshotMember() + if include_optional: return SnapshotMember( - email = '', - invite_sent_at = 1.337, - shared_on = 1.337, - user_id = '', - label = '' + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe' ) - else : + else: return SnapshotMember( - email = '', - invite_sent_at = 1.337, - shared_on = 1.337, + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', ) + """ def testSnapshotMember(self): """Test SnapshotMember""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_snapshot_member_v1.py b/test/test_snapshot_member_v1.py new file mode 100644 index 0000000..e9826f3 --- /dev/null +++ b/test/test_snapshot_member_v1.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_member_v1 import SnapshotMemberV1 + +class TestSnapshotMemberV1(unittest.TestCase): + """SnapshotMemberV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotMemberV1: + """Test SnapshotMemberV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotMemberV1` + """ + model = SnapshotMemberV1() + if include_optional: + return SnapshotMemberV1( + email = '', + invite_sent_at = 1.337, + shared_on = 1.337, + user_id = '', + label = '' + ) + else: + return SnapshotMemberV1( + email = '', + invite_sent_at = 1.337, + shared_on = 1.337, + ) + """ + + def testSnapshotMemberV1(self): + """Test SnapshotMemberV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_owner.py b/test/test_snapshot_owner.py index ab16f02..78d9a85 100644 --- a/test/test_snapshot_owner.py +++ b/test/test_snapshot_owner.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.snapshot_owner import SnapshotOwner # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.snapshot_owner import SnapshotOwner class TestSnapshotOwner(unittest.TestCase): """SnapshotOwner unit test stubs""" @@ -28,27 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SnapshotOwner: """Test SnapshotOwner - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.snapshot_owner.SnapshotOwner() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SnapshotOwner` + """ + model = SnapshotOwner() + if include_optional: return SnapshotOwner( - name = '', - email = '' + name = 'Jane Doe', + email = 'jane.doe@example.com' ) - else : + else: return SnapshotOwner( - name = '', - email = '', + name = 'Jane Doe', + email = 'jane.doe@example.com', ) + """ def testSnapshotOwner(self): """Test SnapshotOwner""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_snapshot_owner_v1.py b/test/test_snapshot_owner_v1.py new file mode 100644 index 0000000..9110904 --- /dev/null +++ b/test/test_snapshot_owner_v1.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_owner_v1 import SnapshotOwnerV1 + +class TestSnapshotOwnerV1(unittest.TestCase): + """SnapshotOwnerV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotOwnerV1: + """Test SnapshotOwnerV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotOwnerV1` + """ + model = SnapshotOwnerV1() + if include_optional: + return SnapshotOwnerV1( + name = '', + email = '' + ) + else: + return SnapshotOwnerV1( + name = '', + email = '', + ) + """ + + def testSnapshotOwnerV1(self): + """Test SnapshotOwnerV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_permissions_request_payload.py b/test/test_snapshot_permissions_request_payload.py index 3ac824c..6a45bbf 100644 --- a/test/test_snapshot_permissions_request_payload.py +++ b/test/test_snapshot_permissions_request_payload.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.snapshot_permissions_request_payload import SnapshotPermissionsRequestPayload class TestSnapshotPermissionsRequestPayload(unittest.TestCase): """SnapshotPermissionsRequestPayload unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SnapshotPermissionsRequestPayload: """Test SnapshotPermissionsRequestPayload - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.snapshot_permissions_request_payload.SnapshotPermissionsRequestPayload() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SnapshotPermissionsRequestPayload` + """ + model = SnapshotPermissionsRequestPayload() + if include_optional: return SnapshotPermissionsRequestPayload( members = [ '' ] ) - else : + else: return SnapshotPermissionsRequestPayload( members = [ '' ], ) + """ def testSnapshotPermissionsRequestPayload(self): """Test SnapshotPermissionsRequestPayload""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_snapshot_request.py b/test/test_snapshot_request.py new file mode 100644 index 0000000..1359f66 --- /dev/null +++ b/test/test_snapshot_request.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_request import SnapshotRequest + +class TestSnapshotRequest(unittest.TestCase): + """SnapshotRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotRequest: + """Test SnapshotRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotRequest` + """ + model = SnapshotRequest() + if include_optional: + return SnapshotRequest( + limit = 1.337, + offset = 1.337, + springboard = True, + live = True, + fresh = True, + device_name = '', + task = '', + to = '', + var_from = '', + order_by = '', + search = '' + ) + else: + return SnapshotRequest( + ) + """ + + def testSnapshotRequest(self): + """Test SnapshotRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_sharing.py b/test/test_snapshot_sharing.py index 745e90a..ae5568d 100644 --- a/test/test_snapshot_sharing.py +++ b/test/test_snapshot_sharing.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.snapshot_sharing import SnapshotSharing # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.snapshot_sharing import SnapshotSharing class TestSnapshotSharing(unittest.TestCase): """SnapshotSharing unit test stubs""" @@ -28,37 +26,41 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SnapshotSharing: """Test SnapshotSharing - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.snapshot_sharing.SnapshotSharing() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SnapshotSharing` + """ + model = SnapshotSharing() + if include_optional: return SnapshotSharing( - sharing_type = 'publicLink', - password = '', - shared_by = corellium_api.models.snapshot_owner.SnapshotOwner( - name = '', - email = '', ), + sharing_type = 'publicLink', + access_code = 'X7QK9P2M', + shared_on = '2026-03-16T08:22:19Z', + shared_by = corellium.models.snapshot_owner.SnapshotOwner( + name = 'Jane Doe', + email = 'jane.doe@example.com', ), members = [ - corellium_api.models.snapshot_member.SnapshotMember( - email = '', - invite_sent_at = 1.337, - shared_on = 1.337, - user_id = '', - label = '', ) + corellium.models.snapshot_member.SnapshotMember( + email = 'jane.doe@example.com', + invite_sent_at = '2026-03-16T08:22:19Z', + shared_on = '2026-03-16T08:22:19Z', + user_id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + name = 'Jane Doe', ) ] ) - else : + else: return SnapshotSharing( sharing_type = 'publicLink', ) + """ def testSnapshotSharing(self): """Test SnapshotSharing""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_snapshot_sharing_api.py b/test/test_snapshot_sharing_api.py new file mode 100644 index 0000000..5d4fa95 --- /dev/null +++ b/test/test_snapshot_sharing_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.snapshot_sharing_api import SnapshotSharingApi + + +class TestSnapshotSharingApi(unittest.TestCase): + """SnapshotSharingApi unit test stubs""" + + def setUp(self) -> None: + self.api = SnapshotSharingApi() + + def tearDown(self) -> None: + pass + + def test_v3_accept_shared_snapshot(self) -> None: + """Test case for v3_accept_shared_snapshot + + Accept a shared snapshot + """ + pass + + def test_v3_delete_snapshot_permissions(self) -> None: + """Test case for v3_delete_snapshot_permissions + + Delete member(s) + """ + pass + + def test_v3_get_shared_snapshots(self) -> None: + """Test case for v3_get_shared_snapshots + + Fetch shared snapshots + """ + pass + + def test_v3_set_snapshot_permissions(self) -> None: + """Test case for v3_set_snapshot_permissions + + Set member list + """ + pass + + def test_v3_share_snapshot(self) -> None: + """Test case for v3_share_snapshot + + Create or update snapshot sharing + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_sharing_permissions.py b/test/test_snapshot_sharing_permissions.py index 7bda87d..e3a640f 100644 --- a/test/test_snapshot_sharing_permissions.py +++ b/test/test_snapshot_sharing_permissions.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.snapshot_sharing_permissions import SnapshotSharingPermissions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.snapshot_sharing_permissions import SnapshotSharingPermissions class TestSnapshotSharingPermissions(unittest.TestCase): """SnapshotSharingPermissions unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SnapshotSharingPermissions: """Test SnapshotSharingPermissions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.snapshot_sharing_permissions.SnapshotSharingPermissions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SnapshotSharingPermissions` + """ + model = SnapshotSharingPermissions() + if include_optional: return SnapshotSharingPermissions( - cloud_enabled = True, - domain_enabled = True, - public_link = True, - domain_restricted_link = True, - password_public_link = True, + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, email_invite = True ) - else : + else: return SnapshotSharingPermissions( ) + """ def testSnapshotSharingPermissions(self): """Test SnapshotSharingPermissions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_snapshot_sharing_permissions_request_schema.py b/test/test_snapshot_sharing_permissions_request_schema.py new file mode 100644 index 0000000..7e984cd --- /dev/null +++ b/test/test_snapshot_sharing_permissions_request_schema.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_sharing_permissions_request_schema import SnapshotSharingPermissionsRequestSchema + +class TestSnapshotSharingPermissionsRequestSchema(unittest.TestCase): + """SnapshotSharingPermissionsRequestSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotSharingPermissionsRequestSchema: + """Test SnapshotSharingPermissionsRequestSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotSharingPermissionsRequestSchema` + """ + model = SnapshotSharingPermissionsRequestSchema() + if include_optional: + return SnapshotSharingPermissionsRequestSchema( + enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True + ) + else: + return SnapshotSharingPermissionsRequestSchema( + ) + """ + + def testSnapshotSharingPermissionsRequestSchema(self): + """Test SnapshotSharingPermissionsRequestSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_sharing_type.py b/test/test_snapshot_sharing_type.py new file mode 100644 index 0000000..0e00b2d --- /dev/null +++ b/test/test_snapshot_sharing_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_sharing_type import SnapshotSharingType + +class TestSnapshotSharingType(unittest.TestCase): + """SnapshotSharingType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSnapshotSharingType(self): + """Test SnapshotSharingType""" + # inst = SnapshotSharingType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_sharing_v1.py b/test/test_snapshot_sharing_v1.py new file mode 100644 index 0000000..d1cb365 --- /dev/null +++ b/test/test_snapshot_sharing_v1.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_sharing_v1 import SnapshotSharingV1 + +class TestSnapshotSharingV1(unittest.TestCase): + """SnapshotSharingV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotSharingV1: + """Test SnapshotSharingV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotSharingV1` + """ + model = SnapshotSharingV1() + if include_optional: + return SnapshotSharingV1( + sharing_type = 'publicLink', + shared_by = corellium.models.snapshot_owner_v1.SnapshotOwnerV1( + name = '', + email = '', ), + members = [ + corellium.models.snapshot_member_v1.SnapshotMemberV1( + email = '', + invite_sent_at = 1.337, + shared_on = 1.337, + user_id = '', + label = '', ) + ] + ) + else: + return SnapshotSharingV1( + sharing_type = 'publicLink', + ) + """ + + def testSnapshotSharingV1(self): + """Test SnapshotSharingV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_sharing_v1_api.py b/test/test_snapshot_sharing_v1_api.py new file mode 100644 index 0000000..1db350c --- /dev/null +++ b/test/test_snapshot_sharing_v1_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.snapshot_sharing_v1_api import SnapshotSharingV1Api + + +class TestSnapshotSharingV1Api(unittest.TestCase): + """SnapshotSharingV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = SnapshotSharingV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_accept_shared_snapshot(self) -> None: + """Test case for v1_accept_shared_snapshot + + Accept a snapshot shared with you + """ + pass + + def test_v1_delete_snapshot_permissions(self) -> None: + """Test case for v1_delete_snapshot_permissions + + Delete member(s) + """ + pass + + def test_v1_get_shared_snapshots(self) -> None: + """Test case for v1_get_shared_snapshots + + Fetch shared snapshots + """ + pass + + def test_v1_set_snapshot_permissions(self) -> None: + """Test case for v1_set_snapshot_permissions + + Set member list + """ + pass + + def test_v1_share_snapshot(self) -> None: + """Test case for v1_share_snapshot + + Share snapshot + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_status.py b/test/test_snapshot_status.py index da84d44..3aed1b3 100644 --- a/test/test_snapshot_status.py +++ b/test/test_snapshot_status.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.snapshot_status import SnapshotStatus # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.snapshot_status import SnapshotStatus class TestSnapshotStatus(unittest.TestCase): """SnapshotStatus unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SnapshotStatus: """Test SnapshotStatus - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.snapshot_status.SnapshotStatus() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SnapshotStatus` + """ + model = SnapshotStatus() + if include_optional: return SnapshotStatus( - task = '', + task = 'none', created = True ) - else : + else: return SnapshotStatus( ) + """ def testSnapshotStatus(self): """Test SnapshotStatus""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_snapshot_status_v1.py b/test/test_snapshot_status_v1.py new file mode 100644 index 0000000..c26ffc6 --- /dev/null +++ b/test/test_snapshot_status_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_status_v1 import SnapshotStatusV1 + +class TestSnapshotStatusV1(unittest.TestCase): + """SnapshotStatusV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotStatusV1: + """Test SnapshotStatusV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotStatusV1` + """ + model = SnapshotStatusV1() + if include_optional: + return SnapshotStatusV1( + task = '', + created = True + ) + else: + return SnapshotStatusV1( + ) + """ + + def testSnapshotStatusV1(self): + """Test SnapshotStatusV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshot_v1.py b/test/test_snapshot_v1.py new file mode 100644 index 0000000..077ee3a --- /dev/null +++ b/test/test_snapshot_v1.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.snapshot_v1 import SnapshotV1 + +class TestSnapshotV1(unittest.TestCase): + """SnapshotV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SnapshotV1: + """Test SnapshotV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SnapshotV1` + """ + model = SnapshotV1() + if include_optional: + return SnapshotV1( + id = '', + name = '', + instance = '', + status = corellium.models.snapshot_status_v1.SnapshotStatusV1( + task = '', + created = True, ), + var_date = 1.337, + fresh = True, + live = True, + local = True, + model = '', + sharing = corellium.models.snapshot_sharing_v1.SnapshotSharingV1( + sharing_type = 'publicLink', + shared_by = corellium.models.snapshot_owner_v1.SnapshotOwnerV1( + name = '', + email = '', ), + members = [ + corellium.models.snapshot_member_v1.SnapshotMemberV1( + email = '', + invite_sent_at = 1.337, + shared_on = 1.337, + user_id = '', + label = '', ) + ], ) + ) + else: + return SnapshotV1( + id = '', + name = '', + instance = '', + status = corellium.models.snapshot_status_v1.SnapshotStatusV1( + task = '', + created = True, ), + var_date = 1.337, + fresh = True, + live = True, + local = True, + ) + """ + + def testSnapshotV1(self): + """Test SnapshotV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshots_api.py b/test/test_snapshots_api.py new file mode 100644 index 0000000..e287497 --- /dev/null +++ b/test/test_snapshots_api.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.snapshots_api import SnapshotsApi + + +class TestSnapshotsApi(unittest.TestCase): + """SnapshotsApi unit test stubs""" + + def setUp(self) -> None: + self.api = SnapshotsApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_instance_snapshot(self) -> None: + """Test case for v3_create_instance_snapshot + + Create instance snapshot + """ + pass + + def test_v3_delete_instance_snapshot(self) -> None: + """Test case for v3_delete_instance_snapshot + + Delete an instance snapshot + """ + pass + + def test_v3_delete_snapshot(self) -> None: + """Test case for v3_delete_snapshot + + Delete a snapshot + """ + pass + + def test_v3_get_instance_snapshot(self) -> None: + """Test case for v3_get_instance_snapshot + + Get instance snapshot + """ + pass + + def test_v3_get_snapshot(self) -> None: + """Test case for v3_get_snapshot + + Get snapshot + """ + pass + + def test_v3_list_instance_snapshots(self) -> None: + """Test case for v3_list_instance_snapshots + + List instance snapshots + """ + pass + + def test_v3_patch_instance_snapshot(self) -> None: + """Test case for v3_patch_instance_snapshot + + Update an instance snapshot + """ + pass + + def test_v3_restore_instance_snapshot(self) -> None: + """Test case for v3_restore_instance_snapshot + + Restore instance snapshot + """ + pass + + def test_v3_update_snapshot(self) -> None: + """Test case for v3_update_snapshot + + Update snapshot name + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_snapshots_v1_api.py b/test/test_snapshots_v1_api.py new file mode 100644 index 0000000..530ea1a --- /dev/null +++ b/test/test_snapshots_v1_api.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.snapshots_v1_api import SnapshotsV1Api + + +class TestSnapshotsV1Api(unittest.TestCase): + """SnapshotsV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = SnapshotsV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_create_snapshot(self) -> None: + """Test case for v1_create_snapshot + + Create Instance Snapshot + """ + pass + + def test_v1_delete_instance_snapshot(self) -> None: + """Test case for v1_delete_instance_snapshot + + Delete an Instance Snapshot + """ + pass + + def test_v1_delete_snapshot(self) -> None: + """Test case for v1_delete_snapshot + + Delete a Snapshot + """ + pass + + def test_v1_get_instance_snapshot(self) -> None: + """Test case for v1_get_instance_snapshot + + Get Instance Snapshot + """ + pass + + def test_v1_get_instance_snapshots(self) -> None: + """Test case for v1_get_instance_snapshots + + Get Instance Snapshots + """ + pass + + def test_v1_get_snapshot(self) -> None: + """Test case for v1_get_snapshot + + Get Snapshot + """ + pass + + def test_v1_rename_instance_snapshot(self) -> None: + """Test case for v1_rename_instance_snapshot + + Rename an Instance Snapshot + """ + pass + + def test_v1_restore_instance_snapshot(self) -> None: + """Test case for v1_restore_instance_snapshot + + Restore an Instance Snapshot + """ + pass + + def test_v1_snapshot_rename(self) -> None: + """Test case for v1_snapshot_rename + + Rename a Snapshot + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sslsplit_filter.py b/test/test_sslsplit_filter.py index 3711a06..482cc69 100644 --- a/test/test_sslsplit_filter.py +++ b/test/test_sslsplit_filter.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.sslsplit_filter import SslsplitFilter # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.sslsplit_filter import SslsplitFilter class TestSslsplitFilter(unittest.TestCase): """SslsplitFilter unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> SslsplitFilter: """Test SslsplitFilter - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.sslsplit_filter.SslsplitFilter() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `SslsplitFilter` + """ + model = SslsplitFilter() + if include_optional: return SslsplitFilter( truncate_pcap = True ) - else : + else: return SslsplitFilter( ) + """ def testSslsplitFilter(self): """Test SslsplitFilter""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_start_instance_body.py b/test/test_start_instance_body.py new file mode 100644 index 0000000..dd19d0f --- /dev/null +++ b/test/test_start_instance_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.start_instance_body import StartInstanceBody + +class TestStartInstanceBody(unittest.TestCase): + """StartInstanceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StartInstanceBody: + """Test StartInstanceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StartInstanceBody` + """ + model = StartInstanceBody() + if include_optional: + return StartInstanceBody( + paused = True, + sock_cap = True + ) + else: + return StartInstanceBody( + ) + """ + + def testStartInstanceBody(self): + """Test StartInstanceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_status_api.py b/test/test_status_api.py new file mode 100644 index 0000000..5d1083a --- /dev/null +++ b/test/test_status_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.status_api import StatusApi + + +class TestStatusApi(unittest.TestCase): + """StatusApi unit test stubs""" + + def setUp(self) -> None: + self.api = StatusApi() + + def tearDown(self) -> None: + pass + + def test_v3_ready(self) -> None: + """Test case for v3_ready + + Check that the API is ready + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_status_v1_api.py b/test/test_status_v1_api.py new file mode 100644 index 0000000..271440d --- /dev/null +++ b/test/test_status_v1_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.status_v1_api import StatusV1Api + + +class TestStatusV1Api(unittest.TestCase): + """StatusV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = StatusV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_ready(self) -> None: + """Test case for v1_ready + + API Status + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stop_instance_body.py b/test/test_stop_instance_body.py new file mode 100644 index 0000000..3da558b --- /dev/null +++ b/test/test_stop_instance_body.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.stop_instance_body import StopInstanceBody + +class TestStopInstanceBody(unittest.TestCase): + """StopInstanceBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StopInstanceBody: + """Test StopInstanceBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StopInstanceBody` + """ + model = StopInstanceBody() + if include_optional: + return StopInstanceBody( + soft = True + ) + else: + return StopInstanceBody( + ) + """ + + def testStopInstanceBody(self): + """Test StopInstanceBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_already_mounted_response.py b/test/test_storage_already_mounted_response.py new file mode 100644 index 0000000..03e44bb --- /dev/null +++ b/test/test_storage_already_mounted_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_already_mounted_response import StorageAlreadyMountedResponse + +class TestStorageAlreadyMountedResponse(unittest.TestCase): + """StorageAlreadyMountedResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageAlreadyMountedResponse: + """Test StorageAlreadyMountedResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageAlreadyMountedResponse` + """ + model = StorageAlreadyMountedResponse() + if include_optional: + return StorageAlreadyMountedResponse( + message = 'Device is already mounted.', + mount_point = '/mnt/usb1', + device = '/dev/sdb1' + ) + else: + return StorageAlreadyMountedResponse( + message = 'Device is already mounted.', + mount_point = '/mnt/usb1', + device = '/dev/sdb1', + ) + """ + + def testStorageAlreadyMountedResponse(self): + """Test StorageAlreadyMountedResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_api.py b/test/test_storage_api.py new file mode 100644 index 0000000..4ea02c4 --- /dev/null +++ b/test/test_storage_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.storage_api import StorageApi + + +class TestStorageApi(unittest.TestCase): + """StorageApi unit test stubs""" + + def setUp(self) -> None: + self.api = StorageApi() + + def tearDown(self) -> None: + pass + + def test_v3_attach_cluster_storage(self) -> None: + """Test case for v3_attach_cluster_storage + + Attach storage device + """ + pass + + def test_v3_eject_cluster_storage(self) -> None: + """Test case for v3_eject_cluster_storage + + Eject storage device + """ + pass + + def test_v3_list_cluster_storage(self) -> None: + """Test case for v3_list_cluster_storage + + List cluster storage devices + """ + pass + + def test_v3_list_storage(self) -> None: + """Test case for v3_list_storage + + List server-attached storage devices + """ + pass + + def test_v3_list_storage_files(self) -> None: + """Test case for v3_list_storage_files + + List storage files + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_attach_response.py b/test/test_storage_attach_response.py new file mode 100644 index 0000000..07e61c1 --- /dev/null +++ b/test/test_storage_attach_response.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_attach_response import StorageAttachResponse + +class TestStorageAttachResponse(unittest.TestCase): + """StorageAttachResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageAttachResponse: + """Test StorageAttachResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageAttachResponse` + """ + model = StorageAttachResponse() + if include_optional: + return StorageAttachResponse( + status = 'success', + message = 'Mount job queued', + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab' + ) + else: + return StorageAttachResponse( + status = 'success', + message = 'Mount job queued', + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + ) + """ + + def testStorageAttachResponse(self): + """Test StorageAttachResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_device.py b/test/test_storage_device.py new file mode 100644 index 0000000..ed7d08f --- /dev/null +++ b/test/test_storage_device.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_device import StorageDevice + +class TestStorageDevice(unittest.TestCase): + """StorageDevice unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageDevice: + """Test StorageDevice + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageDevice` + """ + model = StorageDevice() + if include_optional: + return StorageDevice( + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + device = '/dev/sdb1', + fs_type = 'ext4', + fs_uuid = '4a3f2e1d-8c7b-4a19-9e2f-6d5c4b3a2190', + label = 'EXTERNAL_SSD', + serial = '0123456789ABCDEF', + vendor = 'SanDisk', + model = 'Ultra USB 3.0', + mount_policy = 'RO', + status = 'mounted', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return StorageDevice( + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + device = '/dev/sdb1', + fs_type = 'ext4', + fs_uuid = '4a3f2e1d-8c7b-4a19-9e2f-6d5c4b3a2190', + label = 'EXTERNAL_SSD', + serial = '0123456789ABCDEF', + vendor = 'SanDisk', + model = 'Ultra USB 3.0', + mount_policy = 'RO', + status = 'mounted', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testStorageDevice(self): + """Test StorageDevice""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_device_list.py b/test/test_storage_device_list.py new file mode 100644 index 0000000..c5923dd --- /dev/null +++ b/test/test_storage_device_list.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_device_list import StorageDeviceList + +class TestStorageDeviceList(unittest.TestCase): + """StorageDeviceList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageDeviceList: + """Test StorageDeviceList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageDeviceList` + """ + model = StorageDeviceList() + if include_optional: + return StorageDeviceList( + results = [ + corellium.models.storage_device.StorageDevice( + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + device = '/dev/sdb1', + fs_type = 'ext4', + fs_uuid = '4a3f2e1d-8c7b-4a19-9e2f-6d5c4b3a2190', + label = 'EXTERNAL_SSD', + serial = '0123456789ABCDEF', + vendor = 'SanDisk', + model = 'Ultra USB 3.0', + mount_policy = 'RO', + status = 'mounted', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return StorageDeviceList( + results = [ + corellium.models.storage_device.StorageDevice( + id = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + device = '/dev/sdb1', + fs_type = 'ext4', + fs_uuid = '4a3f2e1d-8c7b-4a19-9e2f-6d5c4b3a2190', + label = 'EXTERNAL_SSD', + serial = '0123456789ABCDEF', + vendor = 'SanDisk', + model = 'Ultra USB 3.0', + mount_policy = 'RO', + status = 'mounted', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testStorageDeviceList(self): + """Test StorageDeviceList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_eject_already_unmounted_response.py b/test/test_storage_eject_already_unmounted_response.py new file mode 100644 index 0000000..4167fd6 --- /dev/null +++ b/test/test_storage_eject_already_unmounted_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_eject_already_unmounted_response import StorageEjectAlreadyUnmountedResponse + +class TestStorageEjectAlreadyUnmountedResponse(unittest.TestCase): + """StorageEjectAlreadyUnmountedResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageEjectAlreadyUnmountedResponse: + """Test StorageEjectAlreadyUnmountedResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageEjectAlreadyUnmountedResponse` + """ + model = StorageEjectAlreadyUnmountedResponse() + if include_optional: + return StorageEjectAlreadyUnmountedResponse( + message = 'Device is already unmounted.' + ) + else: + return StorageEjectAlreadyUnmountedResponse( + message = 'Device is already unmounted.', + ) + """ + + def testStorageEjectAlreadyUnmountedResponse(self): + """Test StorageEjectAlreadyUnmountedResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_file.py b/test/test_storage_file.py new file mode 100644 index 0000000..24d2b07 --- /dev/null +++ b/test/test_storage_file.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_file import StorageFile + +class TestStorageFile(unittest.TestCase): + """StorageFile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageFile: + """Test StorageFile + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageFile` + """ + model = StorageFile() + if include_optional: + return StorageFile( + name = 'firmware.ipsw', + ext = 'ipsw', + type = 'file', + size = 2147483648, + last_modified_time = '2026-03-17T11:41:05Z' + ) + else: + return StorageFile( + name = 'firmware.ipsw', + ext = 'ipsw', + type = 'file', + size = 2147483648, + last_modified_time = '2026-03-17T11:41:05Z', + ) + """ + + def testStorageFile(self): + """Test StorageFile""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_file_list.py b/test/test_storage_file_list.py new file mode 100644 index 0000000..551b94c --- /dev/null +++ b/test/test_storage_file_list.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_file_list import StorageFileList + +class TestStorageFileList(unittest.TestCase): + """StorageFileList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageFileList: + """Test StorageFileList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageFileList` + """ + model = StorageFileList() + if include_optional: + return StorageFileList( + results = [ + corellium.models.storage_file.StorageFile( + name = 'firmware.ipsw', + ext = 'ipsw', + type = 'file', + size = 2147483648, + last_modified_time = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return StorageFileList( + results = [ + corellium.models.storage_file.StorageFile( + name = 'firmware.ipsw', + ext = 'ipsw', + type = 'file', + size = 2147483648, + last_modified_time = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testStorageFileList(self): + """Test StorageFileList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_list.py b/test/test_storage_list.py new file mode 100644 index 0000000..fb55c46 --- /dev/null +++ b/test/test_storage_list.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_list import StorageList + +class TestStorageList(unittest.TestCase): + """StorageList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageList: + """Test StorageList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageList` + """ + model = StorageList() + if include_optional: + return StorageList( + results = [ + corellium.models.media_store.MediaStore( + identifier = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + device = '/dev/sdb1', + fs_type = 'ext4', + fs_uuid = '4a3f2e1d-8c7b-4a19-9e2f-6d5c4b3a2190', + label = 'EXTERNAL_SSD', + serial = '0123456789ABCDEF', + vendor = 'SanDisk', + model = 'Ultra USB 3.0', + mount_policy = 'RO', + status = 'mounted', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return StorageList( + results = [ + corellium.models.media_store.MediaStore( + identifier = '73357171-23a0-4a3e-8661-216dbfbdd7ab', + device = '/dev/sdb1', + fs_type = 'ext4', + fs_uuid = '4a3f2e1d-8c7b-4a19-9e2f-6d5c4b3a2190', + label = 'EXTERNAL_SSD', + serial = '0123456789ABCDEF', + vendor = 'SanDisk', + model = 'Ultra USB 3.0', + mount_policy = 'RO', + status = 'mounted', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testStorageList(self): + """Test StorageList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_queue_error.py b/test/test_storage_queue_error.py new file mode 100644 index 0000000..60962d0 --- /dev/null +++ b/test/test_storage_queue_error.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.storage_queue_error import StorageQueueError + +class TestStorageQueueError(unittest.TestCase): + """StorageQueueError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StorageQueueError: + """Test StorageQueueError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StorageQueueError` + """ + model = StorageQueueError() + if include_optional: + return StorageQueueError( + error = 'Failed to queue mount job.', + details = 'Connection to job queue timed out.', + suggestion = 'Retry the request in a few minutes.' + ) + else: + return StorageQueueError( + error = 'Failed to queue mount job.', + details = 'Connection to job queue timed out.', + suggestion = 'Retry the request in a few minutes.', + ) + """ + + def testStorageQueueError(self): + """Test StorageQueueError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_storage_v1_api.py b/test/test_storage_v1_api.py new file mode 100644 index 0000000..de59fa1 --- /dev/null +++ b/test/test_storage_v1_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.storage_v1_api import StorageV1Api + + +class TestStorageV1Api(unittest.TestCase): + """StorageV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = StorageV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_attach_storage_cluster(self) -> None: + """Test case for v1_attach_storage_cluster + + Mount and attach a storage device + """ + pass + + def test_v1_eject_storage_cluster(self) -> None: + """Test case for v1_eject_storage_cluster + + Eject/Unmount removable media + """ + pass + + def test_v1_list_storage(self) -> None: + """Test case for v1_list_storage + + Get storage devices + """ + pass + + def test_v1_list_storage_cluster(self) -> None: + """Test case for v1_list_storage_cluster + + Get storage devices + """ + pass + + def test_v1_list_storage_files(self) -> None: + """Test case for v1_list_storage_files + + List Storage Files + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stripe_checkout_body.py b/test/test_stripe_checkout_body.py new file mode 100644 index 0000000..ddd75e7 --- /dev/null +++ b/test/test_stripe_checkout_body.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.stripe_checkout_body import StripeCheckoutBody + +class TestStripeCheckoutBody(unittest.TestCase): + """StripeCheckoutBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StripeCheckoutBody: + """Test StripeCheckoutBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StripeCheckoutBody` + """ + model = StripeCheckoutBody() + if include_optional: + return StripeCheckoutBody( + terms_of_service = True, + email = 'jane.doe@example.com', + name = 'Jane Doe', + domain = 'acme-corp.corellium.com', + cores = 12, + license_type = 'enterprise', + existing_domain = False, + price_id = 'price_xxxxxxxxxxxxxx', + coupon_code = 'SAVE20' + ) + else: + return StripeCheckoutBody( + terms_of_service = True, + email = 'jane.doe@example.com', + name = 'Jane Doe', + domain = 'acme-corp.corellium.com', + cores = 12, + license_type = 'enterprise', + existing_domain = False, + price_id = 'price_xxxxxxxxxxxxxx', + ) + """ + + def testStripeCheckoutBody(self): + """Test StripeCheckoutBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stripe_checkout_complete_body.py b/test/test_stripe_checkout_complete_body.py new file mode 100644 index 0000000..f2e65e9 --- /dev/null +++ b/test/test_stripe_checkout_complete_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.stripe_checkout_complete_body import StripeCheckoutCompleteBody + +class TestStripeCheckoutCompleteBody(unittest.TestCase): + """StripeCheckoutCompleteBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StripeCheckoutCompleteBody: + """Test StripeCheckoutCompleteBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StripeCheckoutCompleteBody` + """ + model = StripeCheckoutCompleteBody() + if include_optional: + return StripeCheckoutCompleteBody( + session_id = 'cs_test_xxxxxxxxxxxxxxxxxxxxxxxx' + ) + else: + return StripeCheckoutCompleteBody( + session_id = 'cs_test_xxxxxxxxxxxxxxxxxxxxxxxx', + ) + """ + + def testStripeCheckoutCompleteBody(self): + """Test StripeCheckoutCompleteBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stripe_webhook_ack.py b/test/test_stripe_webhook_ack.py new file mode 100644 index 0000000..3c8fdd0 --- /dev/null +++ b/test/test_stripe_webhook_ack.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.stripe_webhook_ack import StripeWebhookAck + +class TestStripeWebhookAck(unittest.TestCase): + """StripeWebhookAck unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StripeWebhookAck: + """Test StripeWebhookAck + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StripeWebhookAck` + """ + model = StripeWebhookAck() + if include_optional: + return StripeWebhookAck( + received = True, + ignored = 'Unhandled event type: customer.updated' + ) + else: + return StripeWebhookAck( + received = True, + ) + """ + + def testStripeWebhookAck(self): + """Test StripeWebhookAck""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscribe_to_trial_body.py b/test/test_subscribe_to_trial_body.py new file mode 100644 index 0000000..eb33715 --- /dev/null +++ b/test/test_subscribe_to_trial_body.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.subscribe_to_trial_body import SubscribeToTrialBody + +class TestSubscribeToTrialBody(unittest.TestCase): + """SubscribeToTrialBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubscribeToTrialBody: + """Test SubscribeToTrialBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubscribeToTrialBody` + """ + model = SubscribeToTrialBody() + if include_optional: + return SubscribeToTrialBody( + trial_request_code = 'TRIAL2026', + password = '', + terms_of_service = True, + enterprise_domain_name = 'acme-corp', + sso = False, + email = 'jane.doe@example.com', + name = 'Jane Doe', + federated_user_id = 'okta|00u1a2b3c4d5e6f7g8h9' + ) + else: + return SubscribeToTrialBody( + ) + """ + + def testSubscribeToTrialBody(self): + """Test SubscribeToTrialBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscriber_invite.py b/test/test_subscriber_invite.py deleted file mode 100644 index 1e4aa02..0000000 --- a/test/test_subscriber_invite.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.subscriber_invite import SubscriberInvite # noqa: E501 -from corellium_api.rest import ApiException - -class TestSubscriberInvite(unittest.TestCase): - """SubscriberInvite unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test SubscriberInvite - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.subscriber_invite.SubscriberInvite() # noqa: E501 - if include_optional : - return SubscriberInvite( - coupon_options = corellium_api.models.coupon_options.coupon_options( - type = 'percent', - amount = 1.337, - used = True, ), - plan = corellium_api.models.plan.plan( - license_type = 'premium', - cores = 56, ), - trial = corellium_api.models.trial.trial( - duration = 1.337, ), - name = '', - email = '', - coupon_code = '', - domain = '', - aggregate = '', - use_by = '', - active = True, - reusable = True, - created_at = '', - updated_at = '' - ) - else : - return SubscriberInvite( - coupon_code = '', - aggregate = '', - active = True, - reusable = True, - created_at = '', - updated_at = '', - ) - - def testSubscriberInvite(self): - """Test SubscriberInvite""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_subscription.py b/test/test_subscription.py new file mode 100644 index 0000000..f5596fd --- /dev/null +++ b/test/test_subscription.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.subscription import Subscription + +class TestSubscription(unittest.TestCase): + """Subscription unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Subscription: + """Test Subscription + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Subscription` + """ + model = Subscription() + if include_optional: + return Subscription( + trial = corellium.models.subscription_trial.Subscription_trial( + status = 'not_started', + start = '2026-03-16T08:22:19Z', + end = '2027-01-15T00:00Z', + used_hours = 6, + max_hours = 24, ), + status = 'active', + billing_type = 'usage', + plan_name = 'Viper Essentials', + next_bill = '2027-01-15T00:00:00.000Z', + use_device_accounting = True, + is_enterprise = False, + is_usage_based = True, + cancel_policy = 'period_end' + ) + else: + return Subscription( + trial = corellium.models.subscription_trial.Subscription_trial( + status = 'not_started', + start = '2026-03-16T08:22:19Z', + end = '2027-01-15T00:00Z', + used_hours = 6, + max_hours = 24, ), + status = 'active', + billing_type = 'usage', + plan_name = 'Viper Essentials', + use_device_accounting = True, + is_enterprise = False, + is_usage_based = True, + cancel_policy = 'period_end', + ) + """ + + def testSubscription(self): + """Test Subscription""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscription_trial.py b/test/test_subscription_trial.py new file mode 100644 index 0000000..04bd266 --- /dev/null +++ b/test/test_subscription_trial.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.subscription_trial import SubscriptionTrial + +class TestSubscriptionTrial(unittest.TestCase): + """SubscriptionTrial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubscriptionTrial: + """Test SubscriptionTrial + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubscriptionTrial` + """ + model = SubscriptionTrial() + if include_optional: + return SubscriptionTrial( + status = 'not_started', + start = '2026-03-16T08:22:19Z', + end = '2027-01-15T00:00Z', + used_hours = 6, + max_hours = 24 + ) + else: + return SubscriptionTrial( + status = 'not_started', + start = '2026-03-16T08:22:19Z', + end = '2027-01-15T00:00Z', + used_hours = 6, + max_hours = 24, + ) + """ + + def testSubscriptionTrial(self): + """Test SubscriptionTrial""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sys_info_schema.py b/test/test_sys_info_schema.py new file mode 100644 index 0000000..767285b --- /dev/null +++ b/test/test_sys_info_schema.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.sys_info_schema import SysInfoSchema + +class TestSysInfoSchema(unittest.TestCase): + """SysInfoSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SysInfoSchema: + """Test SysInfoSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SysInfoSchema` + """ + model = SysInfoSchema() + if include_optional: + return SysInfoSchema( + numa_nodes = 2, + cpu = None, + cpu_avail = None, + slot = 24, + slot_avail = 8, + ram = 262144, + ram_avail = 65536, + vpn = 8, + vpn_avail = 5, + gpu = 2, + gpu_avail = 1, + ram_cpu = '0', + el032 = '0', + el132 = '0', + mmu_tg16k = '0', + hw_pac = 1, + arm_trace = '0', + cores = 64, + cores_avail = 24, + ram_core = 4096 + ) + else: + return SysInfoSchema( + ) + """ + + def testSysInfoSchema(self): + """Test SysInfoSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_task_status.py b/test/test_task_status.py new file mode 100644 index 0000000..3b2a0e6 --- /dev/null +++ b/test/test_task_status.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.task_status import TaskStatus + +class TestTaskStatus(unittest.TestCase): + """TaskStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTaskStatus(self): + """Test TaskStatus""" + # inst = TaskStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team.py b/test/test_team.py index c07babb..c60259a 100644 --- a/test/test_team.py +++ b/test/test_team.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.team import Team # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.team import Team class TestTeam(unittest.TestCase): """Team unit test stubs""" @@ -28,37 +26,52 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Team: """Test Team - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.team.Team() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Team` + """ + model = Team() + if include_optional: return Team( - id = '', - label = '', + id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', + label = 'Mobile QA', users = [ - corellium_api.models.user.User( - id = '', - label = '', - name = '', - email = '', + corellium.models.team_user.TeamUser( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', administrator = True, can_edit_user_attributes = True, - cluster_administrator = True, ) + cluster_administrator = False, + is_federated_user = False, ) ] ) - else : + else: return Team( - id = '', - label = '', + id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', + label = 'Mobile QA', + users = [ + corellium.models.team_user.TeamUser( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + can_edit_user_attributes = True, + cluster_administrator = False, + is_federated_user = False, ) + ], ) + """ def testTeam(self): """Test Team""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_team_create.py b/test/test_team_create.py index b42ed66..3c5642e 100644 --- a/test/test_team_create.py +++ b/test/test_team_create.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.team_create import TeamCreate # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.team_create import TeamCreate class TestTeamCreate(unittest.TestCase): """TeamCreate unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TeamCreate: """Test TeamCreate - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.team_create.TeamCreate() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `TeamCreate` + """ + model = TeamCreate() + if include_optional: return TeamCreate( id = '' ) - else : + else: return TeamCreate( ) + """ def testTeamCreate(self): """Test TeamCreate""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_team_created.py b/test/test_team_created.py new file mode 100644 index 0000000..788cdac --- /dev/null +++ b/test/test_team_created.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.team_created import TeamCreated + +class TestTeamCreated(unittest.TestCase): + """TeamCreated unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TeamCreated: + """Test TeamCreated + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TeamCreated` + """ + model = TeamCreated() + if include_optional: + return TeamCreated( + id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213' + ) + else: + return TeamCreated( + id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', + ) + """ + + def testTeamCreated(self): + """Test TeamCreated""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team_user.py b/test/test_team_user.py new file mode 100644 index 0000000..6c0f254 --- /dev/null +++ b/test/test_team_user.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.team_user import TeamUser + +class TestTeamUser(unittest.TestCase): + """TeamUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TeamUser: + """Test TeamUser + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TeamUser` + """ + model = TeamUser() + if include_optional: + return TeamUser( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + can_edit_user_attributes = True, + cluster_administrator = False, + is_federated_user = False + ) + else: + return TeamUser( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + ) + """ + + def testTeamUser(self): + """Test TeamUser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_team_v1.py b/test/test_team_v1.py new file mode 100644 index 0000000..56827f8 --- /dev/null +++ b/test/test_team_v1.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.team_v1 import TeamV1 + +class TestTeamV1(unittest.TestCase): + """TeamV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TeamV1: + """Test TeamV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TeamV1` + """ + model = TeamV1() + if include_optional: + return TeamV1( + id = '', + label = '', + users = [ + corellium.models.user.User( + id = '', + label = '', + name = '', + email = '', + administrator = True, + can_edit_user_attributes = True, + cluster_administrator = True, ) + ] + ) + else: + return TeamV1( + id = '', + label = '', + ) + """ + + def testTeamV1(self): + """Test TeamV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teams_api.py b/test/test_teams_api.py new file mode 100644 index 0000000..cd9ccab --- /dev/null +++ b/test/test_teams_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.teams_api import TeamsApi + + +class TestTeamsApi(unittest.TestCase): + """TeamsApi unit test stubs""" + + def setUp(self) -> None: + self.api = TeamsApi() + + def tearDown(self) -> None: + pass + + def test_v3_add_user_to_team(self) -> None: + """Test case for v3_add_user_to_team + + Add a user to a team + """ + pass + + def test_v3_create_team(self) -> None: + """Test case for v3_create_team + + Create a team + """ + pass + + def test_v3_delete_team(self) -> None: + """Test case for v3_delete_team + + Delete a team + """ + pass + + def test_v3_list_teams(self) -> None: + """Test case for v3_list_teams + + List teams + """ + pass + + def test_v3_remove_user_from_team(self) -> None: + """Test case for v3_remove_user_from_team + + Remove a user from a team + """ + pass + + def test_v3_update_team(self) -> None: + """Test case for v3_update_team + + Update a team + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teams_list_response.py b/test/test_teams_list_response.py new file mode 100644 index 0000000..dd89646 --- /dev/null +++ b/test/test_teams_list_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.teams_list_response import TeamsListResponse + +class TestTeamsListResponse(unittest.TestCase): + """TeamsListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TeamsListResponse: + """Test TeamsListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TeamsListResponse` + """ + model = TeamsListResponse() + if include_optional: + return TeamsListResponse( + results = [ + corellium.models.team.Team( + id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', + label = 'Mobile QA', + users = [ + corellium.models.team_user.TeamUser( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + can_edit_user_attributes = True, + cluster_administrator = False, + is_federated_user = False, ) + ], ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return TeamsListResponse( + results = [ + corellium.models.team.Team( + id = '089c8ffd-ca4d-4d35-80ab-0847d18b7213', + label = 'Mobile QA', + users = [ + corellium.models.team_user.TeamUser( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + label = 'Jane Doe', + name = 'jane.doe', + email = 'jane.doe@example.com', + administrator = True, + can_edit_user_attributes = True, + cluster_administrator = False, + is_federated_user = False, ) + ], ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testTeamsListResponse(self): + """Test TeamsListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_teams_v1_api.py b/test/test_teams_v1_api.py new file mode 100644 index 0000000..165cc37 --- /dev/null +++ b/test/test_teams_v1_api.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.teams_v1_api import TeamsV1Api + + +class TestTeamsV1Api(unittest.TestCase): + """TeamsV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = TeamsV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_add_user_to_team(self) -> None: + """Test case for v1_add_user_to_team + + Add user to team + """ + pass + + def test_v1_remove_user_from_team(self) -> None: + """Test case for v1_remove_user_from_team + + Remove user from team + """ + pass + + def test_v1_team_change(self) -> None: + """Test case for v1_team_change + + Update team + """ + pass + + def test_v1_team_create(self) -> None: + """Test case for v1_team_create + + Create team + """ + pass + + def test_v1_team_delete(self) -> None: + """Test case for v1_team_delete + + Delete team + """ + pass + + def test_v1_teams(self) -> None: + """Test case for v1_teams + + Get teams + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_test_assessment_dto.py b/test/test_test_assessment_dto.py deleted file mode 100644 index f440317..0000000 --- a/test/test_test_assessment_dto.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.test_assessment_dto import TestAssessmentDto # noqa: E501 -from corellium_api.rest import ApiException - -class TestTestAssessmentDto(unittest.TestCase): - """TestAssessmentDto unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test TestAssessmentDto - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.test_assessment_dto.TestAssessmentDto() # noqa: E501 - if include_optional : - return TestAssessmentDto( - invert = True, - grep = 'masvs-storage-2-android-8' - ) - else : - return TestAssessmentDto( - ) - - def testTestAssessmentDto(self): - """Test TestAssessmentDto""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_test_assessment_input.py b/test/test_test_assessment_input.py new file mode 100644 index 0000000..f1411c4 --- /dev/null +++ b/test/test_test_assessment_input.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.test_assessment_input import TestAssessmentInput + +class TestTestAssessmentInput(unittest.TestCase): + """TestAssessmentInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestAssessmentInput: + """Test TestAssessmentInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestAssessmentInput` + """ + model = TestAssessmentInput() + if include_optional: + return TestAssessmentInput( + invert = True, + grep = 'masvs-storage-2-android-8' + ) + else: + return TestAssessmentInput( + ) + """ + + def testTestAssessmentInput(self): + """Test TestAssessmentInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_text_input.py b/test/test_text_input.py index 2b17871..f45d6c9 100644 --- a/test/test_text_input.py +++ b/test/test_text_input.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.text_input import TextInput # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.text_input import TextInput class TestTextInput(unittest.TestCase): """TextInput unit test stubs""" @@ -28,26 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TextInput: """Test TextInput - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.text_input.TextInput() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `TextInput` + """ + model = TextInput() + if include_optional: return TextInput( - required = '', - key_duration = 56 + text = '' ) - else : + else: return TextInput( - required = '', ) + """ def testTextInput(self): """Test TextInput""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_text_input_request.py b/test/test_text_input_request.py new file mode 100644 index 0000000..eb6c0ae --- /dev/null +++ b/test/test_text_input_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.text_input_request import TextInputRequest + +class TestTextInputRequest(unittest.TestCase): + """TextInputRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TextInputRequest: + """Test TextInputRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TextInputRequest` + """ + model = TextInputRequest() + if include_optional: + return TextInputRequest( + text = 'Hello, world!', + key_duration = 150 + ) + else: + return TextInputRequest( + text = 'Hello, world!', + ) + """ + + def testTextInputRequest(self): + """Test TextInputRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_text_input_request_v1.py b/test/test_text_input_request_v1.py new file mode 100644 index 0000000..cbee1c2 --- /dev/null +++ b/test/test_text_input_request_v1.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.text_input_request_v1 import TextInputRequestV1 + +class TestTextInputRequestV1(unittest.TestCase): + """TextInputRequestV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TextInputRequestV1: + """Test TextInputRequestV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TextInputRequestV1` + """ + model = TextInputRequestV1() + if include_optional: + return TextInputRequestV1( + required = '', + key_duration = 56 + ) + else: + return TextInputRequestV1( + required = '', + ) + """ + + def testTextInputRequestV1(self): + """Test TextInputRequestV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_token.py b/test/test_token.py index ba00220..a485c5a 100644 --- a/test/test_token.py +++ b/test/test_token.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.token import Token # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.token import Token class TestToken(unittest.TestCase): """Token unit test stubs""" @@ -28,24 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Token: """Test Token - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.token.Token() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Token` + """ + model = Token() + if include_optional: return Token( - token = '' + token = '' ) - else : + else: return Token( + token = '', ) + """ def testToken(self): """Test Token""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_token_v1.py b/test/test_token_v1.py new file mode 100644 index 0000000..171bb00 --- /dev/null +++ b/test/test_token_v1.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.token_v1 import TokenV1 + +class TestTokenV1(unittest.TestCase): + """TokenV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenV1: + """Test TokenV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenV1` + """ + model = TokenV1() + if include_optional: + return TokenV1( + token = '' + ) + else: + return TokenV1( + ) + """ + + def testTokenV1(self): + """Test TokenV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_token_validate_body.py b/test/test_token_validate_body.py new file mode 100644 index 0000000..6dc2989 --- /dev/null +++ b/test/test_token_validate_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.token_validate_body import TokenValidateBody + +class TestTokenValidateBody(unittest.TestCase): + """TokenValidateBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenValidateBody: + """Test TokenValidateBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenValidateBody` + """ + model = TokenValidateBody() + if include_optional: + return TokenValidateBody( + token = '' + ) + else: + return TokenValidateBody( + token = '', + ) + """ + + def testTokenValidateBody(self): + """Test TokenValidateBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_totp_api.py b/test/test_totp_api.py new file mode 100644 index 0000000..a757196 --- /dev/null +++ b/test/test_totp_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.totp_api import TOTPApi + + +class TestTOTPApi(unittest.TestCase): + """TOTPApi unit test stubs""" + + def setUp(self) -> None: + self.api = TOTPApi() + + def tearDown(self) -> None: + pass + + def test_v3_disable_totp(self) -> None: + """Test case for v3_disable_totp + + Disable TOTP for this user + """ + pass + + def test_v3_enable_totp(self) -> None: + """Test case for v3_enable_totp + + Enable TOTP for this user + """ + pass + + def test_v3_generate_totp(self) -> None: + """Test case for v3_generate_totp + + Generate a TOTP secret + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_totp_disable_body.py b/test/test_totp_disable_body.py new file mode 100644 index 0000000..00cd4a5 --- /dev/null +++ b/test/test_totp_disable_body.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.totp_disable_body import TotpDisableBody + +class TestTotpDisableBody(unittest.TestCase): + """TotpDisableBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TotpDisableBody: + """Test TotpDisableBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TotpDisableBody` + """ + model = TotpDisableBody() + if include_optional: + return TotpDisableBody( + totp_token = '123456', + password = '' + ) + else: + return TotpDisableBody( + totp_token = '123456', + password = '', + ) + """ + + def testTotpDisableBody(self): + """Test TotpDisableBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_totp_enable_body.py b/test/test_totp_enable_body.py new file mode 100644 index 0000000..f086fe5 --- /dev/null +++ b/test/test_totp_enable_body.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.totp_enable_body import TotpEnableBody + +class TestTotpEnableBody(unittest.TestCase): + """TotpEnableBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TotpEnableBody: + """Test TotpEnableBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TotpEnableBody` + """ + model = TotpEnableBody() + if include_optional: + return TotpEnableBody( + secret = '', + totp_token = '123456', + password = '' + ) + else: + return TotpEnableBody( + secret = '', + totp_token = '123456', + password = '', + ) + """ + + def testTotpEnableBody(self): + """Test TotpEnableBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_totp_generate_response.py b/test/test_totp_generate_response.py new file mode 100644 index 0000000..901b787 --- /dev/null +++ b/test/test_totp_generate_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.totp_generate_response import TotpGenerateResponse + +class TestTotpGenerateResponse(unittest.TestCase): + """TotpGenerateResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TotpGenerateResponse: + """Test TotpGenerateResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TotpGenerateResponse` + """ + model = TotpGenerateResponse() + if include_optional: + return TotpGenerateResponse( + qr_code = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', + secret = '' + ) + else: + return TotpGenerateResponse( + qr_code = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', + secret = '', + ) + """ + + def testTotpGenerateResponse(self): + """Test TotpGenerateResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_touch_curve_input.py b/test/test_touch_curve_input.py index b0c7000..c08664e 100644 --- a/test/test_touch_curve_input.py +++ b/test/test_touch_curve_input.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.touch_curve_input import TouchCurveInput # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.touch_curve_input import TouchCurveInput class TestTouchCurveInput(unittest.TestCase): """TouchCurveInput unit test stubs""" @@ -28,43 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TouchCurveInput: """Test TouchCurveInput - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.touch_curve_input.TouchCurveInput() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `TouchCurveInput` + """ + model = TouchCurveInput() + if include_optional: return TouchCurveInput( - start = None, - end = None, - bezier_points = [ - corellium_api.models.finger_positions.FingerPositions() - ], - start_buttons = [ - null - ], - end_buttons = [ - null - ], - normalized = True, - wait = 56, - duration = 56 + start = None, + end = None ) - else : + else: return TouchCurveInput( - start = None, - end = None, - start_buttons = [ - null - ], - duration = 56, ) + """ def testTouchCurveInput(self): """Test TouchCurveInput""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_touch_curve_input_request.py b/test/test_touch_curve_input_request.py new file mode 100644 index 0000000..7149c3a --- /dev/null +++ b/test/test_touch_curve_input_request.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.touch_curve_input_request import TouchCurveInputRequest + +class TestTouchCurveInputRequest(unittest.TestCase): + """TouchCurveInputRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TouchCurveInputRequest: + """Test TouchCurveInputRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TouchCurveInputRequest` + """ + model = TouchCurveInputRequest() + if include_optional: + return TouchCurveInputRequest( + start = [[100,200]], + end = [[100,200]], + bezier_points = [[[150,250]]], + start_buttons = ["finger"], + end_buttons = ["finger"], + normalized = True, + wait = 100, + duration = 250 + ) + else: + return TouchCurveInputRequest( + start = [[100,200]], + end = [[100,200]], + start_buttons = ["finger"], + duration = 250, + ) + """ + + def testTouchCurveInputRequest(self): + """Test TouchCurveInputRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_touch_curve_input_request_v1.py b/test/test_touch_curve_input_request_v1.py new file mode 100644 index 0000000..589ae8e --- /dev/null +++ b/test/test_touch_curve_input_request_v1.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.touch_curve_input_request_v1 import TouchCurveInputRequestV1 + +class TestTouchCurveInputRequestV1(unittest.TestCase): + """TouchCurveInputRequestV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TouchCurveInputRequestV1: + """Test TouchCurveInputRequestV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TouchCurveInputRequestV1` + """ + model = TouchCurveInputRequestV1() + if include_optional: + return TouchCurveInputRequestV1( + start = corellium.models.finger_positions_v1.FingerPositionsV1(), + end = corellium.models.finger_positions_v1.FingerPositionsV1(), + bezier_points = [ + corellium.models.finger_positions_v1.FingerPositionsV1() + ], + start_buttons = [ + null + ], + end_buttons = [ + null + ], + normalized = True, + wait = 56, + duration = 56 + ) + else: + return TouchCurveInputRequestV1( + start = corellium.models.finger_positions_v1.FingerPositionsV1(), + end = corellium.models.finger_positions_v1.FingerPositionsV1(), + start_buttons = [ + null + ], + duration = 56, + ) + """ + + def testTouchCurveInputRequestV1(self): + """Test TouchCurveInputRequestV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_touch_input.py b/test/test_touch_input.py index e0b5fa8..0bab06d 100644 --- a/test/test_touch_input.py +++ b/test/test_touch_input.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.touch_input import TouchInput # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.touch_input import TouchInput class TestTouchInput(unittest.TestCase): """TouchInput unit test stubs""" @@ -28,30 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TouchInput: """Test TouchInput - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.touch_input.TouchInput() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `TouchInput` + """ + model = TouchInput() + if include_optional: return TouchInput( - position = None, - buttons = [ - null - ], - normalized = True, - wait = 56 + position = None ) - else : + else: return TouchInput( - position = None, ) + """ def testTouchInput(self): """Test TouchInput""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_touch_input_buttons_inner.py b/test/test_touch_input_buttons_inner.py deleted file mode 100644 index f0d3107..0000000 --- a/test/test_touch_input_buttons_inner.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.touch_input_buttons_inner import TouchInputButtonsInner # noqa: E501 -from corellium_api.rest import ApiException - -class TestTouchInputButtonsInner(unittest.TestCase): - """TouchInputButtonsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTouchInputButtonsInner(self): - """Test TouchInputButtonsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_touch_input_request.py b/test/test_touch_input_request.py new file mode 100644 index 0000000..5d8c34a --- /dev/null +++ b/test/test_touch_input_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.touch_input_request import TouchInputRequest + +class TestTouchInputRequest(unittest.TestCase): + """TouchInputRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TouchInputRequest: + """Test TouchInputRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TouchInputRequest` + """ + model = TouchInputRequest() + if include_optional: + return TouchInputRequest( + position = [[100,200]], + buttons = ["finger"], + normalized = True, + wait = 100 + ) + else: + return TouchInputRequest( + ) + """ + + def testTouchInputRequest(self): + """Test TouchInputRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_touch_input_request_v1.py b/test/test_touch_input_request_v1.py new file mode 100644 index 0000000..fe8dfb3 --- /dev/null +++ b/test/test_touch_input_request_v1.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.touch_input_request_v1 import TouchInputRequestV1 + +class TestTouchInputRequestV1(unittest.TestCase): + """TouchInputRequestV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TouchInputRequestV1: + """Test TouchInputRequestV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TouchInputRequestV1` + """ + model = TouchInputRequestV1() + if include_optional: + return TouchInputRequestV1( + position = corellium.models.finger_positions_v1.FingerPositionsV1(), + buttons = [ + null + ], + normalized = True, + wait = 56 + ) + else: + return TouchInputRequestV1( + ) + """ + + def testTouchInputRequestV1(self): + """Test TouchInputRequestV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_trial.py b/test/test_trial.py index 464695e..a8c37a0 100644 --- a/test/test_trial.py +++ b/test/test_trial.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.trial import Trial # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.trial import Trial class TestTrial(unittest.TestCase): """Trial unit test stubs""" @@ -28,27 +26,34 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> Trial: """Test Trial - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.trial.Trial() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `Trial` + """ + model = Trial() + if include_optional: return Trial( - default_duration = 1.337, - default_hours = 1.337, - default_devices = 1.337, - default_cores = 1.337 + default_duration = 30, + default_hours = 24, + default_devices = 24, + default_cores = 10 ) - else : + else: return Trial( + default_duration = 30, + default_hours = 24, + default_devices = 24, + default_cores = 10, ) + """ def testTrial(self): """Test Trial""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_trial_extension.py b/test/test_trial_extension.py index c5da3f8..729ed8f 100644 --- a/test/test_trial_extension.py +++ b/test/test_trial_extension.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.trial_extension import TrialExtension # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.trial_extension import TrialExtension class TestTrialExtension(unittest.TestCase): """TrialExtension unit test stubs""" @@ -28,27 +26,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TrialExtension: """Test TrialExtension - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.trial_extension.TrialExtension() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `TrialExtension` + """ + model = TrialExtension() + if include_optional: return TrialExtension( - duration = 1.337, - reason = '', - denied = True, - denied_reason = '' + duration = 7, + reason = 'Need more time to evaluate the platform.', + denied = True, + denied_reason = 'Trial already extended twice.' ) - else : + else: return TrialExtension( + duration = 7, ) + """ def testTrialExtension(self): """Test TrialExtension""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_trial_extension_v1.py b/test/test_trial_extension_v1.py new file mode 100644 index 0000000..60f39c3 --- /dev/null +++ b/test/test_trial_extension_v1.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.trial_extension_v1 import TrialExtensionV1 + +class TestTrialExtensionV1(unittest.TestCase): + """TrialExtensionV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TrialExtensionV1: + """Test TrialExtensionV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrialExtensionV1` + """ + model = TrialExtensionV1() + if include_optional: + return TrialExtensionV1( + duration = 1.337, + reason = '', + denied = True, + denied_reason = '' + ) + else: + return TrialExtensionV1( + ) + """ + + def testTrialExtensionV1(self): + """Test TrialExtensionV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_trial_request.py b/test/test_trial_request.py new file mode 100644 index 0000000..b67cfc6 --- /dev/null +++ b/test/test_trial_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.trial_request import TrialRequest + +class TestTrialRequest(unittest.TestCase): + """TrialRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TrialRequest: + """Test TrialRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrialRequest` + """ + model = TrialRequest() + if include_optional: + return TrialRequest( + email = 'jane.doe@example.com', + name = 'Jane Doe', + billing_type = 'credit', + billing_id = 'cus_xxxxxxxxxxxxxx', + code = 'TRIAL2026', + enterprise = False, + granted = True, + phone = '+1-555-0100', + country = 'United States', + organization = 'Acme Corp', + organization_type = 'enterprise', + metadata = {"name":"Jane Doe","company":"Acme Corp","malware":false,"research":true,"pentest":true}, + created_at = 1773479567000, + updated_at = 1773747665000, + display_status = 'Awaiting activation' + ) + else: + return TrialRequest( + email = 'jane.doe@example.com', + name = 'Jane Doe', + billing_type = 'credit', + billing_id = 'cus_xxxxxxxxxxxxxx', + code = 'TRIAL2026', + enterprise = False, + granted = True, + phone = '+1-555-0100', + country = 'United States', + organization = 'Acme Corp', + organization_type = 'enterprise', + metadata = {"name":"Jane Doe","company":"Acme Corp","malware":false,"research":true,"pentest":true}, + created_at = 1773479567000, + updated_at = 1773747665000, + display_status = 'Awaiting activation', + ) + """ + + def testTrialRequest(self): + """Test TrialRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_trial_request_detail.py b/test/test_trial_request_detail.py new file mode 100644 index 0000000..f35fc65 --- /dev/null +++ b/test/test_trial_request_detail.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.trial_request_detail import TrialRequestDetail + +class TestTrialRequestDetail(unittest.TestCase): + """TrialRequestDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TrialRequestDetail: + """Test TrialRequestDetail + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrialRequestDetail` + """ + model = TrialRequestDetail() + if include_optional: + return TrialRequestDetail( + identifier = 'a1e77521-9267-4e6d-8888-180f3a83ea3a', + metadata = {"name":"Jane Doe","company":"Acme Corp","malware":true,"pentest":true}, + organization = corellium.models.trial_request_detail_organization.TrialRequestDetail_organization( + name = 'Acme Corp', + country = 'US', ), + devices = [{"ios":"iOS"}], + use_cases = [{"malware":"Malware Research"}], + email = 'jane.doe@example.com', + name = 'Jane Doe', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'cus_Qabc123XyZ', + product_id = 'prod_ExampleProductId', + code = 'LAUNCH2026', + enterprise = True, + granted = True, + phone = '+1-555-123-4567', + country = 'US', + organization_type = 'individual', + industry = 'Software', + role = 'Security Engineer', + solution = 'Mobile App Security Testing', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + started_at = '2026-03-16T08:22:19Z', + granted_at = '2026-03-14T09:12:47Z', + denied_at = '2026-03-18T16:05:33Z', + plan_name = 'Enterprise Trial', + ends_at = '2027-01-15T00:00Z', + grant_method = 'sales', + duration = 14, + trial_units = 24, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z' + ) + else: + return TrialRequestDetail( + identifier = 'a1e77521-9267-4e6d-8888-180f3a83ea3a', + metadata = {"name":"Jane Doe","company":"Acme Corp","malware":true,"pentest":true}, + organization = corellium.models.trial_request_detail_organization.TrialRequestDetail_organization( + name = 'Acme Corp', + country = 'US', ), + devices = [{"ios":"iOS"}], + use_cases = [{"malware":"Malware Research"}], + email = 'jane.doe@example.com', + name = 'Jane Doe', + billing_type = 'prepaid', + billing_backend = 'stripe', + billing_id = 'cus_Qabc123XyZ', + product_id = 'prod_ExampleProductId', + code = 'LAUNCH2026', + enterprise = True, + granted = True, + phone = '+1-555-123-4567', + country = 'US', + organization_type = 'individual', + industry = 'Software', + role = 'Security Engineer', + solution = 'Mobile App Security Testing', + domain = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + started_at = '2026-03-16T08:22:19Z', + granted_at = '2026-03-14T09:12:47Z', + denied_at = '2026-03-18T16:05:33Z', + plan_name = 'Enterprise Trial', + ends_at = '2027-01-15T00:00Z', + grant_method = 'sales', + duration = 14, + trial_units = 24, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + ) + """ + + def testTrialRequestDetail(self): + """Test TrialRequestDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_trial_request_detail_organization.py b/test/test_trial_request_detail_organization.py new file mode 100644 index 0000000..aba78aa --- /dev/null +++ b/test/test_trial_request_detail_organization.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.trial_request_detail_organization import TrialRequestDetailOrganization + +class TestTrialRequestDetailOrganization(unittest.TestCase): + """TrialRequestDetailOrganization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TrialRequestDetailOrganization: + """Test TrialRequestDetailOrganization + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrialRequestDetailOrganization` + """ + model = TrialRequestDetailOrganization() + if include_optional: + return TrialRequestDetailOrganization( + name = 'Acme Corp', + country = 'US' + ) + else: + return TrialRequestDetailOrganization( + ) + """ + + def testTrialRequestDetailOrganization(self): + """Test TrialRequestDetailOrganization""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_trial_request_list_response.py b/test/test_trial_request_list_response.py new file mode 100644 index 0000000..ba6caba --- /dev/null +++ b/test/test_trial_request_list_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.trial_request_list_response import TrialRequestListResponse + +class TestTrialRequestListResponse(unittest.TestCase): + """TrialRequestListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TrialRequestListResponse: + """Test TrialRequestListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrialRequestListResponse` + """ + model = TrialRequestListResponse() + if include_optional: + return TrialRequestListResponse( + results = [ + corellium.models.trial_request.TrialRequest( + email = 'jane.doe@example.com', + name = 'Jane Doe', + billing_type = 'credit', + billing_id = 'cus_xxxxxxxxxxxxxx', + code = 'TRIAL2026', + enterprise = False, + granted = True, + phone = '+1-555-0100', + country = 'United States', + organization = 'Acme Corp', + organization_type = 'enterprise', + metadata = {"name":"Jane Doe","company":"Acme Corp","malware":false,"research":true,"pentest":true}, + created_at = 1773479567000, + updated_at = 1773747665000, + display_status = 'Awaiting activation', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return TrialRequestListResponse( + results = [ + corellium.models.trial_request.TrialRequest( + email = 'jane.doe@example.com', + name = 'Jane Doe', + billing_type = 'credit', + billing_id = 'cus_xxxxxxxxxxxxxx', + code = 'TRIAL2026', + enterprise = False, + granted = True, + phone = '+1-555-0100', + country = 'United States', + organization = 'Acme Corp', + organization_type = 'enterprise', + metadata = {"name":"Jane Doe","company":"Acme Corp","malware":false,"research":true,"pentest":true}, + created_at = 1773479567000, + updated_at = 1773747665000, + display_status = 'Awaiting activation', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testTrialRequestListResponse(self): + """Test TrialRequestListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_trial_request_metadata.py b/test/test_trial_request_metadata.py index b214f05..845441e 100644 --- a/test/test_trial_request_metadata.py +++ b/test/test_trial_request_metadata.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.trial_request_metadata import TrialRequestMetadata # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.trial_request_metadata import TrialRequestMetadata class TestTrialRequestMetadata(unittest.TestCase): """TrialRequestMetadata unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TrialRequestMetadata: """Test TrialRequestMetadata - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.trial_request_metadata.TrialRequestMetadata() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `TrialRequestMetadata` + """ + model = TrialRequestMetadata() + if include_optional: return TrialRequestMetadata( - name = '', - company = '', - malware = True, - research = True, - pentest = True, + name = '', + company = '', + malware = True, + research = True, + pentest = True, other = '' ) - else : + else: return TrialRequestMetadata( ) + """ def testTrialRequestMetadata(self): """Test TrialRequestMetadata""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_trial_request_options.py b/test/test_trial_request_options.py index 668edd1..d541c8f 100644 --- a/test/test_trial_request_options.py +++ b/test/test_trial_request_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.trial_request_options import TrialRequestOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.trial_request_options import TrialRequestOptions class TestTrialRequestOptions(unittest.TestCase): """TrialRequestOptions unit test stubs""" @@ -28,41 +26,44 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> TrialRequestOptions: """Test TrialRequestOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.trial_request_options.TrialRequestOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `TrialRequestOptions` + """ + model = TrialRequestOptions() + if include_optional: return TrialRequestOptions( - address = corellium_api.models.address.Address( + address = corellium.models.address.Address( address1 = '', address2 = '', city = '', country = '', postal_code = '', - state = '', ), - email = '', - name = '', - metadata = corellium_api.models.trial_request_metadata.TrialRequestMetadata( + state = '', ), + email = '', + name = '', + metadata = corellium.models.trial_request_metadata.TrialRequestMetadata( name = '', company = '', malware = True, research = True, pentest = True, - other = '', ), - enterprise = True, + other = '', ), + enterprise = True, token = '' ) - else : + else: return TrialRequestOptions( ) + """ def testTrialRequestOptions(self): """Test TrialRequestOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_trial_v1.py b/test/test_trial_v1.py new file mode 100644 index 0000000..9c87292 --- /dev/null +++ b/test/test_trial_v1.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.trial_v1 import TrialV1 + +class TestTrialV1(unittest.TestCase): + """TrialV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TrialV1: + """Test TrialV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TrialV1` + """ + model = TrialV1() + if include_optional: + return TrialV1( + default_duration = 1.337, + default_hours = 1.337, + default_devices = 1.337, + default_cores = 1.337 + ) + else: + return TrialV1( + ) + """ + + def testTrialV1(self): + """Test TrialV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unauthorized_error.py b/test/test_unauthorized_error.py new file mode 100644 index 0000000..664b3ab --- /dev/null +++ b/test/test_unauthorized_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'Access denied', + error_id = 'Unauthorized' + ) + else: + return UnauthorizedError( + error = 'Access denied', + error_id = 'Unauthorized', + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_uncancel_subscription_body.py b/test/test_uncancel_subscription_body.py new file mode 100644 index 0000000..e99984a --- /dev/null +++ b/test/test_uncancel_subscription_body.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.uncancel_subscription_body import UncancelSubscriptionBody + +class TestUncancelSubscriptionBody(unittest.TestCase): + """UncancelSubscriptionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UncancelSubscriptionBody: + """Test UncancelSubscriptionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UncancelSubscriptionBody` + """ + model = UncancelSubscriptionBody() + if include_optional: + return UncancelSubscriptionBody( + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba' + ) + else: + return UncancelSubscriptionBody( + ) + """ + + def testUncancelSubscriptionBody(self): + """Test UncancelSubscriptionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_assessment_dto.py b/test/test_update_assessment_dto.py deleted file mode 100644 index 9582ee1..0000000 --- a/test/test_update_assessment_dto.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.update_assessment_dto import UpdateAssessmentDto # noqa: E501 -from corellium_api.rest import ApiException - -class TestUpdateAssessmentDto(unittest.TestCase): - """UpdateAssessmentDto unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test UpdateAssessmentDto - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.update_assessment_dto.UpdateAssessmentDto() # noqa: E501 - if include_optional : - return UpdateAssessmentDto( - status = 'testing' - ) - else : - return UpdateAssessmentDto( - status = 'testing', - ) - - def testUpdateAssessmentDto(self): - """Test UpdateAssessmentDto""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update_assessment_input.py b/test/test_update_assessment_input.py new file mode 100644 index 0000000..1a61d5e --- /dev/null +++ b/test/test_update_assessment_input.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_assessment_input import UpdateAssessmentInput + +class TestUpdateAssessmentInput(unittest.TestCase): + """UpdateAssessmentInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateAssessmentInput: + """Test UpdateAssessmentInput + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateAssessmentInput` + """ + model = UpdateAssessmentInput() + if include_optional: + return UpdateAssessmentInput( + status = 'testing' + ) + else: + return UpdateAssessmentInput( + status = 'testing', + ) + """ + + def testUpdateAssessmentInput(self): + """Test UpdateAssessmentInput""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_domain_settings_response.py b/test/test_update_domain_settings_response.py new file mode 100644 index 0000000..01e4766 --- /dev/null +++ b/test/test_update_domain_settings_response.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_domain_settings_response import UpdateDomainSettingsResponse + +class TestUpdateDomainSettingsResponse(unittest.TestCase): + """UpdateDomainSettingsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDomainSettingsResponse: + """Test UpdateDomainSettingsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDomainSettingsResponse` + """ + model = UpdateDomainSettingsResponse() + if include_optional: + return UpdateDomainSettingsResponse( + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + settings = corellium.models.update_domain_settings_response_settings.UpdateDomainSettingsResponse_settings( + totp_required = True, ), + trial_extension = corellium.models.trial_extension.TrialExtension( + duration = 7, + reason = 'Need more time to evaluate the platform.', + denied = True, + denied_reason = 'Trial already extended twice.', ), + device_auto_shutdown = corellium.models.device_auto_shutdown_schema.DeviceAutoShutdownSchema( + enabled = True, + threshold = 10, ), + allowed_devices_filters = [ + corellium.models.allowed_devices_filter_schema.AllowedDevicesFilterSchema( + device_name = 'iphone15', + allowed_firmwares = [ + corellium.models.allowed_firmware_schema.AllowedFirmwareSchema( + version = '17.4.1', + build_id = '21E236', ) + ], ) + ], + webplayer = corellium.models.update_domain_settings_response_webplayer.UpdateDomainSettingsResponse_webplayer( + allowed_domains = ["app.example.com"], ), + snapshot_sharing_permissions = corellium.models.update_domain_settings_response_snapshot_sharing_permissions.UpdateDomainSettingsResponse_snapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True, ) + ) + else: + return UpdateDomainSettingsResponse( + domain_id = 'c29762d1-45d7-489d-a3a2-9dadc43978ba', + settings = corellium.models.update_domain_settings_response_settings.UpdateDomainSettingsResponse_settings( + totp_required = True, ), + ) + """ + + def testUpdateDomainSettingsResponse(self): + """Test UpdateDomainSettingsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_domain_settings_response_settings.py b/test/test_update_domain_settings_response_settings.py new file mode 100644 index 0000000..b6ede0b --- /dev/null +++ b/test/test_update_domain_settings_response_settings.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_domain_settings_response_settings import UpdateDomainSettingsResponseSettings + +class TestUpdateDomainSettingsResponseSettings(unittest.TestCase): + """UpdateDomainSettingsResponseSettings unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDomainSettingsResponseSettings: + """Test UpdateDomainSettingsResponseSettings + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDomainSettingsResponseSettings` + """ + model = UpdateDomainSettingsResponseSettings() + if include_optional: + return UpdateDomainSettingsResponseSettings( + totp_required = True + ) + else: + return UpdateDomainSettingsResponseSettings( + ) + """ + + def testUpdateDomainSettingsResponseSettings(self): + """Test UpdateDomainSettingsResponseSettings""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_domain_settings_response_snapshot_sharing_permissions.py b/test/test_update_domain_settings_response_snapshot_sharing_permissions.py new file mode 100644 index 0000000..3a5ed14 --- /dev/null +++ b/test/test_update_domain_settings_response_snapshot_sharing_permissions.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_domain_settings_response_snapshot_sharing_permissions import UpdateDomainSettingsResponseSnapshotSharingPermissions + +class TestUpdateDomainSettingsResponseSnapshotSharingPermissions(unittest.TestCase): + """UpdateDomainSettingsResponseSnapshotSharingPermissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDomainSettingsResponseSnapshotSharingPermissions: + """Test UpdateDomainSettingsResponseSnapshotSharingPermissions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDomainSettingsResponseSnapshotSharingPermissions` + """ + model = UpdateDomainSettingsResponseSnapshotSharingPermissions() + if include_optional: + return UpdateDomainSettingsResponseSnapshotSharingPermissions( + cloud_enabled = True, + domain_enabled = True, + public_link = True, + domain_restricted_link = True, + password_public_link = True, + email_invite = True + ) + else: + return UpdateDomainSettingsResponseSnapshotSharingPermissions( + ) + """ + + def testUpdateDomainSettingsResponseSnapshotSharingPermissions(self): + """Test UpdateDomainSettingsResponseSnapshotSharingPermissions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_domain_settings_response_webplayer.py b/test/test_update_domain_settings_response_webplayer.py new file mode 100644 index 0000000..68759dc --- /dev/null +++ b/test/test_update_domain_settings_response_webplayer.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_domain_settings_response_webplayer import UpdateDomainSettingsResponseWebplayer + +class TestUpdateDomainSettingsResponseWebplayer(unittest.TestCase): + """UpdateDomainSettingsResponseWebplayer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDomainSettingsResponseWebplayer: + """Test UpdateDomainSettingsResponseWebplayer + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDomainSettingsResponseWebplayer` + """ + model = UpdateDomainSettingsResponseWebplayer() + if include_optional: + return UpdateDomainSettingsResponseWebplayer( + allowed_domains = ["app.example.com"] + ) + else: + return UpdateDomainSettingsResponseWebplayer( + ) + """ + + def testUpdateDomainSettingsResponseWebplayer(self): + """Test UpdateDomainSettingsResponseWebplayer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_domain_welcome_message_request.py b/test/test_update_domain_welcome_message_request.py new file mode 100644 index 0000000..c770092 --- /dev/null +++ b/test/test_update_domain_welcome_message_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_domain_welcome_message_request import UpdateDomainWelcomeMessageRequest + +class TestUpdateDomainWelcomeMessageRequest(unittest.TestCase): + """UpdateDomainWelcomeMessageRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDomainWelcomeMessageRequest: + """Test UpdateDomainWelcomeMessageRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDomainWelcomeMessageRequest` + """ + model = UpdateDomainWelcomeMessageRequest() + if include_optional: + return UpdateDomainWelcomeMessageRequest( + message = '', + enabled = True + ) + else: + return UpdateDomainWelcomeMessageRequest( + ) + """ + + def testUpdateDomainWelcomeMessageRequest(self): + """Test UpdateDomainWelcomeMessageRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_extension.py b/test/test_update_extension.py index 3d08518..bb4e9df 100644 --- a/test/test_update_extension.py +++ b/test/test_update_extension.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.update_extension import UpdateExtension # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.update_extension import UpdateExtension class TestUpdateExtension(unittest.TestCase): """UpdateExtension unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UpdateExtension: """Test UpdateExtension - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.update_extension.UpdateExtension() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UpdateExtension` + """ + model = UpdateExtension() + if include_optional: return UpdateExtension( enabled = True ) - else : + else: return UpdateExtension( ) + """ def testUpdateExtension(self): """Test UpdateExtension""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_update_extension_body.py b/test/test_update_extension_body.py new file mode 100644 index 0000000..8a6575f --- /dev/null +++ b/test/test_update_extension_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_extension_body import UpdateExtensionBody + +class TestUpdateExtensionBody(unittest.TestCase): + """UpdateExtensionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateExtensionBody: + """Test UpdateExtensionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateExtensionBody` + """ + model = UpdateExtensionBody() + if include_optional: + return UpdateExtensionBody( + enabled = False + ) + else: + return UpdateExtensionBody( + enabled = False, + ) + """ + + def testUpdateExtensionBody(self): + """Test UpdateExtensionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_hook_body.py b/test/test_update_hook_body.py new file mode 100644 index 0000000..e09bde6 --- /dev/null +++ b/test/test_update_hook_body.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_hook_body import UpdateHookBody + +class TestUpdateHookBody(unittest.TestCase): + """UpdateHookBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateHookBody: + """Test UpdateHookBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateHookBody` + """ + model = UpdateHookBody() + if include_optional: + return UpdateHookBody( + label = 'Bypass jailbreak detection', + address = '0x1000042a4', + patch = 'return 0;', + patch_type = 'csmfcc', + enabled = False + ) + else: + return UpdateHookBody( + ) + """ + + def testUpdateHookBody(self): + """Test UpdateHookBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_interconnect_body.py b/test/test_update_interconnect_body.py new file mode 100644 index 0000000..c5c8892 --- /dev/null +++ b/test/test_update_interconnect_body.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_interconnect_body import UpdateInterconnectBody + +class TestUpdateInterconnectBody(unittest.TestCase): + """UpdateInterconnectBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateInterconnectBody: + """Test UpdateInterconnectBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateInterconnectBody` + """ + model = UpdateInterconnectBody() + if include_optional: + return UpdateInterconnectBody( + name = '', + interfaces = [ + None + ] + ) + else: + return UpdateInterconnectBody( + name = '', + interfaces = [ + None + ], + ) + """ + + def testUpdateInterconnectBody(self): + """Test UpdateInterconnectBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_interconnect_request.py b/test/test_update_interconnect_request.py deleted file mode 100644 index 4b7313f..0000000 --- a/test/test_update_interconnect_request.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Corellium API - - REST API to manage your virtual devices. # noqa: E501 - - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import corellium_api -from corellium_api.models.update_interconnect_request import UpdateInterconnectRequest # noqa: E501 -from corellium_api.rest import ApiException - -class TestUpdateInterconnectRequest(unittest.TestCase): - """UpdateInterconnectRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test UpdateInterconnectRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = corellium_api.models.update_interconnect_request.UpdateInterconnectRequest() # noqa: E501 - if include_optional : - return UpdateInterconnectRequest( - name = '', - interfaces = [ - None - ], - interfaces = '' - ) - else : - return UpdateInterconnectRequest( - ) - - def testUpdateInterconnectRequest(self): - """Test UpdateInterconnectRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update_interconnect_v3_body.py b/test/test_update_interconnect_v3_body.py new file mode 100644 index 0000000..e52cf21 --- /dev/null +++ b/test/test_update_interconnect_v3_body.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_interconnect_v3_body import UpdateInterconnectV3Body + +class TestUpdateInterconnectV3Body(unittest.TestCase): + """UpdateInterconnectV3Body unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateInterconnectV3Body: + """Test UpdateInterconnectV3Body + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateInterconnectV3Body` + """ + model = UpdateInterconnectV3Body() + if include_optional: + return UpdateInterconnectV3Body( + name = 'vpn-gateway', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ], + type = 'hub', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + protocol = 'can' + ) + else: + return UpdateInterconnectV3Body( + name = 'vpn-gateway', + interfaces = [ + corellium.models.interfaces_schema_inner.InterfacesSchema_inner( + device_id = 'f7f9832a-f824-416f-a5ea-4adfe34754b5', + interface_id = 'eth0:1/2', ) + ], + ) + """ + + def testUpdateInterconnectV3Body(self): + """Test UpdateInterconnectV3Body""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_network_connection_body.py b/test/test_update_network_connection_body.py new file mode 100644 index 0000000..fc3f2cf --- /dev/null +++ b/test/test_update_network_connection_body.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_network_connection_body import UpdateNetworkConnectionBody + +class TestUpdateNetworkConnectionBody(unittest.TestCase): + """UpdateNetworkConnectionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateNetworkConnectionBody: + """Test UpdateNetworkConnectionBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateNetworkConnectionBody` + """ + model = UpdateNetworkConnectionBody() + if include_optional: + return UpdateNetworkConnectionBody( + name = 'office-vpn', + config = None, + force = True + ) + else: + return UpdateNetworkConnectionBody( + name = 'office-vpn', + ) + """ + + def testUpdateNetworkConnectionBody(self): + """Test UpdateNetworkConnectionBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_network_connection_options.py b/test/test_update_network_connection_options.py index 3f65497..09a959c 100644 --- a/test/test_update_network_connection_options.py +++ b/test/test_update_network_connection_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.update_network_connection_options import UpdateNetworkConnectionOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.update_network_connection_options import UpdateNetworkConnectionOptions class TestUpdateNetworkConnectionOptions(unittest.TestCase): """UpdateNetworkConnectionOptions unit test stubs""" @@ -28,26 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UpdateNetworkConnectionOptions: """Test UpdateNetworkConnectionOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.update_network_connection_options.UpdateNetworkConnectionOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UpdateNetworkConnectionOptions` + """ + model = UpdateNetworkConnectionOptions() + if include_optional: return UpdateNetworkConnectionOptions( - name = '', - config = None + name = '', + config = corellium.models.update_network_connection_options_config.UpdateNetworkConnectionOptions_config(), + force = True ) - else : + else: return UpdateNetworkConnectionOptions( name = '', ) + """ def testUpdateNetworkConnectionOptions(self): """Test UpdateNetworkConnectionOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_update_network_connection_options_config.py b/test/test_update_network_connection_options_config.py new file mode 100644 index 0000000..d8be6c3 --- /dev/null +++ b/test/test_update_network_connection_options_config.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_network_connection_options_config import UpdateNetworkConnectionOptionsConfig + +class TestUpdateNetworkConnectionOptionsConfig(unittest.TestCase): + """UpdateNetworkConnectionOptionsConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateNetworkConnectionOptionsConfig: + """Test UpdateNetworkConnectionOptionsConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateNetworkConnectionOptionsConfig` + """ + model = UpdateNetworkConnectionOptionsConfig() + if include_optional: + return UpdateNetworkConnectionOptionsConfig( + username = '', + password = '', + config = '', + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + gateway = '', + network = '', + dns_servers = [ + '' + ] + ) + else: + return UpdateNetworkConnectionOptionsConfig( + config = '', + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + ) + """ + + def testUpdateNetworkConnectionOptionsConfig(self): + """Test UpdateNetworkConnectionOptionsConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_own_profile_body.py b/test/test_update_own_profile_body.py new file mode 100644 index 0000000..062f534 --- /dev/null +++ b/test/test_update_own_profile_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_own_profile_body import UpdateOwnProfileBody + +class TestUpdateOwnProfileBody(unittest.TestCase): + """UpdateOwnProfileBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateOwnProfileBody: + """Test UpdateOwnProfileBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateOwnProfileBody` + """ + model = UpdateOwnProfileBody() + if include_optional: + return UpdateOwnProfileBody( + label = 'Jane Doe' + ) + else: + return UpdateOwnProfileBody( + label = 'Jane Doe', + ) + """ + + def testUpdateOwnProfileBody(self): + """Test UpdateOwnProfileBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_team_body.py b/test/test_update_team_body.py new file mode 100644 index 0000000..146bff1 --- /dev/null +++ b/test/test_update_team_body.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_team_body import UpdateTeamBody + +class TestUpdateTeamBody(unittest.TestCase): + """UpdateTeamBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateTeamBody: + """Test UpdateTeamBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateTeamBody` + """ + model = UpdateTeamBody() + if include_optional: + return UpdateTeamBody( + name = 'Mobile QA' + ) + else: + return UpdateTeamBody( + ) + """ + + def testUpdateTeamBody(self): + """Test UpdateTeamBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_trial_request_body.py b/test/test_update_trial_request_body.py new file mode 100644 index 0000000..acdee20 --- /dev/null +++ b/test/test_update_trial_request_body.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.update_trial_request_body import UpdateTrialRequestBody + +class TestUpdateTrialRequestBody(unittest.TestCase): + """UpdateTrialRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateTrialRequestBody: + """Test UpdateTrialRequestBody + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateTrialRequestBody` + """ + model = UpdateTrialRequestBody() + if include_optional: + return UpdateTrialRequestBody( + extension_days = 14, + extension_hours = 24 + ) + else: + return UpdateTrialRequestBody( + ) + """ + + def testUpdateTrialRequestBody(self): + """Test UpdateTrialRequestBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_trial_request_params.py b/test/test_update_trial_request_params.py index 758d8ed..4208f18 100644 --- a/test/test_update_trial_request_params.py +++ b/test/test_update_trial_request_params.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.update_trial_request_params import UpdateTrialRequestParams # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.update_trial_request_params import UpdateTrialRequestParams class TestUpdateTrialRequestParams(unittest.TestCase): """UpdateTrialRequestParams unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UpdateTrialRequestParams: """Test UpdateTrialRequestParams - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.update_trial_request_params.UpdateTrialRequestParams() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UpdateTrialRequestParams` + """ + model = UpdateTrialRequestParams() + if include_optional: return UpdateTrialRequestParams( - extension_days = 1.337, + extension_days = 1.337, extension_hours = 1.337 ) - else : + else: return UpdateTrialRequestParams( ) + """ def testUpdateTrialRequestParams(self): """Test UpdateTrialRequestParams""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_upload_size_error.py b/test/test_upload_size_error.py new file mode 100644 index 0000000..a636fe8 --- /dev/null +++ b/test/test_upload_size_error.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.upload_size_error import UploadSizeError + +class TestUploadSizeError(unittest.TestCase): + """UploadSizeError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UploadSizeError: + """Test UploadSizeError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UploadSizeError` + """ + model = UploadSizeError() + if include_optional: + return UploadSizeError( + error = 'Storage quota exceeded', + error_id = 'UploadSizeError', + var_field = 'storageQuota' + ) + else: + return UploadSizeError( + error = 'Storage quota exceeded', + error_id = 'UploadSizeError', + ) + """ + + def testUploadSizeError(self): + """Test UploadSizeError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user.py b/test/test_user.py index fb0219b..889ac81 100644 --- a/test/test_user.py +++ b/test/test_user.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.user import User # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.user import User class TestUser(unittest.TestCase): """User unit test stubs""" @@ -28,34 +26,37 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> User: """Test User - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.user.User() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `User` + """ + model = User() + if include_optional: return User( - id = '', - label = '', - name = '', - email = '', - administrator = True, - can_edit_user_attributes = True, + id = '', + label = '', + name = '', + email = '', + administrator = True, + can_edit_user_attributes = True, cluster_administrator = True ) - else : + else: return User( id = '', label = '', name = '', email = '', ) + """ def testUser(self): """Test User""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_create.py b/test/test_user_create.py index d354d86..128caaa 100644 --- a/test/test_user_create.py +++ b/test/test_user_create.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.user_create import UserCreate # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.user_create import UserCreate class TestUserCreate(unittest.TestCase): """UserCreate unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UserCreate: """Test UserCreate - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.user_create.UserCreate() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UserCreate` + """ + model = UserCreate() + if include_optional: return UserCreate( - name = '', - label = '', - password = '', - email = '', - administrator = True, + name = '', + label = '', + password = '', + email = '', + administrator = True, cluster_administrator = True ) - else : + else: return UserCreate( ) + """ def testUserCreate(self): """Test UserCreate""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_create_return.py b/test/test_user_create_return.py index c42fb3a..885c034 100644 --- a/test/test_user_create_return.py +++ b/test/test_user_create_return.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.user_create_return import UserCreateReturn # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.user_create_return import UserCreateReturn class TestUserCreateReturn(unittest.TestCase): """UserCreateReturn unit test stubs""" @@ -28,24 +26,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UserCreateReturn: """Test UserCreateReturn - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.user_create_return.UserCreateReturn() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UserCreateReturn` + """ + model = UserCreateReturn() + if include_optional: return UserCreateReturn( id = '' ) - else : + else: return UserCreateReturn( ) + """ def testUserCreateReturn(self): """Test UserCreateReturn""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_created.py b/test/test_user_created.py new file mode 100644 index 0000000..ac257e3 --- /dev/null +++ b/test/test_user_created.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.user_created import UserCreated + +class TestUserCreated(unittest.TestCase): + """UserCreated unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserCreated: + """Test UserCreated + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserCreated` + """ + model = UserCreated() + if include_optional: + return UserCreated( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' + ) + else: + return UserCreated( + id = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + ) + """ + + def testUserCreated(self): + """Test UserCreated""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_error.py b/test/test_user_error.py index 09a60ec..580f76b 100644 --- a/test/test_user_error.py +++ b/test/test_user_error.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.user_error import UserError # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.user_error import UserError class TestUserError(unittest.TestCase): """UserError unit test stubs""" @@ -28,28 +26,34 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UserError: """Test UserError - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.user_error.UserError() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UserError` + """ + model = UserError() + if include_optional: return UserError( - error = '', - error_id = 'UserError', - field = '' + error = 'Invalid button requested to be held', + error_id = 'UserError', + var_field = 'inputButtons', + validator = 'isIn', + project_ids = ["1c41b1bc-4f53-48a8-b690-ad30611e1960"], + missing_fw_assets = ["https://example.com/firmware-assets/asset.bin"] ) - else : + else: return UserError( - error = '', + error = 'Invalid button requested to be held', error_id = 'UserError', ) + """ def testUserError(self): """Test UserError""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_error_item.py b/test/test_user_error_item.py new file mode 100644 index 0000000..475595f --- /dev/null +++ b/test/test_user_error_item.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.user_error_item import UserErrorItem + +class TestUserErrorItem(unittest.TestCase): + """UserErrorItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserErrorItem: + """Test UserErrorItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserErrorItem` + """ + model = UserErrorItem() + if include_optional: + return UserErrorItem( + error = '', + error_id = 'UserError', + var_field = '', + validator = '', + project_ids = [ + '' + ] + ) + else: + return UserErrorItem( + error = '', + error_id = 'UserError', + ) + """ + + def testUserErrorItem(self): + """Test UserErrorItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_error_response.py b/test/test_user_error_response.py new file mode 100644 index 0000000..45b1eef --- /dev/null +++ b/test/test_user_error_response.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.user_error_response import UserErrorResponse + +class TestUserErrorResponse(unittest.TestCase): + """UserErrorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserErrorResponse: + """Test UserErrorResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserErrorResponse` + """ + model = UserErrorResponse() + if include_optional: + return UserErrorResponse( + error = 'One or more fields were rejected', + error_id = 'UserErrors', + var_field = 'inputButtons', + validator = 'isIn', + project_ids = [1c41b1bc-4f53-48a8-b690-ad30611e1960], + missing_fw_assets = [https://example.com/firmware-assets/asset.bin], + errors = [ + corellium.models.user_error.UserError( + error = 'Invalid button requested to be held', + error_id = 'UserError', + field = 'inputButtons', + validator = 'isIn', + project_ids = ["1c41b1bc-4f53-48a8-b690-ad30611e1960"], + missing_fw_assets = ["https://example.com/firmware-assets/asset.bin"], ) + ] + ) + else: + return UserErrorResponse( + error = 'One or more fields were rejected', + error_id = 'UserErrors', + errors = [ + corellium.models.user_error.UserError( + error = 'Invalid button requested to be held', + error_id = 'UserError', + field = 'inputButtons', + validator = 'isIn', + project_ids = ["1c41b1bc-4f53-48a8-b690-ad30611e1960"], + missing_fw_assets = ["https://example.com/firmware-assets/asset.bin"], ) + ], + ) + """ + + def testUserErrorResponse(self): + """Test UserErrorResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_error_v1.py b/test/test_user_error_v1.py new file mode 100644 index 0000000..8567f2a --- /dev/null +++ b/test/test_user_error_v1.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.user_error_v1 import UserErrorV1 + +class TestUserErrorV1(unittest.TestCase): + """UserErrorV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserErrorV1: + """Test UserErrorV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserErrorV1` + """ + model = UserErrorV1() + if include_optional: + return UserErrorV1( + error = '', + error_id = 'UserErrors', + var_field = '', + validator = '', + project_ids = [ + '' + ], + errors = [ + corellium.models.user_error_item.UserErrorItem( + error = '', + error_id = 'UserError', + field = '', + validator = '', + project_ids = [ + '' + ], ) + ] + ) + else: + return UserErrorV1( + error = '', + error_id = 'UserErrors', + errors = [ + corellium.models.user_error_item.UserErrorItem( + error = '', + error_id = 'UserError', + field = '', + validator = '', + project_ids = [ + '' + ], ) + ], + ) + """ + + def testUserErrorV1(self): + """Test UserErrorV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_errors.py b/test/test_user_errors.py new file mode 100644 index 0000000..6ec310a --- /dev/null +++ b/test/test_user_errors.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.user_errors import UserErrors + +class TestUserErrors(unittest.TestCase): + """UserErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserErrors: + """Test UserErrors + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserErrors` + """ + model = UserErrors() + if include_optional: + return UserErrors( + error = 'One or more fields were rejected', + error_id = 'UserErrors', + errors = [ + corellium.models.user_error.UserError( + error = 'Invalid button requested to be held', + error_id = 'UserError', + field = 'inputButtons', + validator = 'isIn', + project_ids = ["1c41b1bc-4f53-48a8-b690-ad30611e1960"], + missing_fw_assets = ["https://example.com/firmware-assets/asset.bin"], ) + ] + ) + else: + return UserErrors( + error = 'One or more fields were rejected', + error_id = 'UserErrors', + errors = [ + corellium.models.user_error.UserError( + error = 'Invalid button requested to be held', + error_id = 'UserError', + field = 'inputButtons', + validator = 'isIn', + project_ids = ["1c41b1bc-4f53-48a8-b690-ad30611e1960"], + missing_fw_assets = ["https://example.com/firmware-assets/asset.bin"], ) + ], + ) + """ + + def testUserErrors(self): + """Test UserErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_errors_v1.py b/test/test_user_errors_v1.py new file mode 100644 index 0000000..6839aa4 --- /dev/null +++ b/test/test_user_errors_v1.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.user_errors_v1 import UserErrorsV1 + +class TestUserErrorsV1(unittest.TestCase): + """UserErrorsV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserErrorsV1: + """Test UserErrorsV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserErrorsV1` + """ + model = UserErrorsV1() + if include_optional: + return UserErrorsV1( + error = '', + error_id = 'UserErrors', + errors = [ + corellium.models.user_error_item.UserErrorItem( + error = '', + error_id = 'UserError', + field = '', + validator = '', + project_ids = [ + '' + ], ) + ] + ) + else: + return UserErrorsV1( + error = '', + error_id = 'UserErrors', + errors = [ + corellium.models.user_error_item.UserErrorItem( + error = '', + error_id = 'UserError', + field = '', + validator = '', + project_ids = [ + '' + ], ) + ], + ) + """ + + def testUserErrorsV1(self): + """Test UserErrorsV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_snapshots.py b/test/test_user_snapshots.py index 27cbb63..c6d3731 100644 --- a/test/test_user_snapshots.py +++ b/test/test_user_snapshots.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.user_snapshots import UserSnapshots # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.user_snapshots import UserSnapshots class TestUserSnapshots(unittest.TestCase): """UserSnapshots unit test stubs""" @@ -28,59 +26,62 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UserSnapshots: """Test UserSnapshots - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.user_snapshots.UserSnapshots() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UserSnapshots` + """ + model = UserSnapshots() + if include_optional: return UserSnapshots( - shared_with_user = corellium_api.models.shared_snapshots_info.SharedSnapshotsInfo( + shared_with_user = corellium.models.shared_snapshots_info.SharedSnapshotsInfo( id = '', name = '', model = '', shared_on = 1.337, shared_with_member = '', - shared_by = corellium_api.models.snapshot_owner.SnapshotOwner( + shared_by = corellium.models.snapshot_owner_v1.SnapshotOwnerV1( name = '', - email = '', ), ), - shared_by_user = corellium_api.models.shared_snapshots_info.SharedSnapshotsInfo( + email = '', ), ), + shared_by_user = corellium.models.shared_snapshots_info.SharedSnapshotsInfo( id = '', name = '', model = '', shared_on = 1.337, shared_with_member = '', - shared_by = corellium_api.models.snapshot_owner.SnapshotOwner( + shared_by = corellium.models.snapshot_owner_v1.SnapshotOwnerV1( name = '', email = '', ), ) ) - else : + else: return UserSnapshots( - shared_with_user = corellium_api.models.shared_snapshots_info.SharedSnapshotsInfo( + shared_with_user = corellium.models.shared_snapshots_info.SharedSnapshotsInfo( id = '', name = '', model = '', shared_on = 1.337, shared_with_member = '', - shared_by = corellium_api.models.snapshot_owner.SnapshotOwner( + shared_by = corellium.models.snapshot_owner_v1.SnapshotOwnerV1( name = '', email = '', ), ), - shared_by_user = corellium_api.models.shared_snapshots_info.SharedSnapshotsInfo( + shared_by_user = corellium.models.shared_snapshots_info.SharedSnapshotsInfo( id = '', name = '', model = '', shared_on = 1.337, shared_with_member = '', - shared_by = corellium_api.models.snapshot_owner.SnapshotOwner( + shared_by = corellium.models.snapshot_owner_v1.SnapshotOwnerV1( name = '', email = '', ), ), ) + """ def testUserSnapshots(self): """Test UserSnapshots""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_user_update.py b/test/test_user_update.py index c928b8e..77e910d 100644 --- a/test/test_user_update.py +++ b/test/test_user_update.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.user_update import UserUpdate # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.user_update import UserUpdate class TestUserUpdate(unittest.TestCase): """UserUpdate unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> UserUpdate: """Test UserUpdate - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.user_update.UserUpdate() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `UserUpdate` + """ + model = UserUpdate() + if include_optional: return UserUpdate( - name = '', + name = '', label = '' ) - else : + else: return UserUpdate( ) + """ def testUserUpdate(self): """Test UserUpdate""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_users_api.py b/test/test_users_api.py new file mode 100644 index 0000000..4415e00 --- /dev/null +++ b/test/test_users_api.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.users_api import UsersApi + + +class TestUsersApi(unittest.TestCase): + """UsersApi unit test stubs""" + + def setUp(self) -> None: + self.api = UsersApi() + + def tearDown(self) -> None: + pass + + def test_v3_agree_to_terms(self) -> None: + """Test case for v3_agree_to_terms + + Agree to terms + """ + pass + + def test_v3_change_password(self) -> None: + """Test case for v3_change_password + + Change password + """ + pass + + def test_v3_create_user(self) -> None: + """Test case for v3_create_user + + Create a user + """ + pass + + def test_v3_delete_user(self) -> None: + """Test case for v3_delete_user + + Delete a user + """ + pass + + def test_v3_get_reset_link_info(self) -> None: + """Test case for v3_get_reset_link_info + + Get reset link info + """ + pass + + def test_v3_patch_user(self) -> None: + """Test case for v3_patch_user + + Update a user + """ + pass + + def test_v3_reset_password(self) -> None: + """Test case for v3_reset_password + + Reset password + """ + pass + + def test_v3_send_reset_link(self) -> None: + """Test case for v3_send_reset_link + + Send a password reset link + """ + pass + + def test_v3_update_own_profile(self) -> None: + """Test case for v3_update_own_profile + + Update your profile + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_users_v1_api.py b/test/test_users_v1_api.py new file mode 100644 index 0000000..f0f05a6 --- /dev/null +++ b/test/test_users_v1_api.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.users_v1_api import UsersV1Api + + +class TestUsersV1Api(unittest.TestCase): + """UsersV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = UsersV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_change_password_users(self) -> None: + """Test case for v1_change_password_users + + Change User Password + """ + pass + + def test_v1_create_user(self) -> None: + """Test case for v1_create_user + + Create User + """ + pass + + def test_v1_delete_user(self) -> None: + """Test case for v1_delete_user + + Delete User + """ + pass + + def test_v1_get_reset_link_info(self) -> None: + """Test case for v1_get_reset_link_info + + Send Password Reset Link Info + """ + pass + + def test_v1_reset_user_password(self) -> None: + """Test case for v1_reset_user_password + + Reset User Password + """ + pass + + def test_v1_send_user_reset_link(self) -> None: + """Test case for v1_send_user_reset_link + + Send Password Reset Link + """ + pass + + def test_v1_update_user(self) -> None: + """Test case for v1_update_user + + Update User + """ + pass + + def test_v1_user_agree_terms(self) -> None: + """Test case for v1_user_agree_terms + + Consent to the current terms and conditions + """ + pass + + def test_v1_users_login(self) -> None: + """Test case for v1_users_login + + Log In + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v1_check_subdomain_existence_parameters.py b/test/test_v1_check_subdomain_existence_parameters.py index 825c178..2b4ba56 100644 --- a/test/test_v1_check_subdomain_existence_parameters.py +++ b/test/test_v1_check_subdomain_existence_parameters.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.v1_check_subdomain_existence_parameters import V1CheckSubdomainExistenceParameters # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.v1_check_subdomain_existence_parameters import V1CheckSubdomainExistenceParameters class TestV1CheckSubdomainExistenceParameters(unittest.TestCase): """V1CheckSubdomainExistenceParameters unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> V1CheckSubdomainExistenceParameters: """Test V1CheckSubdomainExistenceParameters - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.v1_check_subdomain_existence_parameters.V1CheckSubdomainExistenceParameters() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `V1CheckSubdomainExistenceParameters` + """ + model = V1CheckSubdomainExistenceParameters() + if include_optional: return V1CheckSubdomainExistenceParameters( domain = '' ) - else : + else: return V1CheckSubdomainExistenceParameters( domain = '', ) + """ def testV1CheckSubdomainExistenceParameters(self): """Test V1CheckSubdomainExistenceParameters""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_v1_create_hook_parameters.py b/test/test_v1_create_hook_parameters.py index 218c9a1..220ae06 100644 --- a/test/test_v1_create_hook_parameters.py +++ b/test/test_v1_create_hook_parameters.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.v1_create_hook_parameters import V1CreateHookParameters # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.v1_create_hook_parameters import V1CreateHookParameters class TestV1CreateHookParameters(unittest.TestCase): """V1CreateHookParameters unit test stubs""" @@ -28,31 +26,35 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> V1CreateHookParameters: """Test V1CreateHookParameters - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.v1_create_hook_parameters.V1CreateHookParameters() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `V1CreateHookParameters` + """ + model = V1CreateHookParameters() + if include_optional: return V1CreateHookParameters( - label = '', - address = '', - patch = '', - patch_type = 'csmfcc' + label = '', + address = '', + patch = '', + patch_type = 'csmfcc', + enabled = True ) - else : + else: return V1CreateHookParameters( label = '', address = '', patch = '', patch_type = 'csmfcc', ) + """ def testV1CreateHookParameters(self): """Test V1CreateHookParameters""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_v1_load_extension_parameters.py b/test/test_v1_load_extension_parameters.py index 5af37ce..e2290e5 100644 --- a/test/test_v1_load_extension_parameters.py +++ b/test/test_v1_load_extension_parameters.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.v1_load_extension_parameters import V1LoadExtensionParameters # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.v1_load_extension_parameters import V1LoadExtensionParameters class TestV1LoadExtensionParameters(unittest.TestCase): """V1LoadExtensionParameters unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> V1LoadExtensionParameters: """Test V1LoadExtensionParameters - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.v1_load_extension_parameters.V1LoadExtensionParameters() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `V1LoadExtensionParameters` + """ + model = V1LoadExtensionParameters() + if include_optional: return V1LoadExtensionParameters( image_id = '' ) - else : + else: return V1LoadExtensionParameters( image_id = '', ) + """ def testV1LoadExtensionParameters(self): """Test V1LoadExtensionParameters""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_v1_set_state_body.py b/test/test_v1_set_state_body.py index c4d6203..f450acb 100644 --- a/test/test_v1_set_state_body.py +++ b/test/test_v1_set_state_body.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.v1_set_state_body import V1SetStateBody # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.v1_set_state_body import V1SetStateBody class TestV1SetStateBody(unittest.TestCase): """V1SetStateBody unit test stubs""" @@ -28,25 +26,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> V1SetStateBody: """Test V1SetStateBody - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.v1_set_state_body.V1SetStateBody() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `V1SetStateBody` + """ + model = V1SetStateBody() + if include_optional: return V1SetStateBody( state = 'on' ) - else : + else: return V1SetStateBody( state = 'on', ) + """ def testV1SetStateBody(self): """Test V1SetStateBody""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_v1_update_hook_parameters.py b/test/test_v1_update_hook_parameters.py index d2ca4a3..4a0b96c 100644 --- a/test/test_v1_update_hook_parameters.py +++ b/test/test_v1_update_hook_parameters.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.v1_update_hook_parameters import V1UpdateHookParameters # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.v1_update_hook_parameters import V1UpdateHookParameters class TestV1UpdateHookParameters(unittest.TestCase): """V1UpdateHookParameters unit test stubs""" @@ -28,28 +26,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> V1UpdateHookParameters: """Test V1UpdateHookParameters - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.v1_update_hook_parameters.V1UpdateHookParameters() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `V1UpdateHookParameters` + """ + model = V1UpdateHookParameters() + if include_optional: return V1UpdateHookParameters( - label = '', - address = '', - patch = '', - patch_type = 'csmfcc', + label = '', + address = '', + patch = '', + patch_type = 'csmfcc', enabled = True ) - else : + else: return V1UpdateHookParameters( ) + """ def testV1UpdateHookParameters(self): """Test V1UpdateHookParameters""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_v3_delete_network_connection_request.py b/test/test_v3_delete_network_connection_request.py new file mode 100644 index 0000000..cf06921 --- /dev/null +++ b/test/test_v3_delete_network_connection_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.v3_delete_network_connection_request import V3DeleteNetworkConnectionRequest + +class TestV3DeleteNetworkConnectionRequest(unittest.TestCase): + """V3DeleteNetworkConnectionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> V3DeleteNetworkConnectionRequest: + """Test V3DeleteNetworkConnectionRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `V3DeleteNetworkConnectionRequest` + """ + model = V3DeleteNetworkConnectionRequest() + if include_optional: + return V3DeleteNetworkConnectionRequest( + force = True + ) + else: + return V3DeleteNetworkConnectionRequest( + ) + """ + + def testV3DeleteNetworkConnectionRequest(self): + """Test V3DeleteNetworkConnectionRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_v3_update_snapshot_request.py b/test/test_v3_update_snapshot_request.py new file mode 100644 index 0000000..8951bac --- /dev/null +++ b/test/test_v3_update_snapshot_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.v3_update_snapshot_request import V3UpdateSnapshotRequest + +class TestV3UpdateSnapshotRequest(unittest.TestCase): + """V3UpdateSnapshotRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> V3UpdateSnapshotRequest: + """Test V3UpdateSnapshotRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `V3UpdateSnapshotRequest` + """ + model = V3UpdateSnapshotRequest() + if include_optional: + return V3UpdateSnapshotRequest( + name = 'Clean boot' + ) + else: + return V3UpdateSnapshotRequest( + name = 'Clean boot', + ) + """ + + def testV3UpdateSnapshotRequest(self): + """Test V3UpdateSnapshotRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_validation_error.py b/test/test_validation_error.py index 7557aea..7cef21d 100644 --- a/test/test_validation_error.py +++ b/test/test_validation_error.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.validation_error import ValidationError # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.validation_error import ValidationError class TestValidationError(unittest.TestCase): """ValidationError unit test stubs""" @@ -28,28 +26,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> ValidationError: """Test ValidationError - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.validation_error.ValidationError() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: return ValidationError( - error = '', - error_id = 'ValidationError', - field = '' + error = '', + error_id = 'ValidationError', + var_field = '' ) - else : + else: return ValidationError( error = '', error_id = 'ValidationError', ) + """ def testValidationError(self): """Test ValidationError""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_vlan_config.py b/test/test_vlan_config.py new file mode 100644 index 0000000..be82556 --- /dev/null +++ b/test/test_vlan_config.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.vlan_config import VLANConfig + +class TestVLANConfig(unittest.TestCase): + """VLANConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VLANConfig: + """Test VLANConfig + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VLANConfig` + """ + model = VLANConfig() + if include_optional: + return VLANConfig( + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + gateway = '10.0.0.1', + network = '10.0.0.0/24', + dns_servers = ["1.1.1.1","8.8.8.8"] + ) + else: + return VLANConfig( + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + ) + """ + + def testVLANConfig(self): + """Test VLANConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vlan_config_v1.py b/test/test_vlan_config_v1.py new file mode 100644 index 0000000..af8cc0f --- /dev/null +++ b/test/test_vlan_config_v1.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.vlan_config_v1 import VLANConfigV1 + +class TestVLANConfigV1(unittest.TestCase): + """VLANConfigV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VLANConfigV1: + """Test VLANConfigV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VLANConfigV1` + """ + model = VLANConfigV1() + if include_optional: + return VLANConfigV1( + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + gateway = '', + network = '', + dns_servers = [ + '' + ] + ) + else: + return VLANConfigV1( + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + ) + """ + + def testVLANConfigV1(self): + """Test VLANConfigV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vlan_network_connection.py b/test/test_vlan_network_connection.py new file mode 100644 index 0000000..f01a8bf --- /dev/null +++ b/test/test_vlan_network_connection.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.vlan_network_connection import VLANNetworkConnection + +class TestVLANNetworkConnection(unittest.TestCase): + """VLANNetworkConnection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VLANNetworkConnection: + """Test VLANNetworkConnection + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VLANNetworkConnection` + """ + model = VLANNetworkConnection() + if include_optional: + return VLANNetworkConnection( + name = 'lab-vlan', + provider = 'vlan', + config = corellium.models.vlan_config.VLANConfig( + physical_interface = 'eth0', + vlan_id = 42, + dhcp_mode = 'internal', + gateway = '10.0.0.1', + network = '10.0.0.0/24', + dns_servers = ["1.1.1.1","8.8.8.8"], ), + identifier = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', + projects = {"1c41b1bc-4f53-48a8-b690-ad30611e1960":{"state":"connected"}}, + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + updated_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320' + ) + else: + return VLANNetworkConnection( + name = 'lab-vlan', + provider = 'vlan', + identifier = '0eb5d1e7-2c10-42b1-95fc-30e4e4885cd7', + created_at = '2026-03-14T09:12:47Z', + updated_at = '2026-03-17T11:41:05Z', + created_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + updated_by = 'e8c5b7ea-aa5f-4a4a-bdca-0c67060b5320', + ) + """ + + def testVLANNetworkConnection(self): + """Test VLANNetworkConnection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vlan_network_connection_v1.py b/test/test_vlan_network_connection_v1.py new file mode 100644 index 0000000..ff4cf4e --- /dev/null +++ b/test/test_vlan_network_connection_v1.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.vlan_network_connection_v1 import VLANNetworkConnectionV1 + +class TestVLANNetworkConnectionV1(unittest.TestCase): + """VLANNetworkConnectionV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VLANNetworkConnectionV1: + """Test VLANNetworkConnectionV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VLANNetworkConnectionV1` + """ + model = VLANNetworkConnectionV1() + if include_optional: + return VLANNetworkConnectionV1( + identifier = '', + provider = 'vlan', + name = '', + config = corellium.models.vlan_config_v1.VLANConfigV1( + physical_interface = '', + vlan_id = 1, + dhcp_mode = 'internal', + gateway = '', + network = '', + dns_servers = [ + '' + ], ), + projects = { + 'key' : corellium.models.project_network_state.ProjectNetworkState( + state = '', + details = corellium.models.details.details(), ) + }, + created_at = '', + updated_at = '', + created_by = '', + updated_by = '' + ) + else: + return VLANNetworkConnectionV1( + identifier = '', + provider = 'vlan', + name = '', + created_at = '', + updated_at = '', + created_by = '', + updated_by = '', + ) + """ + + def testVLANNetworkConnectionV1(self): + """Test VLANNetworkConnectionV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_volume_options.py b/test/test_volume_options.py index b0d9f4b..4b8c439 100644 --- a/test/test_volume_options.py +++ b/test/test_volume_options.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.volume_options import VolumeOptions # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.volume_options import VolumeOptions class TestVolumeOptions(unittest.TestCase): """VolumeOptions unit test stubs""" @@ -28,25 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> VolumeOptions: """Test VolumeOptions - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.volume_options.VolumeOptions() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `VolumeOptions` + """ + model = VolumeOptions() + if include_optional: return VolumeOptions( - blocks = 1.337, - name = '' + blocks = 5505024, + name = 'userdata_img' ) - else : + else: return VolumeOptions( + blocks = 5505024, + name = 'userdata_img', ) + """ def testVolumeOptions(self): """Test VolumeOptions""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_volume_options_v1.py b/test/test_volume_options_v1.py new file mode 100644 index 0000000..7db04ed --- /dev/null +++ b/test/test_volume_options_v1.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.volume_options_v1 import VolumeOptionsV1 + +class TestVolumeOptionsV1(unittest.TestCase): + """VolumeOptionsV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VolumeOptionsV1: + """Test VolumeOptionsV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VolumeOptionsV1` + """ + model = VolumeOptionsV1() + if include_optional: + return VolumeOptionsV1( + blocks = 1.337, + name = '' + ) + else: + return VolumeOptionsV1( + ) + """ + + def testVolumeOptionsV1(self): + """Test VolumeOptionsV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vpn_config_preauthorization.py b/test/test_vpn_config_preauthorization.py new file mode 100644 index 0000000..e69ae39 --- /dev/null +++ b/test/test_vpn_config_preauthorization.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.vpn_config_preauthorization import VpnConfigPreauthorization + +class TestVpnConfigPreauthorization(unittest.TestCase): + """VpnConfigPreauthorization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VpnConfigPreauthorization: + """Test VpnConfigPreauthorization + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VpnConfigPreauthorization` + """ + model = VpnConfigPreauthorization() + if include_optional: + return VpnConfigPreauthorization( + token = '' + ) + else: + return VpnConfigPreauthorization( + token = '', + ) + """ + + def testVpnConfigPreauthorization(self): + """Test VpnConfigPreauthorization""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vpn_definition.py b/test/test_vpn_definition.py index 94f04d7..1dfd9c3 100644 --- a/test/test_vpn_definition.py +++ b/test/test_vpn_definition.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.vpn_definition import VpnDefinition # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.vpn_definition import VpnDefinition class TestVpnDefinition(unittest.TestCase): """VpnDefinition unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> VpnDefinition: """Test VpnDefinition - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.vpn_definition.VpnDefinition() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `VpnDefinition` + """ + model = VpnDefinition() + if include_optional: return VpnDefinition( - proxy = [ - None - ], + proxy = [{"devicePort":22,"routerPort":22,"status":"started"}], listeners = [ - None + { + 'key' : null + } ] ) - else : + else: return VpnDefinition( ) + """ def testVpnDefinition(self): """Test VpnDefinition""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_vpn_definition_v1.py b/test/test_vpn_definition_v1.py new file mode 100644 index 0000000..f03636e --- /dev/null +++ b/test/test_vpn_definition_v1.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.vpn_definition_v1 import VpnDefinitionV1 + +class TestVpnDefinitionV1(unittest.TestCase): + """VpnDefinitionV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VpnDefinitionV1: + """Test VpnDefinitionV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VpnDefinitionV1` + """ + model = VpnDefinitionV1() + if include_optional: + return VpnDefinitionV1( + proxy = [ + None + ], + listeners = [ + None + ] + ) + else: + return VpnDefinitionV1( + ) + """ + + def testVpnDefinitionV1(self): + """Test VpnDefinitionV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_vpn_schema.py b/test/test_vpn_schema.py new file mode 100644 index 0000000..fc3b6e3 --- /dev/null +++ b/test/test_vpn_schema.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.vpn_schema import VpnSchema + +class TestVpnSchema(unittest.TestCase): + """VpnSchema unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VpnSchema: + """Test VpnSchema + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VpnSchema` + """ + model = VpnSchema() + if include_optional: + return VpnSchema( + type = 'openvpn', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + state = 'connected', + details = {"error":"connection timed out"} + ) + else: + return VpnSchema( + type = 'openvpn', + project_id = '1c41b1bc-4f53-48a8-b690-ad30611e1960', + state = 'connected', + details = {"error":"connection timed out"}, + ) + """ + + def testVpnSchema(self): + """Test VpnSchema""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_web_player_allowed_domains.py b/test/test_web_player_allowed_domains.py new file mode 100644 index 0000000..91de7b7 --- /dev/null +++ b/test/test_web_player_allowed_domains.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.web_player_allowed_domains import WebPlayerAllowedDomains + +class TestWebPlayerAllowedDomains(unittest.TestCase): + """WebPlayerAllowedDomains unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebPlayerAllowedDomains: + """Test WebPlayerAllowedDomains + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebPlayerAllowedDomains` + """ + model = WebPlayerAllowedDomains() + if include_optional: + return WebPlayerAllowedDomains( + allowed_domains = ["example.com"] + ) + else: + return WebPlayerAllowedDomains( + allowed_domains = ["example.com"], + ) + """ + + def testWebPlayerAllowedDomains(self): + """Test WebPlayerAllowedDomains""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_web_player_api.py b/test/test_web_player_api.py new file mode 100644 index 0000000..ad8ea76 --- /dev/null +++ b/test/test_web_player_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.web_player_api import WebPlayerApi + + +class TestWebPlayerApi(unittest.TestCase): + """WebPlayerApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebPlayerApi() + + def tearDown(self) -> None: + pass + + def test_v3_create_web_player_session(self) -> None: + """Test case for v3_create_web_player_session + + Create a webplayer session + """ + pass + + def test_v3_delete_web_player_session(self) -> None: + """Test case for v3_delete_web_player_session + + Delete a webplayer session + """ + pass + + def test_v3_get_web_player_allowed_domains(self) -> None: + """Test case for v3_get_web_player_allowed_domains + + Get allowed webplayer domains + """ + pass + + def test_v3_get_web_player_session(self) -> None: + """Test case for v3_get_web_player_session + + Get a webplayer session + """ + pass + + def test_v3_list_web_player_sessions(self) -> None: + """Test case for v3_list_web_player_sessions + + List webplayer sessions + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_web_player_create_session_request.py b/test/test_web_player_create_session_request.py index 7eb9d04..417ad5e 100644 --- a/test/test_web_player_create_session_request.py +++ b/test/test_web_player_create_session_request.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.web_player_create_session_request import WebPlayerCreateSessionRequest # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.web_player_create_session_request import WebPlayerCreateSessionRequest class TestWebPlayerCreateSessionRequest(unittest.TestCase): """WebPlayerCreateSessionRequest unit test stubs""" @@ -28,22 +26,24 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> WebPlayerCreateSessionRequest: """Test WebPlayerCreateSessionRequest - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.web_player_create_session_request.WebPlayerCreateSessionRequest() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `WebPlayerCreateSessionRequest` + """ + model = WebPlayerCreateSessionRequest() + if include_optional: return WebPlayerCreateSessionRequest( - project_id = '', - instance_id = '', - expires_in = 1.337, - features = corellium_api.models.features.Features( + project_id = '', + instance_id = '', + expires_in = 1.337, + features = corellium.models.features.Features( apps = True, connect = True, console = True, - coretrace = True, + core_trace = True, device_control = True, device_delete = True, files = True, @@ -59,19 +59,19 @@ def make_instance(self, include_optional): settings = True, snapshots = True, strace = True, - system = True, ), + system = True, ), client_id = '' ) - else : + else: return WebPlayerCreateSessionRequest( project_id = '', instance_id = '', expires_in = 1.337, - features = corellium_api.models.features.Features( + features = corellium.models.features.Features( apps = True, connect = True, console = True, - coretrace = True, + core_trace = True, device_control = True, device_delete = True, files = True, @@ -89,11 +89,12 @@ def make_instance(self, include_optional): strace = True, system = True, ), ) + """ def testWebPlayerCreateSessionRequest(self): """Test WebPlayerCreateSessionRequest""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_web_player_created_session.py b/test/test_web_player_created_session.py new file mode 100644 index 0000000..2478eb7 --- /dev/null +++ b/test/test_web_player_created_session.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.web_player_created_session import WebPlayerCreatedSession + +class TestWebPlayerCreatedSession(unittest.TestCase): + """WebPlayerCreatedSession unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebPlayerCreatedSession: + """Test WebPlayerCreatedSession + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebPlayerCreatedSession` + """ + model = WebPlayerCreatedSession() + if include_optional: + return WebPlayerCreatedSession( + identifier = 'a3569608-10e1-41c7-99fa-1a7d1f336c58', + token = '', + expiration = '2027-01-15T00:00Z', + domain = { + 'key' : null + }, + time = 1773479567000, + disabled = True + ) + else: + return WebPlayerCreatedSession( + identifier = 'a3569608-10e1-41c7-99fa-1a7d1f336c58', + token = '', + expiration = '2027-01-15T00:00Z', + ) + """ + + def testWebPlayerCreatedSession(self): + """Test WebPlayerCreatedSession""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_web_player_features.py b/test/test_web_player_features.py new file mode 100644 index 0000000..d5cfad6 --- /dev/null +++ b/test/test_web_player_features.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.web_player_features import WebPlayerFeatures + +class TestWebPlayerFeatures(unittest.TestCase): + """WebPlayerFeatures unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebPlayerFeatures: + """Test WebPlayerFeatures + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebPlayerFeatures` + """ + model = WebPlayerFeatures() + if include_optional: + return WebPlayerFeatures( + apps = True, + connect = True, + console = True, + coretrace = True, + device_control = True, + device_delete = True, + files = True, + frida = True, + images = True, + messaging = True, + netmon = True, + network = True, + port_forwarding = True, + power_management = True, + profile = True, + sensors = True, + settings = True, + snapshots = True, + strace = True, + system = True + ) + else: + return WebPlayerFeatures( + ) + """ + + def testWebPlayerFeatures(self): + """Test WebPlayerFeatures""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_web_player_session.py b/test/test_web_player_session.py index 2cd60db..30b2594 100644 --- a/test/test_web_player_session.py +++ b/test/test_web_player_session.py @@ -3,21 +3,19 @@ """ Corellium API - REST API to manage your virtual devices. # noqa: E501 + REST API to manage your virtual devices. - The version of the OpenAPI document: 7.6.0-29198 - Generated by: https://openapi-generator.tech -""" + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import datetime -import corellium_api -from corellium_api.models.web_player_session import WebPlayerSession # noqa: E501 -from corellium_api.rest import ApiException +from corellium.models.web_player_session import WebPlayerSession class TestWebPlayerSession(unittest.TestCase): """WebPlayerSession unit test stubs""" @@ -28,29 +26,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional): + def make_instance(self, include_optional) -> WebPlayerSession: """Test WebPlayerSession - include_option is a boolean, when False only required + include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # model = corellium_api.models.web_player_session.WebPlayerSession() # noqa: E501 - if include_optional : + # uncomment below to create an instance of `WebPlayerSession` + """ + model = WebPlayerSession() + if include_optional: return WebPlayerSession( - identifier = '', - token = '', - expiration = 1.337 + identifier = 'a3569608-10e1-41c7-99fa-1a7d1f336c58', + token = '', + expiration = '2027-01-15T00:00Z' ) - else : + else: return WebPlayerSession( - identifier = '', - token = '', - expiration = 1.337, + identifier = 'a3569608-10e1-41c7-99fa-1a7d1f336c58', + token = '', + expiration = '2027-01-15T00:00Z', ) + """ def testWebPlayerSession(self): """Test WebPlayerSession""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) if __name__ == '__main__': unittest.main() diff --git a/test/test_web_player_session_domain.py b/test/test_web_player_session_domain.py new file mode 100644 index 0000000..098463c --- /dev/null +++ b/test/test_web_player_session_domain.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.web_player_session_domain import WebPlayerSessionDomain + +class TestWebPlayerSessionDomain(unittest.TestCase): + """WebPlayerSessionDomain unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebPlayerSessionDomain: + """Test WebPlayerSessionDomain + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebPlayerSessionDomain` + """ + model = WebPlayerSessionDomain() + if include_optional: + return WebPlayerSessionDomain( + name = 'acme-corp', + label = 'Acme Corp', + terms_policy = 'all-modal', + cores = 8, + individual = False, + totp_required = True + ) + else: + return WebPlayerSessionDomain( + name = 'acme-corp', + ) + """ + + def testWebPlayerSessionDomain(self): + """Test WebPlayerSessionDomain""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_web_player_session_list_response.py b/test/test_web_player_session_list_response.py new file mode 100644 index 0000000..16e40ed --- /dev/null +++ b/test/test_web_player_session_list_response.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.web_player_session_list_response import WebPlayerSessionListResponse + +class TestWebPlayerSessionListResponse(unittest.TestCase): + """WebPlayerSessionListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebPlayerSessionListResponse: + """Test WebPlayerSessionListResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebPlayerSessionListResponse` + """ + model = WebPlayerSessionListResponse() + if include_optional: + return WebPlayerSessionListResponse( + results = [ + corellium.models.web_player_session.WebPlayerSession( + identifier = 'a3569608-10e1-41c7-99fa-1a7d1f336c58', + token = '', + expiration = '2027-01-15T00:00Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True + ) + else: + return WebPlayerSessionListResponse( + results = [ + corellium.models.web_player_session.WebPlayerSession( + identifier = 'a3569608-10e1-41c7-99fa-1a7d1f336c58', + token = '', + expiration = '2027-01-15T00:00Z', ) + ], + count = 25, + total = 137, + limit = 25, + offset = 0, + has_more = True, + ) + """ + + def testWebPlayerSessionListResponse(self): + """Test WebPlayerSessionListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_web_player_session_v1.py b/test/test_web_player_session_v1.py new file mode 100644 index 0000000..5778b65 --- /dev/null +++ b/test/test_web_player_session_v1.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.models.web_player_session_v1 import WebPlayerSessionV1 + +class TestWebPlayerSessionV1(unittest.TestCase): + """WebPlayerSessionV1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebPlayerSessionV1: + """Test WebPlayerSessionV1 + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebPlayerSessionV1` + """ + model = WebPlayerSessionV1() + if include_optional: + return WebPlayerSessionV1( + identifier = '', + token = '', + expiration = 1.337 + ) + else: + return WebPlayerSessionV1( + identifier = '', + token = '', + expiration = 1.337, + ) + """ + + def testWebPlayerSessionV1(self): + """Test WebPlayerSessionV1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_web_player_v1_api.py b/test/test_web_player_v1_api.py new file mode 100644 index 0000000..e33b28f --- /dev/null +++ b/test/test_web_player_v1_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Corellium API + + REST API to manage your virtual devices. + + The version of the OpenAPI document: 1.0.0 + Contact: support@corellium.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from corellium.api.web_player_v1_api import WebPlayerV1Api + + +class TestWebPlayerV1Api(unittest.TestCase): + """WebPlayerV1Api unit test stubs""" + + def setUp(self) -> None: + self.api = WebPlayerV1Api() + + def tearDown(self) -> None: + pass + + def test_v1_web_player_allowed_domains(self) -> None: + """Test case for v1_web_player_allowed_domains + + Retrieve the list of allowed domains for all Webplayer sessions + """ + pass + + def test_v1_web_player_create_session(self) -> None: + """Test case for v1_web_player_create_session + + Create a new Webplayer Session + """ + pass + + def test_v1_web_player_destroy_session(self) -> None: + """Test case for v1_web_player_destroy_session + + Tear down a Webplayer Session + """ + pass + + def test_v1_web_player_list_sessions(self) -> None: + """Test case for v1_web_player_list_sessions + + List all Webplayer sessions + """ + pass + + def test_v1_web_player_session_info(self) -> None: + """Test case for v1_web_player_session_info + + Retrieve Webplayer Session Information + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini index 2e0b6fc..f9bfc82 100644 --- a/tox.ini +++ b/tox.ini @@ -6,4 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - pytest --cov=corellium_api + pytest --cov=corellium